niSync_SetTimeReferenceIRIG

C Function Prototype

ViStatus _VI_FUNC niSync_SetTimeReferenceIRIG (ViSession vi, ViInt32 irigType, ViConstString terminalName);

Purpose

Sets the selected time reference of the specified device to IRIG. You must have an external IRIG source connected to the specified terminal for this function to operate.

This function is a nonblocking call that returns immediately regardless of the state of the time reference selected. Selecting the time reference is a system-wide (per device) configuration that persists after the session exits. The time reference is not reservable; the last call to select the time reference takes precedence.

If the selected time reference is not providing valid time information, the board time goes into free running mode, starting at the last known time and running at the last frequency that was applied.

Note Note  
  • The servo may apply a macro phase adjustment when your device's board time and the selected time reference varies by more than 1 ms. A macro phase adjustment adjusts the selected time reference by a significant amount, and the time no longer atomically increments. This should not occur on a well-designed and stable network. A macro phase adjustment may affect future time events, clocks, and timestamps. If the selected time reference is set forward, future time events and clock transitions that were missed occur immediately. If the selected time reference is set backward, future time events and clock transitions are delayed.
  • An alternative to calling this function is to configure the default selected time reference through Measurement & Automation Explorer. The selected state is then reapplied at every restart.
  • Closing the session that calls this function does not alter the value of the selected time reference.
  • This attribute is supported only on certain targets. Refer to Target Support for Timing Attributes and Functions to determine whether or not this attribute is supported on your target.

Parameters

Name Type Description
vi ViSession The session handle that you obtain from niSync_init. The handle identifies a particular instrument session.
irigType ViInt32 Specifies the type of IRIG output generated by the external IRIG source.

Valid Values:
NISYNC_VAL_IRIG_TYPE_IRIGB_DC
NISYNC_VAL_IRIG_TYPE_IRIGB_AM
terminalName viConstString An input string that specifies the terminal to which the IRIG input is connected.

Return Values