08-29-2011 08:04 PM
I've developed a quick config .vi for our test lab, but I'm not sure how to implement the conifg into building an actual task. I've designed it to output an array of booleans for active or non-active channels, than you give a name and scale, the attached vi's show my example better than I can put it into words.
I can't figure out how to implement it though in the task building side of things though. I thought a for loop with all the info fed into it, parsing each channel at a time would work well, but how do you differentiate between on and off channels. I thought I could just go ahead and sample them all and than use the boolean array to cut out the unneccesary channels, but that's a little ridiculous, considering the channel count the final product will have.
Anyone have any other ideas or could maybe point me in a different direction?
-Ian
08-30-2011 01:02 AM
Hi iyeager,
Post your VI in 2009 or 2010, to get the solution fast, as of now very few engineers using 2011.
08-31-2011 10:56 AM
iyeager,
I don't understand what you mean in terms of building a task. It seems like you're looking for a better way to interact with the booleans on your front panel instead of having them all separate? Is that your goal? And if so, what do you want your final result to be, how do you want to communicate with your device? What output would you like to have?
Regards,
Michael M
NI Americas | AE
NI.com/support | 1866-275-6964
08-31-2011 11:41 AM
08-31-2011 02:04 PM
iyeager,
You're going to want to programmatically create your task.
You can use the "DAQmx Create Channel VI" and wire in your inputs there. If you do it manually, you can use a string indicator to see that there is a comma and a space separating the channels. You can then concatenate your inputs into a string and send that into the create channel and create a task from there based on just the channels you want.
Regards,
Michael M
NI Americas | AE
NI.com/support | 1866-275-6964