05-15-2018 07:57 AM
Hi,
I am working with the cRIO 9034 and a Touch Panel. It is our goal to implement the whole code in the program so that at the end there is a very user friendly user interface on the touch panel. Now we are struggling with the error handling. We would like that in the case of an error, the RT Main vi waits for some seconds and if the error is still there, the program is rebooted. But this only makes sense if the cRIO tries to find the connections during the timeout (in other words:tries to solve the problem during the wait). With a normal wait function the program does nothing and just waits. Is there any way to implement this? I did not find something similar yet.
Thank you very much!
05-15-2018 08:07 AM
With a proper State Machine, this should not be an issue.
05-15-2018 08:26 AM
Suggestion on what to put in the"Reconnect" state. Run your reconnect code in a While Loop; at the end of each iteration, if reconnect was not successful, calculate the time elapsed from the begining of this function. Reboot if timeout was elapsed, otherwise try again.
This is only a general suggestion, you should arrange details according to your needs.
05-15-2018 09:06 AM - edited 05-15-2018 09:22 AM
I probably was not enough clear. Now I attached my trial of the VI. The user can choose between Wait and Restart. In the case of Restart the whole cRIO reboots, this is working. But in the case that the user chooses wait, I want that the program tries to solve the problem. My next approach was to restart the vi so that this way maybe the error can be solved. There is a restart.vi but I could not find much information about it. Is there a way to do a vi which restarts the whole RT Main vi?
Thank you very much!
05-15-2018 09:11 AM
Hi Cardex,
nothing attached…
Is there a way to do a vi which restarts the whole RT Main vi?
As has been suggested before: use a proper state machine!
Have an "init" state. When you want to "restart" you go back to this "init" state…