Series 2600B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2600BS-901-01 Rev. C / August 2016
7-3
Syntax rules
The following table lists syntax requirements to build well-formed instrument control commands.
Syntax rules for instrument commands
Syntax rule
Details
Examples
Case sensitivity:
Instrument
commands are case
sensitive.
For best results,
simply match the
case shown in the
command reference
descriptions.
Function and attribute
names should be in
lowercase characters.
An example of the
scriptVar.save()
function (where
test8
is the name of the
script):
test8.save()
Parameters can use a
combination of lowercase
and uppercase
characters.
Attribute constants use
uppercase characters
In the command below, which sets the format of
data transmitted from the instrument to
double-precision floating point,
format.REAL64
is the attribute constant and
format.data
is the attribute command:
format.data = format.REAL64
White space:
Not
required in a
function.
Functions can be sent
with or without white
spaces.
The following functions, which set digital I/O line
3 low, are equivalent:
digio.writebit(3,0)
digio.writebit (3, 0)
Function
parameters:
All
functions are
required to have a
set of parentheses ()
immediately
following the
function.
You can specify the
function parameters by
placing them between
the parentheses. Note
that the parentheses are
required even when
there are no parameters
specified.
The following function specifies all overlapped
commands in the nodes in group G must
complete before commands from other groups
can execute:
waitcomplete(G)
The command below reads the value of the
local time zone (no parameters are needed):
timezone = localnode.gettimezone()
Multiple
parameters:
Must
be separated by
commas (,).
Some commands require
multiple parameters,
which must be separated
by commas (
,
).
This command sets the beeper to emit a
double-beep at 2400 Hz, with a beep sequence
of 0.5 seconds on, 0.25 seconds off, and then
0.5 seconds on:
beeper.beep(0.5, 2400)
delay(0.250)
beeper.beep(0.5, 2400)
Time and date values
Time and date values are represented as the number of seconds since some base. Representing
time as a number of seconds is referred to as “standard time format.” There are three time bases:
•
UTC 12:00 am Jan 1, 1970.
Some examples of UTC time are reading buffer base timestamps,
adjustment dates, and the value returned by
os.time()
.
•
Instrument on.
References time to when the instrument was turned on. The value returned by
os.clock()
is referenced to the turn-on time.
•
Event.
Time referenced to an event, such as the first reading stored in a reading buffer.