Skip to main content
Skip table of contents

VSync/PSync Synchronization

A quick reminder of the definition of Video Sync and Pixel Sync register reads and writes (referred to as VSync & PSync):

  • A register command done on VSync means that it will happen at the start of the next video frame. At 120 Hz, this happens in the next 0.00-8.33 ms.

  • A register command done on Psync means that it will happen when the specified sequence of pixels given to the command is found on the screen.

VSync and Psync are critical commands when synchronizing your visual stimuli to your recorded signals. One of the main differences between a real device and a simulated device will come from the behavior or PSync and VSync.

There are two types of VSync and PSync:

  • Write. A write simply sends a command to be done on the device when the criteria is met. On a real device, a write returns instantly and the device itself hangs until the criteria is met

  • Update. An update sends a write request and waits until the criteria is met, then returns updated values. An update will wait until the criteria is met.

On a simulated device, for the VSYNC, the device itself will behave like an update. The PSYNC, on the other hand, will not block if you simply do a ‘Write’.

In the case of VSync, this means that if you do a write on VSync, it will wait until the next VSync is received and then let your software continue. This means your stimuli will be displayed 1 frame later than expected.

Since no video is sent to the device, you must specify the monitor your stimuli will be presented on for PSync:

This setting can be accessed in the File → Setting menu, under Pixel Sync Mode. This allows you to select the monitor, but also have a preview of the current requested pixels (target pixels) as well as the screen location of the last found pixel. The Display Pixels matches a sequence of 10 pixels as they are currently presented on the top line of the display. This sequence either starts at the top left of the screen or at the last matching location minus one, which can also help you debug.

Another important note for PSync: a simulated device will only look at the first line of the selected display, while a real device will look at every pixel.

When using register updates with video synchronization (VSYNC), you must update your code. PSYNC can be used the same way.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.