5: Scanning temperature using thermocouples DAQ6510 Data Acquisition / Multimeter System
5-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 tek.com/keithley
. 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()
-- Set up channel settings for Slot 1
channel.setdmm("101:110", dmm.ATTR_MEAS_FUNCTION, dmm.FUNC_TEMPERATURE)
channel.setdmm("101:110", dmm.ATTR_MEAS_TRANSDUCER, dmm.TRANS_THERMOCOUPLE)
channel.setdmm("101:110", dmm.ATTR_MEAS_THERMOCOUPLE, dmm.THERMOCOUPLE_K)
channel.setdmm("101:110", dmm.ATTR_MEAS_REF_JUNCTION, dmm.REFJUNCT_INTERNAL)
channel.setdmm("101:110", dmm.ATTR_MEAS_OPEN_DETECTOR, dmm.ON)
-- set up Scan
scan.create("101:110")
-- Set the scan count to 24hrs * 60min/hr = 1440
scan.scancount = 1440
-- Set the time between scans to 60s
scan.scaninterval = 6.000e+01
-- Ensure data gets written to a connected USB drive after each scan
scan.export("/usb1/scan24hr.csv", scan.WRITE_AFTER_SCAN, buffer.SAVE_RELATIVE_TIME)
-- Enable scan restart after power failure
scan.restart = scan.ON
-- Trigger to start the scan...
trigger.model.initiate()
-- Ensure that the display shows the SCAN swipe and carousel
display.changescreen(display.SCREEN_SCAN_SWIPE)