LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I lock out the keyboard?

I'm using Labview 6.1 and Teststand 2.0.
 
I'm trying to prevent users from overriding a quality control step that uses a barcode scanner to enter a serial number.  The problem is that users are foregoing the scanner and entering the number manually on the keyboard.  Because of the risk of mistake, I don't want this to be an option for them. 
 
Here's the challenge:
 
I want to accept serial numbers input from a barcode scanner, but ignore entries from the keyboard.  Further, I need to have a "back-door" which would allow a member of the development team to bypass the serial number requirement through a series of key strokes (i.e. Ctrl-Alt-Anykey). 
 
Any ideas?
 
Thanks in advance,
Shawn
0 Kudos
Message 1 of 27
(5,516 Views)
Couldn't you remove the serial number input control or turn it into an indicator instead?
Message 2 of 27
(5,496 Views)
if you are using a control to input the serial number, you can disable it so the user cannot change the serial. In the advanced menu, use keyboard Init and Acquire input data to get an array of all the keys being pressed on the keyboard. Then you can search that array for your three keys (CTRL ALT + whatever). If all three are found, change the serial control property to enabled, which will let you change the value.
Jeff


Using Labview 7 Express
Message 3 of 27
(5,489 Views)

An alternative is to disable the control during the bar code operation.  This way, depending on how your system works, the serial number will be displayed when the scanner is used.  Use the "Disabled" properties node for the serial number control and set the disabled option to 1 (one).  Option 2 is used to also dim the control if desired.

If the above is not practical, there's probably a way to use the Event structure to ignore a keyboard entry from the user for the serial number control.

You could enhance the system to require a manager's password to override the system to allow serial number entry from the keyboard.

Just some ideas...

Dave

Message 4 of 27
(5,485 Views)
Thanks for the suggestions.  I'll check them out and get back!  Smiley Happy
0 Kudos
Message 5 of 27
(5,475 Views)
The "standard" way to do this is to remove the keyboard.

If an developer needs it, he brings it with him, and plugs it in.

Another (slightly more sophisitcated) method is to put the keyboard behind a
closed draw.

You can probably set the hand scanner to "Serial" mode, so you can read the
data it sends through VISA. So you rewrite your code so it responds to
serial data, and not to the keyboard.

Regards,

Wiebe.


Message 6 of 27
(5,472 Views)

I agree with Wiebe. The majority of bar code scanners appear to windows as a keyboard and I don't think there is any way to differentiate between one keyboard and another. There are bar code scanners that have a serial port connection so that might be an option.

We have several dozen testers running TestStand and they all have bar code scanners. Part of the operator training is to never use the keyboard. Regular maintenance is also doen to make sure the bar code scanner is correctly working. As the lens gets scratched, it's often difficutl to do a scan so the operator will often resort to using the keyboard. Another part of their training is to contact test engineering whenever that happens so a replacement can be made asap.

Message 7 of 27
(5,467 Views)
Unfortunately, taking away the keyboard all together isn't an option.  There are other portions of tests that require user keyboard entry.  This particular step, however, is vitally important to properly programming the device.
0 Kudos
Message 8 of 27
(5,446 Views)
Try setting your scanner to append (pre-pend?) a character at the front of the data.  We use the @ symbol.  Any keyboard input from users who don't know to put this at the front can then be trapped.
Jim

Message Edited by lmtis on 09-21-2007 01:38 PM

Jim

LV 2020
Message 9 of 27
(5,441 Views)
I like that idea. Even better if the scanner can pre-pend an unprintable character so that all they would see is that little square in the string control.
Message 10 of 27
(5,434 Views)