NI-Sync C API Reference

niSync_EnableTimeStampTriggerWithDecimation

  • Updated2023-02-21
  • 1 minute(s) read

C Function Prototype

ViStatus _VI_FUNC niSync_EnableTimeStampTriggerWithDecimation (ViSession vi, ViConstString terminal, ViInt32 activeEdge, ViUInt32 decimationCount);

Purpose

Creates a timestamp every time the signal of the specified trigger or clock changes. You can then read a single timestamp or multiple timestamps at a later point in the data flow. With this function, incoming trigger events are decimated by a value of one or more.

The terminal associated with this time stamp trigger cannot be used for other operations until the time stamp trigger is disabled with the niSync_DisableTimeStampTrigger function or the session is closed with the niSync_close function.

Parameters

Name Type Description
vi ViSession The session handle that you obtain from niSync_init. The handle identifies a particular instrument session.
terminal ViConstString Specifies the terminal that contains the trigger signal you would like to timestamp.
activeEdge ViInt32 Specifies at what point in the trigger signal to record a timestamp in the software buffer.

Valid Values:
NISYNC_VAL_EDGE_RISING
NISYNC_VAL_EDGE_FALLING
NISYNC_VAL_EDGE_ANY
decimationCount ViUint32 Specifies by how much to decimate incoming trigger events. Use this parameter to adjust the number of timestamps that should elapse before the next timestamp is recorded. For example, if you set the decimationCount to 10, the function will record every tenth timestamp. The value must be greater than or equal to one, and the default value is one.

Return Values

Log in to get a better experience