10-09-2014 03:16 PM
I have a PCI-6251 card in my PXI, that i have interfaced with the old trusty SCB-68.
I would like to measure with great accuracy, a sine wave on TWO channels. The sine wave will sweep in frequency from 1khz to 20 khz.
This card can do 1Ms/sec in multichannel mode. So 2 channels is 500K samples per channel/second. At 20 Khz, thi should give me 25 samples per period at 20 khz. I dont see this at all. I am aliasing like crazy.
Is my VI too slow? Have I misunderstood how to set up the DAQ assistant? I just want to get the most samples possible, so I can analize this signal.
I have attached my crappy VI, If somebody could help me out I would really appreciate it.
10-09-2014 03:44 PM
Do not use N Samples for you mode. You will need Continuous Samples. And then I'm willing to bet you will be getting buffer overflow errors. Those will come about because saving data to disk is horribly slow and you will not read your data fast enough for the DAQ. If you don't need the file type to be a tab delimted text file, use the TDMS Logging feature in the DAQ Assistant. This will stream your data straight to a TDMS file (which can be opened in Excel with the plugin), so you won't have to do a thing to format and save to disk. Just read and show the data on your charts.
10-10-2014 09:42 AM
Ok. well i dont have the TDMS on my DAQ, but I am downloading the newest version now. Will i have to rewrite the VI for this? Will I be able to run this vi on other computers with older versions of MX?
10-10-2014 10:29 AM
What version of DAQmx are you using? The TDMS Logging came out with DAQmx 9.0. Since you are using LabVIEW 2009, the newest version of DAQmx you can use is 9.7.0
10-10-2014 11:01 AM
Ugh. I just spent 40 minutes downloading 9.0 and it says I have a newer version already installed?
10-10-2014 11:01 AM
How do I acess the TDMS features?
10-10-2014 11:17 AM
10-10-2014 04:02 PM
Be sure to put a default value of >0 in your wait control. Are you expecting the user to control the acquisition rate or the DAQ assistant? If the user is controlling it then I would set the DAQ assistant for "1 Sample". If the other way around get rid of the wait.
If you are wanting to sample at 500K then your sampling frequency needs to be set to 500K not 100K in the DAQ Assistant?? Better to find timing issue early on. You might find that you really can't get all the way up to 500K with two channels. Also like crossrulz suggested you need to change to continous mode.
It appears that you need to set up a Queue for your data. I would suggest looking at the Continuous Logging and Measurement Template. I think that would fit better to the system that you are trying to design.