LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving values from dial to a variable - new user.

Solved!
Go to solution

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 

0 Kudos
Message 1 of 5
(1,245 Views)

@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.

 

 

0 Kudos
Message 2 of 5
(1,240 Views)

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

0 Kudos
Message 3 of 5
(1,234 Views)

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

0 Kudos
Message 4 of 5
(1,176 Views)
Solution
Accepted by topic author athiggins

@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. [...]


Lock%20Test[1]_BD.png

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

0 Kudos
Message 5 of 5
(1,168 Views)