Read USB Serial - RS232 Codesys
Posted: 17 Feb 2022, 12:06
Hi there,
I'm developing a CODESYS program which will retrieve information from sensors using multiple USB's.
Searching in some CODESYS forums I have learnt that exists a library which allows you to access to a USB to read his content. See the image below.
I also know that it is required to edit a configuration file, called CODESYSControl.cfg and add these lines:
Linux.Devicefile=/dev/ttyUSB
portnum:=COM.SysCom.SYS_COMPORT1
Despite doing all this steps, the program is not able to open a communication and read a USB. However, I have tried to read it using a python application and works perfectly.
My question is, which steps are necessary for reading USB or RS232 devices in CODESYS using the USB ports of my RevPi Connect+?
I'm developing a CODESYS program which will retrieve information from sensors using multiple USB's.
Searching in some CODESYS forums I have learnt that exists a library which allows you to access to a USB to read his content. See the image below.
I also know that it is required to edit a configuration file, called CODESYSControl.cfg and add these lines:
Linux.Devicefile=/dev/ttyUSB
portnum:=COM.SysCom.SYS_COMPORT1
Despite doing all this steps, the program is not able to open a communication and read a USB. However, I have tried to read it using a python application and works perfectly.
My question is, which steps are necessary for reading USB or RS232 devices in CODESYS using the USB ports of my RevPi Connect+?