
Section 8: Mixed function multi-channel scanning
DAQ6510 Data Acquisition / Multimeter System User's Manual
8-6
DAQ6510-900-01Rev. A / April 2018
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
. 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 DAQ6510
Reference Manual
.
To use other programming environments, you may need to make changes to the example TSP code.
By default, the DAQ6510 uses 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. Set the Command Set to
TSP
.
4. At the prompt to reboot, select
Yes
.
This sequence of TSP commands makes a series of temperature measurements. After the code
executes, the data is displayed in the Instrument Console of Test Script Builder.
Send the following commands for this example application:
-- Reset the instrument to the default settings
reset()
-- Establish channel settings for the scan card configuration...
channel.setdmm("101", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_AC_VOLTAGE)
channel.setdmm("101", dmm.ATTR_MEAS_DETECTBW, dmm.DETECTBW_30HZ)
channel.setdmm("102:110", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_DC_VOLTAGE)
channel.setdmm("111:114", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_TEMPERATURE)
channel.setdmm("111:114", dmm.ATTR_MEAS_TRANSDUCER, dmm.TRANS_THERMOCOUPLE)
channel.setdmm("111:114", dmm.ATTR_MEAS_THERMOCOUPLE, dmm.THERMOCOUPLE_K)
channel.setdmm("111:114", dmm.ATTR_MEAS_REF_JUNCTION, dmm.REFJUNCT_SIMULATED)
channel.setdmm("111:114", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_TEMPERATURE,
dmm.ATTR_MEAS_SIM_REF_TEMP, 23)
channel.setlabel("101", "ACSource")
channel.setlabel("111", "Reg12VTemp")
channel.setlabel("112", "Reg5VTemp")
channel.setlabel("113", "LoadTemp1")
channel.setlabel("114", "LoadTemp2")
channel.setdmm("121", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_AC_CURRENT)
channel.setdmm("122", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_DC_CURRENT)
-- Generate the scan...
scan.create("101:114,121,122")
scan.scancount = 10
-- Clear and size the buffer...
defbuffer1.clear()
defbuffer1.capacity = 10 * 16
-- Start the scan and wait...
trigger.model.initiate()
waitcomplete()
-- Extract the data...
printbuffer(1, defbuffer1.n, defbuffer1, defbuffer1.readings, defbuffer1.channels)