11-05-2008 05:08 PM
I am working in an environment were we have many VI users. I develop the VI's and the technical staff uses the GUI (Front Page) to collect data. In order to control the input parameters used on multiple hardware platforms, I would love to develop one generic VI that will import or read a text file that I have created and configures the DAQmx tasks to perform the DAQ operations. In fact, I have the generic VI completed and need to understand how to make the DAQmx configurations more transparent to the end user as long as the end user has the text file to import. Example being, can the DAQ Assistant generate DAQmx tasks based on text file information?
Solved! Go to Solution.
11-05-2008 06:52 PM
Just a thought...
We use a system where all input channels are listed in one task that has a specific name. We then query that task to get the list of channels. We can then show all of the data. The user needs only to configure the channels and the one task in MAX. Would something like this work for you?
Or you could just create a text file that has the list of tasks in it and then start the tasks (if you need multiple tasks).
Rob
11-06-2008 08:58 AM
11-06-2008 09:32 AM
You can go into MAX and export the config file as text and view the format. MAX can also import a correctly formatted config file.
It would probably be just as easy to create a text file (tab or comma separated, ini type) that your top level VI would read. Column one might be a job name, column 2 would be the device/channel list, column 3 the sample rate, etc. All of this is easily read and passed to the DAQmx functions. I would design it so that the configuration could be read from a file or created on the front panel saved. You would need to stop using the DAQ Assistant but that's a good thing.
This will get more complex if you are required to have triggering options, analog out, etc. Do you know how flexible it is supposed to be?
11-06-2008 09:39 AM
"All of this is easily read and passed to the DAQmx functions."
I think I got the text file and format correct from MAX. Thanks for that! Can you please elaborate on the above statement, as I mentioned I'm new to the DAQmx functions? I also think it is great I don't have to use DAQ assistant as it seems rather cumbersome on the base level.
11-06-2008 09:48 AM
11-06-2008 10:02 AM
11-06-2008 10:52 AM - edited 11-06-2008 10:59 AM
I don't have time to do more than a quick example. The VI below has a table with some fixed index array functions. This would have to modified to automatically get the correct rows and columns but I hope you can get an idea. I did not include any code for setting the type of temperature measurement or to set the correct terminal configuration. All of this plus every other possible option would have to be handled in a similar way to setting the channel type and min/max that is in the example.
edit-reattach VI
11-06-2008 01:51 PM
Thanks for all your help. It's a bit brut force, but it will have to work for now. If you run accross other methods for externally configuring a DAQmx channel, please feel free to post them.
Thanks again,
MTL