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.
Open the configuration file located at the following path:
/etc/codesyscontrol/CODESYSControl_User.cfgTip
The file uses the
INIformat.[SysCom]section: Find or create a section titled[SysCom].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