Modbus register decode

Duhhhh. I missed the first column as bytes not registers. It is bytes but the Modbus message needs the start register address.

Steve is right on the hex 0006 starting address. The (3)xxxxx register addressing is always one based, not zero based.

disinfection is (3)00001 & (3)000002; hex 0000

pH is (3)00003 & (3)00004; hex 0002

Temperature is (3)00005 & (3)00006; hex 0004

RPM is (3)00007 & (3)00008; hex 0006
 
damica1:

His starting address is in the byte string: 03 04 00 0c 00 02 b0 2a

00 0C is the starting address, followed by 00 02 the requested number of registers.

As Steve pointed out, it is the starting "REGISTER" address, not the starting byte address, so it should be 00 06(h), not 00 0C(h)
 
Hmmm. it does say "offset" doesn't it... I will try that tomorrow and if you are correct that's a friggin lousy way to write documentation.




More importantly, it says BYTE offset. Steve is right.


Just to have immediate success, read 10 (0x0a) words (= twenty bytes), starting from location 0. The word at offset 6 from the first will comprise byte value 0x43 followed by byte value 0xbb if the rpm is 375.0.


[update: I am late but, as everyone else noted, BYTE is the key; elk don't know how many feet a horse got]
 
Well Steve... You are the man. Thank you! All is exactly as you laid out. The addresses are zero based.

I have not seen a doc before that laid the data out like that. I know(now) that all the info is there to glean that but it would have been just as easy to give direct addresses wouldn't it?
 
Last edited:
Glad I could help. I've had to debug many implementations of Modbus so I've been where you were.
The Modbus protocol isn't exactly your friend. Your original Modbus command asks for a length of 2 (Words) and the response says the length of its data is 4 (Bytes).
 
The Modbus protocol isn't exactly your friend. Your original Modbus command asks for a length of 2 (Words) and the response says the length of its data is 4 (Bytes).

That would be correct though, 2 bytes = one word.

I'm using the Spectrum Gateway which while pretty easy to use, doesn't give you much direct control over this if you need to get creative. And the interface is frustrating to use when trying to figure things out. Once it's configured though its fine.

While I have a protocol analyzer to examine the comm traffic, I don't have a piece of modbus specific software to read and write bytes.. maybe its time I did.
 

Similar Topics

Hi everyone, I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system. SCADA <-...
Replies
4
Views
168
Hi all, I'm really new to this. I need to export the Modbus register mapping from a Modicon M580 through Control Expert for the registers that...
Replies
4
Views
967
I have a Red Lion G09 scanning 8 Invertek P2 VFDs via modbus RTU - I've setup necessary comms and tags and all works well. I have a 'Settings'...
Replies
3
Views
1,884
I have Micro850 with module 2080-Serialisol. It is needed to read 5 registers from a device via Modbus RTU. The device is Ok, I can read the data...
Replies
0
Views
1,146
Hi, I started my journey with Micro820 and I have to read input status address 10001-10010 from one device via Modbus TCP, everything works fine...
Replies
0
Views
1,201
Back
Top Bottom