LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire input data vi

How do I capture those characters with acquire input data vi

@ or # or $? All those chars require Shift and another key to be pressed. But with this vi, when I press shift and another key, the character of this other key will not display.

For example for @, I have to press Shift + 2, but it doesn't work with this vi.

 

Need some help please.

0 Kudos
Message 1 of 4
(3,502 Views)

Hi agyna,

 

I think the problem is that you aren't expanding the indicator that shows the keys pressed. It's actually an array, allowing you to display multiple simultaneous keystrokes. I've attached a simple example using the expanded indicator. To expand it in your VI, you just need to drag the bottom right corner until you see the two boxes appear.

 

I hope this solves your problem!

 

Regards,

 

Courtney L

Applications Engineer

National Instruments

 

0 Kudos
Message 2 of 4
(3,473 Views)

Thanks, but the result of this is 2 Key instead of 1. For exemple if I want "@", I need to press" shift and 2". So the problem here is that whith labview I am not geting that character @, but I am getting 2 keys, "shift and 2".  

0 Kudos
Message 3 of 4
(3,466 Views)

Hey agyna,

 

Ah I understand your problem. The two characters output by the Acquire Input Data VI will uniquely identify all two-character presses. You need to add logic to combine these presses into something meaningful (ie, Shift + 2 = @). I've modified the last VI I sent you quite heavily to account for the following cases:

 

1) Only 1 key is pressed

2) Right Shift + (0-9) are pressed

3) Left Shift + (0-9) are pressed

 

The VI has an LED that will turn on if a key combo (ie, multiple keys) are hit simultaneously. It displays symbols !@#$%^&*(). You should be able to modify this VI to handle more cases if you need to.

 

Hope this helps.

 

 

0 Kudos
Message 4 of 4
(3,449 Views)