niTClk_ConfigureForHomogeneousTriggers

NI-TClk Synchronization

niTClk_ConfigureForHomogeneousTriggers

C Function Prototype

ViStatus niTClk_ConfigureForHomogeneousTriggers (ViUInt32 sessionCount, ViSession sessions []);

Purpose

Configures the attributes commonly required for the TClk synchronization of device sessions with homogeneous triggers in a single PXI chassis or a single PC.

Use niTClk_ConfigureForHomogeneousTriggers to configure the attributes for the reference clocks, start triggers, reference triggers, script triggers, and pause triggers.

If niTClk_ConfigureForHomogeneousTriggers cannot perform all the steps appropriate for the given sessions, it returns an error. If an error is returned, use the instrument driver functions and attributes for signal routing, along with the following NI-TClk attributes:


niTClk_ConfigureForHomogeneousTriggers affects the following clocks and triggers:

Reference Clocks

niTClk_ConfigureForHomogeneousTriggers configures the reference clocks if they are needed. Specifically, if the internal sample clocks or internal sample clock timebases are used, and the reference clock source is not configured—or is set to None (no trigger configured)—niTClk_ConfigureForHomogeneousTriggers configures the following:

  • PXI—The reference clock source on all devices is set to be the 10 MHz PXI backplane clock (PXI_CLK10).
  • PCI—One of the devices exports its 10 MHz onboard reference clock to RTSI 7. The reference clock source on all devices is set to be RTSI 7.
Note  If the reference clock source is set to a value other than None, niTClk_ConfigureForHomogeneousTriggers cannot configure the reference clock source.

Start Triggers

If the start trigger is set to None (no trigger configured) for all sessions, the sessions are configured to share the start trigger. The start trigger is shared by:

  • Implicitly exporting the start trigger from one session
  • Configuring the other sessions for digital edge start triggers with sources corresponding to the exported start trigger
  • Setting NITCLK_ATTR_START_TRIGGER_MASTER_SESSION to the session that is exporting the trigger for all sessions

If the start triggers are None for all except one session, niTClk_ConfigureForHomogeneousTriggers configures the sessions to share the start trigger from the one excepted session. The start trigger is shared by:

  • Implicitly exporting start trigger from the session with the start trigger that is not None
  • Configuring the other sessions for digital-edge start triggers with sources corresponding to the exported start trigger
  • Setting NITCLK_ATTR_START_TRIGGER_MASTER_SESSION to the session that is exporting the trigger for all sessions

If start triggers are configured for all sessions, niTClk_ConfigureForHomogeneousTriggers does not affect the start triggers. Start triggers are considered to be configured for all sessions if either of the following conditions is true:

  • No session has a start trigger that is None
  • One session has a start trigger that is None, and all other sessions have start triggers other than None. The one session with the None trigger must have NITCLK_ATTR_START_TRIGGER_MASTER_SESSION set to itself, indicating that the session itself is the start trigger master

Reference Triggers

niTClk_ConfigureForHomogeneousTriggers configures sessions that support reference triggers to share the reference triggers if the reference triggers are None (no trigger configured) for all except one session. The reference triggers are shared by:

  • Implicitly exporting the reference trigger from the session whose reference trigger is not None
  • Configuring the other sessions that support the reference trigger for digital-edge reference triggers with sources corresponding to the exported reference trigger
  • Setting NITCLK_ATTR_REF_TRIGGER_MASTER_SESSION to the session that is exporting the trigger for all sessions that support reference trigger

If the reference triggers are configured for all sessions that support reference triggers, niTClk_ConfigureForHomogeneousTriggers does not affect the reference triggers. Reference triggers are considered to be configured for all sessions if either one or the other of the following conditions is true:

  • No session has a reference trigger that is None
  • One session has a reference trigger that is None, and all other sessions have reference triggers other than None. The one session with the None trigger must have NITCLK_ATTR_REF_TRIGGER_MASTER_SESSION set to itself, indicating that the session itself is the reference trigger master

Reference Trigger Holdoffs

Acquisition sessions may be configured with the reference trigger. For acquisition sessions, when the reference trigger is shared, niTClk_ConfigureForHomogeneousTriggers configures the holdoff attributes (which are instrument driver specific) on the reference trigger master session so that the session does not recognize the reference trigger before the other sessions are ready. This condition is only relevant when the sample clock rates, sample clock timebase rates, sample counts, holdoffs, and/or any delays for the acquisitions are different.

When the sample clock rates, sample clock timebase rates, and/or the sample counts are different in acquisition sessions sharing the reference trigger, you should also set the holdoff attributes for the reference trigger master using the instrument driver.

Script Triggers

niTClk_ConfigureForHomogeneousTriggers configures sessions that support script triggers to share them, if the script triggers are None (no trigger configured) for all except one session. The script triggers are shared in the following ways:

  • Implicitly exporting the script trigger from the session whose script trigger is not None
  • Configuring the other sessions that support the script trigger for digital-edge script triggers with sources corresponding to the exported script trigger
  • Setting NITCLK_ATTR_SCRIPT_TRIGGER_MASTER_SESSION to the session that is exporting the trigger for all sessions that support script triggers

If the script triggers are configured for all sessions that support script triggers, niTClk_ConfigureForHomogeneousTriggers does not affect script triggers. Script triggers are considered to be configured for all sessions if either one or the other of the following conditions are true:

  • No session has a script trigger that is None
  • One session has a script trigger that is None and all other sessions have script triggers other than None. The one session with the None trigger must have NITCLK_ATTR_SCRIPT_TRIGGER_MASTER_SESSION set to itself, indicating that the session itself is the script trigger master

Pause Triggers

niTClk_ConfigureForHomogeneousTriggers configures generation sessions that support pause triggers to share them, if the pause triggers are None (no trigger configured) for all except one session. The pause triggers are shared by:

  • Implicitly exporting the pause trigger from the session whose script trigger is not None
  • Configuring the other sessions that support the pause trigger for digital-edge pause triggers with sources corresponding to the exported pause trigger
  • Setting NITCLK_ATTR_PAUSE_TRIGGER_MASTER_SESSION to the session that is exporting the trigger for all sessions that support script triggers

If the pause triggers are configured for all generation sessions that support pause triggers, niTClk_ConfigureForHomogeneousTriggers does not affect pause triggers. Pause triggers are considered to be configured for all sessions if either one or the other of the following conditions is true:

  • No session has a pause trigger that is None
  • One session has a pause trigger that is None and all other sessions have pause triggers other than None. The one session with the None trigger must have NITCLK_ATTR_PAUSE_TRIGGER_MASTER_SESSION set to itself, indicating that the session itself is the pause trigger master
Note  TClk synchronization is not supported for pause triggers on acquisition sessions.

Parameters

Name Type Description
sessionCount ViUInt32 Number of elements in the sessions array.
sessions ViSession [] sessions is an array of sessions that are being synchronized.

Return Value