Hey Steve,
Whenever you set up the DAQ Assistant to create all of the code for you (which, by the way, you are wise not to attempt to recreate because that would be a pain), it generates a file in your project corresponding to the name of your mxb file (DAQmx task) that you created. If you are using C#, this file shows by default; however, if you are using another language like VB or C++, these files are hidden. To view this file, click on any item under your project in the solution explorer and then click on the "Show All Files" button at the top of the solution explorer (this should be the second button from the left, depending on version). Now, you should have a *.mxb file inside of your project (named according to your DAQ task name, such as "DaqTask1.mxb". If you click on the plus sign next to this, two things should show up underneath this file: one file with the same name of the mxb file, except .vb or .cs (or whatever else) and a file that contains the word "User". Click on the second file with the word User. This file is a customization of the DAQTaskComponent1 object that you are referring to.
Essentially, the Task is a protected object, keeping in line with the object-oriented design of protecting variables. The DAQTaskComponent generically speaking is used for basic task operations (Starting, Stopping, etc). It can, however, be modified in the user file specified above. Simply add in a method to this file that works as a "getter", returning whatever values of the task you might want to know. For instance, the method below can be added to this file to return the terminal configuration of analog input 0.
public AITerminalConfiguration GetTerminalConfig () {
return Task.AIChannels[0].TerminalConfiguration;
}
(Note that this can be a property or method. The access of the Task variable is simply limited to members of the DaqTaskComponent class.)
Now that this method is added to the class, we can easily refer to this method from the DAQTaskComponent1 object you mentioned using intellisense.
For more information on this functionality, you can find a good explanation in the native Help at url
ms-help://MS.VSCC.v80/MS.VSIPCC.v80/NI.MeasurementStudio.2005/DAQIntegration/XML/Add_Custom_Func_NET_DAQ_Component.html
or just search your local help in VS for "Adding Customer Functionality DAQ".
Please let me know if you need further help with this.
Thanks,
Andy McRorie
Applications Engineer
National Instruments
Thanks,
Andy McRorie
NI R&D