38
“UE BASIC” +08C0042EZ - rel. 1.0 - 16.10.2017
ENG
11.11 Modbus® protocol on the UEY boards
The Modbus® protocol can be selected using parameter C7 (see “Serial
connection parameters”).
Chapter 7 shows a list of variables and the corresponding addresses.
For multiple read/writes, the maximum number of “Register” or “Coil”
variables is 20.
The following functions are available::
• MB_READ_COIL_STATUS 1: used to request the status (ON or OFF) of a
certain number of “Coil” variables (binary, 1 bit), starting from the specied
address. Broadcast mode is not allowed.
• MB_READ_INPUT_STATUS 2: operationally identical to the above.
• MB_READ_HOLDING_REG 3: used to request the value of a consecutive
block of “Register” variables (numeric, 16 bit). Broadcast mode is not
allowed
.
• MB_READ_INPUT_REG 4: operationally identical to the above.
• MB_FORCE_SINGLE_COIL 5: used to set the status of an individual “Coil”
variable (binary, 1 bit) to ON or OFF (specifying the address of the bit in
question). Broadcast mode is allowed.
• MB_PRESET_SINGLE_REG 6: used to set the value of an individual
“Register” variable (numeric, 16 bit). Broadcast mode is allowed.
• MB_FORCE_MULTIPLE_COIL 15: used to set the status of a consecutive
block of “Coil” variables (binary, 1 bit) (specifying the number of bits and
number of bytes). Broadcast mode is allowed
• MB_PRESET_MULTIPLE_REG 16: used to set the value of a consecutive
block of “Register” variables (numeric, 16 bit). Broadcast mode is allowed.
11.12 Exceptions managed
01 illegal function
02 illegal data address
03 illegal data value