Super Systems AC20 RS485 Modbus User Manual
Page 8

Page 8/59
TITLE: MODBUS/J-BUS Protocol for SSi’s- AC20 ENG. 824E REV. 1
Function code 5: Single bit writing
By using this command, the master unit can change the state of one bit of the slave unit.
Command from master to slave
Reply from slave to master
Range
Byte
Range
Byte
Slave address (0*-255)
1
Slave address (1-255)
1
Function code (05)
1
Function code (05)
1
Bit address (high byte)
1
Bit address (high byte)
1
Bit address (low byte)
1
Bit address (low byte)
1
Data
2
Data
2
Error check (CRC-16) (low byte)
1
Error check (CRC-16) (low byte)
1
Error check (CRC-16) (high byte)
1
Error check (CRC-16) (high byte)
1
* To use the address 0, see note 1 at page 12: “Broadcast address”.
“Data” field
= 0h to reset the bit
= FF00h to set the bit
Example:
Set bit 219 (DBh) of slave at address 35 (23h)
Command from master to slave
Reply from slave to master
Range
Byte
Range
Byte
Slave address
23h
Slave address
23h
Function code
05h
Function code
05h
Bit address (high byte)
00h
Bit address (high byte)
00h
Bit address (low byte)
DBh
Bit address (low byte)
DBh
Data
FFh
Data
FFh
Data
00h
Data
00h
Error check (CRC-16) (low byte)
FAh
Error check (CRC-16) (low byte)
FAh
Error check (CRC-16) (high byte)
83h
Error check (CRC-16) (high byte)
83h