Sets the specified group clock source and frequency.
GX1649, GX1649-1
GxAoArbSetGroupClock (nHandle, nGroup, nClockSource, dFrequency, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX1649 board. |
nGroup |
SHORT |
Group number:0. GXAO_GROUPA1. GXAO_GROUPB2. GXAO_GROUPC3. GXAO_GROUPD |
nClockSource |
SHORT |
Clock source:0. GXAO_1649_CLOCKSOURCE_INTERNAL1. GXAO_1649_CLOCKSOURCE_EXTERNAL2. GXAO_1649_CLOCKSOURCE_PXI03. GXAO_1649_CLOCKSOURCE_PXI14. GXAO_1649_CLOCKSOURCE_PXI25. GXAO_1649_CLOCKSOURCE_PXI36. GXAO_1649_CLOCKSOURCE_PXI47. GXAO_1649_CLOCKSOURCE_PXI58. GXAO_1649_CLOCKSOURCE_PXI69. GXAO_1649_CLOCKSOURCE_PXI710. GXAO_1649_CLOCKSOURCE_STAR_TRIGGER11. GXAO_1649_CLOCKSOURCE_GROUPA |
dFrequency |
DOUBLE |
Group frequency, this is only relevant when nClockSource is control by the card internally (GXAO_CLOCKSOURCE_INTERNAL). Frequency range is 0.5 Hz-10MHz). |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The arb clock frequency is achieved by dividing the master clock, so the valid frequencies are 10MHz/N where N is some number between 1 and 20,000,000, inclusive. If you input an invalid frequency, the software will automatically round up to the nearest valid frequency.
Default clock source is GXAO_CLOCKSOURCE_INTERNAL with frequency of 10MHz GXAO_CLOCKSOURCE_GROUPA can only be used when nGroup is set to B, C, and D, using group A clock source will synchronizes all group channels to use the same clock source as group A.
GXAO_CLOCKSOURCE_EXTERNAL sets the GX1649 groups to use GPIO4 through GPIO7 to clock Groups A through D, respectively.
The following example sets group A with clock source of internal with frequency of 5MHz:
SHORT nStatus;
GxAoArbSetGroupClock (nHandle, GXAO_GROUPA, GXAO_CLOCKSOURCE_INTERNAL, 5000000, &nStatus);