10-23-2014 03:43 PM
Hello,
I am using a NI-6211 Multifunction DAQ to output two analog voltage signals that are periodic. I am reading the values for these from a .txt file that is generated in Matlab. The two voltage signals are the same, however, one of them is 1/2 period out of phase from the other.
Here is my output information:
Signal Frequency 100Hz
Sampling Rate 200k
Number of Samples 2k
The text files both have 2000 samples in them.
When I look at the output on the oscilloscope, the first signal looks great, but the second signal has a voltage spike at the beginning/end of the period. I checked the .txt files and the first one starts at 0 and ends at just above zero. The second one starts at about 288 mv and ends at just below 288 mv.
I have attached my .vi as well as a .jpg showing the spike. It spikes towards zero so I am thinking it is some sort of buffer reset or something, but I can't figure this one out... Any help would be much appreaciated.
Thanks
Solved! Go to Solution.
10-24-2014 06:57 AM
Have you checked the wfrms you wired to DAQmx write?
What happens when you create two periodes (4k sample) a spike every periode every second periode?
10-24-2014 08:45 AM
Why are you doing the complicated conversion to and from DDT to get an array of waveforms when you do not provide any timing information? Either use Build Waveform and Build Array as shown or just use DAQmx Write set to 2D DBL.
Like Henrik, I suspect that your data is not what you expect it to be. Put a graph or array indicator on the wires going to the DAQmx Write to see what you have.
Lynn
10-24-2014 01:19 PM
Thanks for the input, the Dynamic Data came from me originally using a DAQ Assistant, but I got rid of it. It now looks as built in your attached image.
No spike now -- but I have a new issue in that if I select the same file (either the original or phase shifted one) for both waveforms it works and outputs great signals, if I choose the files such that the waveforms are different then I get no output anymore... I am going to try and change how I select the files and also rebuild the files just to make sure, but thanks for your help.
10-24-2014 02:30 PM
If you do not figure it out, please post both your VI and the data files.
Lynn