|Debugging serial port communication
|Page 1 of 1|
|Author:||mark.monroe [ Mon Jun 11, 2012 7:50 am ]|
|Post subject:||Debugging serial port communication|
When you are having an issue communicating to a device via a serial port and are not sure what is wrong, one of the first steps is to verify that the HMI is sending out commands over the serial port. To do that you need to use a serial port monitoring program, like Maxterm. Maxterm is attached to this post and does not require any kind of installation, just download and run.
Maxterm allows you to open up a serial port on your PC and see what data the HMI is sending over the port. Some drivers only send commands when told to, so you may have to create a HMI program that repeatable sets a memory address in the controller. If you are getting a "Comm err", that means that the HMI is sending out commands to a controller, and it is not getting a response back.
Maxterm also has a “Pass Through” mode which allows you to watch the communication between two devices. To use pass through mode you will need two serial ports on your PC. Connect one port to your HMI, and the other to the controller. You may need a null modem between the PC and the controller. It depends on the controller. In our example, the HMI is connected to COM1 on the PC, while the controller is connected to COM4 on the PC. If everything is set right, you should see text in the receive window.
Snap 2012-06-11 at 08.38.12.png [ 54.06 KiB | Viewed 26983 times ]
Snap 2012-06-11 at 08.30.35.png [ 46.02 KiB | Viewed 26983 times ]
Snap 2012-06-11 at 08.23.50.png [ 51.5 KiB | Viewed 26983 times ]
|Page 1 of 1||All times are UTC - 7 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group