Discussions au sujet des autres produits NI

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Modbus ethernet bugs after error 56

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 

0 Compliments
Message 1 sur 2
5 710 Visites

Doublon

Valentin
Certified LabVIEW Architect
Certified TestStand Architect
Certified LabWindowsCVI Developer
National Instruments France

Message 2 sur 2
5 670 Visites