Sets the specified event capture memory state.
Gx3748EventCaptureSetState (nHandle, nMemory, nState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3748 board. |
nMemory |
SHORT |
Specified memory number, memory number are 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. |
nState |
SHORT |
Specified event capture memory state can be:0. GX3748_EVENT_CAPTURE_STATE_HALT: When set to HALT, the specified event capture memory will not record any additional samples.1. GX3748_EVENT_CAPTURE_STATE_ARM: When set to ARM, the specified event capture memory will start immediately record input events. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function sets the specified event capture memory state.
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 element 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.
GX3748_EVENT_CAPTURE_STATE_HALT: When set to HALT, the specified event capture memory will not record any additional samples. The user can set the specified event capture memory source, group and channel, using the Gx3748EventCaptureSetSource(). The user can set the specified event capture memory mode, using the Gx3748EventCaptureSetMode() API. The user can read the specified event capture memory content using the Gx3748EventCaptureReadMemory() API.
GX3748_EVENT_CAPTURE_STATE_ARM: When set to ARM, the specified event capture memory will start immediacy record input events. In this mode, the user cannot set the specified event capture memory source, group and channel, using the Gx3748EventCaptureSetSource(). The user cannot set the specified event capture memory mode, using the Gx3748EventCaptureSetMode() API. The user cannot read the specified event capture memory content using the Gx3748EventCaptureReadMemory() API.
The following example sets event capture memory 0 mode to Transitions, state to ARM and returns the memory mode and state:
SHORT nHandle, nStatus;
SHORT nMode, nState;
Gx3748EventCaptureSetState (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, GX3748_EVENT_CAPTURE_STATE_ARM, &nStatus);
Gx3748EventCaptureSetMode (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, GX3748_EVENT_CAPTURE_MODE_TRANSITIONS, &nStatus);
Gx3748EventCaptureGSetMode (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, &nMode, &nStatus);
Gx3748EventCaptureGetState (nHandle, GX3748_EVENT_CAPTURE_MEMORY0, &nState, &nStatus);
Gx3748EventCaptureClearMemory, Gx3748EventCaptureReadMemory, Gx3748EventCaptureReadMemoryCount, Gx3748EventCaptureReadTimestampCounter, Gx3748EventCaptureResetTimestampCounter, Gx3748EventCaptureSetMode, Gx3748EventCaptureSetSampleRate, Gx3748EventCaptureSetSource, Gx3748EventCaptureGetState, Gx3748EventCaptureSoftwareTrigger, Gx3748EventCaptureSetHoldoffTime, GxFpgaGetErrorString