Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone familiar with the HP Laser System 5501A?

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;
 }
0 Kudos
Message 21 of 22
(1,266 Views)
Ottoman,

I'm new to this, and you seem like the expert on HP 5501A lasers... did you get things working? I've run your VI and can read the GPIB, but get errors when trying to write. Did it work out for you? I have the 5501 laser head with 10780 receiver, 10760 counter, and 10745A IO box, and using an NI GPIB-USB-B interface.

Any tips and/or better script would help. Thanks!

space_madness
0 Kudos
Message 22 of 22
(1,146 Views)