09-05-2014 04:01 PM
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
Solved! Go to Solution.
09-05-2014 04:04 PM
@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.
09-05-2014 04:15 PM
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.
09-08-2014 08:55 AM
Please see the attached vi. I can't seem to connect the loop to the button.
09-08-2014 09:09 AM
@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. [...]