04-19-2010 08:59 AM
Hi,
I start my DAQmx task with a trigger on a rising digital edge. This works fine, but I have to watch on 4 channels, not only on one.
So if I get a digital on any of these 4 channels my DAQmx task should start.
How can I modify the standard DAQmx trigger start to include 4 channels - to be monitored for a digital edge to start the connected task?
Thanks.
Solved! Go to Solution.
04-19-2010 10:08 AM
I'm not aware of any standard NI data acq boards that will let you directly specify a trigger to be "whichever one of the following 4 signals happens to transition first".
If you have an M-series board, there's an indirect but fairly simple way where you wire the 4 signals into port 0 and run a DI task based on change detection. Then on the other task that you want to trigger, you specify the "change detect event" as the trigger source.
Sorry, I'm not near a LV machine so I can't easily post code or screenshot.
-Kevin P
04-20-2010 12:11 AM
Hi,
I use the standard "DAQmx trigger", see attached screenshot. There it is possible to specify one single channel for the trigger.
So is it also possible to extend it to listen on 4 channels at the same time? If not I will try Kevin's idea.
Thanks
04-20-2010 09:19 AM - edited 04-20-2010 09:20 AM
Unfortunately, it is not currently possible to use multiple lines as triggers. The change detection approach will be the closest approximation to this. One other option, assuming you don't mind a small amount of external circuitry, would be to use an OR gate external to your terminal block that ORs four external lines and routes the result to a trigger line. That would likely be the simplest solution, as OR gates are relatively cheap and this wouldn't require a software change.
Regards,
04-21-2010 04:45 AM
Thanks, this works - but I changed my code and have now a different method - see my next thread.