LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am using LabVIew 6i. HOw can I use and assign value to a variable just like in C/C++?

You could wire the value into the indicator at the start of your code.

For Control variables, you could type a value in. Right click over the Control and then select "Data Operations" -> "Make Current Value Default".

If you want to programmatically set a value for the Control value, you could wire a value into its local variable.

Hope that helps.

Shan Pin Koh
0 Kudos
Message 2 of 3
(5,012 Views)
Variables in LabVIEW are either a control or indicator on the front panel. Once that control/indicator is built, you can create local variables to put data into or get data from the control/indicator. You can right click on the control/indicator and hide it if you do not want it visible.

The other method is to use a global variable. Global variables are created by placing a variable on the diagram (from Structures -> Global Variable) and then double clicking on the variable to open its front panel. You can create multiple variables in the global variable front panel. Right click on your global variable and choose Select Item to choose which variable. You may have to right click on the variable and choose Change to Read or Change to Write.
0 Kudos
Message 3 of 3
(5,012 Views)