10: Capturing and analyzing waveforms Model DMM7510 7½ Digit Multimeter
10-14 DMM7510-900-01 Rev. B / May 2015
Using TSP commands
The following TSP code is designed to be run from Keithley Instruments Test Script Builder (TSB).
TSB is a software tool that is available from the Keithley Instruments website. You can install and
use TSB to write code and develop scripts for TSP-enabled instruments. Information about how to
use TSB is in the online help for TSB and in the “Introduction to TSP operation” section of the Model
DMM7510 Reference Manual.
To use other programming environments, you may need to make changes to the example TSP code.
By default, the Model DMM7510 is configured to use the SCPI command set. You must select the
TSP command set before sending TSP commands to the instrument.
To enable TSP commands:
1. Press the MENU key.
2. Under System, select Settings.
3. For Command Set, select TSP.
4. At the prompt to reboot, select Yes.
Send the following commands:
--Reset the instrument to default settings
reset()
--Create a local variable to store the number of samples
numofsamples=50
--Set DMM function to digitize current to capture the inductor current
dmm.digitize.func = dmm.FUNC_DIGITIZE_CURRENT
--Current range must be fixed when using digitize current
dmm.digitize.range = 1
--Set the sample rate to 500 ksamples per second to sample a 50 kHz current
waveform
dmm.digitize.samplerate = 500e3
--Set the aperture to auto to get the highest accuracy measurement for the sampling
rate configured
dmm.digitize.aperture = dmm.APERTURE_AUTO
--Set the sample count to the number of samples to capture about 5 ripples
dmm.digitize.count = numofsamples
--Clear buffer
defbuffer1.clear()
--Make sure your signal is connected to the DMM. Digitize now...
dmm.digitize.read()
if defbuffer1.n > 0 then
print("Digitize Current:")
print("Total Number of readings:", defbuffer1.n)
printbuffer(1, defbuffer1.n, defbuffer1)
print("Timestamps:")
printbuffer(1, defbuffer1.n, defbuffer1.relativetimestamps)
else
print("No data collected")
end
print("Test Ended")
北京海洋兴业科技股份有限公司(证券代码:839145)