Section 7: TSP command reference Model 2657A High Power System SourceMeter® Instrument Reference Manual
7-148 2657A-901-01 Rev. B/December 2012
Details
The timespec is a table using the fields listed in the table below:
year
The year (1970 or later)
month
The month (1 to 12)
day
The day (1 to 31)
hour
The hour (00 to 23)
min
The minute (00 to 59)
sec
The second (00 to 59)
If the time (hour, minute, and second) options are not used, they default to noon for that day. When called
without a parameter (the first form), the function returns the current time.
Set the time zone before calling the os.time() function.
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
settime() (on page 7-172)
settimezone()
(on page 7-173)
print()
This function generates a response message.
Type TSP-Link accessible
Affected by Where saved Default value
Function No
Usage
print(value1)
print(value1, value2)
print(value1, ..., valueN)
value1
The first argument to output
value2
The second argument to output
valueN
The last argument to output
...
One or more values separated with commas
Details
TSP-enabled instruments do not have inherent query commands. Like any other scripting environment, the
print() command and other related print() commands generate output. The print() command creates
one response message.
The output from multiple arguments are separated with a tab character.
Numbers are printed using the format.asciiprecision attribute. If you want use Lua formatting, print the
return value from the tostring() function.