ViStatus _VI_FUNC niSync_ReadTriggerTimeStamp (ViSession vi, ViConstString terminal, ViReal64 timeout, ViUInt32* timeSeconds, ViUInt32* timeNanoseconds, ViUInt16* timeFractionalNanoseconds, ViInt32* detectedEdge);
Reads a timestamp recorded on the internal software buffer for a specific terminal.
The read operation is a single-time-stamp, destructive, blocking read. That is, the oldest unread time stamp associated with the specified terminal is returned. When a time stamp is read, it is removed from the buffer. The function does not return until a time stamp is available to be read or the specified timeout elapses.
![]() |
Note NI-Sync supports only the time range between 1 January 1970 and 1 January 2100. Therefore, if the supported time range ends before a time stamp is captured, an error is returned. |
If the internal software buffer associated with the specified terminal is full, timestamp operations for that terminal are suspended and an error, specifying that the internal software buffer overflowed, is returned when the niSync_ReadTriggerTimeStamp function is invoked. If the hardware timestamp buffer is full, all trigger timestamp operations are suspended and an error, specifying that the hardware timestamp buffer overflowed, is returned when the niSync_ReadTriggerTimeStamp function is invoked. That is, the niSync_ReadTriggerTimeStamp function continues to return previously generated timestamps, despite the overflow condition, until no time stamps are available. To clear this error condition, you must invoke the niSync_DisableTimeStampTrigger function .
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 digital signal you want to read timestamps from. |
timeout | ViReal64 | An input floating-point number that specifies the number of seconds to wait for a timestamp to be generated before returning a timeout error. Default Value: 10 seconds |
timeSeconds | ViUInt32* | An output integer that returns a portion of the board time when the trigger associated with the specified terminal was detected. |
timeNanoseconds | ViUInt32* | An output integer that returns a portion of the board time when the trigger associated with the specified terminal was detected. |
timeFractionalNanoseconds | ViUInt16* | An output integer that returns a portion of the board time when the trigger associated with the specified terminal was detected. |
detectedEdge | ViInt32* | An output integer enumeration that returns the detected trigger condition of the timestamp. Valid Values: NISYNC_VAL_EDGE_RISING NISYNC_VAL_EDGE_FALLING |