DAQ_TRIGGER.INTERNAL_TIMER¶

Typical use-cases for the different DAQ_TRIGGER
modes of
Worker_DAQ
. Variations are possible.¶
Internal to the Worker_DAQ
class instance will be a software
timer of type QTimer
that will periodically tick,
see the above diagram. Every tick of the timer
will trigger an update in Worker_DAQ
, i.e. make it perform a
single execution of its DAQ_function
member.
Typically, the DAQ_function
could instruct the
device to report back on a requested quantity: a so-called query
operation. In this case, the PC is acting as a master to the peripheral
I/O device. Either the requested quantity still needs to get
measured by the device and, hence, there is a delay before the
device can reply. Or the requested quantity was already measured
and only has to be retreived from a memory buffer on the device. The
latter is faster.
Example:
from dvg_qdeviceio import QDeviceIO, DAQ_TRIGGER
qdev = QDeviceIO(my_device)
qdev.create_worker_DAQ(
DAQ_trigger = DAQ_TRIGGER.INTERNAL_TIMER,
DAQ_function = my_DAQ_function,
DAQ_interval_ms = 10, # 10 ms --> 100 Hz
)
qdev.start()
Attention
The typical maximum granularity of QTimer
is
around ~1 ms, depending on the operating system.