From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

communication problem between cRIO-9066 and a PC running Matlab

Hi,

I've created a TCP data transmission between cRIO-9066, with Labview 14, and Matlab, (in client mode) on a workstation, with an end to end ethernet cable. The data transmission works well for about 8 hours (about 30,000 seconds), after that the connection goes down. The Matlab error message is: no host route found. To date, I've done 5 runs, with some modifications in order to solve the problem (mainly I modified the Labview code), and each time the same problem after about 8 hours of good communication. In all runs, Matlab sends cRIO 174 Bytes/second, and receives from cRIO 344 Bytes/second.

Any idea? Is it possible that the problem is due to the saturation of some cRIO-9066 hardware resource? 

Thanks for your time.

Regards  

0 Kudos
Message 1 of 4
(2,505 Views)

Hi TonCap,

it's a pretty interesting behavior but unfortunately you have provided few details.

Talking about LabVIEW, what's the behavior after 8 hours? For instance, TCP API returns errors? You should debug a little bit the code.

0 Kudos
Message 2 of 4
(2,466 Views)

No route to host? That sounds like a ping error and not a TCP error. Are you connecting and disconnecting every time?

 

Maybe write a dummy client in LabVIEW to see if the problem follows Matlab

 

You could try logging the connection in wireshark

 

Monitor CPU use. TCP would be lower in priority to something like a timed loop so the timed loop could starve the TCP.

 

I agree with logging the error on the RIO side. It's probably just 66 which is a normal disconnect. If you get a 56 on the write before the 66 on the read, that's caused by something like a cable being unplugged.

 

Try a fixed IP address on both sides.

0 Kudos
Message 3 of 4
(2,461 Views)

Hi nanocyte and Lamber 86, Thanks for your replies.

The problem went partially solved. The Matlab runs I mentioned in my first message were implemented on a workstation (PC1) connected to the cRIO by a 15 m long ethernet crossover cable (cable1). The cRIO is mounted in the electrical panel of an indoor plant while the workstation is in the adjacent control room, and the Labview application is set as start-up one. After my message, I run the same Matlab code on a different PC (notebook PC2) connected to the cRIO by a 2 m long straight through ethernet cable (cable2), and it worked. Three days of experimental simulation with no problems. Now the problem for me is the fact that I need to use the workstation (PC1) for the purpose. Successively, I have also tested PC2 (located in the control room) with cable 1, and it doesn't work. So, now I'm quite sure that the problem is the cable. At this moment, a case with PC1 and cable 1, with replaced contacts, is running.

I'll keep you informed. 

 

Best regards

                

0 Kudos
Message 4 of 4
(2,456 Views)