MODBUS RTU: any way to adjust time outs?
Posted: 18 Aug 2020, 12:40
Hi,
I have a MODBUS RTU Master in my RevPi connect, with only 5 actions defined. There is 3 slaves attached, the wiring is all twisted Pair CAT5 via a distribution PCB and short stubs of like 20cm to each device. Total cable length is around 1m estimated. The bus is terminated at the RevPi and on the distribution PCB on the far end. Baudrate is 19200.
So these should be at least for my understanding absolutely best case conditions for signal integrity on the RS485. I get random timeouts from the devices, which my software auto-recovers, but it's not nice anyhow.
In the deamon.log I see something like this:
which correlates with what my software does:
Is there any way to increase the timeouts slightly to see if it's a corner case, or to see even the RAW traffic on the bus and log it somehow? I want to get an understanding whats happening before I blame
a) me
b) KUNBUS
or
c) the manufacturer of the MODBUS slaves (which we use a lot of but in a Profibus version, and never had any issues, and the Profibus timing is one of the strictest I am aware of)
Markus
I have a MODBUS RTU Master in my RevPi connect, with only 5 actions defined. There is 3 slaves attached, the wiring is all twisted Pair CAT5 via a distribution PCB and short stubs of like 20cm to each device. Total cable length is around 1m estimated. The bus is terminated at the RevPi and on the distribution PCB on the far end. Baudrate is 19200.
So these should be at least for my understanding absolutely best case conditions for signal integrity on the RS485. I get random timeouts from the devices, which my software auto-recovers, but it's not nice anyhow.
In the deamon.log I see something like this:
Code: Select all
Aug 18 04:57:52 sopdetpump piModbusMaster[1810]: modbus rtu action device: /dev/ttyRS485, slave address: 2 function: 0x03, address: 33 failed -1/110/-112345568
Aug 18 04:57:52 sopdetpump piModbusMaster[1810]: modbus rtu action device: /dev/ttyRS485, slave address: 2 function: 0x06, address: 34 failed -1/110/-112345568
which correlates with what my software does:
Code: Select all
MODBUS_Action_Status_2: error 0x6E, try reset, attemp 1 of 5
MODBUS_Action_Status_5: error 0x6E, try reset, attemp 1 of 5
Is there any way to increase the timeouts slightly to see if it's a corner case, or to see even the RAW traffic on the bus and log it somehow? I want to get an understanding whats happening before I blame
a) me
b) KUNBUS
or
c) the manufacturer of the MODBUS slaves (which we use a lot of but in a Profibus version, and never had any issues, and the Profibus timing is one of the strictest I am aware of)
Markus