Jump to content

Network Variables stop working - no rhyme, no reason...

Recommended Posts

Had a great success with Network Published Shared Variables from the get-go. Used them on a large project sharing data between multiple devices on the network - worked great. Until one day (yesterday), when they stopped.

No change in the code, the same base was running for 4 years on multiple systems (NI-9042 cRIO + NI-9147 eRIO). Yesterday, loaded the code on a brand new cRIO and ooh-la-la - surprise. No more data sharing. Only on a new platform.

Loaded the same code on the old one - everything works. Modified the code to make data sharing more transparent for troubleshooting. No, there is no data coming to the consumers. Not sure though whether it is writing to the shared variable or reading from it but the fact is no more data. At this point I am totally baffled to what could possibly happen. Checked the drivers - the Network Variable Engine 17.0 is installed. Although, I am not sure how to check if it is running. I tried to use Linux tools in CLI but didn't see any process name resembling the Network Variables Engine.

I wonder if anybody had similar experience or can suggest where to look? Maybe I am overlooking some weird settings somewhere? Like blocked ports or network registration... However, I couldn't find anything, no matter how hard I looked.

Any help would be greatly appreciated!


Link to comment

Are you able to see the shared variables listed under the target using the Distributed System Manager? Depending on the type you may or may not be able to see the current value, but its presence alone will help tell you if it was properly deployed or not. Further, are you capturing errors when writing or reading from them? While the error codes aren't always super helpful they can lend some insight. Lastly, are you dropping the variables on the BD from the project to r/w or are you programmatically addressing them and utilizing the shared variable vis to communicate with them? The latter option, while not as convenient, seems to be more robust, scalable, and gives you the most insight into the activity or errors there.

Link to comment

The problem resolved. And not the way I expected.


While we were thinking and searching for a solution, our techs decided to try another unit, off the shelf.

They loaded everything as usual and everything worked out of the box - no fuss , no muss...


The offending unit is being shipped to the office for a forensic investigation and I am breaking my head

trying to imagine what in the hardware could cause the problem we've seen?


My guess is that it could be only the memory. The network itself was working fine so there is no problem

with the transport layer. It's gotta be memory, what else?

Link to comment

Let me start be stating that I do not for one bit believe that what you are seeing is a hardware problem.

We abandons the use of Shared Variables / Network Variables over a decade ago. It was unstable and you could never know when it would suddenly stop working. And then it is a complete black box to debug. It may have become better since 2009 when I decided never to touch it again, but it looks like it still has problems.

Link to comment

Hmm... Interesting observation.

Well, it seemed at the time that the Network Variables was a dirt and simple way of passing the data over the network.

If not the Network Shared Variables how would you pass the data on the network? Streams? Another comms interface?

Link to comment

I have many systems that utilize NSVs with programmatic access. They are reliable and work well in these applications. That said, we've transitioned away in newer applications and utilize MQTT for communication. There are several flavors of tcp communication wrappers/messaging libraries around as well. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.