Hi,
We use core 3 (jessie) connected with USB to an arduino communicating with modbus RTU master on the rev.
Read/write no problems.
Reading is done every 3000 ms
at a random time (could be a day/week) reading stops on 3 of our 5 devices.
piTest -r Modbus_Master_status: 0 dez (=00 hex)
piTest -r Modbus_Action_Status_1: 110 dez (=6e hex)
After trying to reset with piTest -w Action_Status_reset_1,1 the status went back to 0 for +/- 20 sec. after that it went back to 110 dez (=6e hex)
Any thoughts on this?
Kind regards
Bryan
modbus RTU error code
The error code 0x6e indicates a connection error. This may be due to the wiring or simply because the slave did not respond fast enough. This can happen but the error must be acknowledged. You have already done this correctly. That the error occurs now with 3 of 5 devices can be caused by the wiring or interference by magnetic fields. What is implemented with TCP/IP by the transport layer (TCP), namely the retransmit, etc. is not available with Modbus RTU.
Unfortunately, we have not listed all error codes in our tutorial about Modbus RTU Master, because they originate from the Modbus specification.
The problem that the error status occurs again and again after about 20 seconds also seems strange to me. Maybe the Arduino's are playing into it, too, and swallow themselves up.
Since you still use Jessie, it is advisable to update the packages. Please update the Modbus packages with the following commands:
Unfortunately, we have not listed all error codes in our tutorial about Modbus RTU Master, because they originate from the Modbus specification.
The problem that the error status occurs again and again after about 20 seconds also seems strange to me. Maybe the Arduino's are playing into it, too, and swallow themselves up.
Since you still use Jessie, it is advisable to update the packages. Please update the Modbus packages with the following commands:
Code: Select all
sudo apt update
sudo apt install pimodbus-slave pimodbus-master
Hallo Dirk,
ich habe das gleiche Problem, nur nicht mit RTU sondern TCP/IP und es kommt nicht von dem Arduino. Dieser Status ist ok und bringt kein Fehler. der Fehler wird bei mir vom RevPI selber ausgelöst da ich dort zwei Schnelle Zähler abfrage, Pin 11 und 14.
Wir haben die zykluszeit auch schon auf 10sec gesetzt, aber der Fehler wird trotzdem ausgelöst.
Updates wurden gemacht
ich habe das gleiche Problem, nur nicht mit RTU sondern TCP/IP und es kommt nicht von dem Arduino. Dieser Status ist ok und bringt kein Fehler. der Fehler wird bei mir vom RevPI selber ausgelöst da ich dort zwei Schnelle Zähler abfrage, Pin 11 und 14.
Wir haben die zykluszeit auch schon auf 10sec gesetzt, aber der Fehler wird trotzdem ausgelöst.
Updates wurden gemacht
Hi Dirk,
We will check on the arduino side if the error starts over there.
In the meantime we are looking into the error checks.
When we detach the USB cable of a working modbus slave device (arduino) there is no error triggered on the Modbus_Master_status. Is this normal?
The last values in the Modbus are kept reading and no errors occurs.
Is there any other way to check that the cable is still plugged in.
kind regards
Bryan
We will check on the arduino side if the error starts over there.
In the meantime we are looking into the error checks.
When we detach the USB cable of a working modbus slave device (arduino) there is no error triggered on the Modbus_Master_status. Is this normal?
The last values in the Modbus are kept reading and no errors occurs.
Is there any other way to check that the cable is still plugged in.
kind regards
Bryan
Hi Bryan,
The Modbus_Master_Status can display the following error codes.
- 16 Initialization failed
- 17 Serial connection cannot be opened (device name wrong, invalid configuration)
Whether the cable is plugged in or not is indicated in the Modbus_Action_Status.
When disconnecting the cable, the error code 110 "CONECTION TIMED OUT" should be displayed.
The error code 110 is also displayed if the response time of the slave is too long.
However, we are working on making the timeout time adjustable in piCtory.
king regards
Eduard
The Modbus_Master_Status can display the following error codes.
- 16 Initialization failed
- 17 Serial connection cannot be opened (device name wrong, invalid configuration)
Whether the cable is plugged in or not is indicated in the Modbus_Action_Status.
When disconnecting the cable, the error code 110 "CONECTION TIMED OUT" should be displayed.
The error code 110 is also displayed if the response time of the slave is too long.
However, we are working on making the timeout time adjustable in piCtory.
king regards
Eduard