Skip to main content

Configuring Modbus RTU

In order to select the correct serial device file for a serial port, you need to configure the device name of the Linux device for the serial port.

This is done in the [SysCom] section of the configuration file for Linux-based CODESYS Control SL products. Adapt this section to the device names.

  1. Open the configuration file located at the following path:

    /etc/codesyscontrol/CODESYSControl_User.cfg

    Tip

    The file uses the INI format.

  2. [SysCom] section: Find or create a section titled [SysCom].

  3. In this section, you configure the device name of the Linux device for the corresponding serial port: /dev/ttyAMA<number>

    Adapt the values according to your requirements.

    Example:

    [SysCom]
    Linux.Devicefile.1=/dev/ttyAMA0
    Linux.Devicefile.2=/dev/ttyAMA1
    Linux.Devicefile.3=/dev/ttyAMA2