From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to contrinously output the waveform at a given rate?

Hi all,

  I wonder if it is possible to continuously output a waveform and change the amplitude dynamically. I am going to output sample of 3 volt to analog output channel AO0 at rate 100000 until the digital status of line 2 is HIGH, then outputing samples of 1.5 volt until the digitial statu of line 3 is HIGH, then output 400 samples of 0 volt. Since the number of sample fro the first two stages are not known, I cannot assigned an array of a given length to implement that. Is that any idea to achieve that? Thanks.

0 Kudos
Message 1 of 4
(2,181 Views)

It might help if you specify the device you will be using.

 

Most AO devices have static outputs. Write 3 V one time. When digital line 2 goes High, write 1.5 V. When digital line 3 goes High, write 400 samples of 0 V.

 

Lynn

0 Kudos
Message 2 of 4
(2,175 Views)

@johnsold wrote:

It might help if you specify the device you will be using.

 

Most AO devices have static outputs. Write 3 V one time. When digital line 2 goes High, write 1.5 V. When digital line 3 goes High, write 400 samples of 0 V.

 

Lynn


Hi,

  I am using 6711,6713. If the device support static output, I wonder what's the different between "write once and lasting for somet imes" and "keep outputing" the value at a given rate (i.e. wave form) ?

0 Kudos
Message 3 of 4
(2,167 Views)

This community example shows how to dynamically update waveform attributes. In the example, they have an Event Structure within the while loop to catch user changes to the waveform attributes. When the event occurs, the DAQmx write function is called. Local variables are used to update the changes within the while loop. This code sounds similar to what you are trying to accomplish. The example code uses finite not continuous output.

Taylor B.
National Instruments
0 Kudos
Message 4 of 4
(2,122 Views)