LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence local = local variable?

HI,
This should be ratehr simple to answer, I was just wondering if sequence locals are the same thing as local variables and if not then what are their differences?
0 Kudos
Message 1 of 5
(3,858 Views)
Sequence locals are variables that can be acessed only INSIDE a sequence. This variable also cannot be acessed by a frame BEFORE the frame that generates the variable. Local variables can be acessed at any point IN A SAME VI, different frames, whiles, cases, etc. THe local Variable also can be readed at a point before the value of the variable is seted. Be careful to avoid this.
0 Kudos
Message 2 of 5
(3,858 Views)
Thanks, I guess what I really wanted to know is not how to use them but what their differences are regarding performance. (i.e. do sequence locals also make copies of the variable everytime I access them thus slowing down performance like local variables?), if given the choice of the 2 which are better to use to reduce memory use and performance issues?
0 Kudos
Message 3 of 5
(3,858 Views)
It's better not to use sequence structures at all and then you don't have to worry about sequence locals. But to answer your question, I believe that local variables are the worse of two evils.
Message 4 of 5
(3,858 Views)
> Thanks, I guess what I really wanted to know is not how to use them
> but what their differences are regarding performance. (i.e. do
> sequence locals also make copies of the variable everytime I access
> them thus slowing down performance like local variables?), if given
> the choice of the 2 which are better to use to reduce memory use and
> performance issues?
>

A seuence local is pretty much the same as a branched wire except that
the code will not execute in parallel. Local variables are really more
like additional control terminals. They read and write to the control
on the panel. Sequence locals are not associated with any control and
they just connect the data to upcoming diagrams.

Greg McKaskle
0 Kudos
Message 5 of 5
(3,858 Views)