11-11-2011 03:59 PM
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
11-11-2011 06:03 PM
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.
11-14-2011 10:46 AM
BUt im using an analog output its is a metering valve that controls the flow rate using an electric motor with 11 turns
11-14-2011 11:44 AM
@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?
11-14-2011 12:14 PM
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.
11-14-2011 12:18 PM
@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.
11-14-2011 12:40 PM
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
11-14-2011 01:25 PM
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.
11-14-2011 01:31 PM
@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.
11-14-2011 01:34 PM
could you show me by modifying mine?