LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control using DAQ assistant

Solved!
Go to solution

Hi, I am generating sinewave using function generator and acquirng this into my computer using DAQ USB6211 and labview DAQassitant. I want to manipulate this acquired singal using the labview PID control and use the output of PID to generate an feedback  analog singal (similar to the input one). But when I run the code, it gives me an error that the buffer size is less. How do I increase the buffer size so that I can generate the output singal continuously. I have attached the .vi file

 

Thanks a ton.

Krishna

 

0 Kudos
Message 1 of 5
(3,477 Views)
Solution
Accepted by krishnacelos

Hi Krishna,

 

get rid of the DAQAssistents and use plain DAQmx functions!

 

It's never a good idea to use DDT wires in combination with coercion dots: what kind of data does your DAQAssistent deliver and what does your PID expect?

Best regards,
GerdW


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

Hi GerdW,

 

Thanks for your prompt reply. This is my first program that I am writing in labview. I have written now a code for acquiring the signal (without DAQ assistant). I am trying to find way generate signal using PID loop. I have attached the incomplete .vi file. 

 

The need simple proportional amplifier to amplify my input singal but keep the waveform same. Since PID gives a single value at the output I am facing this issue. 

 

Regards,

Krishna

 

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

Sorry here is the right version attached.

 

 

0 Kudos
Message 4 of 5
(3,438 Views)

Hi Krishna,

 

The need simple proportional amplifier to amplify my input singal but keep the waveform same.

Why do you use a PID when you want to amplify your signal?

Why not use a simple multiplication instead?

 

The VI in your last message shows several problems:

- there is no loop, so it executes just once and stops immediately…

- there is a DAQmxWrite-function with no DAQmx task wired in - it will throw an error!

- you really should use the autocleanup tool more often!

- you still feed the PID with a waveform - it does not work with waveforms!

 

Best regards,
GerdW


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