Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reading Modbus register

Hi,
 
I am trying to read a 1 byte holding register with a hex address of 01C on a
Modbus RTU device.  In the Industrial Automation OPC Server data member
configuration, 30028 is entered as the member for the configured point.  Server
Explorer is unable to read this value and returns a "value bad" quality status
with a value of "XXX".
 
I am able to communicate with the device using Labview and VB, but would like to
use the Industrial Automation server.  Is 30028 the correct address entry for
reading this register and is there something I have missed in the Modbus configurations?
 
Thank you for your help.
 
Mark
0 Kudos
Message 1 of 5
(4,672 Views)
Modbus registers range from 40001 – 49999, and are 2 bytes each. What address are you using lin LabVIEW and VB?

-Khalid
0 Kudos
Message 2 of 5
(4,658 Views)
Hi Khalid,
 
The device is a CalControls 3300 temperature controller and the documentation for reading the holding registers is shown below.
 
Read Holding Registers
Byte      Meaning                                                                  Value(hex)
1           Slave address                                                          xx
2           ModBus Function code (read holding register)             03
3           Starting Address MSB                                              xx
4           Starting Address LSB                                               xx
5           No of registers MSB                                                 00
6           No of registers LSB                                                  01
7           CRC lo byte                                                             ??
8           CRC hi byte                                                             ??
 
The temperature is returned in bytes 3 and 4 of the reply and is divided by 10.

The message to the device would be:
[01][03][00][1C][00][01][45][CC]
 
If the temperature is 22.5 degrees, the reply from the device would be
[01][03][02][00][DE][B9][D7]
 
The Labview and VB programs I am using are writing the above message to the device to obtain the temperatures. 
 
Thanks,
Mark
0 Kudos
Message 3 of 5
(4,644 Views)
Hi Mark,

Thanks for the info'. I am guessing you have already tried 40028. I would try 40029 as well since the registers start from 40001, i.e., a 0 address is register 40001, and so 28 would be 40029.

If that doesn't work either, you can download this little handy utility to see which register is really being used:

http://www.win-tech.com/html/modscan.htm

Hope this helps.

-Khalid
0 Kudos
Message 4 of 5
(4,637 Views)
Hi Khalid,

I'll try that utility and see if I can figure out what is going on.

Thanks again for your time and help.

Mark
0 Kudos
Message 5 of 5
(4,601 Views)