LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

number pad control

I was wondering if anybody knew how or has a good numeric pad control or vi. I have a HMI and i need to put up a number pad and haven't quite figured it out. Thanks

Derek Tucker
derek@ponengineering.com
0 Kudos
Message 1 of 17
(4,688 Views)
You basically just need a bunch of boolean buttons set as a keypad using a shift register to build the numeric string. There are several examples around (including in this site) if you will search for things like "virtual keypad".

___________________
Try to take over the world!
0 Kudos
Message 2 of 17
(4,677 Views)
Do you have any links, also is this possible without an event structure?
Derek Tucker
derek@ponengineering.com
0 Kudos
Message 3 of 17
(4,676 Views)

Going to the top of the page, changing the search are to the DevZone and searching for "keypad labview" should yield some results.

This is definitely possible without an event structure (by using polling), but why do you want to do it without an event structure?


___________________
Try to take over the world!
0 Kudos
Message 4 of 17
(4,671 Views)
it is going to be used a sub vi that is called to the front and i have not had great luck with event structures doing that.
Derek Tucker
derek@ponengineering.com
0 Kudos
Message 5 of 17
(4,670 Views)
In your previous post where it was suggested you use an event structure, you used it incorrectly. You passed some front panel Booleans to a subVI with an event structure. The event structure is designed to respond to "user" events and since the event occured in the main, the subVI had nothing to respond to. In this case, you want to display the front panel of the subVI, have the user hit a few buttons, and have it return a number. This is the perfect situation for using an event structure.
0 Kudos
Message 6 of 17
(4,666 Views)

Well, that makes it even easier. I've done this both with and without an event structure and am regularly using the more recent version (the one with events).

Build the VI using events to get the key presses and build the string. Once you click your final OK button the string is output through the connector pane to the calling VI. Then you can use this subVI in as many places as you like. If you set the VI to show its FP when called and to be modal the user will have to get rid of this dialog before doing other things.

I would also suggest adding a Cancel and Backspace buttons to your keypad. It is my experience that they can be helpful.
 
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).

___________________
Try to take over the world!
0 Kudos
Message 7 of 17
(4,669 Views)
I would suggest starting with the Formula Express VI's configuration page at:  . . . \vi.lib\express\express arith-compare\FormulaConfig.llb\Configure Formula.vi
It has most of what you want plus more (that is fairly easy to strip out).

Hope that this helps,
Bob Young

0 Kudos
Message 8 of 17
(4,655 Views)
thanks everybody, I think I have it figured out.
Derek Tucker
derek@ponengineering.com
0 Kudos
Message 9 of 17
(4,643 Views)
One more question. Is there a good way to have when a user clicks on a say a numeric control and will pop up another vi based on that mouse click? Thanks


Derek Tucker
derek@ponengineering.com
0 Kudos
Message 10 of 17
(4,638 Views)