Today is...
Monday, September 16, 2019
Welcome to Control.com, the global online
community of automation professionals.
Featured Video...
A tutorial introduction to programming using the QuickBuilder Programming Environment.
Help keep our servers running...
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

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 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

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,

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 2 = Register 3 (byte 5), Register 4 and 5 or byte 5, byte 6, byte 7 and byte 8.

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,

Would you please post a link to the manuals that include the Modbus information for the Aztec 600 and the RVG200 recorder?

Let's make sure it is understood what you are trying to do.

1. You want the recorder (the Modbus master) to read values from the Aztec 600 analyzer (a Modbus slave), correct?

If not that, what?

2. What are the names of the values in the Aztec that you want to read?

When you use the CAS Modbus Scanner to read the data, it simultaneously displays the data in byte, word, int16, int32, uint32 and ieee754 float format. Thus you will be able to discover the encoding being used by the analyser.