## Function Syntax¶

RETURN_CODE AlazarOCTIgnoreBadClock(HANDLE handle, U32 enable, double goodClockDuration_seconds, double badClockDuration_seconds, double *triggerCycleTime_seconds, double *triggerPulseWidth_seconds)

Enables or disables the OCT ignore bad clock mechanism.

This function must be called before an acquisition starts. It informs the digitizer about portions of time during which the external clock signal is valid, and others during which it is invalid and should be ignored.

“good” clock portions are durations of time during which the external clock signal is valid, i.e. within the board’s specifications. “bad” clock portions are durations of time during which the clock signal is invalid.

When OCT Ignore Bad Clock is active, the digitizer must be set in external TTL trigger mode, and in external clock mode.

The external clock signal must be good when trigger events are received on the external trigger connector. The duration of time after the trigger event during which the clock signal is good is specified in goodClockDuration_seconds. After this good duration, the portion of time during which the clock may be bad is specified in badClockDuration_seconds.

The sum of goodClockDuration_seconds and badClockDuration_seconds must be less than the trigger cycle time. This means that the clock signal must be back to being good before the next trigger event.

Return

If the function succeeds, it returns ApiSuccess.

Return

If an invalid board handle is passed to the function, it returns ApiNullParam.

Return

If an invalid value is passed for any of enable, goodClockDuration_seconds or badClockDuration_seconds, it returns ApiInvalidData.

Return

If OCT ignore bad clock is not supported by the board and/or firmware, it returns ApiOCTIgnoreBadClockNotSupported.

Return

If no trigger signal is detected by the board, it returns ApiOCTNoTriggerDetected.

Return

If the trigger rate is too fast for the provided good and bad clock durations, it returns ApiOCTTriggerTooFast.

Remark

This function must be called prior to calling AlazarBeforeAsyncRead().

Remark

Trigger source must be set to TRIG_EXTERNAL

Remark

Trigger input range must be ETR_TTL.

Remark

Clock source must be set to FAST_EXTERNAL_CLOCK.

Parameters
• [in] handle: Handle to board

• [in] enable: Enables (1) or disables (0) the feature

• [in] goodClockDuration_seconds: Good clock duration in seconds

• [in] badClockDuration_seconds: Bad clock duration in seconds

• [out] triggerCycleTime_seconds: Trigger cycle time measured by the board

• [out] triggerPulseWidth_seconds: Trigger pulse width measured by the board