# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Saving values from dial to a variable - new user.

Hi,

I am learning LabView so I can one day control a syringe pump via serial connection, and perhaps more.  I am just starting out, so please bear with me.  I am writing a program that simulates a combination lock.  My goal is to have the user input the first number using a dial, press a button to save it, then repeat using the same dial for numbers two, three... n.  Once all n numbers are saved the program will compare what was inputted vs. the set values.  If true a light will turn on, if false nothing happens.

I am struggling with the saving numbers to a variable step.  I am proficient in Matlab and I think I am trying to solve this problem in terms of Matlab.  Any suggestions for this issue, or how to learn LabView in general?  I did watch the tutorial videos from NI.

Many thanks,

Andrew

Message 1 of 5
(1,290 Views)

## Re: Saving values from dial to a variable - new user.

@athiggins wrote:

Hi,

I am learning LabView so I can one day control a syringe pump via serial connection, and perhaps more.  I am just starting out, so please bear with me.  I am writing a program that simulates a combination lock.  My goal is to have the user input the first number using a dial, press a button to save it, then repeat using the same dial for numbers two, three... n.  Once all n numbers are saved the program will compare what was inputted vs. the set values.  If true a light will turn on, if false nothing happens.

I am struggling with the saving numbers to a variable step.  I am proficient in Matlab and I think I am trying to solve this problem in terms of Matlab.  Any suggestions for this issue, or how to learn LabView in general?  I did watch the tutorial videos from NI.

Many thanks,

Andrew

Why that complicated?

Use a String control for entry and compare the string agains a saved value.

Message 2 of 5
(1,285 Views)

## Re: Saving values from dial to a variable - new user.

Stop thinking in terms of variables; start thinking in terms of dataflow.  Put the dial in an Event structure (inside a For loop) that responds to a button press, collect the numbers in an auto-indexing tunnel and compare the array with the combination.

Show what you've done and you'll get more help.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 3 of 5
(1,279 Views)

## Re: Saving values from dial to a variable - new user.

Please see the attached vi. I can't seem to connect the loop to the button.

Message 4 of 5
(1,221 Views)
Solution
Accepted by athiggins

## Re: Saving values from dial to a variable - new user.

@jcarmody wrote:

[...] Put the dial in an Event structure (inside a For loop) that responds to a button press, collect the numbers in an auto-indexing tunnel and compare the array with the combination. [...]

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 5
(1,213 Views)