08-11-2020 10:54 AM
08-11-2020 09:23 PM
Hi, can anyone tell how to connect all the vi for keydown? event. I have no idea on how to make the numpad functional.
08-12-2020 12:42 AM - edited 08-12-2020 12:42 AM
Hi tan,
@tan99323 wrote:
Hi, can anyone tell how to connect all the vi for keydown? event. I have no idea on how to make the numpad functional.
You don't need the "Keypress?" event, the plain Keypress (without question mark!) is ok too:
08-12-2020 01:12 AM
Can i know what type def did you make for both enum ? I have tried and still unable to input from keyboard number.
08-12-2020 01:23 AM
Hi tan,
@tan99323 wrote:
Can i know what type def did you make for both enum ?
LabVIEW basics: to create constants/controls of the same type you just right-click an input/output/wire and select create->constant.
That enum is supplied by LabVIEW, no need to create your own!
@tan99323 wrote:
I have tried and still unable to input from keyboard number.
When you press any numpad key you should get the corresponding ASCII values, like any numbers or +-*/…
You still need to handle this in your VI correctly, like concatenating larger values from several numbers!
(Hint: I would probably handle numbers using numeric datatypes instead of using strings.)
08-12-2020 02:03 AM
I have make the keydown event similar to what in cluster 0-9 case. Any mistake or which property node should i add ? The number do shown in display but I cannot perform any operation.
08-12-2020 02:34 AM
Hi tan,
@tan99323 wrote:
I have make the keydown event similar to what in cluster 0-9 case. … The number do shown in display but I cannot perform any operation.
You cannot "perform operations" because you made it similar, but not the same…
What's the point in concatenating the numeric input (via numpad keypress) with the intended operation string?
You really start with creating a sketch of your algorithm on a sheet of paper!
You should think about using proper datatypes for each item: numeric datatypes for numeric data, (typedefined) enum for the operation.
You should cleanup the block diagram to use straight wires, at least. This really helps to understand the block diagram and can help to prevent silly errors while wiring!
You got so many comments for improvements so far, but it seems you didn't take any of them…
08-12-2020 03:10 AM
I did follow all the steps above, and I have adjusted the keydown event and it is basically same as cluster 0-9 event currently. Just lack of the property node as (booltext-text) in the cluster event. So it cannot hide the operation as I input any from numpad.
08-12-2020 03:17 AM
Hi tan,
@tan99323 wrote:
I did follow all the steps above, and I have adjusted the keydown event and it is basically same as cluster 0-9 event currently.
No, it is NOT THE SAME!
In the ValueChange event you use different inputs for ConcatString as in the KeyPress event case!
Until now you did not "follow all the steps above", not even for using straight wires…
08-12-2020 09:06 PM
Keydown event : Can I know why I only can input single number from numpad? how to have more input ? like 13