LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update smoothly an analog output?

Hello,
 
I use an analog output of DAQ card as an function generator. I need to update the signal smoothly: it means the waveform in the buffer should be updated only after the previous buffer data are completely send to the output. However, I need to have an continuous signal generation (so that I need to take care about sending data to the buffer if the signal is not updated).
 
Can you send me some example or a hint to a vi I have to use?
 
I am using LV 7.1, NI-DAQmx 7.4 and two different DAQ cards: PCI-6221and PCI-MIO-16E4.
 
Thank you.
 
Jiri
0 Kudos
Message 1 of 5
(3,120 Views)

Check the examples for something like seemless analog output, or the like. I know I have seen examples for that...

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,103 Views)

I have done it and I did not found anything. I have just seen

    • changing (smoothly) output signal by changing the sampling rate during generation (this is not useful for me)
    • by software regeneration (each period) - well, I can program it, but...

Maybe there is some example for traditional NI DAQ (whichis not supported by PCI-6221).

Jiri

0 Kudos
Message 3 of 5
(3,099 Views)

If you can find an example in traditional DAQ, even if it's for another board, that could give you insight on a technique to pursue to solve the problem with your board.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 5
(3,095 Views)
Jiri_2,

There are a couple of ways that you can do this. If you want to keep the same data in the output buffer, you can simply change the rate of the analog output. This is a simple way of implementing a basic function generator. The following shipping example does this:

Cont Gen Voltage Wfm-Int Clk-Variable Rate.vi

There is another option which would allow for a more advanced function generator. In this method, you need to set the the board to not allow regeneration. This means that you will have to continuously write data to the buffer. If you write only whole periods of your waveform, you will not have any discontinuities. This process is illustrated in this example:

Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi

Hope this helps,

Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 5 of 5
(3,079 Views)