DioRealTimeCompareSetupActiveChannels

Applies To

GX5295, File

Purpose

Returns the specified board active channels when in real time compare per channel fail mode.

Syntax

DioRealTimeCompareSetupActiveChannels (nHandle, dwActiveChannels, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Session identifier:
Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling DioInitialize or DioSetupInitialization.
dwActiveChannels
DWORD
Sets the specified board active channels when in real time compare per channel fail mode. Each bit represents a channel, channel 0 = bit 0, channel 31 = bit 31 etc.
Bit Low (0): The respected channel will not be compared.
Bit High (1): The respected channel will not be compared.
pnStatus
LONG
Returned status: 0 on success, negative number on failure.

Comments

All boards in the domain have to be in Real Time Compare operating mode prior calling this function. See the DioDomainSetupOperatingMode function for more details.

All boards in the domain have to set the Real Time Compare mode to DIO_RTC_MODE_FIRST_FAIL_PER_CHANNEL mode using DioRealTimeCompareSetupMode API prior calling this function. See the DioRealTimeCompareSetupMode function for more details.

Note: Real Time Compare functionality is supported only by GX529x boards with firmware versions 0x8A00 and above.

Note: Real Time Compare with per channel fail functionality is supported only by GX5295 boards with firmware versions 0xF605 and above.

Example

The following example initializes a master board in slot 6 and a slave board in slot 7. Sets both boards to operate in Real Time Compare mode. Sets the domain to be in Real Time Compare mode, Set the Real Time Compare mode to DIO_RTC_MODE_FIRST_FAIL_PER_CHANNEL mode, and enables all even channels in the master board. And reads the board active channels real time compare pass fail statues:

 

DioSetupInitialization (0, 1, 0x106, &nDensity, &nBanks, &nMasterHandle1, &nStatus);

DioSetupInitialization (nMasterHandle1, 1, 0x107, &nDensity, &nBanks, &nSlave11, &nStatus);

DioDomainSetupOperatingMode (nMasterHandle, DIO_OPERATING_MODE_REAL_TIME_COMPARE, &nStatus);

DioRealTimeCompareSetupMode (nMasterHandle, DIO_RTC_MODE_FIRST_FAIL_PER_CHANNEL, &nStatus);

DioRealTimeCompareClearResultMemory (nMasterHandle, DIO_RTC_MODE_FIRST_FAIL_PER_CHANNEL, &nStatus);

DioRealTimeCompareSetupActiveChannels(nMasterHandle, 0xAAAAAAAA, &nStatus);

DioRealTimeCompareGetActiveChannels(nMasterHandle, &dwActiveChannels, &nStatus);

DioRealTimeCompareReadChannelsStatus (nMasterHandle, &dwChannelsStatus, pnStatus)

 

See Also

DioRealTimeCompareClearChannelsStatus, DioRealTimeCompareReadChannelsStatus, DioRealTimeCompareSetupMode, DioRealTimeCompareReadChannelsStatus, DioRealTimeCompareSetupActiveChannels, DioRealTimeCompareSetupMode, DioRealTimeCompareSetupConditionValue, DioRealTimeCompareSetupDataDelay, DioRealTimeCompareSetupInputDataClockEdge, DioRealTimeCompareSetupResultsDataType, DioRealTimeCompareSetupStopCondition, DioRealTimeCompareWriteExpectedMemory, DioRealTimeCompareWriteMaskMemory, DioRealTimeCompareReadResults