LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading monitor vertical sync time

I'm using Labview 5.1 in Win98. I'm writing a program for a psychology experiment where a subject responds to events on screen, and we record the response time in milliseconds. Response is recorded by a NI digital I/O card.
I'd like to synchronise graphic drawing on screen with the vertical flyback of the monitor (the vertical sync pulse), or alternatively, be able to read the millisecond counter value at the last vertical interval. Is there any way of doing this, maybe with a Windows API call?
0 Kudos
Message 1 of 3
(2,451 Views)
Is there some sort of hardware signal that would accompany the vertical sync pulse? If you can get a hardware signal, synchronizing things will be much easier. I've never tried anything like this, but I can imagine several problems trying to do it through software. For one, I would bet that the type of functionality you want would be controlled by the graphics and video drivers, which means that you could not get it from a Windows API. Even if you could create a windows event for it, by the time you captured the event in your control software, you will have already lost several microseconds.
0 Kudos
Message 2 of 3
(2,451 Views)
I thought of one hardware solution:
I could tap into the vertical sync line of the video connector and convert it to a TTL pulse, then read this with a port line or use it to start a timer.

Thanks,
Chris
0 Kudos
Message 3 of 3
(2,451 Views)