• No results found

sitrain-s7-cfc

N/A
N/A
Protected

Academic year: 2021

Share "sitrain-s7-cfc"

Copied!
56
0
0

Loading.... (view fulltext now)

Full text

(1)

CFC Continuous Function Chart

Overview

CFC

CFC

SCL

SCL

STEP7

STEP7

L

ib

ra

ri

e

s

L

ib

ra

ri

e

s

GRAPH

(2)

The CFC Configuration Tool

S7 SCL

CFC

STEP7

STL

LAD

FBD

S7 GRAPH

S7 HiGraph

DOCPRO

(3)

CFC in the STEP7 Environment

SIMATIC Manager

SIMATIC Manager

CFC

CFC

SCL

SCL

STEP7

STEP7

L

ib

ra

ri

e

s

L

ib

ra

ri

e

(4)
(5)

Project Planning instead of Programming

1. Add blocks

2. Set parameters for

and connect blocks

3. Adapt run-time

properties

4. Compile /load

5. Test

M7 only

(6)

Customer Advantages

Saving engineering costs

Pre-defined blocks used

Development times shorter

High quality through error-free blocks

Expanding with additional libraries

Using your own blocks

Flexibility through scalability

Graphic configuration

Simple to use without knowledge of Internas

Development times shorter

User-friendly testing procedure

Supported during startup

Homogenous integration into SIMATIC STEP 7

(7)

Basic Principles of CFC

CFC

CFC

SCL

SCL

STEP7

STEP7

L

ib

ra

ri

e

s

L

ib

ra

ri

e

s

GRAPH

(8)

CFC Installation

SW minimum requirements

Operating system

§

WINDOWS 95, 98, NT

§

WINDOWS 2000, Me (Basic and SCL V5.1 + SP1,2)

SIMATIC S7 basic package

§

STEP7 V5.x with authorization

Authorization for CFC

HW minimum requirements

Programming device (PG) or PC

§

Pentium processor

§

With more than 128 Mbyte RAM

§

CFC requires approximately 52 MByte hard disk space

and approximately 200 Mbyte for the swap file

(9)
(10)

The CFC Editor

overview

Page 4

Page 5

Page 6

Page 3

Chart partion

Double click changes

to sheet view

(11)

Chart, Sheets and Sheet Bars

Chart partition A - Z

Page number

Sheet bar

Sheet bar

Zoom in or zoom

out the view.

(12)

The Block Catalog

Static text

Basic operations

S7 program

block containers

Blocks

The listed entries are supplemented automatically, if

additional blocks are inserted in the chart

(13)

The Block Libraries

CFC library with blocks sorted

by CPU type

Additionally installed libraries,

such as for SIMATIC PCS7 and

your own libraries

(14)

Chart in Chart

CFC1 chart (higher-level chart)

Contains additional (lower-level) charts

Current S7 program charts

This chart was inserted in the

CFC1 chart three times.

(15)

Inserting Blocks

Inserting with

drag & drop

(16)

Block Representations

Run properties

Block name

Block type

Comment

Default input values

Input parameters

Output parameters

Block

body

Block header

(17)
(18)

Interconnecting Inputs/Outputs

Inverted signal

Multiple connection

(19)

Interconnecting to Global Operands

Selection from

symbol table

(20)

Working with CFC

Common project - database

Common project - database

CFC

CFC

SCL

SCL

STEP7

STEP7

L

ib

ra

ri

e

s

L

ib

ra

ri

e

s

GRAPH

(21)

Block Object Properties

Number of the FB in the

block container

Instance DB of the FB

Installation in

other OBs

(22)

Block I/Os

Parameter

name

Parameter type

Data type

Default value

Parameter not displayed

in CFC

These connections are

logged on automatically

for testing.

(23)
(24)
(25)

The Sheet Bars

The right sheet bar as the source of a signal

Destination is

Chart REACTOR(A),

Block Distance,

Input EN

The signal comes from

the Chart REACTOR(A),

Block Buffer_FB_for_B,

Output READY with the

commentary,

(26)

Signal Tracking

(27)

Compilation Settings

DB numbers the CFC cannot use

FC numbers the CFC

cannot use

(28)

Compiling Charts

S7 code

OBs, FCs, FBs, and

DBs

One SCL source

@SCLFileFromCFC...

Chart 1/C...

Chart1/B

Chart 1/A

Chart 2/C...

Chart 2/B

Chart 2/A

Chart 3/C...

Chart 3/B

Chart 3/A

SAMPLE_T is

automatically

adapted

(29)

Mixed Programming

OB1

Call FC 0

Call FC78

Call FB9, DB7

FC78

FB9

Programmed in LAD,

FBD, STL, and SCL

FC 0

Call FB24, DB69

FFB24

CFC generates it.

Part of a CFC chart

Don‘t make

any changes

here!

(30)
(31)

Testing and Starting Up

