AnsweredAssumed Answered

Reading DMM without a timeout error

Question asked by Max003 on Jul 21, 2017
Latest reply on Aug 2, 2017 by tomc

I'm programming a Agilent/Keysight 34410A DMM using the VISA library.  To read the meter I use:

double ReadMeter(ViSession SessionID, int Delay)
    {        
        double result = 0;
        ViStatus viStatus;

        viStatus = viPrintf(SessionID, "READ?\n");
        if (Delay > 0)
            Sleep(Delay);
        viStatus = viScanf(SessionID,"%,10lf",&result);

        return result;

}

 

I'm putting in an arbitrary delay so the Scanf doesn't clobber the READ? and give an incomplete measurement error.

 

Question:  Is there any way to get a status word to detect that the value is ready to be read back?  That way I can get rid of the Delay.

Thanks

Outcomes