02-18-2008 01:42 AM
Hi LVB,
what is the aim behind saving the task/channel to a project file? If you create a task and channel in max you can use it in your application, but if you want to execute your application on an other pc you have to create the tasks and channels again. Why don´t you create your tasks and channels in your application and you don´t need the MAX?
Mike
02-18-2008 07:38 AM
02-18-2008 07:55 AM
Hi LVB,
you can export your current MAX settings to an ini file (Max: File -> Export) and add this to your project file. In your application you can load the ini file and read the information you need. To build the tasks you want or to modify existing tasks you can use the DAQmx property nodes and function blocks.
Mike
02-18-2008 09:24 AM
02-18-2008 01:08 PM
Hi LVB,
We have a set of VIs that enable you to create and delete tasks, channels, and scales in MAX using the DAQmx storage pallet DAQmx>>Advanced>>System Setup>>Storage, however this is not possible with the channels that you create in a project.
Chris_K
01-26-2009 07:16 PM
Hi all,
It seems I am trying to do something similar here.
I have a list of daqmx tasks created in a project.
I want to be able to select 1 or more of the tasks programmatically depending on a config file.
The function "Daqmx system > tasks" outputs an array of tasks created in MAX. One or more of these tasks can then be selected.
How can I achieve this with tasks created in a project?
Any ideas?
cheers
Frank
01-27-2009 03:50 PM
Hi Frank,
You can select tasks created in a project by using a task constant found on the DAQmx funtions pallette. Place the task constant on the block diagram and you will be able to click it and select the task of your choice whether it is created in Measurement and Automation Explorer or with a project. Please be sure that the vi you are placeing the task constant in is included in the project. See the attached screen shot for clarification.
01-28-2009 08:12 AM
Margaret,
Thanks for the response, but please notice the title of the post. The question is not how to do this in the development environment, but programatically.
01-28-2009 08:02 PM
Hi,
I found a simple solution.
I create a number of tasks in the project.
Then have an initialised array of those tasks in the vi.
The config.ini file selects the array index.
As long as I remember to add any new task made in the project to the array!
cheers
Frank
11-19-2010 06:42 PM
You might find the VI's discussed here helpful:
Programmatically Call LabVIEW DAQmx Assistants
These VI's will let you call the same VI's that MAX uses to edit channels and tasks programmatically!