Hi,
so far I have only used one com port - built-in interface in RPi - RS232 (dev/serial0) as COM1 in Codesys, and my CODESYControl_User.cfg have congiuration like below:
[SysCom] Linux.Devicefile=/dev/serial portnum := COM.SysCom.SYS_COMPORT1
Actually I added to my Rpi Hat with 2xRS232 (SPI). - /dev/spidev0.0 and /dev/spidev0.1
How I should change my CODESYControl_User.cfg file to use added porta as COM2 and COM3 in Codesys ?
/dev/spidev0.0 and /dev/spidev0.1 are SPI interfaces - so you could not map them to serial ports that way.
The serial port:
[SysCom] Linux.DeviceFile.1=/dev/serial0
for Com1
Log in to post a comment.
Hi,
so far I have only used one com port - built-in interface in RPi - RS232 (dev/serial0) as COM1 in Codesys, and my CODESYControl_User.cfg have congiuration like below:
Actually I added to my Rpi Hat with 2xRS232 (SPI). - /dev/spidev0.0 and /dev/spidev0.1
How I should change my CODESYControl_User.cfg file to use added porta as COM2 and COM3 in Codesys ?
/dev/spidev0.0 and /dev/spidev0.1 are SPI interfaces - so you could not map them to
serial ports that way.
The serial port:
[SysCom]
Linux.DeviceFile.1=/dev/serial0
for Com1
Last edit: eschwellinger 2023-10-07