From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

cRIO TCP/IP Re-establish communication

Solved!
Go to solution

Hello everyone. I have a cRIO communicating with my PC through the TCP/IP protocol to send and receive some data. I want the connection (through the ethernet cable) to be re-established, in case the connection is lost (for example internet connection is lost or the ethernet cable is off). It works by default for a specific amount of time (a few seconds), but there seem to be a problem when the connection is off for a long time (a minute or more). Any ideas?

0 Kudos
Message 1 of 4
(2,594 Views)
Solution
Accepted by topic author gvagenas

Use a State Machine.  Start in the Connect state and repeat until a connection is made.  Then progress to the Run state.  If an error is detected, go to the Disconnect state and then back to the Connect state.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(2,562 Views)

Thank you a lot for your quick reply. I have two VIs, one under My Computer and one under my device. Should I implement it on both VIs? Thank you.

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

@gvagenas wrote:

Should I implement it on both VIs?


That is what I do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,547 Views)