Hi All,
I am having a weird one frame delay problem with PTB. I am using version 3.0.8 with a Matrox Parhelia PCI card and a CRT monitor setup to 100Hz.
Below is the smallest code snippet I managed to crop which nicely demonstrates the problem. I am flipping between middle gray to white.
I am using a DAQ to signal events and to record with a photodiode the screen response.
You can see the response here: http://brainstory.info/PTB.pdf
Basically, the blue curve shows the event signaled. You can see that I call Flip quite early in the cycle, and that the actual refresh only happens two frames later. The update should have been at ~4473, but only happens at ~4483.
I already ruled out any potential reasons for this that might be caused by the DAQ/photodiode equipment.
Any idea why or how to fix this ?
Many thanks,
Shay
----------------------------------------
hScreen = Screen(0,'OpenWindow',0,[],[],2);
Screen(hScreen,'FillRect',[128 128 128]);
Screen(hScreen,'Flip');
WaitSecs(1 + 2/1000);
fnDAQ('SetBit',1,1);
Screen(hScreen,'FillRect',[255 255 255]);
Screen(hScreen,'Flip');
fnDAQ('SetBit',1,0);
WaitSecs(1 + 3/1000);
fnDAQ('SetBit',1,1);
Screen(hScreen,'FillRect',[128 128 128]);
Screen(hScreen,'Flip');
fnDAQ('SetBit',1,0);
Screen('CloseAll');
----------------------------------------
I am having a weird one frame delay problem with PTB. I am using version 3.0.8 with a Matrox Parhelia PCI card and a CRT monitor setup to 100Hz.
Below is the smallest code snippet I managed to crop which nicely demonstrates the problem. I am flipping between middle gray to white.
I am using a DAQ to signal events and to record with a photodiode the screen response.
You can see the response here: http://brainstory.info/PTB.pdf
Basically, the blue curve shows the event signaled. You can see that I call Flip quite early in the cycle, and that the actual refresh only happens two frames later. The update should have been at ~4473, but only happens at ~4483.
I already ruled out any potential reasons for this that might be caused by the DAQ/photodiode equipment.
Any idea why or how to fix this ?
Many thanks,
Shay
----------------------------------------
hScreen = Screen(0,'OpenWindow',0,[],[],2);
Screen(hScreen,'FillRect',[128 128 128]);
Screen(hScreen,'Flip');
WaitSecs(1 + 2/1000);
fnDAQ('SetBit',1,1);
Screen(hScreen,'FillRect',[255 255 255]);
Screen(hScreen,'Flip');
fnDAQ('SetBit',1,0);
WaitSecs(1 + 3/1000);
fnDAQ('SetBit',1,1);
Screen(hScreen,'FillRect',[128 128 128]);
Screen(hScreen,'Flip');
fnDAQ('SetBit',1,0);
Screen('CloseAll');
----------------------------------------