LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing output of DAQ in real time

Solved!
Go to solution

Hello,

I am currently working on generating a sinusoidal waveform, and I'm encountering a couple of issues:

  1. Waveform Output: Although the waveform graph displays the correct waveform, the actual output from the DAQ is producing distorted or incomplete waveforms. This is not aligning with what is shown in the graph.

  2. Real-Time Amplitude Control: I am unable to adjust the amplitude in real time as intended. The changes I make to the amplitude control do not reflect in the DAQ output as expected.

Could you please assist me in resolving these issues?

Thank you!

 

Danny0806_0-1723546490713.png

 

0 Kudos
Message 1 of 3
(238 Views)
Solution
Accepted by topic author Danny0806

Hi Danny,

 


@Danny0806 wrote:

I am currently working on generating a sinusoidal waveform, and I'm encountering a couple of issues:

  1. Waveform Output: Although the waveform graph displays the correct waveform, the actual output from the DAQ is producing distorted or incomplete waveforms. This is not aligning with what is shown in the graph.

  2. Real-Time Amplitude Control: I am unable to adjust the amplitude in real time as intended. The changes I make to the amplitude control do not reflect in the DAQ output as expected.


This is your VI after some cleanup:

  1. After you start the DAQmx task you immediately stop it: which behaviour do you expect from your AO signal in this case?
  2. This is because you don't OBEY DATAFLOW!
    When you want to read an updated value from your amplitude control then you should read from the control and not from a loop tunnel! THINK DATAFLOW…

Your VI is missing ALL error handling.

I recommend to have a look at the DAQmxIsTaskDone function when you use the "Finite samples" mode.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(223 Views)

Thanks a lot for the suggestion. It works now!

0 Kudos
Message 3 of 3
(172 Views)