02-05-2008 01:57 PM
02-06-2008 02:30 PM
Hi,
In your case both of the signals are continuous, the only difference is that signal coming out form AO1 is not a sine wave but a "arbitrary waveform" where first part of it is a sine wave and the other part a 0 Volt. At the end this waveform is going repeat continuously, right?
What you will need to do is to generate both of the waveforms separately and then load them into the card. You are basically looking at two things, first the example: “Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi” and second the function: “Basic Function Generator.vi” with this VI you can create a 7 cycles of a 5 KHz sine wave play around with the sampling info input of this function. Depending on your Fs “sampling rate” and "# of samples" you will generate a given # of cycles. Make sure you change the DAQmx write to "multiple channels" allowing you to input an array of waveforms.
I hope it helps.
02-07-2008 08:15 AM - edited 02-07-2008 08:16 AM
Here is my real goal: (I have done many of the following Steps in baby steps but my ultimate challenge is to combine it all so it works together.)
The attached ‘All Signals.jpg’ is a visual of how the 4 Steps must work timing wise.
The attached ‘Waveform Troubles.jpg’ is showing my next attempt to combine Step 1 and 2 with Step 3 and 4 without regard to its relationship with Step 1.
The attached ‘-50103 error.jpg’ is a visual of the Reserve error that appears when trying to run this Vi. It appears that once the DAQmx Timing.Vi is executed, it stops any other opportunity to run other waveforms producing a Reserve error, -50103.
Using another PCA such as a PCI6713 helps with the resource issue but the ability to line up the signals has not been found. I tried using a Digital Trigger, but it doesn’t seem to work with the Finite Generation waveform. (Can this waveform be re-triggerable and will there be a level of confidence that it can be lined up with the Sin wave in Step 1?)
02-08-2008 10:55 AM
Hi,
The PCI-6229 has four Analog Outputs so you should be able to generate all your signals from one card, this way we don’t have to worry about synchronization between cards.
Your problem with this setup is that your are trying to configure two different sampling rates on the DAQMX timing VI for the analog output task when your card, even though it has four analog output channels, it only has one timing engine. Only and only one sampling clock can be configure, from the picture I can infer that the 20 Hz signal has a different sampling rate than the 5Khz and you have two DAQmx timing.vi's setting up the clock from the waveforms information to the same card.
So from here you have two options either you build all the waveforms with the same sampling rate or two of the signal are generated with the 6229 and the other two with the 6713.
If you choose the first option your problem will be to find a balance between both signals since you have to build the 5 kHz signal at a rate no less than 10 KHz (Nyquist), and as a consequence the number of samples needed to build a 20 Hz might exceed the available space for the samples.
Your second option using the both cards one to generate a pair of the samples and the other card the other pair you can take a look at these examples: NI-DAQmx: Synchronize Analog Output across Multiple Devices Using LabVIEW and NI-DAQmx: Multiple Analog Output Tasks Simultaneously.
I hope it helps