Pid code sample – Rockwell Automation 2080-LC50 Micro830 and Micro850 Programmable Controllers User Manual User Manual

Page 261

Advertising
background image

Rockwell Automation Publication 2080-UM002F-EN-E - December 2013

245

IPID Function Block Appendix F

motor driving a disk flywheel with the motor coupled to the flywheel via a shaft
with torsional stiffness or an electric circuit composed of a current source driving
a series LR (inductor and resistor) with a shunt C (capacitor). The energy storage
elements for these systems are the rotational kinetic energy and torsion spring
energy for the former and the inductive and capacitive storage energy for the
latter. Motor drive systems and heating systems can be typically modeled by the
LR and C electric circuit.

PID Code Sample

The illustration PID Code Sample shows sample code for controlling the PID
application example shown before. Developed using Function Block Diagrams, it
consists of a pre-defined function block, IPIDCONTROLLER, and four user-
defined function blocks. These four are:

• PID_OutputRegulator

This user-defined function block regulates the output of
IPIDCONTROLLER within a safe range to ensure that there is no
damage to the hardware used in the process.

IF RMIN

≤ RIN ≤ RMAX, then ROUT = RIN,

IF RIN < RMIN, then ROUT = RMIN,
IF RIN > RMAX, then ROUT = RMAX.

Advertising
This manual is related to the following products: