Liquiline CM44x Modbus Guideline V1.0
Hauser
10
© Copyright Dez. 2011
Response
Function code
1 Byte
0x10
Sub-function
2 Bytes
0x0000 to 0xFFFF
Quantity of Registers
2 Bytes
1 to 123 (0x7B)
Error
Error code
1 Byte
0x90
Exception code
1 Bytes
01 or 02 or 03 or 04
3.2.5.
FC23 Read/Write Multiple Register
This function code is used to write several registers and read several registers with one single Modbus transaction.
The write operation is executed before the read.
Holding registers are addressed starting at zero. Therefore holding registers 1-16 are addressed in the PDU as 0-15.
The request specifies the starting address and number of holding registers to be read as well as the starting address,
number of holding registers, and the data to be written. The byte count specifies the number of bytes to follow in
the write data field.
The normal response contains the data from the group of registers that were read. The byte count field specifies the
quantity of bytes to follow in the read data field.
Request
Function code
1 Byte
0x17
Read starting address
2 Bytes
0x0000 to 0xFFFF
Quantity to read
2 Bytes
0x0001 to 0x007D
Write starting address
2 Bytes
0x0000 to 0xFFFF
Quantity to write
2 Bytes
0x0001 to 0x0079
Write byte count
1 Byte
2 x (Quantity to write)
Write register value
2 x (Quantity to write)
Response
Function code
1 Byte
1 Byte
Sub-function
2 Bytes
Data
N x 2 Bytes
Error
Error code
1 Byte
0x97
Exception code
1 Bytes
01 or 03 or 04
Hint:
This function code can be used to exchange all process variables with one single Modbus request.
3.3.
Modbus Exception Codes
Erkennt der MODBUS Slave einen Fehler im Anforderungstelegramm des Masters, sendet er als Antwort dem
Master eine Fehlermeldung bestehend aus Slave-Adresse, Funktionscode, Fehlercode (Exception Code) und
Prüfsumme. Als Kennzeichnung, dass es sich um eine Fehlermeldung handelt, wird das Führungsbit des
zurückgesendeten Funktionscodes gesetzt. Die Fehlerursache wird über den Fehlercode (Exception Code) an den
Master übertragen.
Exception Code Info
01
ILLEGAL_FUNCTION
Der vom Master gesendete Funktionscode wird vom Messgerät (Slave) nicht unterstützt.
02
ILLEGAL_DATA_ADDRESS