LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pressure control pid help

Ok first and foremost I'm a newbie to labview so Im looking for examples and advice on what I'm doing I have had up to core 2 training but with little experience before and after.

 

My system is a compact rio

Im reading a 4-20 ma transmitter for pressure measurement

I have solenoids to control a pump and bleed isolation valve

after the bleed isolation valve I have a 4-20 ma autoclave metering valve

 

Analog input 4-20 ma transmitter

analog out 4-20 metering valve

digital out pump on/off

digital out bleed ISO valve

 

 

I want to create a pid to control the pressure when I bleed off at a given bleed rate in psi a min

 

I already have a pressure control system that works great for pumping up the system and adjusting the pressure on the fly but need a pid to control bleeding of the system at the given rate and when I'm bleeding I don't want the pump to kick back on to compensate for over shooting the setpoint.

 

 

I have attached my vi for pressure control

 

in order for the metering valve to see pressure the the bleed valve must be open.

 

So if you guys could help me with creating a pid to control the metering valve I would appreciate it

Download All
0 Kudos
Message 1 of 30
(5,067 Views)

There are many, many examples on this forum showing how to use PID to control a digital output by generating a PWM signal that turns the output on or off following a square wave.  See here, for example, as one starting point.

0 Kudos
Message 2 of 30
(5,060 Views)

BUt im using an analog output its is a metering valve that controls the flow rate using an electric motor with 11 turns

0 Kudos
Message 3 of 30
(5,030 Views)

@cbt wrote:

BUt im using an analog output its is a metering valve that controls the flow rate using an electric motor with 11 turns


Even easier, then!  Do you have the LabVIEW PID toolkit, or are you looking for help writing a PID algorithm?

0 Kudos
Message 4 of 30
(5,026 Views)

yes sir thats what im looking for just to control the rate of pressure drop typical rate drop of 500 to 1000 psi a minute really need pid because of the volume of the parts being tested change from test to test.

0 Kudos
Message 5 of 30
(5,024 Views)

@cbt wrote:

yes sir thats what im looking for just to control the rate of pressure drop typical rate drop of 500 to 1000 psi a minute really need pid because of the volume of the parts being tested change from test to test.


I'm still not clear what you need.  Do you have the LabVIEW PID toolkit?  If not, have you searched this forum for implementations of a PID loop?  You're not the first person to ask, so there's probably one out there.  Once you have a PID VI, insert it into your code, test, experiment, and post again with your code attached if you run into problems or have questions.

0 Kudos
Message 6 of 30
(5,021 Views)

Ive created a pid before to bleed release the pressure and it does fine but I need it to drop the pressure over a given time period basically I need to give a rate to lower the pressure over a minute. I will post some code soon

0 Kudos
Message 7 of 30
(5,013 Views)

I have attached my vi Im thinking the control of the bleed valve before the pid is not a good idea now.

 

I need to control the rate the pressure drops over a given time the current code just drops to the setpoint and closes the bleed valve take a look.

 

0 Kudos
Message 8 of 30
(5,006 Views)

@cbt wrote:

I have attached my vi Im thinking the control of the bleed valve before the pid is not a good idea now.

 

I need to control the rate the pressure drops over a given time the current code just drops to the setpoint and closes the bleed valve take a look.

 


What's the point of the two while loops?  You only need one.

 

You need to ramp the setpoint.  You'll need at least one shift register in the while loop to keep track of the current setpoint, and then you'll need to adjust it on each loop iteration.

0 Kudos
Message 9 of 30
(5,003 Views)

could you show me by modifying mine?

0 Kudos
Message 10 of 30
(5,001 Views)