From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using local variables

trying to use a simple local buffer to get an interger value and use it some where else. any help?
0 Kudos
Message 1 of 5
(3,008 Views)
It's hard to give specifics without more information. What is it exactly that you are trying to do?

Mike...

Message Edited by mikeporter on 05-08-2007 10:15 PM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,003 Views)


@Ajb181 wrote:
trying to use a simple local buffer to get an interger value and use it some where else. any help?



Simply Rt Click on the integer & select Create -->> Local Variable, thats it... Use it elsewhere in your program. Smiley Very Happy
- Partha ( CLD until Oct 2024 🙂 )
Message 3 of 5
(2,989 Views)

If you are using a state machine, here is another way to create local variables.  Create a cluster with all local variables that you need.  Wire into a shift register.  Use Unbundle to get the value and Bundle to change the value.  See code below:

Message Edited by tbob on 05-09-2007 11:58 AM

- tbob

Inventor of the WORM Global
Message 4 of 5
(2,957 Views)
In LV the way you get data from one part of a diagram to another is through a wire. If you are contemplating using local variables because the diagram is too large or the wiring is getting too messy, you have a more fundamental problem than how to access a given data value. Your code needs to be redesigned to decompose it onto reusable modules. One of the major causes of instability in a program is the presence of race conditions created by utilizing local variables.
 
Mike...
 
 

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 5 of 5
(2,946 Views)