12-16-2014 11:17 AM
Hi,
I am using a Network shared variable to control a Loop in FPGA in cRIO 9073. For the past 1 month the program was runing without any issue but suddenly the VI stopped thrwoing an error
"HEX 0x8BBB0011 The connection to the server was disconnected
The error or warning occureed while writing the following shared variable
\\NW-cRio\NW Library\NW_Force_cal
\\169.254.106.130\NW Library\NW_Force_cal"
A screen shot of the VI is attached, the NW_Force_cal is highlighted.
After the VI was closed and rerun the VI resumed running without issues. This kind of unpredictable behaviour is very difficult to handle, I lost real time data recording for 12 hours because of this issue.
Please suggest a solution for this issue.
Thanks
Mukunda
Solved! Go to Solution.
12-17-2014 09:10 AM
The error explained the issue. The network had problems that led to the server being disconnected. The way to fix this problem is to understand what is meant by "real-time." This is just another way to describe deterministic computing. That is, the program guarantees everything will happen within a predetermined period. In order for things to be deterministic, they must be controllable. The most obvious way to break determinism is to prompt the user for input. As we clearly cannot guarantee the user will reply within a certain period, we can no longer call the program deterministic. In this case, we have a more subtle break of determinism. Relying solely on a network will break the determinism. There simply isn't a way to guarantee the network won't get hit harder than usual. In this case, the network was down for a period of time long enough to throw an error.
Here's where we can look to fix things. After the error was thrown, what did the code do with it? The error wire isn't used for anything. I would expect it to throw an error and halt the program. This clearly isn't the behavior you want. So, why aren't we using the wire for some error handling? In the case of an error, you can log the data locally. When you regain the network, you can dump the log back to the host PC you typically use for your data collection. This removes the reliance on your network for the code to work. Using more robust code solves the issue with relatively easy error handling. Unfortunately, there is absolutely nothing anyone here can do to ensure your network never loses connectivity.