LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Local variable behaviour different with panel open?!

Am I going mad?!

We write to a local variable in a subVI, set it TRUE, but when the subVI completes, if the panel is open, it reverts to FALSE. If the panel is closed, it retains its TRUE value as set by the local variable.

The true terminal of the local variable is cased so that it may, or may not, ever be written to.

This behaviour is definitely different from LV5.1.1.

Bug or feature? Any workaround?

TIA
Tom
0 Kudos
Message 1 of 5
(3,050 Views)
can you post your code in 6.0?
0 Kudos
Message 2 of 5
(3,050 Views)
We'll work on it... The problem is in the heart of a 100MB hierarchy attached to a wind tunnel, so we need to isolate just the functionality required to duplicate the fault!

Thanks for the interest; will post code as soon as we have it

Tom
0 Kudos
Message 3 of 5
(3,050 Views)
> Bug or feature? Any workaround?
>

Both.

Indicators that are on the connector pane of a subVI must always return
a value. Problem is that since the diagram can have case statements, it
is possible for the diagram to run and never write to the indicator.
This was deemed a bad thing and it was decided that these "conditional
indicators" should return a default value if they weren't written to.
This writing happens at the last minute, after the diagram completes.
Each conditional indicator has a flag in it that is cleared before the
subVI runs and is set when the indicator is written to. If still clear
at subVI completion, the default is written to the indicator. When
local variables were added, and later when multithreading was added,
there
were some bugs introduced and later fixed. I don't believe the
behavior should be different depending on whether the panel is open.

It would be best if you would email technical support and tell them the
version of LV you are using, list out the steps, and they can tell you
if the bug was already known about and which version it was fixed by.

In the meantime, I'd recommend taking the locals and indicators taken
out of the case statement. Wire a default value of the case statement
or through the case statement and to the terminal or local.

Greg McKaskle
Message 4 of 5
(3,050 Views)
OK; we've cut it to the bare essentials- and proved its a Mac-only problem.
If you're still interested, here are the VIs, in 6.1
Download All
0 Kudos
Message 5 of 5
(3,050 Views)