One question regarding the behavior of the PID instruction. What happens when the input (XIO instruction) goes low? do the registers that contain the calculated error clear? Does the PID instruction retain any of information from the previous execution. This input goes high and executes the PID instruction several times a minute for riughly 15-20 secs, and then goes low. Also, could I use the .SWM bit for the move instructions that force the CV to 100% to backcalculate the error?
The PID instruction itself should not be disabled by making the rung false. Doing so effectively "freezes" the values held in the instruction tag. When you make the instruction execute again, it believes it was last executed 250mS previously, and any changes in the feedback that have occurred in the extended interval will be wrongly calculated upon. This leads to instability, and the need to "de-tune" the PID to give the appearance of some degree of control.
Yes, you use the .SWM control to turn the PID on/off.
plc.ucd said:
There are motor drives are PowerFlex 40s and the accel/decel parameters are set at 5 secs (registers P039 and P040) for both the main and the addition. It looks like I can bring them down to 0.1 secs, but doesn't that risk damaging the drives as the are rapidly accelerating / decelerating without any ramping? These parameters were configured a long time ago by a different control engineer.
You won't damage the drives, the motors, or the pumps, accelerating/decelerating them at the maximum the drives will allow. This is akin to having a DOL starter on a pump/motor. The time taken for the motor to spin up to synchronous speed will be predominantly determined by the inertial loading.
You want the drives to respond as quickly as possible to the PID output, otherwise the PID has to have very low proportional gain to prevent PV overshoot, thus taking a long time to achieve SP. Some people compensate for this by adding high Derivatives, but this is like pulling the reins on a bolting horse, at the same time as digging your spurs into it.
Another analogy that I've used before is that the PID is like a tow-truck, and you want the trailer to move at the same speed. Anything you have in your system that doesn't allow the trailer to run at the same speed as the tow-truck will make the system harder to control. Having accle/decel ramps in your drives is like the tow-line being made of elastic. By the time the trailer has got up to speed, the elastic will have stretched to it's limits, and then of course it will want to contract, thus pulling the trailer faster than the tow-truck.