User manual
IEC61131 User and Reference Manual
April 22, 2008
315
Outputs
Type
Description
statusMasterCmd
Integer
The master command status codes for Modbus
protocols:
00 = message sent – waiting for response
01 = response received (no error occurred)
03 = bad value in function code register
04 = bad value in slave controller address register
05 = bad value in slave register address register
06 = bad value in length register
07 = serial port or protocol is invalid
12 = response timeout
24 = exception response: invalid function code
25 = exception response: invalid address
26 = exception response: invalid value
27 = protocol is invalid or serial port queue is full
28 = slave and master stations are equal; they must
be different
29 = exception response: slave device failure
30 = exception response: slave device busy
The master command status codes for DF1 protocols:
00 = Message sent - waiting for response
01 = Response received (no error occurred)
03 = bad value in function code register
04 = bad value in slave controller address register
05 = bad value in slave register address register
06 = bad value in length register
07 = slave has no more responses to send.
08 = Response received didn‟t match command sent.
09 = Specified protocol is not supported by this
controller.
16 = slave error - illegal command or format.
80 = slave error - addressing problem or memory
protect rungs.
Other = error codes from other DF1 compatible
controllers - Consult the documentation for specific
controller.
Modbus Function Codes
Function
Code
Purpose
Description
Maximum
Registers
01
Read Coil Status
Read digital output registers.
2000
02
Read Input Status
Read digital input registers.
2000
03
Read Holding Register
Read analog output registers.
125
04
Read Input Register
Read analog input registers.
125
05
Write Single Coil
Write digital output register.
1
06
Write Single Holding
Register
Write analog output registers.
1
15
Write Multiple Coils
Write digital output registers.
880