le 05-30-2013 08:16 AM
Hi,
I am using the modbus library developped by NI to communicate to a slave via modbus TCP. Basicly, what I do is I read around 15-20 registers continuously in a while loop. Everything works fine until an error 56 (e.g. a timeout) happens.
After that timeout, the software continue to communicate continously in the loop but, all the registers are wrongs and randoms. The reading is not going well at all, its like if everything go crazy and the software access wrong and ramdom registers each time the loop is executed, until I close the TCP connection and re-open it again using TCP CLOSE and OPEN CONNECTION VIs.
Am I missing anything? Is there any operation I should do after a TIMEOUT to continue running normally? If I compare with serial modbus RTU, a timeout results only in an empty reading and the following iteration, everthing is back to normal. Why TCP timeout is different?
Thank you
Regards,
Eric
le 06-07-2013 12:32 PM
Valentin
Certified LabVIEW Architect
Certified TestStand Architect
Certified LabWindowsCVI Developer
National Instruments France