LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implenting WaitForVerticalBlank

I'm trying to write a short program to test reaction times using LabVIEW. It needs to time the reactions of a person to a visual stimulus on the monitor, so I need some way of looking at the monitor refresh to avoid a ~20ms error. I note that previously people have used Active-X controls to access DirectDraw for the GetVerticalBlankStatus, GetScanLine and WaitForVerticalBlank:

http://forums.ni.com/ni/board/message?board.id=170&message.id=177811

My problem is I know nothing about Active-X controls or DirectDraw. I've placed an automation refnum on the from panel, selected DIRECTLib.I_dxj_DirectDraw, and wired this to an Invoke node, but I can't seem to get it to do anything! Any advice? (I'm using LV6.1)

Roo
0 Kudos
Message 1 of 6
(5,574 Views)
Hey Roo
 
You might need it to look like this?
 
You will need to actually poll the activeX node as often as you can to catch the change in status.
(I would actually use the "getScanLine" and some 'Jiggery Pockery' to work out when the new frame is updated)
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 2 of 6
(5,560 Views)
Hi Adam

I had forgotten to put an "automation open" in. Agree that using getVerticalBlankStatus and getScanLine works well. I don't think that waitForVerticalBlank is as easy to implement.

Thanks again

Roo
0 Kudos
Message 3 of 6
(5,550 Views)
Has anyone had any experience with DirectX10 / Windows Vista?  I have no experience with Active X in older versions either, but am trying to reproduce the work you all have shown and am having trouble.

I'm not seeing Type libraries with names similar to Direct1.0

I do see:
Microsoft DirectX Transforms Core Type Library Version 1.1  -- some of these look promising
Microsoft DirectX Transforms Image Transforms Type Library Version 1.1  -- which looks like a bunch of image filters, probably not useful

Any help or pointers towards good references is apreciated.
--Alex.
0 Kudos
Message 4 of 6
(5,230 Views)
You could use .NET constuctor (Microsoft.DirectX.DirectDraw, Device,
Device() ).

Regards,

Wiebe.


0 Kudos
Message 5 of 6
(5,051 Views)

Well, maybe this WAS solved, but it appears i cannot access the Microsoft.DirectX.DirectDraw assembly because it is too old. Anyone know an alternative or what the updated .dll is called?

0 Kudos
Message 6 of 6
(3,412 Views)