daq#
NI-DAQ device: external start-trigger + TTL edge counter.
Registered as a BaseDataProducer so its TTL
rising edges flow onto the session dataqueue via record() and into the
AcquisitionManifest like any other producer.
Dual purpose, preserved from the original engine-driven design:
On
start()the counter input is armed first (begins counting), then a single pulse is written on the digital-output line to tell a separate system to go. Arming before pulsing means the first TTL returned by that system is never missed.A background thread polls the counter and records one row per new rising edge (payload is the cumulative edge count: 1, 2, 3, …) – the marker downstream parsers align against (
dataqueue_device_match="nidaq"inpsychopy_device.Psychopy).
nidaqmx is imported lazily so this module loads on machines without the NI
driver; development_mode short-circuits every hardware call.
- class mesofield.devices.daq.Nidaq[source]#
Bases:
BaseDataProducerExternal start-trigger + TTL edge counter on an NI-DAQ board.