LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with combination-code assigment

Hi forum!

 

I have a school-assigment to next week and Im struggeling with the idea on how to make a 4 digit code-lock with a possebility to change the code with a master code.

Im using a hardware keypad with 10 digits (0-9).

Can anybody please help me with this?

 

Apologyse for my English Smiley Tongue

 

Thanks

0 Kudos
Message 1 of 8
(3,209 Views)

Think about all the steps involved in what you want to do.

 

You need 4 inputs, 1 for each digit

You could use a button to check if the code is correct

Something that says if the code is good or bad

A button to change the code

...

...

...

 

Start with that and see how far you get.  Then think about how you can program it.  Start programming.  When/if you get stuck post your code and explain the problem you are having.

Message 2 of 8
(3,204 Views)

The first issue is getting your keypad values.  That will likely be done with a digital port.  But you will want a VI that does nothing but read the keypad.

 

From there, I'm picturing having a loop that just reads the keypad and adds the read digit (when there is one) to a string.  After 4 numbers, check the keypad and react accordingly.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(3,175 Views)

Guess I just blew right past the hardware.....

0 Kudos
Message 4 of 8
(3,172 Views)
Do you have any code written at all? Its easier to steer a moving car.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 8
(3,152 Views)

So here is what I got so far.

Just found out that I dont have to set the mastercode on hardware side, but I can use software to set the mastercode.

 

Need to be pointed in the right direction, any suggestions or tweaks you guys can point me in?

0 Kudos
Message 6 of 8
(3,105 Views)

How do you know when you can read the port digital IO?  Where is the loop?  You will need a shift register to keep the previous numbers in and then compare that to the combination once enough numbers have been entered.

 

I don't have the myRIO stuff installed right now, but you should be able to just read the A port in its entirety as a number.  That would make things a lot cleaner and simpler for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(3,080 Views)

So, I've made this out of the assignment. But I need a sequense of the numbers so I dont need to push everything in at once. And tips or modification you peaople can help me achive this?

 

Best regards

0 Kudos
Message 8 of 8
(3,034 Views)