05-05-2009 12:53 AM
Hy,
I am using labview 8.5, Daqmx and a Usb 6211 daq card. I would like to generate a voltage and acquire it with the same daq card. I used the "multisynch AO and AI" available in the labview help and I customize it.
If the "update generation rate" is different of 1Khz, I don't have a voltage which agreed the specifications you enter in the front panel at "signal generation" and especilally the frequency. So I have a problem when I try to find the good sample rate. I can't change the sample rate of the output signal which is equal to 1KHz. I need to go up to 250Khz for my experiment. But my "input rate" can be settled up to 250Khz. So I cannot plot "Input vs Output" because neither array has the same size. I tried to change the characteristics of each vi, nothing happened. I don't understand. How can I solve this problem? You can show my vi in enclosed files.
Thanks a lot in advance,
Cheers,
05-05-2009 08:52 AM
Have you tried doing analog input and analog out seperately? Does that work for you? You have programmed both tasks for continuous acquisition, yet you don't have a while loop that implements this continuous behavior. Try running both of them seperately and understand each operation. Go through the following article as well:
If you have any questions after that, post back.
05-06-2009 12:19 AM
Thanks a lot for this very helpful advice.
The problem was from the "waveform generator vi". I remove and change it and use another one "create anlog signal viexpress". Both signals are synchronized with a sample rate of 250KHz.
But now, I would like to save the data in "txt or xls files" at each iteration. The aim is to save according to this protocol : for the first loop, the arrays will be saved as test001. Then for the 2nd iteration, as test 002, etc...So I used a "write to measurement files viexpress" , I wired it to the output of the " Build arrays" and placed it inside the while loop. The new problem is that the signal changed and I lost both the signal specifications and the synchronisation. Do you have an explanation?
Cheers,
05-06-2009 12:20 AM
05-06-2009 02:49 PM
The main reason you are losing the data is you are not apending the array you are just building a 2D array of waveforms from the data for each iteration. More specifically you are taking the data from each iteration and placing them in 2 columns. This will NOT store the information and append new data to the old data.
To do this use a shift register to save the data and then append that data... Please see the attached screnshot to see how to implement this.Repost if does not solve your issue... or it is doing something different then what i've assumed...