Prepare the Serial port

1. Enable the serial port (sudo raspi-config)

Please choose :

2. Edit the CODESYS configuration file

sudo nano /etc/CODESYSControl.cfg

[SysCom]
Linux.Devicefile=/dev/serial

Press Ctrl+X and Y to save.

3. Internally CODESYS will be connected like this.

CODESYS with the ComfilePi