Test mode

Monitor and

(32)

Testing and Starting Up

Test mode

on/off

Monitor

on

Add to watch

list

I/O

Remove from

watch list I/O

Monitor

(33)

Testing and Starting Up

Connection logged on for monitoring

(34)

Reading Back

Chart

Block container

PLC

Load

SCL source code

Compile

1.) Change value

2.) Update changed value (monitored)

3

.)

I

n

s

e

rt

v

a

lu

e

(35)

Additional CFC Functions

CFC

CFC

SCL

SCL

STEP7

STEP7

L

ib

ra

ri

e

s

L

ib

ra

ri

e

s

GRAPH

(36)

The Run-Time Groups

Run-time group

Blocks in a

run-time group

Properties of a

run-time group

Change to

the run

sequence

(37)

The Run-Time Groups

0

1

2

3

11

19

n

t

Task

cycle

Run time

(38)

Explicit Block Import

Blocks in the block container

Blocks in the CFC database

Explicit

import

(39)

Deleting Blocks

Delete a

block

completely

=

Remove from block

container offline.

Remove from the chart.

+

+

+

Remove from the

symbol table.

(40)

Copying Charts and Blocks

Page to page

Chart to chart

CPU to CPU

Project to project

CPU to CPU

Project to project

Block(s)

Programs

Charts

If you want to,

you can also

transfer

connections.

(41)

Creating a Block (FB) from a Chart

Define inputs and outputs.

Several interconnected blocks

result in a new block.

(42)

Chart in Chart

CFC1 chart (higher-level chart)

contains additional (lower-level) charts

Charts for the current S7 program

This chart was inserted three

(43)
(44)

Attributes

(

Examples

)

System attributes for configuring instrumentation and control

S7_blockview

Display the block in a large or small format.

S7_m_c

You can monitor and control the block from an operator control and process

monitoring device.

S7_read_back

You can cancel the “read back chart" selection for this block in CFC.

S7_tasklist

Except for cyclical organization blocks, the block is also inserted automatically

into other OBs (such as error or startup OBs).

System attributes for process diagnostics and message configuration

S7_alarm

Event-controlled communication blocks transmit messages.

System attributes for parameters

S7_dynamic

Parameter in CFC automatically logged on for testing during testing

S7_link

Parameter can not be interconnected in CFC

S7_m_c

Parameter can be monitored and controlled

S7_sampletime

Parameter “SAMPLE_T" contains the cycle time for the OB

S7_server

Parameter is relevant for configuring messages

This parameter contains the message number.

S7_string_0

Text for evaluating binary values is assigned to the parameter

S7_string_1

(S7_string_0 for boolean 0)

(45)
(46)

Documenting Charts

Run

Sequence

Cross-Reference

of

Operands

Cross-Reference

of

Block

Types

Cross-Reference

of

Run-Time

Groups

Reference Data Editor

S7-Resource

Allocation

(47)

CFC Exercises

CFC

CFC

SCL

SCL

STEP7

STEP7

L

ib

ra

ri

e

s

L

ib

ra

ri

e

s

GRAPH

(48)

Exercise 1: Calculating the Angle and Distance

The angle

αααα

in degrees is calculated from:

αααα

= 57.296 * atan ( a / b )

a

b

c

αααα

Hypotenuse c is calculated from:

c = square root of (a

2

+ b

2

)

Caution!

Integer division cuts off the decimal

places in the result. Therefore, use

real division.

(49)

Description of Exercises 2 and 3

a

b

c

Create the a and b random

values.

Save 10 values in the DB.

Calculate c (for all 10 values).

Calculate the areas

.

Edge evaluation.

Use the run-time group.

Calculate the mean value of the

αααα

(50)

Exercise 2: Calculate the Distance and Sort

Random

generator

for a

(FC)

Random

generator

for b

(FC)

Cyclic buffer

for a

(FB)

Cyclic buffer

for b

(FB)

DB1

a

b

Calculate length

and

sort

(FCs)

a

b

c

DB2

(51)

Exercise 3: Additional Calculations

Trigger

identifi-cation

Calculating

areas

Enable

a

b

c

DB2

Areas

DB3

Mean

Run-time group

I0.0 or

M7.7

(52)

Exercise 4: Chart as an FB

a

b

c

αααα

Chart from Exercise 1

(53)

Ex 5: Calculate the Angle and Length with a New FB

Generator

for a

Generator

for b

Cyclic buffer

for a

Cyclic buffer

for b

DB1

a

b

Calculate length

and

sort

(54)

Exercise 6: Chart in Chart

a

b

c

αααα

(55)

Exercise 7: SAMPLE_T

10 seconds

Extended pulse

(56)

Exercise 8: Reference Data

Run

sequence

Cross-references:

operands

Cross

references:

Block

types

Cross-references:

Run-time

groups

Reference Data Editor

S7-resource

assignment

References

Related documents