You are on page 1of 60

Configuring Functions with CFC

Integrated message functions


Consistent connection
MKZ X
ASO MEAS_MON Alarm
Acknowledge only A,W,T
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 TypeMKZAlarmtext We X
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 AType MEAS_MON
S O Alarmtext We Limits
17. 11. 96 14:32:46 Type Alarmtext We
Alarm act. range
+160.0 HH +165.0 UL
+180.0
LL
H +150.0 +100.0
+140.0

WinCC +120.0
L +120.0

CFC Alarm
LL +110.0

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.1
Configuring Functions with CFC

Integrated message functions


Consistent connection
MKZ X
ASO MEAS_MON Alarm
Acknowledge only A,W,T
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 TypeMKZAlarmtext We X
17. 11. 96 14:32:46 Type Alarmtext We
17. 11. 96 14:32:46 AType MEAS_MON
S O Alarmtext We Limits
17. 11. 96 14:32:46 Type Alarmtext We
Alarm act. range
+160.0 HH +165.0 UL
+180.0
LL
H +150.0 +100.0
+140.0

WinCC +120.0
L +120.0

CFC Alarm
LL +110.0

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.2
Integrating Libraries

Block

Chart template

(Master data) library


in the multiproject (Standard) libraries
with PCS 7 V6
Project window OB32 (Start)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.3
Integrating Blocks

LIBRARY1
LIBRARY2
Block_X BLOCK_X

Symbols

Block

Charts

Project window Libraries

OB32 (Start)

Predecessor for installation

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.4
Organization Blocks

OB Start event Priority


1 Free cycle 1
10...17 Time-of-day interrupt 2
OB10 to 17 OB20 to 23 20...23 Time-delay interrupt 3...6
30...38 Time interrupt 7...15
40...47 Process interrupt 16...23
55...57 DPV1 interrupts 2
OB1 * OB30 to 38 60 Multi-computing 25
70...73 Red. error (H-CPU) 25
80...87 Async. error al. 26,28
S7 100,101 Startup 27
OS 121,122 Synchr. error al. like error-
generating
OB121,122 * OB40 to 47 OB

(See system software for S7-300/400,


System and Standard Functions)
** OB100,101 ** OB80 to 87
* User-/process-specific start event
** CFC-/block-specific start event

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.5
CFC Basics

Menu bar / toolbar

Window with

Sheet bar
Sheet bar
Blocks
available
Libraries,
charts and
Blocks
Header 1
Header 2
BIB1
I11 O11 BIB2
I21 O21 BSTX
BSTY
123 I22

Interconnection

Parameterization
BL CH LIB

OB32 (Start)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.6
The First Blocks

100 100

U V
50 50
30 U2
V
0 0
-t -t

• Configuration
• Compile and download objects
• Test

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.7
SIMATIC PCS 7 Date: 26.04.2018
SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.8
Compiling and Downloading the Program

Preselect

Settings for compile


and download
(dialog box with 2 tabs)

Start compile/download acc. to


preselection

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.9
SIMATIC PCS 7 Date: 26.04.2018
SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.10
Exercise: Controlling a Value

OP_A_LIM

Operator enable OP_EN

U_HL
Limits
U_LL
Interconnectable
input for U LINK_U

LINK_ON

BTRACK
Operator input
V
Analog U

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.11
Run Sequence

OB32 (cyclic interrupt) 1sec


Runtime group

Runtime group 1 - Scan rate


- Phase offset
Runtime group 2

Block 1
Runtime group 3

Block n

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.12
Run Properties of OBs and Runtime Groups
OB1 400
200 200

OB31 (2s) 100 400 100


600 ms

OB32 (1s) 300 100 200 300 100 200


300 ms

OB33 (0.5s)100 100 100 100


100 ms

0 0,5 1 1,5 2
t (s)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.13
Exercise: Optimize Run Sequence

Optimize

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.14
Block Diagram of a Motor Control System

Motor block
Control
logic 1
AUTO_ON QSTART
MAN_ON 0

Operator screen 0 QRUN


AUT_ON_OP

AUT_L 1

Q_MON_R
LIOP_SEL

MONITOR

