Model 2606B System SourceMeter® Instrument Reference Manual
Example
MaxCount = dataqueue.CAPACITY
while dataqueue.count < MaxCount do
dataqueue.add(1)
end
print("There are " .. dataqueue.count
.. " items in the data queue")
dataqueue.clear()
print("There are " .. dataqueue.count
.. " items in the data queue")
This example fills the data queue and prints the number of items in the queue. It then clears the queue and
prints the number of items again.
Output:
There are 128 items in the data
queue
There are 0 items in the data queue
Also see
dataqueue.add()
dataqueue.CAPACITY
dataqueue.count
dataqueue.next()
Using the data queue for real-time communication
dataqueue.count
This attribute contains the number of items in the data queue.
Type
TSP-Link accessible
Attribute (R)
Yes
Usage
count = dataqueue.count
count
Details
The count is updated as entries are added with dataqueue.add() and read from the data queue
with dataqueue.next(). It is also updated when the data queue is cleared with
dataqueue.clear().
A maximum of dataqueue.CAPACITY items can be stored at any one time in the data queue.
2606B-901-01 Rev. C November 2021
(on page 15-49)
(on page 15-50)
(on page 15-51)
(on page 15-52)
Affected by
Not applicable
The number of items in the data queue
Section 15: TSP command reference
(on page 14-63)
Where saved
Not applicable
Default value
Not applicable
15-51
Need help?
Do you have a question about the KEITHLEY SourceMeter 2606B and is the answer not in the manual?