DioRealTimeCompareGetConditionValue

Applies To

GX5290, GX5295, File

Purpose

Returns the specified condition value.

Syntax

DioRealTimeCompareGetConditionValue (nHandle, nCondition, pdwValue, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board or File Board handle.
nCondition
SHORT
Condition:
0. DIO_RTC_CONDITION_FAILURE_COUNT: the DIO domain will PAUSE/HALT once the number of detected errors equals the condition count value.
1. DIO_RTC_CONDITION_DATA: the DIO domain will PAUSE/HALT once the vector data matches the condition data value.
2. DIO_RTC_CONDITION_PROGRAM_COUNTER: the DIO domain will PAUSE/HALT once the vector step number matches the condition address value.
pdwValue
PDWORD
Condition value.
If nCondition is set to DIO_RTC_CONDITION_FAILURE_COUNT then the condition value can be 1 to 1024.
If nCondition is set to DIO_RTC_CONDITION_DATA then the condition value can be between 0 to 0xFFFFFFFF.
If nCondition is set to DIO_RTC_CONDITION_PROGRAM_COUNTER then the condition value can be between 0 to last step of 67108863, or higher if number of channels was set to less than 32.
pdwValue
PDWORD
Condition value.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each DIO in the domain can have its own active condition to stop on as it was set by calling DioRealTimeCompareSetupStopMode function.

The board has to be in Real Time Compare operating mode prior calling this function. See the DioDomainSetupOperatingMode function for more details.

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

Example

The following example returns the condition count value:

 

SHORT nStatus;

DWORD dwValue;

DioRealTimeCompareGetConditionValue (nHandle, DIO_RTC_CONDITION_FAILURE_COUNT, &dwValue, pnStatus);

 

See Also

DioRealTimeCompareSetupConditionValue, DioRealTimeCompareSetupDataDelay, DioRealTimeCompareSetupInputDataClockEdge, DioRealTimeCompareSetupResultsDataType, DioRealTimeCompareSetupStopCondition, DioRealTimeCompareWriteExpectedMemory, DioRealTimeCompareWriteMaskMemory, DioRealTimeCompareReadResults