What problem does it solve?
Legacy MATLAB DAQ scripts built on the session-based interface (daq.createSession, addAnalogInputChannel, startBackground) are discouraged and often break on newer releases, and verbatim ports to the modern DataAcquisition API fail silently through traps like reversed trigger arguments, missing wait methods, and non-persistent callback state.
Core Features & Use Cases
- API Translation: Maps every session-API token (listeners, queueOutputData, IsContinuous, wait) to its modern DataAcquisition equivalent (ScansAvailableFcn, preload/write, start with Duration or Continuous).
- Verified Patterns: Provides five canonical, hardware-verified snippets covering external triggers, callback data reads, blocking until completion, continuous analog output with refill, and multi-channel triggered streaming.
- Silent-Failure Detection: Ships a verifyDataAcquisition.m script that statically checks for the four highest-frequency silent gaps before live execution.
- Use Case: A user's DAQ script errors with "Undefined function 'wait'" after upgrading MATLAB; use this Skill to port the script to daq("ni"), addinput, and a Running-poll loop, then verify it before running on hardware.
Quick Start
Port my legacy DAQ script that uses daq.createSession and startBackground to the modern DataAcquisition interface and verify it before running.