Application Programs
6
Keysight E3633A and E3634A User’s Guide
175
void SendSCPI(char* pString)
{
char* pdest;
strcpy(commandString,pString);
strcat(commandString,"\n");
ErrorStatus = viPrintf(power_supply,commandString);
CheckError("Can’t Write to Driver");
if (bGPIB == 0)
delay(1000);
/* Unit is milliseconds
*/
pdest = strchr(commandString, ’?’);
/* Search for query command
*/
if( pdest != NULL )
{
ErrorStatus = viScanf(power_supply,"%s",&ReadBuffer);
CheckError("Can’t Read From Driver");
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
Summary of Contents for E3633A
Page 1: ...Keysight E3633A and E3634A DC Power Supplies User s Guide ...
Page 10: ...10 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Page 18: ...18 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Page 20: ...20 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Page 133: ...Remote Interface Reference 4 Keysight E3633A and E3634A User s Guide 133 SCPI Status System ...