GtDio6xSequencerSetSystemClockSource

Applies To

GX5961, GX5964, File

Purpose

Sets the system clock source.

Syntax

GtDio6xSequencerSetSystemClockSource (nHandle, nSource, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Session identifier:

     Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.

     File handle is used when communicating with a file. The File handle session identifier is  returned by calling GtDio6xFileOpen.

nSource
SHORT
Used to specify the system clock source:

0.  GTDIO6X_SYSTEM_CLOCK_SOURCE_T0: Internal T0 Clock Source.

1.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX0: Aux 0 signal.

2.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX1: Aux 1 signal.

3.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX2: Aux 2 signal.

4.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX3: Aux 3 signal.

5.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX4: Aux 4 signal.

6.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX5: Aux 5 signal.

7.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX6: Aux 6 signal.

8.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX7: Aux 7 signal.

9.  GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX8: Aux 8 signal.

10. GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX9: Aux 9 signal.

11. GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX10: Aux 10 signal.

12. GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX11: Aux 11 signal.

13. GTDIO6X_SYSTEM_CLOCK_SOURCE_PULSE_GEN: Pulse Generator.

14. GTDIO6X_SYSTEM_CLOCK_SOURCE_PLL: Frequency Synthesizer.

pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

The system clock is used to trigger the timing set phase and window logic.

The system clock can be set to the following sources:

     GTDIO6X_SYSTEM_CLOCK_SOURCE_T0: Internal T0 Clock Source - The period is defined in the sequence step memory using the GtDio6xStepSetClock function.

     GTDIO6X_SYSTEM_CLOCK_SOURCE_PLL: Frequency Synthesizer - The period is defined by the frequency synthesizer settings: GtDio6xSequencerSetFreqSynth.

     GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX0 through GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX11 - The period is defined by the AUX input signal: GtDio6xSequencerSetSystemClockExternal.

A vector clock is also generated from this clock, every 'CPV' system clock periods. CPV (Clocks per vector) is defined in the GtDio6xStepSetClock function. Note, when CPV = 1, then vector clock is equal to system clock. When CPV = 3, then vector clock period is three times the system clock period.

Timing set phases can trigger on either system clock or vector clock. Windows only trigger on vector clock.

Example

The following example sets the system clock source to Auxiliary channel 8, and returns the settings:

 

SHORT nSource;

SHORT nStatus;

 

GtDio6xSequencerSetSystemClockSource(nHandle, GTDIO6X_SYSTEM_CLOCK_SOURCE_AUX8, &nStatus);

GtDio6xSequencerGetSystemClockSource(nHandle, &nSource, &nStatus);

 

See Also

GtDio6xSequencerGetSystemClockSource, GtDio6xSequencerSetSystemClockExternal, GtDio6xGetErrorString