Gx5731SetInternalClock

Purpose

Sets internal clock source and divider.

Syntax

Gx5731SetInternalClock (nHandle, nClock, nSource, dwDivider, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX5731 board.
nClock
SHORT
Clock number:
0. GX5731_CLOCK0: Internal Clock 0
1. GX5731_CLOCK1: Internal Clock 1
nSource
SHORT
Internal Clock 0 and Internal Clock 1 sources are listed in comment.
dwDivider
DWORD
Divider value: 1-0x8000000
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Internal Clock 0 sources are:

0 GX5731_INTERNAL_CLOCK0_T0_CLOCK_IN0: Internal Clock 0 connected to Clock Input 0.

1 GX5731_INTERNAL_CLOCK0_T0_PCI_CLOCK_33MHZ: Internal Clock 0 connected to 33MHz PCI Clock.

2 GX5731_INTERNAL_CLOCK0_T0_PXI_CLOCK_10MHZ: Internal Clock 0 connected to 10MHz PXI Clock.

3 GX5731_INTERNAL_CLOCK0_T0_STAR_TRIGGER: Internal Clock 0 connected to the PXI Start Trigger.

4 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER0: Internal Clock 0 connected to the PXI External Trigger Line 0.

5 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER1: Internal Clock 0 connected to the PXI External Trigger Line 1.

6 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER2 Internal Clock 0 connected to the PXI External Trigger Line 2

7 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER3 Internal Clock 0 connected to the PXI External Trigger Line 3.

Internal Clock 1 sources are:

0 GX5731_INTERNAL_CLOCK0_T0_CLOCK_IN1: Internal Clock 1 connected to Clock Input 1.

1 GX5731_INTERNAL_CLOCK0_T0_PCI_CLOCK_33MHZ: Internal Clock 1 connected to 33MHz PCI Clock.

2 GX5731_INTERNAL_CLOCK0_T0_PXI_CLOCK_10MHZ: Internal Clock 1 connected to 10MHz PXI Clock.

3 GX5731_INTERNAL_CLOCK0_T0_STAR_TRIGGER: Internal Clock 1 connected to the PXI Start Trigger.

4 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER4: Internal Clock 1 connected to the PXI External Trigger Line 4.

5 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER5: Internal Clock 1 connected to the PXI External Trigger Line 5.

6 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER6 Internal Clock 1 connected to the PXI External Trigger Line 6.

7 GX5731_INTERNAL_CLOCK0_T0_EXT_TRIGGER7 Internal Clock 1 connected to the PXI External Trigger Line 7.

Use the Gx5731GetInternalClock to retrieve the internal clock settings.

Example

The following example sets the internal clock 0 to 10Mhz and divider to 20000:

 

Gx5731SetInternalClock (nHandle, 0, 1, 20000, &nStatus);

 

See Also

Gx5731GetInternalClock