Sample Serial Communication Program with PLC
1. Visual BASIC 6 Sample Program
The above sample program is created using Visual Basic 6.0 that supports the MSComm controls. This program lets you define the serial port, baud rate and comm format. It will then take your command string and send it to the PLC and obtain a response string from the PLC and display on the response box. It takes care of time-out (user- definable) and will not block the program if the PLC is not present. We have tested it on a H-series as well as M-series PLC and it works well. Please feel free to email to support@tri-plc.com if you have any feedback or suggestions. Click here to download the sample VB program files: SerialComm.Zip You can easily include this form into your project and display it for user to set the communication parameters as well as perform some quick test of the communication with the PLC. The full source code is provided for your convenience if you wish to make any modifications. There are a 3 public functions defined in this sample file which you can call from your own application programs directly:
|
|||||||||
| 2. Julian Stone of The
United Kingdom Contributed the following application notes: VISUAL BASIC .NET Comm with M-series PLCs
|
|||||||||
| 3. Fran Jarnjak of USA Contributed the
following application notes: Apple Macintosh UNIX Comm with M-series PLCs
|