COM PORT Modbus RTU master issues
Posted: 06 Sep 2024, 16:32
I want to use my Revolution Pi Core S as a Modbus master.
My configuration: ARM64 Linux runtime, baudrate 19200, parity EVEN, 8 data bits and 1 stop bit.
I first followed this tutorial to configure the revolution pi via Pictory: https://youtu.be/gaJ6-D4Vd6A
First problem: in Pictory, after adding the ModbusRTU Master module and configuring (screenshot 1), I do “Save as start config.” then “Reset driver”. However, when I return later to PiCtory, sometimes the Modbus Master is still present, sometimes it has disappeared. I haven't been able to identify why it sometimes disappears.
I followed this guide for Codesys: https://revolutionpi.com/en/beispiel-mo ... u-master-2
When I connect to my Revolution Pi, the bus has never worked despite my various tests. (screenshot 2).
I use an external USB-RS485 converter, it's COM Port 4 when I use it with my computer. So I modified the CODESYSControl.cfg and CODESYSControl_User.cfg files by adding :
[SysCom]
Linux.Devicefile=/dev/ttyUSB3
And I've configured the COM Port in modbus as follows: (screenshot 3)
I doubt the addition of the “Linux.Devicefile=/dev/ttyUSB3” lines in the configuration files, because when I connect to the Revolution Pi via SSH and execute the command “echo ‘HELLO’ > /dev/ttyUSB0”, I receive a message on my computer (architecture: Revolution Pi => USB/RS485 => RS485/USB => computer).
So I also tried writing to the configuration files:
[SysCom]
Linux.Devicefile=/dev/ttyUSB0
With these tests, the serial port never worked either.
This is my first use of the Revolution Pi. I'd like to know why configurations made via PiCtory don't register correctly?
Why does the serial port remain inactive?
My configuration: ARM64 Linux runtime, baudrate 19200, parity EVEN, 8 data bits and 1 stop bit.
I first followed this tutorial to configure the revolution pi via Pictory: https://youtu.be/gaJ6-D4Vd6A
First problem: in Pictory, after adding the ModbusRTU Master module and configuring (screenshot 1), I do “Save as start config.” then “Reset driver”. However, when I return later to PiCtory, sometimes the Modbus Master is still present, sometimes it has disappeared. I haven't been able to identify why it sometimes disappears.
I followed this guide for Codesys: https://revolutionpi.com/en/beispiel-mo ... u-master-2
When I connect to my Revolution Pi, the bus has never worked despite my various tests. (screenshot 2).
I use an external USB-RS485 converter, it's COM Port 4 when I use it with my computer. So I modified the CODESYSControl.cfg and CODESYSControl_User.cfg files by adding :
[SysCom]
Linux.Devicefile=/dev/ttyUSB3
And I've configured the COM Port in modbus as follows: (screenshot 3)
I doubt the addition of the “Linux.Devicefile=/dev/ttyUSB3” lines in the configuration files, because when I connect to the Revolution Pi via SSH and execute the command “echo ‘HELLO’ > /dev/ttyUSB0”, I receive a message on my computer (architecture: Revolution Pi => USB/RS485 => RS485/USB => computer).
So I also tried writing to the configuration files:
[SysCom]
Linux.Devicefile=/dev/ttyUSB0
With these tests, the serial port never worked either.
This is my first use of the Revolution Pi. I'd like to know why configurations made via PiCtory don't register correctly?
Why does the serial port remain inactive?