From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-19-2018 01:22 PM
I want to have a list of Boolean controls that represent each of the channels for a particular module. I have it so that the program will combine everything, just if you deselect any of the channels out of order it will not correct the channel string. IE with channels 0 through 5 selected I get cDAQ1Mod1/ai0:4, if Channel 2 is deselected I get cDAQ1Mod1/ai0:3. I need it to send out cDAQ1Mod1/ai0, cDAQ1Mod1/ai2:4. I am using a cDAQ-9172 4 bay Chassis with Labview 17. Here is a copy of the test program that will get put into the main program later when the problem is fixed. Thanks in advance.
Solved! Go to Solution.
07-19-2018 01:40 PM
I can't see your VI (I'm on LV 2016), but I would just ditch the colon syntax. This will be much easier to code up than trying to figure out how many channels in a row are selected.
So Channels 0 to 2 would be:
Mod/ai0, Mod/ai1, Mod/ai2
Channels 0 and 2 would be:
Mod/ai0, Mod/ai2
07-19-2018 01:55 PM - edited 07-19-2018 01:56 PM
Dig into the DAQmx->DAQmx Advanced->DAQmx Utilities palette. There is a nice function in there for you: DAQmx Flatten Channel String. The idea is that you build up an array of your channels and pass the array into that function and out will come a string that gives you what you want.
07-20-2018 05:44 AM
I think that this will work. could you please send me this as a vi. I am still relativity new to LabView. I cannot quite figure out how to get everything you have into my program. Thank you.
07-20-2018 06:17 AM
@RL69 wrote:
I think that this will work. could you please send me this as a vi. I am still relativity new to LabView. I cannot quite figure out how to get everything you have into my program. Thank you.
That image is a snippet. Save that image to your computer and then drag it onto your block diagram. Instant code!
07-20-2018 01:43 PM
Works Great, Thank you, big help.