LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to build a numeric keypad from scratch...

Solved!
Go to solution

I'm a student working on my final project (just passed my first CLAD exam!)

I'm trying to use a Boolean array to generate a 4-digit passcode. So far I am able to get the correct # to show up, but I want to eliminate the -1 default for no input. I'm having to run continuous because of that darned -1, which is defeating the point of enabling/diabling the alarm. Eventually I would like to concatenate the four digits and compare to a constant to arm/disarm. This VI will be added to another VI w/ NI Elvis board w/ multiple emitter-detector sets, which I have working fine. I would like to add this feature to enhance that one.

Can anyone help?

 

Here's what I have so far:

 

 

0 Kudos
Message 1 of 15
(5,095 Views)

add a plus one after the search 1D array

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 15
(5,081 Views)

check that what values are you looking for? I am getting correct values except I get -1 when nothing is hit is this the problem?

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 15
(5,080 Views)

Use an event structure.

0 Kudos
Message 4 of 15
(5,072 Views)
Solution
Accepted by topic author djsunkist

Hi,

 

This is the easiest way to do it. Create event for the buttons and use a case structure for checking the -1... Check the attached vi. This takes an input password length of 5 characters.. after that it stops...


Regards,


Nitzz

(Kudos are always Welcome, Mark as a solution if it is the One;))

Message 5 of 15
(5,060 Views)

Oh, Dennis has already told this..:)

0 Kudos
Message 6 of 15
(5,058 Views)

Wow, exactly how I need it to work!

Thank You so much!

I haven't worked w/ the event structure before this: very interesting.

Looks like I can equal the result to a string constant to remain running and not-equal to the stop button as well - Perfect!

Kudos and Thanks Again

 

LabView Rocks!!!

0 Kudos
Message 7 of 15
(5,047 Views)

Hi,

 

You may Accept it as a solution if your problem is solved so that others can also refer it when required.


Regards,


Nitzz

(Kudos are always Welcome, Mark as a solution if it is the One:smileywink:)

0 Kudos
Message 8 of 15
(5,044 Views)

you should also make the number pad a cluster like this:

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Download All
Message 9 of 15
(5,025 Views)

Hi Harold, 

That's really nice..:) Ideal way to program ....!!!

 

Regards,


Nitzz

0 Kudos
Message 10 of 15
(5,022 Views)