![Labsphere SC-5500 Manual Download Page 37](http://html1.mh-extra.com/html/labsphere/sc-5500/sc-5500_manual_3204784037.webp)
SX-01635-000, Rev. 5
34
Send(gpib_card,sc_5500_address,"P3K1K2K3K4K5K6K7K8X",19,0);
Send(gpib_card,sc_5500_address,"P4K1K2K3K4K5K6K7K8X",19,0);
}
void set_all_high (void)
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"P1J1J2J3J4J5J6J7J8X",19,0);
Send(gpib_card,sc_5500_address,"P2J1J2J3J4J5J6J7J8X",19,0);
Send(gpib_card,sc_5500_address,"P3J1J2J3J4J5J6J7J8X",19,0);
Send(gpib_card,sc_5500_address,"P4J1J2J3J4J5J6J7J8X",19,0);
}
void set_port (int port, int position)
{
//This sequence sets up the SC-5500 control ports to control the VAC-1000. The second argument is the
//attenuator position, 0 through 255, you want the attenuator to assume
char bit_values[25],position_values[25],temptr[25],junk[25],attenuator_values[25];
int i,j;
memset(bit_values,'\0',25);
memset(position_values,'\0',25);
memset(attenuator_values,'\0',25);
memset(tempstr,'\0',25);
memset(junk,'\0',25);
strcpy(tempstr,"P");
strcat(tempstr,itoa(port,junk,10));
itoa(position, position_values, 2);
j=strlen(position_values);
for(i=1;i<=j;i++)
{
bit_values[i-1]=position_values[j-i];
}
for(i=j;i<8;i++)
{
bit_values[i]='0';
}
for(i=0;i<8;i++)
{
if(bit_values[i]=='0')
{
strcat(tempstr,"K");
}
else
{
strcat(tempstr,"J");
}
strcat(tempstr,itoa(i+1,junk,10));
}
strcat(tempstr,"X");
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,tempstr,strlen(tempstr),0);
switch(port)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com