NI-DAQmx Base Error -200428Primary Software: Driver Software>>NI-DAQmx BasePrimary Software Version: 1.3 Primary Software Fixed Version: 1.3.1 Secondary Software: LabVIEW Development Systems>>LabVIEW Full Development System, LabVIEW Development Systems>>LabVIEW Professional Development System
Problem: I wrote an NI-DAQmx Base application and I am getting the following message "Error -200428 occurred at Value passed to the Task/Channels In control is invalid. The value must refer to a valid task." What am I doing wrong? Solution: This error indicates that you are configuring your task incorrectly. As you may know, there are two types of tasks: Dynamic Tasks and Static Tasks. Dynamic Tasks are created manually in LabVIEW, Static Tasks are generated from the NI-DAQmx Base Configuration Utility. Anytime you create a Dynamic Task, you NEED to put down the DAQmxbase Create Task.VI before the DAQmxbase Create Channel.VI. If you don't put them in this order, you are going to have the error mentioned above. Remember this is the case for DAQmx base only, because in the normal DAQmx API (not the base), you can put down a DAQmx Create Virtual Channel.VI without the DAQmx Create Task.VI and not get the error. This is because the driver automatically creates the task for you. Finally, you need to put down at the end of your program both the DAQmxbase Stop Task.VI and the DAQmxbase Clear Task.VI. When creating a Static Task, you only need to put down the DAQmxTask Name in the Block Diagram and write down the name of the task you created in the NI-DAQmx Base Configuration Utility (remember that you can't select the task by right clicking the Task Name and selecting browse. Only Tasks created in MAX appear on that list, not the ones created on the NI-DAQmx Base Task Configuration Utility.) After the DAQmx Task Name you only need to put down the Start Task.VI. Finally, you only need to put down the Stop Task.VI, you don't need the Clear Task.VI. The Clear Task.VI is only used when creating Dynamic Tasks. Related Links: KnowledgeBase [3HUGMLN5]: What is the Difference Between a Static and Dynamic Example for NI-DAQmx Base? Attachments:
Report Date: 12/29/2004 Last Updated: 09/05/2008 Document ID: 3GSFUNMP |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
