Hello everybody,
I have a feature I would like to add to a project I am working on, but have been unable to figure it out. Please forgive me if this is simple, I am new at this.
The project uses a cRIO 9004 to control a vehicle remotely with a laptop computer via a wireless network bridge. The vehicle runs great, but we would like to make sure the data received by the RIO onboard has current information, if it does not, the vehicle needs to enter a wait state until it connects again. My question is... how can I make sure the RIO is getting new information? Im using labview 8.20.
I have tried many different approaches and I have described (as well as i can remember) the concept, and the outcome:
1) I have used network published variables and tried to compare timestamps -- In the RIO program, I tested to see if most recent timestamp on a variable written by the program on the other side of the network, was equal to the last one saved using a timed loop at 500ms. The timestamp never updated.
2) I set the network watchdog in MAX but from my understanding, this would tell you from the user input side that you lost connection, which doesnt stop my vehicle.
3) I've polled the loop itteration counter on the user interface, from the RIO thru a network variable, and compared it to the one saved 500ms earlier. While probing the values from the user interface everything worked as expected. To test a lost connection, I unplugged the network cable to my wireless bridge. The vehicle continued to run at the last good values (BAD). The wierd thing is, when i plug the network cable back in, the vehicle moved toward the wait state, then realizes its getting new signals and operates normally again.
4) I found some tcp/ip functions which included a PING. I tried to ping the user interface from the RIO. when I used this, the times would increase gradually each iteration until it timed out (ie 1ms,1ms,1.2ms,1.4ms,1ms, .... 4ms, 4.2ms,4.1ms, .... 10ms TIMEOUT) as if something needed to be reset.
I hope this makes sense, ive been playing with it off and on for a while and ive deleted most of the code that didnt work. I cant post my code, but i can throw together a rought outline to show how its structured if that helps. I have a feeling its a simple thing that I just keep overlooking and I need an extra set of eyes to look at the problem.
Thanks in advance 🙂
Jason