Hello all,
I need to solve communication problems between a labview VI and a system (designed by my company). They are communicating on a half-duplex RS485 wire, using modbus RTU as protocol. My system is linked to my PC through an USB to RS485 adapter. I am using NI modbus library to send modbus frames with labview.
The labview VI is sending endlessly read holding registers commands to the board, and most of the time everything is working fine. But after a random amount of time, I get a timeout error (error 56) on my modbus VI. Looking at frames exchanged through RS485 port with a sniffer shows that, when everything works fine, my system is responding in less than 100 ms. And when the timeout occurs, the answer happens slightly after 100 ms. So I guessed the problem was due to timeout definition... But when I look at my VI, I see that read timeout has been set to 2 seconds, so it shall not happen!
I tried to increase the timeout value, and got the same problem. Looking at Modbus Master.lvclasset timeouts.vi's context help says: "This function takes effect immediately, and will change the timeouts of any future operations using the instance returned by Modbus master out", so for me the VI should not issue a timeout error less than 2 s after the sending of the last modbus frame. Right?
Any idea of the reason of this timeout?