Sign in to follow this  
Followers 0
Guest brett

PLC to PC help me please

3 posts in this topic

Hello I have been asked to build a test unit that must communicate with a PC. The PC is used to test a product, it does this by executing test programs written as .DLL files. Can any body tell me how i can get my A1s PLC to instruct the PC to execute these .DLL files. Kind Regards Brett

Share this post


Link to post
Share on other sites
You probably don't start those DLLs from command prompt, do you? (I never tried but you could do it using rundll) You need PC program that can both read PLC memory and execute the DLLs based on PLC memory status.

Share this post


Link to post
Share on other sites
You need to give us a little more info. How do you use the PC program you have now? Do you just run it? Do you need to go through various menus? Can you run it from a command line with parameters that tell it what to do? Do you have any sort of programming background such as Visual Basic? If the program in question can be controlled via the command line then you could have the PLC send commands serially to the PC. You could then write a simple application in the PC which would be listening for the serial comand from the PLC. It would then start up your real PC application with the appropriate parameters. For instance in Delphi you can start up another application by executing the following Windows call: ShellExecute(Handle,'open', 'c:\windows\notepad.exe','c:\SomeText.txt', nil, SW_SHOWNORMAL); The example starts up NotePad and passes a parameter that tells it to open a file called 'SomeText.txt'. It could just as easily have started up your test program and passed it parameters indicating what to do (instead of the file name). VB and other languages have their own similar methods. You may be able to run the dll's directly too. DDE is another option. You need to know just what your existing application can and can't do. Jim Rowell

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0