AnsweredAssumed Answered

53210A Problems with communication over GPIB

Question asked by weicher on Jan 11, 2012
Latest reply on Jan 27, 2012 by weicher

Some years ago I made a DLL for the 53132A Counter. With this DLL, the 53132A Counter, the NI GPIB and a gate time of 40mSec we can make a single frequency measurement within ~60mSec.

We use the counters on the machines in our crystal tuning fork production, speed an reliability are a absolute must!

On Monday I got the first 53210A Counter and I'm not able to get it to work :-(

It seems not possible to build up the complete programming string and send this string to the counter.
So I tried the following programming sequence:

MC_METHOD_IMP THP53210A::Reset ()
     bool res = false;
          res = mGpib->DeviceClear (mDevice);
          if (res)
               res = mGpib->Send (mDevice, "*RST;*CLS;*SRE 0;*ESE 0;:STAT:PRES");

          if (!res)
               gError->DoSetError (ErrorStr().c_str(), "Counter::Reset");

          res = mGpib->Local (mDevice);

          CloseGpib ();
     catch (...)
          return false;

     return res;

OpenGpib ();
mGpib->Send (mDevice, "CALC:STATE OFF");
mGpib->Send (mDevice, "CONF:FREQ 3.276800e+004,DEF");  // depends on user parameter
mGpib->Send (mDevice, "INP:PROB 1;IMP 50;COUP AC;FILT:LPASS:STATE OFF"); // depends on user setting
mGpib->Send (mDevice, "SENSE:FREQ:GATE:POL POS;TIME 4.000e-002");  // depends on user setting
mGpib->Send (mDevice, "SENS:ROSC:SOUR INT");  // depends on user setting
mGpib->Send (mDevice, "FORM:DATA ASCii");
mGpib->Send (mDevice, "DISP:WIND:STAT ON"); // depends on user setting
mGpib->Send (mDevice, "TRIG:SOUR BUS"); // automatic: BUS, manual: IMM
mGpib->Send (mDevice, "*SRE 16;*ESE 0;*OPC"); // automatic: "*SRE 16;*ESE 0;*OPC", manual: "*SRE 0;*ESE 0;*OPC"

The counter reports no error after this code.

Sometimes the Reset Function is not able to reset the counter. I have to switch off and on the counter (that is NOT acceptable).

It seems that the commands must be in a strict order.
ex. If I send the "TRIG:SOUR BUS" command after "CALC:STATE OFF" then the question "TRIG:SOUR?" after the above code returns "IMM".

My first try to trigger a measurement was with the GPIB GET command (ibtrg) -> "trigger ignored".

Then I did "INIT;*TRG;FETC?" then I could make a measurement. But it's so slow that it's unusable.

Since I can not believe that Agilent produces a Counter which is unusable, I must do something completly wrong.
Can please somebody or other help me to get this thing to work?

Best regards