background image

Keysight B2980 Programming Guide, Edition 1

1- 21

Controlling Keysight B2980

Using the Trace Buffer

Setting the Trace Buffer

Trace buffer is set by the :TRAC commands.

Example

ioObj.WriteString(":TRAC:CLE")            ’Clears trace buffer

ioObj.WriteString(":TRAC:POIN 1000")      ’Sets buffer size

ioObj.WriteString(":TRAC:FEED SENS")      ’Specifies data to feed

ioObj.WriteString(":TRAC:FEED:CONT NEXT") ’Enables write buffer

ioObj.WriteString(":TRAC:TST:FORM DELT")

NOTE

The :TRAC:TST:FORM command is used to specify the timestamp data format, 
delta (DELT) or absolute (ABS).

To specify the data to collect, use the :FORM:ELEM:SENS command for the 
measurement data or the :FORM:ELEM:CALC command for the calculation data. 

Reading the Trace Data

All data in the trace buffer is read by the :TRAC:DATA? command.

Statistical data of the data stored in the trace buffer is read by the 
:TRAC:STAT:DATA? command. Previously, the type of the statistical data to read 
must be selected by the :TRAC:STAT:FORM command.

The :TRAC:STAT:FORM command selects one from the following statistical data.

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

Summary of Contents for B2980 Series

Page 1: ...Keysight B2980 Series Femto Picoammeter Electrometer High Resistance Meter Programming Guide...

Page 2: ...he separate agreement shall control Technology Licenses The hardware and or software described in this document are furnished under a license and may be used or copied only in accor dance with the ter...

Page 3: ......

Page 4: ...er and consists of the following chapters Controlling Keysight B2980 Programming Examples See Keysight B2980 User s Guide for information about the B2980 itself Refer to Keysight B2980 SCPI Command Re...

Page 5: ...ut 1 13 Using the Math Function 1 17 Performing the Limit Test 1 18 Using the Trace Buffer 1 20 Using Program Memory 1 22 2 Programming Examples Preparations 1 3 Spot Measurements 1 7 Staircase Sweep...

Page 6: ...Keysight B2980 Programming Guide Edition 1 Contents...

Page 7: ...1 Controlling Keysight B2980...

Page 8: ...ific form of numerical data Vertical bar Vertical bars separate alternative parameters For example VOLT CURR indicates that either VOLT or CURR can be used as a parameter Square brackets Items within...

Page 9: ...this manual use the following software Install the software to your computer to execute the programming examples Keysight IO Libraries Suite software Microsoft Visual Basic NET software Connecting to...

Page 10: ...nt control ioObj IO Close End Sub The address value depends on the interface as shown below For using the GPIB interface The address value is the VISA GPIB Connect String displayed on the GPIB Configu...

Page 11: ...Performing the Self Test Performing the Self Calibration Setting the Operations at Power On Reading an Error Message Clearing the Error Buffer Reading Timestamp Clearing Timestamp Setting the Automat...

Page 12: ...ATE command And time is set by the SYST TIME command Example ioObj WriteString SYST DATE 2011 1 1 Y M D ioObj WriteString SYST TIME 23 59 59 H M S Performing the Self Test Self test is performed by th...

Page 13: ...ry Example ioObj WriteString PROG PON COPY program1 ioObj WriteString PROG PON RUN ON This example sets program1 to the power on program and enables the function Reading an Error Message Error message...

Page 14: ...of Timestamp Automatic clear of timestamp is enabled disabled by the SYST TIME TIM COUN RES AUTO command If this function is enabled the timestamp is cleared when the initiate action occurs Example io...

Page 15: ...ock Ivi Visa Interop IEEEBinaryType Binary Type_UI1 False True Dim dataSize As Integer data Length Dim dumpname As String execution result screendump1 jpg Using stream As New FileStream dumpname FileM...

Page 16: ...ing Measurement Enabling the Current Charge Measurement The current charge measurement is enabled by the INP ON command Example ioObj WriteString INP ON Setting the Measurement Mode Measurement mode i...

Page 17: ...n is set by the SENS CURR VOLT RES RANG AUTO ULIM command For charge measurement the auto range operation is set by the SENS CHAR RANG AUTO GRO command Example ioObj WriteString SENS CURR RANG AUTO OF...

Page 18: ...1 15 and Setting the Measurement Trigger on page 1 11 4 Enable the channel See Enabling the Current Charge Measurement on page 1 10 The channel starts output set by the SOUR VOLT command 5 Execute th...

Page 19: ...t Sweep Output Setting the Source Output Trigger Setting the Low Terminal State Specifying the Output Off Status NOTE The string SOUR in the command string described in this manual can be omitted For...