FB_ON Time
monitoring

RESET

Feedback CH_DI CH_DO


signal
M DI DO
Switching command

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.15
Driver Concept (from V5)
Analog Input Digital Output
0...200°C PIS=n PIS=n Channel 1 (Signame_Y)
Channel 0 (Signame_X)
TI Signame_X Signame_Y

0 / 24 V
4...20mA

Hardware config.
Symbol table

CFC charts with module


drivers
SUBNET

MOD RACK MOD

CFC chart with application

CH_AI CH_DO
MODE MODE
Signame_X VALUE Signame_Y
VALUE
200 QCONTROL I
VHRANGE
0 VLRANGE V PV_IN

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.16
Driver Concept (from V5)
Analog Input Digital Output
0...200°C PIS=n PIS=n Channel 1 (Signame_Y)
Channel 0 (Signame_X)
TI Signame_X Signame_Y

0 / 24 V
4...20mA

Hardware config.
Symbol table

CFC charts with module


drivers
SUBNET

MOD RACK MOD

CFC chart with application

CH_AI CH_DO
MODE MODE
Signame_X VALUE Signame_Y
VALUE
200 QCONTROL I
VHRANGE
0 VLRANGE V PV_IN

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.17
Template for a Motor Control System - From the Standard Library

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.18
Template for a Motor Control System - From the Standard Library

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.19
Exercise: Read In and Output and Analog Value

In the test installation:


Analog output and analog input are connected to one another via the hardware

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.20
Program and Data
DBy1
OBm (Instance DB
for FBy
FBy,DBy1 declaration)

FBy,DBy2
FCz
FBy
Declaration
Code
m OB...? DBy2
n
(OBm) (Instance DB
(OBn) for FBy
declaration)

m,n,y,y1,y2,z = numbers

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.21
Data Transport

Time (run sequence) OBx


Block 1

f
X Y

Block 2
OS
Operation f
X Y

Connection (fetch principle)

Block n

f
X Y

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.22
Block Libraries, Part 1

PLC OS

FB / FC Trends
Elementary blocks
Messages
Technological blocks
Operating

Algorithm

Outputs
Driver blocks

Inputs
SP=
Communication blocks 10%
12.3

AUTO

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.23
Block Libraries, Part 2

PLC

SFB / SFC
Standard Library

Algorithm

Outputs
Inputs

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.24
Control Loop
Technical Control Loop Simulated Control Loop

AS AS
software software
CTRL_PID
Manip. var.
LMN Manip. var. Temp. Manip. var.
Reactor
Temperature CTRL_PID
PV_IN block

CH_AI CH_AO CH_AI CH_AO

AI I/O modules AO AI I/O modules AO

Reactor Reactor
System plant System plant

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.25
Reactor Simulation (Filling)

UV
Reactor (Filling + Mixing)
2U101
LAH
UV BO V1_OP_CL OVERFLOW BO 2L101
2U102
BO V2_OP_CL LEVEL R
UV
BO V3_OP_CL FB_V1_OP BO
2U103
BO M1_ON_OF FB_V1_CL BO
LI
R V1_FLOW FB_V2_OP BO
2L104
R V2_FLOW FB_V2_CL BO

R V3_FLOW FB_V3_OP BO
EI
2E101 R KFV FB_V3_CL BO

BO V_RESET MOTOR_ON_OFF BO

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.26
Reactor Simulation (Heating)

Reactor (Heating + General)


CI
Heating R V_HOT_FL TMP_SHEL R 2T101
TICA
R TMP_ENV TMP_INT R
2T102
R TMP_HOT

R T_LAG_SH

R T_LAG_IN

R SAMPLE_T

BO RS_COOL

BO SET_HOT

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.27
Have to be CTRL_PID (with LINK)
active(=1)
Enable LIOP_INT_SEL LMN_TRK LMN_SEL
Parameter:

SPEXON_L 1

SPEXT_EN SPEXTSEL_OP 0 DEADB_W


SPINT_EN GAIN
SP_EXT TN
EXT 1 TV
TM_LAG
SP_OP_ON SP_OP INT 0
LMN
+ 1
PV_IN
PID
- AUT 1
0
LMNOP_ON MAN_OP MAN 0

