someone else have used C++ to control 5508A, It has worked well
the following is the code about the ie488 and laser read subroutine.
I don't understand ieseg(0xd000); ieinit(0x2b8,21,0);
what's 0xd000 and 0x2b8,21,0? as for Labview, what is related with them?
and I have try the command RS and M1RC by visa write and read, It's no response.
#define LMaddr 23
////////////////////////////////////////
void reset_laser()
{
char *cmdstr;
char *outstr;
outstr="RS";
ieseg(0xd000);
ieinit(0x2b8,21,0);
iedevclr(LMaddr);
ieoutput(LMaddr,outstr,strlen(outstr));
}
////////////////////////////////////////////////
float getlaser()
{
char * outstr,*instr;
float finstr;
instr =new char[21];
outstr="M1RC";
ieseg(0xd000);
ieinit(0x2b8,21,0);
iedevclr(DVMaddr);
iedevclr(CounterAddr);
ieoutput(LMaddr,outstr,strlen(outstr));
ieenter(LMaddr,instr,20);
instr[strlen(instr)-1]='\0';
finstr=atof(instr);
delete instr;
return finstr;
}