Topic Author
Posts: 2
Joined: 17 Feb 2022, 11:54
Answers: 0

Read USB Serial - RS232 Codesys

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.
codesys_usb.png (14.35 KiB) Viewed 3581 times
I also know that it is required to edit a configuration file, called CODESYSControl.cfg and add these lines:

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+?
Posts: 150
Joined: 15 Jul 2019, 12:58
Answers: 4

Re: Read USB Serial - RS232 Codesys

18 Feb 2022, 12:18

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/

Who is online

Users browsing this forum: No registered users and 1 guest