10-18-2019 03:26 AM
Hi everyone,
I would like to know if by using key down vi is possible to recognize the event of pressing a button with microseconds resolution.
Any help appreciated!
Best- Leo
10-18-2019 03:40 AM - edited 10-18-2019 03:41 AM
Hi Leo,
@lelox993 wrote:
I would like to know if by using key down vi is possible to recognize the event of pressing a button with microseconds resolution.
The "key down" event only fires for user input at the keyboard of your computer. Here you get a time with millisecond resolution.
Which "key down VI" are you talking about?
Which "buttons" do you want to recognize?
10-18-2019 03:43 AM
@lelox993 wrote:
Hi everyone,
I would like to know if by using key down vi is possible to recognize the event of pressing a button with microseconds resolution.
Any help appreciated!
Best- Leo
I'm a little confused by what exactly you mean.
10-18-2019 04:24 AM
The VI I'm testing is the following
seems that the value of Time is cannot be with time resolution higher than milliseconds
10-18-2019 05:01 AM
10-18-2019 05:06 AM
You have observed that right. Lower than ms resolution makes absolutely no sense on any desktop operating system as Windows can't guarantee you even 10ms interval accuracy.
The more useful question here is however why do you think you need higher resolution? Academic interest? Practical use case?
If it is more than academical interest your approach is most likely flawed anyways. Keypresses is not something that happens in microseconds.
10-18-2019 05:10 AM
Ok,but is that value really representing the cpu time in which i pressed the button?
I've another question: is it possible to go on with the loop even without pressing the button? The event handling structure blocks the iteration... How can I disable this but continuously check for the putton pression?
Thank you guys for the answers!!
10-18-2019 05:11 AM
You might get microseconds resolution, but not microseconds accuracy. Windows jitter will be anything from 1 us to 100 ms, who knows.
Another problem is to actually prove the resolution you're getting.
10-18-2019 05:14 AM
I need a trigger for an academic work. In the psychophysical experiment the user must press the spacebar when feels a vibration.
Do you think that the button pression is not the right choose? Do you think that it can work in the milliseconds time order?
10-18-2019 05:14 AM