04-26-2011 07:13 PM
05-03-2011 05:16 AM
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
05-06-2011 06:09 AM
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
05-06-2011 07:35 AM
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
05-06-2011 08:34 AM
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
05-06-2011 09:01 AM
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
05-06-2011 09:09 AM
Hi Christian
Thanks a lot for your quick reply.
I will try it and I let you know how it works.
Thanks
Blokketto
05-06-2011 10:50 AM
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
05-06-2011 11:00 AM
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