Models 707B and 708B Switching Matrix Reference Manual
Section 5: Introduction to TSP operation
707B-901-01 Rev. B / January 2015
5-7
When the response is a comma-delimited string, the individual return items can be identified by
iterating through the list using the comma delimiters. For example, the Lua code below will start at the
beginning of a string and break the string into individual items at each comma. The
tonumber()
function is used on each item to determine if it is a number or not. In either case, the value is printed.
index1 = 1
index2 = 1
text = "123,abc,hello,4.56"
endIndex = string.len(text)
while index2 ~= endIndex do
index2 = string.find(text, ",", index1)
if not index2 then
index2 = endIndex
end
subString = string.sub(text, index1, index2 - 1)
if not number(subString) then
print(subString)
else
print(tonumber(subString))
end
index1 = 1
end
createconfigscript function
This function captures the present settings of the instrument.
(on page 7-47)
Data queue
Use the data queue commands to:
•
Share data between test scripts running in parallel
•
Access data from a remote group or a local node on a TSP-Link
®
network at any time
The data queue in the Test Script Processor (TSP
®
) scripting engine is first-in, first-out (FIFO).
You can access data from the data queue even if a remote group or a node has overlapped
operations in process.
(on page 7-48)
(on page 7-49)
(on page 7-50)
(on page 7-51)
delay function
This function is used to hold up instrument operation for a specified period of time. It is typically used
to soak a device at a specific voltage or current for a period of time.