Posted Thu, 07 Dec 2023 01:06:36 GMT by Stern, Tom

I wrote the following script for the 2450 & 2470 SMUs.

The goal is to be able to output a triangle wave and capture the current through a 2 terminal device connected in 4 wire configuration. The problem is that I am far from being able to scan at the rate of my slope which I set to 0.1 v/sec so going from 0V to 1V should take 10 seconds. When running the scripts as-is this takes around 30 seconds. This is with delay = 0.

How can I adjust this code so I can actually run faster sweeps? Thanks

-- Reset the instrument
reset()

-- User input for parameters
local targetVoltage = display.input.number("Enter Target Voltage (V)", display.NFORMAT_DECIMAL, 1, -10, 10)
local slope = display.input.number("Enter Slope (V/s)", display.NFORMAT_DECIMAL, 0.1, 0, 10)
local numRepeats = display.input.number("Enter Number of Repeats", display.NFORMAT_INTEGER, 5, 1, 100)
local numPoints = display.input.number("Enter Number of Points", display.NFORMAT_INTEGER, 100, 2, 1e6)

-- Triangle sweep parameters
local start = 0 -- Start voltage
local stop = targetVoltage
local points = numPoints + 1
-- local sDelay = targetVoltage / slope / numPoints
local sDelay = 0
local count = numRepeats 
local rangeType = smu.RANGE_BEST -- Best fixed range
local failAbort = smu.ON         -- Abort the sweep if the source limit is exceeded
local dual = smu.ON              -- Sweep up & down
local bufferName = defbuffer1    -- Buffer name

smu.source.sweeplinear("Triangle", start, stop, points , sDelay, count, rangeType, failAbort, dual, bufferName)

-- Measure Settings
smu.measure.func = smu.FUNC_DC_CURRENT
smu.measure.autorange = smu.ON
smu.measure.nplc = 1
smu.measure.sense = smu.SENSE_4WIRE

trigger.model.initiate()
waitcomplete()

Posted Thu, 28 Dec 2023 15:56:07 GMT by C, Andrea
The smu.source.sweeplinear() function is doing two things:
- it builds a source configuration list containing voltage levels to source;   it also has source settings such as range and current limit, etc.
- it builds a trigger model to loop through the source config list and get a measurement.

To have control over the volt / sec ramp rate, need to modify the trigger model to make use of a timer to control the rate that it moves through the list.
I'll upload some demo code, but keep in mind there are many opportunities for logical error pitfalls in it.
For example, at faster desired ramp rates, need to make sure the measurements can keep up.
But at 100msec at each source level, there is plenty of time.

See attached.

 

You must be signed in to post in this forum.