LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Variable Engine

Hi,

 

What happens to network variables stored in the RT machine after a restart(after calling RT restart). I am experiancing weid behaviour.

 

They seem to reset to a default value and I checked in the project via their propertis, Initial values is not set, and there are no callers at the start of the VI.

 

Anyone has any ideas for this? Or at least tell me if values should persist after restart or reset?

 

Thank you very much,

Mihai

0 Kudos
Message 1 of 3
(2,368 Views)

Default values sounds like the normal behavior to me.  I don't think the shared variable engine has any mechanism for saving values to non-volatile memory and restoring them after a reboot.

 

Nor would I want it to.  I would want the values to be set to some safe, default value that I determine, not a possibly bad, or dangerous value that is left over from a process that was running before.  It may have event been one of those values that could have caused a crash of your program forcing a reboot.  I wouldn't want it to restart with the same problem value and immediately cause a never-ending crash-reboot cycle.

0 Kudos
Message 2 of 3
(2,358 Views)

Hi,

I use shared variables stored on a PXI RT embedded controller.

After a reboot, the variables are not set to the default value corresponding to their data type structure but to a "no known value" state (I don't know how it's exactly labelled in english, as I use a french version of LabVIEW).

I noticed that if you try to read a shared variable in a "no known value" state using the "read variable" VI, you just get a warning. If you use the "read variable with timeout" VI, the code waits for a modified value of the variable, but once the shared variable has been initialized (ie has a known value) no stop occurs at the first reading with the "read variable with timeout" VI (even with an infinite timeout), as the current value of the variable when the code is launched is viewed as a "new" value.

Not sure that this message will help you 😞

I've also experienced strange behaviours in reading shared variables : I've posted here a message in the french section af the forum, but without answer ; I plan to repost it here after new tests.

Best regards,

HL

 

0 Kudos
Message 3 of 3
(2,355 Views)