LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Local variables + execution order

Hey...

Does it make a different where you use the original and where the local
variable is used?
I have a sequence inside of a case, and the sequence seems to be
executing first. This doesn't happen in debug mode, but when I run it.
Silly sounding, I know, but it appears the only explanation.

Cheers.
0 Kudos
Message 1 of 2
(2,918 Views)
amie wrote:

> Hey...
>
> Does it make a different where you use the original and where the local
> variable is used?
> I have a sequence inside of a case, and the sequence seems to be
> executing first. This doesn't happen in debug mode, but when I run it.
> Silly sounding, I know, but it appears the only explanation.
>
> Cheers.

I would suggest that it does make a difference (apparently).
With parallel execution in LV there are no real guarantees
what will execute first unless you use dataflow to make it
happen.

Locals and globals are always tricky things so should be used with care.

I have noticed that if things work in debug (I am think highlight execution
here)
and not in a normal run then a well placed "Wait" will solve it.
Kevin
0 Kudos
Message 2 of 2
(2,918 Views)