Analyser Software for Modbus Serial RTU log

J

Thread Starter

Jim Baker

<p>An incomplete example of the log file captured for slave ID 62 is below. This is the sort of file the analyser would have to read. I could do it with captured Modbus TCP/IP using Ethereal's test2pcap, but if can't be fooled into analysing the log of serial comms.

<p>Thanks.
<pre>
Rx 8 bytes at 25-JUN-2003 08:37:12.984
0000 3E 04 01 68 00 78 75 07 .. .. .. .. .. .. .. .. >..h.xu.


Tx 245 bytes at 25-JUN-2003 08:37:12.984
0000 3E 04 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 >...............

0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
.
.
.
</pre>
 
C

Curt Wuollet

Hi Jim

od and hexdump might help, but something like AWK or a program might be needed.to parse the line and translate the various parts. The format is more or less fixed, so this wouldn't be very hard to do. If I had time, I'd do it as an exersize because it would be a handy thing to have.

if not EOF
{
Grab a line
If the first two characters are TX, print sent and add the time & date, store the length Same for Rx printing received, etc..
grab the next line
tokenize and pass the tokens to a convert function that prints out the values.
}

Less than a page of code.

Regards

cww
 
Top