LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Static shared variables nodes becoming zero

I'm having this issue since LV2012. Now on LV 2014 it seems happening more often.

 

I have a library populated with variables set as RT FIFO and without buffering. The values of these variables are written by exception in a event callback structure (OPC UA).

 

Every thing runs fine for some time (minutes, hours or days) until a moment when all shared variables readings become zero. However the Distributed System Manager or another application still show the real value of these variables.

 

They remain zero until be written again, even with the same value. But the variables that don't change every cycle are not written by the event loop and are kept with wrong values. 

 

I think this isn't a normal behavior of shared variables.

 

This snapshot shows the issue. There aren't errors between nodes.

Issue.png

 

Result after write the variables with the same value.

Issue 2.png

 

 

Thanks!

0 Kudos
Message 1 of 7
(3,244 Views)

Well, I don't have a large enough screen to figure out what you are trying to show me.  I also can't see the code, so can't make suggestions there, either.

 

BS

0 Kudos
Message 2 of 7
(3,223 Views)

I got a sample code. This is the reading loop. That VI just agregate a couple singles in an array.

 

 

Issue 3.png

 

VI called by reference:

Issue 4.png

0 Kudos
Message 3 of 7
(3,216 Views)

I don't know what's wacking your SVs but you can probably see if the data is good by activating the timestamp/timeout terminal as shown towards the bottom of this page:

https://www.ni.com/docs/en-US/bundle/labview/page/reading-and-writing-shared-variables-with-shared-v...

0 Kudos
Message 4 of 7
(3,202 Views)

I could reproduce the issue with the code below. 

 

The boolean button forces an error in the shared variable error input. When this happens the SV output goes to zero. Even after reseting its error input the SV output remains in zero.

 

Is this behavior normal? How can I force SV update to actual value?

 

 

test.png

 

Thanks

0 Kudos
Message 5 of 7
(3,174 Views)

Of course if you just reading with an error connected, I would expect to get the default value because the node does not really execute. What if you leave the error disconnected?

 

0 Kudos
Message 6 of 7
(3,166 Views)

I think it's a good workaround to not wire error input to the SV's. I'm going to do this until get better understanding on this problem.

 

 

Thanks

0 Kudos
Message 7 of 7
(3,156 Views)