AnsweredAssumed Answered

E3631A - GPIB Programming - Beep and frozen Display

Question asked by Amtschuk on Sep 2, 2010
Latest reply on Oct 11, 2010 by soonchei
Hi,

I am programming a E3631A via GPIB (Agilent 82357A GPIB-USB Adapter) in Matlab. During tests of the function in a for loop I found that
(1) the power supply makes beep once in a while although no error is thrown (test via 'SYST:ERR' -> answer: 'No error')
(2) after some hundred executions matlab throws an error due to a timeout during fopen
"Warning: GPIB: AGILENT: A timeout occurred. Error could be due to bad device address or state."
Then it is necessary to press a button on the Power supply to get a successfull fopen again. Sometimes even the display of the E3631A switches off.

Any hints what that could be?
Below my code. I tried *opc? and polling *opc also at some points in the code but that didn't help either

Yours,

Amtschuk



% Create GPIB-Object
    GPIB_Addr = 5;
    Board_Index = 7;
    E3631A = gpib('AGILENT', Board_Index, GPIB_Addr);
 
% Open Communication
    fopen(E3631A);      

% Clear Power supply and wait for pending ops      
    fprintf(E3631A,'*CLS')
    fprintf(E3631A,'*ESE 1')   
    query(E3631A,'*OPC?');
   
% Set values of the output ports  
    fprintf(E3631A,'APPL P25V, 15, 0.2')   
    fprintf(E3631A,'OUTP ON') 
  
% Clean up
    fclose(E3631A)
    delete(E3631A)
    clear E3631A

Outcomes