defcon.klaxon
Lifetime Supporting Member
Hey guys, I'm taking a look at some existing code that I've converted from 90-30 to RX3i. I'm trying to figure out the configuration of some PID loops and I've got a few questions I haven't been able to figure out despite reading the Instruction Help.
The biggest question I have is the Upper and Lower Clamp values for the CV. The Instruction Help says that the clamp values, "define the highest and lowest value for CV". But what I don't know is, does this scale the output or does it just limit it? By that I mean, in the existing code I'm seeing that the Upper clamp for some of the loops (valve control) is 32,000 which corresponds to the raw output of analog outputs which makes perfect sense. But Upper Clamps for other loops are much lower, like 20,000 but the CV is still going to an analog output. So what I'm wondering is, does the Upper Clamp simply keep the output from exceeding the Upper Clamp value, or does it scale the output of the PID loop to max out at the Upper Clamp? The Upper Clamp value of 20,000 makes me think that the programmer did that to keep the valves from opening too much but the "max" value that the PID CV would want to be would still be 32,000.
Basically, I'm asking because I'm creating new PID loops for pump control, and in manual mode the operator can enter a speed setpoint for the VFD in the HMI (0-100%). Do I need to scale the manual speed setpoint so that 100% is actually 32,000? Or can I set the Upper Clamp to 100 and then scale the CV to a raw value (0-32,000) with a SCALE block later?
The biggest question I have is the Upper and Lower Clamp values for the CV. The Instruction Help says that the clamp values, "define the highest and lowest value for CV". But what I don't know is, does this scale the output or does it just limit it? By that I mean, in the existing code I'm seeing that the Upper clamp for some of the loops (valve control) is 32,000 which corresponds to the raw output of analog outputs which makes perfect sense. But Upper Clamps for other loops are much lower, like 20,000 but the CV is still going to an analog output. So what I'm wondering is, does the Upper Clamp simply keep the output from exceeding the Upper Clamp value, or does it scale the output of the PID loop to max out at the Upper Clamp? The Upper Clamp value of 20,000 makes me think that the programmer did that to keep the valves from opening too much but the "max" value that the PID CV would want to be would still be 32,000.
Basically, I'm asking because I'm creating new PID loops for pump control, and in manual mode the operator can enter a speed setpoint for the VFD in the HMI (0-100%). Do I need to scale the manual speed setpoint so that 100% is actually 32,000? Or can I set the Upper Clamp to 100 and then scale the CV to a raw value (0-32,000) with a SCALE block later?
Last edited: