Gx3748EventCaptureSetSource

Purpose

Sets the specified event capture memory input channel and group number.

Syntax

Gx3748EventCaptureSetSource (nHandle, nMemory, nGroup, nChannel, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3748 board.
nMemory
SHORT
Group number as follows:
0.      GX3748_EVENT_CAPTURE_MEMORY0: memory number 0.
1.      GX3748_EVENT_CAPTURE_MEMORY1: memory number 1.
2.    GX3748_EVENT_CAPTURE_MEMORY2: memory number 2.
nGroup
SHORT

Group number as follows:

0.      GX3748_GROUP0: J1 input connector pins 2 to 17.

1.      GX3748_GROUP1: J1 input connector pins 23 to 38.

2.    GX3748_GROUP2: J1 input connector pins 44 to 59.
nChannel
SHORT

Channel number in the group, channel numbers are 0-15:

0.      GX3748_GROUP_CH0: channel 0 in the group.

1.      GX3748_GROUP_CH1: channel 1 in the group.

2.      GX3748_GROUP_CH2: channel 2 in the group.

3.      GX3748_GROUP_CH3: channel 3 in the group.

4.      GX3748_GROUP_CH4: channel 4 in the group.

5.      GX3748_GROUP_CH5: channel 5 in the group.

6.      GX3748_GROUP_CH6: channel 6 in the group.

7.      GX3748_GROUP_CH7: channel 7 in the group.

8.      GX3748_GROUP_CH8: channel 8 in the group.

9.      GX3748_GROUP_CH9: channel 9 in the group.

10.   GX3748_GROUP_CH10: channel 10 in the group.

11.   GX3748_GROUP_CH11: channel 11 in the group.

12.   GX3748_GROUP_CH12: channel 12 in the group.

13.   GX3748_GROUP_CH13: channel 13 in the group.

14.   GX3748_GROUP_CH14: channel 14 in the group.

15.    GX3748_GROUP_CH15: channel 15 in the group.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function sets the specified event capture memory input channel and group number.

Group 0: 16 input channels (J1 input connector pins 2 to 17) detect if front channels are within a configurable voltage window, low and high voltage levels. The user can at time read back the channels comparison results using the Gx3748ComparatorsReadStates () API.

There are 3 independent event capture memories. Each memory can record input events from any of the channels’ groups by setting the memory source, Gx3748EventCaptureSetSource() API. The user can read any number of elements from any of the memories using the Gx3748EventCaptureReadMemory() API., as well as the current number of recorded elements by calling the Gx3748EventCaptureReadMemoryCount() API. Whenever the user changes the specified event capture memory input source (group and channel), the content of that memory and the recorded element counter will be cleared. Whenever the user changes the specified event capture memory mode, Gx3748EventCaptureSetMode() API, the content of that memory and the recorded element counter will be cleared. Whenever the user changes the specified event capture memory source Gx3748EventCaptureSetSource () API, the content of that memory and the recorded element counter will be cleared.

Example

The following example sets event capture memory 0 source as Group 0 channel 0, sets mode to Continuous, sample rate to 1024uSec and returns the memory mode and sample rate:

 

SHORT nHandle, nStatus;

SHORT nMode, nGroup, nChannel;

DWORD dwSampeRate;

 

Gx3748EventCaptureGetSource (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, GX3748_GROUP0, GX3748_GROUP_CH0, &nStatus);

Gx3748EventCaptureGetMode (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, GX3748_EVENT_CAPTURE_MODE_CONTINUOUS, &nStatus);

Gx3748EventCaptureSetSamplingRate (nHandle, GX3748_EVENT_CAPTURE_SAMPLE_RATE_1024_USEC, &nStatus);

 

Gx3748EventCaptureGetSource (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, &nGroup, &nChannel, &nStatus);

Gx3748EventCaptureSetMode (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, &nMode, &nStatus);

Gx3748EventCaptureGetSamplingRate (nHandle, &dwSampleRate, &nStatus);

 

See Also

Gx3748EventCaptureClearMemory, Gx3748EventCaptureReadMemory, Gx3748EventCaptureReadMemoryCount, Gx3748EventCaptureReadTimestampCounter, Gx3748EventCaptureResetTimestampCounter, Gx3748EventCaptureSetMode, Gx3748EventCaptureSetSampleRate, Gx3748EventCaptureGetSource, Gx3748EventCaptureSetState, Gx3748EventCaptureSoftwareTrigger, Gx3748EventCaptureSetHoldoffTime, GxFpgaGetErrorString