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 = viPrintf(SessionID, "READ?\n");
if (Delay > 0)
viStatus = viScanf(SessionID,"%,10lf",&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.