Page 20: ...1000 1000 V range Setting the Sweep Operation For the variety of sweep output operation see Figure 1 2 Sweep direction upward or downward is set by the SOUR SWE DIR command Sweep mode single or double...

Page 21: ...LIN steps ioObj WriteString SOUR SWE RANG FIX Not change Setting the List Sweep Output List sweep output is set by the SOUR VOLT MODE LIST command and the SOUR LIST VOLT command Example ioObj WriteStr...

Page 22: ...Low terminal state ground or floating is set by the OUTP LOW command Example ioObj WriteString OUTP OFF ioObj WriteString OUTP LOW GRO Ground ioObj WriteString OUTP ON Specifying the Output Off Status...

Page 23: ...oObj WriteString CALC MATH UNIT V Deleting an User Defined Mass Expression Mass expression is deleted by the CALC MATH EXPR DEL commands The commands do not delete the predefined mass expression Examp...

Page 24: ...the individual limit tests See Setting Individual Limit Tests on page 1 19 5 Set the trigger condition See Setting the Source Output Trigger on page 1 15 and Setting the Measurement Trigger on page 1...

Page 25: ...nction for cancelling the offset value from the measurement data automatically use the CALC OFFS commands See SCPI command reference Setting Individual Limit Tests Individual limit test is set by the...

Page 26: ...er Reading the Trace Data Figure 1 4 Trace Buffer and Data Flow Sense Current Charge Voltage Limit Test MATH CALC MATH DATA CALC DATA Trace TRACe DATA VOLT CURR RES TIME STAT SOUR CALC TIME STAT Offse...

Page 27: ...fy the data to collect use the FORM ELEM SENS command for the measurement data or the FORM ELEM CALC command for the calculation data Reading the Trace Data All data in the trace buffer is read by the...

Page 28: ...nds Example ioObj WriteString PROG DEL ALL Deletes all ioObj WriteString PROG NAME sample1 ioObj WriteString PROG DEL Deletes sample1 Controlling the Program Operation Memory program is controlled by...

Page 29: ...2 Programming Examples...

Page 30: ...urement NOTE About Example Program Code Example programs described in this section have been written in the Microsoft Visual Basic NET language The examples are provided as a subprogram that can be ru...

Page 31: ...roject Template Before starting programming create your project template and keep it as your reference It will remove the conventional task in the future programming This section explains how to creat...

Page 32: ...arameters characteristics to be measured hFE Vth sheet resistance and so on Measurement method Spot measurement staircase sweep measurement and so on Step 2 Make a copy of your project template e g te...

Page 33: ...B2900control ioObj s filename 21 Console Write filedata s MsgBox Click OK to close the console window vbOKOnly FileOpen 1 filename OpenMode Output OpenAccess Write OpenShare LockReadWrite 25 Print 1 f...

Page 34: ...sgBox Click OK to close the console window vbOKOnly FileOpen 1 filename OpenMode Output OpenAccess Write OpenShare LockReadWrite 25 Print 1 filedata s FileClose 1 ioObj IO Close 29 System Runtime Inte...

Page 35: ...E 02 Function Command Selects source function SOUR FUNC MODE VOLT Sets source output range SOUR VOLT RANG value Sets source output value SOUR VOLT value Sets measurement function SENS FUNC func func f...

Page 36: ...curr nplc 0 1 Catch ex As Exception Console WriteLine An error occurred ex Message End Try Turn on output switch ioObj WriteString outp on 21 Turn on input switch ioObj WriteString inp on 24 Try Init...

Page 37: ...t value SOUR VOLT value Sets sweep start or stop value SOUR VOLT STAR STOP value Sets sweep center or span value SOUR VOLT CENT SPAN value Sets sweep step value SOUR VOLT STEP value Sets number of swe...

Page 38: ...IO pin m m 1 to 7 or LAN for the LXI trigger type is 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 f...

Page 39: ...curr rang auto llim 2e 9 Set measurement speed to 0 1 PLC ioObj WriteString sens curr nplc auto off 18 ioObj WriteString sens curr nplc 0 1 Generate 5 triggers by automatic internal algorithm ioObj W...

Page 40: ...sour volt mode swe ioObj WriteString sour volt star 0 ioObj WriteString sour volt stop 0 1 ioObj WriteString sour volt poin 5 Set 2nA limited auto ranging current measurement ioObj WriteString sens fu...

Page 41: ...iteString sour volt poin 5 Set 2nA limited auto ranging current measurement ioObj WriteString sens func curr 14 ioObj WriteString sens curr rang auto llim 2e 9 Set measurement speed to 0 1 PLC ioObj W...

Page 42: ...value Sets list sweep output values SOUR LIST VOLT values Adds list sweep output values to the end of the present setting SOUR LIST VOLT APP values Specifies the list sweep start point SOUR LIST VOLT...

