Skip to main content
Skip table of contents

Send a digital output trigger on VSync

This demo will configure a digital output schedule to read the RAM buffer and output the square wave to digital output 0 on VSync. This demo opens the device, stops any current running schedule, sets the ram/buffer for our update synchronization on video signal, and starts right away.

The arguments of DPxSetDoutSched(onset, rateValue, rateUnits, count) are as follows:
Onset: 0, starts now.
Rate: 2, on/off happens once per frame.
Units: 'video', per video frame.
Duration: 0, lasts until the schedule is stopped.

from pypixxlib._libdpx import DPxOpen, DPxSelectDevice, DPxStopDoutSched, \
    DPxUpdateRegCache, DPxGetDoutBuffBaseAddr, DPxSetDoutBuff, DPxWriteRam, \
    DPxSetDoutSched, DPxStartDoutSched

DPxSelectDevice('PROPixx Ctrl')

base_address = DPxGetDoutBuffBaseAddr()
buffer_dout = [0xFFFF, 0]
DPxSetDoutBuff(base_address, 4)
DPxWriteRam(base_address, buffer_dout)
DPxSetDoutSched(0, 2, 'video', 0) 


JavaScript errors detected

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

If this problem persists, please contact our support.