Page 1
Keysight B2980 Series Femto/Picoammeter Electrometer/High Resistance Meter Programming Guide...
Page 2
Search field. ability and fitness for a particular pur- Ed ition pose. Keysight shall not be liable for Latest Information errors or for incidental or consequential Edition 1, September 2014...
Page 4
• “Programming Examples” See Keysight B2980 User's Guide for information about the B2980 itself. Refer to Keysight B2980 SCPI Command Reference for the SCPI messages and conventions, data output format, error code, and the details on Keysight B2980 SCPI commands.
Page 8
Controlling Keysight B2980 This chapter describes basic information to control Keysight B2980, and consists of the following sections. • “Before Starting” • “Controlling Various Functions” • “Controlling the Measurement Function” • “Controlling the Source Output” • “Using the Math Function”...
Select the interface used for controlling the B2980. Connect your interface cable to the appropriate interface connector. For the information on configuring the interfaces, see Keysight B2980 Series User’s Guide. Keysight B2980 Programming Guide, Ed ition 1...
Page 10
Where, xxx.yyy.zzz.aaa is the IP Address displayed on the LAN Configuration dialog box opened by pressing the System Menu > More > I/O > LAN > Config function keys. Example: address = "TCPIP0::192.168.0.1::5025::SOCKET" 1- 4 Keysight B2980 Programming Guide, Ed ition 1...
“Making a Screen Dump” • “Performing a File Operation” Setting the Power Frequency Power line frequency is set by the :SYST:LFR command. Example ioObj.WriteString(":SYST:LFR 50") ’50 Hz ioObj.WriteString(":SYST:LFR 60") ’60 Hz ioObj.WriteString(":SYST:LFR:DET:AUTO") ’Automatic Detection Keysight B2980 Programming Guide, Ed ition 1 1- 5...
Page 12
Performing the Self-Calibration Self-calibration is performed by the *CAL? command. The *CAL? command also returns the execution result. Before performing the self-calibration, disconnect test leads and cables from the channel terminals. 1- 6 Keysight B2980 Programming Guide, Ed ition 1...
Page 13
Example ioObj.WriteString(":SYST:ERR:ALL?") Dim d As String = ioObj.ReadString() Console.WriteLine(d) If the error buffer is empty, the response is +0,“No error”. Keysight B2980 Programming Guide, Ed ition 1 1- 7...
Page 14
*IDN? command. Example ioObj.WriteString("*IDN?") Dim d As String = ioObj.ReadString() Console.WriteLine(d) The returned value will be as follows. Keysight Technologies,model,serial,revision model: mainframe model number serial: mainframe serial number revision: firmware revision number 1- 8 Keysight B2980 Programming Guide, Ed ition 1...
Page 15
Example ioObj.WriteString(":MMEM:CAT?") ’Gets file catalog s = ioObj.ReadString() ioObj.WriteString(":MMEM:STOR:DATA ""test.dat""") ’Saves data ioObj.WriteString("*OPC?") : s = ioObj.ReadString() ioObj.WriteString(":MMEM:STOR:STAT ""test.sta""") ’Saves status ioObj.WriteString("*OPC?") : s = ioObj.ReadString() ioObj.WriteString(":MMEM:LOAD:STAT ""test.sta""") ’Loads status Keysight B2980 Programming Guide, Ed ition 1 1- 9...
Controlling Keysight B2980 Controlling the Measurement Function Controlling the Measurement Function This section describes how to control the measurement function of Keysight B2980. • “Enabling the Current/Charge Measurement” • “Setting the Measurement Mode” • “Performing Spot Measurement” • “Setting the Measurement Speed”...
Page 17
NOTE If you want to use arm trigger, use the :ARM<:ACQ | [:ALL]>:SOUR, :ARM<:ACQ | [:ALL]>:TIM, :ARM<:ACQ | [:ALL]>:COUN, and :ARM<:ACQ | [:ALL]>:DEL commands. For more details, see SCPI Command Reference. Keysight B2980 Programming Guide, Ed ition 1 1- 11...
Page 18
To specify the data to obtain, use the :FORM:ELEM:SENS command for the measurement data or the :FORM:ELEM:CALC command for the calculation data. Stopping Measurement Measurement is stopped by the :ABOR command. Example ioObj.WriteString(":ABOR") 1- 12 Keysight B2980 Programming Guide, Ed ition 1...
Controlling Keysight B2980 Controlling the Source Output Controlling the Source Output This section describes how to control the source output of Keysight B2985 and B2987. • “Enabling the Source Output” • “Applying the DC Voltage” • “Stopping the Source Output”...
Page 20
Linear Sweep :SWE:SPAC LIN Setting the Sweep Output Staircase sweep output is set by the :SOUR:VOLT:MODE SWE command, the :SOUR:VOLT:<POIN|STEP> or :SOUR:SWE:POIN command, and the :SOUR:VOLT:<STAR|STOP> or :SOUR:VOLT:<CENT|SPAN> command. See Figure 1-1. 1- 14 Keysight B2980 Programming Guide, Ed ition 1...
Page 21
:TRIG<:TRAN | [:ALL]>:TIM, :TRIG<:TRAN | [:ALL]>:COUN, and :TRIG<:TRAN | [:ALL]>:DEL commands. See Figure 1-3. Example ioObj.WriteString(":TRIG:SOUR TIM") ’Interval 4 ms ioObj.WriteString(":TRIG:TIM 4E-3") ioObj.WriteString(":TRIG:COUN 11") ’11 points ioObj.WriteString(":TRIG:TRAN:DEL 1E-3") ’Source delay 1 ms Keysight B2980 Programming Guide, Ed ition 1 1- 15...
Page 22
OFF") ioObj.WriteString(":OUTP:LOW GRO") ’Ground ioObj.WriteString(":OUTP ON") Specifying the Output-Off Status Output-off status is set by the :OUTP:OFF:MODE command. Example ioObj.WriteString(":OUTP:OFF:MODE ZERO") ’Zero volt ioObj.WriteString(":OUTP:OFF:MODE HIZ") ’High impedance ioObj.WriteString(":OUTP:OFF:MODE NORM") ’Normal 1- 16 Keysight B2980 Programming Guide, Ed ition 1...
Reading Mass Result Data Mass result data is read by the :CALC:MATH:DATA? commands. Example ioObj.WriteString(":CALC:MATH:DATA:LAT?") ’Latest data ioObj.WriteString(":CALC:MATH:DATA?") ’All data NOTE To specify the data to obtain, use the :FORM:ELEM:CALC command. Keysight B2980 Programming Guide, Ed ition 1 1- 17...
:SOUR:VOLT command. 8. Read limit test result. See “Reading Limit Test Result” on page 1-19. For the programming example, see “Pass/Fail Judgement and Math Function” on page 2-23. 1- 18 Keysight B2980 Programming Guide, Ed ition 1...
Page 25
Fail status of the individual limit test is read by the :CALC:LIM:FAIL? command. Example ioObj.WriteString(":CALC:DATA:LAT?") ’Latest data ioObj.WriteString(":CALC:DATA?") ’All data ioObj.WriteString(":CALC:LIM:FAIL?") ’1:failed, 0:passed NOTE To specify the data to obtain, use the :FORM:ELEM:CALC command. Keysight B2980 Programming Guide, Ed ition 1 1- 19...
CALC CALC:MATH:DATA? Limit Test TIME STAT Offset Binning CALC CALC:DATA? TIME STAT Trace Feeding VOLT MEAN CURR CHAR SDEV CALC TIME Binning PKPK STAT TEMP SOUR TRACe:DATA? TRACe:STAT:DATA? TRACe :BIN :DATA? 1- 20 Keysight B2980 Programming Guide, Ed ition 1...
Page 27
MEAN: Mean value • SDEV: Standard deviation • PKPK: Peak to peak value • MIN: Minimum value • MAX: Maximum value Example ioObj.WriteString(":TRAC:DATA?") ’Reads all data ioObj.WriteString(":TRAC:STAT:FORM MEAN") ioObj.WriteString(":TRAC:STAT:DATA?") ’Reads statistical data Keysight B2980 Programming Guide, Ed ition 1 1- 21...
STOP to change it to stopped, or STEP to perform step execution. Example ioObj.WriteString(":PROG:NAME ""sample""") ioObj.WriteString(":PROG:EXEC") ioObj.WriteString("*OPC?") : s = ioObj.ReadString() ioObj.WriteString(":PROG:NAME ""sample""") ioObj.WriteString(":PROG:STAT RUN") ioObj.WriteString("*OPC?") : s = ioObj.ReadString() ioObj.WriteString(":PROG:STAT STOP") 1- 22 Keysight B2980 Programming Guide, Ed ition 1...
Page 30
If you create the measurement program by using the example code shown in Table 2-1, the program can be run by clicking the Run button on the Visual Basic main window. 2- 2 Keysight B2980 Programming Guide, Ed ition 1...
“To Create Your Project Template” • “To Create Measurement Program” NOTE To execute the example programs in this chapter, you need to install Keysight GPIB interface, Keysight IO Libraries Suite, and Microsoft Visual Basic .NET on your computer. To Create Your Project Template Before starting programming, create your project template, and keep it as your reference.
Page 32
Step 6. Open the module that contains the template code as shown in Table 2-1. On the code window, complete the B2900control subprogram. Step 7. Insert the code to display, store, or calculate data into the subprogram. Step 8. Save the project (e.g. \test\dev_a\spot1V). 2- 4 Keysight B2980 Programming Guide, Ed ition 1...
Page 33
Beginning of the Main subprogram. And defines the variables used in this program. 9 to 20 Establishes the connection with the B2980 specified by the GPIB address ifAddress=23 on the interface GPIB0. Keysight B2980 Programming Guide, Ed ition 1 2- 5...
Page 34
Saves the result data to a file specified by filename. 29 to 35 Breaks the connection with the B2980. 37 to 39 B2900control subprogram. Measurement program code should be entered here. 2- 6 Keysight B2980 Programming Guide, Ed ition 1...
[:SENS:]func:NPLC value Enables/disables Ammeter :INP <ON | OFF> input Enables/disables Voltage :OUTP <ON | OFF> Source output Initiates measurement and :MEAS? reads result data (latest data) :MEAS:func? Measurement Result: +3.034160E-02 Result Example Keysight B2980 Programming Guide, Ed ition 1 2- 7...
Page 36
Sets the current measurement function and the auto range measurement. And sets the aperture time to 0.1 PLC. Enables the output and starts source output. Enables the input. 26 to 28 Reads the measurement result data. 2- 8 Keysight B2980 Programming Guide, Ed ition 1...
Sets aperture time in seconds or by [:SENS:]func:APER time using NPLC value [:SENS:]func:NPLC value Selects trigger source :TRIG<:ACQ | :TRAN | [:ALL]>:SOUR source Sets interval of timer trigger :TRIG<:ACQ | :TRAN | [:ALL]>:TIM time Keysight B2980 Programming Guide, Ed ition 1 2- 9...
Page 38
VOLT for voltage data, CURR for current data, CHAR for charge date, RES for resistance data, SOUR for source output data, STAT for status data, or TIME for time data. Measurement Result: +1.842730E-07,+6.775910E-03,+1.519010E-02,+2.277660E-02,+ 3.036230E-02 Result Example 2- 10 Keysight B2980 Programming Guide, Ed ition 1...
Page 39
Defines the file name used for saving the result data. Resets the B2980. 7 to 11 Sets the voltage sweep output function. And sets the sweep output from 0 to 0.1 V in 0.02 V step (5 points). Keysight B2980 Programming Guide, Ed ition 1 2- 11...
Page 40
Sets the trigger source to AINT (automatic trigger). And sets the trigger count to 5 to perform a 5-step staircase sweep measurement. Enables the output and starts source output (0 V with the default setting). 2- 12 Keysight B2980 Programming Guide, Ed ition 1...
Page 41
Catch ex As Exception Console.WriteLine("An error occurred: " + ex.Message) End Try End Sub Line Description Enabled the input for current measurement. Starts staircase sweep measurement. 39 to 40 Reads the measurement result data. Keysight B2980 Programming Guide, Ed ition 1 2- 13...
:TRIG<:ACQ | :TRAN | [:ALL]>:TIM time Sets trigger count :TRIG<:ACQ | :TRAN | [:ALL]>:COUN value Sets trigger delay time :TRIG<:ACQ | :TRAN | [:ALL]>:DEL time Enables/disables Ammeter input :INP <ON | OFF> 2- 14 Keysight B2980 Programming Guide, Ed ition 1...
Page 43
VOLT for voltage data, CURR for current data, RES for resistance data, SOUR for source output data, STAT for status data, or TIME for time data. Measurement Result: +9.121600E-03,+1.822320E-02,+3.036130E-02 Result Example Keysight B2980 Programming Guide, Ed ition 1 2- 15...
Page 44
Defines the file name used for saving the result data. Resets the B2980. 7 to 9 Sets the voltage list sweep output function. And sets the list sweep output 0.03 V, 0.06 V, and 0.1 V (3 points). 2- 16 Keysight B2980 Programming Guide, Ed ition 1...
Page 45
Sets the aperture time to 0.1 PLC 20 to 21 Sets the trigger source to AINT (automatic trigger). And sets the trigger count to 3to perform a 3-step list sweep measurement. Keysight B2980 Programming Guide, Ed ition 1 2- 17...
Page 46
Enables the channel. And starts source output (0 V with the default setting). Enabled the input for current measurement. Starts list sweep measurement. 37 to 38 Reads the measurement result data. 2- 18 Keysight B2980 Programming Guide, Ed ition 1...
:TRIG<:ACQ | :TRAN | [:ALL]>:DEL time Enables/disables Ammeter input :INP <ON | OFF> Enables/disables Voltage Source :OUTP <ON | OFF> output Initiates specified action :INIT<:ACQ | :TRAN | [:ALL]> Reads result data (array data) :FETC:ARR? :FETC:ARR:type? Keysight B2980 Programming Guide, Ed ition 1 2- 19...
Page 48
VOLT for voltage data, CURR for current data, RES for resistance data, SOUR for source output data, STAT for status data, or TIME for time data. Measurement Result: +3.036250E-02,+3.036240E-02,+3.036190E-02,+3.036210E-02,+ 3.036300E-02,+3.036270E-02 Result Example 2- 20 Keysight B2980 Programming Guide, Ed ition 1...
Page 49
Defines the file name used for saving the result data. Resets the B2980. 7 to 9 Sets the current measurement function and the fixed range measurement. 12 to 13 Sets the aperture time to 0.1 PLC. Keysight B2980 Programming Guide, Ed ition 1 2- 21...
Page 50
Sets the timer trigger source. And sets the timer interval to 4 ms, and the trigger count to 6 to perform a 6-point sampling measurement. Enables the Ammeter input. Starts sampling measurement. 34 to 35 Reads the measurement result data. 2- 22 Keysight B2980 Programming Guide, Ed ition 1...
Asks limit test result pass or fail :CALC:LIM:FAIL? type is VOLT for voltage measurement data, CURR for current measurement data, CHAR for charge measurement data, RES for resistance measurement data, or MATH for math result data. Keysight B2980 Programming Guide, Ed ition 1 2- 23...
Page 52
Enables POWER math function. 26 to 28 Enables composite limit test of grading mode. 31 to 35 Enables limit test 1 which judges if POWER is between -5 mW and +5 mW. 2- 24 Keysight B2980 Programming Guide, Ed ition 1...
Page 53
Waits for operation complete. And write “*OPC?: 1” on the console window when the operation is completed. 59 to 60 Reads the measurement result data. 63 to 70 Reads the judgement result. And write “PASS” or “FAIL” on the console window. Keysight B2980 Programming Guide, Ed ition 1 2- 25...
Page 54
Programming Examples Pass/Fail Judgement and Math Function Measurement Result: -1.172735E-12,+5.042879E-08,+1.943762E-07,+4.422486E-07,+7.842360 Result Example E-07,+1.231724E-06,+1.758310E-06,+2.414372E-06,+3.137176E-06,+3.9 86594E-06,+4.897826E-06,+5.953960E-06,+7.072061E-06,+8.307558E-06 ,+9.611092E-06,+1.106005E-05,+1.258392E-05,+1.420136E-05,+1.59113 6E-05,+1.773358E-05,+1.967062E-05 2- 26 Keysight B2980 Programming Guide, Ed ition 1...
RUN to change to the running status, PAUS to change to the paused status, CONT to change to the running status, STOP to change to the stopped status, or STEP to perform step execution. Keysight B2980 Programming Guide, Ed ition 1 2- 27...
Page 56
0.1 PLC. Gets the program length (number of characters in the “program” variable). 26 to 27 Stores the program code to the program memory as the program name “sample”. 2- 28 Keysight B2980 Programming Guide, Ed ition 1...
Page 57
Waits for operation complete. And write “*OPC?: 1” on the console window when the operation is completed. 43 to 44 Reads the measurement result data. Measurement Result: -7.480000E-05,+6.524500E-03,+1.311680E-02,+1.971080E-02,+ 2.630190E-02,+3.289570E-02,+3.948990E-02,+4.607940E-02,+5.266580E Result Example -02,+5.926410E-02,+6.585490E-02,+7.244700E-02,+7.903250E-02,+8.56 2770E-02,+9.221940E-02,+9.880730E-02,+1.053949E-01,+1.119873E-01, +1.185849E-01,+1.251736E-01,+1.317632E-01 Keysight B2980 Programming Guide, Ed ition 1 2- 29...
NORM for the normal byte order from byte 1 to byte 4 or 8, or SWAP for the reverse byte order from byte 4 or 8 to byte 1. Measurement Result: V (V), I (A), Time (sec), Status: -5.88E-05,2.85297E-06,0 .021938,21120.0222637,0.006749,0.030997,36480.0499995,0.0151897,0 Result Example .037096,41600.0750008,0.022776,0.041071,41600.0999998,0.0303624,0 .045048,4160 2- 30 Keysight B2980 Programming Guide, Ed ition 1...
Page 59
5 to 23 Reads the measurement result data in the ASCII format. 28 to 44 Reads the measurement result data in the REAL,64 format. Keysight B2980 Programming Guide, Ed ition 1 2- 31...
| CURRent | STARt (default). size is the number of data to be received. Measurement Data(1) -1.282000E-12,+4.999999E+00 Result Example Data(2) -6.000000E-14,+1.500000E+01 Data(3) +7.760000E-13,+2.500000E+01 2- 32 Keysight B2980 Programming Guide, Ed ition 1...
Page 61
Set 2 nA fixed ranging current measurement. 10 to 11 Set 0.1 PLC measurement speed. 17 to 19 Set 3 points measurement with 10 seconds period. Turn on input switch for current measurement. Keysight B2980 Programming Guide, Ed ition 1 2- 33...
Page 62
Line Description Set timestamp to be reset automatically by INITiate command. Initiate acquire trigger system. Set data query format to current and timestamp. Query one measurement result without waiting operation complete. 2- 34 Keysight B2980 Programming Guide, Ed ition 1...