How to jointly trigger multiple sessions on the same and/or different devices in the session-based DAQ interface

5 views (last 30 days)
Using the session-based Data Acquisition Toolbox, I would like to set up a manually triggered counter output (the master trigger) that is output to the NI RTSI cable (e.g. RTSI0). This would be the source of the trigger signal for some sessions on the same board as the counter as well as some sessions on a different board.
However, I don’t understand the method of triggering in the session-based DAQ Toolbox, compared to the triggering tools in the underlying NI NIDAQmx package.
The s.addTriggerConnection functionality of the session-based DAQ interface seems to conflate two functions of the underlying NIDAQmx package: DAQmxCfgDigEdgeStartTrig and DAQmxConnectTerms .
Ordinarily when configuring a trigger, one would specify only the source terminal and the edge to trigger on. Sometimes in NIDAQmx, one can specify another Task or session’s trigger: ‘Dev1/ai/StartTrigger’ and NIDAQmx will route the signal for you.
Alternatively, one can explicitly route a counter timer to a RTSI cable signal: DAQmxConnectTerms('/Dev1/ctr0out’, ‘/Dev1/RTSI0’) , and then use that RTSI line as trigger on another Task/session: DAQmxCfgDigEdgeStartTrig(Task, ’/Dev1/RTSI0’, ‘DAQmx_Val_Rising’) .
These functions work to connect signals on the same or different devices, unlike s.addTriggerConnection which fails when connecting signals on the same device.
Is there a way to accomplish these connections in the DAQ Toolbox? (starting different sessions with the same trigger, with synchronized clock sources, on the same or different devices)
I have a feeling that this may have something to do with the obscure use of the 'External' keyword in the addTriggerConnection function.

Answers (0)

Categories

Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!