10-03-2018 05:43 PM
I need to figure out a way to trigger several DAQmx tasks from a SW timed event.
The situation is that I launch my tasks in asynchronous processes and the number of tasks and the exact order in which they launch is determined at runtime (highly configurable system). All the examples and triggering methods I can find rely on the trigger to be generated by the "master task". The typical DAQmx process is that you tell all the other tasks to start on a digital trigger, for example ai/StartTrigger, then start all those tasks but wait to start the master task until all triggered tasks are running. I can't do that with async processes.
What I want to do is launch all my tasks and start the task as part of the launch process. When I get a confirmation that the processes all launched, I can then send the trigger. I'm just not finding a means to send that trigger programmatically, apart from any of the actual DAQmx tasks.
Suggestions?
10-03-2018 07:10 PM
Well, you don't show any code, and don't describe the devices you have. What I've done with a USB-6009 to trigger, say, an A/D conversion (which could be used to start a similar task on a second USB-6009) is just set a Digital Output channel from 0 to 1 (and sometime after that, return it to 0). I wired this to the Trigger Input for the A/D, and off it goes! If I have two such devices, I can "branch the wire" and send the same pulse to another DAQ device.
Bob Schor
10-04-2018 08:18 AM
Attached is an example of what I'm trying to do. The code doesn't run because none of the tasks are reserving the trigger to actually exercise it. This simple case is two tasks on a cDAQ 9178. I want to set both tasks to trigger on the same source and then later, when the application determines everyone is ready, to actually exercise that trigger. There are no digital modules in the system and I don't want to add one nor do I want external wires. I want to use the chassis features only.
10-04-2018 08:31 AM
Thank you for including code and more fully explaining what you want to do.
Bob Schor