# WaitBlanking missing frames

**URL:** <https://psychtoolbox.discourse.group/t/waitblanking-missing-frames/1252>\
**Category:** Uncategorized\
**Created:** [September 5, 2006, 9:49pm UTC](https://psychtoolbox.discourse.group/t/waitblanking-missing-frames/1252 "2006-09-05T21:49:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpqrowe](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mpqrowe](https://psychtoolbox.discourse.group/u/mpqrowe)\
**Post date:** [September 5, 2006, 9:49pm UTC](https://psychtoolbox.discourse.group/t/waitblanking-missing-frames/1252/1 "2006-09-05T21:49:12Z")

</div>

Can anyone suggest a reason why Screen(windowPtr,'WaitBlanking') might miss vertical  
blanking intervals \*besides\* the BlankingDuration set in  
PrepareScreen?  
  
My hardware: A 300 MHz Macintosh G3, a Radeon ATI 9200 graphics card,  
and a ViewSonic P95f+ monitor.  
  
My software: MacOS 9.2.2, Matlab 5.2.1.1421, PsychToolbox 2.55.  
  
I have a web page describing one of my tests:  
  
[http://www.lifesci.ucsb.edu/~mrowe/MonitorIssuesII.html](http://www.lifesci.ucsb.edu/~mrowe/MonitorIssuesII.html)  
  
including the code I used to test it. I've also just tried:  
  

> \>\> [PeekFrame, PeekTime] = Screen(windowPtr,'PeekBlanking'); ...

 Screen(windowPtr,'WaitBlanking',120); ...  
 [PeekFrame2, PeekTime2] = Screen(windowPtr,'PeekBlanking');  
  
With the monitor refreshing at 120 Hz, that should take 1 second each  
time I run it. However, if I run it in a loop 100 times, I will  
almost invariably get one run or more where PeekTime2-PeekTime is one  
frame time longer than a second. This despite the fact that  
PeekFrame2-PeekFrame is always 120.  
  
I have tried setting BlankingDuration both by editing PrepareScreen  
and by calling:  
  
Screen(windowPtr,'Preference','BlankingDuration',NewDuration);   
  
No duration I've tried (from 10 microseconds to 30 milliseconds) has  
caused any change in this behavior.  
  
If I lower the framerate to 85 Hz, WaitBlanking may not miss any  
frames (my tests at that frame rate have not been as extensive, but  
I've yet to see a dropped frame at that setting). At 90 Hz I also  
don't seem to drop frames, but at 100 Hz I do. I'm using the setup  
for physiological experiments in non-human animals, so higher  
frame rates are extremely desirable...  
  
If anybody can suggest anything I might not have tried in order to  
ensure that all vertical blank signals are caught, I'd appreciate it.  
  
Thanks!  
  
--   
Mickey P. Rowe ([mrowe@...](mailto:mrowe@...))
