Generic Modbus Slave
After inserting a Generic Modbus node under the RS485 node, you can click it to show:
Once an object (a row of the table) is added, you have to set:
In the General tab, you can set:
You have to assign a variable to each element (row of the table), using one of the following modes:
- Inside the main window, the General tab and the Parametrization tab.
- Inside the catalog window, the list of all the available Modbus commands.
- Name: the name of the slave node
- Modbus address: the Modbus address of the slave node inside the RTU network
- Node number: a value used for diagnostic purpose to identify the slave node
- Address: Modbus address of the object to be written
- Type: type of the object to be written
- Value: value assigned to the object to be written
- TimeOut: value of maximum time (in milliseconds) after which the operation is consid- ered failed (default is 200 ms)
- Modbus FC-01(Read Coils): reading of one or more RW bits by slave node
- Modbus FC-02(Read Discrete Inputs): reading of one or more RO bits by slave node
- Modbus FC-03(Read Holding Registers): reading of one or more RW registers by slave node
- Modbus FC-04(Read Input Registers): reading of one or more RO registers by slave node
- Modbus FC-05(Write Single Coil): writing of a single RW bit on slave node
- Modbus FC-06(Write Single Register): writing of a single RW register on slave node
- Modbus FC-15(Write Multiple Coils): writing of one or more RW bits on slave node
- Modbus FC-16(Write Multiple registers): writing of one or more RW registers on slave node
- Start address: Modbus address of the first object (coil) to be read
- Polling time: minimum interval of time (in milliseconds) to wait before executing again the command; if set to 0, the time between two commands execution depends on the PLC idle
- Timeout: value of maximum time (in milliseconds) after which the operation is considered failed (default is 1000 ms)
- Wait before send: waiting time before each command execution, doesn’t count PLC idle time. This time is added to Polling time value. (Default 0)
- One shot variable: you can specify a BOOL variable that is used to trigger the sending ofthe command. When this variable is set to TRUE the command is sent, then, when the command is actually served, the variable is automatically reset by Modbus RTU master.
- using the Assign button, choose one of the variables previously declared on the PLC (for coils only booleans are allowed). The variable will be mapped as a datablock.
- directly declare a new variable in the Label column, the variable will be mapped as a datablock boolean variable.