List of all functions/instructions available in R3 programming language for managing the Modbus/TCP client protocol.
Legend: FC = Function Code - R = Permitted use in Rules - T = Permitted use in Tasks - I = Instruction - F = Function (thus has a return value) |
|||||
---|---|---|---|---|---|
Keyword |
FC |
R |
T |
F/I |
Description |
mbc_init() |
- |
- |
T |
F |
Initialize Modbus/TCP client |
22 |
- |
T |
F |
Write registers with mask |
|
22 |
- |
T |
F |
Write registers with mask via support structure |
|
01 |
- |
T |
F |
Read coils |
|
01 |
- |
T |
F |
Read coils with support structure |
|
02 |
- |
T |
F |
Read discrete inputs |
|
02 |
- |
T |
F |
Read discrete inputs with support structure |
|
03 |
- |
T |
F |
Read holding registers |
|
03 |
- |
T |
F |
Read holding registers with support structure |
|
04 |
- |
T |
F |
Read input registers |
|
04 |
- |
T |
F |
Read input registers with support structure |
|
05 (single coil) 15 (coils > 1) |
- |
T |
F |
Write coils |
|
05 (single coil) 15 (coils > 1) |
- |
T |
F |
Write coils using support structure |
|
15 |
- |
T |
F |
Write coils using Modbus function code of multiple corresponding write functions |
|
15 |
- |
T |
F |
Write coils via support structure using Modbus function code of multiple corresponding write functions |
|
16 |
- |
T |
F |
Write registers using Modbus function code of multiple corresponding write functions |
|
16 |
- |
T |
F |
Write registers via support structure using Modbus function code of multiple corresponding write functions |
|
06 (single reg) 16 (reg > 1) |
- |
T |
F |
Write registers |
|
06 (single reg) 16 (reg > 1) |
- |
T |
F |
Write registers via support structure |
|
22 |
- |
T |
F |
Write registers with mask by specifying the unitID |
|
01 |
- |
T |
F |
Read coils by specifying the unitID |
|
02 |
- |
T |
F |
Read discrete inputs specifying the unitID |
|
03 |
- |
T |
F |
Read holding registers specifying the unitID |
|
04 |
- |
T |
F |
Read input registers specifying the unitID |
|
05 (single coil) 15 (coils > 1) |
- |
T |
F |
Write coils by specifying the unitID |
|
15 |
- |
T |
F |
Write coils specifying the unitID using Modbus function code of the corresponding multiple write functions |
|
16 |
- |
T |
F |
Write registers specifying the unitID using Modbus function code of the corresponding multiple write functions |
|
06 (single reg) 16 (reg > 1) |
- |
T |
F |
Write registers by specifying the unitID |
NOTE: The Function Code (FC) is a specific code used in a Modbus request to tell the Modbus slave device what type of memory (HOLDING REGISTERS, INPUT COILS, ...) to access and what action to perform on that memory (read or write).