From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant Channels

Hello,

 

I have a DAQ with 4 channels with analog inputs. Right now, I am only using ai0, the first analog input channel which I configured by going directly into the DAQ Assistant block and choosing the channel. I am soon going to have to use multiple channels, and I would like to make a user-friendly interface in which they choose which channels to make active. My thinking was making 4 toggle/switches for each channel which the user can easily make active/inactive and plug in the appropriate wires to the physical channels. 

 

How do I go about doing this; how and where do I connect these booleans to do what I described? Thank you.

0 Kudos
Message 1 of 17
(3,486 Views)

Hi laps,

 

your task will become easier once you get rid of the DAQAssistent and use plain DAQmx functions!

 

You still can use 4 buttons then (or an array with 4 button elements): with each enabled button you can add/append another channel to your channel string…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(3,483 Views)

I'm just going to redirect you to a recent thread: https://forums.ni.com/t5/LabVIEW/Selecting-channels-with-a-Boolean-control/m-p/3819305


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 17
(3,479 Views)

First, don't go with the bool or four bools  Use a listbox with the output as array and selection mode 0 or more (auto index the indices to build the channels from the array of selections)

Ala Kazam!

Capture.png

Nicely SCALEABLE!

 

Second, DON'T DO THAT!

So, You got 4 AI Channels.  Read them ALL ALL THE TIME!  Use The Plot Visible Property to display only what is interesting and (Just saying here) Read the plot visible property to stor only the channel data of interest *(to TDMS of course)

 

Capture1.png

NOTE: The For loop should auto-index on all AI, My device has more than 4 AI.Capture2.png

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 17
(3,451 Views)

Hi Jeff,

 

Nicely SCALEABLE! Second, DON'T DO THAT!

There are cases where you don't want to read all available channels. In such cases you only put the channels in the task that you really need!

 

Example: using a multiplexing ADC DAQ card and you want/need to minimze the (timing) delay between the samples…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 17
(3,434 Views)