Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Timing Task In doesn't accept array of Task out

I would like to let the user create the tasks needed to by creating an array of a cluster (4 elements -Min,Max,Enum Type,Phy Channels) and create the correct channels. This works. However, the aray of tasks out need to be fed to the next step which is DAQmx Timing- Task In. The task in won't accept the array. I've tried to convert the array every which a  way with now luck.
0 Kudos
Message 1 of 2
(2,866 Views)
You are correct that there is no way to pass DAQmx Timing multiple tasks.  If you really wanted to you would call it for each task.   I think you would find that that isn't what you want (on pretty much every DAQ device you would run into resource reservation issues since timing resources would be assigned to the first task).

What you really want to do is call create channel repeatedly (which you are doing) but instead of creating a new task each time, add each channel to an existing task.  That means you need to pass a task into Create Channel.  You should probably change the task array out to a shift register (so it is a single element that is preserved between iterations) and wire that to the Task In input of Create channel.  You can use Create Task to create the task initially or code it to use the task out of the first Create Channel.
0 Kudos
Message 2 of 2
(2,864 Views)