Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9207 sampling rate

Hi everyone
I am a new labview user and I am still learning how to use it. Anyway, for job reason, I have to acquire continuous data using the NI-9207 and the NI-cDAQ 9174.
I have found a VI from the labview example to acquire continuous data. I want to use the vi to acquire data from a signal generator. Using an oscilloscope I can see that the generator supplies a perfect sine wave but my VI shows a kind of square wave. I think I have missed or made some mistake with the sampling parameters. I set the acquisiton channel using the DAQmx by choosing the option continuous sampling but I am quite sure I made mistakes setting sampling rate and n.of samples.
I know the maximum sampling rate of the NI-9207 is 500S/s. If I want acquire, for example, a sine wave of 30Hz, I know I need to sample at 60Hz to avoid the aliasing. if I want 10 samples x second, what will be my sampling rate to set??
If, for example, I want to acquire data using two channels, my maximum sampling rate is 500/2?
Thanks everybody for the replies.
Blokketto 76
Smile
0 Kudos
Message 1 of 9
(8,409 Views)

Hi Blokketto,

 

You are correct that the overall maximum sampling rate of your NI-9207 module is 500S/s meaning that this maximum sample rate is essentially shared among each of your channels. For example, if you are looking to acquire from two channels the maximum sample rate achievable is 250S/s/channel.

 

The problems you are experiencing sounds very much like a symptom of aliasing to me. The Nyquist theorem states that in order to accurately represent the frequency of the sampled signal you must sample at a rate two times the maximum frequency component of your signal. It sounds from your post that you are doing this so the frequency of the sampled signal should be correctly measured. Is this the case?

 

Nyquist's theorem also sates that in order to accurately represent the shape of the sampled signal you should sample at a rate of five to ten times the highest frequency component of your signal. For your case, if you are trying to accurately represent the shape and frequency of a 30Hz sine wave, you should be sampling at 150 to 300 Hz.

 

I hope this helps but please let me know if you have any further questions.

 

Best Regards,

 

Christian Hartshorne

NI|UK

0 Kudos
Message 2 of 9
(8,396 Views)

Hi CJ

 

thanks for your reply. I Imagined it was an aliasing problem and I solved it.

About the sampling rate I have another question. Because I would like to acquire data from different channels, often the sampling rate ok for one channel is not good  for another cahnnel because the parameters to measure are different.

In my  NI cDAQ 9174  there are 4 spaces to connect 4 NI 9207. Is it possible, for example, to set  a sampling rate for the first NI 9207, for example 200S/s, and to set another sampling rate for the second  NI 9207, for example 300S/s using a single VI?

If this is possible, can the VI acquire from both the NI 9207 simultaneously???

 

Thanks

Blokketto

 

 

0 Kudos
Message 3 of 9
(8,390 Views)

Hi Blokketto,

 

One of the major advantages to the NI cDAQ 9174 is that is uses the STC3 timing chip. This timing chip has 7 timing engines in total, 3 of which are dedicated to Analog input tasks. This means that you should be able to run 3 of the modules at different rates which will use the three available timing engines. The fourth module will therefore need to run at the same rate as one of the other modules in the chassis.

 

You should be able to implement this in your LabVIEW code using separate DAQmx tasks running in separate parallel loops.

 

I hope this helps.

 

Best Regards,

 

Christian Hartshorne

NI|UK

0 Kudos
Message 4 of 9
(8,385 Views)

Hi Christian

 

Thanks for the reply.

 

So now I know that I can use the NIcDAQ9174 to acquire different data using different sampling rate only for 3 of the modules.

Also I know I can use a single VI to acquire data. You suggest to implement the VI with parallel loops but I don't know how to attach the second loop to the bottom of the of the DAQ. I attached my VI can you show me how to do that?

 

Thanks

 

Blokketto

 

0 Kudos
Message 5 of 9
(8,378 Views)

Hi Bolketto,

 

You will need to set up separate DAQmx tasks for each of the modules that are going to be run at different rates. This means that you will need to create a separate virtual channel, set up the timing separately (as the timing parameters will be different) and then start the task separately.

 

I have very quickly modified your VI to demonstrate this.


I hope this helps.

 

Best Regards,

 

Christian Hartshorne

NI|UK

0 Kudos
Message 6 of 9
(8,373 Views)

Hi Christian

 

Thanks a lot for your quick reply.

I will try it and I let you know how it works.

 

Thanks

 

Blokketto

0 Kudos
Message 7 of 9
(8,371 Views)

Hi Chistian

 

I have other two questions, sorry.

Every  minute the VI saves a txt file. I want to send this files to another computer using the TCP/IP technique. I found an example to do this but I have two problems.

1) when I connect my data to the Type Cast it gives me an error by telling that the Type cast does not accept Polymorphic Data. The link works if I create a big array with the data of all the channel but in this way I lose the time information that I need.

2) if I want to send any saved file automatically to the Client, how can I do using my VI?

 

Thanks

Blokketto

0 Kudos
Message 8 of 9
(8,360 Views)

Hi Blokketto,

 

Your latest questions are now completely unrelated to the original post and the thread subject. As such, I recommend that you post these latest questions on a new thread.

 

Best Regards,

 

Christian Hartshorne

NI|UK

0 Kudos
Message 9 of 9
(8,355 Views)