LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx multi-channel plot using global channels

I have a vi that lets the user select the global channels (up to 😎 and hides any plots not used. This work ok with the sample rate set the same. So I now want to add a second group of data (up to 😎 that will have a different sampling rate and display those to a second chart on a tab page. The global channels get a conflict when I do this because the resourse is reserved. I would like to have several pages with different sample rates and allow each page to have it own plot. The attached vi works with one plot. When I copied the while loop and made a new page I started have the reserved resourse issue. Anybody know a way around this?
0 Kudos
Message 1 of 5
(3,527 Views)
You failed to mention the DAQ board you are using but chances are you are using one with muxed input and you CANNOT set different sample rates for different channels because you have a single convert clock. First, you would need to add the new channels to the old task becaause you can only have a single task for the same hardware resource (analog in), select the fastest sample rate you need for all the channels, and decimate the results for any channel that you want fewer samples for.
Message 2 of 5
(3,523 Views)
I am using the cDaq ni9205 and ni9211 - volts and temperarture. These are in a cDAQ ni9172 chassis. I would like to have a page for voltage a page for temperature and a page for strain ni9237 if this works. I had thought that the pages would be grouped by sampling rate. So now I want to group by different modules. Is that possible? Can I have each module grouped on a page with the same sampling rate for each module (ex. all channel on ni9205 sampled at 3000hz on a seperate page from 9211 sampled at 100hz). Does the ni9172 only allow one global task? What is the solution if I need to measure lots of different AI's and need the user to select the channels? Also, would this even work on a windows based computer or should this be on a real time device?
0 Kudos
Message 3 of 5
(3,512 Views)
I've never used cDAQ so I don't know the details on that. I would imagine that each card could be configured separately but I cannot confirm that.
0 Kudos
Message 4 of 5
(3,507 Views)

Hello Bassinbc,

 

I think that this article will explain the cDAQ chassis' sample rate: Three Methods to Calculate Your NI CompactDAQ Analog Input Sampling Rate

 

The short answer is that all analog input modules in the same 9172 chassis have to be configured in the same task.  This means that all channels will have the same sample rate.  The best way to achieve different sample rates is to sample at the higher rate and then remove samples on some channels to reduce the effective sample rate.

 

I hope this helps, and have a great day!

Brooks
0 Kudos
Message 5 of 5
(3,483 Views)