09-27-2013 01:46 PM
You need to break down, and understand, each element of your system: the analog input/pressure gauge, the PID controller, and the output/valve. As far as I can tell you don't seem to know if any of them are working. Have you tried separating them out to verify the operation of each one independently? That's what I was trying to tell you to do by replacing the analog input and output with controls and indicators - demonstrate that the PID works, with a constant non-noisy input source that you could change.
Do you know that your pressure gauge responds to changes in pressure? Have you confirmed that as the pressure goes up, you read increasing voltage?
Did you experiment with the PID block as I recommended? Did you set it to proportional control only, and then see that a change in the setpoint caused a change in the output (again, purely on the screen)? If you couldn't do that, spend some time debugging and understanding why not.
Have you tried writing values directly to the valve, without using PID? Do you know that you can open and close the valve by writing different voltages?