Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Using Hypertermial to test and trouble-shoot serial communications? 4

Status
Not open for further replies.

techzone12

Mechanical
May 9, 2005
31
0
0
US
If I Have a computer running Hyperterminal, and it's connected to the controller using serial commport-1. How can I use hyperterminal to test and trouble-shoot the serial communication. Can some one point me to a manual or a tutorial on how to use Hyperterminal to test serial communications (RS232 or RS485)? Say I don't know what the PLC/Controller is sending and I would like to capture the data stream, how do I do that?

Thanks
 
Replies continue below

Recommended for you

Set up a new connection, using whatever com port you want.
Set the port settings
Under Menu Transfer, select "capture text" - give it a name and location for saving

And away you go
 
Just remember RS232 talks on pins 2 and 3
So 1st make a cable up that you can plug into the back of your serial port, if you have one on your computer. Recent trends in laptops they do not put these on it anymore. But lets just say you have one. skip this step.

DB9 is usually on your laptop for the serial, same as on the front of the PLC. If you do not have the right type of connectors, then get some gender changers. Also get a null modem to swap pins 2 and 3, if you can not swap it in the connector quick enough

Go online with hyperterminal, not going to explain this if you do not know, then ask.
Match the port settings on the PLC serial port to the hyperterminal settings. you can also check these settings under your computer's device manager. Make sure you have the correct comm too while your at the device manager screen.

If you do not see any characters on the hyperterminal screen then swap 2 and 3. Its that simple.

Otherwise if you just see jumbled characters, then your serial baud rate, and the 8N1 for example are not the same (8 data, no parity, 1 stop bit, and no flow control) 8N1 is a typical setting, 9600 seems like a slow enough baud rate just in case your cable is marginal.
 
What about RS485, can I use Hyperterminal to anlayze the data, or should I use a different analyzer. Some one was telling me to use "HDD serial monitor".

Say the PLC is talking Modbus RTU (using RS485), and I just want to make sure that I can comminicate with the device and maybe pull one value. The idea is to do a quick test, before starting in depth programming.



 
For Modbus RTU we use Modscan and a small RS485 to RS232 convertor from B&B Electronics. Works easy and fast for quick peeks and troubleshooting.
 
I agree with catserveng obout ModScan.

Do not waist the time with HyperTerminal, get the right tool for the job.

We also use ModScan. It is a great Modbus testing tool. I would also get the ModSim tool as well. This way you can poll through an entire system with test data.

And, if you are connecting sockets to ports in the field to encapsulate Modbus, try Serial/IP Redirector by Tactical Software. You can set up a comm. port, say comm. 4, to be a virtual comm port. This way, your software, say Modscan, can connect to a device/terminal server across the network through a TCP port connection.

This is a quick, simple, inexpensive way to test serial devices remotely connected bu terminal servers or direct TCP connections.
 
Hiya robertjo24-

You mentioned:
"direct TCP connections."

A very popular open source (i.e. free) tool for monitoring ethernet connections (and some other network protocols, but typcially ethernet) is ethereal.

It is available at:


and while not affliated with the group, I have used their application for many years. Although the "filtering" is a little strange to set up (read as not the most friendly), it is an active application with new revisions coming out regularly. Also, with a large user base, bugs are quickly found and corrected (there hasn't been that many the last couple of years).

I can't answer for the windoze version of it, I usually use the 'nix versions. I often times carry around a hub and my laptop for "sniffing" the ethernet network that I'm interested in. Often times, when setting up my servers, I include it as part of the package on the server itself. Of course, the hub isn't required when the software is installed in the server.

One *COULD* come up with additional protocol packages for it as was done with SNMP, however, it might require a bit of effort and a through understanding of ethereal itself. Since it is an open source project, that could be done. Even without "custom" protocol packages, quite a bit of usefull information can be gleaned from the network traffic with this tool.

Again in the 'nix realm, for rs232 serial traffic, the tool of choice is minicom. It does not have the "funny" startup problems of hyperterminal and is somewhat more configurable but has a much higher learning curve.

Just passing along one of the tools that is very popular in the computer networking community.

Hope it helps!

Cheers,

Rich S.
 
Status
Not open for further replies.
Back
Top