Creating a trigger channel for a Modbus RTU request
By default, a request of the Modbus RTU client to the Modbus RTU server is executed cyclically. For an edge-controlled triggering of the request, you must add a trigger channel to the data item of the Modbus RTU server. After mapping the trigger channel to a global variable in the real-time application, the request will be triggered by a rising edge of the global variable.
- Prerequisite
- You must add a data item to the Modbus RTU server.
- You must create a global variable (BOOL).
- Open the device view.
- In the device tree, double-click the server whose data item you want to edit.
- Select the data item you want to change.
- Double-click the Trigger channel text box.
- In the text box, enter a name for the trigger channel.
- Press Enter.
- The trigger channel can be mapped to a global variable now.
- Open the global variables view.
- Select the global variable you want to map to the trigger channel.
- Double-click the Mapping list box.
- In the drop-down list, select the trigger channel.
- Press Enter.
- The request is executed with each rising edge of the global variable.