05-02-2011 11:39 AM
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
05-02-2011 01:22 PM
Here is a more advanced version that I built and use. It is made for a touch screen but should work for you.
05-02-2011 01:24 PM
Thanks for responding , but I can't execute the VI because the subVI dialog is missing.
Kind regards
05-02-2011 01:43 PM
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.
05-02-2011 02:13 PM
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")?
05-02-2011 02:28 PM
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.
05-02-2011 02:30 PM
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.
05-02-2011 03:04 PM
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.