Gx3748IRQGetSourceGroupState

Purpose

Returns all 16 channels in the specified group IRQ generation states.

Syntax

Gx3748IRQGetSourceGroupState (nHandle, nGroup, pnStates, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle for a GX3748 board.
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.
pnStates
PSHORT
Each bit represents a channel, bit 0 channel 0 etc. Each channel’s bit IRQ generation state can be:
0.      GX3748_IRQ_SOURCE_DISABLE: Disables the generation of an IRQ on the specified channel.
1.    GX3748_IRQ_SOURCE_ENABLE: Enables the generation of an IRQ on the specified channel.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function returns the specified channel in the group IRQ generation state.

There are three groups each with 16 channels. The user can enable any specific channel in any group to generate an IRQ whenever the input complies with the trigger settings by calling Gx3748IRQSetSourceChannelState() API . The user can also call Gx3748TriggerReadChannelStatus() API to find out if a specific channel generates a trigger condition. Once a trigger condition is detected on any given channel the user need to clear that condition by calling Gx3748TriggerClearChannelStatus() API in order to enable additional triggers on the specified channel. Once a trigger condition was detected the trigger can then be routed to generate an IRQ (providing that the channel’s IRQ state was enabled by calling Gx3748IRQSetSourceChannelState() API) as well as generating a trigger out to the PXI Trigger bus (providing that the channel’s trigger state was enabled by calling Gx3748TriggerSetGroupToPxiTriggerState() API). The specified PXI Trigger line can be set by calling Gx3748TriggerSetOutputPxiTrigger() API.

Example

The following example sets the trigger condition for group 0 channel 0, enable IRQ and PXI trigger and disables all IRQ and trigger states:

 

SHORT nHandle, nStatus;

 

Gx3748IRQSetSourceChannelState(nHandle, GX3748_GROUP0, GX3748_GROUP_CH0, GX3748_IRQ_SOURCE_ENABLE, &nStatus);

Gx3748TriggerSetChannelToPxiTriggerState(nHandle, GX3748_GROUP0, GX3748_GROUP_CH0, GX3748_TRIGGER_SOURCE_ENABLE, &nStatus);

Gx3748TriggerSetOutputPxiTrigger(nHandle, GX3748_TRIGGER_TO_PXI_TRIGGER_0, &nStatus);

Gx3748IRQDisableAllSources(nHandle, &nStatus);

 

See Also

Gx3748IRQDisableAllSources, Gx3748IRQSetSourceChannelState,  Gx3748IRQSetSourceGroupState, Gx3748TriggerClearAllStatus, Gx3748TriggerClearChannelStatus, Gx3748TriggerClearGroupStatus, Gx3748TriggerDisableAllSources, Gx3748TriggerReadAssertCounter, Gx3748TriggerReadChannelStatus, Gx3748TriggerReadGroupStatus, Gx3748TriggerSetChannelAssertTime, Gx3748TriggerSetChannelMode, Gx3748TriggerSetGroupAssertTime, Gx3748TriggerSetGroupMode, Gx3748TriggerSetOutputPxiTrigger, Gx3748TriggerSetChannelToPxiTriggerState, GxFpgaGetErrorString