Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Debugging serial port communication
PostPosted: Mon Jun 11, 2012 7:50 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
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.

Attachment:
Snap 2012-06-11 at 08.38.12.png
Snap 2012-06-11 at 08.38.12.png [ 54.06 KiB | Viewed 27616 times ]


Attachment:
Snap 2012-06-11 at 08.30.35.png
Snap 2012-06-11 at 08.30.35.png [ 46.02 KiB | Viewed 27616 times ]


Attachment:
Snap 2012-06-11 at 08.23.50.png
Snap 2012-06-11 at 08.23.50.png [ 51.5 KiB | Viewed 27616 times ]


Attachments:
maxterm.zip [162.43 KiB]
Downloaded 2409 times
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: