06-08-2010 08:01 AM
I have a closed loop feedback control which involves pressure transducers (measures pressure and sends feedback) and electro-pneumatic transducer (a pressure regulator). My setup is such that for part of my experiment I use one SUBVI (say subVI-A) to build up a pressure (say from a to b psi) in a system and then I need to use another SUBVI (subVI-B) to increase the pressure from (say from b to c psi) in the same system. Which of these SUBVIs are executed is controlled by the main VI using a event structure.
My problem is that both these SUBVIs are independent in the sense that each SUBVI contains its own DAQmx Read, PID and DAQmx write. So when I use subVI-A and increase the pressure from a to b psi, the input to the PID is b psi from the pressure transducer the output from PID is say 0.9 VDC (voltage DC) to the electro-pneumatic transducer. But then when I call subVI-B, which has its own PID the output from the PID in the first call is 0 (zero) which send 0 VDC to my electro-pneumatic transducer and 0 VDC corresponds to 0 pressure and immediately there is this sudden drop in pressure. So the effect is like going from either 0 psi or some value between 0 and b psi to c psi instead of going from b to c psi.
I tried using the PID output rate limiter.vi but it doesn't work like I want it to. I would like to know if there is a standard efficient solution for this which I am missing, if there isn't a standard solution then can anyone please tell me how can it be done.
Thanks.
06-08-2010 08:17 AM
Hi Sharmaa,
I would also use that 'PID output rate limiter.vi ' in what way it doesn't work. What happens?
06-08-2010 10:10 AM
In PID output rate limiter.vi I can specify a value of the output at the first call and then I can limit the rate at which the output varies. When I use the PID out rate limiter.vi I can wire the last output from subVI-A (say process variable to PID in subVI-A is 10 psi and the output from the PID to the electro-pneumatic transducer is 0.9 VDC) as the initial output. Ok so when I call subVI-B for the first time the output is 0.9 VDC (at this point the process variable in PID in subVI-B is 10 psi and the output from the PID is 0 VDC but since I have PID output rate limiter.vi my first output to electro-pneumatic transducer is still is 0.9 VDC, no change in pressure). But in the second call the output from the PID will be more than 0 VDC but very much less than 0.9 VDC but I could limit the drop in the output to the electro-pneumatic transducer by wiring in a small output rate in the PID output rate limiter.vi. There will still be some fall in pressure, though small, but I also have a user VI which ramps the setpoint from a current value to a target value at a given rate. So if I wire a really small output rate to the PID output rate limiter then my process variables will lag considerably behind the setpoint. If I wire in a large output rate then there would be considerable drop in the pressure before it started to rise again. Even if I were to calibrate my electro-pneumatic transducer and wire exactly the correct output rate (as that for the setpoint ramping vi) then too I think there would be quite a drop in pressure initially.
So I was wondering if I could call the PID.vi in different subVIs without any initialization (unless specifically initialized) of all the processes that goes within the PID.vi, so that it retains the values from the previous call in a different subVI. Something like the global variable as opposed to a local variable if that is any analogy at all.
Thanks.