Today is...
Tuesday, October 23, 2018
Welcome to Control.com, the global online
community of automation professionals.
Featured Video...
Featured Video
Wiring and programming your servos and I/O just got a lot easier...
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Registers in Modbus Communication
Registers read 2 bytes and it was already identified. What if the byte you need to read is byte 5 to 8, what will be the register number?

Hello,

I'm currently communicating a modbus master and slave and by using registers we can call the data.

The slave address of the bytes are

bytes 0 to 3 = analog input 1
byte 4 = status of analog input 1
byte 5 to 8 = analog input 2
byte 9 = status of analog input 2

Can anyone teach me how can i call the bytes 5 to 8 using registers.
the slave is Aztec 600 and the master is RVG200 both abb products..

Tia,

Hi,

I have additional questions about Modbus registers.

I just want to ask. If you're using the registers to call the bytes. It will goes like this:
register 1 = byte 0 and byte 1
register 2 = byte 2 and byte 3
register 3 = byte 4 and byte 5

and in order to read a float data we need to use register 1 and 2.

The question I'm dealing with is, how can i read a float data if it's starts with byte 1 to byte 4?

can i use "-3" to read the float value?

Yes, you can use Function Code (FC) 03 to read multiple Holding Registers.

The format of the FC 03 command message is

slave address (one byte)
Function Code (one byte) = 03
Starting address Hi order (one byte)
Starting address Low order (one byte)
Quantity of registers Hi (one byte, but the byte is the count of 16 bit registers, not 8 bit bytes)
Quantity of registers Lo (one byte, but the byte is the count of 16 bit registers, not 8 bit bytes)
CRC Lo (one byte)
CRC Hi (one byte)

the message totals 8 bytes.

The starting address for register (4)00001 would be 00 00 (hex) FC 03 automatically addresses the (4)xxxxx memory area. (4) is just an indicator that the memory area is a Holding register. the leading numeral (4) is not part of the Modbus message .

The quantity of registers to read three 32 bit floating point values (two registers for each FP value) at, for example, registers (4)00001, (4)00003 and (4)00005 would be six registers = 00 06 (hex)

The reply would include 12 bytes of data: three 32 bit FP values = 4 bytes per values * 3 values)

Yes you can but you need to filter the correct bytes on the receiving end.

If you need byte 1 to 4, you will have to request register 1 up to register 3 (Modbus uses 16 bit registers). As a response you will get 6 bytes (0 to 5), filter out byte 1 to 4. You will need register 1 for byte 1 and register 3 for byte 4!

If possible it is easier to align data in 16 bit words on the slave side.

Hi,

I need to read the analog input 2.

Register 1 = byte 0 and byte 1
Register 2 = byte 2 and byte 3
Register 3 = Byte 4 and Byte 5
Register 4 = Byte 6 and Byte 7
Register 5 = Byte 8 and Byte 9

in order to read the Analog Input 2, i need the Byte 5, byte 6, byte 7 and byte 8. How can i call them?

The only thing i can input are the following: Register #(0 to 65535), Data Format (sint16, sint32, rev sint32, IEEE, rev IEEE) and Data type(holding or input register).

Analog Input 1 = Register 1 and Register 2.

Analog Input 1 status = byte 4

Analog Input 2 = Register 3 (byte 5), Register 4 and 5 or byte 5, byte 6, byte 7 and byte 8.

Analog Input 2 status = byte 9

Analog Input 3 = Register 6 and Register 7 (byte 9,10,11 & 12)

I hope you can help me on this...

Best Regards,

Hello,

What is negative register? I'm working with RVG200 (ABB recorder) and it doesn't have options like that. and the only way i can call the values are using registers.

also i can change the data Format from the ff: Sint16, Sint32, rev Sint32, IEEE and rev IEEE. I can also change the data type from holding and input register.

Is this enough to solve my problem? or do i need to put a device between this two devices that can realign the bytes for me to read them thru this options.

Best Regards,