Small treatment plant, glycol chiller on a sample cooler tank. CPU 1214C, TIA V16. I copied the PID_Compact loop from the boiler skid, which has worked for years, and pointed it at the chiller valve.
Setpoint 8.0 C. When the tank drops to 6.0 C the output goes to 100 percent and the chilled valve opens wide, so it gets colder still, and with a warm tank the output sits at 0. Exactly backwards. I put a negative Gain in the tuning parameters and the block did nothing useful with it, and the transmitter checks out against a thermometer. Someone here told me to swap the transmitter wires to flip it, and I'd rather not wire a lie into the panel.
Not sure the block even has a direction setting. What's the right way to do a cooling loop on it? Could someone explain how PID_Compact is meant to be told it's cooling, without me wiring a lie into the panel?
Loop first. At the valve, does the mA you measure match the Output the block shows, and is the valve signal to open or signal to close? If 20 mA is open and the block says 100 percent at 20 mA, the field is honest and it's the block direction.
Valve is signal to open, 20 mA fully open, meter matches Output within a tenth. Field's honest. So I think it's the block.
Open the PID_Compact configuration, Basic settings, and tick InvertControl. The boiler loop wants more output when the PV is below setpoint, a chiller wants less, and the copied configuration still has the heating direction. After ticking it, run pretuning again, the boiler gains will not suit a chiller.
A negative gain is not how this block takes a reverse acting loop, which is why it did nothing useful for you. And do not swap the wires, the next person will trust the drawing.
There's a writeup on the direction and the tuning here: https://plctr.com/implementing-pid-control-in-plc-systems/
Ticked InvertControl, ran pretuning overnight with the tank at temperature, and the loop holds 8.0 within a couple of tenths this morning. Valve closes as it gets cold now, which is the whole idea.
So the copied boiler loop brought its heating direction along with it and InvertControl was never ticked. Ticking it in Basic settings and retuning was the whole job.
One thing I haven't sorted is what the loop does if the chiller trips and the glycol stops flowing, the valve will go to 100 percent and sit there. Wants an interlock on the flow switch, and that isn't the block's job. Thanks larsdk and marekw.
Right to worry about the flow switch. We cooked a pump that way.