Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.otee.io/llms.txt

Use this file to discover all available pages before exploring further.

In the top bar of your project browser pane, press the “Create an entity” button. Select “Driver configuration” from the drop-down menu in the “Type” field, then select “Modbus” from the drop-down menu in the “Driver” field. This will create a Modbus node in your project browser tree. Select the node to access the driver configuration. Modbus Configuration Light The configuration happens in two steps, where the first one is the client configuration itself, and the second one is the Modbus request configuration. You can create one or multiple clients, and within each client you can create one or multiple requests. For the client configuration, use the topmost field to specify your device’s name. Next, configure some more client settings (see table below) before setting up individual Modbus requests next.
Field NameExplanation
Invocation rate, msThe interval in milliseconds between sending of requests.
Request delay, msThe delay in milliseconds between the end of the previous response and the beginning of the next request to be sent, if needed.
Remote IP addressThe IP address of the Modbus TCP server.
Remote port numberThe port number that the Modbus TCP server is listening on, usually 502 or 1502.
As you set up your requests, also known as commands or messages (click on a request header to expand or collapse them), you can map Modbus memory addresses to your own, user-defined symbols via the “Driver symbols” table for better readability and practical re-use throughout your project. In practice, when you assign a Modbus address to tags in your POUs or global variables, you will now be able to select the according symbols instead of working with the rather cryptic memory addresses directly. The supported function codes are:
  • FC01: Read Coils
  • FC02: Read Input Discretes
  • FC03: Read Holding Registers
  • FC04: Read Input Registers
  • FC05: Write Single Coil
  • FC06: Write Single Register
  • FC15: Write Multiple Coils
  • FC16: Write Multiple Registers
For each request, you need to set the following input fields:
Field NameExplanation
Slave IDThe slave ID (unit ID) of the device that will receive the requests.
Timeout, msThe request timeout in milliseconds, i.e., the time allowed for the server to respond before the client gives up.
Number of channelsThe number of registers to be read/written.
Start addressThis is a 0-based offset from the first address of the corresponding data area. Example: Holding registers start at 40001, so a start address of 5 corresponds to register 40001 + 5 = 40006.
Write on changeApplies to function codes 5, 6, 15, and 16 only. If checked, requests will only be sent when the linked variables change. Otherwise, they’ll be sent as per the invocation rate as usual.
Once the request settings have been filled in, the symbol table to the right will update according to the specified starting address and number of channels. These symbols, one for each register, will be used to link the Modbus registers to program variables. You can rename the symbols as desired and reference them from variables within your project’s POUs.