Dataqueue.count; Dataqueue.next() - Tektronix Keithley SourceMeter 2470 Reference Manual

High voltage instrument
Hide thumbs Also See for Keithley SourceMeter 2470:
Table of Contents

Advertisement

2470 High Voltage 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")
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.
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
2470-901-01 Rev. A / May 2019
(on page 14-47)
(on page 14-48)
(on page 14-49)
(on page 14-50)
Affected by
Not applicable
The number of items in the data queue
Section 14: TSP command reference
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
(on page 9-10)
Where saved
Not applicable
Default value
Not applicable
14-49

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Keithley SourceMeter 2470 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF