2 typical program flow, Typical program flow, Busserver s7 – Lenze Drive Server Bus server S7 getting started User Manual

Page 24

Advertising
background image

Busserver S7

L

85

Busserver S7 DE/EN 1.0

5.2

Typical program flow

The following figure shows the typical sequence of a STEP7 program with OPC access:

DBx OPC

DBx

DBx

FC1

DBx

OB1

DB S7PAR

FC

process data

FB DRIVE

parameter

d

2

rive

FB DRIVE

parameter

drive 1

FB DRIVE

parameter

d

n

rive

FC

process data

FB DRIVE

parameter

FB DRIVE

parameter

FB DRIVE

parameter

FC

parameter

FC

parameter

The standard block

OB1 forms the basis. This block is included in every STEP7 program and

automatically activated in every cycle. The

OB1 calls all other function blocks required for the

particular application.

In the above figure, the standard block

OB1 calls the function FC1 which initiates the real

access to the drives.

In every cycle, the function

FC Process Data is called in FC1 to process the process data.

Since it is not possible to access process data via OPC, you need not change between PLC and

OPC commands in this case.

The function block

FB DRIVE is called several times for OPC access. For each drive, you have to

create an instance with a separate data block.

Each instance of

FB DRIVE has access to two data blocks, DB OPC and DB S7PAR.

Every time

FB DRIVE is called (multiple use), a special instance data block has to be

transmitted, which contains the data for the appropriate drive, e. g. the PROFIBUS address. The

FB DRIVE does not use any global data.

DB OPC and DB S7PAR must not be changed by the user. The user can, however, write

parameter data jobs from the PLC to the corresponding fields of

DB S7PAR using the function

FC Parameter .

The function

FC Parameter can be called at any point in FC1 .

The change between the parameter data jobs from the OPC and the PLC is made by the

FB

DRIVE.

The function

FC Process Data is not affected by this and continues to be called in every cycle.

Show/Hide Bookmarks

Advertising