
Modbus RTU Function Codes
18 Modbus® RTU Serial Communications User Manual 02/13
3.4 Function Code 05 – Force Single Digital Output
Description
Force a single Digital Output (DO) (0X reference) to either ON or OFF. These are the same Dos used in
Function Code 01.
When broadcast, the same function forces the same DO in all attached slave devices.
Only supported by RSX,
VPR, VRX, and UDC5300 instruments. These instruments do not support
broadcast, and forcing can only be done in the Run mode.
Query
The query message specifies the DO to be forced. Registers are addressed starting at zero:
DO 1 is address 0.
The requested ON/OFF state is specified by a constant in the query data field. A value of FF 00 hex requests
it to be ON. A value of 00 00 hex requests it to be OFF.
RSX,
VPR, VRX, and UDC5300 products support a value of FF FF to release the force.
Query message format for function code 05
Slave
Address
Function
Code
DO
Address
High
DO
Address
Low
Force
Data
High
Force
Data
Low
CRC CRC
Example:
Force DO 6 ON in a slave at address 02.
02 05 00 06 FF 00 CRC CRC
Response
The normal response is an echo of the query, returned after the DO state has been forced.
Response message format for function code 05
Slave
Address
Function
Code
DO
Address
High
DO
Address
Low
Force
Data
High
Force
Data
Low
CRC CRC
Example:
Force DO 6 ON in a slave at address 02.
02 05 00 06 FF 00 CRC CRC
Kommentare zu diesen Handbüchern