LIOP_MAN_SEL

AUT_L 1

AUTOP_EN
AUT_ON_OP 0
MANOP_EN

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.28
Reactor Simulation (Summary)

FB_V2_OPEN
FB_V2_CLOSE

V2_OP_CL
M1_ON_OF
MOTOR_ON
V1_OP_CL M
R V_HOT_FL
FB_V1_OPEN
FB_V1_CLOSE 0 ... 100
Heating
LEVEL
0....100
TMP_SHEL

TMP_INT

V3_OP_CL
FB_V3_OPEN
FB_V3_CLOSE

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.29
Exercise: Control Loop for the Reactor

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.30
SIMATIC PCS 7 Date: 26.04.2018
SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.31
Message Configuration

Message class

Hierarchy identification,
where the message originated

Message attribute for the


OS area

Message text

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.32
Message Configuration

Message class

Hierarchy identification,
where the message originated

Message attribute for the


OS area

Message text

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.33
Notes

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.34
CFC Chart in Chart

Chart "A" (higher-level chart)

"X"

Chart "X" (lower-level chart)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.35
Exercise: Chart-in-Chart Technique: Create Lower-Level Chart
Lower-level chart "Chart_x"
Chart interconnections

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.36
Exercise: Chart-in-Chart Technique: Create Lower-Level Chart
Lower-level chart "Chart_x"
Chart interconnections

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.37
Exercise: Chart-in-Chart Technique: Create Higher-Level Chart

Insert in the
higher-level chart
from here

Higher-level chart "Valve test"

Run sequence:

Manual valve operation

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.38
Exercise: Chart-in-Chart Technique: Create Higher-Level Chart

Insert in the
higher-level chart
from here

Higher-level chart "Valve test"

Run sequence:

Manual valve operation

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.39
Exercise: Test with Dynamic Display

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.40
Exercise: Test with Dynamic Display

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.41
Exercise: Program Block with CFC (1)
CFC chart "Chart_x"

Specify new chart interconnections

Insert new block

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.42
Exercise: Program Block with CFC (2)

Comment must be added manually

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.43
Exercise: Program Block with CFC (2)

Comment must be added manually

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.44
Block Data Structure (Multiple Instance)

Symbolic name
of FB40

Inputs, outputs, input and output parameters for the sheet bar

Place for instance of an INT_P block

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.45
Block Change (1)

Result A

Result B

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.46
Block Change (1.1)

Different libraries in the multiproject:

Original version

Modified version

Test chart for block with change

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.47
Block Change (1.2)

Instance V1.0

Drag and
drop
Trial for
instance V1.1

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.48
Block Change (1.3)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.49
Block Change (1.4)

The new block version


is transferred to the chart folder

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.50
Block Adjustment (2)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.51
Block Adjustment (2.1)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.52
Block Change with Library and Project Adjustment (1)

Changes to the parameter


properties

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.53
Block Change with Library and Project Adjustment (2)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.54
Block Change with Library and Project Adjustment (3)

The new block version is transferred to the project

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.55
Creating Process Tag Types

Process tag types


Setpoint
configuration

Importing process tags


in the project

Import file
for measuring points

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.56
Exercise: Create Process Tag Types, Import them in the Project (1)

Start "Wizard" -> Continue -> I/O Points


to select parameters/signals and messages from
blocks on the chart

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.57
Exercise: Create Process Tag Types, Import them in the Project (2)

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.58
AS-to-AS Communication
AS-to-AS Communication
Communication blocks
Connection
OP_A_LIM

Operator enable OP_EN


Partner A Partner B
Controller for
U_HL
Limits reactor heating
U_LL SEND_R REC_R
Interconnectable
LINK_U SP
input for U

LINK_ON

BTRACK
Operator input
V SP_EXT
analog U

REC_R SEND_R

Received
setpoint can be
processed

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.59
Communication Blocks for AS-to-AS Communication
Partner 2
Partner 1

or Partner 2
Partner 1

SIMATIC PCS 7 Date: 26.04.2018


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File:ST-PCS7SYS_V6_cfc.60

You might also like