Super Systems AC20 RS485 Modbus User Manual
Page 7

Page 7/59
TITLE: MODBUS/J-BUS Protocol for SSi’s- AC20 ENG. 824E REV. 1
Function code 3 and 4: Words reading
These function codes are used by the master unit to read a consecutive group of words
(16 bit) which contain the value of the variable of the slave unit.
The master can require a maximum of 20 words at a time.
Request from master to slave
Reply from slave to master
Range
Byte
Range
Byte
Slave address (1-255)
1
Slave address (1-255)
1
Function code (03-04)
1
Function code (03-04)
1
Word starting address (high
byte)
1
Byte count (n)
1
Word starting address (low byte)
1
Data
n
Number of word (high byte)
1
Error check (CRC-16) (low byte)
1
Number of word (low byte)
1
Error check (CRC-16) (high byte)
1
Error check (CRC-16) (low byte)
1
Error check (CRC-16) (high byte)
1
The “Data” field contains the requested words in the following format: high bytes of the first
word, low byte of the first word, high byte of the second word, and so on.
The “data” field contains 8000h for not implemented addresses or for information not
relevant in the actual device configuration.
Example:
Ask to slave at address 29 (1Dh) the value of 3 words (3h) starting from word 178 (B2h)
Request from master to slave
Reply from slave to master
Range
Byte
Range
Byte
Slave address
1Dh
Slave address
1Dh
Function code
03h
Function code
03h
Word starting address (high byte)
00h
Byte count
06h
Word starting address (low byte)
B2h
Data
FFh
Number of words (high byte)
00h
Data
9Ch
Number of words (low byte)
03h
Data
80h
Error check (CRC-16) (low byte)
A7h
Data
00h
Error check (CRC-16) (high byte)
B0h
Data
05h
Data
5Ah
Error check (CRC-16) (low byte)
D7h
Error check (CRC-16) (high byte)
0Dh
The 6 bytes in “Data” field (FFh, 9Ch, 80h, 00h, 05h, 5Ah) are 3 words whose meaning is:
word 178 value = -100 (FF9Ch)
word 179 value = not implemented or not relevant (8000h)
word 180 value = 1370 (55Ah)