08-13-2010 05:55 AM - edited 08-13-2010 05:57 AM
Dear all,
Does any one know about example generating 4 different signals on 4 analog output channels simulataneously through NI 9263 card
I tried some ex but they are either for 1 channel or not simultaneously.
Regards,
Shrek
08-13-2010 06:11 AM
What form factor are you using cRIO or cDAQ? Also, can you post one of the examples that you are seeing?
08-13-2010 06:28 AM
Thanks for replying.
I am using LV 86
cDAQ 4 channel chasis 9174 with NI 9263 card.
In Example Finder>Hardware Input and Output>DAQmx>Analog generation>Voltage>Cont Gen Voltage Wfm-Int clk.vi
waiting for your reply...
08-13-2010 06:54 AM
The example that you pointed out should work fine for the hardware setup that you have. Why are you saying that you are not able to see simultaneous output? The DAQmx engine should be able to take care of this inherently.
08-13-2010 07:12 AM
The desired input frequency has only 1 control, but i want 4 different frequency signals,
guide me if i will be able to generate 4 different frequency signals with the same example.
thanks for your interest.
Regards
08-13-2010 09:00 AM
Have you had a look at the following:
08-13-2010 11:07 AM
@shrekt wrote:
The desired input frequency has only 1 control, but i want 4 different frequency signals,
You need to create an array of all your AO channels and create an array of waveforms. The first waveform will go to the first channel, second waveform to the second channel, and so on. Instead of waveforms, you could use a 2D array of DBL with each row acting like a waveform. Here is some code that uses an array of waveforms. It will send out 2 different signals of different shapes, frequency, etc. You can adapt it to send 4 by just increasing the channel array and the waveform array. If you use the 2D array instead of 1D of waveforms, you need to change the DAQmx Write selector to indicate a 2D array.
08-14-2010 12:55 AM
Thank you all for the support,
My main goal is to generate 4 simultaneous square wave at const. amplitude 10V with frequency range of 0-8000Hz at a step of 50Hz.
I tried the examples.
Different frequencies are generating but by keeping the high sample clock frequency also, the frequencies generated are not accurate.
Explaination for the above statement:
I have generated 4 AO with different frequencies (clock frequeny 100KHz & samples per buffer 10000)and connected the output to the DSO (Digital Storage Oscilloscope) and measured the frequency, It is working fine for lower frequencies but the higher frequencies are not accurate.
for ex. generated 400 Hz--> measured (DSO) 400Hz
1200Hz-->1200Hz
1500Hz-->1493Hz
2300Hz-->2273-2326Hz
3100Hz-->3030-3125Hz
4150Hz-->4000-4167Hz
5250Hz-->5000-5263Hz
7000Hz-->6667Hz-7143Hz
7775Hz-->7692-8333Hz.
(2273-2326Hz) means DSO shows these two values for the given frequency(fluctuating between them).
Regards,
Shrek
08-14-2010 06:06 AM
I am not an expert on analog out functions in Labview. But in the setup from Tbob it could be a mismatch in timing regarding the DaqMX timing and the signal generation timing. Open the hood on the "Waveform Buffer Generation (multi).vi" from your original example. And incorporate this with the design idea from Tbob. But remember to use save as option so you do not overwrite the original "Waveform Buffer Generation (multi).vi"
08-16-2010 01:47 PM
@shrekt wrote:
It is working fine for lower frequencies but the higher frequencies are not accurate.
Some of these DAQ cards will not produce the exact frequency you are looking for, especially at higher frequencies. They use one master clock for signal generation. There is some formula (I couldn't find it in the product spec) whereby the exact frequency output is determined by dividing the clock down by some number N. I wish I could find the formula, it would help to explain. The card will output something close to what you are asking, but not exactly at the frequency you wish.
Remember, this card is not a signal generator, it is an analog output card, and a rather inexpensive one. If the clock is 10 Hz, the output can be divided down to produce 1 Hz, 2 Hz, etc. but it cannot produce 1.5 Hz or 9 Hz. So the requested frequency gets adjusted to something that the card can produce. If you want exact frequencies, you will have to use a signal generator.