19-236
Return to
2600AS-901-01 Rev. B / September 2008
Section 19: Remote Commands
Series 2600A System SourceMeter® Instruments Reference Manual
waitcomplete
This function waits for all overlapped commands to complete.
Standard libraries
In addition to the standard programming constructs above, TSL includes standard libraries that
contain useful functions for string manipulation, mathematics and related functions. TSL also
includes instrument control extension libraries. These libraries provide programming interfaces to
the instrumentation accessible by the TSP. These libraries are automatically loaded when the TSP
starts and do not need to be managed by the programmer.
Table 19-2
Base library functions
waitcomplete
Function
Waits for all overlapped commands to complete.
TSP-Link
accessibility
This function cannot be accessed from a remote TSP-Link node.
Usage
waitcomplete()
waitcomplete(group)
group
Identifies the number of the group to wait for
overlapped operations to complete.
Remarks
• The master node is the only node that can specify a group number with the
waitcomplete
command.
• If a TSP-Link group number is not provided, the local group number is used.
• If a 0 (zero) is used for the TSP-Link group number, this function waits for all nodes on the
TSP-Link network.
• Use this function to wait for a specific group to complete all overlapped operations.
• Any node that is not assigned to a group is considered part of the master group.
• Using this function without a group number waits for overlapped operations to complete
on the local group.
Example
waitcomplete()
Waits for all nodes in the local group.
waitcomplete(G
)
Waits for all nodes in group G.
waitcomplete(0)
Waits for all nodes on the TSP-Link network.
print(x)
Prints the argument x to the active host interface, using the
tostring()
function to convert x to a string.
collectgarbage([limit])
Sets the garbage-collection threshold to the given limit (in
Kbytes) and checks it against the byte counter. If the new
threshold is smaller than the byte counter, then TSL immediately
runs the garbage collector. If the limit parameter is absent, it
defaults to 0 (thus forcing a garbage-collection cycle). See
Note
for more information.
gcinfo()
Returns the number of Kbytes of dynamic memory that TSP is
using.
tonumber(x [,base])
Returns x converted to a number. If x is already a number, or a
convertible string, then the number is returned; otherwise, it
returns nil.
An optional argument specifies the base to interpret the numeral.
The base may be any integer between 2 and 36, inclusive. In
bases above 10, the letter ‘A’ (in either upper or lower case)
represents 10, ‘B’ represents 11, and so forth, with ‘Z’
representing 35. In base 10, the default, the number may have a
decimal part, as well as an optional exponent. In other bases,
only unsigned integers are accepted.