LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Entering a code with the possibility to remove the previous element added in the 1D array

So for a school project I designed a acces control VI that works like I want to , it is based on a keypad I found here.So the front panel exists out off a keypad (numbers 0-9) 2 LED's (one green when code is correct one red when code is wrong) and a display that lets you see what you already entered.

 

The program builds op an 1D array with al true elements as filter (All the numbers 0-9 are boolean).

 

Now I want to use the cancel button to delete all the numbers or just the previous element that was added in the array,even my teacher couldn't help me with this (so we do not need to know this much about the program) but since I am intersted in learning it I would like to know how I could solve this.

 

I also would like to attach the the numbers of the virtual keypad to the real keypad on the keyboard but since their is no standard option to bind these keys I also would like some information about this.I have seen a solution in wich you can remember what you press on your keyboard but this was very complicated and I guess there must be a easier solution.

 

Thanks in advance you can find my VI attached

 

 

0 Kudos
Message 1 of 8
(2,725 Views)

Here is a more advanced version that I built and use. It is made for a touch screen but should work for you.

Tim
GHSP
0 Kudos
Message 2 of 8
(2,705 Views)

Thanks for responding , but I can't execute the VI because the subVI dialog is missing.

 

Kind regards

 

0 Kudos
Message 3 of 8
(2,702 Views)

You can remove that it is only a pop up window that I made to replace the normal one, two or three button dialog.

 

You will also need to hook up a number reference to the VI. The VI automatically sets up the number of digits of precision from this control.

Tim
GHSP
0 Kudos
Message 4 of 8
(2,700 Views)

 


maXaVl wrote:

Now I want to use the cancel button to delete all the numbers or just the previous element that was added in the array, 


How is the program supposed to know which of these two mutually exclusive options it should actually execute ("delete all" vs "delete last")?

 

0 Kudos
Message 5 of 8
(2,695 Views)

It is one of these 2 options , my teacher told me that deleting the previous element will be very hard so if no one knows a solution I will be happy with just the delete all option but if there both possible I might make a extra button.One to cancel and one to backspace.

 

 

0 Kudos
Message 6 of 8
(2,691 Views)

You also have a potential race condition due to lack of data dependency.

 

You have a "reinit to defaults" property node that executes in parallel to the main while loop. You should ensure that it either runs first or last to eliminate all doubt. Use the error wire for data dependency.

0 Kudos
Message 7 of 8
(2,690 Views)

Ok so I have put the set do default value first in a flat sequence.

Could you give me some more info on the lack of data dependency ?

 

Thanks a lot for responding by the way.

 

 

 

0 Kudos
Message 8 of 8
(2,686 Views)