AnsweredAssumed Answered

Need help with Program Memory on B2902A

Question asked by sdarsh on Nov 30, 2011
Latest reply on Dec 6, 2011 by mkawasaki
Hi.  I have a B2902A and I am trying to implement a 3 point test on a diode and I want it to run as fast as possible.  In my test I want to measure the forward voltage Vf, the reverse breakdown voltage Vr, and the reverse leakage current Il.  I started by writing some simple code that would send each command to the instrument one at a time over GPIB.  My code includes a portion at the beginning for intial setup and then some code which I run in a loop to repeat the test over and over again.  My coding environment is LabVIEW 2011.

The commands I sent were as follows:

*CLS;
*RST;
:SYST:BEEP:STAT OFF;
:DISP:ENAB 0;
:SENS:REM ON;
:SENS:CURR:NPLC 0.01;
:SENS:VOLT:NPLC 0.01;
:SOUR:CURR:RANG:AUTO OFF;
:SOUR:VOLT:RANG:AUTO OFF;
:SOUR:WAIT:AUTO OFF;
:SOUR:WAIT OFF;
:SENSE:VOLT:RANG:AUTO OFF;
:SENSE:CURR:RANG:AUTO OFF;
:SENSE:WAIT:AUTO OFF;
:SENSE:WAIT OFF;
:FORM REAL,32;
:FORM:BORD NORM;
'Preset the SMU configuration to speed up the first iteration of the test
:SENS:VOLT:PROT 2.000000;
:SENS:VOLT:RANG 2.000000;
:SOUR:CURR:RANG 1.000000;
:SOUR:FUNC:MODE CURR;
:OUTP ON;

' Start looping the commands here
'============================
:SENS:VOLT:PROT 2.000000;
:SENS:VOLT:RANG 2.000000;
:SOUR:CURR:RANG 1.000000;
:SOUR:FUNC:MODE CURR;
:TRIG:ACQ:DEL 0.000100;
:SOUR:CURR:TRIG 1.000000;
:SENS:FUNC:OFF:ALL;
:SENS:FUNC 'VOLT';
:FORM:ELEM:SENS VOLT;
:READ?    ' Measure Vf
:SOUR:CURR:RANG -1.000000E-5;
:SENS:VOLT:PROT 200.000000;
:SENS:VOLT:RANG 200.000000;
:TRIG:ACQ:DEL 0.000600;
:SOUR:CURR:TRIG -1.000000E-5;
:READ?    ' Measure Vr
:SOUR:VOLT:RANG -50.000000;
:SENS:CURR:PROT 0.000100;
:SENS:CURR:RANG 0.000100;
:SOUR:FUNC:MODE VOLT;
:TRIG:ACQ:DEL 0.000000;
:SOUR:VOLT:TRIG -50.000000;
:SENS:FUNC:OFF:ALL;
:SENS:FUNC 'CURR';
:FORM:ELEM:SENS CURR;
:READ?    ' Measure Il
'============================
'End the loop here

:OUTP OFF;
:DISP:ENAB 1;



I ran the loop portion of the commands in a For loop 100 times and measured how long it took to run and found that the loop ran approximately 12 times per second.  I read that program memory should speed up code execution by eliminating the bus transfers of the individual commands and because the commands would be "pre-compiled" so to speak so I thought maybe if I use that I can get it to go faster.

Looking through the manual and trying it out I found that I couldn't just throw the loop commands into a program memory because query commands are not supported so the :READ? commands would have to go.  I changed the commands a little to support using the buffer and I would just retrieve the data at the end.  Again my code was broken up into an initial setup portion and a portion I would loop.

My program memory code looks as follows:

*CLS;
*RST;
:PROG:DEL:ALL;
:SYST:BEEP:STAT OFF;
:DISP:ENAB 0;
:SENS:REM ON;
:SENS:CURR:NPLC 0.01;
:SENS:VOLT:NPLC 0.01;
:SOUR:CURR:RANG:AUTO OFF;
:SOUR:VOLT:RANG:AUTO OFF;
:SOUR:WAIT:AUTO OFF;
:SOUR:WAIT OFF;
:SENSE:VOLT:RANG:AUTO OFF;
:SENSE:CURR:RANG:AUTO OFF;
:SENSE:WAIT:AUTO OFF;
:SENSE:WAIT Off;
:FORM REAL,32;
:FORM:BORD NORM;
:FORM:ELEM:SENS VOLT,CURR;
:SENS:VOLT:PROT 2.000000;
:SENS:VOLT:RANG 2.000000;
:SOUR:CURR:RANG 1.000000;
:SOUR:FUNC:MODE CURR;
:TRAC:FEED:CONT NEV;
:TRAC:CLE;
:TRAC:POIN 30;
:TRAC:FEED SENS;
:TRAC:FEED:CONT NEXT;

:PROG:NAME "diodetest";
:PROG:DEF #0:SENS:VOLT:PROT 2.000000;
:PROG:APP #0
:PROG:APP #0:SENS:VOLT:RANG 2.000000;
:PROG:APP #0:SOUR:CURR:RANG 1.000000;
:PROG:APP #0:SOUR:FUNC:MODE CURR;
:PROG:APP #0:TRIG:ACQ:DEL 0.000100;
:PROG:APP #0:SOUR:CURR:TRIG 1.000000;
:PROG:APP #0:SENS:FUNC:OFF:ALL;
:PROG:APP #0:SENS:FUNC 'VOLT';
:PROG:APP #0:INIT;
:PROG:APP #0:SOUR:CURR:RANG -1.000000E-5;
:PROG:APP #0:SENS:VOLT:PROT 200.000000;
:PROG:APP #0:SENS:VOLT:RANG 200.000000;
:PROG:APP #0:TRIG:ACQ:DEL 0.000600;
:PROG:APP #0:SOUR:CURR:TRIG -1.000000E-5;
:PROG:APP #0:INIT;
:PROG:APP #0:SOUR:VOLT:RANG -50.000000;
:PROG:APP #0:SENS:CURR:PROT 0.000100;
:PROG:APP #0:SENS:CURR:RANG 0.000100;
:PROG:APP #0:SOUR:FUNC:MODE VOLT;
:PROG:APP #0:TRIG:ACQ:DEL 0.000000;
:PROG:APP #0:SOUR:VOLT:TRIG -50.000000;
:PROG:APP #0:SENS:FUNC:OFF:ALL;
:PROG:APP #0:SENS:FUNC 'CURR';
:PROG:APP #0:INIT;

:OUTP ON;

' Start looping the code here
'=======================
:PROG:EXEC;
*OPC?
'=======================
' End looping the code here

:TRAC:DATA?
:OUTP OFF;
:DISP:ENAB 1;


Once again I ran the loop 100 times and timed it and this time I found the loop only ran about 8 times per second instead of 12.  It was actually slower!

My questions are the following:

  • What am I doing wrong?  Why is it slower?

  • Is there a way to get the program memory to run in a loop and maybe make it go faster?

  • In both versions of the test my SMU clicks a lot as if the interlock relays or the output relays are clicking on and off a lot, but my interlock is engaged the whole time.  I suspected it might be the switch between the high voltage and low voltage ranges, but when I re-ran the test being sure to use only the 20V range or lower it still made the clicks.  What are these clicks?

  • Is there anything else I can do to make this test run faster?

Outcomes