dvdende - 2016-03-07

My Raspberry Pi has several USB modules (modem and FTDI for NMEA sensor). Next to this I like to use an additional FTDI RS-485 converter for the USB port. With this converter I like to have ModBus RTU communication. The converter is recognized and working. I tried in Codesys to setup the communication but I always get a RESPONSE_TIMEOUT at byModBusError in Codesys. I think the wrong ttyUSB port is assigned to the COM1 port.

Is there a way to assign ttyUSB5 to COM1 port?


Found the solution by myself. Place extra lines in the CodesysControl.cfg with the COM ports

[SysCom]
Linux.Devicefile=/dev/ttyUSB
portnum := COM.SysCom.SYS_COMPORT1;
portnum := COM.SysCom.SYS_COMPORT2;

In Codesys you can use the assigned port.