Interactive SourceMeter® Instrument Reference Manual Section 8: TSP c
2450-901-01 Rev. B/September 2013 8-73
Details
Internally, the instrument bases time 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).
If you use os.time() but do not specify the time (hour, minute, and second) options, they default to noon for
that day. When called without a parameter (the first form), the function returns the current time.
Example 1
localnode.settime(2010, 3, 31, 14, 25, 0)
Sets the date and time to Mar 31, 2010 at
2:25 pm.
Example 2
systemTime = os.time({year = 2010,
month = 3,
day = 31,
hour = 14,
min = 25})
localnode.settime(systemTime)
print(os.date('%c', gettime()))
Sets the date and time to Mar 31, 2010 at
2:25 pm.
Output:
Wed Mar 31 14:25:31 2010
Also see
localnode.gettime() (on page 8-69)
localnode.showevents
This attribute sets whether or not the instrument automatically sends generated events.
Type TSP-Link accessible Affected by Where saved Default value
Usage
errorMode = localnode.showevents
localnode.showevents = errorMode
The errors that are returned:
• No events: 0
• Errors only: 1 (eventlog.SEV_ERR)
• Warnings only: 2 (eventlog.SEV_WARN)
• Errors and warnings: 3 (eventlog.SEV_ERR + eventlog.SEV_WARN)
• Information only: 4 (eventlog.SEV_INFO)
• Information and errors: 5 (eventlog.SEV_INFO + eventlog.SEV_ERR)
• Warnings and information: 6 (eventlog.SEV_INFO + eventlog.SEV_WARN)
•
All events: 7 (eventlog.SEV_ALL)