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+?
Read USB Serial - RS232 Codesys
-
flopez
- Posts: 2
- Joined: 17 Feb 2022, 10:54
Read USB Serial - RS232 Codesys
You do not have the required permissions to view the files attached to this post.
-
Amar
- KUNBUS
- Posts: 200
- Joined: 15 Jul 2019, 10:58
Re: Read USB Serial - RS232 Codesys
Check if correct COM port is configured in /etc/CODESYSControl.cfg and in Codesys Application
/dev/ttyUSB0 -> COM Port 1
/dev/ttyUSB1 -> COM Port 2 …
Refer topic configuring MODBUS RTU Serial Port
https://revolutionpi.com/tutorials/beis ... tu-master/
/dev/ttyUSB0 -> COM Port 1
/dev/ttyUSB1 -> COM Port 2 …
Refer topic configuring MODBUS RTU Serial Port
https://revolutionpi.com/tutorials/beis ... tu-master/
KUNBUS