Section 11: TSP command reference
Series 3700A System Switch/Multimeter Reference Manual
11-352
3700AS-901-01 Rev. D/June 2018
Details
The
loadscript
or
loadandrunscript
and
endscript
keywords are not included in the source
code.
The body of the script is a single string with lines separated by the new line character.
The instrument automatically stores the source for all scripts that are loaded on the instrument. To
free up memory or to obfuscate the code, assign
nil
to the source attribute of the script. Although
this attribute is writable, it can only be set to the
nil
value.
Example
test7 = script.new("display.clear() display.settext('Hello from my test')", "")
print(test7.source)
This example creates a script called
test7
that displays a message on the front panel and retrieves the source
code.
Output:
display.clear() display.settext('Hello from my test')
Also see
(on page 11-348)
settime()
This function sets the real-time clock (sets present time of the system).
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
settime(
time
)
time
The time in seconds since January 1, 1970 UTC
Details
This function sets the date and time of the instrument based on the
time
parameter (specified in
UTC time). UTC time is specified as the number of seconds since Jan 1, 1970, UTC. You can use
UTC time from a local time specification, or you can use UTC time from another source (for example,
your computer).
Example
systemTime = os.time({year = 2010,
month = 3,
day = 31,
hour = 14,
min = 25})
settime(systemTime)
Sets the date and time to Mar 31, 2010 at
2:25 pm.
Also see
(on page 11-251)
(on page 11-297)
(on page 11-353)