System SourceMeter® Instrument Reference Manual Section 7:
2600BS-901-01 Rev. C / August 2016 7-53
Example
for i = 1, 10 do
dataqueue.add(i)
end
print("There are " .. dataqueue.count
.. " items in the data queue")
while dataqueue.count > 0 do
x = dataqueue.next()
print(x)
end
print("There are " .. dataqueue.count
.. " items in the data queue")
Clears the data queue, adds ten entries, then
reads the entries from the data queue. Note that
your output may differ depending on the setting
of format.asciiprecision.
Output:
There are 10 items in the data queue
1.0000000e+00
2.0000000e+00
3.0000000e+00
4.0000000e+00
5.0000000e+00
6.0000000e+00
7.0000000e+00
8.0000000e+00
9.0000000e+00
1.0000000e+01
There are 0 items in the data queue
Also see
dataqueue.add() (on page 7-49)
dataqueue.CAPACITY (on page 7-50)
dataqueue.clear() (on page 7-51)
dataqueue.count (on page 7-51)
format.asciiprecision (on page 7-101)
delay()
This function delays the execution of the commands that follow it.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
delay(seconds)
The number of seconds to delay (0 to 100,000 s)
Details
The instrument delays execution of the commands for at least the specified number of seconds and
fractional seconds. However, the processing time may cause the instrument to delay 5 μs to 10 μs
(typical) more than the requested delay.
Example
delay(0.250)
beeper.beep(0.5, 2400)
Emit a double-beep at 2400 Hz. The sequence is
0.5 s on, 0.25 s off, 0.5 s on.
Also see
None