Technical data

5 Application Programs
Example Program for C and C++
140 E364xA User’s and Service Guide
strcpy(pString,ReadBuffer);
}
}
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