LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate simultaneous analog waveform

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

0 Kudos
Message 1 of 10
(4,794 Views)

What form factor are you using cRIO or cDAQ? Also, can you post one of the examples that you are seeing?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 10
(4,787 Views)

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...

0 Kudos
Message 3 of 10
(4,782 Views)

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.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 10
(4,773 Views)

 

 

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

0 Kudos
Message 5 of 10
(4,765 Views)

Have you had a look at the following:

http://decibel.ni.com/content/docs/DOC-7692

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 6 of 10
(4,748 Views)

@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.

 

21397iDC6EFFE27F9D5CD8

- tbob

Inventor of the WORM Global
Message 7 of 10
(4,741 Views)

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

 

 

 

 

0 Kudos
Message 8 of 10
(4,731 Views)

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"



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 10
(4,719 Views)

@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.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 10
(4,670 Views)