HTG Rosemount

Hello
I connected to HIU 3201 using Python to read and write all the registers, including the strapping table. Each register has a second column called 'read only' (https://www.emerson.com/documents/a...c-interface-unit-modbus-protocol-en-76186.pdf). Does anyone know how to read that register? I tried to read it the same way as with the 'Data address,' but it gives me an error or returns nothingg
I'm using the pymodbus library
For example , this code is capable of reading a float from the addresses in the 'data addreess' column and not the 'read only' column
Code:
data = self.client.read_holding_registers(address=address, count=2, slave=self.slave)
dec = BinaryPayloadDecoder.fromRegisters(data.registers, byteorder=Endian.BIG, wordorder=Endian.BIG)
return dec.decode_32bit_float()
Thank you
 
The read only 3000n array are referred to as Input Registers whereas the 4000n read/write are referred to as Holding Registers. I'm no pymodbus guy, but I imagine there is a read_input_registers function that would direct that code at 3000n instead of 4000n. That being said, your code are reading floats, per the manual the floats start at 30301 read only and 40401 read/write. Make sure you are using the correct data type for the registers you wish to read. I guess in software you could send an integer to a float and it would just add a whole mess of 0's, or it might combine two integer registers into a single float that you would then have to split into two 16 bit integers again.

When you get into binary the read/write are called Coils, and they occupy their own Modbus register array. Read only are called Discrete Input, and they occupy their own Modbus register array. Coils usually being 00001 to 10000 and discrete inputs being 10001 to 20000. there's also a thing called bit packing where each bit of a 16 bit modbus Holding or Input register is significant such as 30075/40075 in you example. You read it as an integer then treat each bit separately. 40075 integer value 7 means your first three bits are high, use the manual to decode it

Good luck
 
Top