Returns BIT status.
Gx6188BITGetStatus (nHandle, pbPass, pszBITResult, nResultMaxLen, pdPercentCompleted, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6188 board. |
pbPass |
PBOOL |
Returns with the pass/fail status of the built-in test. TRUE is pass and FALSE is fail. |
pszBITResult |
PSTR |
Returned string containing the built-in test result. |
nResultMaxLen |
SHORT |
Size of the buffer to contain the BIT result. |
pdPercentCompleted |
PDOUBLE |
Return the percentage completed |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The built-in test checks each relay in a specified device for continuity. This function returns the percent completed while the test is running. When the test has completed, this function returns the result of the test in the form of a string (pszBITResult) and a flag (pbPass) that indicates pass or fail.
The following example runs the built-in test and then polls the built-in test status until it has completed:
BOOL bPass;
CHAR szBITResult[1024];
DOUBLE dPercentCompleted;
Gx6188BITRun (nHandle, GX6188_BIT_MODE_ALL, &nStatus);
Gx6188BITGetStatus (nHandle, &bPass, szBITResult, 1024, &dPercentCompleted, &nStatus);
while (dPercentCompleted<100)
{
printf("BIT Percent Completed = %f %", dPercentCompleted);
Gx6188BITGetStatus (nHandle, &bPass, szBITResult, 1024, &dPercentCompleted, &nStatus);
}