EasyManuals Logo

Keysight Technologies E364 A Series User Manual

Keysight Technologies E364 A Series
255 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #172 background imageLoading...
Page #172 background image
Application Programs 5
E364xA User’s and Service Guide 171
void OpenPort()
{
char GPIB_Address[3];
char COM_Address[2];
char VISA_address[40]; /* Complete VISA address sent to card */
if(bGPIB)
strcpy(GPIB_Address,"5"); /* Select GPIB address between 0 to 30*/
else
strcpy(COM_Address,"1"); /* Set the number to 2 for COM2 port */
if(bGPIB)
{
/* For use with GPIB 7 address, use "GPIB::7::INSTR" address format */
strcpy(VISA_address,"GPIB::");
strcat(VISA_address,GPIB_Address);
strcat(VISA_address,"::INSTR");
}
else
{
/* For use with COM2 port, use "ASRL2::INSTR" address format *
strcpy(VISA_address,"ASRL");
strcat(VISA_address,COM_Address);
strcat(VISA_address,"::INSTR");
}
/* Open communication session with the power supply */
ErrorStatus = viOpenDefaultRM(&defaultRM);
ErrorStatus = viOpen(defaultRM,VISA_address,0,0,&power_supply);
CheckError("Unable to open port");
if(!bGPIB)
SendSCPI("System:Remote");
}
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);
}
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies E364 A Series and is the answer not in the manual?

Keysight Technologies E364 A Series Specifications

General IconGeneral
BrandKeysight Technologies
ModelE364 A Series
CategoryPower Supply
LanguageEnglish

Related product manuals