Applies To
GC5050, GX5050, GX5055, GX5150, GX5280, GX5290, GX5290e, GX5295
Purpose
Tests all the board memory banks and registers. If the test failed, then the first memory failed step number is returned.
Syntax
DioSelfTest (nHandle, nTestMode, pdwFailedStepNum, pnStatus)
Parameters
Name |
Type |
Comments |
nHandle |
SHORT |
DIO board handle. |
nTestMode |
SHORT |
Test modes are as follow: 0 TEST_MEMORY: Test Memory. 1 TEST_REGISTERS: Test 2 TEST_ALL: Test both memory and registers. |
pdwFailedStepNum |
PDWORD |
The first failed step number. If no errors were found, the returned value would be set to 0xFFFFFFFF. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Comments
The function tests the registers and/or the memory.
In case the memory is tested then all the physical memory will be tested. The memory data will not be changed upon completing the test successfully.
In case the registers are tested then all the registers will be tested.
The board must be in HALT mode.
Example
In the following example, the board is set to the HALT state and then DioSelfTest is called with the mode set to complete test:
DWORD dwFailedStepNum;
SHORT nStatus;
DioHALT (nHandle, &nStatus);
DioSelfTest (nHandle, TEST_ALL, &dwFailedStepNum, &nStatus);
See Also