DioRealTimeCompareReadChannelsStatus

Applies To

GX5295, File

Purpose

Returns the specified board active channels real time compare pass fail statues.

Syntax

DioRealTimeCompareReadChannelsStatus (nHandle, pdwChannelsStatus, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board or File Board handle.
pdwChannelsStatus
PDWORD
Returns the specified board active channels real time compare pass fail statues. Each bit represents a channel, channel 0 = bit 0, channel 31 = bit 31 etc.
Bit Low (0): The respected channel passed real time compare.
Bit High (1): The respected channel failed real time compare.  
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:

 

SHORT nMasterHandle1, nSlave1, nDensity, nBanks, nStatus;

DWORD dwChannelsStatus, dwActiveChannels;

 

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, DioRealTimeCompareSetupActiveChannels, DioRealTimeCompareSetupMode, DioRealTimeCompareReadChannelsStatus, DioRealTimeCompareSetupActiveChannels, DioRealTimeCompareSetupMode, DioRealTimeCompareSetupConditionValue, DioRealTimeCompareSetupDataDelay, DioRealTimeCompareSetupInputDataClockEdge, DioRealTimeCompareSetupResultsDataType, DioRealTimeCompareSetupStopCondition, DioRealTimeCompareWriteExpectedMemory, DioRealTimeCompareWriteMaskMemory, DioRealTimeCompareReadResults