AnsweredAssumed Answered

E3631 Power Supply SCPI "Query INTERRUPTED" error

Question asked by prodeng on Feb 27, 2009
Latest reply on Apr 29, 2010 by mfgdiag
Hello All,
I'm programming in VISA using the RS232 port of the E3631 for instrument control. When i send a query to the power supply sometimes i get the "Query INTERRUPTED" error, this happens about 50% of the time. Here is a sample of my query of the error queue:

     char buf [256] = {0};
     /* error status */
     ViStatus errstat;
     /* Initialize VISA system */
     viOpenDefaultRM (&defaultRM);
     /* open DC Power Supply session on RS-232 port */
     viOpen (defaultRM, "ASRLInstrument", VI_NULL,VI_NULL, &vi_pwr);

     viPrintf(vi_pwr, "SYST:REMOTE\n"); //set remote mode
     // Check that error queue is cleared
     errstat = viPrintf (vi_pwr, "SYST:ERR?\n");
     if (errstat != VI_SUCCESS)
          printf ("send SYST:ERR? error: %x\n", errstat);

     errstat = viScanf (vi_pwr, "%t\n", &buf);
     if (errstat != VI_SUCCESS)
          printf ("receive SYST:ERR? error: %x\n", errstat);
     
     printf ("SYST:ERR? = %s\n", buf);


Any suggestion will be appreciated. The SCPI description did not really help me out, it states that there might be data previously in the buffer before the query but i have not requested any data.  

Outcomes