Showing results for 
Search instead for 
Did you mean: 

Modbus Time Out Error 66

Go to solution

Hi community, I am currently experiencing a modbus timeout error (Error 66) using a state machine. I have experimented different types of timeout (10000 ms, 5000 ms, 10000000 ms) and it would work for several iterations of the state machine, and then after would time out. Is there any sort of way to reset to avoid this timeout by restarting the Modbus TCP master for each iteration, so that it would not time out? It happens on Possibly it has something to do with how long the for loop takes?


Thank you!

Download All
0 Kudos
Message 1 of 4

Replace your tunnel for the Modbus reference with a shift register. In addition, you should always use a shift register for references wired into and through For loops. If the loop doesn't execute, you will pass out an invalid reference when using basic tunnels.


Error 66 is not a timeout, but rather an indication that the connection was closed by the peer (the device that you are communicating with). If that is the case, you will need to find out why that device is closing the connection. If this is the normal behavior for the device, you may need to open/close the connection every time you communicate with the device.

Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 4

It's interesting because whenever I use a VI that just uses Modbus blocks, I am not producing error 66 and the communication is perfect. However, when using the VI included in my original message the modbus will only work for a specific period of time and then timeout. Is this because my VI is running at full speed and is too fast for the Modbus? I checked if I lost communication, and I have not. The VI in the picture is the one that is working correctly.



0 Kudos
Message 3 of 4
Accepted by topic author kepham

I solved it by correcting master and slave IP's

0 Kudos
Message 4 of 4