LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Acquiring signals at different rates

Highlighted

Hi.
I am trying to acquire 2 differents signals using the same hardware (USB-6212).
The issue is that I have to do it at different rates to each channel, but all the examples that I've found about it use only one sample clock hence use the same sample rating for both channels, just like in the image that i attached.

 

Is there any way to make those two channels in parallel, at different rates? Should I use Master/Slave or any other desing pattern?

Further, how do I calculate the delay of the  acquisition time between those channels?

 

0 Kudos
Message 1 of 12
(1,037 Views)

Since the USB-6212 has only one A/D-converter you can only start one analog-in task. So read both AI channel inside one task with the higher rate and then decimate the values of one channel.

 

Regards, Jens

Kudos are welcome...
Message 2 of 12
(1,026 Views)

@jg69 wrote:

Since the USB-6212 has only one A/D-converter you can only start one analog-in task. So read both AI channel inside one task with the higher rate and then decimate the values of one channel.

 

Regards, Jens


... or resample at the lower rate.

 

But in either case, that seems like an achedemic question because sample at a higher rate is always better than at a lower rate so why throw way better data to make it less good?

 

Ben

Message 3 of 12
(1,020 Views)

Hi Guhal,

 

Is there any way to make those two channels in parallel, at different rates?

Yes it's possible. My Idea is below

acq2.PNG

Should I use Master/Slave or any other desing pattern? 

It's depend type of application that you have. But, I don't advise you this desing pattern "Because you can lost data, Master/slave use notified" Producer/Consumer (Data or Event) it's better.

 

Further, how do I calculate the delay of the  acquisition time between those channels?

Use element of Timing Palette.

 

This video can help you

 

 

Kudos are welcome Smiley Happy

0 Kudos
Message 4 of 12
(1,017 Views)

sss

 


@Fred19ni wrote:

Hi Guhal,

 

Is there any way to make those two channels in parallel, at different rates?

Yes it's possible. My Idea is below

acq2.PNG

...


That will only work if you have more one AI device.

 

have you tried that yourself?

 

Ben

 

PS: If you do not belive me wait until Jens posts saying the same thing. (smiley-wink)

Message 5 of 12
(1,009 Views)

@Fred19ni wrote:

 

Is there any way to make those two channels in parallel, at different rates?

Yes it's possible. My Idea is below

 



NO !!! That will not work on a USB-6216 card! You will get an error on one of the tasks that the resource already is reserved.

 

Regards, Jens

Kudos are welcome...
Message 6 of 12
(1,004 Views)

I actually try that way, but, as they said, the only possible way to use your idea is having more than one device, which is not my case. Anyway, thank you for your help...

0 Kudos
Message 7 of 12
(923 Views)


 


Ben escreveu:

@jg69 wrote:

Since the USB-6212 has only one A/D-converter you can only start one analog-in task. So read both AI channel inside one task with the higher rate and then decimate the values of one channel.

 

Regards, Jens


... or resample at the lower rate.

 

But in either case, that seems like an achedemic question because sample at a higher rate is always better than at a lower rate so why throw way better data to make it less good?

 

Ben



Since my device has a maximum sampling rate, i thought it would be better to use a higher rate to some channels that are more important, and a lower to the other ones. Does it make any sense?

Further, what did you mean when you said to resample at the lower rate? Should I use another DAQmx Timing VI? Sorry for so many questions, but could you give me an example?

0 Kudos
Message 8 of 12
(904 Views)

Since my device has a maximum sampling rate, i thought it would be better to use a higher rate to some channels that are more importants, and a lower to the other ones. Does it make any sense?

Further, what did you mean when you said to resample at the lower rate? Should I use other DAQmx Timing VI? Sorry for so many questions, but could you give me an example?

0 Kudos
Message 9 of 12
(909 Views)

@guhal wrote:

Further, what did you mean when you said to resample at the lower rate?


This is a signal processing trick to take a lot of data and condense it.  There are pros and cons to doing this.  Less data = less power.  Less data = lower bandwidth.  But simple ways to "resample" your data is to perform an average on every X samples to reduce your rate by a factor of X.  More involved resampling (what I was taught in school) is to decimate your data and then apply a filter.  There are VIs specifically for resampling your data in the Signal Processing palette.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 10 of 12
(887 Views)