Posted Fri, 17 Feb 2023 15:14:25 GMT by Graf, Arthur
Good morning,

I am new to TSP coding.  I am setting up a 2651A to do a current pulse "sweep" (multiple current levels).  Here is the code I am sending to the 2651A (using a LabVIEW VISA Write):
-- Create a fixed level voltage sweep.
smua.trigger.source.listi({0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,0.100000,19.000000})
smua.trigger.source.action = smua.ENABLE
smua.source.rangei = 10.000000
smua.trigger.measure.action = smua.DISABLE

I have confirmed that the data is setting properly (at least I think) based on being able to read back the rangei using
print(smua.source.rangei)
which returns the expected value.

How would I go about reading back the "smua.trigger.source.listi" values to verify they were properly set?  I have tried various combinations of print() and printbuffer() and have been unsuccessful in getting a response.  I also tried creating a variable, setting it equal to the list, and then reading it back but have been unsuccessful with that.  This is what I tried:
READING = smua.trigger.source.listi
printbuffer(1,2,READING)

Can someone guide me in how to read back a setting that is a list like this?

Many thanks.
Posted Fri, 17 Feb 2023 20:27:30 GMT by McKinney, Ty
Hello,
See page 7-34 in the reference manual attached below as this should give you a good idea on what you are wanting to accomplish.
Model 2651A High Power System SourceMeter Instrument Reference Manual | Tektronix
Also, I saw you set your source range to 10 but the last value in your lsit is 19. If the lsit does not autorange for you, this may cause some issues as you're attempting to source a value well outside of your set range of 10.
Posted Fri, 03 Mar 2023 19:11:40 GMT by Graf, Arthur
Thanks, @Ty,

This manual reference was a helpful place to start but was only one of several commands that I had to put together to get this to work.  Here's what I landed on for everyone's benefit:
 
-- Create user generated buffer of (size)
buffer1 = smua.makebuffer(1000)
-- Collect source values output during measurement steps
buffer1.collectsourcevalues = 1
-- Assign measurement to user generated buffer
smua.trigger.measure.i(buffer1)
-- Enable trigger
smua.trigger.measure.action = smua.ENABLE

Then later:
-- Get the number of steps
num = smua.trigger.count
-- Print step source values
printbuffer(1, num, buffer1.sourcevalues)
-- Erase the user buffer when done
buffer1 = nil

I appreciate your help.

You must be signed in to post in this forum.