5 Application Programs
164 E364xA User’s and Service Guide
void ClosePort()
{
/* Close the communication port */
viClose(power_supply);
viClose(defaultRM);
}
void CheckError(char* pMessage)
{
if (ErrorStatus VI_SUCCESS)
{
printf("\n %s",pMessage);
ClosePort();
exit(0);
}
}
void delay(clock_t wait)
{
clock_t goal;
goal = wait + clock();
while( goal > clock() ) ;
}
End of program