GtDio6xRealTimeCompareSetErrorCountSource

Applies To

GX5961, GX5964, File

Purpose

Sets the Real Time Compare Error Counter source.

Syntax

GtDio6xRealTimeCompareSetErrorCountSource (nHandle, nErrorCountSource, 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 GtDio6xInitialize or GtDio6xSetupInitialization.

     File handle is used when communicating with a file. The File handle session identifier is  returned by calling GtDio6xFileOpen.

nErrorCountSource
SHORT
Error Counter source:

0.   GTDIO6X_RTC_ERROR_COUNTER_SOURCE_BOARD: Error counter source is board generated errors.

1.   GTDIO6X_RTC_ERROR_COUNTER_SOURCE_DOMAIN: Error counter source is domain generated errors (default, after power).

2.   GTDIO6X_RTC_ERROR_COUNTER_SOURCE_BOARD_VECTOR_E_FLAG: Error counter source is board generated errors from vectors with the test E Flag enabled.

3.   GTDIO6X_RTC_ERROR_COUNTER_SOURCE_DOMAIN_VECTOR_E_FLAG: Error counter source is domain generated errors from vectors with the test E Flag enabled.

pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

The Error Address Memory records up to 1024 real time compare errors. The source of the Error Counter can be selected using this function. Board wide or Domain wide errors can be recorded. Furthermore, vectors can be marked with the C (Error) flag in order to qualify them for inclusion in the Error Counter source. Use the GtDio6xWriteVectorTestFlagsMemory API to set the vector Test flags.

If the Error Count Source is set to GTDIO6X_RTC_ERROR_COUNTER_SOURCE_BOARD or GTDIO6X_RTC_ERROR_COUNTER_SOURCE_DOMAIN, then only qualified Vectors will be allowed to generate errors that will be recorded. (Errors generated from Vectors without the C flag will be disregarded in this case).

Example

The following example sets the error counter source to board generated errors from vectors with the test E Flag enabled, and returns the error counter source:

 

SHORT nHandle, nErrorCountSource;

SHORT nStatus;

GtDio6xRealTimeCompareSetErrorCountSource (nHandle, GTDIO6X_RTC_ERROR_COUNTER_SOURCE_BOARD_VECTOR_E_FLAG, &nStatus);

GtDio6xRealTimeCompareGetErrorCountSource (nHandle, & nErrorCountSource, &nStatus);

 

See Also

GtDio6xRealTimeCompareSetErrorAddressMemorySource, GtDio6xRealTimeCompareGetErrorCount,  GtDio6xRealTimeCompareReadErrorAddressMemory, GtDio6xGetErrorString