AlazarGetTriggerAddress

Function Syntax

RETURN_CODE AlazarGetTriggerAddress(HANDLE handle, U32 Record, U32 *TriggerAddress, U32 *TimeStampHighPart, U32 *TimeStampLowPart)

Get the timestamp and trigger address of the trigger event in a record acquired to on-board memory.

The following code fragment demonstrates how to convert the trigger timestamp returned by AlazarGetTriggerAddress() from counts to seconds.

__int64 timeStamp_cnt;
timeStamp_cnt = ((__int64) timestampHighPart) << 8;
timeStamp_cnt |= timestampLowPart & 0x0ff;
double samplesPerTimestampCount = 2; // board specific constant
double samplesPerSec = 50.e6; // sample rate
double timeStamp_sec = (double) samplesPerTimestampCount *
timeStamp_cnt / samplesPerSec;

The sample per timestamp count value depends on the board model. See board-specific information to know which value applies to which board.

Return

ApiError2 (604) if it is called after a dual-port acquisition. This function should be called after a single-port acquisition only.

Return

ApiSuccess upon success, or an error code. See RETURN_CODE for more detailed information.

Remark

This function can be used in single-port acquisitions only.

Parameters
  • [in] handle: Board handle

  • [in] Record: Record in acquisition (1-indexed)

  • [out] TriggerAddress: The trigger address

  • [out] TimeStampHighPart: The most significant 32-bits of a record timestamp

  • [out] TimeStampLowPart: The least significant 8-bits of a record timestamp

LabVIEW Block Diagram

../_images/AlazarGetTriggerAddress.vi.png