Series 3700A System Switch/Multimeter Reference Manual
Section 9: Introduction to TSP operation
3700AS-901-01 Rev. D/June 2018
9-21
The following programming example illustrates how to prompt the user to press the EXIT (LOCAL)
key to abort the script, or any other key to continue it:
display.clear()
display.setcursor(1, 1)
display.settext("Press EXIT to Abort")
display.setcursor(2, 1)
display.settext("or any key to continue")
key = display.waitkey()
display.clear()
display.setcursor(1, 1)
if key == 75 then
display.settext("Test Aborted")
exit()
else
display.settext("Test Continuing")
end
The above code captures the key that is pressed by the operator. The key code value for the
EXIT
(LOCAL) key is
75
. If the EXIT (LOCAL) key is pressed, the script aborts. If any other key is pressed,
the script continues.
About TSP commands
This section contains an overview of the TSP commands for the instrument. The commands are
organized into groups, with a brief description of each group. Each section contains links to the
detailed descriptions for each command in the TSP command reference section of this
documentation (see
(on page 11-8)).
Alarms
(on page 11-338)
(on page 11-338)
schedule.alarm[N].fractionalseconds
(on page 11-339)
(on page 11-340)
(on page 11-340)
(on page 11-341)
(on page 11-341)
(on page 11-342)
Bit manipulation and logic operations
The bit functions perform bitwise logic operations on two given numbers, and bit operations on one
given number. Logic and bit operations truncate the fractional part of given numbers to make them
integers.
Logic operations
The
bit.bitand()
,
bit.bitor()
, and
bit.bitxor()
functions in this group perform bitwise
logic operations on two numbers. The Test Script Processor (TSP
®
) scripting engine performs the
indicated logic operation on the binary equivalents of the two integers. This bitwise logic operation is
performed on all corresponding bits of the two numbers. The result of a logic operation is returned as
an integer.