Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx multi analog output - HowTo

Hello,
 
I am thinking to generate 2 wfms with my PCI-6221: 1st a square wave @2KHz with varying amplitude; 2nd a sinusoidal wave shifting from 0.5KHz to 5KHz.
I was told this is not possible with a single PCI-6221, since it is not possible to adjust the sampling rate of one wfm without affecting the other, am I correct in saying so?
In order to achieve the goal, I am planning to use 2 PCI-6221 boards attached with RTSI cable to synchronize simultaneous wfm generation. Since I am working with C++, the DAQmx C samples provide little information on this topic ( synchronize 2-board Analog Output), Can anyone help?
 
Thanks!
 
0 Kudos
Message 1 of 4
(3,310 Views)

Hi!

 

Thanks for contacting National Instruments.

 

The following location has some great examples in C that will help you get started with your application.

 

C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Synchronization

 

These examples are not specific to C++. However, the syntax that you will be using is the same. I will look into the issue to see if I can find a C++ example that fits your requirements.

 

Regards,

 

Somendra

0 Kudos
Message 2 of 4
(3,279 Views)
hello Somendra,
 
Thanks for responding, I got another question on the issue of square wfm generation with DAQmx, since I am using C++ instead of LabVIEW, there is no function generator VI to select the type of wfm output, i.e. sin; square; triangle; etc. Now I want to change the amplitude of a 2KHz square wfm so it becomes something like Amplitude Modulated of 20Hz. (The AM freq carrier is 2KHz with a 20Hz signal)
Can you advise me on how to achieve this goal?
 
Thanks,
Rolly
0 Kudos
Message 3 of 4
(3,262 Views)

Hi Rolly,

Now I may be mistaken, but I would think that if you have an array of points for each of your waveforms, as long as you have the same number of points for each waveform you can just add each index of the array together and you should get a waveform that is the two superimposed together.  You'll have your fast 2 KHz signal that has a slowly varying component at 20 Hz. 

Thanks,

Laura

0 Kudos
Message 4 of 4
(3,240 Views)