11-25-2014 03:29 PM
I am creating a VI that creates a task from a UI that users can easily use. The user chooses the channels they want to use (by boolean next to the physical channel), then channel names, load loadscale from max or calculate scale using 2 point linear calibration ie slope) and so on. The user can then choose to save the scale for future use.
At the end I plan on creating/saving the task to be loaded in another VI.
I'm almost there but the selection of channels part I am not 100 percent certain on.
Now I can easily extract the channels from the task and only enter them back into the task (case structure inside an indexed for loop) if the boolean is true for that channel. So only true channels are saved.
But the plan is to also have a load task function at the start so tasks can be loaded and edited in this VI as well.
Problem is that if all channels are not saved in the task then my design doesn't work because those physical channels not saved won't be in my table on the front panel. Then those channels are effectively permanently removed from the task.
I am considering to save all channels, but change a channel name if the boolean is false. Then in the load task at the beginning, if the task name has that text in it then make its boolean false on load. So the info is all passed over correctly. Then in the other VI that will use these tasks (acquisition VI) , only load the channels without the text in their names.
Is there a cleaner way? This VI has been a big learning curve as I haven't developed much in the past6 years due to not needing to write new code.
Hope this isn't confusing, Peter.
11-25-2014 03:43 PM
Just use the DAQmx wizard.
11-25-2014 03:50 PM
11-25-2014 03:53 PM
11-25-2014 04:41 PM
11-25-2014 05:38 PM
Where do I find the wizard? I searched the functions and controls and can't seem to find it.