Page 43: ...ternal timer INTn for a signal from the internal bus n 1 or 2 EXTm for a signal from the GPIO pin m m 1 to 7 or LAN for the LXI trigger type is VOLT for voltage data CURR for current data RES for resi...

Page 44: ...0 1 PLC ioObj WriteString sens curr nplc auto off 16 ioObj WriteString sens curr nplc 0 1 Generate 3 triggers by automatic internal algorithm ioObj WriteString trig sour aint 20 ioObj WriteString tri...

Page 45: ...t mode list ioObj WriteString sour list volt 0 03 0 06 0 1 Set 2nA limited auto ranging ioObj WriteString sens func curr 12 ioObj WriteString sens curr rang auto llim 2e 9 Set measurement speed to 0 1...

Page 46: ...eString sour list volt 0 03 0 06 0 1 Set 2nA limited auto ranging ioObj WriteString sens func curr 12 ioObj WriteString sens curr rang auto llim 2e 9 Set measurement speed to 0 1 PLC ioObj WriteString...

Page 47: ...T value Sets triggered source output value SOUR VOLT TRIG value Sets measurement function SENS FUNC func func func Sets measurement range SENS func RANG AUTO ON OFF SENS func RANG value Sets aperture...

Page 48: ...er BUS for the remote interface trigger command TIM for the internal timer INTn for a signal from the internal bus n 1 or 2 EXTm for a signal from the GPIO pin m m 1 to 7 or LAN for the LXI trigger ty...

Page 49: ...nplc 0 1 Adjust trigger timing parameters ioObj WriteString trig acq del 2 0e 3 16 Generate 6 triggers in 4 ms period ioObj WriteString trig sour tim 19 ioObj WriteString trig tim 4e 3 ioObj WriteStri...

Page 50: ...t ioObj WriteString sens func curr 7 ioObj WriteString sens curr rang auto off ioObj WriteString sens curr rang 2e 9 Set measurement speed to 0 1 PLC ioObj WriteString sens curr nplc auto off 12 ioObj...

Page 51: ...ement data or MATH for math result data Function Command Specifies math expression CALC MATH NAME name Defines math expression CALC MATH DEF definition Sets unit for the math expression CALC MATH UNIT...

Page 52: ...Enable predefined math expression power voltage current ioObj WriteString calc math name POWER 22 ioObj WriteString calc math stat on Set limit test mode to Grading ioObj WriteString calc clim mode gr...

Page 53: ...esult not bin numbers 59 ioObj WriteString calc data s ioObj ReadString ioObj WriteString calc lim1 fail 63 d ioObj ReadString If d 0 Then Console WriteLine PASS Else Console WriteLine FAIL End If Con...

Page 54: ...easurement Result Example Result 1 172735E 12 5 042879E 08 1 943762E 07 4 422486E 07 7 842360 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...

Page 55: ...rams defined in the program memory PROG CAT Specifies memory program PROG NAME name Defines memory program a a This function is effective for the memory program previously specified by the PROG NAME c...

Page 56: ...plc 0 1 n program arm coun 1 n program trig coun 21 n program outp 1 n program inp 1 n program init 1 n Get program length Dim sProgramLength As String String Format 0 program Length 24 ioObj WriteStr...

Page 57: ...5849E 01 1 251736E 01 1 317632E 01 Run program ioObj WriteString prog stat run 34 Wait for operation complete ioObj WriteString OPC 37 s ioObj ReadString Console Write OPC s Console WriteLine Try Retr...

Page 58: ...an be controlled by using the following commands format is ASC for the ASCII data output format REAL 32 for the IEEE 754 single precision format 4 byte data or REAL 64 for the IEEE 754 double precisio...

Page 59: ...riteLine data i ToString s s data i ToString Else Console Write data i ToString s s data i ToString End If Next Console WriteLine Retrieve measurement result Output measurement result Real64 format Co...

Page 60: ...r example this example code can be used instead of the lines from 4 to 39 of the sampling measurement program shown in Table 2 5 Measurement data can be read by using the following command offset indi...

Page 61: ...cq tim 10 0 ioObj WriteString trig acq coun 3 Catch ex As Exception Console WriteLine An error occurred ex Message End Try Turn on input switch ioObj WriteString inp on 26 Initiate acquire trigger wit...

Page 62: ...r nplc 0 1 Adjust trigger timing parameters ioObj WriteString trig acq del 5 0 14 Generate 3 triggers in 10 s period ioObj WriteString trig acq sour tim 17 ioObj WriteString trig acq tim 10 0 ioObj Wr...

Page 63: ......

Page 64: ...This information is subject to change without notice Keysight Technologies 2014 Edition 1 September 2014 B2980 90020 B2980 90020 www keysight com...

Reviews: