04-29-2018 05:06 PM
Hello,
I would like to increment a numeric indicator on the front panel using an event structure ("Key Down" and "Key Up") when the space bar is pressed. I have the event structure set up, however, I'm stuck on how to show the total number of key presses in real time.
Solved! Go to Solution.
04-29-2018 05:50 PM
You need to accumulate the count in a shift register or feedback node, then connect the indicator to its wire.
Please attach a simplified version of your code so we can give more targeted advice.
04-30-2018 08:03 AM - edited 04-30-2018 08:21 AM
It would look something like this.
04-30-2018 08:49 AM
Hi,
Check the attached vi.
04-30-2018 10:26 AM
@Liddy wrote:
Hello,
I would like to increment a numeric indicator on the front panel using an event structure ("Key Down" and "Key Up") when the space bar is pressed. I have the event structure set up, however, I'm stuck on how to show the total number of key presses in real time.
Where does the array from the title ("Increment an array using an event structure") come in?
04-30-2018 10:43 AM
If you want to increment the count for key down and key up (which lets you even determine if it is currently up or down by looking at even/odd of the count ;)), I would probably do something like the following.