LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Controller: Process Variable not changing

Howdy,

 

I am currently working on a project where I am controlling a two way acting pneumatic piston with two electronic pressure regulators. These pressure regulators accept a voltage range of 0-10 VDC. I am wanting the pressure regulators to be controlled with the speed of the piston measured by taking the derivative of the data obtained from an LVDT. I am very new to LabView and I am having a lot of trouble with this. I am using a PID controller and my process variable, the derivative of the LVDT data, is not changing at all whenever I change my setpoint variable. I have attached my VI below. Am I missing something or are my PID gain values just not right?

 

Thank you for any help,

Shafique

Texas A&M University

0 Kudos
Message 1 of 5
(709 Views)

Oops, the attachment never made it.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(703 Views)

Hm, weird. I'll try and attach it again. Hopefully it works this time.

0 Kudos
Message 3 of 5
(697 Views)

Hi Shafique,

 


@Shafique9601 wrote:

I am very new to LabView and I am having a lot of trouble with this.


This can be seen by your use of ExpressVIs and DDT wires all over the place…

 

  • Your DAQAssistent is set to read 250 samples per channel, but you use those PtByPt-Mean functions on each channel/DDT wire: which result do you expect here and which result do you get? (I guess that will be two different values…)
  • Why do you need a MergeSignal ExpressVI to create a 2D array from 5 scalar values ("Trash"), just to pick the first row from this 2D array???
  • Why do you hide two PID functions inside that case structure, both using the very same PID gains? Why don't you switch the output channel afterwards? Do you know each PID function maintains their own internal state???
  • Do you REALLY need floating point values formatted with 20 decimal digits???
  • Why don't you cleanup your code? Messy code is hard(er) to understand…
  • How did you determine the PID gains?
Best regards,
GerdW


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

Hi GerdW,

 

I did not realize I was making so many mistakes within my code. That being said, do you have any recommendations on how I should clean up my code?

 

Thank you,

Shafique

0 Kudos
Message 5 of 5
(593 Views)