Agilent Technologies E4370A, E4371A, E4374A manual C Program Examples

Models: E4374A E4371A E4370A

1 141
Download 141 pages 7.46 Kb
Page 111
Image 111

C Program Examples - 7

/* Measure the internal resistance of all cells. */ cfMeasACResistance(hServer, CF_ALL_CELLS, fCellResistance);

/*

*Turn off the TEST light and turn on the READY light

*to indicate that it the tray can be removed from the fixture.

*/

cfGetDigitalPort(hServer, &nDigitalPort); nDigitalPort &= ~DIG_TEST_LIGHT; nDigitalPort = DIG_READY_LIGHT; cfSetDigitalPort(hServer, nDigitalPort); printf("Forming sequence complete.\n");

/* Close the server connection. */ cfClose(hServer);

exit(0);

}

/*********************************************************************** API error handler.

***********************************************************************/

void APIError(CF_HANDLE hServer, char *szName, int nError)

{

printf("\nServer = %d Function = %s Error = %d\n", hServer, szName, nError);

cfClose(hServer);

exit(1);

}

/*********************************************************************** Convert sequence run state to a description string.

***********************************************************************/

char *RunStateToString(CF_RUN_STATE state)

{

switch (state) {

 

case CF_NOT_READY:

 

return "CF_NOT_READY

";

case CF_IDLE:

 

return "CF_IDLE

";

case CF_ERASING:

 

return "CF_ERASING

";

case CF_INITIATED:

 

return "CF_INITIATED

";

case CF_FORMING:

 

return "CF_FORMING

";

case CF_INTERLOCKED:

 

return "CF_INTERLOCKED";

case CF_PROTECTED:

 

return "CF_PROTECTED

";

case CF_HW_FAILED:

 

return "CF_HW_FAILED

";

}

 

return("Unknown state");

 

}

111

Page 111
Image 111
Agilent Technologies E4370A, E4371A, E4374A manual C Program Examples, Turn off the TEST light and turn on the READY light