Member Login
Search
Past & Future Posts
Sponsored Communities
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Cool stuff
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
If money can't buy happiness, I guess you'll just have to rent it.
RSS Feed
www.control.com/rss
from the Automation List department...
Modbus sniffing serial lineHello,
We have a working installation on Modbus serial RS232 (point to point connection).
I want to visualise the data that goes over the line (like it is possible in ethernet in promiscuous mode with wireshark).
How can I do this?
I guess I have to build a sniffing tap an have two serial ports in my PC? Or can I convert it to RS485 and have this signal in my PC?
I want to see the traffic of both and also timing is important.
There are some problems (+/- 4 times a day).
Thanks,
patrick
We have a working installation on Modbus serial RS232 (point to point connection).
I want to visualise the data that goes over the line (like it is possible in ethernet in promiscuous mode with wireshark).
How can I do this?
I guess I have to build a sniffing tap an have two serial ports in my PC? Or can I convert it to RS485 and have this signal in my PC?
I want to see the traffic of both and also timing is important.
There are some problems (+/- 4 times a day).
Thanks,
patrick
Google data scope and/or RS232 monitor for lots of free and commercial products to do this. The better ones have pretty good timing resolution.
I keep a couple around to diagnose problems and RE protocols.
Regards
cww
I keep a couple around to diagnose problems and RE protocols.
Regards
cww
You can use a modem splitter (I use one from BlackBox) and a software program (I wrote my own) to look at it and capture the data. I wrote my own software to post some timing information. You can, however, use something like Hypterminal to do the same thing. You just may not have the timing information. It's a good start regardless. The modem splitter and cables can be found on BlackBox's site.
Good Luck...
Good Luck...
Patrick,
Your idea of using two serial ports on a PC is a good one. You will be able to log the two separate data streams (TxData and RxData) by connecting them each to an RxData input of a serial port.
But then you said timing was important. This could be a problem. Serial ports on a PC running Windows or any other non-real-time operating system will buffer the serial data in their driver software so that you will have difficulty time-stamping the received characters with accuracy any better than about 50 msec. This means it might be difficult to see how the two data streams interleave or measure precise timing between messages in the two streams. Are you sure you need such precise timing information? Usually the data alone is sufficient to debug protocol problems. If you have some idea of the nature of the failure you are trying to track down, and it only happens once in a while, then you might be able to program a custom filter on the sniffing program to look for suspicious patterns, rather than just log all raw data.
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
Your idea of using two serial ports on a PC is a good one. You will be able to log the two separate data streams (TxData and RxData) by connecting them each to an RxData input of a serial port.
But then you said timing was important. This could be a problem. Serial ports on a PC running Windows or any other non-real-time operating system will buffer the serial data in their driver software so that you will have difficulty time-stamping the received characters with accuracy any better than about 50 msec. This means it might be difficult to see how the two data streams interleave or measure precise timing between messages in the two streams. Are you sure you need such precise timing information? Usually the data alone is sufficient to debug protocol problems. If you have some idea of the nature of the failure you are trying to track down, and it only happens once in a while, then you might be able to program a custom filter on the sniffing program to look for suspicious patterns, rather than just log all raw data.
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
Hi Patrick,
You can use a ModBus simulator in order to test you master or slave device, most tools come with their own protocol analyzer.
You can use C lenguage (or other) to get hex data from serial ports using hardware interruptions.
If you want to monitor both sides, slave and master, you can build one Y serial cable and use it.
If you have money enought Black Box have some hardware and software useful tools to do what you want.
Best regards,
Jairo J. Rodriguez
Automation Specialist
PDVSA-Petro Cedeņo
You can use a ModBus simulator in order to test you master or slave device, most tools come with their own protocol analyzer.
You can use C lenguage (or other) to get hex data from serial ports using hardware interruptions.
If you want to monitor both sides, slave and master, you can build one Y serial cable and use it.
If you have money enought Black Box have some hardware and software useful tools to do what you want.
Best regards,
Jairo J. Rodriguez
Automation Specialist
PDVSA-Petro Cedeņo
Hi,
If one of the applications is running on MS then you might try PortMon.
http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx
I have used it many times with great success.
HTH,
Mark
http://www.peakhmi.com
If one of the applications is running on MS then you might try PortMon.
http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx
I have used it many times with great success.
HTH,
Mark
http://www.peakhmi.com
One of the best applications available is Serial Test from Frontline Test Equipment http://www.fte.com/products/Serialtest-01.asp. I am not affiliated with this company but use this product every day.
To get accurate time stamping you will need two real serial ports, not USB to Serial adapters, on your PC. I use a dual port PCMCIA card in my laptop. I think it even comes with a Modbus decoder as well these days.
Jerry Miille
To get accurate time stamping you will need two real serial ports, not USB to Serial adapters, on your PC. I use a dual port PCMCIA card in my laptop. I think it even comes with a Modbus decoder as well these days.
Jerry Miille
I've used the Frontline product and it does work well for data capture, but if you want to timestamp, I've had better results under DOS. You can also hook up a storage scope to the handshake lines if you really want to unravel timing issues.
You can also get scatter data on the timing and capture around NAKs,
Regards
cww
You can also get scatter data on the timing and capture around NAKs,
Regards
cww
Patrick,
You would need three RS-485 converters, and that should work. You might not catch events where both ends start transmitting at the same time though. They should not do that, but we know that something is wrong... You could use two of our I-7520 converters to get the signal to two wire RS-485. Then one I-7561 to eavsedrop in via USB. See link at bottom.
If the Modbus master or slave is a PC, you might be able to use just software, similar to using WireShark. See http://www.tucows.com/preview/301057 for example.
Eric R
www.icpdas-usa.com
You would need three RS-485 converters, and that should work. You might not catch events where both ends start transmitting at the same time though. They should not do that, but we know that something is wrong... You could use two of our I-7520 converters to get the signal to two wire RS-485. Then one I-7561 to eavsedrop in via USB. See link at bottom.
If the Modbus master or slave is a PC, you might be able to use just software, similar to using WireShark. See http://www.tucows.com/preview/301057 for example.
Eric R
www.icpdas-usa.com
From Control Engineering magazine...
Related articles from Control Engineering magazine- Integrator: Replace serial cable with a wireless modem
- SCADA upgrade: PID, supervisory control and data acquisition
- 17 million cycles: Flexible Camera Link cable
- See inside: Software maps, monitors, troubleshoots Ethernet networks
- Reviewed resource: Profibus PA and Foundation Fieldbus—a cost comparison
- Engineers Week: Feb. 17-23, fun, useful things to do, diversity
- Engineering passion, OEE ideas
- Winners: Machine and Embedded Control
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.
Users of this site are benefiting from open source technologies, including PHP, PostgreSQL and Apache. Be happy.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!



