EasyManua.ls Logo

Labsphere SC-5500 - IEEE-488 Programming in QuickBasic

Labsphere SC-5500
44 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SX-01635-000, Rev. 5 33
strcat(tempstr,"X");
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,tempstr,strlen(tempstr),0);
}
void go_to_cal(int cal)
{
//cal 0 is detector voltage, cal 1 is detector current, all other cals are setable only at the factory
//the maximum number of calibrations is 99
char tempstr[10],junk[10];
memset(tempstr,'\0',10);
memset(junk,'\0',10);
strcpy(tempstr,"C");
strcat(tempstr,itoa(cal,junk,10));
strcat(tempstr,"X");
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,tempstr,strlen(tempstr),0);
}
void SelectDetector_1()
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"P1J1K2K3K4K5K6K7K8X",19,0);
}
void SelectDetector_2()
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"P1J1K2J3K4K5K6K7K8X",19,0);
}
float get_sc_reading(void)
{
void *buffer;
float reading;
char tempstr[25];
memset(tempstr,'\0',25);
buffer=&tempstr;
SendIFC(gpib_card);
//the Receive command will read up to 25 characteres until 0x0a (decimal 10) is
//recieved. The SC-5500 sends back an 0x0d 0x0a after each reading.
//Reading the data in this manner allows this function to work in both 3 1/2 and 4 1/2 digit mode
Receive(gpib_card,sc_5500_address,buffer,25,10);
reading=atof(tempstr);
return reading;
}
void set_all_low(void)
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"P1K1K2K3K4K5K6K7K8X",19,0);
Send(gpib_card,sc_5500_address,"P2K1K2K3K4K5K6K7K8X",19,0);
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com