Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Task name constant not recognized

I am using the NI-DAQmx API to do a single point read, using the "Cont Acq&Graph Voltage-Single Point Optimization" example vi as my baseline. This works fine as long as I use the DAQ Assistant Express vi to create the task as shown in the example. If I probe the task output terminal of the DAQ Assistant I see that the output task name is "_unnamed Task". If I convert the DAQ Assistant vi to a Task Name Constant, and the select a task from the pull-down menu I get the following error at runtime: "error -200088 task is invalid or does not exist". A probe shows the correct task name, and the task runs fine using MAX. I am a neophyte and sure I am doing something wrong, but I can't figure it out. Please Help!
 
Thanks
John
0 Kudos
Message 1 of 2
(3,016 Views)

Hi John-

I am a bit unclear on what you mean by "convert the DAQ Assistant vi to a Task Name Constant."  Are you replacing the DAQ Assistant with a DAQmx Task Constant?  You will need to first create the task in MAX and save it with a name.  The "_unnamed TaskX" format is only used for dynamically created tasks using the DAQ Assistant or the DAQmx VIs themselves.

So, you will first need to right-click on Data Neighborhood in MAX and choose "Create New..."  Then select NI-DAQmx Task and configure the task type and device channels and save.  You should then be able to use the task constant pulldown.  One caveat of this approach is that you will need to use the DAQmx VIs to perform the read/write operations; the task name alone is not sufficient.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 2 of 2
(3,004 Views)