Traditionally, a test engineer would program a test and enter it into a computer or other controller. Such programs might include a test executive as well as function programs and other subroutines. The executive controls the test flow by calling the various functions or subroutines in the appropriate sequence. The functions and subroutines configure the instruments in the test system by sending commands to them and initiating the test. They process and evaluate the data, make pass/fail decisions on the DUTs, and archive the data. Typically, for each DUT tested, the controller would send a sequence of commands to each instrument and continually evaluate the resulting data. All this communication between the controller[1] and the instruments can significantly slow down the test. The Series 2600 Test Script Processor[2] allows most of the control program to be downloaded to volatile or non-volatile memory in a data source table. The program downloaded to the TSP is called a script.
A script can be a long program that executes multiple tests.
Following good programming practices, a script can be written to create and call functions, just like a control program in a computer. Once a function is established, it can be called from a script and other functions in the test script processor or from the test executive in the host controller. Since parameters can be passed to functions, this provides a very simple way to easily pass DUT test parameters, such as input signal levels or limits, from the controller to the test routine inside the SourceMeter. A
well-documented example script for testing DACs is available for download from the Keithley website (www.keithley.com). This script is fully functional and can be used with the two Model 2602 SourceMeters shown in Figure 3. To help the reader get a feel for the new scripting language, the following code snippet is taken from the DAC test script. Note that the double-dashed lines (--) indicate comments.
Let's look at two typical commands:
node[1].smua.source.func = node[1].smua.OUTPUT _ DCVOLTS
node[1].smua.source.levelv = 0
The scripting language allows for the use of aliases, which may make the code more readable and improve code execution speed. We have defined the following aliases for the DAC test example:
MASTER = node[1]
--Alias indicating control is via Node 1
SLAVE = node[2]
--Node 2 is controlled by MASTER via TSP-Link
IOUT1 = MASTER.smua
--Alias for SMU measuring current output #1
--IOUT1 is equivalent to node[1].smua
IOUT2 = MASTER.smub
--Alias for SMU measuring current output #2
--IOUT2 is equivalent to node[1] .smub
DIO = MASTER.digio
--Alias for Digital I/O of 2602 #1
--DIO is equivalent to node[1].digio
VPLUS = SLAVE.smua
--Alias for SMU supplying V+ and measuring current draw
--VPLUS is equivalent to node[2].smua
VREF = SLAVE.smub
--Alias for SMU supplying reference voltage (Vref)
--VREF is equivalent to node[2].smub
is used throughout the examples as an alias. Using the defined aliases, the example commands can be rewritten as:
IOUT1.source.func = IOUT1.OUTPUT_DCVOLTS
IOUT1.source.levelv = 0
In general, scripting languages[3] do not require explicit declaration of variables. They are declared and defined "on the fly" based on the assignment of values to them. The exception is tables (i.e. arrays), which must have their data types defined. All variables are global unless explicitly declared as local. The following “constants” appear in the code snippet:
Vref = 10
--Use +10VDC reference voltage
IoutMax = 0.002
--Max expected current output
Nplc = 0.001
--Integration time for SMU A-to-D converters (in terms of power line cycles)
Nbits = 8
--Number of DAC control bits (digital inputs)
Ncodes = 2^Nbits
--Number of possible control codes
MaxCode = Ncodes - 1
--Decimal equivalent of full-scale code (255 for 8-bit DAC)
Lsb = Vref / MaxCode
--Nominal value of least significant bit
Before starting the actual test sequence, it is common to perform some initial setup of the instrument. In our example, the initial setup includes setting the source function and range, the measurement function and range, the voltage detection mode, etc. The configuration of all four source-measure units [4] is similar. For SMU A of Node 1, some setup commands are as follows:
MASTER.reset()
--Reset all Node 1 logical instruments to default settings
IOUT1.sense = IOUT1.SENSE_REMOTE --Use REMOTE (4-wire) voltage sensing
IOUT1.source.func = IOUT1.OUTPUT_DCVOLTS --Configure SMU to source DCV
IOUT1.source.rangev = 0 --Set voltage source ranges;
--2602 picks appropriate range based on programmed value
IOUT1.source.levelv = 0 --To measure current, source zero volts on lowest range
IOUT1.source.limiti = 1.2 * IoutMax --Set current compliance limit (20% over max)
IOUT1.measure.nplc = Nplc --Set integration times for all measurements
IOUT1.measure.autozero = IOUT1.AUTOZERO_AUTO --Autozero for max accuracy;
IOUT1.measure.rangei = IoutMax --Set up current measurement range; Measurement
--range for source function fixed at source range val
IOUT1.measure.filter.type = IOUT1.FILTER_REPEAT_AVG --Use REPEAT filter
IOUT1.measure.filter.count = 5 --Reading will be average of 5 consecutive measurements
IOUT1.measure.filter.enable = IOUT1.FILTER_ON --Enable Node 1 SMU A digital filter
--Set measurement parameters the 2602s will display (if display is enabled)
--Displays can be disabled to improve test speed
MASTER.display.screen = MASTER.display.SMUA_SMUB --Digital port isn’t affected by reset so user must set desired initial state
DIO.writeport(0)
--Set all digital control bits to zero
DIO.writeprotect(16128) --Write protect bits 9 through 14, which are reserved for
--component handler control in this example.
在初始设置完成后,将进行DAC测试。这里只给出在IOUT1端的INL与DNL测试。对于其他测试,请参见完整的测试脚本。注意:数字源表仪器始终“假定”其通过内部源测试电流。在这种情况下,正电流从端点流出,负电流从端点流入。根据这种规定,源表将以纯电流表模式运行,如节点1的SMU A和SMU B,其测量到的极性与使用典型电流表时的极性是相反的。从电路流入数字源表[5]仪器的正向电流,将作为负电流测量,反之亦然。
[page]
IOUT1.source.output = IOUT1.OUTPUT_ON --Turn ON SMU outputs
iout1 = {} --Declare table to hold measurements at output IOUT1; table index begins with 1
for j = 0, MaxCode do --j is the code applied to the digital inputs
DIO.writeport(j) --Apply digital inputs
delay(0.001) --Allow 1ms settling time
iout1[j+1] = -IOUT1.measure.i() --Minus sign corrects for polarity of measurements
end –for
IOUT1.source.output = IOUT1.OUTPUT_OFF --Turn OFF outputs of all SMUs
一旦测量完成,节点1测试脚本处理器将执行所有计算,并检测通过/失效状态数据。脚本语言拥有一个广泛的公式库,它允许TSP执行复杂的数据计算,而且不需要向主机控制器传送数据进行处理。这个完整的示例程序说明2602型数字源表如何执行线性回归计算。
--Compute maximum integral nonlinearity(INL)
--Check for monotonicity; Compute maximum differential nonlinearity(DNL)
--Slope_bf and intercept_bf are the slope and intercept of the best-fit straight line
inlmax_iout1 = 0
dnlmax_iout1 = 0
mono_iout1 = “Monotonic”
for j = 0, MaxCode do
inl_iout1 = math.abs(iout1[j+1]-(slope_bf * j + intercept_bf)) --Calcs for IOUT1
if inl_iout1 > inlmax_iout1 then
inlmax_iout1 = inl_iout1
end --if
if j > 0 then
--Test for monotonicity
diff_iout1 = iout1[j] – iout1[j-1]
if diff_iout1 < 0 then
mono_iout1 = “NON-Monotonic”
end --if
--Compute dnl and test for max.
dnl_iout1 = math.abs(diff_iout1 – Lsb)
if dnl_iout1 > dnlmax_iout1 then
dnlmax_iout1 = dnl_iout1
end –if
end --if
end --for
inl_iout1_lsb = inlmax_iout1 / Lsb --Express INL and DNL in terms of nominal LSB
dnl_iout1_lsb = dnlmax_iout1 / Lsb
Once the various DAC parameters are calculated, the TSP checks the values and determines the pass/fail status of the device. It then sends the correct sorting command to the part handler by writing a digital bit pattern to the Node 1 DIO port.
if PartStatus =”GOOD” then
DIO.writeport(GoodBitPattern) --Send “good part” bit pattern to component handler
else
DIO.writeport(BadBitPattern) --Send “bad part” bit pattern to component handler end –ifSince
all test data is processed and evaluated by the TSP, it is not necessary to send all data to the host controller. However, this is easily accomplished when SPC is required or other data logging or record keeping requirements are met. The print function writes the specified parameters to the Model 2602 SourceMeter output queue, which can be uploaded by the host controller. If desired, the data and/or test results can be displayed on the instrument front panel display. In addition, the data can be formatted using standard “C” format strings.
--Send the monotonicity results and max INL and DNL values measured at IOUT1
print(string.format("%s, %1.2f, %1.2f", mono_iout1, dnl_iout1_lsb, inl_iout1_lsb))
--Display INL & DNL on front panel displays
MASTER.display.clear()
MASTER.display.setcursor(1,1,0)
MASTER.display.settext (string.format(“INL= %1.2f LSBs”, inl_iout1_lsb))
MASTER.display.setcursor(2,1,0)
MASTER.display.settext(string.format(“DNL= %1.2f LSBs, dnl_iout1_lsb))
Reference address:2602 Digital SourceMeter Test Script and Two Typical Commands
A script can be a long program that executes multiple tests.
Following good programming practices, a script can be written to create and call functions, just like a control program in a computer. Once a function is established, it can be called from a script and other functions in the test script processor or from the test executive in the host controller. Since parameters can be passed to functions, this provides a very simple way to easily pass DUT test parameters, such as input signal levels or limits, from the controller to the test routine inside the SourceMeter. A
well-documented example script for testing DACs is available for download from the Keithley website (www.keithley.com). This script is fully functional and can be used with the two Model 2602 SourceMeters shown in Figure 3. To help the reader get a feel for the new scripting language, the following code snippet is taken from the DAC test script. Note that the double-dashed lines (--) indicate comments.
Let's look at two typical commands:
node[1].smua.source.func = node[1].smua.OUTPUT _ DCVOLTS
node[1].smua.source.levelv = 0
The scripting language allows for the use of aliases, which may make the code more readable and improve code execution speed. We have defined the following aliases for the DAC test example:
MASTER = node[1]
--Alias indicating control is via Node 1
SLAVE = node[2]
--Node 2 is controlled by MASTER via TSP-Link
IOUT1 = MASTER.smua
--Alias for SMU measuring current output #1
--IOUT1 is equivalent to node[1].smua
IOUT2 = MASTER.smub
--Alias for SMU measuring current output #2
--IOUT2 is equivalent to node[1] .smub
DIO = MASTER.digio
--Alias for Digital I/O of 2602 #1
--DIO is equivalent to node[1].digio
VPLUS = SLAVE.smua
--Alias for SMU supplying V+ and measuring current draw
--VPLUS is equivalent to node[2].smua
VREF = SLAVE.smub
--Alias for SMU supplying reference voltage (Vref)
--VREF is equivalent to node[2].smub
is used throughout the examples as an alias. Using the defined aliases, the example commands can be rewritten as:
IOUT1.source.func = IOUT1.OUTPUT_DCVOLTS
IOUT1.source.levelv = 0
In general, scripting languages[3] do not require explicit declaration of variables. They are declared and defined "on the fly" based on the assignment of values to them. The exception is tables (i.e. arrays), which must have their data types defined. All variables are global unless explicitly declared as local. The following “constants” appear in the code snippet:
Vref = 10
--Use +10VDC reference voltage
IoutMax = 0.002
--Max expected current output
Nplc = 0.001
--Integration time for SMU A-to-D converters (in terms of power line cycles)
Nbits = 8
--Number of DAC control bits (digital inputs)
Ncodes = 2^Nbits
--Number of possible control codes
MaxCode = Ncodes - 1
--Decimal equivalent of full-scale code (255 for 8-bit DAC)
Lsb = Vref / MaxCode
--Nominal value of least significant bit
Before starting the actual test sequence, it is common to perform some initial setup of the instrument. In our example, the initial setup includes setting the source function and range, the measurement function and range, the voltage detection mode, etc. The configuration of all four source-measure units [4] is similar. For SMU A of Node 1, some setup commands are as follows:
MASTER.reset()
--Reset all Node 1 logical instruments to default settings
IOUT1.sense = IOUT1.SENSE_REMOTE --Use REMOTE (4-wire) voltage sensing
IOUT1.source.func = IOUT1.OUTPUT_DCVOLTS --Configure SMU to source DCV
IOUT1.source.rangev = 0 --Set voltage source ranges;
--2602 picks appropriate range based on programmed value
IOUT1.source.levelv = 0 --To measure current, source zero volts on lowest range
IOUT1.source.limiti = 1.2 * IoutMax --Set current compliance limit (20% over max)
IOUT1.measure.nplc = Nplc --Set integration times for all measurements
IOUT1.measure.autozero = IOUT1.AUTOZERO_AUTO --Autozero for max accuracy;
IOUT1.measure.rangei = IoutMax --Set up current measurement range; Measurement
--range for source function fixed at source range val
IOUT1.measure.filter.type = IOUT1.FILTER_REPEAT_AVG --Use REPEAT filter
IOUT1.measure.filter.count = 5 --Reading will be average of 5 consecutive measurements
IOUT1.measure.filter.enable = IOUT1.FILTER_ON --Enable Node 1 SMU A digital filter
--Set measurement parameters the 2602s will display (if display is enabled)
--Displays can be disabled to improve test speed
MASTER.display.screen = MASTER.display.SMUA_SMUB --Digital port isn’t affected by reset so user must set desired initial state
DIO.writeport(0)
--Set all digital control bits to zero
DIO.writeprotect(16128) --Write protect bits 9 through 14, which are reserved for
--component handler control in this example.
在初始设置完成后,将进行DAC测试。这里只给出在IOUT1端的INL与DNL测试。对于其他测试,请参见完整的测试脚本。注意:数字源表仪器始终“假定”其通过内部源测试电流。在这种情况下,正电流从端点流出,负电流从端点流入。根据这种规定,源表将以纯电流表模式运行,如节点1的SMU A和SMU B,其测量到的极性与使用典型电流表时的极性是相反的。从电路流入数字源表[5]仪器的正向电流,将作为负电流测量,反之亦然。
[page]
IOUT1.source.output = IOUT1.OUTPUT_ON --Turn ON SMU outputs
iout1 = {} --Declare table to hold measurements at output IOUT1; table index begins with 1
for j = 0, MaxCode do --j is the code applied to the digital inputs
DIO.writeport(j) --Apply digital inputs
delay(0.001) --Allow 1ms settling time
iout1[j+1] = -IOUT1.measure.i() --Minus sign corrects for polarity of measurements
end –for
IOUT1.source.output = IOUT1.OUTPUT_OFF --Turn OFF outputs of all SMUs
一旦测量完成,节点1测试脚本处理器将执行所有计算,并检测通过/失效状态数据。脚本语言拥有一个广泛的公式库,它允许TSP执行复杂的数据计算,而且不需要向主机控制器传送数据进行处理。这个完整的示例程序说明2602型数字源表如何执行线性回归计算。
--Compute maximum integral nonlinearity(INL)
--Check for monotonicity; Compute maximum differential nonlinearity(DNL)
--Slope_bf and intercept_bf are the slope and intercept of the best-fit straight line
inlmax_iout1 = 0
dnlmax_iout1 = 0
mono_iout1 = “Monotonic”
for j = 0, MaxCode do
inl_iout1 = math.abs(iout1[j+1]-(slope_bf * j + intercept_bf)) --Calcs for IOUT1
if inl_iout1 > inlmax_iout1 then
inlmax_iout1 = inl_iout1
end --if
if j > 0 then
--Test for monotonicity
diff_iout1 = iout1[j] – iout1[j-1]
if diff_iout1 < 0 then
mono_iout1 = “NON-Monotonic”
end --if
--Compute dnl and test for max.
dnl_iout1 = math.abs(diff_iout1 – Lsb)
if dnl_iout1 > dnlmax_iout1 then
dnlmax_iout1 = dnl_iout1
end –if
end --if
end --for
inl_iout1_lsb = inlmax_iout1 / Lsb --Express INL and DNL in terms of nominal LSB
dnl_iout1_lsb = dnlmax_iout1 / Lsb
Once the various DAC parameters are calculated, the TSP checks the values and determines the pass/fail status of the device. It then sends the correct sorting command to the part handler by writing a digital bit pattern to the Node 1 DIO port.
if PartStatus =”GOOD” then
DIO.writeport(GoodBitPattern) --Send “good part” bit pattern to component handler
else
DIO.writeport(BadBitPattern) --Send “bad part” bit pattern to component handler end –ifSince
all test data is processed and evaluated by the TSP, it is not necessary to send all data to the host controller. However, this is easily accomplished when SPC is required or other data logging or record keeping requirements are met. The print function writes the specified parameters to the Model 2602 SourceMeter output queue, which can be uploaded by the host controller. If desired, the data and/or test results can be displayed on the instrument front panel display. In addition, the data can be formatted using standard “C” format strings.
--Send the monotonicity results and max INL and DNL values measured at IOUT1
print(string.format("%s, %1.2f, %1.2f", mono_iout1, dnl_iout1_lsb, inl_iout1_lsb))
--Display INL & DNL on front panel displays
MASTER.display.clear()
MASTER.display.setcursor(1,1,0)
MASTER.display.settext (string.format(“INL= %1.2f LSBs”, inl_iout1_lsb))
MASTER.display.setcursor(2,1,0)
MASTER.display.settext(string.format(“DNL= %1.2f LSBs, dnl_iout1_lsb))
Previous article:Example of constructing a multi-source measurement unit system using high-power digital source meter
Next article:Keithley 2602 SourceMeter D/A Converter Test Example
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Test Measurement Articles
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- My EEWorld 2018 year-end summary @ [chat, laugh, make noise]
- How to use a funnel amplifier to amplify current measurements?
- Real-time control technologies meet the demands of real-time industrial communications – Part 3
- MSP430 MCU Example 3 - Colored Light Control
- EEWORLD University-What is an isolated gate driver?
- Burning image and mounting USB disk with busybox file system failed
- Switching Circuit
- EEWORLD University Hall----Open Source PWM Robotic Arm (Version 51)
- MakeCode Extension for the LSM6DSO Sensor
- PCB reliability test