LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Only load certain channels from task

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.

0 Kudos
Message 1 of 6
(2,646 Views)

Just use the DAQmx wizard.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(2,635 Views)
I have used it in my past and current VI just to create the task at the start of the VI, but it's not as flexible nor will it do half of what I have planned. It's good for general ease of setting up, but not for my specific plans of everything done on the front panel. I would not have gone to this effort for a reason.
0 Kudos
Message 3 of 6
(2,624 Views)
You mean the daq assistant yes?
0 Kudos
Message 4 of 6
(2,620 Views)
No. I meant the DAQmx Wizard

"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(2,604 Views)

Where do I find the wizard? I searched the functions and controls and can't seem to find it.

0 Kudos
Message 6 of 6
(2,592 Views)