Data from devices connected with modbus rtu does not come from time to time? zero is coming. why?
Answers
Hi,
Test the Modbus Slave devices with the third party Modbus Master Simulator and observe the response. By this way we can identify, where the problem is.
Test the Modbus Slave devices with the third party Modbus Master Simulator and observe the response. By this way we can identify, where the problem is.
Hi,
Try with increasing of Timeout value.
In your code I can see 100 ms which looks small. Try with 1000 or 2000.
Another advise is about task time for application where you execute your COM_MOD_MAST. For such task I always set fixed task time, e.g. T#100ms, and not freewheeling.
Create logic to memorize error status code from COM_MOD_MAST block (done+err for 1 cycle only). You can observe the error code and see the reason for lost in communication.
Try with increasing of Timeout value.
In your code I can see 100 ms which looks small. Try with 1000 or 2000.
Another advise is about task time for application where you execute your COM_MOD_MAST. For such task I always set fixed task time, e.g. T#100ms, and not freewheeling.
Create logic to memorize error status code from COM_MOD_MAST block (done+err for 1 cycle only). You can observe the error code and see the reason for lost in communication.
Add new comment