
Learning units
3.10 Integrating FM 455 C in the user program
3.10
3.10
Integrating FM 455 C in the user program
Procedure
1. In SIMATIC Manager, select File > Open... > Libraries to open the FM_PID library.
2. Copy FB 31 PID_FM from the FM 355, 455 PID Control / blocks container of the FM_PID
library to the "Blocks" container of your project.
At FB 31 PID_FM, you can
– edit operating parameters such as setpoints, or toggle from manual to auto mode
– read process values from the FM, such as the actual value, the manipulated variable,
or the current operating states
– edit controller parameters based on the process state.
3. Add a cyclic interrupt clock OB to your project such as OB 35. Open OB 35, call FB 31
PID_FM in OB 35, and the assign this FB call an instance DB, for example:
CALL "PID_FM", DB 50
4. Set the module address you noted down earlier on at parameter MOD_ADDR
(see "Programming FM 455 C").
5. At the CHANNEL parameter, set the channel number of the controller whose parameters
you want to read/write with this call.
6. You can define the setpoint at parameter SP_RE. You can toggle manual / auto mode,
and set default values at the LMN_REON and LMN_RE parameters.
7. Select File > Save to save OB 35.
8. Open the symbol editor to assign a symbolic name to the new instance DB, for example,
DB_cont1.
For further information, refer to the
FM 455 Controlle Moduler
r
manual.
3.11
3.11
Editing controller parameters of the user program
Procedure
To let you modify specific parameters while the system is in RUN, FB PID_FM first has to
read the FM 455 parameters at startup, as you do not only transfer the deltas, but rather all
parameters to the FM. Corresponding declaration at the COM_RST parameter of FB 31
PID_FM in OB 100:
SET
= "DB_cont1".COM_RST
FB 31 PID_FM will now read the FM 455 controller parameters at the first call of OB 35, and
then saves these to its instance DB. You can now edit specific values such as the controller
GAIN. Set parameter LOAD_PAR = TRUE in OB 35 to transfer the parameter data from the
instance DB to FM 455 C. Successful completion of this action is indicated by the reset of
COM_RST or LOAD_PAR (see the
FM 455 Controlle Module
manual, "The function block
PID_FM and "Assignment of the DBs".)
FM 455 C
Getting Started, 02/2006, A5E00059365-03
3-7