Sei sulla pagina 1di 530

s

Contents, Foreword

T 400
FM 458-1 DP
SIMADYN D
SIMATIC TDC
Function Blocks
Manual

Closed-loop control blocks


Arithmetic blocks
Input/output blocks
Communication blocks

Edition 12.2004

Conversion modules
Logic blocks
Service-/diagnostic blocks
SFC blocks
GMC blocks
Special blocks
Appendix
Index

Safety guidelines

This Manual contains notices which you should observe to ensure your own personal
safety, as well as to protect the product and connected equipment. These notices are
highlighted in the Manual by a warning triangle and are marked as follows according to
the level of danger:

DANGER

indicates an imminently hazardous situation which, if not avoided, will result in death or
serious injury.

WARNING

indicates a potentially hazardous situation which, if not avoided, could result in death or
serious injury.

CAUTION

used with the safety alert symbol indicates a potentially hazardous situation which, if not
avoided, may result in minor or moderate injury.

CAUTION

used without safety alert symbol indicates a potentially hazardous situation which, if not
avoided, may result in property damage.

NOTICE

used without the safety alert symbol indicates a potential situation which, if not avoided,
may result in an undesireable result or state.

Correct usage

Note the following:


This device and its components may only be used for the applications described in the
catalog or the technical description, and only in connection with devices or components
from other manufacturers which have been approved or recommended by Siemens.

Trademarks

SIMATIC and SIMADYN D are registered trademarks of Siemens AG.


Third parties using for their own purposes any other names in this document which refer
to trademarks might infringe upon the rights of the trademark owners.

Copyright SIEMENS AG 2004 All rights reserved

Disclaimer of liability

The reproduction, transmission or use of this document or its


contents is not permitted without express written authority.
Offenders will be liable for damages. All rights, including rights
created by patent grant or registration of a utility model or design,
are reserved.

We have checked the contents of this manual for agreement with


the hardware and software described. Since deviations cannot be
precluded entirely, we cannot guarantee full agreement.
However, the data in this manual are reviewed regularly and any
necessary corrections included in subsequent editions.
Suggestions for improvement are welcomed.

Siemens AG
A&D
Frauenauracher Strae 80
91056 Erlangen

Siemens Aktiengesellschaft

Siemens AG 2004
Technical data subject to change.

Editions
T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC
Manual
Function Blocks
Edition 12.2004

NOTE

Overview
(chapter editions)

Please note that the current edition of this documentation contains


different editions of the individual chapters. The following overview tells
you when a chapter was revised the last time.

Chapter

Edition
Foreword

Edition 12.2004

Closed-loop control blocks

Edition 12.2004

Arithmetic blocks

Edition 12.2004

Input/output blocks

Edition 03.2003

Communication blocks

Edition 12.2004

Conversion modules

Edition 12.2004

Logic blocks

Edition 12.2004

Service-/diagnostic blocks

Edition 03.2003

SFC blocks

Edition 03.2003

GMC blocks

Edition 12.2004

10

Special blocks

Edition 12.2004

11

Appendix

Edition 12.2004

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

ii

Foreword
Purpose of this
Manual

This Manual explains the principle use and functions of the STEP 7
automation software with the main focus on the appropriate technological
and drive control components T400, FM 458-1 DP, SIMADYN D,
SIMATIC TDC or D7-SYS.
TDC: Technology and Drives Control

Basic knowledge
required

This Manual addresses programmers and commissioning engineers.


General knowhow regarding automation technology is required in order to
understand the contents of the Manual

Validity of the
Manual

This Manual is valid for SIMATIC D7-SYS Version 6.2.

Additional support

If you have questions relating to the use of the products described in the
Manual, which cannot be answered here, then please contact your local
Siemens office. You can also call the Hotline:

Training Center

Tel.:

+49 (180) 5050-222

Fax:

+49 (180) 5050-223

e-mail:

adsupport@siemens.com

Appropriate training courses are available in order to make it easier to get


to know the SIMADYN D automation system. Please contact the central
Training Center in D-Erlangen (I&S IS INA TC):
Tel.:

+49 (9131) 7-27689, -27972

Fax:

+49 (9131) 7-28172

Internet: www.siemens.de/sibrain
Intranet: http://info-tc.erlm.siemens.de/

NOTE

This user part of the Manual does not include any detailed
information/instructions with individual descriptions, but is only intended
to provide a basic procedure. More detailed information on the dialog
boxes in the software and how they are handled is provided in the
appropriate online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

iii

Foreword

Information
overview

This manual is part of the overall documentation for the technological and
drive control components T400, FM 458, SIMADYN D, SIMATIC TDC
and SIMATIC D7-SYS:

Title
System and
communications
configuring D7-SYS

Content
The first project in a few steps
This Section provides an extremely simple entry into the methodology when
assembling and programming the SIMATIC TDC/SIMADYN D control
system. It is especially conceived for first-time users of a control system.
System software
This Section provides basic know-how about the structure of the operating
system and an application program of a CPU. It should be used to obtain an
overview of the programming methodology, and basis for configuring user
programs.
Communications configuring
This section provides you with basic know-how about the communication
possibilities and how you configure links to the communication partners.
Changeover from STRUC V4.x to D7-SYS
Essential features are included in this section, which have changed over
STRUC V4.x with the introduction of SIMATIC D7-SYS.

STEP 7 option packages Basis software


for D7-SYS
This section explains the essential use and the functions of the STEP 7
automation software. For first users, it provides an overview on configuring,
programming and commissioning a station.
When working with the basis software, you can access the online help which
provides you with support when it comes to detailed questions on using the
software.
CFC
The CFC language (Continuous Function Chart) allows you to graphically
interconnect blocks.
When working with the particular software, you can also use the online help
which can answer detailed questions regarding the use of the
editors/compiler.
SFC
Configuring sequence controls using SFC (Sequential Function Chart) of
SIMATIC S7.
In the SFC editor, you generate a sequence chart using graphic resources.
The SFC elements of the chart are then positioned according to specific
rules.
Hardware

The complete hardware spectrum is described as reference in this Manuals.

Function blocks

These Reference Manuals provide you with an overview of selected function


blocks for the associated technological and drive control components T400,
FM 458-1 DP, SIMADYN D and SIMATIC TDC.

iv

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Foreword

Guide

As first time user, we recommend that this Manual is used as follows:


Please read the first section on using the software in order to get to
know some of the terminology and basic procedure.
Then use the particular sections of the Manual if you wish to carry-out
certain processing steps (e.g. loading programs).
If you have already executed a small project, and have gained some
experience, then you can read individual sections of the Manual in order
to get up to speed about a specific subject.

A&D Technical
Support

Can be accessed globally at any time of the day:

World-wide (Nrnberg)
Technical Support
Local time: 0:00 to 24:00 / 365 days
Phone:
+49 (180) 5050-222
Fax:
+49 (180) 5050-223
E-Mail:
adsupport@siemens.com
GMT:
+1:00

Europe / Africa (Nrnberg)


Authorization

United States (Johnson City)


Technical Support and
Authorization

Asia / Australia (Peking)


Technical Support and
Authorization

Local time: Mo.-Fr. 8:00 to 17:00


Phone:
+49 (180) 5050-222
Fax:
+49 (180) 5050-223
E-Mail:
adsupport@siemens.com
GMT:
+1:00

Local time: Mo.-Fr. 8:00 to 17:00


Phone:
+1 (423) 262 2522
Fax:
+1 (423) 262 2289
E-Mail:
simatic.hotline@sea.siemens.com
GMT:
-5:00

Local time: Mo.-Fr. 8:00 to 17:00


Phone:
+86 10 64 75 75 75
Fax:
+86 10 64 74 74 74
E-Mail:
adsupport.asia@siemens.com
GMT:
+8:00

Technical Support and Authorization speak generally German and English.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Contents
Foreword ........................................................................................................................................ iii
1 Closed-loop control blocks................................................................................................... 1-1
1.1

DEL Dead line block ................................................................................................. 1-1

1.2

DEZ Dead zone block............................................................................................... 1-3

1.3

DIF Differentiator block ............................................................................................. 1-5

1.4

DT1 block.................................................................................................................. 1-7

1.5

FUZ Fuzzy controller (REAL type).......................................................................... 1-10

1.6

FUZ_I Fuzzy controller (INTEGER type) ................................................................ 1-13

1.7

INT Integrator.......................................................................................................... 1-15

1.8

LIM Limiter .............................................................................................................. 1-18

1.9

LIM_D Limiter (Typ DOUBLE-INTEGER)............................................................... 1-20

1.10

PC P controller........................................................................................................ 1-22

1.11

PIC PI controller...................................................................................................... 1-25

1.12

PT1 element............................................................................................................ 1-34

1.13

PWM Pulse width modulator................................................................................... 1-36

1.14

RGE Ramp function generator ............................................................................... 1-38

1.15

RGJ Ramp function generator with jerk limiting ..................................................... 1-45

2 Arithmetic blocks ................................................................................................................... 2-1


2.1

ACOS Arc cosine function ........................................................................................ 2-1

2.2

ADD Adder................................................................................................................ 2-1

2.3

ADD_I Adder (INTEGER type) ................................................................................. 2-1

2.4

ADD_D Adder (DOUBLE-INTEGER type)................................................................ 2-1

2.5

ADD_M Modulo adder for axis cycle-correct addition .............................................. 2-2

2.6

ASIN Arc-sine function.............................................................................................. 2-3

2.7

ATAN Arc-tangent function ....................................................................................... 2-3

2.8

AVA Absolute value generator with sign evaluation ................................................. 2-3

2.9

AVA_D Absolute value generator with sign evaluation (DOUBLE-INTEGER


type) .......................................................................................................................... 2-4

2.10

COS Cosine function ................................................................................................ 2-5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

vii

Contents

2.11

DIV Divider ................................................................................................................ 2-5

2.12

DIV_I Divider (INTEGER type).................................................................................. 2-5

2.13

DIV_D Divider (DOUBLE-INTEGER type)................................................................ 2-5

2.14

DIV_R Divider (REAL type)....................................................................................... 2-5

2.15

MAS Maximum evaluator.......................................................................................... 2-6

2.16

MIS Minimum evaluator ............................................................................................ 2-7

2.17

MUL Multiplier ........................................................................................................... 2-8

2.18

IMUL_I Multiplier (INTEGER type)............................................................................ 2-8

2.19

MUL_D Multiplier (DOUBLE-INTEGER type) ........................................................... 2-8

2.20

NATCON Natural constants...................................................................................... 2-9

2.21

PLI10 Polygon curve, 10 points .............................................................................. 2-10

2.22

PLI20 Polygon curve, 20 breakpoints ..................................................................... 2-12

2.23

SII Inverter...............................................................................................................2-14

2.24

ISIN Sine function ................................................................................................... 2-14

2.25

SQR Square-root extractor ..................................................................................... 2-14

2.26

SUB Subtractor ....................................................................................................... 2-15

2.27

SUB_I Subtractor (INTEGER type)......................................................................... 2-15

2.28

SUB_D Subtractor (DOUBLE-INTEGER type) ....................................................... 2-15

2.29

TAN Tangent function ............................................................................................. 2-15

2.30

FRM Formula block................................................................................................. 2-16

3 Input/output blocks ................................................................................................................ 3-1


3.1

ADC Analog input via A/D converter......................................................................... 3-2

3.2

AENC Absolute value encoder (SSI/EnDat) ............................................................. 3-5

3.3

BII8 Binary input...................................................................................................... 3-15

3.4

BIQ8 Binary output.................................................................................................. 3-17

3.5

DAC Analog output ................................................................................................. 3-19

3.6

NAV Speed/position actual value sensing .............................................................. 3-21

3.7

NAVS Speed/position/position difference sensing ................................................. 3-29

3.8

SBI Status byte input............................................................................................... 3-38

3.9

SBQ Status byte output .......................................................................................... 3-40

4 Communication blocks.......................................................................................................... 4-1


4.1
4.1.1
4.1.2
4.1.3
4.1.4

viii

Communications utility, process data ....................................................................... 4-1


CCC4 Collect block process data ............................................................................. 4-1
CDC4 Distribution block process data ...................................................................... 4-4
CRV Receive block process data ............................................................................. 4-7
CTV Transmit block process data........................................................................... 4-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Contents

4.2
4.2.1
4.1.2.1
4.1.2.2
4.1.2.3
4.2.2
4.2.2.1
4.2.2.2
4.2.2.3
4.2.3
4.3.2.1
4.2.4
4.4.2.1
4.4.2.2
4.4.2.3
4.2.5
4.5.2.1

Communications utility message system................................................................ 4-12


Central and output blocks ....................................................................................... 4-12
@MSC Message system central block................................................................... 4-12
MSI Message output block ..................................................................................... 4-15
MSIPRI Message output block (printer).................................................................. 4-18
Message blocks for activated messages without value.......................................... 4-21
MER0 Message block for 16 activated messages ................................................. 4-21
MER1 Message block for one activated message with text ................................... 4-23
MER16 Message block for 16 activated messages with text ................................. 4-25
Message blocks fr activated messages with value............................................... 4-28
MER, MER_I, MER_D Message block for one activated message with
measured value (R type) ........................................................................................ 4-28
Message blocks for activated and de-activated messages without value.............. 4-31
MERF0 Message block for 16 activated and de-activated messages ................... 4-31
MERF1 Message block for an activated and a de-activated message .................. 4-33
MERF16 Message block for 16 activated and de-activated messages with text ... 4-35
Message block for activates and de-activated messages with value..................... 4-38
MERF, MERF_I, MERF_D Message block for an activated and a de-activated
message with measured value ............................................................................... 4-38

4.3
4.3.1
4.3.2

Communications utility, parameter processing....................................................... 4-41


@DPH Parameter processing central block........................................................... 4-41
DPI Parameter block............................................................................................... 4-41

4.4
4.4.1
4.1.4.1
4.4.2
4.2.4.1
4.2.4.2
4.2.4.3
4.4.3
4.3.4.1
4.3.4.2

Communications utility, trace.................................................................................. 4-42


Analog trace............................................................................................................ 4-42
TRCC, TRCC_I, TRCC_D Analog trace acquisition block ..................................... 4-42
Single trace ............................................................................................................. 4-46
@TCP Single trace, central block........................................................................... 4-46
TRHI Single trace, header block............................................................................. 4-50
TRP, TRP_B, TRP_I, TRP_D Single trace acquisition block ................................. 4-52
System trace ........................................................................................................... 4-54
@TCI System trace central block ........................................................................... 4-54
@TRI Acquisition block system trace ..................................................................... 4-57

4.5
4.5.1
4.5.2

Communications utility, time of day synchronization .............................................. 4-58


RTCABS Date and time output............................................................................... 4-58
RTCREL Relative time output................................................................................. 4-59

4.6
4.6.1
4.6.2
4.6.3
4.6.4
4.6.5

SIMATIC Operator Panel ........................................................................................ 4-60


S7OS OS-Communication...................................................................................... 4-60
S7IA User data area "interface area"...................................................................... 4-62
S7EMA User data area "event messages"............................................................. 4-65
S7AMA User data area "alarm messages"............................................................. 4-67
S7FKA User data area "function key area" ............................................................ 4-70

4.7
4.7.1
4.7.2

PROFIBUS DP coupling ......................................................................................... 4-72


DIAPRO Diagnostics DP (PROFIBUS DP coupling) .............................................. 4-72
SYNPRO SYNC/FREEZE DP (PROFIBUS DP coupling) ...................................... 4-74

4.8
4.8.1

Central coupling blocks........................................................................................... 4-77


@CPN Local coupling central block ....................................................................... 4-77

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

ix

Contents

4.9
4.9.1
4.9.2
4.9.3
4.9.4
4.9.5
4.9.6

Pointer-based communications .............................................................................. 4-78


CPY_P Copying block for pointer-based processing.............................................. 4-78
CRV_P Telegram block, receive with pointer ......................................................... 4-80
CTV_P Telegram block, sending with pointer......................................................... 4-83
DB_P Data block for pointer-based processing...................................................... 4-86
DRD, DRD_D, DRD_I, DRD_8, DRD_8D, DRD_8I, DRD_BY DRD Read
blocks for pointer-based communications .............................................................. 4-88
DWR, DWR_D, DWR_I, DWR_8, DWR_8D, DWR_8I, DWR_BY DWR Write
blocks for pointer-based communications .............................................................. 4-91

5 Conversion modules ................................................................................................................ 5-1


5.1 Type, converter................................................................................................................... 5-1
5.1.1 B_W Converter, 16 binary quantities into a status word ................................................. 5-1
5.1.2 B_DW Conversion, 32 binary quantities into a double word (32 bit) .............................. 5-1
5.1.3 BY_W Status byte to status word converter.................................................................... 5-1
5.1.4 D_I DOUBLE-INTEGER to INTEGER converter ............................................................ 5-2
5.1.5 D_R DOUBLE-INTEGER to REAL converter ................................................................. 5-3
5.1.6 DW_B Conversion double word (32 bit) into 32 binary quantities .................................. 5-3
5.1.7 DW_W Conversion 32 bit double word into two 16 bit words ......................................... 5-3
5.1.8 I_D INTEGER to DOUBLE-INTEGER converter ............................................................ 5-4
5.1.9 I_R INTEGER to REAL converter ................................................................................... 5-4
5.1.10 N2_R Conversion 16 bit fixed point format (N2) to REAL............................................. 5-5
5.1.11 N4_R Conversion, 32 bit fixed point format (N4) to REAL............................................ 5-6
5.1.12 R_D REAL to DOUBLE-INTEGER converter ............................................................... 5-7
5.1.13 R_I REAL to INTEGER converter ................................................................................. 5-7
5.1.14 R_N2 Conversion, REAL to 16 bit fixed point format.................................................... 5-8
5.1.15 R_N4 Conversion, REAL to 32 bit fixed point format.................................................... 5-9
5.1.16 W_B Converter, status word into 16 binary quantities ................................................ 5-10
5.1.17 W_BY Status word to status byte converter................................................................ 5-10
5.1.18 W_DW Conversion from two 16 bit words into a 32 bit double word.......................... 5-10
5.2 Special functions .............................................................................................................. 5-11
5.2.1 BNR Binary thumbwheel switch input ........................................................................... 5-11
5.2.2 SWB_DW Byte reverser for double word inputs ........................................................... 5-14
5.2.3 SWB_W Byte reverser for word inputs.......................................................................... 5-16
5.2.4 SWBI Byte reverser for REAL type inputs..................................................................... 5-18
5.2.5 SWBO Byte reverser for real outputs............................................................................ 5-20
6 Logic blocks............................................................................................................................ 6-1
6.1
6.1.1
6.1.2
6.1.3
6.1.4

Gates......................................................................................................................... 6-1
AND block (BOOL type)............................................................................................ 6-1
AND12 AND block, status word (WORD type) ......................................................... 6-1
AND_W AND block (WORD type) ............................................................................ 6-3
NAND block (BOOL type) ......................................................................................... 6-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Contents

6.1.5
6.1.6
6.1.7
6.1.8
6.1.9
6.1.10
6.1.11
6.1.12

NOR block (BOOL type) ........................................................................................... 6-4


NOT Inverter (BOOL type)........................................................................................ 6-4
NOT_W Inverter status word (WORD type) ............................................................. 6-4
OR block (BOOL type) .............................................................................................. 6-5
OR_12 OR logic gate status word (WORD type) .................................................... 6-5
OR_W OR block, status word (WORD type) ............................................................ 6-6
XOR block (BOOL type) ........................................................................................... 6-7
XOR_W XOR block status Word (WORD type) ....................................................... 6-8

6.2
6.2.1
6.2.2
6.2.3
6.2.4
6.2.5

Timers ..................................................................................................................... 6-10


MFP Pulse generator (BOOL type)......................................................................... 6-10
PCL Pulse contractor (BOOL type)......................................................................... 6-11
PDE Switch on delay (BOOL type) ......................................................................... 6-12
PDF Switch off delay (BOOL type) ......................................................................... 6-13
PST Pulse extender (BOOL type)........................................................................... 6-15

6.3
6.3.1
6.3.2

Counters ................................................................................................................. 6-17


CTR Counter (BOOL type) ..................................................................................... 6-17
UDI Up/down pulse evaluator (BOOL type)............................................................ 6-19

6.4
6.4.1
6.4.2
6.4.3

Comparators ........................................................................................................... 6-21


NCM Numerical comparator (REAL type) .............................................................. 6-21
NCM_I Numerical comparator (INTEGER type)..................................................... 6-21
NCM_D Numerical comparator (DOUBLE-INTEGER type) ................................... 6-21

6.5
6.5.1
6.5.2
6.5.3
6.5.4
6.5.5
6.5.6

Switches.................................................................................................................. 6-22
ANS Automatic numerical changeover switch (REAL type) ................................... 6-22
ANS_I Automatic numerical changeover switch (INTEGER type) ......................... 6-23
BSW Binary changeover switch (INTEGER type) .................................................. 6-24
NSW Numerical changeover switch (REAL type) .................................................. 6-24
NSW_D Numerical changeover switch (DOUBLE-INTEGER type) ....................... 6-24
NSW_I Numerical changeover switch (INTEGER type)......................................... 6-24

6.6
6.6.1
6.6.2
6.6.3
6.6.4

Multiplexer............................................................................................................... 6-25
DX8 Demultiplexer, 8 outputs, can be cascaded (REAL type)............................... 6-25
DX8_I Demultiplexer, 8 outputs, can be cascaded (INTEGER type) ..................... 6-27
MUX8 Multiplexer, can be cascaded (REAL type) ................................................. 6-29
MUX8_I Multiplexer, can be cascaded (INTEGER type)........................................ 6-31

6.7
6.7.1
6.7.2
6.7.3
6.7.4
6.7.5
6.7.6
6.7.7

Memory ................................................................................................................... 6-33


CNM Controllable numerical quantity (REAL type) ................................................ 6-33
CNM_D Controllable numerical memory (DOUBLE-INTEGER type) .................... 6-34
CNM_I Controllable numerical memory (INTEGER type) ...................................... 6-37
DFR D-flipflop, R-dominant (BOOL type) ............................................................... 6-38
DFR_W Reset-dominant D flipflop (WORD type)................................................... 6-40
RSR RS flipflop, R-dominant (BOOL type)............................................................. 6-41
RSS RS flipflop, S-dominant (BOOL type) ............................................................. 6-42

6.8

Buffers..................................................................................................................... 6-44

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

xi

Contents

6.8.1
6.8.2
6.8.3
6.8.4
6.8.5
6.8.6
6.8.7

DAT Function block to input/output real values in/out of a data memory (REAL
type) ........................................................................................................................ 6-44
DLB Delay block (REAL type)................................................................................. 6-45
SAV Value buffer (REAL type)................................................................................ 6-46
SAV_B Value buffer (BOOL type)........................................................................... 6-47
SAV_D Value buffer (DOUBLE-INTEGER type) .................................................... 6-48
SAV_I Value buffer (INTEGER type) ...................................................................... 6-49
TSAV, TSAV_B, TSAV_I, TSAV_Dvalues are backed-up in the technology
save area (TSAVE area)......................................................................................... 6-50

6.9
6.9.1
6.9.2
6.9.3
6.9.4
6.9.5
6.9.6
6.9.7
6.9.8
6.9.9
6.9.10
6.9.11
6.9.12
6.9.13
6.9.14
6.9.15
6.9.16

Special functions ..................................................................................................... 6-52


BF Flash function for a binary quantity (BOOL type) .............................................. 6-52
BF_W Flash function for a status word (WORD type) ............................................ 6-53
DTS Synchronization delay time (BOOL type) ....................................................... 6-54
ETE Edge evaluator (BOOL type)........................................................................... 6-55
FUI_W First up indicator (WORD type) .................................................................. 6-56
LVM Limit value monitor with hysteresis, 2 directions (BOOL type)....................... 6-57
NOP1 Dummy block (REAL type)........................................................................... 6-58
NOP1_B Dummy block (BOOL type)...................................................................... 6-59
NOP1_D Dummy block (Double Integer type)........................................................ 6-59
NOP1_I Dummy block (Integer type)...................................................................... 6-59
NOP8 Dummy block (Real type)............................................................................. 6-59
NOP8_B Dummy block, 8 binary quantities (BOOL type) ...................................... 6-59
NOP8_D Dummy block, 8 4-byte quantities (Double Integer type) ........................ 6-59
NOP8_I Dummy block, 8 word quantities (INTEGER type).................................... 6-60
PIN8 Priority evaluator ............................................................................................ 6-60
SH Shift block (WORD type)................................................................................... 6-62

6.10
6.10.1
6.10.2
6.10.3

Processor interrupt generator ................................................................................. 6-64


PAC Process interrupt counter ............................................................................... 6-64
PAI Process interrupt periphery input ..................................................................... 6-66
PAS Process interrupt software .............................................................................. 6-68

7 Service-/diagnostic blocks .................................................................................................... 7-1

xii

7.1

ASI Acknowledge signal (BOOL type) ...................................................................... 7-1

7.2

EPE Delete change memory..................................................................................... 7-2

7.3

PNO CPU number (INTEGER type) ......................................................................... 7-3

7.4

PSL Processor utilization (REAL type) ..................................................................... 7-4

7.5

RFG Ramp function (REAL type).............................................................................. 7-6

7.6

SER Service block .................................................................................................... 7-9

7.7

SQG Square wave generator (REAL type)............................................................. 7-11

7.8

SQGB Clock generator for binary signals (BOOL type) ......................................... 7-13

7.9

SSD Output on 7-segment display (WORD type)................................................... 7-15

7.10

STG Step function (REAL type) .............................................................................. 7-16

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Contents

7.11

SYF1 System error field (WORD type, 1 word long) .............................................. 7-18

7.12

SYF4 System error field (WORD type, 4 words long) ............................................ 7-21

7.13

USF User flags (WORD type)................................................................................. 7-24

8 SFC blocks.............................................................................................................................. 8-1


8.1

Control block ............................................................................................................. 8-1

8.2

SFCSI SFC step information block ........................................................................... 8-6

8.3

SFCTI SFC transition information block ................................................................. 8-10

9 GMC blocks............................................................................................................................. 9-1


9.1
9.1.1
9.1.1.1
9.1.2
9.1.2.1
9.1.2.2
9.1.3
9.1.3.1
9.1.3.2
9.1.3.3
9.1.3.4
9.1.3.5
9.1.4
9.1.4.1
9.1.4.2
9.1.4.3
9.1.5

Motion control functions............................................................................................ 9-1


Overview ................................................................................................................... 9-1
Structure of a motion control application .................................................................. 9-2
Basics ....................................................................................................................... 9-4
Position and speed characteristics ........................................................................... 9-4
Block connections and normalization ....................................................................... 9-5
Application example with SIMOLINK coupling to the drive ...................................... 9-8
SIMOLINK interface .................................................................................................. 9-8
FM458 as SIMOLINK master.................................................................................... 9-8
Motion control - control and status bits................................................................... 9-10
Settings for MASTERDRIVES MC.......................................................................... 9-11
Basic functions to generate a setpoint.................................................................... 9-15
Application example with central closed-loop position control ............................... 9-21
System schematic and task profile ......................................................................... 9-21
Central position sensing with an incremental encoder ........................................... 9-22
Setpoint generation (basic structure and analog value output) .............................. 9-27
Integrating drives using the DSC technique via PROFIBUS .................................. 9-34

9.2

MDCMP Compensation block for mode changeover ............................................. 9-37

9.3

CAMSW Cam block with 2 cams ............................................................................ 9-42

9.4

CATCH Catch-up/shutdown ................................................................................... 9-46

9.5

EDC Engage/disengage ......................................................................................... 9-49

9.6

NAVMC Speed/position actual value sensing ........................................................ 9-54

9.7

POSREG Position register reading......................................................................... 9-61

9.8

PHSFT Phase shifter .............................................................................................. 9-63

9.9

ADDAZ Adder with axis cycle limiting..................................................................... 9-65

9.10

SPLINE Cam disk with 32 points (calculation) ....................................................... 9-66

9.11

CAMD Cam disk ..................................................................................................... 9-68

9.12

TABCAM Cam disk in tabular form......................................................................... 9-71

9.13

POSMC Positioning block....................................................................................... 9-74

9.14

OFSSAV Offset calculation..................................................................................... 9-77

9.15

OFSGEN Offset input ............................................................................................. 9-79

9.16

GEAR Gearbox block ............................................................................................. 9-81

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

xiii

Contents

9.17

INT_MR Virtual master ........................................................................................... 9-83

9.18

WEBSFT Measured value offset............................................................................. 9-85

9.19

OVFHSK Overflow handshake procedure .............................................................. 9-87

9.20

TAB, TAB_D Tabular values manager .................................................................. 9-89

9.21

DRVIF Interface to the drive ................................................................................... 9-92

9.22

MDCMP1 basic and equalization functions for Motion Control ............................ 9-97

9.23

CLUTCH engage/disengage (coupling)................................................................ 9-103

9.24

SHEAR cross-cutter/cross sealer ......................................................................... 9-107

9.25

EDC1 engager/disengager ................................................................................... 9-110

9.26

MCSB generating motion sequences (basis block).............................................. 9-115

9.27

MCSS generating motion sequences (subsequent block) ................................... 9-121

9.28

CAMSW1 cam controller for time characteristics ................................................. 9-125

9.29

ENC2 Optional incremental encoder for NAVMC................................................. 9-128

9.30

NAVDP Position actual value sensing .................................................................. 9-131

9.31

DRVIF2 Interface to the drive ............................................................................... 9-137

9.32

RCVT5 Receive block........................................................................................... 9-142

9.33

SNDT5 Send block ............................................................................................... 9-145

10 Special blocks....................................................................................................................... 10-1


10.1

FGEN Format generator ......................................................................................... 10-1

10.2

STATIS Statistical evaluation.................................................................................. 10-6

10.3

TRACK Cut optimization for cross-cutters .............................................................. 10-8

A Appendix ................................................................................................................................ A-1


A.1

Type overview Function Blocks ................................................................................A-1

A.2

Numerical table .......................................................................................................A-16

Index .............................................................................................................................................. I-1

xiv

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.1

DEL Dead line block

Symbol
DEL
input quantity R
activation threshold R

Brief description

X
B

R output quantity

adjustable dead line


the value range, symmetrical around the zero point, can be set to zero

Mode of operation

if the absolute value of X is less than B, then Y = 0


if X is greater than or equal to B, then Y = X - B
if X is less than or equal to -B, then Y = X + B
The dead line, symmetrical around the zero point, can be set using
response value B.
Algorithm:
Y=

X + B for X <= -B
0 for -B < X < B
X - B for X >= B

with the secondary condition B >= 0.


For B < 0 the following is valid for all X: Y = X.
Block diagram

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-1

Closed-loop control blocks

Transfer function

-B
+B

I/O
X

Input quantity

(default: 0.0)

Response threshold

(default: 0.0)

Output quantity

(default: 0.0)

Configuringdata

1-2

Computation time [s]

T400/PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,1
0,7
0,4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.2

DEZ Dead zone block

Symbol
DEZ
input quantity R
response value R

Brief description

X
TH

R output quantity

adjustable dead zone


the value range, symmetrical around the zero point, can be set to zero

Mode of operation

If the absolute value of X is less than TH, then Y = 0.


If the absolute value of X is greater than or equal to TH, then Y = X
The dead zone, symmetrical around the zero point, can be set using
response value TH.
Algorithm:
Y=

X for X <= -TH


0 for -TH < X < TH
X for X >= TH

with the secondary condition TH >= 0.


For TH < 0, the following is valid for all X: Y = X.
Block diagram

TH

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-3

Closed-loop control blocks

Transfer function

-TH
+TH

I/O
X

Input quantity

(default: 0.0)

TH

Response value

(default: 0.0)

Output quantity

(default: 0.0)

Configuringdata

1-4

Computation time [s]

T400/PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,5
0,8
0,4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.3

DIF Differentiator block

Symbol
DIF
input quantity R
derivative act. time const. TS

X
TD

R output quantity

Brief description

Function block with differentiating characteristics

Mode of operation

Output quantity Y is proportional to the rate of change of X, multiplied by


the derivative action time constant TD.
The discrete values are calculated according to the following algorithm:

Yn = ( X n - X n-1 )

TD
TA

Yn

Value from Y in sampling interval n

Xn

Value from X in sampling interval n

Xn1

Value from X in sampling interval n-1

NOTE

The higher TD/TA is, then the higher is the amplitude change at Y from
one sampling instant to the next. TA is the sampling time in which the
function block is configured. TD is internally limited to TD > 0.

CAUTION

Overshoot is possible!

Block diagram

TD

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-5

Closed-loop control blocks

Transfer function

X, Y

TA

TA

X
Y
I/O
X

Input quantity

(default: 0.0)

TD

Derivative action time constant

(default: 0.0 ms)

Output quantity

(default: 0.0)

Configuringdata

1-6

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

9,5
3,1
1,6

Can be inserted online

yes

Can be configured in

Interrupt tasks, cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.4

DT1 block

Symbol
DT1
numerical input value
smoothing time constant
derivative action time constant
setting value
transfer setting vatue

Brief description

R
TS
TS
R
BO

X
T1
TD
SV
S

Y
YPT

R output quantity DT1


R output quantity, smoothing block

Function block with derivative action and smoothing. Output DT1 can be
set.

Mode of operation
Setting function not active (S = 0)
Input quantity X is dynamically delayed by smoothing time constant T1,
and is fed to a differential element (differentiator) and block output YPT.
Output quantity Y of the complete DT1 is proportional to the rate of
change of YPT (difference quotient), multiplied by the derivative action
time TD.
T1 determines the gradient of the output quantity decrease. It specifies
the time at which the transfer function has decreased, after smoothing
and differentiation, to 37% of XTD/T1.
The transfer function, with a sufficiently high T1/TA ( T1/TA>10 )
corresponds to the following characteristic
t / T 1

with t = nTA
Y(t) = X(TD/T1)e
The discrete values are calculated according to the following algorithm:

Y1n =

TD
( Xn YPTn 1)
T1

YPTn = YPTn 1 +

TA
( Xn YPTn 1)
T1

YPTn

Value from YPT in sampling interval n

Yn

Value from Y in sampling interval n

Xn

Value from X in sampling interval n

YPTn1

Value from Y2 in sampling interval n-1

The higher T1/TA is, then the lower is the amplitude change at Y and at
YPT from one sampling instant to the next. TA is the sampling time in
which the function block is configured. The higher TD/TA is, the higher is
the amplitude change at Y from one sampling instant to the next. TD and
T1 are internally limited: TD >= 0, T1 >= TA.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-7

Closed-loop control blocks

Setting function active (S = 1)


If the setting function is active, setting value SV is transferred to DT1
output Y; the smoothing element output is then:

YPTn = X n

T1
SVn
Td

for TD 0

The internal limits for T1 and TD are valid. For TD=0, the output
quantities remain unchanged as long as S = 1.
CAUTION

Overshoot is possible when the setting function is both active and


inactive!

Block diagram

T1

PT1

TD

SV

YPT

Transfer function

Y1

Y1=f(X,t)
X TD
T1

Y1(t=T1)=0,37 X TD/T1

T1

1-8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

I/O
X

Input quantity

(default: 0.0)

T1

Smoothing time constant

(default: 0.0 ms)

TD

Derivative action time constant

(default: 0.0 ms)

SV

Transfer setting value


For S = 0, setting value SV has no influence on the output quantities of the DT1 block.
For S = 1, Y is set to SV, and the output of DT1 is calculated corresponding to the
equation above
(default: 0)

Output quantity DT1

(default: 0.0)

YPT

Output quantity, smoothing block

(default: 0.0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

13,3
4,4
2,2

1-9

Closed-loop control blocks

1.5

FUZ Fuzzy controller (REAL type)

Symbol
FUZ
communications port
adress data
input x1
input x2
input x3
input x4
input x5
input x6
input x7
input x8
input x9
numerical input value x10
save changes in the eprom

Brief description

GV
S
R
R
R
R
R
R
R
R
R
R
BO

CTS
US
X1
X2
X3
X4
X5
X6
X7
X8
X9
X10
EEP

Y1
Y2
Y3
Y4
Yt1
Yt2
YTF
QTS

R
R
R
R
W
W
W
BO

output y1
output y2
output y3
output y4
error code, receiver
error code, transmitter
status display of the fuzzy block (integer typ)
communication port

universal 4 x fuzzy controller, each with 10 Real-format inputs


parameterization using a PC (connected via DUST 1) using the
ProFuzzy tool (this must be separately purchased)
a maximum of 7 trapezoidal membership functions are supported per
input
a maximum of 7 singleton type membership functions are supported
per output
the controller can include up to 50 controllers

Mode of operation

The controller has 7 trapezoidal membership functions for fuzzification. A


maximum of 50 IF...AND...THEN assignments are available for the
inference mechanism.
Seven singleton type membership functions are available for each output
for defuzzification. The controller itself, its inputs and outputs and its
membership functions can have symbolic names. Further, minimum and
maximum limits are entered for each input.
All of the parameters are saved in battery buffered RAMs; when required,
they can also be saved in non volatile EEPROMs.
Communications can be established between the PC and SIMADYN D
via the DUST1 interface. A maximum of 256 FUZ blocks can be
addressed via a logical interface. The controller can be simulated offline
and online. The characteristic field and its cuts can be graphically
represented (3- and 2 dimensional).
The code for fuzzification, inference and defuzzification is permanently
integrated in the block and optimized for the particular processor which
allows short computation times to be achieved.

1-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

For fuzzification, each discrete signal value is assigned appropriate


linguistic variables corresponding to the level of membership. The
inference mechanism works according to the MIN/MAX principle. Each of
the 10 inputs can be involved in each of the 50 rules (logically combined
with fuzzy AND operator). A fuzzy OR operator is realized indirectly by
entering several rules.
Defuzzification is realized according to the gravity method. In this case,
the gravity of the output fuzzy quantity, which is obtained from all of the
fuzzy quantity results according to the inference schematic rule, are
formed over the output quantity, and its abscissa is defined as discrete
output quantity. For this block, for each rule, the level of fulfillment is
multiplied by the modal value of the singletons in the rule. These
products are summed over all rules and are divided by the sum of the
fulfillment line.
The computation time of FUZ is essentially dependent on the number of
inputs, outputs and rules which are used. The basic computation time is
approximately 50 s. The computation time information in the technical
data should be appropriately interpreted.
I/O
CTS

Initialization input to specify the configured name of the module via whose data
interface parameterization is to be realized.

US

Initialization input for address data. The data consists of a channel name, and, in addition, a
channel number (DUST1 syntax)
(default: empty string)

X1

Controller input 1
(default: 0.0)

X10

Controller input 10
(default: 0.0)

EEP

When a 1 is entered, all of the controller data, which have changed since the last time they
were saved in the EEPROM, are again saved there. It is recommended that all of
the controller data are saved in the EEPROM after "fine tuning".
(default: 0)

Y1

Controller output 1
(default: 0.0)

Y4

Controller output 4
(default: 0.0)

YT1

Status display of the receive channel; refer to "Communications Configuring D7-SYS for an
explanation
(default: 16#0000)

YT2

Status display of the transmit channel; explanation, refer to "Communications


Configuring D7-SYS
(default: 16#0000)

YTF

Status display of the fuzzy controller


(default: 16#0000)

QTS

Block output QTS indicates whether the block is operating error-free (QTS = 1),
or after entering an error message, became inactive (QTS = 0)
(default: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-11

Closed-loop control blocks

Configuringdata

1-12

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

70,0
23,1
11,6

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.6

FUZ_I Fuzzy controller (INTEGER type)

Symbol
FUZ I
coupling module name
adress data
input X1
input X2
input X3
input X4
input X5
input X6
input X7
input X8
input X9
input X10
save changes in the EEPROM

Brief description

GV
S
I
I
I
I
I
I
I
I
I
I
BO

CTS
US
X1
X2
X3
X4
X5
X6
X7
X8
X9
X10
EEP

Y1
Y2
Y3
Y4
YT1
YT2
YZF
QTS

I
I
I
I
W
W
W
BO

output Y1
output Y2
output Y3
output Y4
error code receiver
error code transmitter
status display of the fuzzy block
block status

universal 4 x fuzzy controller, each with 10 INTEGER-format inputs


parameterization is realized using PC (connected via DUST1) using
the ProFuzzy tool (this must be separately purchased).
a maximum of 7 trapezoidal membership functions are supported per
input.
a maximum of 7 singleton type membership functions are supported
per output.
the controller can include up to 50 controllers.

Mode of operation

The controller has 7 trapezoidal membership functions for fuzzification. A


maximum of 50 IF...AND...THEN assignments are available for the
inference mechanism. Seven singleton type membership functions are
available for each output for defuzzification. The controller itself, its inputs
and outputs and its membership functions can have symbolic names.
Further, minimum and maximum limits are entered for each input.
All of the parameters are saved in battery buffered RAMs; when required,
they can also be saved in non volatile EEPROMs. Communications can
be established between the PC and SIMADYN D via the DUST1
interface. A maximum of 256 FUZ_I blocks can be addressed via a
logical interface. The controller can be simulated offline and online. The
characteristic field and its cuts can be graphically represented (3- and 2
dimensional).
The code for fuzzification, inference and defuzzification is permanently
integrated in the block and optimized for the particular processor which
allows short computation times to be achieved.
For fuzzification, each discrete signal value is assigned appropriate
linguistic variables corresponding to the level of membership. The
inference mechanism works according to the MIN/MAX principle. Each of
the 10 inputs can be involved in each of the 50 rules (logically combined

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-13

Closed-loop control blocks

with fuzzy AND operator). A fuzzy OR operator is realized indirectly by


entering several rules.
Defuzzification is realized according to the gravity method. In this case,
the gravity of the output fuzzy quantity, which is obtained from all of the
fuzzy quantities results according to the inference schematic rule, are
formed over the output quantity, and its abscissa are defined as discrete
output quantity. For this block, for each rule, the level of fulfillment is
multiplied by the modal value of the singletons in the rule. These
products are summed over all rules and are divided by the sum of the
fullfilment line
The computation time of FUZ_I is essentially dependent on the number
inputs, outputs and rules which are used. The basic computation time is
approximately 50s. The computation time information in the technical
data should be appropriately interpreted.
I/O
CTS

Initialization input to specify the configured name of the module via whose data interface
parameterize operation is to be realized

US

Initialization input for address data. The data consists of a channel name, and, in addition, a
channel number (DUST1 syntax)
(default: empty string)

X1

Controller input 1
(default: 0)

X10

Controller input 10
(default: 0)

EEP

When a 1 is entered, all of the controller data, which have changed since the
last time they were saved in the EEPROM, are saved again. It is
recommended that all of the controller data are saved in the EEPROM after "fine tuning"
(default: 0)

Y1

Controller output 1
(default: 0)

Y4

Controller output 4
(default: 0)

YT1

Status display of the receive channel: refer to "Communications Configuring D7-SYS


(default: 16#0000)

YT2

Status display of the transmit channel; explanation, refer to "Communications


configuring D7-SYS
(default: 16#0000)

YTF

Status display of the fuzzy controller


(default: 16#0000)

QTS

Block output QTS indicates whether the block is operating error-free (QTS=1), or,
after entering an error message, became inactive (QTS=0)
(default: 0)

Configuringdata

1-14

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

70,0
23,1
11,6

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Normal mode
Special features

1.7

INT Integrator

Symbol
INT
input quantity
upper limit value
lower limit value
setting
integral time constant
setting

Brief description

R
R
R
R
TS
BO

X
LU
LL
SV
TI
S

Y
QU
QL

R output quantity
BO integrator at the upper limit
BO integrator at the lower limit

function block with integrating characteristics


integrator functions:
setting the initial value
adjustable integral time constant
adjustable limits.
For normal integrator operation, a positive limit value must be
specified at LU and a negative limit value at LL.

Mode of operation

The change in output quantity Y is proportional to input quantity X and


inversely proportional to the integral time constant TI.
The output Y of the integrator can be limited via inputs LU and LL. If the
output reaches one of the two limits, then a message is output via
outputs QU or QL. Output Y = LU if LL >= LU.
The discrete values are calculated using the following algorithm
(TA is the sampling time in which the function block is configured):

Yn = Yn-1 +

TA
Xn
TI

Yn

Value from Y in sampling interval n

Yn1

Value from Y in sampling interval n-1

Xn

Value from X in sampling interval n

For S = 1, output quantity Y is set to setting value SV. Two functions can
be implemented via S:
Integrator tracking (Y = SV)
If binary input S=1, and setting value SV is changed: After setting, the
output immediately jumps to the setting value.
Setting the integrator to the initial value SV:
S1 is switched to 1. S is then set to 0 and the integrator ramps from SV in
the direction, which is specified by the polarity of input X.
NOTE

TI is internally limited: TI >= TA.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-15

Closed-loop control blocks

Block diagram

SV

TI

LL

LU
QU
Y

QL

Truth table for


LL<LU
S

Condition

QU

QL

Mode

LL<Yn-1+XTA/TI<LU

Yn

Integrating

Yn-1+XTA/TI >= LU

LU

INT at the upper limit

Yn-1+XTA/TI <= LL

LL

INT at the lower limit

LL<SV<LU

SVn

Setting

SV >= LU

LU

INT at the upper limit

SV <= LL

LL

INT at the lower limit

Truth table for


LL>=LU
S

Condition

QU

QL

Mode

LL >= LU

LU

INT at the upper limit

* = any
I/O
X

Input quantity

(default: 0.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

SV

Setting value

(default: 0.0)

TI

Integral time constant

(default: 0.0 ms)

Setting

(default: 0)

Output quantity

(default: 0.0)

QU

Integrator at the upper limit

(default: 0)

QL

Integrator at the lower limit (default: 0)

1-16

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

7,5
2,5
1,3

1-17

Closed-loop control blocks

1.8

LIM Limiter

Symbol
LIM
input quantity R
upper limit value R
lower limit value R

Brief description

X
LU
LL

Y
QU
QL

R output quantity
BO input quantity at the upper limit
BO input quantity at the lower limit

function block with limiting function


adjustable upper and lower limits
indicates when the set limits have been reached

Mode of operation

The function block transfers input quantity X to its output Y. The input
quantity is limited according to LU and LL.
Output QU is set to 1 if the input quantity reaches the upper limit value
LU.
Output QL is set to 1 if the input quantity reaches the lower limit value LL.
If the lower limit value is greater than or equal to the upper limit value,
output Y is set to the upper limit value LU.
Algorithm:

LUfor X LU

Y = X for LL < X < LU


LL for X LL

with the secondary condition: LL<LU


Block diagram

LL

LU
QU

Y
QL

Truth table for


LL<LU

1-18

Condition

QU

QL

Mode

LL < X < LU

X >= LU

LU

Input quantity at the upper limit

X <= LL

LL

Input quantity at the lower limit

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Truth table for


LL >= LU

Condition

QU

QL

Mode

LL >= LU

LU

Input quantity at the upper limit

I/O
X

Input quantity

(default: 0.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

Output quantity

(default: 0.0)

QU

Input quantity at the upper limit

(default: 1)

QL

Input quantity at the lower limit

(default: 1)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,0
0,9
0,5

1-19

Closed-loop control blocks

1.9

LIM_D Limiter (Typ DOUBLE-INTEGER)

Symbol
LIM_D
input quantity D
upper limit value D
lower limit value D

Brief description

X
LU
LL

Y
QU
QL

D output quantity
BO input quantity at the upper limit
BO input quantity at the lower limit

function block with limiting function


adjustable upper and lower limits
indicates when the set limits have been reached

Mode of operation

The function block transfers input quantity X to its output Y. The input
quantity is limited according to LU and LL.
Output QU is set to 1 if the input quantity reaches the upper limit value
LU.
Output QL is set to 1 if the input quantity reaches the lower limit value LL.
If the lower limit value is greater than or equal to the upper limit value,
output Y is set to the upper limit value LU.
Algorithm:

LUfor X LU

Y = X for LL < X < LU


LL for X LL

with the secondary condition: LL<LU


Block diagram

LL

LU
QU

Y
QL

Truth table for


LL<LU

Truth table for


LL >= LU

1-20

Condition

QU

QL

Mode

LL < X < LU

X >= LU

LU

Input quantity at the upper limit

X <= LL

LL

Input quantity at the lower limit

Condition

QU

QL

Mode

LL >= LU

LU

Input quantity at the upper limit

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

I/O
X

Input quantity

(default: 0.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

Output quantity

(default: 0.0)

QU

Input quantity at the upper limit

(default: 1)

QL

Input quantity at the lower limit

(default: 1)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,0
0,9
0,5

1-21

Closed-loop control blocks

1.10

PC P controller

Symbol
PC
setpoint 1
setpoint 2
setpoint 3
actual vlaue
upper limit value
lower limit value
proportional coefficient
controller enable

Brief description

R
R
R
R
R
R
R
BO

W1
W2
W3
X
LU
LL
KP
EN

Y
YE
QU
QL

R
R
BO
BO

output quantity
system deviation
controller at the upper limit
controller at the lower limit

P controller with 3 setpoint inputs and 1 actual value input


the actual value polarity (sign) is reversed in the block
indication when the set limits have been reached
for standard controller operation, a positive limit value should be
specified at LU and a negative limit value at LL.

Mode of operation

The three setpoints W1, W2 and W3 are added, and the actual value X is
subtracted from the setpoint sum. The result YE is multiplied by the
proportional coefficient KP and output at Y.
Algorithm:

Y = KP YE = KP (W1 + W 2 + W 3 X )
YE = W1 + W2 + W3 X

The system deviation YE is always calculated independently of the mode


and is available a block output.
The output Y of the controller can be limited via inputs LU and LL. If
output Y reaches one of the two limits, then a message is output via
outputs QU and QL. Output Y = LU if LL >= LU.
The controller is enabled for EN = 1. If EN = 0, the output quantity Y is
set to 0. The controller is inhibited. Binary outputs QU and QL are in this
case, treated as if KP * YE is zero.
The controller, inverts when a negative KP value is entered (inverting
amplifier).

1-22

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Block diagram

W1

KP

LL

LU

W2
QU
Y

YE

W3
X

QL

YE

EN
Truth table

for LL<LU

EN

Condition

QU

QL

Mode

LL< 0 <LU

Controller inhibit

LU <= 0

Controller inhibit

LL >= 0

Controller inhibit

LL<YE KP<LU

KP YE

Controller enable

YE KP >= LU

LU

Controller at the
upper limit

YE KP <= LL

LL

Controller at the
lower limit

Truth table

for LL>=LU

EN

Condition

QU

QL

Mode

None

Control inhibit

LL >= LU

LU

Controller at the
upper limit

I/O
W1

Setpoint 1

(default: 0.0)

W2

Setpoint 2

(default: 0.0)

W3

Setpoint 3

(default: 0.0)

Actual value

(default: 0.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

KP

Proportional coefficient

(default: 0.0)

EN

Controller enable

(default: 0)

Output quantity

(default: 0.0)

YE

System deviation

(default: 0.0)

QU

Controller at the upper limit

(default: 1)

QL

Controller at the lower limit

(default: 1)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-23

Closed-loop control blocks

Configuringdata

1-24

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

11,7
3,9
2,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.11

PIC PI controller

Symbol
PIC
setpoint 1
setpoint 2
actual value 1
actual value 2
pre-control value
upper limit value
lower limit value
setting value, integrator
proportional coefficient
integral action time
I controller
controller enable
set integrator
hold integrator value

Brief description

R
R
R
R
R
R
R
R
R
TS
BO
BO
BO
BO

W1
W2
X1
X2
WP
LU
LL
SV
KP
TN
IC
EN
S
HI

Y
YE
YI
QU
QL

R
R
R
BO
BO

output value
system deviation
integrator value
controller at the upper limit
controller at the lower limit

universal PI controller, can toggle between the P controller or I


controller modes
Can be used as speed controller or higher level controller. Suitable for
dynamic override controllers
flexible integrator functions:
set initial value load SV into the integrator
hold instantaneous value of the integrator P controller
integrator control by SV
integrator control by limiting the controller
disable P component I controller
total controller functions:
independent setting as well as change of the following quantities
during operation:
proportional coefficient KP
integral action time TN
controller limits LU and LL
pre-control value WP, e.g. for inertia compensation
second actual value input X2, e.g. to input a droop factor.
display when the set limits are reached.

Mode of operation

The actual value sum (X1+X2) is subtracted from the setpoint sum
(W1+W2), corresponding to the following equation:

YE = (W1 + W2) ( X1 + X2) .


The result, system deviation YE is then multiplied by the adjustable
proportional coefficient KP. The product is fed to the output summing
function and to the integrator.
The adjustable integral action time TN defines the integration

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-25

Closed-loop control blocks

characteristics of the controller. The change in output quantity YI is


proportional to input quantity KP. YE and inversely proportional to integral
action time TN. The integrator value YI is also fed to the output summing
function An additional value can be added, with the correct polarity (sign),
to output value Y via input WP.
The discrete values are calculated according to the following algorithm:

TA

Yn = Yn-1 + KP 1 +
YE n - YE n-1
TN

with the secondary conditions: LL<Y<LU, and LL<LU


Yn

Value from Y in sampling interval n

Yn1

Value from Y in sampling interval n-1

TA is the sampling time in which the function block is configured.


Block diagram
KP

W1

IC

TN

SV

LL

WP

LU

W2
YE
X1

X2

KP * YE

(YPn)

QU

(WPn)

Y
QL

(YIn)

YI>LU
YI<LL

HI
I

EN

.>=1

YI

Sign

YE

1-26

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Transfer functions

KP * YE

LU

YI

1)
LL
LU

Y
KP * YE
TN

1)

LL

Charac. 1

2)
KP * YE absolute value further
integrated by YI

Charac. 2

Characteristics 1 and 2 show the characteristics of Y and YI for YE steps:


Characteristic 1, normal operation, without limiting
Characteristic 2, with limiting function ( e.g. LL)
For 2), a decrease of YE * KP can be expected, but which can be boosted by further
integrating in 1)!

Output Y and integrator value YI of the controller can be limited via inputs
LU and LL. When output quantity Y reaches the set limits, this is
indicated with either QU = 1 or QL = 1.
Operating modes
and control of the
closed-loop
controller
Commands at the
control inputs:

The control inputs have the following priority:


EN before IC before S before HI.

Control input

Value

Function

EN

Controller enable

IC

Changing over from a PI- to a I-controller

Transfer the integrator setting value, no


integration

HI

Hold integrator output YI, no integration

The combination of commands at the control inputs and the possible


modes can be taken from the truth tables.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-27

Closed-loop control blocks

Normal controller operation involves LL <= 0 <= LU and LL < Yn < LU.
However, other settings are possible, which are now subsequently
explained. To realize this, the algorithm is suitably adapted:

Yn = KP YE n + YI n + WPn
A differentiation can be made between 5 operating conditions, depending
on LU and LL.
No.

Condition

Yn

LL < KPYEn + YIn + WPn <LU

KPYEn+ YIn + WPn

KPYEn + YIn + WPn >= LU

LU

KPYEn + YIn + WPn <= LL

LL

none

LU

none

LU

LL < LU

LL =LU
4
LL > LU
5

If output Y reaches the set limits LL or LU during a control operation, then


integrator YI could continue to run until it also reaches the limit where it
will then be held.

Integrator control
by limiting

If the controller is at the limit and if the limit is changed, output Y


assumes the new instantaneous value as long as over modulation is
specified. However, the integrator integrates-up to the new limit value
with rate of change YIn.
for controller inhibit

Truth table
EN

IC

HI

YIn

YIn

Yn

Mode

Comments

Control inhibit

KP,RN, WP, LU, LL, YE any

1-28

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

for condition 1, with LL < LU and LL< Yn < LU: normal mode

Truth table
EN

IC

HI

Yin

Yn

Mode

Comments

KPYEn YInTA/TN
1+YIn

KPYE
n+YIn
+WPn

PI controller

Controller enable, standard


operation

KPYEn YInTA/TN
1+YIn

YIn+W
Pn

I controller

P component = 0

SVn

KPYE
n+YIn
+WPn

P controller,
integrator
control

YIn = SVn

SVn

YIn+W
Pn

P controller,
integrator
control

YIn = SVn

YIn-1

KPYE
n+YIn
+WPn

P controller,
integrator =
constant

YIn = YIn-1

YIn-1

YIn+W
Pn

I controller,
integrator =
constant

YIn = YIn-1

Yin

* = any
for condition 2 with LL < LU and Yn = LU: Controller over modulation with
LU limiting function

Truth table
EN IC

HI

YIn

YIn

Yn

Mode

KPYEn
TA/TN

YIn-1+YIn for
YIn-1 < LU
YIn-1- YIn for
YIn-1 > LU
LU for YIn-1 =
LU

LU

PI controller
YIn integrates -> LU,
at the upper limit possibly with (-)

KPYEn
TA/TN

YIn-1+YIn for
YIn-1 < LU
YIn-1- YIn for
YIn-1 > LU
LU for YIn-1 =
LU

LU

I controller at the YIn integrates -> LU,


upper limit
possibly with (-)

SVn for SVn <


LU
LU for SVn >=
LU

LU

P controller at
the upper limit

SVn for SVn <


LU
LU for SVn >=
LU

LU

I controller at the YIn = SVn or YIn = LU,


upper limit
P component = 0

YIn-1

LU

P controller,
integrator =
constant

YIn = YIn-1 or YIn-1 = LU

YIn-1

LU

I controller,
integrator =
constant

YIn = YIn-1 or YIn-1 = LU,


P component = 0

Comment

YIn = SVn or YIn = LU

* = any

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-29

Closed-loop control blocks

for condition 3 with LL < LU and Yn = LL: Controller over modulation with
LL limiting function

Truth table
EN IC

HI

YIn

YIn

Yn

Mode

Comments

KPYEn
TA/TN

YIn-1+YIn for
YIn-1 < LL
YIn-1- YIn for
YIn-1 > LL
LL for
YIn-1 = LL

LL

PI controller at
the lower limit

YIn integrates -> LU,


possibly with (-)

KPYEn
TA/TN

YIn-1+YIn for
YIn-1 < LL
YIn-1- YIn for
YIn-1 > LL
LL for YIn-1 = LL

LL

I controller at the
lower limit

YIn integrates -> LU,


possibly with (-)

SVn for
SVn > LL
LL for
SVn <= LL

LL

P controller at the YIn = SVn or YIn = LL


lower limit

SVn for
SVn > LL
LL for SVn <=
LL

LL

I controller at the
lower limit

YIn = SVn or YIn = LL,


P component = 0

YIn-1

LL

P controller,
integrator =
constant

YIn = YIn-1 or YIn = LL

YIn-1

LL

I controller,
integrator =
constant

YIn = YIn-1 or YIn = LL,


P component = 0

* = any

for condition 4 with LL = LU and Yn = LU = LL: Controller control with LL


and LU.

Truth table
EN

IC

HI

YIn

YIn

Yn

Mode

Yn - KPYEn - WPn

L=
LU

Controller control
refer to LL and LU

Comments

* = any

for condition 5 with LL > LU and Yn = LU: Controller control with LU


limiting function.

Truth table
EN

IC

HI

YIn

KPYEn YIn-1+YIn for


TA/TN
YIn-1 < LU
YIn-1- YIn for
YIn-1 > LU
LU for YIn-1 = LU

YIn

Yn

Mode

LU

PI controller at the
upper limit

Comment

= any

Depending on the direction of the limit value change, the integration


polarity (sign) is, if necessary, inverted.

1-30

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Transfer function for controller over modulation for conditions 2 to 5:

KP * YE

LU
LU

YI

LL
LU

LL
LU
LU

-DYIn

LL

1)

LL
LU
1)

LL
LL
Section 1

Section 2

Section 3

Section 4

Section 1: Characteristic with LUn>LUn-1 acc. to condition 2


Section 2: Characteristic with LLn<LLn-1 acc. to condition 3
Section 3: Characteristic with LLn>LLn-1 acc. to cond. 3, for
limit shift opposing the control direction with sign reversal at the
integrator input
Section 4: Characteristic with LLn>LUn acc. to condition 5
1) step of KP * YE, as the integrator has run up to the limit.

Changeover from
the PI mode into
the I mode

For EN = 1 and IC = 1, the P component is held at 0 and the controller is


changed over from PI to I characteristics. Output Y assumes integrator
value YI. If this occurs during a control operation a step of - KP.YE
occurs at output Y.
When resetting to IC=0, the P component is again set to the current value
of KP.YE. The controller again has PI characteristics. If this occurs during
a control operation, a step of KP * YE occurs at output Y.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-31

Closed-loop control blocks

Changeover from
the PI mode into
the P mode

If block inputs EN = 1 and HI = 1, integrator YI is held and the controller


is bumplessly changed over from PI- into P characteristics. YI still acts as
summand on output Y
When resetting to HI=0, the integrator is re enabled. The controller again
has PI characteristics.
Transfer functions when changing over without controller over
modulation: examples for EN=1S=0

PI- "I characteristics

I- "PI characteristics
"1"

"1"

IC "0"
KP * YE

"0"

KP * YE
Y
YI

PI- "P characteristics


HI "0"

P- "PI characteristics
"1"

"1"

KP * YE

NOTE

KP * YE

KP * YE

YI

"0"

KP * YE
Y

YI

YI

The system deviation (control error) YE is always calculated and output,


independent of the control commands present and independent of the
modes.
The integrator always operates internally with increased accuracy, so that
even for a low system deviation, the block still integrates. It should be
ensured that the sampling time is sufficiently low with reference to the
integral action time TN. TN is internally limited: TN >= TA.

1-32

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

I/O
W1

Setpoint 1

(default: 0.0)

W2

Setpoint 2

(default: 0.0)

X1

Actual value 1

(default: 0.0)

X2

Actual value 2

(default: 0.0)

WP

Pre-control value

(default: 0.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

SV

Setting value, integrator

(default: 0.0)

KP

Proportional coefficient

(default: 0.0)

TN

Integral action time

(default: 0.0 ms)

IC

I controller

(default: 0)

EN

Controller enable

(default: 0)

Set integrator

(default: 0)

HI

Hold integrator value

(default: 0)

Output value

(default: 0.0)

YE

System deviation

YI

Integrator value

(default: 0.0)

QU

Controller at the upper limit

(default: 1)

QL

Controller at the lower limit

(default: 1)

Configuringdata

(default: 0.0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

14,3
4,7
2,4

1-33

Closed-loop control blocks

1.12

PT1 element

Symbol
PT1
input quantity
smoothing time constant
setting value
transfer setting value

Brief description

R
TS
R
BO

X
T
SV
S

R output quantity

1st order delay element with setting function


used as smoothing element

Mode of operation
Setting function not active (S = 0)
Input quantity X, dynamically delayed by the smoothing time constant T,
is output at Y.
T defines the rate of rise (gradient) of the output quantity. It specifies the
time at which the transfer function has increased to 63% of its final value.
After t = 3T, the transfer function has reached approximately 95% of its
final value.
The internally fixed proportional gain is 1 and cannot be varied.
The transfer function, if T/TA is sufficiently high (T/TA > 10) has the
following characteristic.

Y( t ) = X (1 e t / T )
with t = nTA.
The discrete values are calculated using the following algorithm:

Yn = Yn-1 +

TA
( X n - Yn-1 )
T

Yn

Value from Y in sampling interval n

Yn1

Value from Y in sampling interval n-1

Xn

Value from X in sampling interval n

Setting function active (S = 1)


If the setting function is active, the actual setting value SVn becomes the
output quantity:
Yn = SVn
NOTE

1-34

The higher T/TA is, then the lower is the amplitude change at Y from one
sampling instant to the next. TA is the sampling time in which the function
block is configured.
T is internally limited: T >= TA.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Block diagram

SV

Transfer function

Y=f(X,t)
Y(t=T)=0,63X
X

X
Y

I/O
X

Input quantity

(default: 0.0)

Smoothing time constant

(default: 0.0 ms)

SV

Setting value

(default: 0.0)

Transfer setting valueFor S = 0,


the block operates
as delay elementFor S = 1,
output Y is set to SV

(default: 0)

Output quantity

(default: 0.0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5,5
1,8
0,9

1-35

Closed-loop control blocks

1.13

PWM Pulse width modulator

Symbol
PWM
input quantity
amplification factor
period
max. pulse width
min. pulse width
enable

Brief description

R
R
TS
TS
TS
BO

X
XF
TP
TU
TL
EN

QP
QN

BO output for positive pulses


BO output for negative pulses

controlling DC controllers (choppers)


controller for 2-point controller
generating trigger signals

Mode of operation

The function block generates square wave pulses with period TP and
width PW. The width PW of the pulses is generated from the following
product:

PW = X * XF

with the secondary condition TL <= PW <= TU. Pulse width PW has the
units of ms.
If the sign of X.XF is positive (positive polarity), pulses are output at QP; if
the sign is negative, pulses are output at QN.
The time interval, within whose limits the pulse width can be varied, can
be defined via inputs TL and TU.
For EN = 1, the function block is enabled; for EN = 0, it is inhibited.
When configuring it should be observed that the following is selected:
T <=PW <=TU<TP.
TP dominates over TU, TL and PW. After TP expires, a new period
starts, independent of TU, TL and PW.
NOTE

TU, TL and TP are limited internally as follows:


0.0 <= TU,TL,TP <= ( 2

32

1) * TA

Block diagram

TP TU TL
X
XF

QP
QN

EN

1-36

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Pulse diagram

QP, QN
1

0
t

TL

PW
TU
TP

PW = Pulse width
= illegal zone, outside the limits
I/O
X

Input quantity

(default: 0.0)

XF

Amplification factor

(default: 0.0)

TP

Period

(default: 0.0 ms)

TU

Max. pulse width

(default: 0.0 ms)

TL

Min. pulse width

(default: 0.0 ms)

EN

Enable

(default: 0)

QP

Output for positive pulses

(default: 0)

QN

Output for negative pulses (default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,1
1,0
0,5

1-37

Closed-loop control blocks

1.14

RGE Ramp function generator

Symbol
RGE
input quantity R
Normalization R
upper limit value R
lower limit value R
setting value, output R
ramp-up time TS
ramp-down time TS
raise BO
lower BO
output equal to input BO
set BO

Brief description

X
NRM
LU
LL
SV
TU
TD
CU
CD
CF
S

Y
YA
QE
QU
QL

R output quantity
R acceleration value
BO output Y equals input X
BO upper limit reached
BO lower limit reached

ramp function generator to limit the rated of change of input quantity


X.
the output quantity can be limited.
the following quantities can be independently set and changed during
operation:
ramp-up- and ramp-down times
output limits LU and LL
setting value.
flexible ramp function generator functions:
integrating to setpoint X (tracking)
setting the ramp function generator output to the initial value
( load SV into the integrator)
raise and lower the ramp function generator output, integrating

Mode of operation

1-38

The function block includes an integrator with two integral time constants
which can be independently set from one another. Output Y changes
according to the following algorithm
Yn = Yn 1 + YAn .
The acceleration value YE is separately calculated for ramp up and for
ramp down and is output at one output.
Ramp up is when the output value Y moves away from zero.
Ramp down is when the output value Y approaches zero.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Block diagram

CU

TU TD SV LL

CD

LU

Control
logic

CF
X

YA
QE

QU
QL

The following is valid for the acceleration value at ramp up:

YA =

TA
* NRM fr Y > 0
TU

YA =

TA
* NRM fr Y < 0
TU

The following is valid for the acceleration value at ramp down:

YA =
YA =

TA
* NRM fr Y > 0
TD

TA
* NRM fr Y < 0
TD

The changeover between ramp up and ramp down is realized at direction


change or in the zero crossover of the transfer function.
The mode is specified using a control logic, which is dependent on the
logical statuses of control inputs S, CF, CU and CD.
The output quantity can be limited via inputs LU and LL. When Y
reaches the set limit, binary output QU or binary output QL is set to 1.
Binary output QE becomes 1, if Y=X.
Ramp-up and
ramp-down time

The ramp up time TU is the time in which the absolute value of the output
quantity increases by NRM.
The ramp down time TD is the time in which the absolute value of the
output quantity is reduced by NRM.
The ramp up time and ramp down time can be different.
The lower TA/TU or TA/TD, then the lower is the amplitude change at Y
from one sampling instant to the next. TA is the sampling time in which
the function block is executed.

Modes and control


of the rampfunction generator

The control inputs have the following priority:


S before CF before CU and CD.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-39

Closed-loop control blocks

Function of the
control inputs:

S =1

Load setting value SV into the integrator, no integration

CF =1

Output Y integrates to setpoint X, tracking

CU =1

Output Y integrates towards LU, tracking

CD =1

Output Y integrates towards LL, tracking

The combination of commands at the control inputs and the possible


modes can be taken from the truth tables.
Standard ramp function generation operation involves LL<= 0 <= LU and
LL < Yn < LU. However, other settings are possible which are now
subsequently explained.
The following is valid for the setting with LL >= LU: Limit LU dominates
over limit LL.
Behavior of the
integrator when at
a limit

If output Y reaches one of the set limits LL or LU during a control


operation, the integrator value is held. Output value Y is held constant
until the integrator value leaves the limit when the input quantities are
changed.
If the integrator is at a limit, and if the limit value is changed, the
integrator behaves differently depending on the direction of the limit value
change.
If the absolute limit value is increased, and if the control logic specifies
that the ramp function generator should integrate in the same direction,
the integrator ramps from the previously held value until the output again
reaches the limit value. The selected ramp up time is used.
If the absolute limit value is reduced, the integrator integrates from the
previously held value until the output again reaches the limit value. The
selected ramp down time is used.

NOTE

The integrator operates internally with a high accuracy so that even for
low setpoint actual value differences, the block still integrates. It should
be ensured that the sampling time is sufficiently low with respect to the
ramp up or ramp down time.
TU and TD are internally limited: TU >= TA, TD >= TA.
Ramp function generator stop

Truth table
S

CF

CU

CD

YAn

Yn

Mode

Comment

Yn-1

Stop

Y is constant

1-40

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

LL < LU and
LL < actual value
Yn-1 < LU
S

CF

CU

CD

YAn

Yn

Mode

Comment

Step

SVn

Set output to SV

SV can be as required, fixed


or variable

TA/TU;
TA/TD

Yn-1
+YAn

Standard operation
Y -> X

TU for [X > Y Y >= 0]


[X < Y Y <= 0]
TD for [X > Y Y < 0]
[X < Y Y > 0]

TA/TU
(TA/TD)

Yn-1
+YAn

Approach upper
limit value Y -> LU

TU,TD as before, dependent


on the initial position

TA/TD
(TA/TU)

Yn-1
+YAn

Approach lower limit TU,TD as before, dependent


value Y -> LL
on the initial position

* = any
Transfer functions

X,Y
LU
X1
NRM

NRM

TU

X2
TU

TD

X4

TD

t
NRM

X
Y

NRM

X3

LL
Example 1: CF = 1 with LL < LU and LL < X < LU, as well as X1=1.5, X2=X4 =0.0, X3=1.5,
LU=2.0, LL=2.0, TU > TD

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-41

Closed-loop control blocks

CU
CD

1
0
1
0

Y
LU

LL
Example 2: Motorized potentiometer function with CU and CD and with LL<LU

CF

1
0
1
0

CD
Y
LU

X
SV

LL
Example 3: Set integrator with LL < LU

1-42

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

CU

1
0

CD

1
0

LL < LU

LL > LU

LL < LU

LU

Pull-in
limit

Pull-in
limit

Push-out
limit

LL
Example 4: Changing and interchanging the limits

I/O
X

Input quantity

(default: 0.0)

NRM

Normalization

(default: 1.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

SV

Output setting value

(default: 0.0)

TU

Ramp-up time

(default: 0.0 ms)

TD

Ramp-down time

(default: 0.0 ms)

CU

Raise

(default: 0)

CD

Lower

(default: 0)

CF

Output equal to the input

(default: 0)

Setting

(default: 0)

Output quantity

(default: 0.0)

YA

Acceleration value

(default: 0.0)

QE

Output Y equal to input X

(default: 0)

QU

Upper limit reached

(default: 0)

QL

Lower limit reached

(default: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-43

Closed-loop control blocks

Configuringdata

1-44

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

32,9
10,9
5,5

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

1.15

RGJ Ramp function generator with jerk limiting

Symbol
RGJ
input quantity R
Normalization R
control deviation R
upper limit value R
lower limit value R
setting value output R
acceleration setting value R
control deviation weighting R
ramp up time TS
ramp down time TS
rounding-off time during ramp-up TS
rounding-off time during ramp-up TS
rounding-off time during ramp-up TS
rounding-off time during ramp-down TS
rounding-off time during ramp-down TS
rounding-off time during ramp-down TS
raise BO
lower BO
output equal to the input BO
upper limit reached BO
lower limit reached BO
Rounding off on BO
setting acceleration BO
set BO
enable BO

Brief description

X
NRM
EV
LU
LL
SV
ASV
WD
TU
TD
TRU
TR1
TR2
TRD
TR3
TR4
CU
CD
CF
ULR
LLR
RQN
SA
S
EN

Y
YL
YA
YB
QE
QU
QL

R output quantity
R Limited output quantity
R acceleration value
R jerk value
BO output Y equal to input X
BO upper limit reached
BO lower limit reached

ramp function generator with jerk limiting and tracking


ramp function generator functions:
set output Y or acceleration YA
ramp function generator integrates to setpoint X, jerk limited
raise and lower the ramp function generator output, integrating
ramp function generator tracking corresponding to the system
deviation of a secondary controller when limiting

Mode of operation

The function block limits acceleration (speed/velocity rate of change) and


the jerk (rate of change of the acceleration) of setpoints.
The following algorithms are valid:

Yn = Yn 1 + YAn
YAn = YAn 1 + YBn

Acceleration value YA and jerk value YB are separately calculated for


ramp up and ramp down. The times for ramp up time TU and rounding off
time at ramp up TRU as well as ramp down time TD and the rounding off
time at ramp down TRD must be configured.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-45

Closed-loop control blocks

For the acceleration value YA outside the rounding off time, the
following is valid at ramp up:

YA = YAmax =

TA
NRM
TU

YA = YAmax =

TA
NRM
TU

for Y > 0
for Y < 0

For the acceleration value YA outside the rounding-off time, the


following is valid at ramp-down:

YA = YAmax =
YA = YA max =

TA
NRM
TD

TA
NRM
TD

for Y > 0
for Y < 0

The following is valid for jerk value YB during the rounding-off time at
ramp-up:

YB =

TA YAmax
TRU

or

YB =

TA YAmax
TR1

YB =

TA YAmax
TR 2

The following is valid for jerk value YB during the rounding-off time at
ramp-down:

YB =

TA YAmax
TRD

or

YB =

TA YAmax
TR 3

YB =

TA YAmax
TR 4

The operating mode is specified via control logic dependent on the logical
statuses of binary quantities EN, S, SA, CF, CU and CD.
The input quantity X, and therefore indirectly output quantity Y are limited
via block inputs LU and LL. When Y reaches the set limits, this is
indicated at the binary outputs with QU = 1 or QL = 1.
Binary output QE is 1 if the output quantity Y is equal to the input quantity
X.
Ramp-up is sub-divided into three phases:
Phase 1
When setpoint X is increased, maximum jerk YB dependent on TRU
or TR1 is entered in the first phase. Thus, the acceleration is
increased in proportion to the time and in this rounding-off phase,
output quantity Y increases quadratically over time.

1-46

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Phase 2
After the maximum acceleration YA has been reached, corresponding
to the specified ramp up time TU, acceleration is constant. Output
quantity Y increases in proportion to the time.
Phase 3
In the third phase, acceleration is reduced in proportion to time. In this
rounding off phase, output quantity Y dependent on TRU or TR1
approaches input quantity X quadratically over time.
Ramp down is essentially the same.
Transfer function:
RGJ, standard
ramp-up

X,Y

NRM

TU

0.0

t
TRU

TRD

YA
0.0

YB
0.0

Ramp-up and ramp-down (not to scale)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-47

Closed-loop control blocks

X,Y

TR1

TR2

TR3

TR4

Ramp-up and
ramp-down time

The ramp time TU is defined as the time in which the absolute output
quantity is increased by the value of NRM in proportion to the time.
The ramp down time TD is defined as the time in which the absolute
output quantity is decreased by the value of NRM in proportion to the
time.
The ramp up and ramp down times can be different.

Rounding-off time
at ramp-up and
ramp-down

The ramp up time is defined as the time in which the output quantity
reaches the maximum acceleration value, starting from a constant initial
value. In this time, the jerk value is constant and is not equal to zero
(refer to phase 1).
The rounding off time is also defined as the time in which the output
quantity reaches a constant final value starting from its maximum
acceleration value (refer to phase 3).
The rounding off time at ramp up is defined with TRU or TR1, TR2 and at
ramp down with TRD or TR3, TR4.
When the setpoint direction changes, or at the zero crossover of the
transfer function, depending on the initial position, a changeover is made
from ramp up into ramp down or from ramp down into ramp up with the
associated rounding off operations. The appropriate is valid when
changing the ramp up or the ramp down time during operation.
If a ramp up follows a ramp down, whereby TRD and TD are low and
TRU and TU are high, at a ramp down, YA is reduced, so that at the
following ramp up, there is no overshoot as long as the target value
(X, LL or LU) and the ramp up generator times (TU, TD, TRU, TRD) do
not change.
If rounding off is disabled and Normalization is 1.0, RGJ acts just like
function block RGE.

Enabling roundingoff (jerk limiting)

Rounding off at ramp up or ramp down is active if RQN=1.


Transfer function: Disabling rounding off during run up.

1-48

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

RQN
0
X

X,Y

0.0

1.0

TU

YA
0.0
t
YB
0.0
t

Rounding off is disabled for RQN = 0. Ramp up/ramp down is realized


according to the ramp up/ramp downtime specified at TU or TD.
When jerk limiting is disabled during the rounding off time, further rampup/ramp down is realized with the ramp up/ramp down time, specified at
TU or TD.
NOTE

Operating mode
"Rounding-off off"

If, during the rounding-off phase, input connectors are modified that
influence the kinematics (e.g. X, TU, TD, TRU, ...), then it can occur
that the ramp-function generator brakes more significantly than that
specified by the selected rounding-off.
If you wish to operate the function block in this mode, proceed as follows:

Set connections TRU, TR1, TR2, TRD, TR3 and TR4 to "0" (all
rounding-off times are "0").

Set the connection RQN to the value "1" mode ("Rounding-off on").

With these settings, the function block RGJ behaves as described in the
operating mode "rounding-off off" (RQN=0).
Modes and control
of the rampfunction generator

The control inputs have the following significance:


EN=1

Enable ramp-function generator

S=1

Set output Y to setting value SV, non integrating

SA=1

Set acceleration YA to setting value ASV, non integrating

CF=1

Output Y integrates to setpoint X, tracking

CU=1

Output Y integrates towards LU, tracking

CD=1

Output Y integrates towards LL, tracking

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-49

Closed-loop control blocks

NOTE

The control inputs have the following priority:


EN before S before SA before CF before CU and CD.
The combination of commands at the control inputs and the possible
modes can be taken from the truth tables.
For standard ramp function generator operation: LL <= 0 <= LU and
LL < Yn < LU. However, other settings are possible which will now be
explained.
The following is valid for the setting with LL >= LU: Limit LU dominates
over limit LL.
For all of the transitional operations, the acceleration and jerk values are
not exceeded.
Depending on the setpoint input limit shift, a characteristic might be
obtained with only rounded off transitions corresponding to phases 1 and
3, whereby the characteristic of output quantity Y is not in proportion to
time.
Ramp function generator stop

Truth table
EN

SA

CF

CU

CD

YAn

Yn

Mode

Comment

Inhibit

Y=0

Yn-1

Inhibit

Y = constant

*= any

LL < LU and LL <


actual value Yn-1 <
LU
EN

SA

CF

CU

CD

YAn

Yn

Mode

Comment

Step

SVn

Set output to
SV

SV as required, fixed or
variable

ASVn

Yn-1 +
YAn

Set output to
integrator 1,
ASV

ASV as required, fixed


or variable

TA/TU
(TA/TD)

Yn-1 +
YAn

Standard
operation
Y->X

TU for [X>YY0]
[X<YY<=0]
TD for
[X>YY<0][X<YY>0]

TA/TU
(TA/TD)

Yn-1 +
YAn

Approach
upper limit
value
Y -> LU

TU,TD as above,
dependent on the initial
position

TA/TD
(TA/TU)

Yn-1 +
YAn

Approach lower TU,TD as above,


dependent on the initial
limit value
position
Y -> LL

* = any

1-50

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

Ramp-function
generator tracking

Generally, output Y of the ramp function generator is used as setpoint for


a secondary control loop (e.g. speed controller).
If this controller reaches a limit when a change occurs (e.g. at ramp up),
then the ramp function generator may not increase the output any further
corresponding to the ramp up times. In this case, output Y is tracked
using the control deviation EV and the weighting factor WD:

Yn = Yn 1 EVn + WD EVk
n = sampling interval n
k = the instant at which the controller went to its limit for the first time
(0->1 edge at ULR or LLR)
ULR

Tracking

1
0

X,Y

t
X
Y

0.0

t
x
0.0

t
EV
0.0

Example of the tracking mode

Generally, tracking can only be used for "classic control loops" (e.g. PI
speed controllers). In this case, the controller limits must be correctly set
(e.g. the same as the current limits).
Generally, WD is 1.01 to 1.1 (>1.0!). Jerk limiting is not active during
tracking.
The controller binary outputs (upper/lower limit reached) are fed back to
binary inputs ULR and LLR. When a limit is reached, one of the two
binary inputs ULR or LLR is set to 1, via the feedback at function block
RGJ, and thus tracking activated.
ULR and LLR should be set to 0 if tracking is not be used.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1-51

Closed-loop control blocks

ULR

LLR EV

QL

QU

x*

x
Ramp-function generator

PI controller

"Tracking" example

Block diagram

CU

LL

LU

Final controlling element


and loop

ASV TU TD SV

TRU TR1 TRD

Steuer
Logik

TR4

CD
CF

LU
YL

LL

- YA

Abgleich fr
Verschleifung

YB
QE

QU

SA

NOTE

QL

The rampfunction generator operates internally with a high accuracy, so


that even for a low setpoint actual value difference, the block still
integrates. It should be ensured that the sampling time is low enough in
comparison to TU, TD, TRU, TR1, TR2, TR3, TR4 and TRD.
If, during run-up, a limit value (LU or LL) is set to a value G1, whose
absolute value is less than the value that has already been reached, then
the output jumps to this limit value. If tracking is then enabled (switchedin) and the absolute value of the limit increased to G2, the output goes to
the new value G2 (the input value remains unchanged). If tracking is now
disabled (switched-out), the output jumps back to the initially set limit
value G1. This behavior is only undone when the input value is changed.

I/O
X

Input quantity

(default: 0.0)

NRM

Normalization TD/TU

(default: 1.0)

EV

Control deviation

(default: 0.0)

LU

Upper limit value

(default: 0.0)

LL

Lower limit value

(default: 0.0)

SV

Setting value output

(default: 0.0)

ASV

Acceleration setting value

(default: 0.0)

WD

Weighting of the control deviation

(default: 0.0)

1-52

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Closed-loop control blocks

TU

Ramp up time

(default: 0.0 ms)

TD

Ramp down time

(default: 0.0 ms)

TRU

Rounding off at ramp up

(default: 0.0 ms)

TR1

Rounding off at ramp up

(default: 0.0 ms)

TR2

Rounding off at ramp up

(default: 0.0 ms)

TRD

Rounding off at ramp down

(default: 0.0 ms)

TR3

Rounding off at ramp down

(default: 0.0 ms)

TR4

Rounding off at ramp down

(default: 0.0 ms)

CU

Raise

(default: 0)

CD

Lower

(default: 0)

CF

Output equal to the input

(default: 0)

ULR

Upper limit reached

(default: 0)

LLR

Lower limit reached

(default: 0)

RQN

Rounding off on

(default: 0)

SA

Set acceleration

(default: 0)

Set

(default: 0)

EN

Enable

(default: 0)

Output quantity

(default: 0.0)

YL

Limited output quantity

(default: 0.0)

YA

Acceleration value

(default: 0.0)

YB

Jerk value

(default: 0.0)

QE

Output Y equal to input X

(default: 0)

QU

Upper limit value reached

(default: 0)

QL

Lower limit value reached

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

15,0
5,0
2,5

1-53

Arithmetic blocks
NOTE

2.1

ACOS Arc cosine function

Brief description
NOTE

2.2

NOTE

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

Adder with generic REAL type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

ADD_I Adder (INTEGER type)

Brief description
NOTE

2.4

Determines the arc-cosine to an argument

ADD Adder

Brief description

2.3

The computation times are only valid for the CPU module PM 5.

Adder with generic INTEGER type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

ADD_D Adder (DOUBLE-INTEGER type)

Brief description
NOTE

Adder with generic DOUBLE-INTEGER type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-1

Arithmetic blocks

2.5

ADD_M Modulo adder for axis cycle-correct addition

Symbol
ADD_M
Modulo value DI
Input 1 DI
Input 2 DI

Brief description

MOD
X1
X2

Y
QP
QN

DI Output
BO Positive overflow
BO Negative overflow

The ADD_M function block is used to add position values for drives.
It can be used to "add-up" offsets for position reference values or for
deadtime compensation for real masters.

Mode of operation

The block adds input values X1 and X2.


If the sum of the modulo value MOD axis cycle exceeds or falls below
0, the modulo value MOD is subtracted or added, and an overflow bit QP
or QN set for the duration of a sampling time.

I/O
MOD

Modulo value=axis cycle length, value range 1 . . .

(default: 0)

2 30
X1

Addition value 1

(default: 0)

X2

Addition value 2

(default: 0)

Result of the addition (Y=X1+X2)

(default: 0)

QP

(default: 0)
Positive overflow
This is set, if the result of the addition of X1 + X2 is
greater than or
equal to the axis cycle length which was entered.
QP=1 Y MOD (Y=YMOD)

QN

Negative overflow
This is set if the results of the addition of X1 + X2
has a negative value.
QN=1 Y < 0
(Y=Y + MOD)

Configuringdata

2-2

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

(default: 0)

60,0
19,8
9,9

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

2.6

ASIN Arc-sine function

Brief description
NOTE

2.7

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

ATAN Arc-tangent function

Brief description
NOTE

2.8

Determines the arc-sine to an argument.

Determines the arc-tangent to an argument


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

AVA Absolute value generator with sign evaluation

Symbol
AVA
input quantity R

Y
SN

R absolut value of input quantity


BO input quantity negative

Brief description

Arithmetic block to generate the absolute value, REAL type

Mode of operation

The function block generates the absolute value (input quantity) at input
X. The result is output at Y.
Y= X

If the input quantity is negative, then the binary output SN is


simultaneously set to 1.
Block diagram
Y
X
SN

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-3

Arithmetic blocks

I/O
X

Input quantity

(default: 0.0)

Absolute value of input quantity

(default: 0.0)

SN

Input quantity quantity

(default: 0)

Configuringdata

2.9

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,6
0,9
0,5

AVA_D Absolute value generator with sign evaluation


(DOUBLE-INTEGER type)

Symbol
AVA_D
input quantity D

Y
SN

D absolut value of input quantity


BO input quantity negative

Brief description

Arithmetic block to generate the absolute value, DOUBLE-INTEGER type

Mode of operation

The function block generates the absolute value (input quantity) at input
X. The result is output at Y.

Y= X
If the input quantity is negative, then the binary output SN is
simultaneously set to 1.
I/O
X

Input quantity

(default: 0.0)

Absolute value of input quantity

(default: 0.0)

SN

Input quantity quantity

(default: 0)

Configuringdata

2-4

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,6
0,9
0,5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

2.10

COS Cosine function

Brief description
NOTE

2.11

NOTE

NOTE

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

Divider with two INTEGER type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

DIV_D Divider (DOUBLE-INTEGER type)

Brief description
NOTE

2.14

Divider with two REAL type inputs

DIV_I Divider (INTEGER type)

Brief description

2.13

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

DIV Divider

Brief description

2.12

Determines the cosine to an angle

Divider with two DOUBLE-INTEGER type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

DIV_R Divider (REAL type)

Brief description
NOTE

Divider with two REAL type input.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-5

Arithmetic blocks

2.15 MAS Maximum evaluator


Symbol
MAS
input quantity R

R maximum input quantity

Brief description

Comparison block with REAL type generic inputs to determine the


highest input value at the time that the block is being executed.

Mode of operation

The function block determines the highest of the value entered at generic
inputs X... The result is output at Y.

Y = Max{ X 01 ,..., X nn }
If the inputs have the same values, then this value is output as the
maximum input quantity.
I/O
X

Input quantity

(default: 0.0)

Maximum input quantity

(default: 0.0)

Configuringdata

2-6

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,9
1,3
0,7

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

X is a generic input

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

2.16

MIS Minimum evaluator

Symbol
MIS
input quantity R

R minimum input quantity

Brief description

Comparison block with REAL type generic inputs to determine the lowest
input value at the time the block is executed.

Mode of operation

The function block determines the lowest value at generic inputs X.


The result is output at Y.

Y = Min{ X 01 ,..., X nn }
If all the inputs have the same value, this value is output as the minimum
input quantity.
I/O
X

Input quantity

(default: 0.0)

Minimum input quantity

(default: 0.0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

X is a generic input

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4,4
1,5
0,8

2-7

Arithmetic blocks

2.17

MUL Multiplier

Brief description
NOTE

2.18

NOTE

Multiplier with generic INTEGER type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

MUL_D Multiplier (DOUBLE-INTEGER type)

Brief description
NOTE

2-8

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

IMUL_I Multiplier (INTEGER type)

Brief description

2.19

Multiplier with generic REAL type inputs

Multiplier with generic DOUBLE-INTEGER type inputs


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

2.20 NATCON Natural constants


Symbol
NATCON
PI
DPI
E

R Constant
R Constant 2
R Constant e

Brief description

The function block outputs natural constants PI ( , 2) and the Eulean


constant (e), with full resolution, data type REAL, at its outputs.

Mode of operation

This function block already outputs the constants in the init mode.

I/O
PI

Konstante

Wert: 3.14159274

DPI

Konstante 2*

Wert: 6.28318548

Konstante e

Wert: 2.71828174

Configuring data

Computation time [s]

T400/PM5
FM458/PM6
CPU550/551

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

0,33
0,11
0,07

2-9

Arithmetic blocks

2.21 PLI10 Polygon curve, 10 points


Symbol
PLI10
input quantity
abscissa value breakpoint 1
ordinate value breakpoint 1
abscissa value breakpoint 2
ordinate value breakpoint 2
abscissa value breakpoint 3
ordinate value breakpoint 3
abscissa value breakpoint 4
ordinate value breakpoint 4
abscissa value breakpoint 5
ordinate value breakpoint 5
abscissa value breakpoint 6
ordinate value breakpoint 6
abscissa value breakpoint 7
ordinate value breakpoint 7
abscissa value breakpoint 8
ordinate value breakpoint 8
abscissa value breakpoint 9
ordinate value breakpoint 9
abscissa value breakpoint 10
ordinate value breakpoint 10

Brief description

R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R

X
A1
B1
A2
B2
A3
B3
A4
B4
A5
B5
A6
B6
A7
B7
A8
B8
A9
B9
A10
B10

R output quantity

REAL type function block


to linearize characteristics
to simulate non-linear transfer elements
for controller gains which are defined in specific sections

Mode of operation

This function block adapts the output quantity Y to input quantity X via a
maximum of 10 breakpoints in four quadrants. The block linearly
interpolates between the breakpoints. The characteristic is horizontal
outside the abscissa values A1 and A10.

Example

Y
A5/B5

A10/B10

A4/B4
X

Xn

A3/B3
A1/B1

A2/B2

Yn

Example: Simulating a magnetizing characteristic (~i)

2-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

Configuring
instructions:

When configuring, it should be ensured that the values A1 to A10 are


sorted according to increasing values.
Ordinate values B1 to B10 can be freely-selected, i.e. they can be
selected independently of the previous value. If not all of the breakpoints
are required (e.g. in the example, the breakpoints from A7/B7), then the
abscissa- and ordinate values which are not required must be assigned
the same values as the last breakpoint which was required (in the
example A6/B6).

I/O
X

Input quantity

(default: 0.0)

A1

Abscissa value, breakpoint 1

(default: 0.0)

...

...

A10

Abscissa value, breakpoint 10

(default: 0.0)

B1

Ordinate value, breakpoint 1

(default: 0.0)

...

...

B10

Ordinate value, breakpoint 10

(default: 0.0)

Output quantity

(default: 0.0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

12,3
4,1
2,1

2-11

Arithmetic blocks

2.22

PLI20 Polygon curve, 20 breakpoints

Symbol
PLI20
input quantity
abscissa value breakpoint 1
ordinate value breakpoint 1
abscissa value breakpoint 2
ordinate value breakpoint 2
abscissa value breakpoint 3
ordinate value breakpoint 3
abscissa value breakpoint 4
ordinate value breakpoint 4
abscissa value breakpoint 5
ordinate value breakpoint 5
abscissa value breakpoint 6
ordinate value breakpoint 6
abscissa value breakpoint 7
ordinate value breakpoint 7
abscissa value breakpoint 8
ordinate value breakpoint 8
abscissa value breakpoint 9
ordinate value breakpoint 9
abscissa value breakpoint 10
ordinate value breakpoint 10
abscissa value breakpoint 11
ordinate value breakpoint 11
abscissa value breakpoint 12
ordinate value breakpoint 12
abscissa value breakpoint 13
ordinate value breakpoint 13
abscissa value breakpoint 14
ordinate value breakpoint 14
abscissa value breakpoint 15
ordinate value breakpoint 15
abscissa value breakpoint 16
ordinate value breakpoint 16
abscissa value breakpoint 17
ordinate value breakpoint 17
abscissa value breakpoint 18
ordinate value breakpoint 18
abscissa value breakpoint 19
ordinate value breakpoint 19
abscissa value breakpoint 20
ordinate value breakpoint 20

2-12

R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R

X
A1
B1
A2
B2
A3
B3
A4
B4
A5
B5
A6
B6
A7
B7
A8
B8
A9
B9
A10
B10
A11
B11
A12
B12
A13
B13
A14
B14
A15
B15
A16
B16
A17
B17
A18
B18
A19
B19
A19
B20

output quantity

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

Brief description

Real-type function block


to linearize characteristics
to simulate non-linear transfer elements
for controller gains which are defined in specific sections

Mode of operation

This function block adapts the output quantity Y to input quantity X via a
maximum of 20 breakpoints in 4 quadrants.
The block linearly interpolates between the breakpoints. The
characteristic is horizontal outside the abscissa values A1 and A20.

Mode of operation:

When configuring, it should be ensured that the values A1 to A10 are


sorted according to increasing values. Ordinate values B1 to B20 can be
freely-selected, i.e. they can be selected independently of the previous
value.
If not all of the breakpoints are required (e.g., from A16/B16), then the
abscissa- and ordinate values which are not required, must be assigned
the same values as A15 or. B15.
Y

A18/B18
A17/B17

A19/B19
A20/B20

A16/B16
A15/B15
A14/B14
A13/B13
A12/B12
A11/B11

Xn

X
A10/B10
A9/B9
A8/B8
A7/B7
A6/B6
A5/B5
A1/B1

A4/B4

A2/B2 A3/B3

Yn

Example: Simulating a magnetizing characteristic

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-13

Arithmetic blocks

I/O
X

Input quantity

(default: 0.0)

A1

Abscissa value, breakpoint 1

(default: 0.0)

...

...

A20

Abscissa value, breakpoint 20

(default: 0.0)

B1

Ordinate value, breakpoint 1

(default: 0.0)

...

...

B20

Ordinate value, breakpoint 20

(default: 0.0)

Output quantity

(default: 0.0)

Configuringdata

2.23

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

14,9
4,9
2,5

SII Inverter

Brief description

Inverter with a REAL type input


Arithmetic block to invert the polarity

NOTE

2.24

ISIN Sine function

Brief description
NOTE

2.25

Determines the sinusoidal value for a particular angle


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

SQR Square-root extractor

Brief description
NOTE

2-14

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

Arithmetic block to generate the square root


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

2.26

SUB Subtractor

Brief description
NOTE

2.27

NOTE

Subtractor with two INTEGER type inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

SUB_D Subtractor (DOUBLE-INTEGER type)

Brief description
NOTE

2.29

Additional information, e.g. symbol, mode of operation, I/O and


technical data are provided in the corresponding online help.

SUB_I Subtractor (INTEGER type)

Brief description

2.28

Subtractor with two REAL type inputs

Subtractor with two DOUBLE-INTEGER type inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

TAN Tangent function

Brief description
NOTE

Determines the tangent value to an angle.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-15

Arithmetic blocks

2.30

FRM Formula block

Symbol
FRM
Input X1 X1
Input X2 X2
Input X3 X3
Input X4 X4
Input D1 D1
Input D2 D2
Input D3 D3
Input D4 D4
Input I1 I1
Input I2 I2
Input I3 I3
Input I4 I4
Formula expression FRM

Brief description

Y Result
YD Result, double
YI Result, integer
RDY Result, ready
QF Group fault
YFC Fault code

Formula block to calculate complex formulas with up to 12 variables:


e.g.
FRM = (sin(x1) + 3.0 * i1) * (i2 * x2 + abs(sin(x3 +i3)))
For: x1 = 1.0; x2 = 2.0; x3 = 3.0; i1 = 1; i2 = 2 and i3 = 3
Y = 16,4392509; YD = 16; YI = 16

Mode of operation

The function block calculates the formula specified at input FRM. The
algebraic laws apply (point before slash etc.). The nesting depth and
length of the formula is only limited by the length of the input string. If the
formula does not have the correct syntax, an error is output. The result of
the formula is output at connectors Y, YD and YI.
If, for integer or double integer, there is an overflow, then this is output at
YFC - but not at QF.

NOTE

For binary operations, all values are internally converted into a double
integer and the operation is then executed. If an error occurs in the
conversion (e.g. a real value too large for double integer) an error is
output (QF and YFC, refer to the error codes).
It is not permissible to mix binary and arithmetic operations in a formula
and is rejected with an error (-10).
For shift operations, the arguments are converted into unsigned integer
and then back into integer. A logical shift is made. If the number of bits
to be shifted <= 0, then the result is the input value. If a shift is made by
32 or more bits, then the result is always 0.
When entering tan(+-((1+ 2*n)*Pi/2)) an equivalent value is supplied.

2-16

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

Expressions that
are permissible

Mathematical expressions
+, -, *, /

Basic arithmetic operations - addition, subtraction,


multiplication and division

x**y, pow(x,y)

x to the power y

exp(x)

e to the power x

abs(x), fbas(x)

Absolute value of x

log(x), log10(x)

Logarithm to the base of ten

ln(x)

Natural logarithm

sqrt(x)

Square root function

sin(x)

Sinusoidal function

cos(x)

Cosinusoidal function

tan(x)

Tangent function

asin(x), arcsin(x)

Arc sinusoidal function

acos(x), arccos(x)

Arc cosinusoidal function

atan(x), arctan(x)

Arc tangent function

sinh(x)

Sinusoidal hyperbolic function

cosh(x)

Cosinusoidal hyperbolic function

tanh(x)

Tangent hyperbolic function

%, mod

Modulo

ceil(x)

Lowest integer number that is >= x.

Help functions
Min(x,y)

Provides the minimum value of x, y

Max(x,y)

Supplies the maximum value of x,y

Constants
e.g. 2.3, -0.5

Constant values

16#ABCD

Hexadecimal value

0xABCD

Hexadecimal value

pi

The number Pi

Eulerian number

Binary operations
&

AND logic operation

OR logic operation

Exclusive OR logic operation

<<

Shift logically to the left

>>

Shift logically to the right

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-17

Arithmetic blocks

Table for the value range of the arguments for the individual functions
and operations

Table for the value


Operation,
function

Range check,
limit value check

Error code

Minimum value /
limit value 1

Maximum value /
limit value 2

+, -, *

no

- infinity

+ infinity

yes

-7

infinity

x**y,
pow(x,y)

yes

-8

x<0 und y

infinity

-9

x=0 y=0

exp(x)

no

- infinity

+ infinity

abs(x),

no

- infinity

+ infinity

x0

+ infinity

fabs (x)
Log(x),

yes

-8

log10(x)
ln(x)

yes

-8

x0

+ infinity

sqrt(x)

yes

-8

x0

+ infinity

sin(x)

no

- infinity

+ infinity

cos(x)

no

- infinity

+ infinity

tan(x)

no

- infinity

+ infinity

asin(x),

yes

-8

-1

+1

yes

-8

-1

+1

no

- infinity

+ infinity

sinh(x)

no

- infinity

+ infinity

cosh(x)

no

- infinity

+ infinity

arcsin(x)
acos(x),
arccos(x)
atan(x),
arctan(x)

tanh(x)

no

- infinity

+ infinity

%, mod

no

- infinity

+ infinity

ceil

no

- infinity

+ infinity

Help functions
Min(x,y)

no

- infinity

+ infinity

Max(x,y)

no

- infinity

+ infinity

-2147483648

+2147483647

Binary calculations
x&y

yes

-3

x|y

yes

-3

-2147483648

+2147483647

x^y

yes

-3

-2147483648

+2147483647

x<<y

yes

-3

-2147483648

+2147483647

x>>y

yes

-3

-2147483648

+2147483647

Meaning RDY

2-18

Formula is analyzed (QF and YFC not valid)

Formula value is calculated (QF and YFC valid)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Arithmetic blocks

Error codes at QF

Error codes at YFC

No error occurred

Error occurred

No error occurred

>0

Error occurred, the number specifies the position in the text

-1

Internal error

-2

Error when requesting data save

-3

Overflow when converting from real to double integer for a binary


operation

-4

Integer overflow occurred

-5

Double Integer overflow occurred

-6

Real overflow occurred

-7

Division by 0 or 0**Y with Y < 0

-8

Argument not in the valid range

-9

0**0 is not defined

-10

It is not permissible mix binary and arithmetic operations

When an error occurs, the last valid values remain at the output
connectors Y, YD and YI.
I/O
X1

Real input quantity 1

(default: 0.0)

X2

Real input quantity 2

(default: 0.0)

X3

Real input quantity 3

(default: 0.0)

X4

Real input quantity 4

(default: 0.0)

D1

Double Integer input quantity 1

(default: 0)

D2

Double Integer input quantity 2

(default: 0)

D3

Double Integer input quantity 3

(default: 0)

D4

Double Integer input quantity 4

(default: 0)

I1

Integer input quantity 1

(default: 0)

I2

Integer input quantity 2

(default: 0)

I3

Integer input quantity 3

(default: 0)

I4

Integer input quantity 4

(default: 0)

FRM

Formula expression

(default: empty string)

Real value from the result

(default: 0.0)

YD

Double Integer value from the result

(default: 0)

YI

Integer value from the result

(default: 0)

RDY

Result ready

(default: 0)

QF

Group error

(default: 0)

YFC

Error code

(default: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2-19

Arithmetic blocks

Configuring data

2-20

Computation times [s]

For expressions, the computation time of the


block should initially be determined using the
PSL block

Can be downloaded online

Yes

Can be configured in:

Interrupt tasks
Cyclic tasks

Computed in:

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Input/output blocks
Assignment of the input/output blocks to processor- and peripheral
devices

Block

Module
PM5

BII8

PM6 T400
X

X*)

BIQ8
SBI

X*)

SBQ

IT41

IT42 EA12

EB11

FM 458
FM 458-1DP
X

ADC

DAC

EXM CPU 550 SM500


438 CPU 551
X

X
X

X
X

NAV

NAVS

*) When configuring function blocks BII8 and SBI at terminals


46 ... 49, 65 and 84 (XB2) of technology module T400 the following
assignment is obtained:
Terminal

Binary output

Bit

46

Q1

47

Q2

48

Q3

49

Q4

65

Q8

84

Q7

The binary outputs/bits 5 and 6 are "not defined".


Terminals 46-49 can only be read, if they are not configured as
output using the BIQT block.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-1

Input/output blocks

3.1

ADC Analog input via A/D converter

Symbol
ADC
hardware address
direct mode
offset compensation
scalling factor
adjustment type

Brief description

GV
BO
R
R
BO

AD
DM
OFF
SF
ADJ

Y
QF
YF

R measured value
BO group error massage
W error ID

analog input with direct coding of instantaneous values


scaling factor and offset can be adjusted
adjustment instant can be freely-configured.

Mode of operation

The function block converts the instantaneous value of an analog voltage


into a digital value via a 12-bit A/D converter and outputs this digital value
at Y, taking into account SF and OFF.
The hardware address of the analog input, from which the analog voltage
V should be read-in, is specified at input AD.
The following is valid for convertering analog voltage V into digital value
Y:

Y=

U
SF - OFF
5V

with V, measured in volts.


Input DM is parameterized to selected whether the converter value is
read-in in the normal- or system mode. For DM=1 (direct mode), input is
in the normal mode, i.e., if the function block is calculated in the sampling
time according to the configured sequence. For DM=0
(no direct mode), input is in the system mode. The system mode is
always calculated at the start of the sampling time.
Block diagram

ADJ
AD

(2)

SF
OFF

QF
YF

DM

3-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

The adjustment is controlled via binary input ADJ:

Adjustment

ADJ

Adjustment instant

No adjustment

0 -> 1

Adjustment in the actual sampling cycle

Adjustment after 65 536 sampling cycles

T400

During an adjustment, an actual value is not available at block output Y


for one sampling time. The last determined value is kept.

IT41/IT42:

During adjustment, there is no actual value available at block output Y for


two sampling times. The last determined value is kept. If the function
block is configured in a sampling time < 1 ms, the number of sampling
times in which an actual value is not available, increases.
Adjustment is always executed during initialization.

Fault signals

Output QF is always set to 1, if there is a conversion error. In this case,


the value at output Y is not updated and adjustment not executed. The
error cause is coded as follows in fault Word YF:

YF

Fault cause (bit = 1)

PM5/PM6

Bit 1

Hardware fault
A/D conversion was not able to be completed within approx. 30 s.

Bit 2

Hardware access inhibited


Access to the required hardware was not possible within a specific time.

Bit 3

The adjustment result was outside the permissible limits.


The result was rejected.

Bit 4

Adjustment was shifted too long. A requested adjustment is shifted if another


ADC is also bein adusted on the same module. The number of "permitted"
offsets depends on the sampling time and is at least 48 sampling times.

Bit 5

The A/D converter was not able to read four times consecutively due to
adjustment on the same channel. (This error can only occur, if more than two
ADC are configured on a channel, and these simultaneously request
adjustment, or directly one after another.

Bit 6

Hardware fault
During adjustment, the status bit was not set in the result which was read.
The result was rejected.

Bit 7

Hardware fault
In a measurement result, the status bit for adjustment was set.
The result was rejected.

Bit 9

Hardware fault
Analog to bit 1, however, during initialization (no adjustment.
The nominal value is used

Bit 11

The adjustment result lies outside permissible limits.


The nominal value is used.

The other bits are not used. Bit 1 is the LSB, bit 16 is the MSB.
Resolution

The A/D converter has a resolution of 1/4096 (12 bits). Referred to a


measuring range of 20 V, this corresponds to a resolution of 4.9 mV.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-3

Input/output blocks

I/O
AD

Hardware address

(no default)

DM

Direct mode (initialization input)

(default: 1)

OFF

Offset compensation

(default: 0.0)

SF

Scaling factor

(default: 0.0)

ADJ

Adjustment type

(default: 0)

Measured value

(default: 0.0)

QF

Group error message

(default: 0)

YF

Error ID

(default: 16#0000)

Configuringdata

3-4

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

18,6
6,1
3,1

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

3.2

AENC Absolute value encoder (SSI/EnDat)

Symbol
AENC
resolution per turn
number of turns
preceding zero bits
alarm bit position
clock frequency
encocer type
data coding
parity check
reset error
gearbox ratio
normalization ,position
normalization, speed
position offset
upper limit speed

Brief description

NOTE

DI
DI
I
I
I
I
I
BO
BO
R
R
R
R
R

RPT
NOT
PZB
ABP
MDF
MDT
MDC
ENP
RE
NFG
NFP
NFY
OFF
LU

AD
YOP
YP
YRC
YSP
Y
QRC
QF
QNP
YF
YW
YFC

GV
DI
R
R
R
R
BO
BO
BO
W
W
W

hardware address
original position
position actual
revolution counter
sum position
speed actual value
revolution counter overflow
group fault
new position, received
hardware fault, encoder
alarm, encoder
error code

The function block AENC is used to connect an absolute value encoder


with SSI- or EnDat interface to SIMADYN D. It can be configured on
modules T400 and PM5.
Many SSI encoders neither have a test bit (parity) nor an alarm bit
which can be used to check the validity of the position value. The
following should be observed for these encoders:
A differentiation cannot be made between valid and invalid position
values. A missing/defective encoder is also not able to be detected. In
this case, output QNP does not provide any information.
An AENC block can be configured for each hardware input. An input,
assigned for an absolute value encoder, cannot be simultaneously used
as serial communications interface.
In addition to determining the absolute position, the speed is calculated
and the position overflows are summed. The position overflow sensing
and speed sensing is only absolutely clear, if a maximum of one overflow
occurs between two position sensings. When using single-turn encoders,
it must therefore be ensured that at least two measurements are made
per revolution, even at the highest operating speed.

Example:

For an operating speed of 6000 RPM, half a revolution takes 5 ms. This
corresponds to the longest possible clock cycle duration. To take into
account extreme operating conditions (faults when transferred data
between the encoder and SIMADYN D module, increased computer
utilization), we recommend that a safety factor 2 is used, which results in
a clock cycle duration of approximately 2.5 ms.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-5

Input/output blocks

Mode of operation

The data transfer format is defined when the block is initialized


(initialization inputs: RPT, NOT, PZB, ABP, MDF, MDT, MDC). Then, for
SSI encoders, the block starts to cyclically read-out the position values
according to the configured sampling time.
If EnDat encoders are used, after initialization, the encoder-specific errorand alarm masks are first read-out. If an alarm bit is set, the encoder
indicates an internal error. The AENC block then reads the alarm status
word of the encoder and outputs it at YF. The alarm status word of the
encoder provides information if the encoder is to be serviced. This
information is not time-critical. It is cyclically scanned and output at YW (a
scan is made every 65536 sampling cycles: For a cycle duration of 10
ms, therefore approximately every 11 minutes).
For EnDat encoders, the serial position transfer, under extreme
situations, takes longer than 1 ms. Thus, reading the position is subdivided into two sections, which are processed in two consecutive
sampling cycles. After processing the actual position, the AENC block
starts the next position transfer. The new value then becomes available
one sampling cycle later. Position values are read-in and new
measurements started in the system mode, which guarantees
measurements are made at precisely the same equidistant time intervals.
The block can be configured in interrupt tasks. It should be observed that
the position value is only available in the following task. Thus, only cyclic
interrupt tasks make sense.
Position value and rotation counter (multi-turn encoders) are transferred
from several encoder types with more than 23-bit resolution. As
information is lost in these cases, when data is output in the real format
(float), the position is sub-divided over three outputs: Angular position
(YP), number of revolutions (YRC) and the sum of the two (YSP). All
three outputs are weighted with the normalization factor NFP

Example
(code rotary
encoder):

For NFP=1 the angular position lies in the range:


0 <= YP < 1. YRC is an integer number.
For NFP=360 the angle is output is degrees. YRC is a multiple of 360.
To define a zero position, an offset can be applied to the output. The
offset has the same normalization as the position outputs, and is
subtracted from the encoder position.
If the position value from the encoder overflows, this is taken into account
by correcting the revolution counter. However, to ensure error-free
correction, the AENC block must be processed at least twice per
revolution. This should be taken into account when defining the sampling
time (recommendation: TA <= 10 ms).
The initialization value of all of the position outputs after a power
interruption, corresponds to the encoder position minus the offset. All of
the previous revolution counter corrections are lost, as the position could
have mechanically changed during the power-down phase, which would
not be able to be identified by the function block.

3-6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

Linear encoder
with "position
overflow"

Measuring systems, which are operated in a limited range, should be


adjusted, so that the measured value does not overflow. If an adjustment
is not possible, or is not required, a mode can be selected with "correct
the range" (refer to MDT). In this case, the discontinuous location of the
encoder can be shifted outside the operating range.
YP0 = measured value NFP - OFF ;

YP0 = non-corrected position

YP = YP0

for: -RPT NFP/2 < YP0 < RPT NFP/2

YP = YP0 - RPT NFP

for: YP0 > RPT NFP / 2

YP = YP0 + RPT NFP

for: YP0 < -RPT NFP / 2

The following diagram explains the correction function. It should be


observed, that if offset OFF is unfavorably selected, discontinuities can
also occur for position value YP.

RPT * NFP
Position * NFP
YP(OFF<0)
RPT * NFP
2
OFF
0

- RPT * NFP

YP(OFF=0)

2
Encoder operating range

Speed calculation

The AENC block calculates the speed from the change of the position
values (coded-rotary encoder) or the velocity (length measuring
systems). In this case, two system-related speed limits must be
observed. On one hand, coded-rotary encoders have a mechanical
speed limit (input LU), above which, no valid positions can be
determined. The speed actual value is undefined if this limit is exceeded.
The second speed limit is obtained from the configured sampling time.
For single-turn encoders, speed and position can only be uniquely
measured, if at least two measurements are made per revolution. If this is
not guaranteed, the revolution counter information YRC is also no longer
valid. A plausibility check is used to identify as to whether the speed limit
has been exceeded, whereby the magnitude of the speed change is
used.
In both cases, where the speed is exceeded, in addition to the group
error message, an appropriate indication is made in the error code word.
The speed is still calculated, whereby it is not possible to identify when
the block starts to re-output valid speed actual values. Thus, the error
messages are not re-set.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-7

Input/output blocks

When determining the speed, it is assumed that the encoder used


defines the position with the start of the position data transfer. If this is
not guaranteed, the speed output is discontinuous and unsteady, even
when the encoder is rotating at a constant speed.
I/O
AD

Defines the terminal designation of the absolute encoder. Each absolute value encoder
input may only be configured once. For the T400, XP2 and X01 (communications
interface) cannot be simultaneously used.
Terminal designations:

RPT

Module

Absolute value encoder 1

Absolute value encoder 2

T400
PM5

XP1
X5P

XP2
X5Q

Number of steps, which can be differentiated between, per revolution for coded rotary encoders.
The number n of the appropriate binary positions of the data transfer format are obtained. For
binary- or gray coding, RPT = 2
2

(n is an integer number; n>1), for Gray Excess coding RPT <

(with n>2). For length measuring systems, RPT is obtained from the number n of the
n

relevant binary positions of the data transfer protocol to RPT = 2 .


(initialization input)
(default value:
4096 )
NOT

Number of revolutions, which can be differentiated between, of a multi-turn encoder. The number
m of the corresponding binary locations of the data transfer format can be obtained from NOT =
m

2 (m = integer number; m>=0).


NOT = 0 for single-turn encoders or length-measuring systems.
(initialization input)
(default value:
0 )
PZB

Number of non-relevant bits at the start of the position value transfer. This option is only
for SSI encoders. It allows different protocol versions to be specified, for example,
position transfer in the so-called "Christmas tree" format.
(initialization input)
(default value:
0 )

ABP

Position of the interrupt bit within data transfer protocol of an SSI encoder.
ABP = 0 if there is no alarm bit.
(initialization input)
(default value:
0)

Example:
SSI multi-turn
absolute value
encoder with alarm
bit A and parity bit
P

m = 11;

NOT

2048;

RPT

256;

ABP

25;

Interrupt bit in the 25th clock cycle

PZB

3;

'0' bits before the revolution status

n = 8;

The function block calculates the required protocol from the above data:
25 bits (for SSI, the hardware only permits two versions: 13 or 25 clock
cycles, + parity).

3-8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

Clock cycle
1

14 15 16 17 18 19 20 21 22 23 24 25 26

0 M10... M1 M0

S7 S6 S5 S4 S3 S2 S1 S0 0 0

PZB

n
ABP

Legend:
Mi : Binary position i of the revolution coding (multi-turn)
Si: Binary position i of the angular coding
A: Interrupt
P: Parity bit
m: No. of binary positions for the revolutions
n: No. of binary positions for the angular position

MDF

MDT:

MDC:

Defines one of four possible clock frequencies for data transfer:


(initialization input)
(default value: 0)
MDF

Clock frequency

Period

100 kHz

10 s

500 kHz

2 s

1 MHz

1 s

2 MHz

0.5 s

Specifies the encoder type. The differentiation mode between coded


rotary encoders and length-measuring systems has an influence on the
velocity output (refer to input Y).
(Initialization input)
(Default value: 0)
MDT

Encoder type

SSI (coded rotary encoders)

SSI (coded length-measuring system)

EnDat (coded rotary encoder)

EnDat (coded length-measuring system)

SSI (coded length-measuring system with range correction)

EnDat (coded length-measuring system with range correction)

Data coding of the connected absolute value encoder:


(initialization input)
(default value: 0)
MDC

Coding

Permissible for encoder


type

Binary code

EnDat und SSI

Gray code

SSI

Gray Excess code

SSI single-turn encoder

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-9

Input/output blocks

ENP:

RE:

Enables parity to be monitored for an SSI encoder. It is checked for


even parity. The parity bit is directly transferred after the position
value,
i.e. as 14th bit and as 26th bit.
(default value: 0)
ENP

Coding

Permissible for

No parity monitoring

SSI, EnDat

Parity monitoring
(even parity)

SSI

Resets the block and deletes error messages (QF, YF) and alarms
(YW), and individual error word bits (refer to YFC).
When EnDat encoders are used, these alarms and interrupt bits are
reset.
For SSI encoders, a reset is required after connecting or powering-up
the encoder.
(default value: 0)
RE

Significance

No change

No change

0 1 Resetting the block and EnDat encoder


NFG:

Takes into account a gearbox ratio between the coded rotary encoder
and the drive system. The position values and the speed are
converted to the actual drive system. For length-measuring systems,
NFG is not taken into account. The following is valid: (position drive) =
NFG position (encoder)
(default value: 1.0)

NFP:

Normalization factor for the position outputs YP, YRC, YSP and
normalization basis for the offset input OFF. NFP is the position value
for a drive revolution.
Principle:

YSP =

measured value
NFG NFP - OFF
RPT

Example:
The position of a multi-turn encoder is to be shifted through 90 using
an offset.
The encoder is rotated out of the zero position (YP = 0) by 1.5
revolutions.
Required
normalization

NFP

OFF

Default

0.25

Degrees

360

90

Radian
measure

3-10

Inputs

2 3,14 3.14/2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

For length-measuring systems NFP specifies the travel for a


measuring step (encoder resolution) in the required
normalization. For example, if NFP is entered in [cm], all
position outputs are also made in the reference units [cm].
This means that the reference units for the velocity output are
also defined.
Example:
Resolution of the measuring system/measuring step = 0.1 mm
Required reference units
Meter

Millimeter

Value for NFP


(0.1 mm corresponds to ...)

0.0001

0.1

Velocity units
(for NFY = 1)

m/min

mm/min

NFY:

Speed actual value normalization. NFY is multiplied by the internal speed


actual value (units: RPM), and output at Y. For coded rotary encoders,
RPM are calculated internally for length-measuring systems in the
reference units/min
(in the above example for NFP = 0.0001 in m/min).
(default value: 1.0)

OFF:

Position offset. When an offset OFF 0 is entered, the encoder zero


position is shifted (offset). The offset value has the same normalization
as the position outputs. It is subtracted from the encoder position value.
(default value: 0.0)

LU:

Maximum operating speed of the encoder (not of the drive if a gearbox is


used), where valid position values can still be determined. This data is
entered in the same normalization as the speed output Y. The encoder
speed is obtained from the drive speed, taking into account the gearbox
ratio NFG.
(default value: 6000.0)

YOP:

Initial encoder position in steps. As the most significant bit should always
be zero (position position), the position may be coded with a maximum of
31 bits. Steps are output at YOP if the encoder overflow above the range
limits.
(default value: 0)

YP:

Actual angular position of the absolute value encoder. For coded rotary
encoders, the value lies in the range 0 <= YP < NFP (refer to connection
NFP). The validity of the position values is indicated using QF=0.
The following is valid for length-measuring system: YP = encoder position
* NFP - OFF (without range correction) or -NFP*RPT/2 < YP <
NFP*RPT/2 (with range correction).
(default value: 0.0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-11

Input/output blocks

YRC:

Revolution counter. In the default normalization (NFP = 1), YRC outputs


the number of full revolutions.
For other normalizations, YRC is a multiple of NFP. The validity of the
revolution counter is indicated by QF = 0.
23

23

The value range is restricted to -2


< YRC < 2 . The resolution of
YRC <= 1, within this range, i.e. a differentiation can be made between
each individual revolution (prerequisite: NFG = NFP = 1).
Caution: The value range can be reduced as a result of the
normalization, as no more than 2

31

encoder revolutions can be taken into


-8

account (restrictions occur, if: NFG NFP<2 ). If the range is


exceeded,the value jumps to the other end of the range. Output QRC is
set to 1 for one sampling time as overflow signal.
(default value: 0.0)
YSP:

Sum of YP and YRC. When the rotational speed increases, the angular
position
resolution drops and is, for precise positioning, less suitable than YP.
The validity of the summed position is indicated by QF=0.
(default value: 0.0)

Y:

Provides the speed calculated from the position changes of the coded
rotary encoder or, for coded length measuring systems, the velocity. The
speed actual value is obtained as follows Y = speed [RPM] NFY.
The velocity is referred to the reference units, specified by NFP
(also refer to the example for NFP, NFY):
Y= Velocity [reference units/min] NFY.
The validity of the speed is indicated by QF=0.
(default value: 0.0)

QF:

Group error message. QF indicates whether the current values for


position, revolutions and speed and valid. The following is valid
QF=1 YP, YRC, YSP, Y are not valid!
The following can be some of the causes for invalid values:

No valid values available (initialization phase)

Erroneous configuring

Encoder hardware faults (for EnDat, if required, additional error


specifications are available at connection YF)

Interrupt bit for SSI encoders set

The speed range has been exceeded

Detailed information on the fault/error cause can be taken from the error
vectors, YFC, YF.
(default value: 0)
QRC:

Overflow, revolution counter. If the value range of YRC is exceeded,


output QRC is set to 1 for one sampling time.
(default value:0)

QNP:

Receive new position. QNP=1 indicates that a valid position value was
received in the last sampling interval.
(default value: 0)
Caution: For SSI encoders, there is no differentiation between:
valid invalid positions
existing non-existent encoders
(Vorbesetzung: 0)

3-12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

YF:

Error status word of an EnDat encoder. The significance of the error bits
can be taken from the manufacturers data sheets.
For SSI encoders, which do not send an interrupt bit, YF is set to 0. If an
SSI encoder
sends a set alarm bit, YF is set to FFFFh.
(default value: 0)

YW:

Alarm word of an EnDat encoder. The significance of the individual bits


can be taken from the manufacturers data sheets. The alarm word is
16

updated every 2
(default value: 0)
YFC:

processing cycles. For SSI encoders, YW is set to 0.

Error bits of the AENC function block (with the exception of the hardware
fault of encoder YF).

Syntax error for the inputs of the function block (configuring error)

Communications error (possibly an incorrect encoder specification)

Operating error

(Default value: 0)
YFC bit

Delete

Significance

>11

Not specified

11

Init

Hardware address illegal or already


assigned

10

RE

Format error: Contradictory or illegal


data

RE

Illegal clock frequency

RE

Illegal encoder type

RE

Illegal data coding

RE

Parity check only possible in the SSI


mode.

autom.

Communications error: On the average,


one parity - or CRC error occurs at each
2nd position transfer (or more frequently).
The error bit is automatically reset if the
error rate decreases.

autom.

Communications error: The proportion of


messages with parity/CRC errors is, on
the average, 10% and higher. The error
bit is automatically reset if the error rate
decreases.

autom.

Timeout: EnDat encoder doesn't


respond within the specified response
time (no start bit).
Possible causes:

RE

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Not specified

Encoder not connected

Encoder failed (e.g.: power supply)

Hardware fault on the SIMADYN D


module

Permissible speed range exceeded


(Speed > LU)

3-13

Input/output blocks

RE

Permissible speed range exceeded


(less than 2 measured values per
revolution)

Explanation of the delete column:


RE
Deleted with a 0->1 edge at input RE .
Init
Deletion possible for a new start (power ON).
autom. (automatic) is operationally deleted, if the error
condition is no longer available.
Configuringdata

3-14

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

50,0
16,5
8,3

Can be inserted online

--

Can be configured in

Alarm tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Only configure in cyclic interrupt tasks!


(Two consecutive calls to determine the
position are required)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

3.3

BII8 Binary input

Symbol
BII8
hardware address GV
direct mode BO

Brief description

AD
DM

Q1
Q2
Q3
Q4
Q5
Q6
Q7
Q8

BO
BO
BO
BO
BO
BO
BO
BO

binary quantity 1
binary quantity 2
binary quantity 3
binary quantity 4
binary quantity 5
binary quantity 6
binary quantity 7
binary quantity 8

input of 8 binary values


when viewing the screw terminals of the interface module, binary
quantity 1 (LSB) is the lefthand terminal and binary quantity 8 (MSB)
the righthand terminal.

Mode of operation

This function block reads 8 binary variables through 8 binary inputs of a


hardware module.
Input DM is parameterized to select whether the input quantity is read-in
in the standard- or system mode. For DM = 1 (direct mode), the input is
realized in the standard mode, i.e. if the function block is calculated in the
sampling time according to its configured sequence.
For DM = 0 (no direct mode), input is in the system mode. The system
mode is always calculated at the start of the sampling time.
The evaluation of the input quantities is realized in the standard mode.
They are available at Q1 to Q8 after the function block has been
executed.
Each binary output Q1 to Q8 of this function block is assigned a binary
input on the hardware side.

Block diagram

Q1
AD

.
.

Q8

DM
The hardware address of the binary inputs, which are to be read-in, is
addressed at AD.
Initialization

The function block also reads-in the eight binary values during
initialization. Thus, possibly configured initialization values are
overwritten at the outputs.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-15

Input/output blocks

I/O
AD

Hardware address

(no default)

DM

Direct mode (initialization input)

(default: 0)

Q1

Binary quantity 1

...

...

Q8

Binary quantity 8

Configuringdata

3-16

(default: 0)
(default: 0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

13,4
4,4
2,2

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

3.4

BIQ8 Binary output

Symbol
BIQ8
hardware address
direct mode
binary quantity 1
binary quantity 2
binary quantity 3
binary quantity 4
binary quantity 5
binary quantity 6
binary quantity 7
binary quantity 8

Brief description

GV
BO
BO
BO
BO
BO
BO
BO
BO
BO

AD
DM
I1
I2
I3
I4
I5
I6
I7
I8

outputs 8 binary variables


when viewing the screw terminals on the interface module, binary
quantity 1 (LSB) is the lefthand terminal, and binary quantity 8 (MSB)
the righthand terminal.

Mode of operation

This function block outputs 8 binary quantities via 8 binary outputs of a


hardware module.
Input DM is parameterized to select whether the output is realized in the
normal- or the system mode. For DM = 1 (direct mode), the output is
realized in the normal mode, i.e. if the function block is executed in the
sampling time according to its configured sequence.
If DM = 0 (no direct mode), then the normal mode saves the data to be
output. Data is then output in the next system mode. The system mode is
always calculated at the start of the sampling time.
Each binary input I1 to I8 of this function block is assigned a binary
output on the hardware side.
The hardware address of the binary outputs, at which the binary values
are to be output, is specified at AD.

Block diagram

I1
.
.

AD

I8
DM

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-17

Input/output blocks

I/O
DM

Direct mode (initialization input)

I1

Binary quantity 1

...

...

I8

Binary quantity 8

AD

Hardware address

Configuringdata

3-18

(default: 0)
(default: 0)
(default: 0)
(no default)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

12,7
4,2
2,1

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

3.5

DAC Analog output

Symbol
DAC
direct mode
input quantity
offset
scalling factor

Brief description

BO
R
R
R

DM
X
OFF
SF

AD
QU
QL

GV hardware address
BO limit indicator positive
BO limit indicator negative

Analog output with limiting


The scaling factor and the offset can be set.

Mode of operation

The function block converts an input value entered at input X into an


analog value after first adding OFF, dividing by SF and limiting, via a D/A
converter. The value is output at the hardware module analog output.
The hardware address of the analog output, which is to be used to output
the analog value, should be specified at output AD.
Input DM is parameterized to select whether the value is output in the
normal- or system mode, For DM = 1 (direct mode), output is in the
normal mode, i.e., if the function block is executed in its configured
sequence.
For DM = 0 (no direct mode), output is in the system mode. The normal
mode buffers the quantity to be output. The system mode of the next
sampling time outputs the buffered quantity.
The following is valid when converting input quantity X into the analog
output signal VAD :
VAD =

X + OFF
5V
SF

The expression (X + OFF)/SF is limited to the range from -2.0 to +2.0. If it


violates the lower (upper) limit value, output QL is set to 1 (QU = 1) (refer
to the truth table).
Truth table

for QU and QL

X + OFF
SF

Output voltage

QU

QL

>= 2.0

+10.0 V

<= -2.0

-10.0 V

-10.0 V < U AD < 10.0 V

2.0 <

X + OFF
< 2.0
SF

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-19

Input/output blocks

Block diagram

AD

OFF

200%)

QL
QU

SF

The resolution depends on the selected module. The following is valid for
the T400 module:
The D/A converter has a resolution of 1/4096 (12 bits). Referred to the
range from 20 V or 400%, this corresponds to a resolution of 4.88 mV or
0.098 %.

Resolution

The following is valid for modules EA12, IT41 and IT42:


The D/A converter has a resolution of 1/65536 (16 bit). Referred to a
range of 20 V or 400%, this corresponds to a resolution of 0.31 mV or
0.0061%.
I/O
DM

Direct mode (initialization input)

(default: 0)

Input quantity

(default: 0.0)

OFF

Offset

(default: 0.0)

SF

Scaling factor

(default: 5.0)

AD

Hardware address

(default: 0)

QU

Limit indicator positive

(default: 0)

QL

Limit indicator negative

(default: 0)

Configuringdata

3-20

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

12,8
4,2
2,1

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

3.6

NAV Speed/position actual value sensing

Symbol
NAV
number of encoder pulses
rated speed of the machine
rated pulses
mode of operation
synchronization type
reset position
set position
set position at syn
position setting value

Brief description

I
R
DI
W
W
BO
BO
BO
R

PR
RS
RP
MOD
SYM
R
S
SP
SV

AD
Y
YP
DYP
DP
SS
QP
QN
PRE
QF
QFC
YFC

GV
R
R
R
DI
BO
BO
BO
BO
BO
BO
W

hardware address
speed actual value
postition actual value
differential actual value
pulse difference
synchronus position set
overflow position positive
overflow position negative
pulse is detected
monitoring error encoder interrupt
group error
error ID

Digital speed actual value sensing with pulse encoder


A speed and position actual value is output
The function block is configured in a sampling time TA <= 20ms.
The NAV function block can be configured on IT41, T400, and PM5.
Each hardware input may only be configured once.
The maximum pulse frequency, specified for the CPU module may not
be exceeded.
The calculated speed- and position actual value is inverted if a
negative rated speed is entered at input RS. The polarity of PR is
taken into account for the speed actual value and the polarity (sign) of
RP, for the position actual value.
The position actual value can be set or reset.

Mode of operation

The digital speed actual value sensing with the NAV function block is
realized via hardware modules. The hardware address of the partial
connector, to which the pulse encoder is connected, must be specified at
input AD. Each hardware address may only be assigned once.
The function block calculates the speed and position actual value from
the output signals of a pulse encoder and outputs them at outputs Y and
YP.
The measuring technique integrates continuously between 2 sampling
instants. The measuring time is approximately as long as the configured
sampling time TA.
The function block cyclically reads the pulses summed on the hardware
module and calculates the speed actual value Y according to the
following equation:

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-21

Input/output blocks

Y=

forward pulses - reverse pulses


NF
time pulses

The normalization factor NF is calculated using the configured values for


rated speed RS and the encoder pulse number PR so that the rated
speed RS is represented by speed actual value Y = 1.0.
The motor rated speed is specified in rev/min at RS.
If no pulses are received (forward pulses - reverse pulses) in a sampling
period, output PRE goes to 0 and the measuring time is extended by a
sampling time up to the maximum of the standstill limit. Value Y is set to 0
if the standstill limit is reached without any pulses being received. The
standstill limit is set via the "MOD" operating type input. It is 4 + the
correction factor, set in "MOD" and has a lower limit of 1 and an upper
limit of 127.
The standstill limit is a number of sampling times TA, within which a
speed pulse must be measured so that the output Y 0.
Block diagram

RS

PR
*NF

AD

Y
YP

RP
MOD
SYM
SV

QF

QFC

SP

YFC
Nx

Nx
TRG

Speed actual value


resolution

TRGx

Zero pulse signal


Trigger signal

The speed actual value resolution is defined by the measuring technique.


V
A
=
min

V
Nact

min
fc TA

The frequency fC of the counter is 16 MHz.


The maximum sampling time is limited to TA max = 20 ms.

3-22

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

The function block also calculates the position actual value in addition to
the speed actual value. For the calculation, the number of new pulses
received are added to the position actual value in each sampling interval.
The position actual value is calculated as follows.
YP =

(forward pulses reverse pulses) *

*: since the event

RP

"set position",
"reset position",
"set position for syn" or
"reset"

As you can see from the equation, YP has a value of 1 if RP pulses are
received.
For encoder type 1, the forward- and reverse pulses are quadrupled
pulses. If the position actual value is not to be calculated from the
quadruple pulses when using encoder type 1, 4 x the pulse number must
be entered at RP for which YP = 1.0.
When the number of received pulses has reached the value 2147483647
31

(hexadecimal 7FFFFFFF = 2 1 ), the position actual value reaches its


maximum value (= 2147483647 / RP). If one additional pulse is received,
the position actual value changes over to its minimum (= -2147483648 /
RP). The position actual value changes from a minimum to a maximum in
the same fashion. When the maximum is exceeded in a positive
direction, QP = 1 for one sampling time; when exceeding the minimum in
a negative direction, QN = 1 for one sampling time.
It should be noted that the mantissa of YP (and all other R variables) is
limited to 23 bits due to the floating-point data format. Thus, it cannot be
ensured that over the complete value range of YP, YP changes for each
received position pulse.
The position actual value can be set and reset per software and can be
set on the hardware side by an edge at the zero pulse of the pulse
encoder or if a trigger signal is input. Alternatively, a trigger signal can be
used for the IT41 module to set the position actual value.
The trigger signal can be input via a binary input (connector X7C, binary
inputs 1 to 4).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-23

Input/output blocks

Truth table:

Set/reset inputs

Hardware

NAV position actual value

SP

Syn

YPn

Depending on the setting mode in


MOD: SV or YPn1 + pulse
number from the last measuring
interval - SV

YPn1 + pulse number from the


last measuring interval

YPn1 + pulse number from the


last measuring interval

0->1

Depending on the setting mode in


SYM: SV + pulse number from
the 0 - 1 edge at syn up to the
end of the measuring time
or
YPn1 + pulse number from the
last measuring interval - SV

YPn1 + pulse number from the


last measuring interval

*
Syn

As required
zero pulse or input trigger signal

If hardware synchronizing was successful, the block output SS = 1 for


one sampling time.
Operating modes

The following are set at the MOD input:


encoder type
filter parameterization (track signal filtering)
setting mode S
(handling the position actual value when setting via the "S" input)
standstill limit correction

MOD format:

X X

X X

(I/O type: W - 4 hexadecimal positions)

7 6 5 4 3 2 1 0 3 2 1 0

3 2 1 0

Encoder type
Standstill limit
offset

Filter parameterization
Setting mode S
any

Source zero pulse


Source encoder tracks

3-24

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

Standstill limit
correction

Hexadecimal:

FD...7F

Corresponding decimal
number:

-3...127

Other values are limited


Source of the zero
pulse (only
relevant for XE1 on
T400):

from terminal XE1 of T400

from the baseboard to T400

Source of the
incremental tracks
(only relevant for
XE1 on T400

from terminal XE1 of T400

from the baseboard to T400

Setting mode S:

Set YP to SV

Subtract SV from YP

Filter
parameterization:

Encoder type:

Synchronizing

Filterung

Encoder type 1

Encoder type 2

No filtering

No filtering

>0

Fault signals are suppressed up to the specified length

001

500 ns

125 ns

010

2 s

invalid

011

8 s

invalid

100

16 s

invalid

>100

invalid

invalid

Two incremental encoder types are supported.


0

Encoder
type 1

Two pulse tracks, shifted though 90, with or without


zero pulse track Maximum track frequency: 1 MHz. The
pulses are quadrupled.

Encoder
type 2

One pulse track for each direction of rotation, without


zero pulse track. Maximum track frequency: 2.5 MHz.
The single pulses are counted.

The function block uses a synchronizing signal for "set position for syn"
(zero pulse). For an IT41 module, a trigger signal can alternatively be
used for synchronization.
Input SYM selects which synchronizing signal is to be used (only valid for
IT41) and whether, for SP = 1, and when a synchronizing signal is
received, the position actual value is set to SV or SV is subtracted from
the position actual value (SP setting mode).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-25

Input/output blocks

Format of SYM:

X X

X X

(I/O type: W - 4 hexadecimal positions)

1110 9 8 7 6 5 4 3 2 1 0

any

3 2 1 0

Coarse pulseany
evalulation
Setting mode SP
(T400)
Synchronization

Coarse pulse
evaluation (only
T400):

Coarse pulse is evaluated

>0

Refer to Hardware documentation, T400

Setting mode SP

Set YP to SV

Subtract SV from YP

Using the zero pulse

Using the trigger signal


(only IT41)

Synchronization:

The function block uses a direction of rotation dependent edge evaluation


for synchronization, which ensures, that the same signal edge is always
used for synchronization, independent of the direction of rotation.
Track
signals
Zero pulse
Direction of rotation

The rising edge is used for


this direction of rotation

The falling edge is used for


this direction of rotation
- Flank used for synchronization
Fault messages

The function block evaluates the alarm outputs of the pulse encoder and
flags an encoder alarm separately from the other errors, at output QF
with 1. There is no internal response to the encoder alarm. For encoder
type 2, for each call, the encoder alarm is reset after having been read.
All other faults/errors are flagged by a 1 at output QFC. The fault/error
cause is output as status word at output YFC.

3-26

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

Fault word YFC:


YFC

Significance

Response

Bit 1

Configuring error: At least one of the inputs


PR, RS or RP is set to 0.

The output values Y and YP are


invalid

Bit 2

Configuring error, sampling time:


The sampling time is > 20 ms

The function block outputs 0 at Y and


YP up to the next reset

Bit 3

Error, filter parameterization:


An illegal value is specified in MOD in the
filter parameterization

The next lower, legal value is used for


filter parameterization

Bit 6

Error, multiple configuring:


Several NAVs have been configured at a
hardware address
(set from the second and all additional to the
function blocks configured with the same
address)

The function block outputs 0 at Y and


YP up to the next reset

Bit 9

Error, pulse counter overflow

For the current sampling time, no


actual output values are output with
the exception of YFC, QF and QFC.

The other fault word bits are not assigned.


I/O
AD

Hardware address

(default value: 0)

PR

Number of encoder pulses (default value: 1024) (initialization input)

RS

Rated speed of the machine

(default value: 1 1/min)

RP

Rated pulses

(default value: 1024)

MOD

Mode of operation

(default value: 16#0000) (initialization input)

SYM

Synchronization type

(default value: 16#0000) (initialization input)

Reset position

(default value: 0)

Set position

(default value: 0)

SP

Set position at syn

(default value: 0)

SV

Position setpoint

(default value: 0.0)

Speed actual value

(default value: 0.0)

YP

Position actual value

(default value: 0.0)

DYP

Differential actual value,

(default value: 0.0)

DYP = YPn YPn 1 with n = sampling cycle


DP

Pulse difference,
(default value: 0)
No. of pulses during the last cycle

SS

Synchronous position set

(default value: 0)

QP

Overflow position postive

(default value: 0)

QN

Overflow position negative (default value: 0)

PRE

Pulse is detected

QF

Monitoring error encoder interrupt: (default value: 0)

QFC

Group error

(default value: 0)

YFC

Error ID

(default value: 16#0000)

(default value: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-27

Input/output blocks

Configuringdata

3-28

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

38,5
12,7
6,4

Can be inserted online

--

Canbe configured in

Alarm tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

3.7

NAVS Speed/position/position difference sensing

Symbol
NAVS
hardware address
number of encoder pulses
rated speed of the machine
rated pulses
master/slave
mode of operation
synchronization type
reset position
set position
set position for syn.
position setting value
set position defference
position differential setting value
numerator ration
denominator ratio

Brief description

GV
I
R
DI
BO
W
W
BO
BO
BO
R
BO
R
DI
DI

AD
PR
RS
RP
MS
MOD
SYM
R
S
SP
SV
SD
SCD
NM
DN

Y
YP
YDP
YPS
SS
QP
QN
PRE
QF
QFC
YFC

R
R
R
R
BO
BO
BO
BO
BO
BO
W

speed actual value


position actual value
position difference
position at synchronization
position set for synchronization
position overflowpositive
position overflownegative
pulse is detected
monitoring error encoder alarm
group error
error ID

Digital speed actual value sensing with pulse encoder


Output of speed, position actual value and position difference
The function block is configured in a sampling time of TA <= 20ms.
The function block NAVS may only be configured once as master for
each hardware input.
The maximum pulse frequency specified for IT41, T400 and PM5
modules may not be exceeded.
The calculated speed- and position actual values are inverted when a
negative rated speed is entered at input RS. The sign (polarity) of PR
is taken into account for the speed actual value, and the sign (polarity)
of RP, for the position actual value.
The function block NAVS includes the functionality of function block
NAV. In addition, the position actual value and the position when a
synchronizing event occurs, are calculated and output. The position
actual value can be set or reset.

Mode of operation

The digital speed actual value sensing using the NAVS function block is
realized using hardware modules. The hardware address (terminal
designation), where the pulse encoder is connected, must be specified at
input AD. Only one master may be configured at each hardware address,
but several slaves.
The measuring technique continuously integrates between two sampling
instants. The measuring duration is approximately the same as the
configured sampling TA.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-29

Input/output blocks

When configuring synchronous controls, the pulse sensing of each of the


drives involved is assigned to a function block NAVS. A 1 ("master" drive)
or 0 (slave) drive is configured at input MS to differentiate between
master- and slave drives. Each master simultaneously saves the counter
statuses of the pulses sensed by the master itself and its slaves. This
guarantees data consistency to calculate speed-, position- and position
difference of a master-slave cascade; this means, for speed, position and
position difference, the pulse numbers come from the same measuring
interval.
Block diagram

RS

PR
Y

AD

YP

RP
SV
S

R
SP
Nx

TRGx

YPS
Position at the
sync. instant

Master
counting pulse

Pos. difference

YDP

SD
SVD
MS

QF

MOD
SYM

QFC
YFC

Nx - Zero pulse signal


TRGx - Trigger signal

Master-slave
cascade

3-30

A slave is assigned to a master in the configured sequence. All NAVS,


which are configured after a master and parameterized as slave, are
assigned to this master. Several masters can be configured on a module.
Only one master but several slaves can be configured at a hardware
address. One master and several slaves are possible at a hardware
address, however, the slaves must be configured before the master and
refer to a previously configured master. The FB of a master-slave

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

cascade must be configured in the same sampling time. If they are


distributed over various FPs, the sequence of the FP must be observed
in order to maintain the master-slave sequence.
For several NAVS configured at a hardware address, only the master
data is evaluated. If a master is not configured at the specified address,
the data of the first slave is used to set the filter parameterization,
encoder type and synchronizing signal. All connected NAVS at the same
hardware address must be configured, so that between them, there is no
connected NAVS, at another address.
Speed actual value

The function block cyclically reads the pulses summed on the hardware
module and calculates speed actual value Y according to the following
equation:
forward pulses - reverse pulses
x NF
time pulses

Y=

The normalization factor NF is calculated, using the configured values for


rated speed RS and encoder pulse number PR so that the rated speed
RS is represented by speed actual value Y= 1.0.
The motor rated speed is specified at RS in rev/min at RS.
If no pulses are received (forward pulses - reverse pulses) in a sampling
period, output PRE goes to 0 and the measuring time is extended by a
sampling time up to the maximum of the standstill limit. Value Y is set to 0
if the standstill limit is reached without any pulses being received. The
standstill limit is set via the "MOD" operating mode input. It is 4 + the
correction factor, set in "MOD" and has a lower limit of 1 and an upper
limit of 127.
The standstill limit is a number of sampling times TA, within which a
speed pulse must be measured so that the output Y 0.
Speed actual value
resolution

The speed actual value resolution is defined by the measuring technique:


A[

V
min

]=

V
min
fc x TA

Nact [

The frequency fC of the counter is 16 MHz. The maximum sampling time


is limited to TA max = 20 ms.

Position actual
value

The function block also calculates the position actual value in addition to
the speed actual value. For the calculation, the number of new pulses
received are added to the position actual value in each sampling interval.
The position actual value is calculated as follows.

YP=

(forward pulses - reverse pulses)

RP
* since the even "set position"
"reset position"
"set position for syn" or
"reset"

As you can see from the equation, YP has a value of 1 if RP pulses are
received.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-31

Input/output blocks

For encoder type 1, the forward- and reverse pulses are quadrupled
pulses. If the position actual value is not to be calculated from the
quadrupled pulses when using encoder type 1, 4 x the pulse number
must be entered at RP for which YP = 1.0.
When the number of received pulses has reached the value 2147483647
31

(hexadecimal 7FFFFFFF = 2 1 ), the position actual value reaches its


maximum value (= 2147483647 / RP). If one additional pulse is received,
the position actual value changes over to its minimum (= -2147483648 /
RP). The position actual value changes from a minimum to a maximum in
the same fashion. When the maximum is exceeded in a positive
direction, QP = 1 for one sampling time; when exceeding the minimum in
a negative direction, QN = 1 for one sampling time.
It should be noted that the mantissa of YP (and all other R variables) is
limited to 23 bits due to the floating-point data format. Thus, it cannot be
ensured that over the complete value range of YP, that YP changes for
each received position pulse.
The position actual value can be set and reset per software and can be
set by the hardware using an edge at the zero pulse of the pulse encoder
or by entering a trigger signal (refer to "synchronization").
It can be parameterized as to whether the position actual value is set to
setting value SV or whether SV is to be subtracted from the position
actual value.
If the hardware synchronizing was successful, block output SS = 1 for
one sampling period.
Truth table:
Set/reset inputs

Hardware

NAVS position actual value

SP

Syn

YPn

Depending on the setting mode in


MOD: SV or
YPn1 + pulse No. from last meas.
interval - SV

YPn1 + pulse No. from last meas.

interval

YPn1 + pulse No. from last meas.


interval

0->1

Depending on the setting mode in


SYM:
SV + pulse No. from 0 - 1 edge at syn
up to the end of the measuring time
or
YPn1 + pulse No. from last meas.
interval - SV

YPn1 + pulse No. from the last


meas. interval

3-32

any

Syn

zero pulse or input trigger signal

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

Position difference

The ratio NM / DN specifies the master:slave ratio. For NM < 0 the


master is requested to rotate in the opposite direction of rotation to the
slave.

Position difference
actual value

Each slave cyclically calculates a position difference actual value to the


master:
MPZ Master PRS DN
sign(RS) MPZ Slave
PRM NM
Position difference =
RP
with:

MPZ

No. of pulses since the last time that the position


difference was set

NM/DN

Master ; slave ratio

PRM

Encoder pulse number of the master

PRS

Encoder pulse number of the slave

RS

Rated speed

RP

Rated number of pulses

sign(RS)

Sign of RS, the value is either 1 or -1

The position difference is the difference between the position of the


master relative to the slave, taking into account the mechanical
transmission ratio and encoder pulse number, and the position of the
slave. This is the position value, that the slave must move so that the
position actual value of the master referred to the slave and the slave
position actual value are the same. The position difference is referred to
the slave.
The position difference actual value can be set to the position difference
setting value SVD per software, or SVD can be subtracted from the
position difference actual value. To calculate the position difference
actual values, the pulses, received from the master and slave since the
last time the position difference actual value was set, are used. Thus, it is
independent of setting/resetting the position actual values of the master
and slave.
Operating modes

The following are set at input MOD:


encoder type
filter parameterization (track signal filtering)
setting mode S (handling the position actual value when setting via
the "S" input)
setting mode SD (handling the position difference actual value when
setting via the "SD" input)
correcting the standstill limit

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-33

Input/output blocks

MOD format:

X X

X X

(I/O type: W - 4 hexadecimal positions)

7 6 5 4 3 2 1 0 3 2 1 0

3 2 1 0

Encoder type
Standstill limit
offset

Filter parameterization
Setting mode S
Setting Mode SD

Source zero pulse


Source encoder tracks

Correction of the
standstill limit:

Hexadecimal:

FD...7F

Corresponds to the
decimal number:

-3...127

Other values are limited.


Source of the zero
pulse (only
relevant for XE1 on
T400):

from terminal XE1 of T400

from the baseboard to T400

Source of the
incremental tracks
(only relevant for
XE1 on T400

from terminal XE1 of T400

from the baseboard to T400

Setting mode SD:

Set YP to SVD

Subtract SV from YDP

Set YP to SV

Subtract SV from YP

Setting mode S:

Filter
parameterization:

3-34

Filtering

Encoder type 1

Encoder type 2

No filtering

No filtering

>0

Fault signals are suppressed up to the specified length

001

500 ns

125 ns

010

2 s

illegal

011

8 s

illegal

100

16 s

illegal

>100

illegal

illegal

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

Two incremental encoder types are supported.

Encoder type:
0

Encoder type 1

Two pulse tracks, shifted through 90, with or without zero pulse track
Maximum track frequency: 1 MHz. The pulses are quadrupled.

Encoder type 2

One pulse track for each direction of rotation, without zero pulse
track. Maximum track frequency: 2.5 MHz. Single pulses are counted.

Synchronization

The function block uses a synchronizing signal for "set position at SYN"
(zero pulse; for the IT41 module, alternatively a trigger signal can be
input via connector X7C - binary inputs 1 to 4). Input SYM is used to
select which of the synchronizing signals is used (only for IT41), and
whether for SP=1 and a received synchronizing signal, the position actual
value is set to SV or SV is subtracted from the position actual value
(setting mode SP). For the T400 technology module, coarse/fine pulse
evaluation can be set (for details, refer to the Hardware Manual, Section
"Technology module T400").

SYM format:

X X

Setting mode SP
and
Synchronization

Coarse/fine pulse
evaluation (only
T400):

X X

(I/O type: W - 4 hexadecimal positions)

Setting mode SP and


Synchronization

any

Coarse/fine pulse
evaluation
(T400)

Value

Setting mode SP

Synchronization

Set YP to SV

Via zero pulse

Set YP to SV

Via trigger signal


(only IT41)

Subtract SV from YP

Via zero pulse

Subtract SV from YP

Via trigger signal


(only IT41)

Value

Evaluation

Fine pulse; coarse pulse is ignored; (therefore also for faults


with the fine pulse)

Coarse and fine pulses have an H signal level, however, only


one evaluation signal per coarse pulse;
fine pulse faults are suppressed

Coarse and fine pulses have an H signal level;


fine pulse faults are not suppressed.

After the coarse pulse has disappeared, a positive fine pulse


edge is identified;
additional fine pulses (faults) are suppressed!

Coarse pulse inactive (L signal level) and fine pulses active


(H signal level);
Fine pulse faults are not suppressed!

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

3-35

Input/output blocks

When synchronizing, the function block uses a direction of rotationdependent edge evaluation, which ensures, that independent of the
direction of rotation, this same edge is used for synchronization.

Track
signals
Zero pulse
Direction of
rotation

The rising edge is used for


this direction of rotation
The falling edge is used for
this direction of rotation

- Edge used for synchronization

Fault messages

The function block evaluates the alarm outputs of the pulse encoder and
flags an encoder alarm separately from the other errors, at output QF
with 1. There is no internal response to the encoder alarm. For encoder
type 2, for each call, the encoder alarm is reset after having been read.
All other faults/errors are flagged by a 1 at output QFC. The fault/error
cause is output as status word at output YFC.

Fault word YFC:


YFC

Significance

Response

Bit 1

Configuring error: At least one of the


inputs PR, RS, RP or NM is set to 0

The output values Y, YP, YDP and YPS


are invalid

Bit 2

Configuring error, sampling time:


The sampling time is > 20 ms

The function block outputs 0 at Y and YP


up to the next reset

Bit 3

Error, filter parameterization:


An illegal value is specified in MOD in
the filter parameterization

The next lower, legal value is used for


filter parameterization

Bit 4

Slave without master:


A slave hasn't found an NAVS
parameterized as master under its
"preceeding blocks"

The outputs are not updated up to the


next reset.

Bit 5

Master and slave are not in the same


sampling time

The outputs are not updated up to the


next reset.

Bit 6

Multiple-configured master:
Several masters are configured at the
same hardware address.

The outputs of all of the masters


following the first master are not updated
up to the next reset.

Bit 7

Master and slave are at the same


address and the slave follows the
master

The slave outputs are not updated up to


the next reset.

Bit 9

Error, pulse counter overflow

For the current sampling time, no actual


output values are output with the
exception of YFC, QF and QFC

The other fault word bits are not assigned.

3-36

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

I/O
AD

Hardware address

PR

Number of encoder pulses (default value: 1024) (initialization input)

RS

Rated speed of the machine

RP

Rated pulses

(default value: 1024)

MS

Master/slave

(default value: 0) (initialization input)

MOD

Mode of operation

(default value: 16#0000) (initialization input)

SYM

Synchronization type

(default value: 16#0000)

LIM

Trigger enable limit

(default value: 0)

Reset position

(default value: 0)

Set position

(default value: 0)

SP

Set position for syn

(default value: 0)

SV

Position setting value

(default value: 0.0)

SD

Set position difference

(default value: 0)

SVD

Position difference setting value

(default value: 0.0)

NM

Numerator ratio

(default value: 1)

DN

Denominator ratio

(default value: 1)

Speed actual value

(default value: 0.0)

YP

Position actual value

(default value: 0.0)

YDP

Position difference

(default value: 0.0)

SS

Position set for synchronization

(default value: 0)

QP

Position overflow positive

(default value: 0)

QN

Position overflow negative

(default value: 0)

PRE

Pulse is detected

(default value: 0)

QF

Monitoring error encoder alarm

(default value: 0)

QFC

Group error

(default value: 0)

YFC

Error ID

(default value: 16#0000)

Configuringdata

(default value: 0)
(default value: 1.0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

48,5
16,0
8,0

3-37

Input/output blocks

3.8

SBI Status byte input

Symbol
SBI
hardware address GV
direct mode BO

Brief description

AD
DM

QB

BY output quantity

inputs a status byte


to process the input quantity, the input byte is converted to a single
Word format (function block BW_4).
when viewing the screw terminals of the interface module, bit 1 (LSB)
is the lefthand terminal and bit 8 (MSB) the righthand terminal.

Mode of operation

This function block reads-in 8 binary inputs of a hardware module.


The inputs are combined to form a byte and output at QB.
Input DM is parameterized to select whether the input quantities are
read-in in the normal- or in the system mode. For DM = 1 (direct mode),
the input quantity is read-in in the normal mode, i.e., if the function block
is executed in the sampling time according to its configured sequence.
For DM = 0 (no direct mode), the input quantity is read-in in the system
mode. The system mode is always calculated at the start of the sampling
time.
The hardware address of the binary inputs, which are to be read, is
specified at AD.

Block diagram

AD

QB

#
DM

Initialization

3-38

The function is also executed during initialization. Thus, a possibly


configured initialization value is overwritten at the output.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

I/O
AD

Hardware address

(no default)

DM

Direct mode (initialization input)

(default: 0)

QB

Output quantity

(default: 16#00)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

5,6
1,8
0,9

3-39

Input/output blocks

3.9

SBQ Status byte output

Symbol
SBQ
hardware address GV
direct mode BO
input quantity BY

Brief description

AD
DM
IB

output of a status byte


to output a status byte, the WORD quantity must first be converted to
a byte quantity (function block W_BY).
when viewing the screw terminals of the interface module, bit 1(LSB)
is the lefthand terminal and bit 8 (MSB) the righthand terminal.

Mode of operation

Function block SBQ is used together with function block W_BY. Function
block W_BY converts 1 status WORD into 2 status bytes. Function block
SBQ outputs input quantity IB (1 byte) via 8 binary outputs of a hardware
module.
Input DM is parameterized to select whether output is realized in the
normal- or system mode. For DM = 1 (direct mode), output is realized in
the normal mode, i.e. if the function block is executed in the sampling
time according to its configured sequence.
For DM = 0 (no direct mode), the normal mode saves the data to be
output. The data is then output in the next system mode. The system
mode is always calculated at the start of the sampling time.

Block diagram

IB

AD

DM

The hardware address of the binary outputs, at which the binary values
are to be output, is specified at AD.

3-40

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Input/output blocks

I/O
DM

Direct mode (initialization input)

(default: 0)

IB

Input quantity

(default: 16#00)

AD

Hardware address

(no default)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

5,4
1,8
0,9

3-41

Communication blocks

4.1

Communications utility, process data

4.1.1 CCC4 Collect block process data


Symbol
CCC4
coupling module name (transmit)
coupling module name (receive) 1
coupling module name (receive) 2
coupling module name (receive) 3
coupling module name (receive) 4
reiceive address 1
reiceive address 2
reiceive address 3
reiceive address 4
transmit address
receive mode 1
receive mode 2
receive mode 3
receive mode 4
transmit mode
telegram length (receive) 1
telegram length (receive)2
telegram length(receive) 3
telegram length(receive) 4
enable

GV
GV
GV
GV
GV
S
S
S
S
S
S
S
S
S
S
I
I
I
I
BO

CTS
CT1
CT2
CT3
CT4
AR1
AR2
AR3
AR4
AT
MO1
MO2
MO3
MO4
MOD
LT1
LT2
LT3
LT4
EN

QTS
YEV

BO block status
W status

Brief description

The function block receives data from up to 4 receive channels. It


arranges the data one after another in a large data block and transfers
this data block onto a transmit channel.

Mode of operation

The function block CCC4 collects data from up to 4 receive channels,


and copies it onto a transmit channel.
Function blocks CTV, CRV, CDC4 and CCC4 can be used as direct
coupling partners.
The data length of the send channel is obtained from the sum of the data
lengths of the configured receive channels.
A minimum of 2 receive channels must be configured so that the function
block can operate correctly.
The configured data interface must always be specified in an increasing
sequence, i.e. legal CT1- and CT2 names must always be specified. Only
the names at inputs CT3 and CT4 are optional.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-1

Communication blocks

The function block consecutively processes 5 channels; initially the 4


receive channels, and then the transmit channel.
The net data of the transmit channel comprises the net data of the
configured received channels.
If the receive channels are temporarily faulted, data transmission is still
maintained. If one of the receive channels goes into an irreparable error
condition, the function block becomes inactive. It then enters an
appropriate fault message into the communications error field.
The individual channels can be configured in different data transfer modi.
If a receive channel is configured in the handshake or select mode, then
only data are read from this channel after the previous data were
transmitted via the transmit channel.
For irreparable errors, the block enters an appropriate fault message into
the communications error field and stops task processing.
Temporary faults are flagged at the YEV output; the block is still
processed.
The computation time of CCC4 is essentially dependent on the number of
bytes to be copied.
I/O
CTS

Intialization input to specify the configured module name, via whose data interface
data is to be transmitted.
(default : 0)

CT1-4

Name of the configured module on which the data interfaces for the
4 receive channels are located.
(default : 0)

AR1-4

Initialization input for the address name of the receive channels.


The name consists of a channel name and additionally, depending on the
coupling type (e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
The required network data must be configured when used in a rigid network.
(default : empty string)

AT

Initialization input for the address name of the transmit channel.


The name consists of a channel name and additionally, depending on the
coupling type (e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
The required network data must be configured when used in a rigid network.
(default : empty string)

MO1-4

Data transfer modi for received channels (H for handshake, R for refresh, S for
select or M for multiple).
(default : R)

MOD

Initialization input to specify the access mechanism on the transmitting side: Handshake,
Refresh, Select, Multiple. Possible entries:
H = Handshake
R = Refresh
S = Select
M = Multiple
(default : R)

LT1-4

Data length (in bytes) for receive channels 1-4.


Value range: 0 <= LT1...4 <= 32767. When a negative entry is made, the input value is
limited to 0.
(default : 0)

EN

Block enable: The block is not executed for EN=0.


(default : 1)

4-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

QTS

Block output QTS is used to indicate as to whether the block is operating error-free
(QTS = 1)
or, after entering a communications error message, became inactive (QTS = 0).
(default : 0)

YEV

Status display; for an explanation refer to "User Manual Communications,


Chapter Communications Utility, Process Data.
(default : 16#0000)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

249,3
82,3
41,2

4-3

Communication blocks

4.1.2 CDC4 Distribution block process data


Symbol
CDC4
coupling module name (Receive)
coupling module name (transmit) 1
coupling module name (transmit) 2
coupling module name (transmit) 3
coupling module name (transmit) 4
receive address
transmit address 1
transmit address 2
transmit address 3
transmit address 4
receive mode
transmit mode 1
transmit mode 2
transmit mode 3
transmit mode 4
telegram length (transmit) 1
telegram length (transmit) 2
telegram length (transmit) 3
telegram length (transmit) 4
enable

GV
GV
GV
GV
GV
S
S
S
S
S
S
S
S
S
S
I
I
I
I
BO

CTS
CT1
CT2
CT3
CT4
AR
AT1
AT2
AT3
AT4
MOD
MO1
MO2
MO3
MO4
LT1
LT2
LT3
LT4
EN

QTS
YEV

BO block status
W status

Brief description

The function block CDC4 receives a data block, sub-divides it into four
data blocks, and writes the 4 data blocks into channels at the configured
data interfaces.

Mode of operation

The function block CDC4 distributes the data from the receive channel in
up to 4 transmit channels.
Function blocks CTV, CRV, CCC4 and CDC4 can be configured as direct
coupling partners.
The data length of the receive channel is obtained from the sum of the
data lengths of the configured transmit channels.
At least two transmit channels must be configured so that the function
block operates correctly.
The configured data interfaces must always be specified in an increasing
sequence, i.e. legal CT1- and CT2 connection data must always be
made. Only the data entries at inputs CT3 and CT4 are optional.
The function processes 5 channels one after the other; starting off with
the receive channel, and then the 4 transmit channels.
The net data of the transmit channels consist of the net data of the
receive channels. If the transmit channels are temporarily faulted, the
block still receives.
If a transmit channel goes into an irreparable error condition, the function
block becomes inactive and enters an appropriate fault message into the
communications error field.
The individual channels can be configured in different data transfer modii.

4-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

For irreparable errors, the block enters an appropriate error message into
the communications error field and no longer executes its task.
Temporary errors are displayed at the YEV output; the block is still
executed.
The computation of CDC4 is essentially dependent on the number of
bytes to copied.
I/O
CTS

Initialization input to specify the name of the configured module via whose data interface
data is to be received.
(default : 0)

CT1-4

Specifies the name of the configured module which has the data interfaces for the 4
transmit channels.
(default : 0)

AR

Initialization input for the address names for the receive channel. The name consists of a
channel name and additionally, depending on the coupling type
(e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
The necessary network data must be configured when used in rigid networks.
(default : empty string)

AT1-4

Initialization inputs for the address names of the transmit channels.


The name consists of a channel name and additionally, depending on the coupling
type (e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
The necessary network data must be configured when used in rigid networks.
(default : empty string)

MOD

Initialization input to specify the access mechanism on the receive side:


Handshake, Refresh, Select, Multiple. The following entries are possible:
H = Handshake
R = Refresh
S = Select
M = Multiple
(default : R)

MO1-4

Data transfer modi for transmit channels (H for handshake, R for refresh, S for select
or M for multiple).
(default : R)

LT1-4

Data length (No. in bytes) for transmit channels 1-4.


Value range: 0 <= LT1...4 <= 32767. The value at the input is limited to zero when a
negative number is specified.
(default : 0)

EN

Block enable. The block is not executed for EN = 0.


(default : 1)

QTS

Block output QTS is used to indicate whether the block is operating correctly
(QTS = 1) or after a communications error message has been entered, has become
inactive (QTS = 0).
(default : 0)

YEV

Status display; for an explanation refer to "User Manual Communications", Chapter


"Communications Utility, Process Data.
(default : 16#0000)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-5

Communication blocks

Configuringdata

4-6

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

185,9
61,4
30,7

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.1.3 CRV Receive block process data


Symbol
CRV
coupling module name
receive address
receive mode
enable
monitoring time

GV
S
S
BO
R

CTS
AR
MOD
EN
TMX

CRR
QTS
QT
YEV
YTS

GV
BO
BO
W
W

virtual connection name, receive


block status
time overrun
status
status

Brief description

Receive block to distribute a maximum of 10,000 values from a data


interface to block inputs of function blocks on the same CPU.

Mode of operation

The function block only distributes virtual connections (consisting of


virtual connection name and four-digit sequence number) of the CPU on
which it is configured. The receive block distributes the values from the
data interface to block inputs with the configured virtual connection,
where the virtual connection name is identical with the name at the CRR
output.
The configuring engineer defines which value is to be copied at which
block input using the sequence number. All 1 byte-, 2 byte-, 4 byte- and
float I/O formats of block inputs can be numbered in any sequence
(e.g. BO, I, R). Strings (S I/O type) cannot be transferred!
Sequence numbers can be assigned twice to a virtual connection name
(receive); this means that a value is to be copied at various block inputs.
It is also permissible to leave gaps in the number, for example, for
reserves.
The virtual connection can only be specified for block inputs, which were
assigned a constant. For function block interconnections, a receive
reference is not possible.
The receive block checks, as far as the data consistency is concerned,
the following information to ensure that it coincides with the transmitting
side:
total number of data
sequence of the different data formats
number of data per data format
If several data with the same data format are received, it cannot be
identified as to whether they were entered in the same sequence on the
transmitting side.
The configuring engineer is solely responsible in ensuring that this is the
case.
If an irreparable error is identified, the function block makes an entry into
the communications error field and becomes inactive.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-7

Communication blocks

Receiving (i.e. the actual data transfer) can be interrupted at any time
(input EN = 0).
Data receive does not start with the first cycle in the standard mode, but
only after the data interface, on the module configured at input CTS, has
been enabled, and the existence of the appropriate coupling partner has
been determined (refer to output YEV).
The computation time of the CRV is essentially dependent on the number
of bytes to be copied (the basic computation time is approx. 50 s).
5 s for each 4 bytes can be used as basis.
The computation time specified in the technical data must be
appropriately interpreted.
Time monitoring

If no valid data is received within the telegram failure time, specified at


input TMX, output QT is set to 1. After being switched-on, the time
monitoring functions are initially inactive, and QT=0. It is only activated
after start-up, i.e. after several valid telegrams have been received.

I/O
CTS

Initialization input to specify the configured name of the module, via whose data interface
data is to be received.

AR

Initialization input for the address data.


The name consists of a channel name and additionally, depending on the coupling type
(e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
(default : empty string)

MOD

Initialization input to specify the access mechanism; possible entries:


H = Handshake
R = Refresh
S = Select
M = Multiple
(default : R)

EN

Block enable. The block is not executed for EN=0.


(default : 1)

TMX

Monitoring time, maximum telegram failure time.


(default value : 100ms)

CRR

Assignment output for the virtual connection name (receive).

QTS

Block output QTS is used to display as to whether the block is operating error-free
(QTS = 1) or, after a communications error message was entered, became inactive
(QTS = 0).
(default : 0)

QT

Time overrun. The output goes to 1, if an existing communications link (connection) does
not provide new or no valid data for a time greater than TMX. QT=0 when communications
is re-established.

YEV

Status display; for an explanation, refer to the "User Manual Communications", Chapter
"Communications Utility
Process Data.
(default : 16#0000)

YTS

Detailed status display; for values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

4-8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

71,7
23,7
11,9

4-9

Communication blocks

4.1.4 CTV Transmit block process data


Symbol
CTV
Coupling module name
transmit address
transmit mode
enable

GV
S
S
BO

CTS
AT
MOD
EN

CRT
QTS
YEV
YTS

GV
BO
W
W

virtual connection transmit


block stauts
status
status

Brief description

transmit block to transfer a maximum of 10,000 values in a data interface.

Mode of operation

The function block only senses and transmits block output values from
function blocks of the CPU on which it is configured. A virtual connection
(consisting of virtual connection name and four-digit sequence number)
must be configured at the block output values to be transmitted.
The virtual connection name must correspond to the name at the CRT
output.
The configuring engineer defines the sequence in which the values to be
transmitted are output onto the channel using a sequence number. All
1 byte-, 2 byte-, 4 byte-, and float I/O formats can be numbered in any
sequence (e.g. BO, I, R). Strings cannot be transferred (S I/O type)!
It is not permitted to assign sequence numbers twice to a virtual
connection name (transmitting), as this would lead to an error message in
the CFC compiler. Gaps in the number, for example for reserves, are
permitted.
The transmit block checks as far as the data consistency is concerned,
the following information to ensure that it coincides on the receiving side:
total data
sequence of the different data formats
number of data per data format
If several pieces of data with the same data format are transferred, then
neither the CFC compiler nor the transmit block can determine whether
the receiver is also reading the data in the same sequence.
The configuring engineer is solely responsible in ensuring that this
coincides.
If an irreparable error is identified, the function block makes an entry into
the communications error field and becomes inactive.
Data transmission (i.e. the actual data transfer) can be interrupted at any
time (input EN = 0).
Data transmission does not start with the first cycle in the standard mode,
but only after the data interface on the module configured at input CTS
was enabled and the existence of the appropriate coupling partner has
been identified (refer to output YEV).

4-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

The CTV computation time is essentially dependent on the number of


bytes to be copied (the basic computation time is approx. 50 s).
5 s for each 4 bytes can be used as basis.
The computation time specified in the technical data should be
appropriately interpolated.
I/O
CTS

Initialization input to specify the configured module name, via whose data interface data
transmission is to be realized.

AT

Initialization input for address data.


This data entry consists of a channel name, and additionally, depending on the coupling
time (e.g. DUST1 or SINEC H1), an additional 1 or 2 address stages.
(pre-assignment: empty string)

MOD

Initialization input to specify the access mechanism; possible data entries:


H = Handshake
R = Refresh
S = Select
M = Multiple
(default : R)

EN

Block enable signal. The block is not executed for EN = 0.


(default : 1)

CRT

Assignment output for the virtual connection name (transmitting).

QTS

Block output QTS is used to display as to whether the block is operating error-free (QTS =
1) or, after a communications error message has been entered, became inactive (QTS =
0).
(default : 0)

YEV

Status display; for an explanation refer to User Manual, Communications", Chapter


"Communications Utility Process Data.
(default : 16#0000)

YTS

Detailed status display; for values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

66,9
22,1
11,1

4-11

Communication blocks

4.2

Communications utility message system

4.2.1 Central and output blocks


4.1.2.1 @MSC Message system central block
Symbol
@MSC
message system name
communications error text
No. of messages which can be
saved
save buffers
prefix of communication errors
message system enable

Brief description

GV
S
I

CMS
CMT
NOM

BO
I
BO

SAV
RP
MUN

QTS

BO block status

The central block @MSC initializes and monitors the message


system. Further, it evaluates the communications error field and the
error buffer in the SAVE area.
If a central block @MSC is configured, then at least one message
output block MSI or MSIPRI must be configured.
Only one central block @MSC can be configured for each message
system, i.e. per CPU.
If central blocks are configured a multiple number of times, this is
identified when the system runs-up. This results in an entry in the
communications error field for all central blocks, which attempt to logon after the first central block.
The message system can still function as the first central block was
able to log on.
The message system consists of three types of function blocks:
Central block to administer and monitor the message buffer (@MSC)
Message entry blocks (MER...)
Message output blocks (MSI and MSIPRI)

Mode of operation

Using the message system, messages which occur locally on the CPU
can be sensed and administered.
Initialization input SAV specifies as to whether the message buffer is to
be set-up in the local non-buffered RAM (SAV = 0) or in the batterybuffered RAM (SAV = 1).
If the message buffer is located in the battery-buffered RAM, the central
block re-synchronizes itself to the message buffer after the system runsup. In this case, existing messages are kept.
If the message buffer cannot be set-up at system start-up, the central
block flags this by making an entry in the communications error field.
The size of the message buffer corresponds to the data at the NOM block
input.

4-12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

If the message buffer was set-up once in the SAVE area, the size of the
message buffer cannot be subsequently varied in the SAVE area:
For SAV=1 after a system reset, the information at input NOM is no
longer evaluated, if SAV was equal to 1 at one of the earlier system runups.
A message consists of a text, a two-stage number (prefix and suffix), a
type and optionally a measured value.
The two stage numbering (prefix, suffix) is used to be able to sub-divide
the messages into two classes (e.g. upper- and lower class).
A differentiation is made between the following message types:
S
System error message (allocated by the system): after a system
crash, the central block enters a system error message into the
message buffer when the system runs-up again. The cause of the
crash is entered as suffix, and as prefix, the value of block input RP is
entered. This is message type S.
System message is entered as message text; the message text
cannot be changed.
C
Communications error message (allocated by the system): When an
irreparable error is identified, the communications function blocks
enter the error cause into the communications error field.
The central block cyclically evaluates this error field. The cause of the
error is entered as suffix, and as prefix, the value of block input RP is
entered.
As soon as the central block identifies that more communication
errors have occurred than can actually be accepted in the error field,
the @MSC enters a last C message. In this case, the negative
number of communication errors which were not acquired, is entered
as suffix.
These messages are all type C messages.
The configured text is entered at initialization input CMT as message
text.
F
Error message (allocated by the configuring engineer): Using this
type, messages are identified which represent significant errors for the
message system. This message type is assigned when configuring
the message entry function blocks.
W
Alarm message (warning message) (allocated by the configuring
engineer): This type of message identifies errors which are not so
critical for the message system. This message type is assigned when
configuring the message entry function blocks.
The central block @MSC initializes the message system administers and
monitors it. The number of messages, which the message buffer can
accommodate, is specified at block input NOM. If a number less than 15
is entered, a message buffer is automatically initialized for 15 entries.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-13

Communication blocks

The message system can be inhibited for additional entries via block
input MUN (MUN = 0). This means that messages cannot be overwritten
before they have been read-out. The maximum number is limited to
32767.
I/O
CMS

Initialization input to specify the name of the message system. The name is not
checked. A maximum of 6 characters can be entered.

CMT

The text, which is to be specified when communication errors are output, is configured
at this initialization input. If an entry is not made, then only the numbe of the error
entry is output together with "C" message type.
(default : empty string)

NOM

The number of entries which can be saved in the message buffer is specified at this
initialization input. The minimum number of entries is 15 (even if the entered number
is lower; the maximum number is limited to 32767.
(default : 15)

SAV

This initialization input is used to specifiy as to whether the message buffer is to be


set-up in the battery-buffered RAM (SAV = 1) or in the non-buffered RAM (SAV = 0).
(default : 0)

RP

The message prefix is entered here. For communication error messages, which are
evaluated by the central block @MSC, this number is used as prefix. The suffix
represents the actual error cause.
Value range: 0 <= RP <= 32767. The entered value is limited to 0 if a negative
number is entered.
(default : 0)

MUN

Enables the message buffer for message entries (MUN = 1). For MUN = 0,
no messages can be acquired. This is practical, if messages which are not read,
are not to be overwritten by new messages (e.g. when many messages are received
at the same time).
(default : 0)

QTS

Output QTS indicates whether the block could be correctly initialized (QTS = 1),
or, after entering a communications error message, became inactive.
(default : 0)

Configuringdata

4-14

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

8,1
2,7
1,4

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The function block may not be disabled via


a task group and the function block may only be
configured in a sampling time > 32 ms.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.1.2.2 MSI Message output block


Symbol
MSI
message system name
communication module name (transmit)
address parameter
prefix for message buffer overflow
message number output
output message text
message text constant length
output format
enable

Brief description

GV
GV
S
I
BO
BO
BO
BO
BO

CMS
CTS
AT
RP
SNV
STM
STC
SSF
EN

QBO
QTS
YTS

BO overflow message buffer


BO block status
I status

the message output block MSI outputs the messages, entered in the
message buffer, at the data interface configured at the appropriate
CTS input.
when using this function block, the central block of the message
system should be configured (@MSC).
function block MSI can be configured a multiple number of times. The
messages which are entered can therefore be output via various data
interfaces.

Mode of operation

The function block MSI first initializes a transmit channel to output


messages at the configured data interface (CTS output). The channel is
set-up in the "select" mode. Thus, messages from various message
systems can be output via one channel using several MSI.
After all of the initialization tasks have been completed (after executing
the normal mode several times), MSI starts to output messages. MSI
outputs one message per operating cycle.
If messages are overwritten as a result of the ring buffer structure of the
message buffer, MSI outputs an overflow message: The overflow
message is a type W message (alarm).
The value specified at the RP input is entered as prefix; the number of
messages lost, as suffix.
MSI enters "sequence buffer overflow" as message text. The text cannot
be configured, but is automatically generated. The overflow message is
repeated every 10 seconds as long as the messages are overwritten.
If, after a buffer overflow, no overflow occurs for 10 seconds, then an
"end of overflow" message is output. The "end of overflow" message is of
type W (warning).
The value, specified at input RP plus 1 is entered as prefix; the suffix is
always 0.
MSI enters, as message text "sequence buffer overflow end". The text
cannot be configured but is automatically generated.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-15

Communication blocks

When reading-out messages from the message buffer, the oldest


message which has not been read (from the perspective of the particular
MSI function block) is conditioned and output at the configured data
interface.
If there are no messages in the message buffer, the block remains
inactive until new messages have been entered.
If messages are entered into the message buffer faster than they can be
read-out by the message output block, then the oldest messages, which
still have not been read, are lost. In this case, an appropriate overflow
message is generated. The overflow message includes the number of
messages which have been overwritten.
The message output format is defined using inputs SNV, STM, STC and
SSF.
I/O
CMS

Initialization input to specify the name of the message system. The name is not checked.
A maximum of 6 characters can be specified.

CTS

Initialization input for the configured coupling module name; Module name (and optionally
of connector X01, X02 or X03), via which messages are to be output.

AT

Initialization input for address name.


This consists of a channel name and additionally, depending on the coupling type
(e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
(default : empty string)

RP

If MSI identifies that the message buffer has an overflow condition, the MSI
generates an overflow message with the prefix specified here. If an overflow no longer
occurs for 10 seconds, an end of overflow message is output with RP+1 as prefix.
Value range: 0 <= RP <= 32767. The entered value is limited to 0 if a negative entry is
made.
(initialization input, default : 0)

SNV

Initialization input to define whether a message should be output with a two-stage


message number associated with that message. For SNV = 1, the message number
is output.
(default : 0)

STM

Intialization input to define whether a message text, associated with a message


should be output. For STM = 1, the message text is also output.
(default : 0)

STC

Initialization input to define whether the message text is output with a constant
length (60 characters). If the message text is shorter than the maximum length or is
not available, then it is filled with blanks. If STC = 0, the actual length of the message
text is used for output.
(default : 0)

SSF

Initialization input to define whether a message is output in the standardized format or in


the hexadecimal format. For SSF = 1, the message is output in the standardized format
(default : 0)

EN

The input EN enables message output. If message output is not enabled (EN=0), the
function block is passive (default)
(default : 0)

QBO

Indicates a message buffer overflow condition. If this is the case (QBO = 1),
the MSI function block generates and outputs an overflow message.
(default : 0)

4-16

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

QTS

Indicates whether the function block is faulted. The function block is faulted (QTS = 0),
if either the communications channel was not correctly initialized or is faulted or if the
message system cannot be correctly initialized (e.g. no memory for the message buffer)
(default : 0)

YTS

Block output YTS indicates the block status of MSI during normal operation.
If the function block has become inactive after an entry in the communications error field,
the appropriate error number is output at block output YTS.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

13,0
4,3
2,2

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-17

Communication blocks

4.1.2.3 MSIPRI Message output block (printer)


Symbol
MSIPRI
message system name
coupling module name
address parameter for transmit
channel
prefix for message buffer overflow
transmit enable

Brief description

GV
GV
S

CMS
CTS
AT

I
BO

RP
EN

QBO
QTS
YTS

BO overflow message buffer


BO block status
I status

the message output block MSIPRI outputs messages, entered in the


message buffer at the data interface configured at the CTS input. It is
assumed that a printer is connected to this data interface.
when using this function block, the central block of the message
system (@MSC) must be configured.
the function block MSIPRI can be configured a multiple number of
times. The entered messages can be output via various data
interfaces.
the mode of operation of function block MSIPRI is identical with that of
function block MSI, the only difference is in the format of the output.

Mode of operation

The function block MSIPRI first initializes a transmit channel to output


messages at the configured data interface (CTS output). The channel is
set-up in the "select" mode. Thus, messages from various message
systems can be output via one channel using several MSIPRI.
After all of the initialization tasks have been completed (after executing
the normal mode several times), MSIPRI starts to output messages.
MSIPRI outputs one message per operating cycle.
If messages are overwritten as a result of the ring buffer structure of the
message buffer, MSIPRI outputs an overflow message:
The overflow message is a type W message (alarm).
The value specified at the RP input is entered as prefix; the number of
messages lost, as suffix.
MSIPRI enters "sequence buffer overflow" as message text. The text
cannot be configured, but is automatically generated. The overflow
message is repeated every 10 seconds as long as the messages are
overwritten.
If, after a buffer overflow, no overflow occurs for 10 seconds, then an
"end of overflow" message is output. The "end of overflow" message is of
type W (warning).
The value, specified at input RP plus 1 is entered as prefix; the suffix is
always 0.
MSI enters, as message text "sequence buffer overflow end". The text
cannot be configured but is automatically generated.

4-18

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

When reading-out messages from the message buffer, the oldest


message which has not been read (from the perspective of the MSIPRI
function block) is conditioned and output at the configured data interface.
If there are no messages in the message buffer, the block remains
inactive until new messages have been entered.
If messages are entered into the message buffer faster than they can be
read-out by the message output block, then the oldest messages, which
still have not been read, are lost. In this case, an appropriate overflow
message is generated. The overflow message includes the number of
messages which have been overwritten.

I/O
CMS

Initialization input to specify the name of the message system. The name is not
checked. A maximum of 6 characters can be specified.
(default : 0)

CTS

Initialization input for the configured communications port; name of the module (and
optionally the connector X01, X02 or X03), via which messages are to be output.
(default : 0)

AT

Initialization input for the address name.


This consists of a channel name and additionally, depending on the coupling time
(e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
(default : empty string)

RP

If MSIPRI identifies that the message buffer has an overflow condition, MSIPRI
generates an overflow message with the prefix specified here. If an overflow no longer
occurs for 10 seconds, an end of overflow message is output with RP+1 as prefix.
Value range: 0 <= RP <= 32767. The value entered is limited to 0 if a negative entry is
made.
(initialization input, default : 0)

EN

The input EN enables message output. If message output is not enabled (EN=0),
the function block is passive.
(default : 0)

QBO

Indicates a message buffer overflow condition. If this is the case (QBO = 1), then the
MSIPRI function block generates and outputs an overflow message.
(default : 0)

QTS

Indicates whether the function block is faulted. The function block is faulted
(QTS = 0), if either the communication channel was not correctly initialized or is
faulted or if the message system cannot be correctly intialized (e.g. no memory for
the message buffer
(default : 0)

YTS

Block output YTS indicates the block status of MSIPRI during normal operation.
If the function block has become inactive after an entry in the communications error
field, the appropriate error number is output at block YTS.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-19

Communication blocks

Configuringdata

4-20

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

22,4
7,4
3,7

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.2.2 Message blocks for activated messages without value


4.2.2.1 MER0 Message block for 16 activated messages
Symbol
MERO
message system name
message type
prefix
suffix
message enable
message trigger
save message

Brief description

Mode of operation

NOTE

GV
BO
I
I
BO
W
BO

CMS
MT
RP
RS
EN
IS1
SM

QN
QS1
QTS

BO message entered
W message received
BO block status

This function block enters up to 16 messages in the message system,


initiated by a positive edge of a bit vector bit.
When using this function block, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.
The message numbers are sub-divided into two stages (classified) using
the RP- and RS inputs. The prefix is configured at the RP input; the suffix
at the RS input.
The configuring engineer is responsible in allocating unique numbers for
prefix and suffix to differentiate between messages.
The message system does not check that unique numbers have been
allocated!
A message is suppressed from being output with block input EN = 0.
A message is output when a bit, at block input IS1 changes from 0 to 1,
the appropriate bit is set in the checkback vector QS1 and the block
output QN is set to 1.
Block output QS1 is reset if a 0 is entered at block input SN for at least
one sampling period.
As long as the appropriate bit of the block output QS1 is set, the
message is not re-output. Thus, a message can be suppressed from
being output at multiple number of times using block input SM=1.
Block outputs QS1 and QN are always updated, independent of block
input EN.
For EN = 1, SM = 1, i-th bit from QS1 = 0 and when the i-th IS1 changes
from 0 to 1, an activated message is entered and the appropriate bit in
QS1 is set.
If a message is generated for the i-th bit, then message text Ti+1 is
assigned to the message when the message is entered and the bit
position added to the suffix.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-21

Communication blocks

I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

MT

Initialization input to classify messages. Using the MT input, messages are either classified
as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS

Message suffix. The specified suffix is the basis value to which the bit position of
the generated message is added (example: for a message signal 0x0002, a 1 is
added to the suffix, as 1st bit is set).
Value range: 0 <= RS <= 32767. The value T is limited to 0 if a negative value is
entered.
(default : 0)

EN

Block enable. For EN = 0, the function block does not output a message.
(default : 0)

IS1

Input for a message which has been received. When a bit of IS1 changes from 0 to
1, a message is output (prerequisite: the appropriate bit of Q1 = 0 and EN = 1).
(default : 16#0000)

SM

Input SM can inhibit a message being re-output


(for SM = 1).
(default : 0)

QS1

Displays whether the appropriate bit IS1 = 0 has changed from 0 to 1. If a bit of
QS=1, then a message has been received for this particular bit.
(default : 16#0000)

QN

Displays whether one or several of the 16 messages have been entered.


(default : 0)

QTS

Block output QTS indicates whether a block was able to be correctly initialized
(QTS = 1) or, after entering a communications error message, became inactive
(QTS = 0)
(default : 0)

Configuringdata

4-22

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

7,0
2,3
1,2

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.2.2.2 MER1 Message block for one activated message with text
Symbol
MER1
message system name
message text
message type
prefix
suffix
message enable
message trigger
save message

Brief description

GV
S
BO
I
I
BO
BO
BO

CMS
T1
MT
RP
RS
EN
I1
SM

Q1
QTS

BO message received
BO block status

this function block enters a message into the message system,


initiated by a positive edge of a binary quantity.
when this function block is used, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.

Mode of operation

NOTE

The message numbers are sub-divided into two stages using the RPand RS inputs. The prefix is configured at the RP input and the suffix at
the RS input.
The configuring engineer is responsible in allocating unique numbers for
the prefix and suffix to differentiate between the messages.
The message system does not check that unique numbers have been
allocated!

A message is not output when block input EN = 0.


At a transition from 0 to 1 at block input I1, a message is output and block
output Q1 is set to 1.
Block output Q1 is reset if the block input SM is set to 0 for at least one
sampling time.
As long as the block output Q1 is set, a new message cannot be output.
Thus, when block input SM = 1, a message can be inhibited from being
output several times.
Block output Q1 is always updated independently of block input EN.
For EN = 1, SM = 1, Q1 = 0, at the transition from I1 = 0 to I1 = 1, an
incoming message is entered and Q1 = 1 is set to 1.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-23

Communication blocks

I/O
CMS

Initialization input to specify the message system name.


The name is not checked. A maximum of 6 characters can be specified.
(default : 0 )

T1

Initialization input for the message text of a message. The message text may be
up to 60 characters long.
(empty string: 0 )

MT

Initialization input to classify the messages. Using the MT input, messages are either
classified as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message number stage 1, prefix.


Value range: 0 <= RP <= 32767
The value is limited to 0 if a negative value is entered.
(default : 0)

RS

Message number stage 2, suffix.


Value range: 0 <= RS <= 32767
The value is limited to 0 when a negative value is entered.
(default : 0)

EN

Block enable. For EN = 0 the function block does not output a message.
(default : 0)

I1

Input for a message which has been received. A message is output when I1 = 0
changes to I1 = 1 (prerequisite: Q1 = 0 and EN = 1).
(default : 0)

SM

A message can be inhibited from being output again using the SM input
(for SM = 1).
(default : 0)

Q1

Displays whether I1 has changed from 0 to 1. A message has been entered for
Q1 = 1.
(default : 0)

QTS

Block output QTS indicates whether the block was able to be correctly initialized
(QTS=1) or after entering a communications error message, became inactive
(QTS = 0).
(default : 0)

Configuringdata

4-24

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,0
1,3
0,7

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.2.2.3 MER16 Message block for 16 activated messages with text


MER16

Symbol
message system name
1st message text
2nd message text
3rd message text
4th message text
5thmessage text
6th message text
7th message text
8th message text
9th message text
10th message text
11th message text
12th message text
13th message text
14th message text
15th message text
16th message text
message type
prefix
suffix
message enable
message trigger
save message

Brief description

GV
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
BO
I
I
BO
W
BO

CMS
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
T14
T15
T16
MT
RP
RS
EN
IS1
SM

QN
QS1
QTS

BO message entered
W message received
BO block status

this function block enters up to 16 messages in the message system,


initiated by a positive edge of a bit vector bit.
when using this function block, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.

Mode of operation

NOTE

The message numbers are sub-divided into two stages (classified) using
the RP- and RS input. The prefix is configured at the RP input; the suffix
at the RS input.
The configuring engineer is responsible in allocating unique numbers for
prefix and suffix to differentiate between the messages.
The message system does not check that unique numbers have been
allocated!
A message is inhibited from being output with block input EN = 0.
A message is output when a bit, at block input IS1 changes from 0 to 1,
the appropriate bit is set in the checkback vector QS1, and the block
output QN is set to 1.
Block output QS1 is reset if a 0 is entered at block input SM for at least
one sampling period.
As long as the appropriate bit of the block output QS1 is set, the
message is not re-output. Thus, a message can be suppressed from

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-25

Communication blocks

being output a multiple number of times using block input SM=1.


Block outputs QS1 and QN are always updated, independent of block
input EN.
For EN = 1, SM = 1, i-th bit from QS1 = 0 and when the i-th bit IS1
changes from 0 to 1, an activated message is entered and the
appropriate bit in QS1 is set.
If a message is generated for the i-th bit, then message text Ti+1 is
assigned to the message when the message is entered and the bit
position added to the suffix.
I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

T1-T16

Initialization inputs for the message texts. Message bit i is assigned to message
text Ti+1.
(default : empty string)

MT

Initialization input for classifying messages. Using the MT input, messages are
either classified as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. The value is limited to 0 if a negative value is
entered.
(default : 0)

RS

Message suffix. The specified suffix is the basis value to which the bit position of
the generated message is added (example: for a message signal 0x0002, a 1 is
added to the suffix, as the 1st bit is set).
Value range: 0 <= RS <= 32767. The value is limited to 0 if a negative value is
entered.
(default : 0)

EN

Block enable. For EN = 0, the function block does not output a message.
(default : 0)

IS1

Input for a message which has been received. When a bit of IS1 changes from 0 to 1,
a message is output (prerequisite: the appropriate bit of QS1 = 0 and EN = 1).
(default : 16#0000)

SM

Input SM can inhibit a message being re-output


(for SM = 1).
(default : 0)

QS1

Displays whether the appropriate bit IS1 = 0 has changed from 0 to 1.


If a bit of QS1 = 1, then a message has been received for this particular bit.
(default : 16#0000)

QTS

Block output QTS indicates whether a block was able to be correctly initialized
(QTS = 1), or, after entering a communications error message, became inactive
(QTS = 0)
(default : 0)

4-26

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

13,1
4,3
2,2

4-27

Communication blocks

4.2.3 Message blocks fr activated messages with value


4.3.2.1 MER, MER_I, MER_D Message block for one activated message with measured
value (R type)
Symbol
MER
message system name
message text
message type
prefix
suffix
message enable
message trigger
save message
measured value

Brief description

GV
S
BO
I
I
BO
BO
BO
R

CMS
T1
MT
RP
RS
EN
I1
SM
X

Q1
QTS

BO message received
BO block status

this function block outputs a message with value (REAL type) and
units into the message system, initiated by a rising edge of a binary
quantity.
when using this function block, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.
function blocks MER_I, MER_D and MER have identical functions.
They are only differentiated by the data type of the measured value
input X:
MER:
REAL
MER_I:
INT
MER_D:
DINT

Mode of operation

NOTE

The message numbers are sub-divided into two stages using the RPand RS input. The prefix is configured at the RP input; the suffix at the
RS input.
The configuring engineer is responsible in assigning unique numbers for
the prefix and suffix to differentiate between the messages.
The message system does not check that numbers are uniquely
assigned!
Message output is inhibited with block input EN = 0.
A message is output and block output Q1 is set to 1 after block input I1
changes from a 0 to 1.
Block output Q1 is reset if the block input SM is made 0 for at least one
sampling time.
A new message output is inhibited as long as block output Q1 is set.
Thus, multiple message output can be inhibited via block input SM = 1.
Block output Q1 is always updated independent of block input EN.

4-28

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

For EN = 1, SM = 1, Q1 = 0, at the transition from I1 = 0 to I1 = 1, an


incoming message is entered and Q1 = 1 is set to 1.
The measured value available at input X is transferred as measured
value when a message is generated.
I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

T1

Initialize input for the message text. The message text may be up to 60 characters long.
(default : empty string)

MT

Initialization input to classify messages. Using the MT input, messages are either
classified as error (MT=1) or alarm (MT=0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS

Message suffix.
Value range: 0 <= RS <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

EN

Block enable. For EN = 0, the function block does not output a message.
(default : 0)

I1

Input for a message which has been received. When I1 changes from 0 to 1, a message is
output (prerequisite: Q1 = 0 and EN = 1)
(default : 0)

SM

Input SM can inhibit a message be re-output (for SM = 1).


(default : 0)

Measured value input.


(default : 0)

Q1

Displays whether I1 has changed from 0 to 1. A message has been entered for Q1 = 1
(default : 0)

QTS

Block output QTS indicates whether a block was able to be correctly initialized (QTS = 1),
or after entering a communications error message, became inactive(QTS = 0)
(default : 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-29

Communication blocks

Configuringdata

Computation time [s]


MER
MER_I
MER_D

4-30

T400/PM5
FM458/PM6
T400/PM5
FM458/PM6
T400/PM5
FM458/PM6

8,1
2,7
7,8
2,6
9,6
3,2

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.2.4 Message blocks for activated and de-activated messages without


value
4.4.2.1 MERF0 Message block for 16 activated and de-activated messages
Symbol
MERFO
message system name
message type
prefix
suffix, activated message
suffix, de-actevated message
message enable
message trigger
save message

Brief description

GV
BO
I
I
I
BO
W
BO

CMS
MT
RP
RS1
RS2
EN
I1
SM

QN
QS1
QS2
QTS

BO
W
W
BO

message entered
activated messages received
de-actevated messages received
block status

this function block enters 32 messages in the message system,


initiated by a positive or negative edge of a binary quantity.
when using this function block, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.

Mode of operation

NOTE

The message numbers are sub-divided into two stages (classified) using
the RP-, RS1- and RS2 inputs. The prefix is configured at input RP, the
suffix for activated messages at input RS1 and the suffix for de-activated
messages at input RS2.
The configuring engineer is responsible in allocating unique numbers for
prefix and suffix to differentiate between the messages.
The message system does not check that unique numbers have been
allocated!

A message is output with prefix RP and the suffix from input RS1 when a
bit of IS1 changes from 0 to 1; the bit position is added to the suffix.
A message is output with prefix RP and the suffix from input RS2 when a
bit of IS1 changes from 1 to 0; the bit position is added to the suffix.
Messages are inhibited from being output with block input EN = 0.
When a bit of IS1 changes from 0 to 1, the appropriate bit at output QS1
is set to 1, and in addition, output QN is set. The appropriate bit of QS2 is
set to 1 at a transition from 1 to 0.
Block outputs QS1 and QS2 are reset in the following sampling time if
SM=0. As long as SM=1, the associated message is inhibited from being
re-output.
Block outputs QS1, QS2 and QN are always updated independent of
block output EN. For EN = 1, SM = 1, i-th bit from QS1 = 0 and when the
i-th bit of IS1 changes from 0 to 1, an activated message is entered and
the i-th bit of QS1 is set to 1. The corresponding is also valid for Q2.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-31

Communication blocks

I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

MT

Initialization input to classify messages. Using the MT input, messages are either
classified as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. The value is limited to 0 if a negative value is entered
(default : 0)

RS1

Suffix for activated messages. The bit position of the message signal is added to the
suffix (example: if the message signal has value 0x0040, 6 is added to the
suffix, as the 6th bit is set.
Value range: 0 <= RS1 <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS2

Suffix for de-activated messages. The bit position of the message signal is added to
the suffix.
Value range: 0 <= RS2 <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

EN

Block enable. For EN = 0 the function block does not output a message.
(default : 0)

IS1

Input to initiate a message. At the transition of a bit from 0 to 1, a message with the
prefix RP and the suffix from input RS1 is output (prerequisite: appropriate bit
QS1 = 0 and EN = 1).
At the transition of a bit from 1 to 0, a message is output with prefix RP and the
suffix from input RS2 (prerequisite: appropriate bit QS2 = 0 and EN = 1).
(default : 16#0000)

SM

Input SM can inhibit a message being re-output (for SM = 1).


(default : 0)

QN

Displays whether an activated or de-activated message was generated.


(default : 0)

QS1

Display for activated messages. If bit QS1 is set to 1, an activated message has
been entered; the appropriate bit of IS1 changed from 0 to 1.
(default : 16#0000)

QS2

Display for de-activated messages. If bit QS2 is set to 1, a de-activated message


has been entered; the appropriate bit of IS1 changed from 1 to 0
(default : 16#0000)

QTS

Block output QTS indicates whether a block was able to be correctly initialized
(QTS = 1) or, after entering a communications error message, became inactive (QTS = 0).
(default : 0)

Configuringdata

4-32

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

18,0
5,9
3,0

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.4.2.2 MERF1 Message block for an activated and a de-activated message


Symbol
MERF1
message system name
message text activated message
message text de-activated message
message type
prefix
suffix, activated message
suffix, de-actevated message
message enable
message trigger
save message

Brief description

GV
S
S
BO
I
I
I
BO
BO
BO

CMS
T1
T2
MT
RP
RS1
RS2
EN
I1
SM

Q1
Q2
QTS

BO activated messages received


BO de-actevated messages received
BO block status

this function block outputs 2 messages in the message system,


initiated by a rising or falling edge of a binary quantity.
when this function block is used, the central block of a message
system (@MSC) and at least one message output block must be
configured (MSI).

Mode of operation

NOTE

The message numbers are sub-divided into two stages (classified) using
the RP-, RS1- and RS2 inputs. The prefix is configured at the RP input,
the suffix for the activated message at the RS1 input, and the suffix for
the de-activated message at RS2 input.
The configuring engineer is responsible in allocating unique numbers for
prefix and suffix to differentiate between the messages.
The message system does not check that unique numbers have been
allocated!

A message is output with the message text from input T1 and the suffix
from input RS1 when I1 changes from 0 to 1.
A message is output with the message text from input T2 and the suffix
from input RS2 when I1 changes from 1 to 0.
Messages are inhibited from being output with block input EN = 0.
Block output Q1 is set to 1 when I1 changes from 0 to 1. Q2 is set to 1
when it changes from 1 to 0.
Block outputs Q1 and Q2 are reset in the following sampling time if
SM = 0. As long as SM = 1, a message can be inhibited from being reoutput.
Block outputs Q1 and Q2 are always updated, independent of block input
EN.
For EN = 1, SM = 1, Q1 = 0, when I1 changes from 0 to 1, an activated
message is entered and Q1 is set to 1.
The same is essentially valid for Q2.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-33

Communication blocks

I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

T1

Initialization input for the message text for the activated message. The message
text may be a maximum of 60 characters long.
(default : empty string)

T2

Initialization input for the message text for the de-activated message. The message
text may be a maximum of 60 characters long.
(default : empty string)

MT

Initialization input to classify messages. Using the MT input, messages are either
classified as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS1

Suffix for an activated message.


Value range: 0 <= RS1 <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS2

Suffix for a de-activated message.


Value range: 0 <= RS2 <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

EN

Block enable. For EN = 0, the function block does not output any message.
(default : 0)

I1

Block input to initiate a message. At the transition from 0 to 1, a message is output with
the message text from T1 and the suffix from input RS1 (Prerequisite: Q1 = 0 and EN =
1).
At the transition from 1 to 0, a message text is output with the message text from
input T2 and the suffix from input RS2 (prerequisite: Q2 = 0 and EN = 1).
(default : 0)

SM

Input SM can inhibit a message being re-output (for SM = 1).


(default : 0)

Q1

Display for an activated message. For Q1 = 1, an activated message has been


entered; I1 changed from 0 to 1.
(default : 0)

Q2

Display for a de-activated message. For Q2 = 1, a de-activated message has been


entered; I1 changed from 1 to 0.
(default : 0)

QTS

Block output QTS indicates whether a block was able to be correctly initialized (QTS = 1),
or after entering a communications error message, became inactive (QTS = 0).
(default : 0)

Configuringdata

4-34

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

10,1
3,3
1,7

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.4.2.3 MERF16 Message block for 16 activated and de-activated messages with text
Symbol
MERF 16
message system
message text, 1st activated message
message text, 1st de-activated message
message text, 2nd activated message
message text, 2nd de-activated message
message text, 3rd activated message
message text, 3rd de-activated message
message text, 4th activated message
message text, 4th de-activated message
message text, 5th activated message
message text, 5th de-activated message
message text, 6th activated message
message text, 6th de-activated message
message text, 7th activated message
message text, 7th de-activated message
message text, 8th activated message
message text, 7th de-activated message
message text, 9th activated message
message text, 9th de-activated message
message text, 10th activated message
message text, 10th de-activated message
message text, 11th activated message
message text, 11th de-activated message
message text, 12th activated message
message text, 12th de-activated message
message text, 13th activated message
message text, 13th de-activated message
message text, 14th activated message
message text, 14th de-activated message
message text, 15th activated message
message text, 15th de-activated message
message text, 16th activated message
message text, 16th de-activated message
message type
prefix
suffix, activated message
suffix, de-activated message
message enable
message trigger
save message

GV
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
BO
I
I
I
BO
W
BO

CMS
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
T14
T15
T16
T17
T18
T19
T20
T21
T22
T23
T24
T25
T26
T27
T28
T29
T30
T31
T32
MT
RP
RS1
RS2
EN
IS1
SM

QN
QS1
QS2
QTS

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

BO
W
W
BO

message entered
activated message received
de-activated message received
block status

4-35

Communication blocks

Brief description

this function block enters 32 messages in the message system,


initiated by either a positive or negative edge of a binary quantity.
when using this function block, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.

Mode of operation

NOTE

The message numbers are sub-divided into two stages (classified) using
the RP-, RS1- and RS2 inputs. The prefix is configured at the RP input,
the suffix for the activated messages at the RS1 input and the suffix for
the de-activated messages at the RS2 input.
The configuring engineer is responsible in allocating unique numbers for
the prefix and suffix to differentiate between the messages.
The message system does not check that unique numbers have been
allocated!

A message with prefix RP, and the suffix from input RS1 is output when
the i-th bit of IS1 changes from 0 to 1; the bit position is added to the
suffix. T: 2(i+1)-1 is entered in the message as message text.
A message with the prefix RP and the suffix from input RS2 is output
when the i-th bit IS1 changes from 1 to 0; the bit position is added to the
suffix. T: 2(i+1) is entered in the message as message text.
Messages are inhibited from being output with block input EN=0.
When bit IS1 changes from 0 to 1, the appropriate bit at output QS1 is set
to 1, and output QN is set. At the transition from 1 to 0, the appropriate bit
of QS2 is set to 1.
Block outputs QS1 and QS2 are reset in the following sampling times, if
SM = 0. As long as SM = 1, the associated message is inhibited from
being re-output.
Block outputs QS1, QS2 and QN are always updated independent of
block input EN.
For EN = 1, SM = 1, the i-th bit QS1 = 0, when the i-th bit of IS1 changes
from 0 to 1, an activated message is entered and the i-th bit QS1 is set to
1.
The corresponding is also valid for Q2.

4-36

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

T1-T32

Initialization inputs for the message texts. The texts with uneven numbers are used
for activated messages; texts with even numbers are used for de-activated messages
(default : empty string)

MT

Initialization input to classify messages. Using the MT input, messages are either
classified as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS1

Suffix for activated messages. The bit position of the message signal is added to the
suffix (example: if message signal is 0x0040, the value 6 is added to the suffix, as
the 6th bit is set).
Value range: 0 <= RS1 <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

RS2

Suffix for de-activated messages. The bit position of the message signal is added to
the suffix.
Value range: 0 <= RS2 <= 32767. The value is limited to 0 if a negative value is entered.
(default : 0)

EN

Block enable. For EN=0, the function block does not output a message.
(default : 0)

IS1

Block input to initiate a message. At the transition of a bit from 0 to 1, a mesage is


output with prefix RP, and the suffix of input RS1
(prerequisite: appropriate bit, QS2 = 0 and EN = 1).
(default : 16#0000)

SM

Input SM can inhibit a message being re-output (for SM=1)


(default : 0)

QN

Displays whether an activated or de-activated message was generated.


(default : 0)

QS1

Display for activated messages. If bit QS1 is set to 1, an activated message has
been entered; the appropriate bit of IS1 changed from 0 to 1
(default : 16#0000)

QS2

Display for de-activated messages. If bit QS2 is set to 1, a de-activated message


was entered; the appropriate bit of IS1 changed from 1 to 0.
(default : 16#0000)

QTS

Block output QTS indicates whether a block was able to be correctly initialized (QTS = 1),
or, after entering a communications error message, became inactive (QTS = 0).
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

17,2
5,7
2,9

4-37

Communication blocks

4.2.5 Message block for activates and de-activated messages with value
4.5.2.1 MERF, MERF_I, MERF_D Message block for an activated and a de-activated
message with measured value
Symbol
MERF
message system name
message text, activated message
message text, de-activated
message type
prefix
suffix, activated message
suffix, de-activated message
message enable
message trigger
save message
measured value

Brief description

GV
S
S
BO
I
I
I
BO
BO
BO
R

CMS
T1
T2
MT
RP
RS1
RS2
EN
I1
SM
X

Q1
Q2
QTS

BO activated message received


BO de-activated message received
BO block status

this function block enters two messages in the message system, each
with a value (Real type); these are initiated by a rising or falling edge
of a binary quantity.
when using this function block, the central block of the message
system (@MSC) and at least one message output block (MSI) must
be configured.
function blocks MERF, MERF_I and MERF_D are identical as far as
the functionality is concerned. They only differ by the data type of
measured value input X:
MERF:
REAL
MERF_I:
INT
MERF_D:
DINT

Mode of operation

NOTE

The message numbers are sub-divided into two stages (classified) using
the RP-, RS1- and RS2 inputs. The prefix is configured at input RP, the
suffix for the activated message at input RS1 and the suffix for the deactivated message at input RS2.
The configuring engineer is responsible in allocating unique numbers for
prefix and suffix to differentiate between the messages.
The message system does not check that unique numbers have been
allocated!
A message with the message text from input T1 and the suffix from input
RSI is output when I1 changes from 0 to 1. At the transition from I1 = 1 to
I1 = 0, a message, with the message text from input T2 and the suffix
from RS2 is output.
Messages are inhibited from the output with block input EN=0.

4-38

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Block output Q1 is set to 1 when I1 changes from 0 to 1. Q2 is set to 1


when I1 changes back from 1 to 0.
Block outputs Q1 and Q2 are reset in the following sampling time, if
SM=0. As long as SM=1, the message is inhibited from being re-output.
Block outputs Q1 and Q2 are always updated independent of block input
EN.
For EN=1, SM=1, Q1=0, and when I1 changes from 0 to 1, an activated
message is entered and Q1 is set to 1.
The corresponding is valid for Q2.
The measured value, available at block input X is transferred as
measured value when the message is generated.
I/O
CMS

Initialization input to specify the message system name. The name is not checked.
A maximum of 6 characters can be entered.
(default : 0)

T1

Initialization input for the message text for the activated message. The message text
may be a maximum of 60 characters.
(default : empty string)

T2

Initialization input for the message text for the de-activated message. The message
text may be a maximum of 60 characters.
(default : empty string)

MT

Initialization input to classify messages. Using the MT input, messages are either
classified as error (MT = 1) or alarm (MT = 0).
(default : 0)

RP

Message prefix.
Value range: 0 <= RP <= 32767. Value is limited to 0 if a negative value is entered.
(default : 0)

RS1

Suffix for an activated message.


Value range: 0 <= RS1 <= 32767. Value is limited to 0 if a negative value is entered.
(default : 0)

RS2

Suffix for a de-activated message.


Value range: 0 <= RS2 <= 32767. Value is limited to 0 if a negative value is entered.
(default : 0)

EN

Block enable. For EN = 0, the function block does not output a message.
(default : 0)

I1

Block input to initiate a message. A message is output with the message text from
input T1 and the suffix from input RS1 when I1 changes from 0 to 1 (prerequisite:
Q1 = 0 and EN = 1).
A message with the message text from input T2 and the suffix from input RS2 is
output when I1 changes from 1 to 0 (prerequisite: Q2 = 0 and EN = 1).
(default : 0)

SM

Input SM can inhibit a message being re-output


(for SM = 1).
(default : 0)

Measured value input.


(default : 0)

Q1

Display for an activated message. For Q1 = 1, an activated message has been entered; I1
changed from 0 to 1.
(default : 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-39

Communication blocks

Q2

Display for a de-activated message. For Q2=1, a de-activated message has been entered;
I1 changed from 1 to 0.
(default : 0)

QTS

Block output QTS indicates whether a block was able to be correctly initialized (QTS=1),
or, after entering a communications error message, became inactive (QTS=0)
(default : 0)

Configuringdata

Computation time [s]


MER
MER_I
MER_D

4-40

T400/PM5
FM458/PM6
T400/PM5
FM458/PM6
T400/PM5
FM458/PM6

10,5
3,5
7,6
2,5
11,1
3,7

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.3

Communications utility, parameter processing


NOTE

Additional information on this group of function blocks, e.g. symbol,


mode of operation, I/O and technical data are provided in the online
help for the particular block.

4.3.1 @DPH Parameter processing central block


Brief description

this central block is used to process the PKW interface of SIMOREGand SIMOVERT drive converters.
PROFIBUS DP or USS can be used to realize the coupling between
SIMADYN D and the drive converters.
a net data structure (PPO type) with a PKW component of 3 or 4
words must be set in the drive converter. This setting must coincide
with the information at input PHL at the PKW central block @DPH.
for PHL=0, a three-word PKW interface is processed. In this case, I/O
XWL, YWL and SPL are not processed (the data entry at XWL can
then be configured as required).
For PHL=1, a 4-word PKW interface is processed. In this case, I/O
XWS, YWS and SPS are not processed (the data entry at XWS can
then be configured as required).
a central block must be configured for each drive, where the PKW
interface is to be evaluated.
using this function block, drive converter parameters can be handled
with parameter values in the word- and double-word formats (no text,
index value 255 is not permissible).
the name configured at the PHS input may not be configured at an
additional PKW central block. Multiple assignment is checked when
the system runs-up and results in an entry in the communications
error field, if the name was already assigned.

4.3.2 DPI Parameter block


Brief description

the parameter tasks for the PKW interface to the drive converters are
formulated using these function blocks; and the responses from the
drive converters are also accepted here.
the function block can only be used in conjunction with the PKW
central block @DPH.
function block DPI can process 2- and 4 byte parameter values.
Depending on the task and response (I/O PR and PRR) either I/O XS,
YS, XL or YL are processed.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-41

Communication blocks

4.4

Communications utility, trace

4.4.1 Analog trace


4.1.4.1 TRCC, TRCC_I, TRCC_D Analog trace acquisition block
Symbol
TRCC
number of recordable trace values
save trace buffer
counter cycles after stop
redording scan
output reduction
trace value input
recording/output
enable
reset
single step processing
single step trigger

Brief description

I
BO
I
I
I
R
BO
BO
BO
BO
BO

TBL
SAV
TDC
CNX
CNY
X
RW
EN
R
SSE
SSS

Y
QTS
YTS

R Trace value output


BO block status
I status

the function block records (traces) an input variable and saves its
characteristic.
the TRCC, TRCC_I and TRCC_D blocks are identical with the
exception of the data type of the trace value input and output:
TRCC:
REAL
TRCC_I:
INT
TRCC_D:
DINT

Mode of operation

Initialization input SAV specifies as to whether the trace buffer is to be


set-up in the local RAM (SAV = 0) or in the battery-buffered RAM
(SAV = 1).
If the trace buffer is located in the battery-buffered RAM, then the
function block re-synchronizes itself to the trace buffer after the system
has run-up. In this case, already recorded values are kept.
If the trace buffer cannot be set-up when the system runs-up, the trace
block flags this by making an entry in the communications error field and
at block output YTS.
Trace record:
A trace is recorded for RW = 0 and EN = 1 in the mode, set at input SSE.
A trace, once started, can be interrupted by setting the EN input to 0. A
trace operation is ended by a signal change from 0 to 1 at the RW input.
If the trace is being made in the single-step mode (SSE = 1), the trace is
immediately terminated. If the trace is being made at SSE = 0
(continuous trace), the TDC block input is evaluated to analyze the
number of cycles after stop (refer below).

4-42

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Post-event phase (TDC):


The number of trace cycles after the trace has been aborted, is specified
at block input TDC. A trace is aborted by changing the signal at input RW
from 0 to 1.
If a post-stop phase is active, a change at block input TDC no longer
influences the actual post-stop phase.
For TDC = 0, there is no post-stop phase; for TDC = 1, after the abort,
one value is sensed, etc.
Continuous/single-step control:
Tracing as well as the output of trace values can be realized using
continuous control or single-step processing (SSE = 0: continuous
control; SSE = 1: single-step processing).
During an actual trace (while a trace is being recorded), or when a trace
is being output, it is possible to toggle between the two control modii.
For continuous control, the trace - or output clock cycle - is oriented to
the sampling time in which the function block was configured.
For the single-step processing (SSE = 1), the trace- and the output cycle
are controlled by block input SSS (transition from 0 to 1 at SSS: traceand output signal).
Scan factors (CNX, CNY):
To trace and output trace values, for the continuous control, scan factors
can be specified at block inputs CNX and CNY which then delay
trace/output (e.g. CNX = 5: trace each 5th time that the function block is
called: CNY = 3: output each 5th time the function block is called).
For CNX = 0, there is no continuous trace; for CNY=0, there is no
continuous trace output.
The values set at the CNX- and CNY inputs are not evaluated for singlestep processing.
Trace output:
A trace output is started for RW=1 and EN=1 in the mode, set at input
SSE. An output once started can be interrupted by setting the EN input to
zero. It is always possible to toggle between output and trace.
Each time the trace buffer has been completely output, it can be output
again by changing the signal at N from 0 to 1.
Resetting:
A trace is reset with R=1. In this case, if trace values are being actively
output or recorded, it is aborted. The trace buffer is re-formatted and
already traced values are no longer accessible.
A reset remains active until input R is again set to 0.
If R is set to 1 when tracing, then this is immediately aborted; in this case,
the already recorded values are no longer available.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-43

Communication blocks

I/O
TBL

The number of trace values which can be acquired is specified at initialization input TBL.
Value range: 0 <= TBL <= 32767. The value is limited to 0 if a negative entry is made.
(default : 0)

SAV

Initialization input SAV is used to define as to whether the trace buffer should be set-up in
the battery-buffered RAM (SAV = 1) or in the local RAM (SAV = 0).
(default : 0)

TDC

Post event counter. This defines the number of operating cycles where values are still
acquired after the trace has been aborted. Value range: 0 <= TDC <= 32767.
The value is limited to zero if a negative value is entered.
(default : 1)

CNX

Scan factor for tracing. This specifies in which operating cycle a value should be
recorded in the trace mode. For CNX = 0, a trace is not made.
Value range: 0 <= CNX <= 32767.
(default : 0)

CNY

Reduction factor for output. This specifies in which operating cycle a value should
be output in the output mode. For CNY = 0, no output is made.
Value range: 0 <= CNY <= 32767. The value is limited to 0 if a negative value is entered
(default : 0)

Input variable to be traced.


(default : 0)

RW

For RW = 0, the system is in the trace mode; for RW = 1, it is in the output mode.
(default : 0)

EN

For EN = 0, the system is neither tracing nor is data being output; for EN = 1,
the block operates according to its other block inputs.
After the trace buffer has been completely output, it can be re-output
using EN = 0 followed by EN = 1.
(default : 0)

For R = 1 the block is in the RESET status (the trace buffer is formatted). It is neither
possible to output nor trace. Values which have already been traced can no
longer be output.
(default : 0)

SSE

Single-step processing. Tracing as well as output can be realized either continuously


or in the single-step mode. For SSE = 0 the function operates continuously; for
SSE = 1, trace or output depends on the signal at block input SSS.
(default : 0)

SSS

Single-step trigger (only effective for SSE = 1). After it has been identified that this
signal has changed from 0 to 1 at this block input (i.e. in one operating cycle,
SSS = 0 and in the next operating cycle, SSS = 1), the block is executed according
to the other block inputs.
(default : 0)

Trace value output.


(default : 0)

YTS

Block output YTS indicates, during normal operation, the actual block status TRCC2
(TRCC4, TRCCF). If a communications error is identified, the communications error
number is available at output YTS.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

QTS

4-44

Block output QTS indicates as to whether the block is operational (QTS = 1)


or, after entering a communications error message, has become inactive (QTS = 0).
(default : 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Configuringdata

Computation time [s]


TRCC; TRCC_D
TRCC_I

T400/PM5
FM458/PM6
T400/PM5
FM458/PM6

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

50,0
16,5
18,0
5,9

4-45

Communication blocks

4.4.2 Single trace


4.2.4.1 @TCP Single trace, central block
Symbol
@TCP
trace name
coupling module name
address parameter transmit
channel mode acknowledge
trace buffer in the SAVE area
output format
group telegrams
ouptput channel length in bytes
No. of words to be traced
trace stop/start
output stop/start
reset
trace value code number for output
number of cycles after stop

Brief description

GV
GV
S
BO
BO
BO
BO
I
I
BO
BO
BO
I
I

TRC
CTS
AT
MOD
SAV
SSF
OUT
CHA
TBL
STA
TBR
R
CID
TDC

QTS
YTS

BO block status
I status

this central block @TCP for a single trace controls trace value
acquisition as well as trace value output.
if a @TCP is configured, then at least one allocated acquisition block
TRP, TRP_B, TRP_I, or TRP_D must be configured (the acquisition
blocks are assigned to the central block via the entry made at the
TRC input). In addition, a TRHI header block can also be configured.
as many @TCP blocks can be configured as required on a CPU, as
long as different TRC input data is used. If the same TRC input is
configured a multiple number of times, the appropriate @TCP
becomes inactive.

Mode of operation

Initialization input (SAV) specifies as to whether the trace buffer is to be


set-up in the local RAM (SAV=0) or in the battery-buffered RAM (SAV=1).
If the trace buffer is located in the battery-buffered RAM, then the
function block re-synchronizes itself to the trace buffer after the system
has run-up. In this case, already traced values are kept.
If the trace buffer cannot be set-up when the system runs-up, the trace
block flags this by making an entry in the communications error field.
The size of the trace buffer corresponds to the entry at the TBL block
input.
If the trace buffer was once set-up in the SAVE area, then the size of the
trace buffer in the SAVE area can no longer be varied:
For SAV = 1, after a system reset, the TBL input is no longer evaluated, if
SAV was equal to 1 at an earlier system run-up.

4-46

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

To start-off with, the block initializes an output channel on the data


interface, via which the recorded trace values are to be output as block in
the form of response telegrams (corresponds to the entry made at inputs
CTS and RT).
The output channel size can be freely selected when trace values are
output (initialization input CHA). If not all of the recorded trace values
have space in one response, the output is broken-up and output in
blocks.
Information is provided with each block as to how many blocks will still be
output until the information is complete.
Tracing:
The trace is controlled via block input STA. When STA changes from a 0
to a 1, the @TCP flags the assigned TRPx that tracing has started..
When a trace is started, all of the values which have still not been output
from previous traces, are lost. During tracing (i.e. for STA=1), values
cannot be output (block input TBR is not evaluated).
Tracing is immediately aborted if block input R is set to 1. In this case,
already traced values are no longer accessible. Tracing is stopped as
long as R is set to 1.
Tracing is only re-started after R has been again set to 0 after STA has
changed from a 0 to a 1.
Normally tracing is terminated when STA changes from a 1 to a 0 or is
continued by the number of processing cycles, specified at block input
TDC (number of cycles after stop).
Output:
The trace output is controlled via block input TBR. Output is started when
TBR changes from a 0 to a 1.
There are 2 output modi which can be output at initialization input OUT:
Group telegram output (OUT = 1)
In this mode, all values of an acquisition block are packed into a
telegram, and output. In this mode, a TRHI block can be configured,
which conditions the parameters for the group telegram.
In order to ensure that a group telegram completely fits into the
configured output channel, the output channel size is checked at the
start of the cyclic phase. If the output channel is too small to output a
group telegram, a communications error message is generated and
the block disables itself.
In this mode, the CID input is not evaluated.
Single telegram output (OUT = 0)
In this mode, only the values of a configured acquisition block are
output. The number at block input CID defines which of the traced
values is to be output.
If the entry at block input CID does not coincide with the CID
initialization inputs at the TRPx acquisition blocks, then a value is not
output.
If a trace output has already started for a valid block input value CID,
the acquired values are combined to form blocks, and output at the

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-47

Communication blocks

configured data interface in the appropriate number of operating


cycles. Only one block of trace values is output per processing cycle.
The output can only be repeated by the input at TBR changing again
from a 0 to a 1.
The trace value output is automatically terminated, if all trace values
to a CID have been output.
The output of another traced value can only be realized after the previous
traced value has been completely output, by appropriately changing the
CID input and when TBR changes again from a 0 to a 1.
During data output (i.e. for TBR = 1), no values can be traced (block input
STA is not evaluated).
If block input R is set to 1 during trace value output, then all of the traced
values are no longer accessible. If R then changes from 1 to 0 (for
TBR=1), no additional trace output is made. The @TCP then acts as if it
has not output a trace.
The trace buffer is re-formatted for R=1, i.e. if a trace or output is running,
this is aborted and the trace buffer is deleted.
I/O
TRC

An ID to identify a single trace should be specified at initialization input TRC. This ID


can be freely selected. However, if several single traces are configured, this ID must
be unique for each single trace.

CTS

The name of the configured module, on which the data interface is located and the output
channel set-up, is specified at initialization connection CTS.

AT

The output channel address is specified at initialization input AT.


The data entry consists of a channel name and optional addresses stages.
(default : empty string)

MOD

The output channel is specified at initialization input MOD (0 = handshake, 1 = select).


(default : 0)

SAV

Initialization input SAV is used to define as to whether the trace buffer should be
set-up in the battery-buffered RAM (SAV = 1) or in the local RAM (SAV = 0).
(default : 0)

SSF

The format, in which the trace values are to be output, is specified at initialization
input SSF (0 = binary-, 1= standard format)
(default : 0)

OUT

Initialization input OUT is used to specify as to whether the values should be output
as group telegram (OUT = 1) or as single telegram (OUT = 0)
(default : 0.0)

CHA

The output channel size is specified at initialization input CHA.


The size is specified in bytes and may not fall below a minimum of 200.
(default : 200)

TBL

The buffer length, which is used to save recorded trace values is specified at
initialization input TBL (interpretted as 32-bit word)
Value range: 0 <= TBL <= 32767. The value is limited to zero if a negative value is
entered.
(default : 0)

4-48

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

STA

Block input for the trace:


Starting the trace:
Transition from 0 to 1
Terminating the trace:
Transition from 1 to 0
(default : 0)

TBR

TBR block input for trace output:

Starts the trace output:


transition from 0 to 1

Terminating the trace output:


transition from m1 to 0

(default : 0)
R

The single trace is reset by setting input R to 1. Already recorded trace values are
lost and the trace buffer is re-formatted.
Resetting remains active, until R is again set to 0.
(default : 0)

CID

The code number of the acquisition block TRP, TRP_B,


TRP_I or TRP_D is selected whose recorded trace values are to be output, via this input.
Value range: 0 <= CID <= 32767. The value is limited to zero if a negative value is
entered.
(default : 0)

TDC

The number of function block calls by which the trace value sensing end should be
delayed is specified at this input (number of cycles after stop).
Value range: 0 <= TDC <= 32767. The value is limited to zero if a negative value is
entered.
(default : 0)

QTS

Block output QTS indicates as to whether the block became operational, error-free
(QTS=1), or, after entering a communications error messages, became inactive
(QTS=0).
(default : 0)

YTS

Block output YTS indicates, during normal operation, the actual block status of
@TCP.
The appropriate error number is output at YTS if the function block has become
inactive after having made an entry in the communications error field.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The function block may not be disabled per task


group

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

50,0
16,5
8,3

4-49

Communication blocks

4.2.4.2 TRHI Single trace, header block


Symbol
TRHI
trace name
number of valid parameters
parameter 0
parameter 1
parameter 2
parameter 3
parameter 4
parameter 5
parameter 6
parameter 7
parameter 8
parameter 9

Brief description

GV
I
DI
DI
DI
DI
DI
DI
DI
DI
DI
DI

TRC
HIA
HI0
HI1
HI2
HI3
HI4
HI5
HI6
HI7
HI8
HI9

QTS
YTS

BO block status
I status

the function block TRHI is used to condition/prepare parameters for


the single trace for the group telegram output mode.
When using this header block, precisely one monitoring block of the
single trace (@TCP) must be configured which has the same trace
identification (input TRC) as this function block. Further, at least one
of the acquisition blocks TRP, TRP_B, TRP_I or TRP_D must be
configured.
Caution : The block TRHI may not be configured a multiple number of
times for a trace system.

Mode of operation

TRHI provides the @TCP the parameters available at its I/O. The number
of valid parameters is specified at input HIA. If input HIA has, for
example, the value 2, then parameters HIO and HI1 are valid. If @TCP
generates a group telegram, then the valid parameters are transferred
into the header of the group telegram.
This block is used to transfer user information into a group telegram. It
should be observed that the number of parameters themselves do not
appear in the group telegram. Thus, to interpret a group telegram, it is
necessary to know the precise number of parameters in the group
telegram.

4-50

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
TRC

Initialization input to assign the names for a monitoring block


@TCP.
(default : 0)

HIA

Number of valid parameters.


Value range: 0 <= HIA <= 9. The value is limited to zero if a negative value is entered.
(default : 0)

HI0-HI9

Parameter 0 - 9 (DI type).


Value range: 0 <= HI0...9 <= 2147483647. The value is limited to zero if a negative value
is entered.
(default : 0)

QTS

Block output QTS indicates as to whether the block is operational (QTS = 1)


or, after entering a communications error message, has become inactive (QTS = 0).
(default : 0)

YTS

If a communications error has been identified, the communications error number is


output at YTS, and TRHI becomes inactive.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

0,2
0,1
0,1

4-51

Communication blocks

4.2.4.3 TRP, TRP_B, TRP_I, TRP_D Single trace acquisition block


Symbol
TRP
trace name GV
trace value code number I
trace value R

Brief description

TRC
CID
X

QTS
YTS

BO block status
I status

TRP function block is used to acquire a trace value.


when using this acquisition block, precisely one central block of the
single trace (@TCP) must be configured, which has the same trace
code number (input TRC) as the acquisition block.
the function blocks TRP, TRP_B, TRP_I and TRP_D have the same
functionality and only differ by the data type of trace value input X:
TRP:
REAL
TRP_B: BOOL
TRP_I:
INT
TRP_D:
DINT

Mode of operation

The TRP is controlled from the associated monitoring block @TCP. The
@TCP flags the TRP as to whether it should read-in its block input X and
copy in the trace buffer.
Trace value X is assigned a code number via block input CID, which is
relevant for the output (refer to monitoring block @TCP). This number
must be unique; it is checked as to whether the code number is
configured a multiple number of times. For multiple configuring, the TRP
becomes inactive.

I/O
TRC

Initialization input to assign names to a monitoring module @TCP.


(default : 0)

CID

Initialization input for a trace value code number.


Value range: 0 <= CID <= 32767. The value is limited to zero if a negative value is entered.
(default : 0)

Trace value input.


(default : 0)

QTS

Block output QTS indicates as to whether the block is operational (QTS = 1)


or, after entering a communications error message, has become inactive (QTS = 0).
(default : 0)

YTS

Block output YTS indicates, during normal operation, the actual block status of TRP.
If a communications error is identified, the communications error number is available
at output YTP and TRP becomes inactive.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

4-52

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Configuringdata

Computation time [s]


(TRP, TRP_B, TRP_I,
TRP_D)

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5,0
1,7
0,9

4-53

Communication blocks

4.4.3 System trace


4.3.4.1 @TCI System trace central block
Symbol
@TCI
trace name
coupling module name
address parameter
channel mode response channel
list in the save area YES/NO
response channle size in bytes
trace buffer length
No. of trace values which can bei
acquired in parallel

Brief description

GV
GV
S
BO
BO
I
I
I

TRC
CTS
US
MOD
SAV
CHA
TBL
NTV

QTS
YTS

BO block status
I status

central block @TCI for the system trace controls and monitors trace
value acquisition as well as trace value output.
if a @TCI monitoring block is configured, then at least one acquisition
@TRI must be configured (the acquisition blocks are assigned to the
monitoring block by the data entry at input TRC).
as many monitoring blocks @TCI as required can be configured on a
CPU, as long as they have different data entries at the TRC input.
Otherwise, the system trace will not be set-up with an already
assigned TRC data input

Mode of operation

Initialization input SAV specifies as to whether the trace buffer is to be


set-up in the local non-buffered RAM (SAV = 0) or in the battery-buffered
RAM (SAV = 1).
If the trace buffer is located in the battery-buffered RAM, then the
function block re-synchronizes itself to the trace buffer after the system
has run-up. In this case, already recorded values are kept.
If the trace buffer cannot be set-up when the system runs-up, the
monitoring block flags this by making an appropriate entry in the
communications error field.
The size of the trace buffer corresponds to the data entry at the TBL
block input.
If the trace buffer was once set-up in the SAVE area, then the size of the
trace buffer in the SAVE area, can no longer bechanged.
For SAV=1, the TBL input is no longer evaluated after a system reset, if
SAV was previously 1 at any earlier system run-up.
The monitoring block then initializes the two channels (one task- and one
response channel) on the data interface via which it is controlled
(corresponding to the CTS- and US inputs).
The following commands and tasks are possible at the monitoring block:

4-54

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

LOAD task:
The inputs to be traced are conditioned for format, address etc. and
assigned to the configured acquisition blocks @TRI. The number of
connections specified in the telegram may not exceed the maximum
possible number of connections which can be acquired (input NTV).
START task:
Trace value acquisition is initiated by the @TRI acquisition block. This
is only possible if a load task was successfully processed prior to this.
END task:
Trace value acquisition is terminated by the acquisition block @TRI (if
required, with delay).
DATA task:
The recorded trace data are requested.
RESET task:
The system trace is reset. If trace value acquisition was already
started it is immediately terminated. Trace values which have been
recorded are lost by a RESET task.
Unknown, invalid or erroneous tasks are rejected by the monitoring
module which issues a corresponding response.
All connection types with formats 1 byte, 2 bytes, 4 bytes and float can be
traced. Strings cannot be acquired. The total number of connection
values which can be acquired in parallel is specified at block input NTV.
To output trace values, the response channel size can be freely selected
(block input CHA).
If not all of the acquired trace values fit at once into a response, then the
output can be sub-divided into blocks.
Each block flags how many blocks are missing until the output has been
completed.
Each block must be explicitly requested with a DATA task; the blocks are
not automatically output.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-55

Communication blocks

I/O
TRC

The system trace ID is specified, which is associated with the acquisition block, at
initialization input TRC.

CTS

The configured name of the module, on which the data interface is set-up, and where
the task- and response channel are located, is specified at initialization input CTS.

US

The address for the task- and response channel is specified at initialization input US.
The data entry consists of a channel name, and, depending on the
coupling type (e.g. DUST1 or SINEC H1), also of 1 or 2 address stages.
(default : empty string)

MOD

The response channel mode is specified at initialization input MOD (0 = handshake,


1 = select). The mode of the task channel is permanently set to handshake and
cannot be changed.
(default : 0)

SAV

Initialization input SAV is used to define whether the administration structures of the
@TCI are to be set-up in the buffered RAM (SAV = 1) or in the non-buffered RAM
(SAV = 0)
(default : 0)

CHA

The size of the response channel is selected at initialization input CHA. The size is
specified in bytes and may not exceed 200.
(default : 200)

TBL

The length of the buffer, which is used to save the recorded trace values, is specified
at initialization input TBL (interpretted as 32-bit words).
Value range: 0 <= TBL <= 32767. The value is limited to 0 if a negative value is
entered.
(default : 0)

NTV

Initialization input to specify the total number of connections (inputs) which can be
recorded for the values
Value range: 0 <= NTV <= 32767. The value is limited to 0 if a negative value is
entered.
(default : 0)

QTS

Block output QTS indicates as to whether the block is operational (QTS = 1) or, after
entering a communications error message, has become inactive
(QTS = 0).
(default : 0)

YTS

Block output YTS indicates, during normal operation, the actual status of the @TCI block.
If the function block became inactive after an entry into the communications error field,
then the appropriate error number is output at YTS.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Configuringdata

4-56

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

50,0
16,5
8,3

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.3.4.2 @TRI Acquisition block system trace


Symbol
@TRI
trace name GV

Brief description

Mode of operation

TRC

QTS
YTS

BO block status
I status

acquisition block @TRI acquires the values of all of the inputs


assigned to it.
when using this acquisition block, precisely one central block of the
system trace (@TCI) should be configured which has the same trace
code number (input TRC) as this function block.
further, for each configured system trace, this function block can only
be used once for each configured sampling time.
The associated @TCI function block tells this function block how many
and which input values it should trace and with which scan factor. In
addition, this function block @TRI is flagged at the start and stop of data
acquisition via the monitoring module.
During each operating cycle, the acquisition block traces precisely one
value of each input assigned to it, as long as the trace value acquisition
has been activated by @TCI central block. Otherwise, data is not traced.

I/O
TRC

The system trace ID, with which the acquisition block is associated, is specified at
initialization input TRC.

QTS

Block output QTS indicates as to whether the block is operational (QTS = 1)


or, after entering a communications error message, has become inactive
(QTS = 0).
(default : 0)

YTS

Block output YTS indicates, during the operation, the actual block status of @TRI.
If a communications error is identified, the communications error number is output at
YTS and the function block becomes inactive.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for D7-SYS")
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The function block may not be disabled per task


group

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

16,0
5,3
2,7

4-57

Communication blocks

4.5

Communications utility, time of day synchronization

4.5.1 RTCABS Date and time output


Symbol
RTCABS
YYR
YMO
YDA
YHR
YMI
YSE
YMS

I
I
I
I
I
I
I

year
month
day
hour
minutes
seconds
milliseconds

Brief description

This function block outputs the system time as date (year, month, day)
and time of day (hours, minutes, seconds, milliseconds).

Mode of operation

The function block reads the actual time from the system, converts it and
outputs it as date (YYR, YMO, YDA) and time of day (YHR, YMI, YSE,
YMS).

I/O
YYR, YMO,
YDA

The actual date is output as year, month and day.


(default : 0)

YHR, YMI,
YSE, YMS

The actual time of day is output as hours, minutes, seconds and milliseconds
(default : 0)

Configuringdata

4-58

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

7,0
2,3
1,2

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.5.2 RTCREL Relative time output


Symbol
RTCREL
CSH
CSL
CSM

W counter, sekonds (high)


W counter, sekonds (low)
W counter, 1/10 millisekonds

Brief description

Function block to output the system time, referred to 01.01.1988 00:00.

Mode of operation

The RTCREL function block outputs the actual system time.


The system time is specified in seconds and 1/10 milliseconds. The
system time is output at block outputs CSH, CSL and CSM.

I/O
CSH and
CSL

The number of seconds, referred to 01.01.1988 00:00 is output.


(default : 16#0000)

CSM

The number of 1/10 millseconds referred to a second is output.


(default : 16#0000)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5,0
1,7
0,9

4-59

Communication blocks

4.6

SIMATIC Operator Panel

4.6.1 S7OS OS-Communication


Symbol
S7OS
enable
coupling module name
address parameter
No. of OS
Telegram format

Brief description

BO
GV
S
I
I

EN
CTS
US
NOS
TLF

ENO
BO enable output
S7OS
QTS
BO block status
YTS
I status display

The S70S OP function block is used to handle and monitor block


connections, which were provided when configuring.
The function block processes and responds to tasks issued by display
devices (SIMATIC OPs, WinCC, etc.).
The sampling interval should be 32 ms <= TA <= 256 ms. If other
sampling times are selected, this results in longer response times or a
higher system load level.
One function block is required for each CPU, which is to be addressed by
a display device.

Mode of operation

The S7OS function block initializes and processes the number of


communication connections to display devices.
The function block provides the necessary SAVE area to save OP value
changes. The configured initialization values are entered in the SAVE
area at the first run-up. When restarting, the values are retrieved from the
SAVE area.
The card programming date is used to differentiate between a first run-up
and restart. If the program memory is re-loaded, this results in a first runup, even if the program itself was not changed.
All new display device tasks are processed and the response send per
sampling cycle. The response time is defined by the selected sampling
time.
The computation time depends on the number of tasks, the time between
them and their contents.

4-60

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
EN

Enables block processing. For EN=1, the block is processed, for EN=0, block processing is
inhibited.
(default value: 1)

CTS

Initialization input for configured coupling module names. Designates the module (and
optionally, connectors X01, X02 or X03), to which the OP is connected.
(default value: -)

US

Initialization input for addressed data. The information consists of a channel name,
comprising 6 characters and depending on the coupling type also 1 or 2 address stages.
(default value: empty string)

NOS

Initialization input for the number of display devices, which access the CPU.
(default value: 1)

TLF

Telegram format; the net data size (PDU length) of a telegram can be defined here:
TLF = 0 the longest possible PDU is automatically set
TLF = 1 PDU length = 112 bytes
TLF = 2 PDU length= 240 bytes
TLF = 3 PDU length= 480 bytes
TLF = 4 PDU length= 960 bytes
(Default: 0)

ENO

Output which displays the enable status. For ENO=1, the block was processed error-free in
the last cycle. For ENO=0, block processing is inhibited, or the function block has identified
an error condition.
(default value: 0)

QTS

Output to display the correct block initialization (QTS=1). For QTS=0, the block became
inactive after a communications error message was entered.
(default value: 0)

YTS

Output to display all temporary errors/faults, irreparable errors/faults or channel


initialization errors associated with the data interface.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default value: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

40,0
13,2
6,6

4-61

Communication blocks

4.6.2 S7IA User data area "interface area"


Symbol

S7IA

enable
user data area
synchr. time interval
OP clock setting
use summer time
time correction value in minutes

Brief description

BO
GV
I
BO
BO
I

S7IA

EN
XDB
XMI
SET
UST
TCV

ENO
QTS
YTS
YDB
QLB
QOM

BO
BO
I
I
BO
BO

enable output
block status
status display
DB No.
life bit
OP operating mode

The S7IA function block is used to set the SIMATIC OP clock from
SIMADYN D.
The function block includes a user data area with 16 words for the
interface area.
It is only practical to have a maximum of one S7IA for each connected
OP, as only one interface area can be defined for each CPU in
ProTool/Lite.

Mode of operation

The function block emulates a SIMATIC data block (DB) as user data
area for 16 word (16 bit) control tasks. This user data area is required to
synchronize the clock time.
The data block receives the number, which was specified at input XDB
when generating a "connection, global operand" (margin connection) in
addition to a symbol name. Addressing when configuring the OP can be
realized using these symbol names (with ProTool/Lite).
Cyclic FB processing can be enabled using input EN.
When the connected OP restarts, the OP clock is automatically
synchronized with the current SIMADYN D system time. When the OP
restarts, this is identified via the interface area.
The OP clock can be automatically synchronized with the SIMADYN D
system time at periodic intervals, via input XMI.
The OP clock is synchronized with the CPU system time with a positive
edge at input SET.
Inputs UST and TCV can be used to add a correction value in minutes to
the time transferred at OP (e.g. summer/winter time correction).

4-62

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
EN

Enables cyclic block processing. For EN=1, the block is processed. For EN=0, block
processing is inhibited.
(default value: 1)

XDB

Initialization input to specify the symbol name and number of the "virtual" SIMATIC DBs
for the user data area to the set-up for control tasks (interface area).
(default value: -)

XMI

Input to define the time intervals in which the OP clock is resynchronized with the actual
SIMADYN D system time, i.e. time synchroniziation. The time interval is specified in
minutes. One minute is the smallest time interval for synchronization.
Cyclic time synchronization is deactivated when a "0" is entered at this input (or less
than "0") ; this does not influence the time synchronization which occurs once when the
OP runs-up.
The OP clock is set for XMI0.
(default value: 60)

SET

This input is used to immediately set the OP clock using a positive edge.
In order not to overload the OP, there should be a minimum of 5 seconds between two
setting operations.
(default value: 0)

UST

For UST=1, the correction value, which is specified at connection TCV, is added to the
system time and sent to the connected OP.
(default: 0)

TCV

Enters the time correction value in minutes. This time correction value is added to the
system time depending on connection UST and sent to the connected OP.
(default: 0)

ENO

Output to display the enable status. For ENO=1, the block was processed, error-free in
the last cycle. For ENO=0, block processing is inhibited, or the function block has
identified an error condition.
(default value: 0)

QTS

This output displays that the block has been correctly initialized (QTS=1). For QTS=0,
the block became inactive after a communications error signal.
(default value: 0)

YTS

This output displays the error number when an error or fault condition occurs or for
status display.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default value: 0)

YDB

This output which specifies the DB number of the interface area. .


(default value: 0)

QLB

This output provides the life bit from the interface area. The OP inverts the life bit every
second. Thus, it can be immediately identified in the SIMADYN D software whether
there is still a connection to the OP (provided EN = 1).
(default value: 0)

QOM

This output provides the "OP mode" bit from the interface area. OP sets the bit to "1", if
the operator places the OP into the "offline" mode.
(default value: 1)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-63

Communication blocks

Configuringdata

4-64

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

6,1
2,0
1,0

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.6.3 S7EMA User data area "event messages"


Symbol
S7EMA
enable
user data area
event message word 1 (DBW 0)
event message word 2 (DBW 2)
event message word 3 (DBW 4)
event message word 4 (DBW 6)
event message word 5 (DBW 8)
event mess. word 6 (DBW 10)
event mess. word 7 (DBW 12)
event mess. word 8 (DBW 14)

Brief description

BO
GV
W
W
W
W
W
W
W
W

EN
XDB
E0
E2
E4
E6
E8
E10
E12
E14

S7EMA

ENO
QTS
YTS

BO enable output
BO block status
I status display

This function block is used to prepare and condition event messages for
a SIMATIC OP.
The function block includes a user data area with 8 words.
By connecting a type B_W function block in front of it, binary messages
can be entered into the appropriate event message word.

Mode of operation

This function block emulates a SIMATIC data block (DB) as user data
area for event messages. It is 8 words long (16 bit).
The data block receives the number, which was specified, in addition to a
symbol name at input XDB when generating a "connection, global
operand" (margin connection). Addressing when configuring the OP (with
ProTool/Lite) can be realized using these symbol names.
Cyclic function block processing can be enabled using input EN. If
processing is not enabled, the user data area is not updated with the
value of the event message words (inputs).
As many function blocks of this type can be configured as required,
however SIMATIC OPs only support a limited number of operating
messages. For an OP7, the total operating message area can be a
maximum of 32 words, distributed over a total of 4 user data areas.
The computation time required in cyclic operation is minimum, as the
input quantities are only copied-over into the associated user data area
when actually required (i.e. when an OP read accesses the user data
area).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-65

Communication blocks

I/O
EN

Enables cyclic block processing. For EN=1, the block is processed. For EN=0, block
processing is inhibited.
(default value: 1)

XDB

Initialization input to specify symbol names and number of the "virtual" SIMATIC DBs for
the user data area to be set-up for operating messages.
(default value: -)

Ex (with x = Input for the operating message word x. These operating message words directly supply
0, 2, 4.., 14) the associated user data area with values.
The following assignment is valid (from the perspective of ProTool/Lite):
input E0 -> DBW 0
input E2 -> DBW 2
input E4 -> DBW 4
...
input E14 -> DBW 14
(default value: 0)
ENO

This output displays the enable status. For ENO=1, the block was processed, error-free in
the last cycle. For ENO=0, block processing was inhibited, or the function block has
identified an error/fault condition.
(default value: 0)

QTS

This output displays the correct block initialization (QTS=1). For QTS=0, the block became
inactive after a communications error message.
(default value: 0)

YTS

This output displays the error number when an error/fault condition occurs.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default value: 0)

Configuringdata

4-66

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

0,8
0,3
0,2

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.6.4 S7AMA User data area "alarm messages"


Symbol
S7AMA
enable
user data area
alarm message word 1 (DBW 0)
alarm message word 2 (DBW 2)
alarm message word 3 (DBW 4)
alarm message word 4 (DBW 6)
alarm message word 5 (DBW 8)
alarm message word 6 (DBW 10)
alarm message word 7 (DBW 12)
alarm message word 8 (DBW 14)
PLC acknow. word 1 (DBW 16)
PLC acknow. word 2 (DBW 18)
PLC acknow. word 3 (DBW 20)
PLC acknow. word 4 (DBW 22)
PLC acknow. word 5 (DBW 24)
PLC acknow. word 6 (DBW 26)
PLC acknow. word 7 (DBW 28)
PLC acknow. word 8 (DBW 30)

Brief description

BO
GV
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W

EN
XDB
A0
A2
A4
A6
A8
A10
A12
A14
S16
S18
S20
S22
S24
S26
S28
S30

S7AMA

ENO
QTS
YTS
Y32
Y34
Y36
Y38
Y40
Y42
Y44
Y46

BO
BO
I
W
W
W
W
W
W
W
W

enable status
block status
status display
OP acknow.word 1 (DBW 32)
OP acknow.word 2 (DBW 34)
OP acknow.word 3 (DBW 36)
OP acknow.word 4 (DBW 38)
OP acknow.word 5 (DBW 40)
OP acknow.word 6 (DBW 42)
OP acknow.word 7 (DBW 44)
OP acknow.word 8 (DBW 46)

This function block is required to prepare and condition alarm messages


(and their acknowledgments) for a SIMATIC OP.
The S7AMA emulates three user data areas, each with 8 words. One
user data area for alarm messages, an OP acknowledge area and an
acknowledge area for alarm messages from the software ("acknowledge
PLC"). The three user data areas are located in one data block (DB) one
behind the other.
The DB is structured as follows to replicate the user data areas from the
perspective of ProTool/Lite:
User data area

Initial address

Length

Alarm messages

DBW 0

8 words

Acknowledge PLC

DBW 16

8 words

Acknowledge OP

DBW 32

8 words

By connecting a type B_W function blocks in front, fault/error message


words and PLC acknowledge words can be supplied from the software
using binary quantities.
By connecting type W_B function blocks after the S7AMA, OP
acknowledge words can be split into binary quantities.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-67

Communication blocks

Mode of operation

The S7AMA emulates a SIMATIC data block as user data area for
fault/error messages, PLC fault acknowledgments and OP fault
acknowledgments. The length is 3*8 = 24 words (16 bit).
The DB receives the number, which was specified, in addition to a
symbol name, at input XDB when generating a "connection, global
operand" (margin connection). Addressing when configuring the OP (with
ProTool/Lite) can be realized using these symbol names.
Cyclic function block processing can be enabled using input EN.
The user data area for fault/error messages is updated cyclically with the
fault/error message word values (inputs).
A fault is signaled by a set bit in one of the fault message words. If a new
fault occurs, i.e. when a bit changes from "0" to "1", the associated
acknowledge bit in the user data area "acknowledge OP" is reset. When
a fault is removed, i.e. when a bit changes from "1" to "0", the associated
acknowledge bit is reset in the user data area "acknowledge PLC".
This behavior is clearly shown in the following diagram:

Fig: Pulse diagram, fault message area/acknowledge area

SMLD: Bit of alarm message word.


Sx: Bit of PLC Acknowledgement word.
QSPS: Bit of PLC Acknoledgement area.
ACK: Acknoledgement by pushing the ACK button on OP.
QOP: Bit of OP Acknoledgement area.
As many function blocks of this type can be configured, however
SIMATIC OPs only support a limited number of fault messages. For an
OP7, the fault message area and the acknowledge area may only be in
total, a maximum of 32 words, distributed over a maximum of 4 user data
areas.

4-68

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
EN

Enables the block processing. For EN=1, the block is processed. For EN=0, block
processing is inhibited.
(default value: 1)

XDB

Initialization input to specify symbol names and number of the "virtual" SIMATIC-DBs for
the user data area to be set-up for operating messages.
(default value: -)

Ax
(with x = 0,
2, 4.., 14)

Input for fault message word x. These fault message words supply the associated user
data area directly with the values.
The following assignment is valid (from the perspective of ProTool/Lite):
connection Ax -> DBW x
(default value: 0)

Input for the PLC acknowledge word x. The associated fault message is acknowledged by
Sx
(with x = 16, the CPU (i.e. from the software) with the positive edge of a bit.
18,.., 30)
The following assignment is valid (from the perspective of ProTool/Lite):
connection Sx -> DBW x
(default value: 0)
ENO

Output to display the enable status. For ENO=1, the block was processed, error-free in the
last cycle. For ENO=0, block processing is inhibited, or the function block has identified an
error.
(default value: 0)

QTS

Output to display the correct block initialization (QTS=1). For QTS=0, the block became
inactive after a communications error message.
(default value: 0)

YTS

Output to display the error number when a fault condition occurs.


For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default value: 0)

Output for OP acknowledge word x. A set bit signifies that the OP has acknowledged the
Yx
(with x = 32, associated fault message.
34,.., 46)
The following assignment is valid (from the perspective of ProTool/Lite):
connection Yx -> DBW x
(default value: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

11,0
3,6
1,8

4-69

Communication blocks

4.6.5 S7FKA User data area "function key area"


Symbol
S7FKA
enable BO
user data area GV
clear keyboard communication bit BO

F S7FKA

EN
XDB
CLR

ENO
QTS
YTS
BO
B1
B2
B3
B4
B5
B6
B7
B8
B9
B10
B11
B12
B13
B14
KCB

BO
BO
I
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO

enable output
block status
status display
key bit 0
key bit 1
key bit 2
key bit 3
key bit 4
key bit 5
key bit 6
key bit 7
key bit 8
key bit 9
key bit 10
key bit 11
key bit 12
key bit 13
key bit 14
keyboard communication bit

Brief description

This function block is required to evaluate the OP function keys by the


SIMADYN D software. The function key <-> key bit assignment is
realized when configuring the OP with ProTool/Lite.

Mode of operation

This function block emulates a SIMATIC data block (DB) as user data
area for the "function keyboard image". A user data area is one word long
(16 bits).
The data block receives the number, which, in addition to a symbol
name, was specified at input XDB when generating a "connection, global
operand" (margin connection). Addressing when configuring the OP (with
ProTool/Lite) can be realized using these symbol names
Cyclic function block processing can be enabled using input EN.
The keyboard communication bit (output KCB) can be reset via input
CLR.
As many function blocks of this type can be configured as required,
however SIMATIC OPs only support a limited size of a function keyboard
image. For an OP7, the function keyboard image can be, in total, a
maximum of 4 words, distributed over a maximum of 4 user data areas.

4-70

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
EN

Enables cyclic block processing. For EN=1, the block is processed, for EN=0, block
processing is inhibited.
(default value: 1)

XDB

Initialization input to specify symbol names and number of the "virtual" SIMATIC DBs for
the "function keyboard image" user data area to be set-up.
(default value: -)

CLR

Input to reset output KCB (keyboard communication bit). The output is set to "0" with a
positive edge at this input.
(default value: 0)

ENO

Output to display the enable status. For ENO=1, the block was processed, error-free in the
last cycle. For ENO=0, block processing is inhibited, or the function block has identified an
error condition.
(default value: 0)

QTS

Output to display the correct initialization of the block (QTS=1). For QTS=0, the block
became inactive after a communications error message was entered.
(default value: 0)

YTS

This output displays the error number when an error/fault condition occurs.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default value: 0)

Bx
(with x =
0...14)

Output for the appropriate keyboard bit. The assignment of the keyboard bit to the function
key is realized when the OP is configured using ProTool/Lite.
(default value: 0)

KCB

Output, keyboard communication bit. This bit is set each time the keyboard image is
transferred from the OP to the CPU.
(default value: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

7,5
2,5
1,3

4-71

Communication blocks

4.7

PROFIBUS DP coupling

4.7.1 DIAPRO Diagnostics DP (PROFIBUS DP coupling)


Symbol
DIAPRO
CS7 module name.connector
lowest slave address
highest slave address
current selction

Brief description

GV
I
I
I

CTS
ST1
ST2
SEL

OK
D01
D02
D03
D04
D05
D06
D07
D08
QTS
YTS

BO
W
W
W
W
W
W
W
W
BO
I

current diagnostics valid


diagnostic bytes 2 and 1
diagnostic bytes 4 and 3
diagnostic bytes 6 and 5
diagnostic bytes 8 and 7
diagnostic bytes 10 and 9
diagnostic bytes 12 and 11
diagnostic bytes 14 and 13
diagnostic bytes 16 and 15
block status
status

this function block outputs diagnostic data from a PROFIBUS DP


master (SS52).
only an SS52 module is permissible as communications module at
input CTS. The function block may be configured once for each SS52
module.
the function block should be configured in a slow sampling time
(e.g. 300 ms).

Mode of operation

The block initializes a slave diagnostics channel for each configured


slave and additionally an overview diagnostics channel in the data
interface to the SS52 module (a diagnostics channel is only initialized
after first being selected at input SEL).
In normal operation, the block only processes one single diagnostics
channel.
Diagnostics data are read-out in two steps:
1. a certain block of diagnostics data is selected using input SEL.
2. Wait for OK = 1, and the valid diagnostic data are output at D01 to
D08.
If SEL is not changed, then the selected diagnostic data is output
cyclically.

4-72

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

A detailed description of the I/O SEL and D01 to D08 is provided in the
Configuring Instructions Communications, Chapter "PROFIBUS DP
coupling".

I/O

CTS

CS7 module name and slot in which the SS52 module is inserted.
(initialization input)

ST1, ST2

PROFIBUS address range for slave stations for which diagnostics data is to be output.
If the address range is restricted, this saves valuable memory resources.
The following must be valid:
3 <= ST1 <= ST2 <= 123
(initialization input)
(default : 3, 123)

SEL

Selects which diagnostic data is currently being displayed.


0: no diagnostics output,
3...123: diagnostics from the slave with the appropriate station number,
126: system diagnostics,
127: data transfer list
128: master status
1003...1123: slave diagnostics, part 2
(default : 0)

OK

Actual diagnostic data are valid.


(default : 0)

D01...D08

Diagnostic data (refer to the Configuring Instructions, PROFIBUS DP coupling).


(default : 16#0000)

QTS

Operating status of the function block. For QTS = 0, an irreparable error is


present; for QTS=1, the function block is operating error-free.
(default : 0)

YTS

Outputs errors, which involve the block itself or the current diagnostics channel.
YTS = 0 : no error.
YTS = 1 : illegal data entry at connection SEL.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

30,5
10,1
5,1

4-73

Communication blocks

4.7.2 SYNPRO SYNC/FREEZE DP (PROFIBUS DP coupling)


Symbol
SYNPRO
CS7 module name.connector
slave group selection
SYNC
FREEZE
reduction
enable

Brief description

GV
I
BO
BO
I
BO

CTS
SEL
SYN
FRE
CNX
EN

SOK
QTS
YTS

BO SYNC/FREEZE completed
BO block status
I status

this function block transmits SYNC- and/or FREEZE commands to a


group of slaves via the PROFIBUS DP coupling.
the only communications module which is permissible at input CTS is
an modul and a connector with PROFIBUS functionality (CS7 with
SS52, CP50M0, FM458-1 DP). The function block may be configured
only once for each Interface.
the data entries at inputs SEL, SYN and FRE must be harmonized
with the COM PROFIBUS (CS7/SS52, CP50M0) and HWKonfig
(FM458-1 DP) configuring.
additional information, especially regarding the consistency check,
refer to the: Configuring instructions communications Chapter
"PROFIBUS DP coupling.

Mode of operation

The command is initiated by the basic clock cycle or in the system mode
of the function block. If the block is configured in sampling time T1, and
T1=T0 is selected, then the command is initiated with the basic clock
cycle; in all other cases, the command is initiated in the block system
mode.
Output SOK is used to support the consistency check:
If only SYNC commands (FRE = 0) are configured, then output SOK is
only set to "0" in the sampling time after the SYNC command has been
initiated. SYNPRO must be configured before the transmit blocks to be
inhibited.
If FREEZE commands are also configured, (FRE = 1 and CNX > 1),
output SOK is already set to "0" one sampling time before the command
is initiated. SYNPRO must be configured after all of the receive- and
transmit blocks to be inhibited.

4-74

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
CTS

Module name and slot in which the SS52 module is inserted or connector X3 of the
FM458-1 DP.
(initialization input)

SEL

Selects the slave group to which the SYNC/FREEZE command is transmitted. Slave
groups are configured using COM PROFIBUS (CS7 with SS52, CP50M0) and HWKonfig
(FM458-1 DP). Only one group may be specified.
(initialization input)
(default : 1)

SYN

Specifies whether SYNC commands are transmitted to the slaves. SYNC commands are
transmitted for SYN=1.
(initialization input)
(default : 0)

FRE

Specifies whether FREEZE commands are transmitted to the slaves.


FREEZE commands are transmitted for FRE=1.
(default : 0)

CNX

Scan factor to initiate the SYNC/FREEZE command:


For CNX > 1, a SYNC/FREEZE command is initiated at each CNXth cycle.
For CNX = 1 only a SYNC, but no FREEZE command is initiated in each
processing cycle (FRE=0 is mandatory).
It is not permissible that CNX = 0.
(initialization input)
(default : 1)

EN

For EN=0, the configured SYNC/FREEZE commands are transmitted to the slaves.
For EN=0, the SYNC/FREEZE functionality is disabled; data transfer is then
unsynchronized.
(default : 0)

SOK

SYNC/FREEZE processing completed. For SOK = 0, the last command hasn't


been completely processed; for SOK = 1 it has been completed. With this input,
receive- and transmit blocks can be inhibited/enabled (consistency check). For
EN = 0, SOK is always set to 1.
(default : 0)

QTS

Operating status of the function block. For QTS = 0, an irreparable error


condition is present; for QTS=1, the function block is operating error-free.
(default : 0)

YTS

Output of errors which involve the block.


YTS = 0 : No errors.
YTS = 1 : SYNC/FREEZE command was initiated, although the previous command was
still not completed. (=> increment CNX)
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-75

Communication blocks

Configuringdata

4-76

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

10,0
3,3
1,7

Can be configured in

Cyclic tasks

Executed in

Initialization mode
System mode
Normal mode

Special features

The function block may not be disabled per task


group

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.8

Central coupling blocks


NOTE

Additional information on this group of function blocks, e.g. symbol,


mode of operation, I/O and technical data are provided in the online
help for the particular block.

4.8.1 @CPN Local coupling central block


Brief description

this function block is responsible in initializing and monitoring the local


CPU coupling. For this coupling the interface is located on the CPUlocal RAM.
the function block may only be configured once for each CPU module,
as each CPU has only one local coupling. If the function block is
configured a multiple number of times, this is identified during
initialization, and results in an entry in the communications error field.
the function block may only be configured in a sampling interval
32 ms <= TA <= 256 ms. Otherwise, an entry is made in the
communications error field.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-77

Communication blocks

4.9

Pointer-based communications

4.9.1 CPY_P Copying block for pointer-based processing


Symbol
CPY_P
PtrSourceBuffer DW
OffsSourceBuffer DI
PtrDestinBuffer DW
OffsDestinBuffer DI
Length,Number Bytes to be copied DI
Enable/Copy-Command BO

PT1
OF1
PT2
OF2
LEN
EN

QF
YF

BO Error-Status Block
W StatusInfo Block

Brief description

Copies an adjustable number of bytes between data buffers (e.g.


telegram buffers, data block), which can be addressed using pointers.

Mode of operation

The block copies bytes from a source buffer into a target buffer.
To do this, it uses the pointer interface from the source and target buffer.
Using offset data, the memory area, which is to be copied, can be
selected within the larger buffer.

Associated blocks

The following blocks can be connected to this block (pointer input):


CRV_P, CTV_P, DB_P
S7RD_P, S7WR_P
BRCV

I/O
Default:
PT1

PtrSourceBuffer
Pointer to the source telegram/data buffer from which data is to be copied.

16#00000000

The CFC connection can be changed online.


The connection also includes monitoring information to ensure correct
configuring.
OF1

OffsSourceBuffer
Offset to address the start of the buffer area, which is to be copied.

Max. offset: Buffer length number of bytes to be copied


PT2

PtrDestinBuffer
Pointer to the destination telegram/data buffer into which data is to be copied.

16#00000000

The CFC connection can be changed online.


The connection also includes monitoring information to ensure correct
configuring.
OF2

OffsDestinBuffer
Offset to address the start of the buffer area in which data is to be deposited.

Max. offset: Buffer length number of bytes to be copied


LEN

Length, number of bytes to be copied


Number of bytes to be copied In this case, the size of the destination
buffer should be observed.

EN

Enable/copy command
Enables the block The specified data bytes are copied at each call.

4-78

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

QF

Error status block


QF=1: There is an error; for details, refer to YF

YF

Status info block


as for the DRD block

Configuring data

0
16#0000

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / CPU551

Can be inserted online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block must be configured in the same


sampling time as the blocks, connected via the
pointer interface (CFC connection via connections
PTR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9,0
3,0
1,5

4-79

Communication blocks

4.9.2 CRV_P Telegram block, receive with pointer


Symbol
CRV_P
ComPartner (Interface, Module) GV
AdrName.Number S
Mode Receive S
Enable BO
Monitor-Time R
TlgLength=Buffersize (bytes) I

Brief description

CTS
AR
MOD
EN
TMX
NBY

PTR
QTS
QT
YEV
YTS

DW PtrBuffer
BO OK-Status Block
BO TimeOverrun (no Tlg.in TMX)
W TlgStatus, Coupling Status
W InfoTlgStatus, additional Info

This block receives a telegram and provides the data to the write blocks
(DRD..., CPY_P) via the pointer interface.
The function and mode of operation corresponds, with the exception of
the pointer interface, to that of block CRV.

Mode of operation

After a telegram has been received from a serial or parallel interface, the
block outputs the address of the associated alternating buffer and
updates its status displays.
In so doing, the selected buffer length must match the telegram length.
If the block detects (configuring) errors, then it disables itself and enters a
communications error into the diagnostics buffer.
Receive operation starts after the interface, on the module, configured at
connection CTS, has been enabled and the existence of the appropriate
coupling partner determined (refer to diagnostics output YEV). This can
take several sampling times.
When PROFIBUS-DP stations or SIMATIC-CPU are connected, a byte or
word rotation is principally not made. A rotation which may be required is
set using the SWP connection of the read/write blocks.
The computation time essentially depends on the telegram length and
the hardware platform. A base computation time of 20 s can be
considered as nominal value for the FM458 / PM6 as well
as approx. 0,05 s/byte.
The computation time, specified in the technical data, should be
appropriately interpreted!
Time monitoring: If no new/valid data is received within the telegram
After
failure time, specified at output TMX, output QT is set to 1.
switch-on, the time monitoring is initially active and QT = 0. It is only
activated after the communications have been commissioned, i.e. after
several telegrams have been received.

Associated blocks

4-80

The following blocks can be connected to this particular block (pointer


output):
CPY_P,
DRD, DRD_8, DRD_8D, DRD_8I, DRD_BY, DRD_D, DRD_I

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
Default:
CTS

ComPartner (Interface, Module)


Selects the transport system, i.e. the serial or parallel interface. The module
name and, if required, the connector, in accordance with HW Config, should
be entered.
Configuring note: Select the connection, righthand mouse key: "Interconnect
to operand", select from the list field
Initialization connection: Changes are only accepted after a new start!

AR

AdrName.Number
Any, unique name can be specified as well as a channel number. The number
establishes the required connection (reference) between the sender and
receiver;
For additional details, refer to the Manual "System- and communication
configuring D7-SYS ", Kapitel "Communications utility process data".

"empty string"

"System- and communication configuring D7-SYS ", Kapitel "Communications


utility process data"
The address depends on the interface type (protocol). Generally, the channel
number of the sender and receiver must match.
Initialization connection: Changes are only accepted after a new start!
MOD

Mode Receive
"R" = Refresh:
Received data, for relatively slow evaluation, can be overwritten; is the typical
setting

'R'

"H" = Handshake: As long as received data has still not been read-out, no new
telegram is accepted.
Initialization connection: Changes are only accepted after a new start!
EN

Enable
Enables the block. The block is not processed for EN=0.

TMX

Monitor-Time
A new telegram must have been received within the specified time. If a
telegram has not been received with this time: QT=1; YEV=fault code

NBY

TlgLength = Buffer size (bytes)


Defines the buffer length (in bytes) for telegrams which have been received.
NBY must correspond to the telegram length.

PTR

PtrBuffer
Pointer to the telegram buffer and monitoring information.
The output is connected with PTR inputs of other pointer-based
communication blocks, which read-out received data.

QTS

OK-Status block
Status display about incorrect initialization and processing of the block.
QTS=0: The block does not process data; a communications-error was
entered in the diagnostics buffer (as well as, for example, the display of "CF"
LED, flashing "C")
QTS=1: The block is operating error-free

QT

Time Overrun (no Tlg.in TMX)


QT=1: A telegram was not received in the specified time (TMX).
QT=0 as soon as a telegram is again received.

YEV

TlgStatus, Coupling Status


Status of the coupling, for example, whether a telegram was received within
the last sampling time.

1
1000 ms

16#00000000

16#0000

For an explanation refer to the refer to the Manual "System- and


communication configuring D7-SYS ", Kapitel "Communications utility process
data".

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-81

Communication blocks

YTS

InfoTlgStatus, additional Info


This is a detailed status display; for the appropriate values refer to: D7-SYS
Online Help "Help on events". (Press the F1 key in the CFC and call the topic
"Help on events" under "CFC for D7-SYS".)

Configuring data

4-82

16#0000

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / CPU551

60 + 0,05 per Byte


20 + 0,05 per Byte
10 + 0,05 per Byte

Can be inserted online

No

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block must be configured in the same sampling


time as the blocks, connected via the pointer
interface (CFC connection via connections PTR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.9.3 CTV_P Telegram block, sending with pointer


Symbol
CTV_P
ComPartner (Interface, Module GV
AdrName.Number S
Mode Transmit S
Enable BO
TlgLength=Buffersize (bytes) I

Brief description

CTS
AT
MOD
EN
NBY

PTR
QTS
YEV
YTS

DW
BO
W
W

PtrBuffer
OK-Status Block
TlgStatus, Coupling Status
InfoTlgStatus, additional Info

Sends a telegram, whose data was previously downloaded into the


telegram buffer via the pointer interface and with the write blocks
(DWR, CPY_P).
The function and mode of operation corresponds, with the exception of
the pointer interface, to block CTV.

Mode of operation

Initially, the telegram alternating buffer is filled with the write blocks and
using the pointer to the free alternating buffer. At the next of the sampling
time, this buffer is sent as telegram via the specified serial or parallel
interface.
In so doing, the selected buffer length must match the telegram length.
If the block detects (configuring) errors, then it disables itself and enters a
communications error into the diagnostics buffer.
Send operation starts after the interface, on the module, configured at
connection CTS, has been released and the existence of the appropriate
coupling partner determined (refer to diagnostics output YEV). This can
take several sampling times.
When PROFIBUS-DP stations or SIMATIC-CPU are connected, bytes or
words are principally not swapped. A rotation which may be required is
set using the SWP connection of the read/write blocks.
The computation time essentially depends on the telegram length and
the hardware platform. A base computation time of 35 s can be
considered as nominal value for the FM458 / PM6 as
well as approx. 1 s/byte.
The computation time, specified in the technical data, should be
appropriately interpreted!

Associated blocks

The following blocks can be connected to this particular block


(pointer output):
CPY_P,
DWR, DWR_8, DWR_8D, DWR_8I, DWD_BY, DWR_D, DWR_I

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-83

Communication blocks

I/O
Default:
CTS

ComPartner (Interface, Module)


Selecting the transport system, i.e. the serial or parallel interface. The module
name and, if required, the connector, in accordance with HW Config should be
entered.
Configuring note: Select the connection, righthand mouse key:
"Interconnect to operand", select from the list field
Initialization connection: Changes are only accepted after a new start!

AT

AdrName.Number
Any, unique name can be specified as well as a channel number. The number
establishes the required connection (reference) between the sender and
receiver;
For additional details, refer to the refer to the Manual "System- and
communication configuring D7-SYS ", Kapitel "Communications utility process
data".
The address depends on the interface type (protocol). Generally, the channel
number of the sender and receiver must match.

"empty string"

Initialization connection: Changes are only accepted after a new start!


MOD

Mode Transmit
"R" = Refresh:
For relatively slow execution, data to be sent #(transmitted)# can be
overwritten; this is the typical setting.

'R'

"H" = Handshake:
No new transmitted data is accepted as long as data has still not been sent.
Initialization connection: Changes are only accepted after a new start!
EN

Enable
Enables the block. For EN=0, no data is transmitted

NBY

TlgLength = Buffer size (bytes)


Defines the buffer length (in bytes) for telegrams to be sent.
NBY must correspond to the telegram length.

PTR

PtrBuffer
Pointer to the telegram buffer and monitoring information.
The output is connected to PTR inputs of other pointer-based communication
blocks, which enter data to be sent, in the send buffer.

QTS

OK-Status block
Status display about incorrect initialization and processing of the block.
QTS=0: The block does not process data; a communications-error was entered
in the diagnostics buffer (as well as, for example, the display of "CF" LED,
flashing "C")
QTS=1: The block is operating error-free

YEV

TlgStatus, Coupling Status, Status of the coupling.

16#00000000

16#0000

For an explanation refer to refer to the Manual "System- and communication


configuring D7-SYS ", Kapitel "Communications utility process data".
YTS

4-84

InfoTlgStatus, additional Info


This is a detailed status display; for the appropriate values refer to: D7-SYS
Online Help "Help on events".
(Press the F1 key in the CFC and call the topic "Help on events" under "CFC for
D7-SYS".)

16#0000

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / CPU551

Can be inserted online

No

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block must be configured in the same sampling


time as the blocks, connected via the pointer
interface
(CFC connection via connections PTR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

105,0 + 1 per Byte


35,0 + 1 per Byte
17,5 + 1 per Byte

4-85

Communication blocks

4.9.4 DB_P Data block for pointer-based processing


Symbol
DB_P
BufLength,Size Buffer,Bytes DI
BufNumber I
SelectPuffer I

Brief description

LEN
NBF
BSL

PTR
QF
YF

DW PtrBuffer
BO Error-Status Block
W StatusInfo Block

This is a data memory which can be universally used and which can be
accessed via the pointer interface with a write, read or copy block.
The type of saved data is defined by the read/write blocks.
Data is only saved in the volatile memory (RAM). This means that they
are lost when the system is powered-down or at a new start!
The data block, defined with a DB_P, can contain several (similar) buffers
which can be selected in operation using an appropriate input. The
available buffer size depends on the working memory, i.e. the RAM
expansion of the particular module as well as on the configuring. This
means, for example, how much RAM the program requires.

Mode of operation

The block generates an (empty) data memory which can consist of


several similar buffers. The size of a buffer must be specified (bytes).
The data memory is written into or read through a pointer interface using
the blocks DWR, DRD as well as CPY_Y.

Associated blocks

The following blocks can be connected to this block (pointer input):


CPY_Y
DRD, DRD_8, DRD_8D, DRD_8I, DRD_BY, DRD_D, DRD_I,
DWR, DWR_8, DWR_8D, DWR_8I, DWD_BY, DWR_D, DWR_I

4-86

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

I/O
Default:
LEN

BufLength,Size Buffer,Bytes
Length of the data buffer in bytes;
initialization value! The modified value is only accepted after a new start!

NBF

BufNumber
Number of data buffers;
initialization value! The modified value is only accepted after a new start!

BSL

Select Buffer
Selects a buffer; a 1 selects the first buffer;
It is always possible to change over to another buffer in every sampling time.

PTR

16#00000000
PtrBuffer
Pointer to the telegram/data buffer; to connect with the same connection type of
other pointer-based communication blocks. The CFC connection can be
changed online.
The connection also includes monitoring information to ensure correct
configuring.

QF

Error status block


QF=1: There is an error; for details, refer to YF

YF

StatusInfo block
as for the DRD block!

Configuring data

0
16#0000

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / CPU551

Can be inserted online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block must be configured in the same sampling


time as the blocks, connected via the pointer
interface (CFC connection via connections PTR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,9
1,3
0,7

4-87

Communication blocks

4.9.5 DRD, DRD_D, DRD_I, DRD_8, DRD_8D, DRD_8I, DRD_BY


DRD Read blocks for pointer-based communications
Symbol
DRD
PtrBuffer DW
Off1 Buffer DI
Off2 Buffer DI
Swap By/Wd BO

PTR
OF1
OF2
SWP

Y
QF
YF

R DataOut Buffer
BO Error-Status Block
W StatusInfo Block

Brief description

These blocks read individual data from a telegram receive buffer or a


data buffer. This buffer is accessed using the pointer interface. The value
to be read is identified using offset data which should be set. It is
absolutely necessary to ensure that the offset is correctly selected, so
that especially values, which comprise 2 or 4 bytes, are correctly
addressed!
There are associated blocks for every data type (BYTE, INT, DINT,
REAL). Further, there are blocks which read 1 or 8 values.

Mode of operation

At the start of the sampling time, the telegram block, Receive CRV_P
supplies, to the read blocks, a pointer to its receive buffer (CFC
connection via PTR connections). This means that together with the
offset data, the read blocks can read one or several values from the
buffer and place these values at its output.
Data from a data memory with pointer interface (DB_P) can also be read
using these blocks.

Associated blocks

The following blocks can be connected to this block (pointer input):


CRV_P, DB_P
S7RD_P, BRCV

I/O
Default:
PTR

16#00000000
PtrBuffer
Pointer to the telegram/data buffer; to connect with the same connection type of
other pointer-based communication blocks. The CFC connection can be
changed online. The connection also includes monitoring information to ensure
correct configuring.

OF1

Off1 Buffer
Offset in Bytes to address individual values relative to the start of the buffer;
There are 2 identical offset inputs available which can be used to easily
configure indexed accesses.
Offset = OF1 + OF2;
This means, for example, OF1 can receive a constant value and the OF2connections of all read blocks controlled using a common CFC connection in
order to read-out several similar data packages (e.g. also with CFC chart
blocks).

Max. offset: Buffer length length of the data type


OF2

4-88

Off2 Buffer
Refer to the description of OF1!

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

SWP

Swap By/Wd; for DB_P for Profibus-/S7CPU data


If data is transferred to a PROFIBUS-DP Station or to the SIMATIC-CPU, bytes
(for INT) and where relevant, words of the values to be transferred (REAL,
DINT) must be swapped. If this block is combined with the block S7RD_P, the
input SWP is not evaluated (S7RD_P turns in a stand-alone way).
SWP =1: Swap

DataOut Buffer
Received value; If an error has occurred (e.g. as the result of an incorrect
offset; refer to the data at QF, YF), then the last value, which was read errorfree, is output. For REAL types, a check is made for the correct REAL type!

QF

Error status block


QF=1: There is an error; for details, refer to YF

YF

StatusInfo Block
If an error has occurred, the last value, which was read error-free, is output.

0.0

0
16#0000

0001
There is not sufficient memory space for the buffer;
Remedy: Reduce the buffer length or reduce the configured software.
0002
No value buffer pointer at the PTR connection;
There is possibly no link to the PTR connection; for DB_P: The data at
connection BSL is 0 or does not match the number of buffers which have been
set-up
Remedy: Check the CFC links at the PTR connections; check buffer select for
DB_P.
0003
The block, connected through PTR, does not have the same sampling
time.
Remedy: All of the pointer-based communication blocks, linked through a PTRCFC connection, must have the same sampling time.
0004
Incompatible block combination regarding read/write direction (e.g.
read block DRD at the send block CTV_P)
Remedy: Ensure that there are only read blocks at CRV_P, write blocks only at
CTV_P as well as the correct assignment of source and destination pointers for
the CPY_P copy block.
0005
Offsets, greater than the buffer length
Remedy: The offset must lie within the buffer length.
0006
Invalid REAL value (this is not a number, de-normalized)
Remedy: Check for a correct offset (value limit). Check that REAL types were
transferred/saved.
0007
No data available;
Remedy: Check whether the telegram blocks CRV_P/CTV_P were initialized
and operate correctly and data is transferred.
0008
Invalid length
Remedy: Check whether the LEN data is greater than the length of the
connected buffer or whether the offset contains a negative value
0009
Incompatible module
Remedy: Check all of the modules being used together with the hardware
platform: Blocks S7RD_P/S7WR_P can only be configured on FM458!
000A

Error for data transfer for the S7RD_P/S7WR_P block

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-89

Communication blocks

Configuring data

4-90

Computation time [s]


DRD, DRD_D, DRD_I

T400/PM5
FM458/PM6
CPU550/CPU551 0,6

3,6
1,2

DRD_8

T400/PM5
FM458/PM6
CPU550/CPU551 1,9

11,4
3,8

DRD_8D

T400/PM5
FM458/PM6
CPU550/CPU551 5,0

30,0
10,0

DRD_8I

T400/PM5
FM458/PM6
CPU550/CPU551 2,3

13,8
4,6

DRD_BY

T400/PM5
FM458/PM6
CPU550/CPU551 0,8

3,0
1,5

Can be inserted online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block must be configured in the same


sampling time as the blocks, connected via the
pointer interface (CFC connection via connections
PTR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Communication blocks

4.9.6 DWR, DWR_D, DWR_I, DWR_8, DWR_8D, DWR_8I, DWR_BY


DWR Write blocks for pointer-based communications
Symbol
DWR
PtrBuffer DW
Off1 Buffer DI
Off2 Buffer DI
Swap By/Wd BO
DataIn Buffer R

Brief description

PTR
OF1
OF2
SWP
X

QF
YF

BO StatusInfo Baustein
W StatusInfo Block

Using these write blocks, individual data is written into a send buffer
(CTV_P) or a data block (DB_P) using a pointer interface.
Using the offset data to be set, the location in the telegram or the buffer
are defined for the value to be written. It is very important to ensure that
the offset is correctly selected so that values which were not previously
saved (partially) are not overwritten.
There are associated blocks for every data type (BYTE, INT, DINT,
REAL). Further, there are blocks which write 1 or 8 values.

Mode of operation

Using a pointer and their offset data, write blocks fill the telegram buffer
which is sent using the block CTV_P assigned using the CFC pointer
connection.
Using these blocks, data can also be written into a data memory with
pointer interface (DB_P).

Associated blocks

The following blocks can be connected to this block (pointer input):


CTV_P, DB_P,
S7WR_P

I/O
Default:
PTR

PtrBuffer
Pointer to the telegram/data buffer; to connect with the same connection
type of other pointer-based communication blocks.
The CFC connection can be changed online.
The connection also includes monitoring information to ensure correct
configuring.

OF1

Off1 Buffer
Offset in Bytes to address individual values relative to the start of the buffer;
There are 2 identical offset inputs available which can be used to easily
configure indexed accesses.
Offset = OF1 + OF2;
This means, for example, OF1 can receive a constant value and the OF2connections of all write blocks controlled using a common CFC connection
in order to write into several similar data packages
(e.g. also with CFC chart blocks).

16#00000000

max. Offset: Buffer length length of the data type


Note: The data type for DWR_8I is I, contrary to the other blocks.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4-91

Communication blocks

OF2

Off2 Buffer
Refer to the description of OF1!

SWP

Swap By/Wd; for DB_P for Profibus-/S7CPU data


If data is transferred to a PROFIBUS-DP Station or to the SIMATIC-CPU,
bytes (for INT) and where relevant, words (for REAL, DINT) of the values to be
transferred must be swapped. If this block is combined with the block S7RD_P,
the input SWP is not evaluated (S7RD_P turns in a stand-alone way).
SWP =1: Swap

DataIn Buffer
Value to be sent;

QF

Error status block


QF=1: There is an error; for details, refer to YF

YF

StatusInfo Block
as for the DRD block!

Configuring data

4-92

0.0
0
16#0000

Computation time [s]


DWR, DWR_D, DWR_I

T400/PM5
FM458/PM6
CPU550/CPU551 0,6

3,6
1,2

DWR_8

T400/PM5
FM458/PM6
CPU550/CPU551 2,0

12,0
4,0

DWR_8D

T400/PM5
FM458/PM6
CPU550/CPU551 5,0

30,0
10,0

DWR_8I

T400/PM5
FM458/PM6
CPU550/CPU551 4,3

25,8
8,6

DWR_BY

T400/PM5
FM458/PM6
CPU550/CPU551 0,9

5,4
1,8

Can be inserted online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block must be configured in the same


sampling time as the blocks, connected via the
pointer interface (CFC connection via connections
PTR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5 Conversion modules
5.1 Type, converter
5.1.1 B_W Converter, 16 binary quantities into a status word
Brief description
NOTE

Generating the status word from 16 binary quantities


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.2 B_DW Conversion, 32 binary quantities into a double word (32 bit)
Brief description
NOTE

32 binary quantities are represented in a 32 bit double word.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.3 BY_W Status byte to status word converter


Brief description
NOTE

Combines 2 bytes to form a word.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5-1

Conversion modules

5.1.4 D_I DOUBLE-INTEGER to INTEGER converter


Symbol
D_I
input variable (double word) DI

I output variable

Brief description

Converts a DOUBLE-INTEGER quantity into an INTEGER quantity

Mode of operation

This block converts a DOUBLE-INTEGER quantity into an INTEGER


quantity, i.e. the most significant 2 bytes of the 4 byte DOUBLEINTEGER input quantity are transferred into the INTEGER output
quantity.
The least significant 2 bytes of the DOUBLE-INTEGER input quantity are
lost; they are no longer taken into account.

Conversion
schematic

Input
0101

0000

1111

0110

0000

1111

0110

1101

0011

1010

0000

Output
0101

I/O
X

Input quantity (double word)

(default: 0)

Output quantity

(default: 0)

Configuringdata

5-2

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

1,3
0,4
0,2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

5.1.5 D_R DOUBLE-INTEGER to REAL converter


Brief description
NOTE

Converts a DOUBLE-INTEGER quantity into a REAL quantity


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.6 DW_B Conversion double word (32 bit) into 32 binary quantities
Brief description
NOTE

A 32-bit double word is sub-divided into 32 binary quantities.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.7 DW_W Conversion 32 bit double word into two 16 bit words
Brief description
NOTE

A 32 bit double word is sub-divided into two 16 bit words.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5-3

Conversion modules

5.1.8 I_D INTEGER to DOUBLE-INTEGER converter


Symbol
ID
input quantity I

DI output quantity

Brief description

Converts an INTEGER quantity into a DOUBLE-INTEGER quantity

Mode of operation

This block converts an INTEGER quantity into a DOUBLE-INTEGER


quantity. The two bytes of the input quantity are transferred into the least
significant two bytes of the output quantity.

Conversion
schematic

Input
0101 0000

1111

0110

1111

0110

Output
0101

0000

0000

0000

0000

0000

I/O
X

Input quantity

(default: 0)

Output quantity

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in:

Interrupt tasks
Cyclic tasks

Executed in:

Normal mode

Special features

1,6
0,5
0,3

5.1.9 I_R INTEGER to REAL converter


Brief description
NOTE

5-4

Converts an INTEGER quantity into a REAL quantity


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

5.1.10 N2_R Conversion 16 bit fixed point format (N2) to REAL


Symbol
N2_R
input quantity I
normalization factor R

X
NF

R output quantity

Brief description

Converts a 16 bit fixed point quantity into a REAL quantity. For the case,
X = 16384 (corresponds to 100%), output Y assumes the value at input
NF.

Mode of operation

Input quantity X is represented at output Y according to the formula.


Y=

X NF
16384

I/O
X

Input quantity

(default value: 0)

NF

Normalization factor

(default value: 1.0)

Output quantity

(default value: 0.0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2,0
0,7
0,4

5-5

Conversion modules

5.1.11 N4_R Conversion, 32 bit fixed point format (N4) to REAL


Symbol
N4_R
input quantity DI
normalization fakcor R

X
NF

R output quantity

Brief description

Converts a 32 bit fixed point quantity into a REAL quantity. Output Y has
the value at input NF, for the case X = 1073741824 (corresponds to
100%).

Mode of operation

Input quantity X is represented at output Y according to the formula.


Y=

X NF
1073741824

I/O
X

Input quantity

(default value: 0)

NF

Normalization factor

(default value: 1.0)

Output quantity

(default value: 0.0)

Configuringdata

5-6

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,0
0,7
0,4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

5.1.12 R_D REAL to DOUBLE-INTEGER converter


Brief description
NOTE

Converts a REAL quantity into a DOUBLE-INTEGER quantity


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.13 R_I REAL to INTEGER converter


Brief description
NOTE

Converts a REAL quantity into an INTEGER quantity


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5-7

Conversion modules

5.1.14 R_N2 Conversion, REAL to 16 bit fixed point format


Symbol
R_N2
input quantity R
normalization factor R

X
NF

Y
Q

I output quantity
BO overflow

Brief description

Converts a REAL quantity into a 16 bit fixed point quantity. For X = NF,
output Y has the value 16384 (corresponds to 100%).

Mode of operation

Input quantity X is represented at output Y according to the formula.

Y=

X 16384
(result in round figures)
NF

Y is limited to the range


-32768 Y 32767

(corresponds to -200% Y < 200%)

I/O
X

Input quantity

(default value: 0.0 )

NF

Normalization factor

(default value: 1.0)

Output quantity

(default value: 0 )

Overflow. The input is set to 1, if X cannot be represented at Y due to the fact that the
value range has been exceeded, or if NF was set to 0.

Configuringdata

5-8

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,0
0,7
0,4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

5.1.15 R_N4 Conversion, REAL to 32 bit fixed point format


Symbol
R_N4
input quantity R
normalization factor R

Brief description

X
NF

Y
Q

DI output quantity
BO overflow

Converts a REAL quantity into a 32 bit fixed point quantity.


For X = NF, output Y has the value 1073741824 (corresponds to 100%).

Mode of operation

Input quantity X is represented at output Y according to the formula

Y=

X 1073741824
(result in round figures)
NF

Y is limited to the range

or

-2147483648 Y 2147483648

(decimal)

16#8000000 Y 16#7FFFFFF

(hexadecimal)

(corresponds to -200% Y < 200%).


I/O
X

Input quantity

(default value: 0.0)

NF

Normalization factor

(default value: 1.0)

Output quantity

(default value: 0 )

Overflow. The input is set to 1, if X, was not able to be represented at Y due to the fact
that the value range was exceeded or if NF was set to 0.

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

2,0
0,7
0,4

5-9

Conversion modules

5.1.16 W_B Converter, status word into 16 binary quantities


Brief description
NOTE

The status word is de-coded into 16 binary quantities


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.17 W_BY Status word to status byte converter


Brief description
NOTE

Converts a word into 2 bytes


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

5.1.18 W_DW Conversion from two 16 bit words into a 32 bit double word
Brief description
NOTE

5-10

Two 16 bit words are copied into a 32 bit double word.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

5.2 Special functions


5.2.1 BNR Binary thumbwheel switch input
Symbol
BNR
number of positions I
normalization factor I

STZ
NF

Y
Q0

BCD

Q1

sign BO

VZ

Q2

input 2 to the power of 0 BO

EE

Q3

input 2 to the power of 1 BO

EZ

Q4

input 2 to the power of 2


input 2 to the power of 3
data transfer
enable

EV
EA
DU
EN

QW

BCD/binary code selection BO

BO
BO
BO
BO

R output thumbwheel switch value


BO control position 10 to the power of 0 or
16 to the power of 0
BO control position 10 to the power of 1 or
16 to the power of 1
BO control position 10 to the power of 2 or
16 to the power of 2
BO control position 10 to the power of 3 or
16 to the power of 3
BO control position 10 to the power of 4 or
16 to the power of 4
BO error

Brief description

This function block reads-in values from a BCD- or binary-coded


thumbwheel switch

Mode of operation

The function block operates according to the multiplex technique. In this


case, the thumbwheel switch positions 10
0

to 10

for BCD coding or

16 to 16 for binary coding, are cyclically selected one after the other
by setting the relevant binary output Q1 to Q4 to 1. After selecting a
switch position, this is read-in as for 4-byte number via the 4 binary inputs
EE, EZ, EV and EA into the function block. The thumbwheel switch value,
cyclically determined from the individual thumbwheel switch positions, is
then transferred at a rising edge at binary input DU, i.e. data is
transferred, taking into account normalization factor NF, to output Y.
Y=

Thumbwheel switch value


100%
NF

Normalization factor NF:


specifies which thumbwheel switch value is to be interpreted as
100%.
value range: 1 ... 32767 (decimal).
If the enable input EN=1, the function block is enabled. For EN=0, all
block outputs are set to 0.
If input BCD=1, the thumbwheel switch position, read-in is interpreted as
BC-coded number (value range 0 to 9), and for BCD=0, as binary-coded
number (value range 0 to F).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5-11

Conversion modules

The position number of the thumbwheel switch is specified at input STZ.


It may be between 2 and 5.
If the sign input VZ=0, all 4 bits of the most significant position of the
thumbwheel switch are interpreted as number. For VZ=1, the most
significant bit of the most significant thumbwheel switch position is
interpreted as sign (1 = negative). Thus, for VZ = 1, the most
significant thumbwheel switch value can have a maximum value of 7
(0111B = 7H) and a minimum value of -7 (1111B = FH).
Output QW is set to 1, if

Error messages

for BCD-coded numbers (BCD = 1) the value of a thumbwheel switch


position read-in is > 9
or
during 3 consecutive read attempts of a thumbwheel switch position, a
different value was determined each time
and
a rising edge was identified at binary input DU.
Recommended
circuit

Thumbwheel switch
value: 3225
1
BIQ8
=5

0
1

Pos. 1

0
0
BNR

BII8

4
5000
1
0

STZ
NF
BCD
VZ
EE
EZ
EV
EA
DU
EN

=2
Y
Q0
Q1
Q2
Q3
Q4
QW

1
0

Pos. 2

0
0
=2

1
0

Pos. 3

0
1
=3

Pushbutton

1
0

Pos. 4

5-12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

Thumbwheel switch with 4 positions:


100% 5000 (decimal): NF = 5000
BCD-coding: BCD = 1
No sign:
VZ = 0
Function block enabled: EN = 1

Example:

STZ = 4

For a thumbwheel switch value of 3225, output Y is as follows:

Y=

3225
100% = 64.5%
5000

I/O
STZ

Number of positions

(default: 2) (initialization input)

NF

Normalization factor

(default: 1)

BCD

BCD/binary coding selection

(default: 0)

VZ

Sign

(default: 0)

EE

Input 20

(default: 0)

EZ

(default: 0)

(default: 0)

EV

Input 2
Input 2

EA

Input 2

(default: 0)

DU

Data transfer

(default: 0)

EN

Enable

(default: 0)

Output, thumbwheel switch value

Q0
Q1

Control, position

10

or

16

(default: 0.0)

(default: 0)

10

Control position

10

or

16

Q3

Control position

10 3

or

16 3

(default: 0)

Q4

Control position

10 4

or

16 4

(default: 0)

QW

Error

Q2

Control position

Configuringdata

or

16

(default: 0)

(default: 0)

(default: 0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6,6
2,2
1,1

5-13

Conversion modules

5.2.2 SWB_DW Byte reverser for double word inputs


Symbol
SWB_DW
number of X inputs
input 1
input 2
input 3
input 4
input 5
input 6
input 7
input 8

I
DW
DW
DW
DW
DW
DW
DW
DW

XN
X1
X2
X3
X4
X5
X6
X7
X8

Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8

DW
DW
DW
DW
DW
DW
DW
DW

output 1
output 2
output 3
output 4
output 5
output 6
output 7
output 8

Brief description

Reverses (interchanges) the high- and low words of up to 8 double words


and simultaneously reverses (interchanges) the high- and low bytes
within the words.

Mode of operation

The function block reverses (interchanges) the high- and low word of the
double words at inputs X1 to X8 (and simultaneously reverses the high
and low bytes within the word), and outputs the result at Y1 to Y8 (refer
to the conversion schematic):
the low word of the double word at input Xn becomes the high word of
the double word at output Yn. The high and low byte of the low word
are simultaneously reversed.
The high word of the double word at input Xn becomes the low word of
the double word at output Yn. The high and low bytes of the high word
are simultaneously interchanged.
The number of inputs to be processed (1 to 8) is specified at input Xn.
This value influences the computation time of the function block.
If input XN = 0, all block outputs are set to 0. For XN >= 9 the function
block calculates with XN = 8.

Conversion
schematic

Input X
High byte 2

Low byte 2

High byte 1

Low byte 1

High word

Low word

High word

Low word

Output Y

Low byte 1

5-14

High byte 1

Low byte 2

High byte 2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

I/O
XN

Number of X inputs

(default: 0) (initialization input)

X1-X8

Input 1-8

(default: 16#0000 0000)

Y1-Y8

Output 1-8

(default: 16#0000 0000)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1,6
0,5
0,3

5-15

Conversion modules

5.2.3 SWB_W Byte reverser for word inputs


Symbol
SWB_W
numer of X inputs
input 1
input 2
input 3
input 4
input 5
input 6
input 7
input 8

I
W
W
W
W
W
W
W
W

XN
X1
X2
X3
X4
X5
X6
X7
X8

Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8

W
W
W
W
W
W
W
W

output 1
output 2
output 3
output 4
output 5
output 6
output 7
output 8

Brief description

Reverses the high and low bytes of up to 8 words.

Mode of operation

The function reverses (interchanges) the high and low bytes of the words
at inputs X1 to X8 and outputs the result of this reversal at Y1 to Y8 (refer
to the conversion schematic):
the low byte of the word at input Xn becomes the high byte of the
word at output Yn.
the high byte of the word at input Xn becomes the low byte of the
word at output Yn.
The number of inputs to be processed (1 to 8) is specified at input Xn.
This value influences the computation time of the function block.
if input XN = 0, all of the block outputs are set to 0. For XN >= 9, the
function block calculates with XN = 8.

Conversion
schematic

Input X
High byte

Low byte

High byte

Low byte

Output Y

I/O
XN

No. of X inputs

(default: 0) (initialization input)

X1-X8

Input 1-8

(default: 0)

Y1-Y8

Output 1-8

(default: 0)

5-16

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1,5
0,5
0,3

5-17

Conversion modules

5.2.4 SWBI Byte reverser for REAL type inputs


Symbol
SWBI
number of X inputs
input 1
input 2
input 3
input 4
input 5
input 6
input 7
input 8

Application
information

I
DW
DW
DW
DW
DW
DW
DW
DW

XN
X1
X2
X3
X4
X5
X6
X7
X8

Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8

R
R
R
R
R
R
R
R

output 1
output 2
output 3
output 4
output 5
output 6
output 7
output 8

Reverses (interchanges) the high and low words of up to 8 double words


and simultaneously reverses (interchanges) the high and low bytes within
the words.
Imports floating point values from a Big Endian system

Mode of operation

The function block reverses the high and low word of the double words at
inputs X1 to X8 (and simultaneously reverses the high and low bytes
within the word) and outputs the result at outputs Y1 to Y8 (refer to the
conversion schematic):
the low word of the double word at input Xn becomes the high word of
the double word at output Yn. The high and low byte of the low word
are simultaneously reversed.
the high Word of the double Word at input Xn becomes the low Word
of the double Word at output Yn. The high- and low byte of the high
Word are simultaneously reversed.
The number of inputs to be processed (1 to 8) is specified at initialization
input Xn. This value influences the computation time of the function
block.
if input XN = 0, all block outputs are set to 0. For XN >= 9, the function
block calculates with XN = 8.

Conversion
schematic

Input X
High byte 2

Low byte 2

High byte 1

Low byte 1

High word

Low word

High word

Low word

Output Y

Low byte 1

5-18

High byte 1

Low byte 2

High byte 2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

I/O
XN

Number of X inputs

(default: 0) initialization input)

X1-X8

Input 1-8

(default: 16#0000 0000)

Y1-Y8

Output 1-8

(default: 0.0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1,5
0,5
0,3

5-19

Conversion modules

5.2.5 SWBO Byte reverser for real outputs


Symbol

SWBO
number of X inputs
input 1
input 2
input 3
input 4
input 5
input 6
input 7
input 8

Brief description

I
R
R
R
R
R
R
R
R

XN
X1
X2
X3
X4
X5
X6
X7
X8

Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8

DW
DW
DW
DW
DW
DW
DW
DW

output 1
output 2
output 3
output 4
output 5
output 6
output 7
output 8

reverses (interchanges) the high and low words of up to 8 double


words and simultaneously reverse the high and low bytes within the
words
exports floating point values into a big Endian system

Mode of operation

The function block reverses (interchanges) the high and low word of the
double words at inputs X1 to X8 (and simultaneously reverses the high
and low bytes within the word), and outputs the result at outputs Y1 to Y8
(refer to the conversion schematic):
the low word of the double word at input Xn becomes the high word of
the double word at output Yn. The highw and low byte of the low word
are simultaneously reversed.
the high word of the double word at input Xn becomes the low word of
the double word at output Yn. The high and low byte of the high word
are simultaneously reversed.
The number of inputs to be processed (1 to 8) is specified at initialization
input Xn. This value influences the computation time of the function
block.
if input XN = 0, all block outputs are set to zero. For XN >= 9, the
function block calculates with XN = 8.

Conversion
schematic

Input X
High byte 2

Low byte 2

High byte 1

Low byte 1

High word

Low word

High word

Low word

Output Y

Low byte 1

5-20

High byte 1

Low byte 2

High byte 2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Conversion modules

I/O
XN

No. of X inputs

(default: 0) (initialization input)

X1-X8

Input 1-8

(default: 0.0)

Y1-Y8

Output 1-8

(default: 16#0000 0000)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1,5
0,5
0,3

5-21

Logic blocks

6.1

Gates

6.1.1 AND block (BOOL type)


Brief description
NOTE

AND block with BOOL type generic inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.1.2 AND12 AND block, status word (WORD type)


Symbol
AND12
status word W

Brief description

IS

BO binary quantity AND

AND function block for a status word with a WORD type input
the block can be used for test operations

Mode of operation

A status word contains 16 binary statuses.


The function block sets the binary output Q to 1, if all of the bits of the
status word IS, i.e. bit1IS ... bit16IS, are equal to 1. Binary output Q = 0 if
one or several bits of the status word at block input IS are equal to 0.

Q = bit1IS ... bit16IS

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-1

Logic blocks

Truth table

Status word IS
Output
Q

Bit
16 15 14 13 12 11 10 9 8 7 6
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
0

*
*
*
*
*
*
*
*
*
*
*
*
*
*
0
*

*
*
*
*
*
*
*
*
*
*
*
*
*
0
*
*

*
*
*
*
*
*
*
*
*
*
*
*
0
*
*
*

*
*
*
*
*
*
*
*
*
*
*
0
*
*
*
*

* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * 0
* * 0 *
* 0 * *
0 * * *
* * * *
* * * *
* * * *
* * * *
* * * *

* *
* *
* *
* *
* *
* 0
0 *
* *
* *
* *
* *
* *
* *
* *
* *
* *

1 1 1 1 1 1 1 1 1 1 1

5 4 3 2 1
*
*
*
*
0
*
*
*
*
*
*
*
*
*
*
*

* * * 0
* * 0 *
* 0 * *
0 * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

1 1 1 1 1

* = any
I/O
IS

Status word

(default: 16#0000)

Binary quantity AND

(default: 0, changed from V6.0!)

Configuringdata

6-2

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

1,5
0,5
0,3

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.1.3 AND_W AND block (WORD type)


Symbol
AND_W
status word input W

QS
Q

W status word AND


BO binary quantity

Brief description

AND block with generic word type inputs.

Mode of operation

16 binary statuses are combined in a status word.


The function block logically ANDs status words I to I bitwise. The
appropriate bits of the AND status word are set at block output QS.
The following is valid for the k-th bit of status word AND:
QSk = I01k .. Innk , k = 1...16
A bit of the status word AND is 0, if at least one of the equivalent bits at
generic block inputs I to I is equal to 0.
Binary output Q is 1, if at least one bit of the status word AND is 1.

Status diagram
(for 3 inputs)

Status word 01
I01

1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1

&

Status word 02
I02

0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1

&

Status word 03

I03

1 0 1 1 0 0 0 1 1 1 1 0 0 0 0 1

Status word AND


QS

0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1

I/O
I01

Status Word 1 input

(default: 16#FFFF)

I...

...

(default: 16#FFFF)

Inn

Status Word nn input

(default: 16#FFFF)

QS

Status Word AND

(default: 16#FFFF)

Binary quantity

(default: 1)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-3

Logic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,2
1,7
0,9

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

I is a generic input

6.1.4 NAND block (BOOL type)


Brief description
NOTE

NAND block with BOOL type generic inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.1.5 NOR block (BOOL type)


Brief description
NOTE

NOR block with BOOL type generic inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.1.6 NOT Inverter (BOOL type)


Brief description
NOTE

BOOL type inverter


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.1.7 NOT_W Inverter status word (WORD type)


Symbol
NOT_W
status word W

Brief description

IS

QS

W inverter status word

inverter for WORD type status word


generates the one's complement of IS

Mode of operation

16 binary statuses are combined in a status word.


The function block inverts, bitwise, status Word IS, and outputs it at QS.
The following is valid for the k-th bit of the inverted status word:

QSk = ISk

6-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Generating the
complement

Example: IS = 15 -> QS = -16


Status word

IS

0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1

Inverted status word

QS

1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

I/O
IS

Status word

(default: 16#0000)

QS

Inverted status word

(default: 16#FFFF)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

1,6
0,5
0,3

6.1.8 OR block (BOOL type)


Brief description
NOTE

OR block with BOOL type generic inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.1.9 OR_12 OR logic gate status word (WORD type)


Symbol
OR_12
status word W

IS

BO

binary quantity OR

Brief description

NOR block with BOOL type generic inputs

Mode of operation

The function block logically ORs the binary quantities at generic inputs I,
inverts the result and outputs it at Q.

Q = I01 ... Inn

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-5

Logic blocks

Output Q is 1 if a 0 is present at all of the generic inputs I01 to Inn.


Output Q = 0 for all other cases.
I/O
I1

Binary quantity 1

(default: 0)

I...

...

(default: 0)

Inn

Binary quantity nn

(default: 0)

Binary quantity NOR

(default: 1)

Truth table
Input

Output Q

I01

I02

I03

I04

I05

Inn

*
1

*
*
*
*
*
*

*
*
*

*
*
*
*
*

*
*
*
*

*
*
*
*

*
*
*
*
*

*
*
*

*
*
*
*
*
*

*
*

*
*
*
*
*
*
*

*
*
*
*
*
*
*

*
*

0
0
0
0
0
0

* = any
Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

1,5
0,5
0,3

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

I is a generic input

6.1.10 OR_W OR block, status word (WORD type)


Symbol
OR_W
status word, input W

QS
Q

W status word OR
BO binary quantity

Brief description

OR block with word-type generic inputs.

Mode of operation

16 binary statuses are combined in a status word.


The function block logically OR's the status words I01 to Inn bitwise.
The result is output at block QS (status word OR).
The following applies for the k-th bit of the status word OR:

6-6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

QSk = I01k I02k, k = 1...16


A bit of the status word OR is equal to 1 if one of the equivalent bits at the
generic block inputs I01 to Inn is equal to 1.
Binary output Q is 1, if at least one bit of status word OR is equal to 1.
Status diagram
Status word 01

I01

1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

or

Status word 02

I02

0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0

Status word OR

QS

1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0

I/O
I..

Status word input

(default: 16#0000)

QS

Status word OR

(default: 16#0000)

Binary quantity

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

3,9
1,3
0,7

6.1.11 XOR block (BOOL type)


Brief description
NOTE

XOR block with BOOL type generic binary inputs.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-7

Logic blocks

6.1.12 XOR_W XOR block status Word (WORD type)


Symbol
XOR_W
status word input W

QS
Q

W status word XOR


BO binary quantity

Brief description

XOR block with generic word-type inputs.

Mode of operation

16 binary statuses can be combined in a status word.


The function block logically exclusively OR's the status words I01 to Inn
bitwise.
The result is output at block output QS (status word XOR).
The following applies for the k-th bit of the status word XOR:

QSk = (I01k I02k) (I01k I02k), k = 1...16


One bit of the status word XOR is equal to 1 if an uneven number of
equivalent bits at the generic inputs I01 to Inn is equal to 1.
Binary output Q is 1 if at least one bit of the status word XOR is equal
to 1.
Status diagram
Status word 01

I01

1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

Status word 02

I02

xor

0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0

Status word XOR

QS

1 0 0 1 0 0 1 1 1 0 1 1 1 1 0 0

I/O
I..

Status word, input

(default: 16#0000)

QS

Status word, XOR

(default: 16#0000)

Binary quantity

(default: 0)

6-8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,9
1,3
0,7

6-9

Logic blocks

6.2

Timers

6.2.1 MFP Pulse generator (BOOL type)


Symbol
MFP
input pulse BO
pulse duration TS

Brief description

I
T

BO output pulse

timer to generate a pulse with a fixed duration


used as pulse shortening or pulse extending element

Mode of operation

The rising edge of a pulse at input I sets output Q to 1 for pulse duration
T.
The pulse generator cannot be post triggered.

Initialization

The initialization defines the initial status for the first cyclic execution.
If input I receives the value 1 from the previous block output at
initialization, then the function block cannot identify a rising edge at the
first cyclic execution.
If output Q has the default value 1 after initialization output Q is set to 1
for pulse duration T.

Block diagram

Timing diagram

1
0

1
0

Output pulse Q as a function of pulse duration T


and input pulse I

6-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

I/O
I

Input pulse

(default: 0)

Pulse duration

(default: 0 ms)

Output pulse

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,8
1,3
0,7

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.2.2 PCL Pulse contractor (BOOL type)


Symbol
PCL
input pulse BO
pulse duration TS

I
T

BO output pulse

Brief description

Time element to limit the pulse duration.

Mode of operation

The rising edge of a pulse at input I sets output Q to 1. Output Q is 0, if


input I = 0 or pulse duration T has expired.

Initialization

Initialization defines the initial status for the first cyclic execution.
If input I receives the value 1 from the previous block output at
initialization, the function block cannot identify a rising edge at the first
cyclic execution.
If output Q has default value 1, after initialization output Q is set to 1 for
pulse duration T .

Block diagram

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-11

Logic blocks

Timing diagram

1
0

Output pulse Q as a function of pulse duration T and


input pulse I I

I/O
I

Input pulse

(default: 0)

Pulse duration

(default: 0 ms)

Output pulse

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,1
0,7
0,4

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.2.3 PDE Switch on delay (BOOL type)


Symbol
PDE
input pulse BO
pulse delay time TS

I
T

BO output pulse

Brief description

BOOL type timer element with switch on delay

Mode of operation

The rising edge of a pulse at block input I sets output Q to 1 after the
pulse delay time T.
Output Q is 0, if I = 0.
Q remains 0 if the duration of the input pulse I is shorter than the pulse
delay time T.
If time T is so high that the maximum value that can be represented
internally (T/ta as 32-bit value, with ta = sampling time) is exceeded, then
this is limited to the maximum value (e.g. for ta=1 ms approx. 50 days).

Initialization

6-12

Initialization defines the initial status for the first cyclic execution.
If input I receives the value 1 from the previous block output at
initialization, the function block cannot identify the rising edge at the first
cyclic execution.
If output Q has the value 1 at initialization, after initialization it is
immediately set to 1 if I = 1.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Block diagram

Q
T 0

Timing diagram

1
0

Output pulse Q as a function of pulse duration T and


input pulse I

I/O
I

Input pulse

(default: 0)

Pulse delay time

(default: 0 ms)

Output pulse

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,2
0,7
0,4

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.2.4 PDF Switch off delay (BOOL type)


Symbol
PDF
input pulse BO
pulse extension time TS

Brief description

I
T

BO output pulse

Timer element with switch off delay

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-13

Logic blocks

Mode of operation

The falling edge of a pulse at block input I sets output Q to 0 after the
pulse extension time T.
Output Q is 1, if I = 1.
Output Q is 0, if the input pulse I = 0 and the switch off delay time T has
expired.
The output Q remains at 1 if input I is again set to 1 before time T has
expired.

Initialization

Initialization defines the initial status for the first cyclic execution.
If input I receives the value 1 from the previous block output at
initialization, the function block cannot identify a negative edge at the 1st
cyclic execution.
If output Q is 1 at initialization, after initialization it is set to 1 for pulse
extension time T.

Block diagram

I
0 T

Timing diagram

1
0

Output pulse Q as a function of pulse duration T


and input pulse I

I/O
I

Input pulse

(default: 0)

Pulse extension time

(default: 0 ms)

Output pulse

(default: 0)

Configuringdata

6-14

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,0
1,3
0,7

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.2.5 PST Pulse extender (BOOL type)


Symbol
PST
input pulse BO
reset input BO
pulse duration TS

I
R
T

BO output pulse

Brief description

Function block to generate a pulse with a minimum duration and with an


additional reset input.

Mode of operation

The rising edge of a pulse at block input I sets output Q to 1.


Output Q only returns to 1, if the input pulse I = 0 and the pulse duration
T has expired.
Output Q can always be set to zero via reset input R, with R = 1.

Initialization

The initialization defines the initial status for the first cyclic execution.
If input I receives the value 1 from the previous block output at
initialization, the function block cannot identify a rising edge at the first
cyclic execution.
If output Q has the value 1, after initialization it is set to 1 for pulse
duration T.

Block diagram

T
Q

Timing diagram

1
0

1
0

Output pulse Q as a function of pulse duration T


and input pulse I (for R=0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-15

Logic blocks

I/O
I

Input pulse

(default: 0)

Reset input

(default: 0)

Pulse duration

(default: 0 ms)

Output pulse

(default: 0)

Configuringdata

6-16

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,4
1,5
0,8

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.3

Counters

6.3.1 CTR Counter (BOOL type)


Symbol
CTR
up pulse
down pulse
reset
setting
setting value
upper counter limit value
lower counter limit value

Brief description

BO
BO
BO
BO
I
I
I

IU
ID
R
S
SV
LU
LL

Y
QU
Q0
QL

I
BO
BO
BO

counter status
counter at the upper limit
counter status zero
counter at the lower limit

Function block for up/down counting with the following counter functions:
set counter to zero
hold counter at zero (inhibit)
set counter to initial value
The upper and lower counter limits can be individually set.

Mode of operation

This function block is an edge triggered up/down counter


The counter status is incremented with a rising edge of a pulse at input
IU.
The counter status is decremented with a rising edge of a pulse at input
ID.
The counter status is output at Y.
Counter control (also refer to the truth table).
Counter status Y can be pre-set with the setting value SV by setting S to
1.
However, the reset input R has priority over the setting input. As long as
R is a logical 1, Y is held at 0. The counter is inhibited.
The operating range of the counter can be specified using LU (upper
counter limit value) and LL (lower counter limit value).
When the limits are reached, the counter does not continue to count, but
the display QU (counter at the upper limit) or QL (counter at the lower
limit) is set.
Output Q0 is set to 1 when the counter status is zero.

Block diagram

LL LU
IU
ID
SV

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-17

Logic blocks

Truth table

Binary command

Counter status Y

Y is kept

Y=0

Y = SV (setting value)

Y=0

Counter status at the setting/resetting command


Initialization defines the initial status for the first cyclic execution.
If input ID or IU receives the value 1 from a previous block output at
initialization, the function block cannot identify a rising edge at the first
cyclic execution.
Secondary conditions: LL <= Y <= LU for LL<LU
Y = LU for LL >= LU

Initialization

I/O
IU

Up pulse

(default: 0)

ID

Down pulse

(default: 0)

Resetting

(default: 0)

Setting

(default: 0)

SV

Setting value

(default: 0)

LU

Upper counter limit value

(default: 0)

LL

Lower counter limit value

(default: 0)

Counter status

(default: 0)

QU

Counter at the upper limit

(default: 0)

Q0

Counter status 0

(default: 0)

QL

Counter at the lower limit

(default: 0)

Configuringdata

6-18

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

6,3
2,1
1,1

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.3.2 UDI Up/down pulse evaluator (BOOL type)


Symbol
UDI
pulse sequence 1 BO
pulse sequence 2 BO

Brief description

I1
I2

QU
QL
QF

BO up count direction
BO down count direction
BO error

Type BOOL function block for


digital incremental position sensing
direction of rotation identification
pulse evaluation

Mode of operation

The function block generates binary values QU (count pulses in the up


direction) and QL (count pulses in the down direction) by comparing the
timing of input pulse I1 (pulse sequence 1) and I2 (pulse sequence 2).
If I1 = 1 and the signal at I2 changes from 0 to 1, then the output Q1 = 1
(count pulse in the up direction), until I1 or I2 returns to 0.
If I2 = 1 and if the signal at I1 changes from 0 to 1, then output QL = 1
(count pulse in the up direction), until I1 or I2 returns to 0.
When the block is functioning error-free, only one of the two outputs QU
or QL can output pulses. If both inputs simultaneously go from 0 to 1, an
error condition is present, and output QF is set to 1 (error) while
QU = QL = 0.

Initialization

The initialization defines the initial status for the first cyclic execution.
If block input I1 or I2 receives the value 1 from the previous block output
at initialization, the function block cannot identify a rising edge at the first
cyclic execution. The block identifies a rising edge at the first cyclic
execution. Values for I1 and I2 are buffered in the INIT mode.

Block diagram

I1
I2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

QU
QL
QF

6-19

Logic blocks

Timing diagram

I1
I2

1
0
1
0

QU
QL

1
0
1
0

Determining the up/down pulses as a function


of I1 and I2

I/O
I1

Pulse sequence 1

(default: 0)

I2

Pulse sequence 2

(default: 0)

QU

Up direction

(default: 0)

QL

Down direction

(default: 0)

QF

Error

(default: 0)

Configuringdata

6-20

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,4
1,5
0,8

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.4

Comparators

6.4.1 NCM Numerical comparator (REAL type)


Brief description
NOTE

Function block to compare two REAL type numerical quantities


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.4.2 NCM_I Numerical comparator (INTEGER type)


Brief description
NOTE

INTEGER type function block to compare two numerical quantities.


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.4.3 NCM_D Numerical comparator (DOUBLE-INTEGER type)


Brief description
NOTE

DOUBLE-INTEGER type function block to compare two numerical


quantities.
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-21

Logic blocks

6.5

Switches

6.5.1 ANS Automatic numerical changeover switch (REAL type)


Symbol
ANS
input quantity R

Y
QTS

R output quantity
BO operational status

Brief description

Automatic changeover to the currently changing quantity (REAL type)

Mode of operation

The function block is only active if the operating status output QTS = 1.
The generic input (from X01 to Xnn), whose value changed over the
previous value in the current sampling interval is output at Y.
If several generic inputs change their value in the current sampling
interface, then the value of the input with the lowest number is switchedthrough to output Y. The following inputs are then ignored.
Example:
Assuming that, of the generic inputs X01 to X09, inputs X01 and X02
haven't changed. X03 is the first input, whose value has changed; it is
output at Y. The values of inputs X04 to X09 are not interrogated.
Operating status INIT
In the INIT operating status, memory is reserved to accept values of
generic input quantities. If this is not possible (e.g. due to lack of
memory), operating status QTS is set to 0, and 0 is output.
If the required memory can be reserved, then:
the current values of all generic input quantities are saved
the value of input quantity X01 is transferred to output Y
operating status QTS is set to 1

I/O
X..

Input quantity

(default: 0.0)

Output quantity

(default: 0.0)

QTS

Operating status

(default: 0)

Configuringdata

6-22

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,8
1,6
0,8

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.5.2 ANS_I Automatic numerical changeover switch (INTEGER type)


Symbol
ANS_I
input quantity I

Y
QTS

I output quantity
BO operational state

Brief description

Automatic changeover to a currently changing generic quantity


(INTEGER type).

Mode of operation

The function block is only active if the operating status output QTS = 1.
The generic input (from X01 to Xnn), whose value has changed over the
previous value in the current sampling interval, is output at Y.
If several generic inputs change values in the current sampling interval,
then the value of the input, with the lowest number, is transferred to
output Y. The subsequent inputs are ignored.
Example:
Assuming that, of the generic inputs X01 to X09, inputs X01 and X02
haven't changed. X03 is the first input, whose value has changed; it is
output at Y. The values of inputs X04 to X09 are not interrogated.
Operating status INIT
In the INIT operating status, memory is reserved to accept values of
generic input quantities. If this is not possible (e.g. due to lack of
memory), operating status QTS is set to 0, and 0 is output.
If the required memory can be reserved, then:
the current values of all generic input quantities are saved
the value of input quantity X01 is transferred to output Y
operating status QTS is set to 1

I/O
X..

Input quantity

(default: 0)

Output quantity

(default: 0)

QTS

Operating status

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Generic FB

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4,5
1,5
0,8

6-23

Logic blocks

6.5.3 BSW Binary changeover switch (INTEGER type)


Brief description
NOTE

The INTEGER type function block switches one of two binary input
quantities to the output
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.5.4 NSW Numerical changeover switch (REAL type)


Brief description
NOTE

The function block switches one of two numerical input quantities (REAL
type) to the output.
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.5.5 NSW_D Numerical changeover switch (DOUBLE-INTEGER type)


Brief description
NOTE

The function block switches one of two numerical input quantities to the
output (DOUBLE-INTEGER type).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.5.6 NSW_I Numerical changeover switch (INTEGER type)


Brief description
NOTE

6-24

The function block switches one of two numerical input quantities


(INTEGER type) to the output
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.6

Multiplexer

6.6.1 DX8 Demultiplexer, 8 outputs, can be cascaded (REAL type)


Symbol
DX8
input quantity
control input
save mode
reset
change enable

Brief description

R
I
BO
BO
BO

X
XS
MS
E
ENC

Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8
YS

R
R
R
R
R
R
R
R
I

output quantity 1
output quantity 2
output quantity 3
output quantity 4
output quantity 5
output quantity 6
output quantity 7
output quantity 8
control output

REAL type function block for de-multiplexing. The block can be


cascaded.
it can be used to configure a communications channel from an
operator control and visualization station to SIMADYN D, which can
be subsequently expanded.

Mode of operation

The function block switches its input X to one of the 8 selectable outputs
Y1 to Y8, depending on inputs ENC, R, MS and XS = 1 to 8. (example:
XS = 3 signifies Y3 = X).
For XS = 0 or XS >= 9, none of the block outputs Y1 to Y8 are selected.
Non-selected outputs are either set to 0 or retain their previous value up
to the next change.
For the control inputs, the priority is as follows: ENC before R before MS
For ENC = 0, all outputs Y1 to Y8 remain unchanged, independent of R
and MS,
for ENC = 1, outputs Y1 to Y8 are enabled for change.
For R = 1 all outputs Y1 to Y8 have the value 0 independent of MS.
For MS = 0 (non-latching operation), all of the outputs Y1 to Y8, not
selected by XS, have the value 0.
For MS = 1 (latching operation), all of the outputs, not selected by XS,
remain unchanged.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-25

Logic blocks

Truth table
ENC

MS

XS

Outputs Y1 to Y8

The previous values are kept

Y1 to Y8 = 0

1 <= XS <= 8

Selected output = X
Non-selected output = 0

XS = 0 or

Y1 to Y8 = 0

XS >= 9
1

1 <= XS <= 8

Selected output = X
Non-selected outputs remain unchanged

XS = 0 or
XS >= 9

All previous values remain unchanged

For XS = 0 to 8, YS = 0
For XS > 8, the following is valid: YS = XS-8
(Used when cascading).
Block output YS should be connected to block input XS of the following
function block.

Cascading
I/O
X

Input quantity

(default: 0.0)

XS

Control input

(default: 0)

MS

Save mode

(default: 0)

Reset

(default: 0)

ENC

Enable change

(default: 0)

Y1

Output quantity 1

(default: 0.0)

...

...

Y8

Output quantity 8

(default: 0.0)

YS

Control output

(default: 0)

Configuringdata

6-26

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

4,3
1,4
0,7

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.6.2 DX8_I Demultiplexer, 8 outputs, can be cascaded (INTEGER type)


Symbol
DX8_I
input quantity
control input
save mode
reset
change enable

Brief description

I
I
BO
BO
BO

X
XS
MS
R
ENC

Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8
YS

I
I
I
I
I
I
I
I
I

output quantity 1
output quantity 2
output quantity 3
output quantity 4
output quantity 5
output quantity 6
output quantity 7
output quantity 8
control output

Integer-type function block for de-multiplexing. The block can be


cascaded.
it can be used to configure a communications channel from an
operator control- and visualization station to SIMADYN D, which can
be subsequently expanded.

Mode of operation

The function block switches its input X to one of the 8 selectable outputs
Y1 to Y8, depending on inputs ENC, R, MS and XS = 1 to 8. (example:
XS = 3, signifies Y3 = X).
For XS = 0 or XS >= 9, none of the block outputs Y1 to Y8 are selected.
Non-selected outputs are either set to 0, or retain their previous value up
to the next change..
For the control inputs, the priority rating is as follows: ENC before R
before MS
For ENC = 0, all outputs Y1 to Y8, remain unchanged, independent of R
and MS.
For ENC = 1, outputs Y1 to Y8 are enabled for change.
For R = 1 all outputs Y1 to Y8 have the value 0 independent of MS.
For MS = 0 (non-latching operation), all of the outputs Y1 to Y8, not
selected by XS, have the value 0.
For MS=1 (latching operation), all of the outputs, not selected by XS,
remain unchanged.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-27

Logic blocks

Truth table
ENC

MS

XS

Outputs Y1 to Y8

The previous values are retained

Y1 to Y8 = 0

1 <= XS <= 8

Selected output = X
Non-selected output = 0

XS = 0 or

Y1 to Y8 = 0

XS >= 9
1

Selected output = X

1 <= XS <= 8

Non-selected outputs remain unchanged


1

XS = 0 or
XS >= 9

All previous values remain unchanged

* = any
For XS = 0 to 8, YS = 0.
For XS > 8, the following is valid: YS = XS-8
(used when cascading)
Block output YS should be connected to block input XS of the following
function block.

Cascading
I/O
X

Input quantity

(default: 0)

XS

Control input

(default: 0)

MS

Save mode

(default: 0)

Reset

(default: 0)

ENC

Enable change

(default: 0)

Y1

Output quantity 1

(default: 0)

...

...

Y8

Output quantity 8

(default: 0)

YS

Control output

(default: 0)

Configuringdata

6-28

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

4,2
1,4
0,7

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.6.3 MUX8 Multiplexer, can be cascaded (REAL type)


Symbol
MUX8
input quantity 1
input quantity 2
input quantity 3
input quantity 4
input quantity 5
input quantity 6
input quantity 7
input quantity 8
cascading input
control word
enable

R
R
R
R
R
R
R
R
R
I
BO

X1
X2
X3
X4
X5
X6
X7
X8
CCI
XCS
EN

Y
CCS
QF

R output quantity
I cascading control word
BO error message

Brief description

REAL type function block for 8 x multiplex operation. The block can be
cascaded.

Mode of operation

The block outputs the value of cascading input CCI at Y as long as


enable input EN is logical 0.
If EN is 1, one of the input quantities X1, ..., X8 is switched-through to
output Y as long as the 16-bit control XCS has a value between 1 and 8.
If the value of XCS > 8, output Y goes to 0, and output QF is 1. The
cascading control Word has the value CCS = XCS-8; refer to the truth
table.
Outputs Y, CCS and QF can be used to cascade the blocks. In this case,
output Y of the first block is connected with input CCI of the next
multiplier; output CCS with the next input XCS and output QF with the
next input EN.

Block diagram

XCS

EN

X1.
..

X8
CCI

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

MUX

Y
CCS
QF

6-29

Logic blocks

Truth table
EN

XCS

CSS

QF

any

CCI

X1

X2

X3

X4

X5

X6

X7

X8

>8

XCS-8

Cascading

MUX8
Qty. 1 Qty. 2 Qty. 3 Qty. 4 Qty. 5 Qty. 6 Qty. 7 Qty. 8 Casc. Cntrl. Enab. -

MUX8
X1 Y
Qty. 9 - R
R
Qty. 10 X2 CCS I
X3 QF BO
Qty. 11 X4
Qty. 12 X5
Qty. 13 Qty. 14 X6
X7
Qty. 15 Qty. 16 X8

R
R
X1 Y
X2 CCS I
BO
X3 QF
X4
X5
X6
X7
X8
CCI
I
XCS
BO EN

I
BO

- Output
- Casc.
- Error

CCI
XCS
EN

I/O
X1

Input quantity 1

(default: 0.0)

...

...

...

X8

Input quantity 8

(default: 0.0)

CCI

Cascading input

(default: 0.0)

XCS

Control Word, value range: 0 <= XCS <= 32767

(default: 0)

When a negative value is entered at XCS, it is limited to 0.


EN

Enable

(default: 0)

Output quantity

(default: 0.0)

CCS

Cascading control Word

(default: 0)

QF

Error message

(default: 0)

Configuringdata

6-30

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

4,6
1,5
0,8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.6.4 MUX8_I Multiplexer, can be cascaded (INTEGER type)


Symbol
MUX8_I
input quantity 1
input quantity 2
input quantity 3
input quantity 4
input quantity 5
input quantity 6
input quantity 7
input quantity 8
cascading input
control word
enable

I
I
I
I
I
I
I
I
I
I
BO

X1
X2
X3
X4
X5
X6
X7
X8
CCI
XCS
EN

Y
CCS
QF

I output quantity
I cascading control word
BO error message

Brief description

INTEGER type function block for 8 x multiplex operation. The block can
be cascaded.

Mode of operation

The block outputs the value of cascading input CCI at Y as long as


enable input EN is logical 0.
If EN is 1, one of the input quantities X1, ..., X8 is switched-through to
output Y as long as the 16-bit control Word XCS has a value between 1
and 8.
If the value of XCS > 8, output Y goes to 0, and output QF is 1. The
cascading control Word has the value CCS = XCS-8; refer to the truth
table.
Outputs Y, CCS and QF can be used to cascade the blocks. In this case,
output Y of the first block is connected with input CCI of the next
multiplexer; output CCS with the next input XCS and output QF with the
next input EN.

Block diagram

XCS

X1
..
.
X8
CCI

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

EN

Y
CCS

MUX

QF

6-31

Logic blocks

Truth table
EN

XCS

CSS

QF

any

CCI

X1

X2

X3

X4

X5

X6

X7

X8

>8

XCS-8

Cascading

MUX8_I
Qty. 1 - I
I
X1 Y
Qty. 2 X2 CCS I
Qty. 3 X3 QF BO
Qty. 4 X4
Qty. 5 X5
Qty. 6 X6
Qty. 7 X7
Qty. 8 X8
Casc. CCI
Cntrl. XCS
Enab. - BO EN

MUX8_I
Qty. 9 - I
Qty. 10 Qty. 11 Qty. 12 Qty. 13 Qty. 14 Qty. 15 Qty. 16 -

BO

- Outp.
X1 Y
I
- Casc.
X2 CCS
X3 QF
BO - Error
X4
X5
X6
X7
X8
CCI
XCS
EN

I/O
X1

Input quantity 1

(default: 0)

...

...

...

X8

Input quantity 8

(default: 0)

CCI

Cascading input

(default: 0)

XCS

Control word, value range: 0 <= XCS <= 32767

(default: 0)

When a negative value is entered at XCS, it is limited to 0.


EN

Enable

(default: 0)

Output quantity

(default: 0)

CCS

Cascading control word

(default: 0)

QF

Error message

(default: 0)

Configuringdata

6-32

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

3,4
1,1
0,6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.7

Memory

6.7.1 CNM Controllable numerical quantity (REAL type)


Symbol
CNM

input quantity 1
input quantity 2
save input quantity 1
save input quantity 2

Brief description

R
R
BO
BO

X1
X2
I1
I2

R saved input quantity

REAL type function block to save an instantaneous input value (also


known as sample and hold function) with
selectable input
selectable save instant
initiated by a rising-edge
Blocks CNM_I and CNM_D fulfill the same function. They only differ as
far as the data type used.

Mode of operation

For a rising edge at I1, X1 is switched-through to output Y.


For a rising edge at I2, X2 is switched-through to output Y.
The saved input quantity remains at Y until the next rising edge at I1 or I2
switches-through the next instantaneous value.
If rising edges simultaneously occur at I1 and I2, I1 has priority, and X1 is
switched-through to Y.

Initialization

If input I1 or I2 receive the value 1 from a previous output at initialization,


the block cannot identify a positive edge at the first cyclic execution. The
block identifies a rising edge at the first cyclic execution. In the INIT
mode, the values for I1 and I2 are buffered.

Block diagram

X1
I1
I2
X2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-33

Logic blocks

Truth table
Input

Output Y at the triggering instant

I1

I2

Yn = Yn-1

0 -> 1

Yn = X2n

0 -> 1

Yn = X1n

0 -> 1

0 -> 1

Yn = X1n

*
: no rising edge
0 -> 1 : rising edge
I/O
X1

Input quantity 1

X2

Input quantity 2

(default: 0.0)

I1

Save input quantity 1

(default: 0)

I2

Save input quantity 2

(default: 0)

Saved input quantity

(default: 0.0)

Configuringdata

(default: 0.0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,9
1,0
0,5

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.7.2 CNM_D Controllable numerical memory (DOUBLE-INTEGER type)


Symbol
CNM_D

input quantity 1
input quantity 2
save, input quantity 1
save, input quantity 2

Brief description

DI
DI
BO
BO

X1
X2
I1
I2

DI saved input quantity

DOUBLE-INTEGER type function block to save an instantaneous input


value (also known as sample and hold function with
selectable input
selectable save instant
initiated by a rising-edge
Blocks CNM and CNM_I fulfill the same function. They only differ as far
as the data type used.

6-34

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Mode of operation

For a rising edge at I1, X1 is switched through to output Y.


For a rising edge at I2, X2 is switched through to output Y.
The saved input quantity remains at Y until the next rising edge at I1 or I2
switches-through the next instantaneous value.
If rising edges simultaneously occur at I1 and I2, I1 has priority, and X1 is
switched-through to Y.

Initialization

If input I1 or I2 receive the value 1 from a previous output at initialization,


the block cannot identify a positive edge at the first cyclic execution. The
block identifies a rising edge at the first cyclic execution. In the INIT
mode, the values for I1 and I2 are buffered.

Block diagram

X1
I1
I2
X2

Truth table
Input

Output Y at the triggering instant

I1

I2

Yn = Yn-1

0 -> 1

Yn = X2n

0 -> 1

Yn = X1n

0 -> 1

0 -> 1

Yn = X1n

*
: no rising edge
0 -> 1 : rising edge
I/O
X1

Input quantity 1

(default: 0)

X2

Input quantity 2

(default: 0)

I1

Save, input quantity 1

(default: 0)

I2

Save, input quantity 2

(default: 0)

Saved input quantity

(default: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-35

Logic blocks

Configuringdata

6-36

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,9
1,0
0,5

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.7.3 CNM_I Controllable numerical memory (INTEGER type)


Symbol
CNM_I

input quantity 1
input quantity 2
save, input quantity 1
save, input quantity 2

Brief description

I
I
BO
BO

X1
X2
I1
I2

I saved input quantity

INTEGER type function block to save an instantaneous input value (also


known as sample and hold function) with
selectable input
selectable save instant
rising-edge triggered initiation
Blocks CNM and CNM_D fulfill the same function. They only differ as far
as the data type used.

Mode of operation

For a rising edge at I1, X1 is switched through to output Y.


For a rising edge at I2, X2 is switched through to output Y.
The saved input quantity remains at Y until the next rising edge at I1 or I2
switches-through the next instantaneous value.
If rising edges simultaneously occur at I1 and I2, I1 has priority, and X1 is
switched through to Y.

Initialization

If input I1 or I2 receive the value 1 from the previous output at


initialization, the block cannot identify a positive edge at the first cyclic
execution. The block identifies a rising edge at the first cyclic execution.
In the INIT mode, the values for I1 and I2 are buffered.

Block diagram

X1
I1
I2
X2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-37

Logic blocks

Truth table
Input

Output Y at the triggering instant

I1

I2

Yn = Yn-1

0 -> 1

Yn = X2n

0 -> 1

Yn = X1n

0 -> 1

0 -> 1

Yn = X1n

*
: No rising edge
0 -> 1 : Rising edge
I/O
X1

Input quantity 1

X2

Input quantity 2

(default: 0)

I1

Save input quantity 1

(default: 0)

I2

Save input quantity 2

(default: 0)

Saved input quantity

(default: 0)

Configuringdata

(default: 0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,6
0,9
0,5

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.7.4 DFR D-flipflop, R-dominant (BOOL type)


Symbol
DFR

trigger input
D input
setting
resetting

BO
BO
BO
BO

I
D
S
R

Q
QN

BO binary quantity
BO inverted binary quantity

Brief description

BOOL type function block which is used as D flipflop, reset dominant

Mode of operation

If both inputs S and R are 0, for a rising edge at trigger input I, the D input
information is switched through to output Q. Output QN always has the
inverse value of output Q. Output Q is set to 1 for a 1 at input S. If input R
is set to 1, output Q is set to 0. If both inputs are 0, then Q does not
change. On the other hand, if both inputs S and R are 1, Q is 0, as the
reset input dominates.

Initialization

If input 1 receives the value 1 from the previous output at initialization,


the block does not identify a rising edge at the first cyclic execution. The
block identifies a rising edge at the first cyclic execution. In the INIT
mode, the value of I is buffered.

6-38

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Block diagram

S
Q

D
I

QN

R
Truth table
D

Binary command

QN

0 -> 1

0 -> 1

1 -> 0

Qn-1

Qn-1

Timing diagram
with D and I

I
D
Q
QN

Output statuses

1
0
1
0
1
0
1
0

Output pulse Q as a function of the D input and input pulse I for


S=R=0
I/O
I

Trigger input

(default: 0)

D input

(default: 0)

Setting

(default: 0)

Resetting

(default: 0)

Binary quantity

(default: 0)

QN

Inverted binary quantity

(default: 1)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-39

Logic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

6,0
2,0
1,0

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.7.5 DFR_W Reset-dominant D flipflop (WORD type)


Symbol
DFR_W

D input
trigger input
setting
resetting

W
BO
BO
BO

IS
I
S
R

QS
QSN

W output quantity
W inverted output quantity

Brief description

WORD type function block which is used as D flipflop, reset dominant.

Mode of operation

If both inputs S and R = 0, then with an increasing edge at trigger input I,


the D-input information is switched through to output QS. Output QSN
always has the inverse value to output QS. If S = 1, all of the bits of
output quantity QS are set to 1. If R = 1, all the bits of output quantity QS
are set to 0. If both inputs S and R = 0, then output QS does not change.
If both inputs S and R = 1, then all the bits of output quantity QS are set
to 0, as the reset input R dominates.

Initialization

If input I receives the value from a previous output, at initialization, the


block does not identify a rising edge at the first cyclic execution. The
block identifies a rising edge at the first cyclic execution. In the INIT
mode, the value for I is buffered.

Block diagram

S
QS

IS
I

QSN

6-40

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Truth table
I

Binary command

Output statuses

QS

QSN

0 -> 1

IS

IS inverted

* = any
Timing diagram
with I and IS

1
0
1
ISn
0
1
QSn
0
QSNn 1
0
I

Output quantities QS and QSN in as a function of trigger input I and D


input IS for S = R = 0
(n is bit number)
I/O
IS

D input

(default: 16#0000)

Trigger input

(default: 0)

Setting

(default: 0)

Resetting

(default: 0)

QS

Output quantity

(default: 16#0000)

QSN

Inverted output quantity

(default: 16#FFFF)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,3
1,4
0,7

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.7.6 RSR RS flipflop, R-dominant (BOOL type)


Symbol
RSR

setting BO
resetting BO

Brief description

S
R

Q
QN

BO binary quantity
BO inverse binary quantity

This function block is used as static binary value memory

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-41

Logic blocks

Mode of operation

Output Q is set to 1 when input S is at 1. If input R is at 1, output Q is set


to 0. If both inputs are 0, then output Q does not change. However, if
both inputs are 1, Q is 0, as the reset input dominates.
Output QN always has the inverse value to output Q.

Block diagram

QN

Binary values for setting/resetting command

Truth table
Binary command

Output status Q

Q does not change

Q=0

Q=1

Q=0

I/O
S

Setting

(default: 0)

Resetting

(default: 0)

Binary quantity

(default: 0)

QN

Inverse binary quantity

(default: 1)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

3,5
1,2
0,6

6.7.7 RSS RS flipflop, S-dominant (BOOL type)


Symbol
RSS

setting BO
resetting BO

6-42

S
R

Q
QN

BO binary quantity
BO inverse binary quantity

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Brief description

BOOL type function block which is used as static binary value memory

Mode of operation

Output Q is set to 1 with a 1 at input S. If input R is 1, output Q is set to 0.


If both inputs are 0, then output Q does not change. However, if both
inputs are set to 1, then Q is also 1 as the setting input dominates.
Output QN always has the inverse value of Q.

Block diagram

QN

Binary values for setting/resetting commands

Truth table
Binary command

Output status Q

Q does not change

Q=0

Q=1

Q=1

I/O
S

Setting

(default: 0)

Resetting

(default: 0)

Binary quantity

(default: 0)

QN

Inverse binary quantity

(default: 1)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,5
1,2
0,6

6-43

Logic blocks

6.8

Buffers

6.8.1 DAT Function block to input/output real values in/out of a data


memory (REAL type)
Symbol
DAT

No. of values which can be saved


save data memory
input quantity
address input (offset)
trace / output

I
BO
R
I
BO
BO

TBL
SAV
X
ADR
RW
EN

Y
ADV
QTS

R output quantity
I address outout
BO operationing status

enable

Brief description

The function block saves a REAL type input quantity at a specific location
in a data memory or it retrieves from there.

Mode of operation

The block is only active, if both input EN=1 (block enabled) and output
QTS=1 (data memory available). In this case, input RW defines the block
mode (trace/output).
For both modi, the memory location offset (referred to the start of the
data memory) should be specified as address input, in which the input
quantity is entered, or from which the output quantity is to be read. The
following is valid 0 <= ADR <= (TBL-1). If the ADR value is too high, then
it is limited to (TBL-1). The following operating modi are possible:
Trace mode (EN = 1, QTS = 1, RW = 0):
The input quantity X is entered in the memory location addressed by
ADR.
Address output ADV is set to 0.
Outputs Y and QTS remain unchanged.
Output mode (EN = 1, QTS = 1, RW = 1):
The contents of the memory location, addressed by ADR, are read
and output as output quantity Y.
Value ADR is output as address output (output ADV).
Output QTS remains unchanged. If the value ADR is too high, then it
is limited to (TBL-1).
All outputs remain unchanged for EN=0 and/or QTS=0.

Initialization

In the initialization mode, space is reserved for a data memory to accept


real values. The number of real values is specified via input TBL.
Initialization input SAV is used to specify as to whether the data memory
is to be set-up in the local RAM (SEV = 0) or in the battery-buffered RAM
(SAV=1).
If the data memory is located in the battery-buffered RAM, then after a
system run-up, the function block again synchronizes itself to the data
memory. In this case, already recorded/traced values are retained.

6-44

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

If the data memory cannot be set-up at initialization, then the function


block flags this with QTS = 0; otherwise, at the initialization mode, QTS is
set to 1.
I/O
TBL

The number of values which can be saved is specified at initialization input TBL.
The value at the input is limited to 0 when a negative value is entered. Value range:
0 <= TBL <= 32767
(default: 0)

SAV

Initialization input SAV is used to define whether the data memory is set-up in the
battery-buffered RAM (SAV = 1) or in the local RAM (SAV = 0).
(default: 0)

Input quantity to be traced.


(default: 0.0)

RW

For RW = 0, the block is in the trace mode; for RW = 1, in the output mode.
(default: 0)

EN

For EN=0, the block is neither tracing nor is it in the output mode; for EN=1, the block
is operating in accordance with the signal at RW.
(default: 0)

Output quantity.
(default: 0.0)

QTS

Block output QTS indicates whether the block is operational (QTS = 1).
(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,8
0,9
0,5

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.8.2 DLB Delay block (REAL type)


Symbol
DLB

No. of values which can be saved I


input quantity R
select address (read offset) I

TBL
X
ADR

Y
QTS

R output quantity
BO operating status

Brief description

REAL type function block to output an input quantity, which is delayed by


a number of sampling times which can be specified.

Mode of operation

If the operating status QTS=1, then the function block has a delay
memory, with size TBL. The input quantity, entered at input X, is output
as output quantity Y after a delay. The delay is defined by the integer
multiple ADR of sampling steps. For operating status QTS=0, the delay
memory is not activated. In this case, the input quantity, entered at input
X, is immediately output as output quantity Y.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-45

Logic blocks

At initialization, space is reserved for a delay memory to accept TBL input


quantities. If the required delay memory can be requested with TBL > 0,
then QTS is set to 1. Otherwise QTS = 0.

Initialization

NOTE

If a select address ADR is specified when the system restarts, which is


greater than the number of already saved input quantities, then output
quantity Y has an undefined value.
The value of delay ADR is limited to the memory size TBL.

I/O
TBL

Number of values which can be saved, value range: 0 <= TBL <= 32767
The value is limited to 0 if a negative value is entered.
(default: 0)

Input quantity

(default: 0.0)

ADR

Select address (read offset)

(default: 0)

Output quantity

(default: 0.0)

QTS

Operating status

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,6
0,9
0,5

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.8.3 SAV Value buffer (REAL type)


Symbol
SAV

input quantity R
oper. mode BO

Brief description

X
M

Y
QF

R output quantity
BO no available memory

REAL type function block to save a quantity to processed in the


battery buffered area of the RAM on a CPU module. It is suitable for 4
byte connection formats.
function blocks SAV_I, SAV_B, SAV_D and SAV fulfill the same
function. They only differ by the data type used.

Mode of operation

The function block is a read write memory for a 4 byte input quantity. The
quantity to be saved, for example, it must be available after a power
failure, is connected at input X.
The following block modes are set at input M.
Write mode (M = 1):
Input quantity X is available at Y. Further, X is entered into the batterybuffered memory area of the CPU module. The previous value is then
overwritten.

6-46

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Read mode (M = 0):


The last input quantity saved in the write mode is available at output
Y. If there is an error in the battery buffered memory area, then the
block changes over into the write mode.
I/O
X

Input quantity

(default: 0.0)

Mode

(default: 0)

Output quantity

(default: 0.0)

QF

No free memory

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,1
1,4
0,7

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.8.4 SAV_B Value buffer (BOOL type)


Symbol
SAV_B

binary value BO
oper. mode BO

Brief description

I
M

Q
QF

BO binary value
BO no available memory

BOOL type function block to save a binary quantity in the batterybuffered area of the RAM on a CPU module.
function blocks SAV_I, SAV_B, SAV_D and SAV fulfill the same
function. They only differ by the data type used.

Mode of operation

The function block is a read write memory for one binary quantity.
The quantity to be saved, for example, it must be available after a power
failure, is connected at input I.
The following block modes are set at input M.
Write mode (M = 1):
Binary quantity I is available at Q. Further, I is entered into the battery
buffered memory area of the CPU module. The previous value is then
overwritten.
Read mode (M = 0):
The last binary quantity saved in the write mode is available at output
Q. If there is an error in the battery-buffered memory area, then the
block changes-over into the write mode.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-47

Logic blocks

I/O
I

Binary value

(default: 0)

Mode

(default: 0)

Binary value

(default: 0)

QF

No free memory

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

4,0
1,3
0,7

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.8.5 SAV_D Value buffer (DOUBLE-INTEGER type)


Symbol
SAV_D

input quantity D
operating mode BO

Brief description

X
M

Y
QF

D output quantity
BO no available memory

this DOUBLE-INTEGER type function block is used to save a quantity


to be processed in the battery buffered area of the RAM on CPU
module. It is suitable for Double Integer connection types.
function blocks SAV_I, SAV_B, SAV_D and SAV fulfill the same
function. They only differ by the data type used.

Mode of operation

The function is a read-write memory for a DOUBLE-INTEGER input


quantity. The quantity to be saved, for example it must be available after
power failure, is connected at input X.
The following block modes are set at input.
Write mode (M = 1):
Input quantity X is available at Y. Further, X is entered into the batterybuffered memory area of the CPU module. The previous value is then
overwritten.
Read mode (M = 0):
The last input quantity saved in the write mode is available at output
Y. If there is an error in the battery-buffered memory area, then the
block changes-over into the write mode.

I/O
X

Input quantity

(default: 0)

Mode

(default: 0)

Output quantity

(default: 0)

QF

No free memory

(default: 0)

6-48

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,8
1,3
0,7

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.8.6 SAV_I Value buffer (INTEGER type)


Symbol
SAV_I

input quantity I
operating mode BO

Brief description

X
M

Y
QF

I output quantity
BO no available memory

INTEGER type function block saves a quantity to be processed in the


battery-buffered area of the RAM on a CPU module.
It is suitable for all 2-byte connection formats.
function blocks SAV_I, SAV_B, SAV_D and SAV fulfill the same
function. They only differ by the data type used.

Mode of operation

The function block is a read write memory for one word. The quantity to
be saved, for example, it must be available after a power failure, is
connected at input X.
The following block modes are set at input M:
Write mode (M = 1):
Input quantity X is available at Y. Further, X is entered into the batterybuffered memory area of the CPU module. The previous value is then
overwritten.
Read mode (M = 0):
The last quantity saved in the write mode is available at output Y. If
there is an error in the battery buffered memory area, then the block
changes over into the write mode.

I/O
X

Input quantity

(default: 0)

Mode

(default: 0)

Output quantity

(default: 0)

QF

No free memory

(default: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-49

Logic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,5
1,2
0,6

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.8.7 TSAV, TSAV_B, TSAV_I, TSAV_Dvalues are backed-up in the


technology save area (TSAVE area)
Symbol
TSAV

Input value R
Operating mode BO

Brief description

X
M

Y
VTM
FTM
MTM
QF

R Output value
BO Valid TSAVE memory
DI Free TSAVE memory
DI Max. TSAVE memory
BO No free memory

This function block is used to save a value in the area that is backedup using a battery (TSAVE) of the working memory on a CPU module.
The value that has been saved is also kept even after the user
program is downloaded again - as long as the battery buffers the
memory or the delete ID is explicitly set when loading the user
program.
The blocks TSAV, TSAV_B, TSAV_I and TSAV_D fulfill the same
function. They only differ by the data type that is used at connections
X and Y.

Mode of operation

This function block is a read-write memory for one input quantity.


The quantity to be saved - e.g. that should be still available after a power
failure - is connected at input X.
The following block modes are set at input M.
Writing mode (M = 1):
The input value I is available at Y. In addition, X is entered into the
TSAVE area of the CPU module. This means that the previous value
is overwritten.
Reading mode (M = 0):
The last value saved in the write mode is available at Y. If there is an
error in the battery-buffered memory area, then the block changesover into the write mode.

6-50

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

I/O
default
X

Input value

Mode

Output value

VTM Valid TSAVE memory

A 1 at the VTM indicates that the last value saved in the TSAVE memory, has been
again found and is valid.
A 0 at the VTM indicates that the TSAVE memory no longer contains a saved value.
0.0 is output at Q as replacement value.
FTM Free TSAVE memory

FTM indicates the number of bytes that are still free in the TSAVE memory. It should be
noted that every
TSAV block requires a specific amount of the memory for administration purposes.
MT
M

Maximum TSAVE memory

QF

No free memory

MTM indicates the size of the TSAVE memory in bytes. This corresponds to the data in
HW Config (CPU Properties/addresses/ size of the TSAVE area) minus the
component of the memory required for administration purposes.

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Can be configured in

Alarm tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4.0
2,4
0,3

6-51

Logic blocks

6.9

Special functions

6.9.1 BF Flash function for a binary quantity (BOOL type)


Symbol
BF

flash duration TS
enable BO

Brief description

T
EN

BO flash output

BOOL type function block


to control, e.g. signal lamps
as clock generator

Mode of operation

The function block sets its output alternatively to 1 and 0 in the rhythm of
period T if input EN = 1.
Output Q = 0 if the enable input EN = 0.
T is the on and off period.

Block diagram

EN

Timing diagram
EN

1
0

1
0

Flash pulse Q as a function of flash duration T and enable EN


I/O
T

Flash duration

(default: 0ms)

EN

Enable

(default: 0)

Flash output

(default: 0)

6-52

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,2
1,1
0,6

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.9.2 BF_W Flash function for a status word (WORD type)


Symbol
BF_W

status word W
flash duration TS

IS
T

QS

W flash output, status word

Brief description

Word type function block to control, e.g. a lamp combination

Mode of operation

The function block sets all of the bits of the input status word IS, which
have the value 1, alternatively to 1 and 0 in the output status word QS in
the rhythm of period T.
T is the on and off period.

Block diagram

IS

QS

I/O
IS

Status Word

(default: 16#0000)

Flash duration

(default: 0ms)

QS

Flash output, status Word (default: 16#0000)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6,8
2,2
1,1

6-53

Logic blocks

6.9.3 DTS Synchronization delay time (BOOL type)


Symbol
DTS

delay time in ms TS
activate delay time BO
synchronizing BO

Brief description

DT
ISE
ISY

QF

BO delay time too long

The BOOL type function block is used to change the delay time and to restart the synchronization, configured in HWConfig, after it has failed. It
only acts on synchronized CPU modules.
The delay time is limited to min. 0.01 ms.

Mode of operation
Delay time:
The function block attempts to change, the delay time specified by
HWConfig, to the value specified at block input DT, if the input at ISE
changes from a 0 to a 1.
If the delay time, requested at DT, is the same or longer than the basic
sampling time, configured with HWConfig minus 0.01 ms, then the delay
time is not changed to the requested value. In this case, block output QF
is set to 1 to indicate the error.
If input ISY changes from 0 to 1, an attempt is made to take the basic
clock again from the source configured in HWConfig (if required, with the
configured delay time).
Synchronization:
If synchronization cannot be restarted, because the source is still faulted,
then there is no cyclic processing for four basic sampling times; after this,
"emergency operation" with the internal basic clock cycle, is used.
The function block may only be configured once per CPU module. It can
be configured in any sampling time. A long sampling time is
recommended due to its low update potential.
I/O
DT

Delay time in ms

(default: 0.01ms)

ISE

Activate delay time

(default: 0)

ISY

Re-activate synchronization

(default: 0)

QF

Delay time too long

(default: 0)

Configuringdata

6-54

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

5,3
1,8
0,9

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.9.4 ETE Edge evaluator (BOOL type)


Symbol
ETE

input pulse BO

QP
QN

BO output pulse
BO output pulse

Brief description

Edge evaluator

Mode of operation

The function block identifies a signal change at input I. For a rising edge
(01) at input I, output QP is set to 1 for sampling time TA.
For a falling edge (10) at input I, output QN is set to 1 for one sampling
time TA.

Initialization

Initialization defines the initial status for the first cyclic execution.
If input I receives the value 1 from a previous block, then the function
block cannot identify a rising edge at the first cyclic execution.
If input I receives the value 0 from a previous block at initialization, then
the function block cannot identify a falling edge at the first cyclic
execution.

Block diagram

QP
I

Timing diagram

QN

QP

1
0

TA

TA

1
0
TA

QN

1
0

Output pulses QP and QN as a function of the sampling time


TA and input pulse I

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-55

Logic blocks

I/O
I

Input pulse

(default: 0)

QP

Output pulse

(default: 0)

QN

Output pulse

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,0
1,0
0,5

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

6.9.5 FUI_W First up indicator (WORD type)


Symbol
FUI_W

monitored status word W


enable BO

IS
EN

QN

W first up status word

Brief description

This function block monitors status word changes

Mode of operation

The function block sets, at output QS, the bits, which after the block was
enabled (EN=1), first changed at IS.
All of the bits at output QS are at 0 as long as EN=0.
The status diagram illustrates a case, where the enable signal was
provided at an instant at which status Word ISn-1 is present.

Status diagram
ISn-1

1 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1

QSn-1

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Enable = 1
ISn

QSn

1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0

0 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1
Monitored status word (16 bits)

First time that IS changes, after EN=1 and QS changes

6-56

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

I/O
IS

Monitored status Word

(default: 16#0000)

EN

Enable

(default: 0)

QS

First value status Word

(default: 16#0000)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,5
0,8
0,4

6.9.6 LVM Limit value monitor with hysteresis, 2 directions (BOOL type)
Symbol
LVM

input quantity
average interval value
interval limit
hysteresis

Brief description

R
R
R
R

X
M
L
HY

QU
QM
QL

BO input quantity, above the interval


BO input quantity, inside the interval
BO input quantity, below the interval

the BOOL type function block monitors an input quantity by comparing


with selectable reference quantities.
this can be used for
monitoring setpoints, actual and measured values
suppressing frequent switching (switch bounce)
the function block provides a window discriminator function.

Mode of operation

The function block calculates an internal intermediate value using a


transfer characteristic (refer to transfer characteristic) with hysteresis.
The intermediate value is compared with the interval limits, and the result
is output at QU, QM and QL. The transfer characteristic is configured
using the values for average value M, interval limit L and hysteresis HY.

Block diagram

HY
QU

QM
QL

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-57

Logic blocks

Transfer
characteristic

1
QU
0
1
QM
0
1
QL
0

M-L

HY

M+L
HY

I/O
X

Input quantity

(default: 0.0)

Average interval value

(default: 0.0)

Interval limit

(default: 0.0)

HY

Hysteresis

(default: 0.0)

QU

Input quantity, above the interval

(default: 0)

QM

Input quantity, within the interval

(default: 0)

QL

Input quantity, below the interval

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

4,9
1,6
0,8

6.9.7 NOP1 Dummy block (REAL type)


Brief description
NOTE

6-58

REAL type function block which is used as dummy block (No Operation).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

6.9.8 NOP1_B Dummy block (BOOL type)


Brief description
NOTE

BOOL-type function block which is used as dummy block (No Operation).


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.9.9 NOP1_D Dummy block (Double Integer type)


Brief description
NOTE

Double Integer type function block which is used as dummy block


(No Operation).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.9.10 NOP1_I Dummy block (Integer type)


Brief description
NOTE

Integer-type function block which is used as dummy block


(No Operation).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.9.11 NOP8 Dummy block (Real type)


Brief description
NOTE

Real type function block which is used as dummy block (No Operation).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.9.12 NOP8_B Dummy block, 8 binary quantities (BOOL type)


Brief description
NOTE

BOOL-type function block which is used as dummy block (No Operation).


Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.9.13 NOP8_D Dummy block, 8 4-byte quantities (Double Integer type)


Brief description
NOTE

Double Integer type function block which is used as dummy block


(No Operation).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

6-59

Logic blocks

6.9.14 NOP8_I Dummy block, 8 word quantities (INTEGER type)


Brief description
NOTE

INTEGER type function block which is used as dummy block


(No Operation).
Additional information, e.g. symbol, mode of operation, I/O and
technical data are provided in the corresponding online help.

6.9.15 PIN8 Priority evaluator


Symbol
Pin8

binary quantity priority 1


binary quantity priority 2
binary quantity priority 3
binary quantity priority 4
binary quantity priority 5
binary quantity priority 6
binary quantity priority 7
binary quantity priority 8
enable

BO
BO
BO
BO
BO
BO
BO
BO
BO

I1
I2
I3
I4
I5
I6
I7
I8
EN

Q1
Q2
Q3
Q4
Q5
Q6
Q7
Q8
Q

BO
BO
BO
BO
BO
BO
BO
BO
BO

binary quantity priority 1


binary quantity priority 2
binary quantity priority 3
binary quantity priority 4
binary quantity priority 5
binary quantity priority 6
binary quantity priority 7
binary quantity priority 8
all binary variables zero

Brief description

Function block for priority selection, 1 from 8

Mode of operation

For block inputs I1 to I8, which have binary value 1, for EN=1, the input
with the highest priority is switched through to the appropriate output Q1
to Q8. The priority rating is specified by the number of inputs I1 to I8. I1
has the highest priority and I8 the lowest priority.
If an enable signal is present, and if all inputs are 0, then output Q is set
to 1.
EN and Q can be used to cascade the priority evaluation blocks.

Cascading example

a.)

b.)
EN

EN
Q1
.
.
.
.
Q8

I1
.
.
.
.
I8
EN

I1
.
.
.
.
I8

Q
Q1
.
.
.
.
Q8

Q1
.
.
.
.
Q8

I1
.
.
.
.
I8

EN
I1
.
.
.
.
I8

Q1
.
.
.
.
Q8
Q

Example a.) shows how an 8 bit priority evaluator has been extended to
become a 16 bit priority evaluator. The next priority evaluator is only
enabled, if inputs I1 to I8 of the previous priority evaluator are 0. This
circuit is suitable to evaluate the priority of a status Word.

6-60

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Example b.) shows another circuit version. 8 priority evaluators can be


cascaded, from which only 1 is enabled, via outputs Q1 to Q8 of a priority
evaluator.
Truth table
Input

Output = 1

I1

I2

I3

I4

I5

I6

I7

I8

EN

Q1

Q2

Q3

Q4

Q5

Q6

Q7

Q8

- = all outputs are 0


* = any

I/O
I1

Binary quantity, priority 1

...

...

I8

Binary quantity, priority 8

(default: 0)

EN

Enable

(default: 0)

Q1

Binary quantity, priority 1

(default: 0)

...

...

Q8

Binary quantity, priority 8

(default: 0)

All binary quantities are zero

(default: 0)

Configuringdata

(default: 0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

13,7
4,5
2,3

6-61

Logic blocks

6.9.16 SH Shift block (WORD type)


Symbol

SH

status word W
shift number I

IS
XD

QS
QC
QZ

W output quantity
BO last shifted bit
BO IXDI > 15

Brief description

The Word type function block shifts a status Word, bitwise to the left or
right.

Mode of operation

The function block shifts the status word, available at input IS, bitwise by
a number of positions, specified at input XD.
When shifting newly created positions, in the output quantity, QS, zeros
are added, independent of the shift direction.
The last bit shifted-out is output at QC.
For XD = 0, QC is always 0.
For |XD| > 15 is always QC = 0, QS = 0, QZ = 1.
Shifting the left
Example:

XD = 2; IS = 15
-> QS = 60; QC = 0

Binary number from X1


0 0

0 0 0 1 1 1 1

Binary number from Y


0 0

0 1 1 1 1 0 0

Shifting to the right


Example:

XD = -2; IS = 15
-> QS = 3 (remainder dropped); QC = 1

Binary number from X1


0 0

0 0 0 1 1 1 1

Binary number from Y


0 0

0 0 0 0 0 1 1
XD positions are
lost

6-62

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

I/O
IS

Status word

(default:16#0000)

XD

Shift number, value range:XD limited to +/-15

(default: 0)

QS

Output quantity

(default: 16#0000)

QC

Last bit shifted-out

(default: 0)

QZ

XD>15

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3,7
1,2
0,6

6-63

Logic blocks

6.10 Processor interrupt generator


6.10.1 PAC Process interrupt counter
Symbol
PAC

trigger mode for STA


start/stop
operating mode
retrigger mode
run time limit value

Brief description

BO
BO
BO
BO
TS

TMB
STA
CON
RTM
LU

AI
Y

GV interrupt ID
TS runtime

function block to initiate a processor interrupt when a run time limit


value is reached.
interrupt IDs C1 and C2 are permissible. The block is not processed if
another interrupt ID is specified.
the run time limit value, entered at LU must be in the range from 0.1
ms to 128 ms. Otherwise, it is limited by the function block.

Mode of operation

The function block uses one of two hardware timers to initiate processor
interrupts. The timer and the processor interrupt processing is defined by
specifying interrupt ID C1 or C2.
The processor interrupt processing is started in an interrupt control task,
if the time, set at block input LU, has expired.
The function block differentiates between two operating modes, edge and
level triggering, which are configured using input TMB. The timer is reset
and started:
if TMB is 0, if a signal at input STA changes from 0 to 1 (edge
triggering) or,
if TMB is 1, if a 1 is available at input STA (signal level triggering).

For signal level triggering, the characteristics of the block are influenced
by the status of input RTM (retrigger mode):
if RTM is 0, the timer is only re-started, if it is not already running. This
therefore guarantees that a run time which is already started, will also
be reached.
if RTM is 1, the timer is also started, if it is already running. If the
sampling time, in which the block is configured, is shorter than the
time set at LU, then the run time is never reached.

The run time is held when the signal at input STA changes from 1 to 0.

6-64

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

Depending on the binary quantity at input CON when the timer is started,
there are two operating modes:

Modes

for CON equals 1 after the run limit value LU is reached, a processor
interrupt is generated and the timer is re-started.
for CON equals 0, after the run time limit value LU has been reached,
a processor interrupt is generated. The timer is not re-started.

The run time ( 0.0 <= Y <= LU) is always available at output Y.
I/O
TMB

Trigger mode for STA

STA

Start/stop

(default: 0)

CON

Operating mode

(default: 0)

RTM

Retrigger mode (0: cont., 1: restart)

(default: 0)

LU

Run time limit value

(default: 0ms)

AI

Interrupt ID

(no default)

Run time

(default: 0ms)

Configuringdata

(default: 0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Available on T400 to interrupt ID C1

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

4,0
1,3
0,7

6-65

Logic blocks

6.10.2 PAI Process interrupt periphery input


Symbol
PAI

invert binary quantity


interrupt for rising edge
interrupt for falling edge
initializing

Brief description

BO
BO
BO
BO

INV
POS
NEG
INI

AI
Q

GV interrupt ID
BO output quantity

function block to initiate a processor interrupt using the alarm-capable


binary inputs of CPU modules.
Interrupt IDs E1 to E4 are permissible. The block is not processed if
there is another interrupt ID
E1 corresponds to binary input 1
E2 corresponds to binary input 2
E3 corresponds to binary input 3
E4 corresponds to binary input 4
E5 corresponds to binary input 5
(only FM 458)
E6 corresponds to binary input 6
(only FM 458)
E7 corresponds to binary input 7
(only FM 458)
E8 corresponds to binary input 8
(only FM 458)

Mode of operation

The function block initializes the four interrupt-capable binary inputs of a


CPU module. Thus, process interrupts can be initiated by binary
quantities received from the periphery. The binary input is selected by
specifying interrupt IDs E1, E2, E3 or E4 at output AI.
When the signal at input INI changes from 0 to 1, the binary inputs are
initialized corresponding to block inputs POS and NEG. This means, that
they are capable of initiating a processor interrupt:
For a binary quantity set to 1 at input POS, the processor interrupt is
initiated at the transition from 0 to 1.
For a binary quantity set to 1 at input NEG, the processor interrupt is
initiated at the transition from 1 to 0.
The binary quantity, read-in is available for further processing at block
output Q. The binary input value is adapted, inverted when a binary
quantity at input INV is set to 1.
The value at input INV has no influence on the edge identification using
POS and NEG.

Initialization

The value at input INI is not saved.


The interrupt is enabled after initialization has been completed.
If the POS or NEG inputs have the value 1 when initializing, the
processor interrupt, defined by AI, is enabled, independent of the signal
transition at input INI. The output quantity Q is still not influenced.

6-66

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Logic blocks

I/O
INV

Invert binary quantity

(default: 0)

POS

Processor interrupt for rising edge

(default: 0)

NEG

Processor interrupt for falling edge (default: 0)

INI

Initialization

(default: 0)

AI

Interrupt ID

(no default)

Output quantity

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5,0
1,7
0,9

6-67

Logic blocks

6.10.3 PAS Process interrupt software


Symbol
PAS

initiate interrupt BO
trigger mode, both edges BO

I
TMB

AI

GV interrupt ID

Brief description

Function block to initiate a software process interrupt.

Mode of operation

The function block immediately starts a process interrupt in an interruptcontrolled task of the CPU.
This process interrupt processing is defined by the interrupt ID at output
AI. One of eight interrupt IDs S1 to S8 are possible.
Processing is started as a function of input TMB:
for TMB = 0, if input I changes from 0 to 1 or.
for TMB = 1, if any change takes place at input I.

I/O
I

Initiate interrupt

TMB

Trigger mode, both edges (default: 0)

AI

Interrupt identification

Configuringdata

6-68

(default: 0)
(no default)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

4,0
1,3
0,7

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Service-/diagnostic blocks

7.1

ASI Acknowledge signal (BOOL type)

Symbol
ASI
Q

Brief description
NOTE

Mode of operation

BO Acknowledge Output

The BOOL type function block is integrated in the @SIMD1 and @SIMD2
system charts.
This function block is only to be used for diagnostic purposes and should
not be used in the user program.
As long as the acknowledge button on the CPU module is depressed,
acknowledge output Q = 1.

I/O
Q

Acknowledge output

Configuringdata

(default: 0)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Systemmode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

4,2
1,4
0,7

7-1

Service-/diagnostic blocks

7.2

EPE Delete change memory

Symbol
EPE
key value I
erase BO

KEY
ERA

EPE

BO EEPROM is empty

Brief description

Function block to delete the change memory.

Mode of operation

The function block deletes the change memory of the module on which it
is configured.
The change memory is deleted, if
deletion is requested with a signal change from 0 to 1 at input ERA,
while
code 165 is available at the KEY input.
Thus, in the sampling time before initiating a delete, the input
combination KEY = 165 and ERA = 0 must be set-up.
At each sampling time, even if a delete has not been requested, it is
checked as to whether the change memory is deleted (still or already). If
this is the case, a 1 at output EPE indicates: the change memory is
empty.
If the change memory was not able to be (completely) deleted in the
sampling time, in which delete was requested, then delete is
automatically repeated in the following sampling times. EPE = 1 indicates
that the change memory was actually completely deleted.
In the INIT operating mode of the function block, if the input combination
KEY = 165 and ERA = 0, are present, this is ignored. Thus, in the
subsequent RUN operating mode, at first KEY must be set up to be 165,
ERA = 0, an then immediately afterwards, KEY = 165, ERA = 1, to delete
the change memory.

INIT operating
mode

I/O
KEY

Code

(Default: 0)

ERA

Delete

(Default: 0)

EPE

Change memory is empty

(Default: 1)

Configuringdata

7-2

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

6,7
2,2
1,1

Can be inserted online

yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

7.3

PNO CPU number (INTEGER type)

Symbol
PNO
Y

Brief description
NOTE

Mode of operation

I processor number

This INTEGER type function block is integrated in the @SIMD system


FB.
This function block should only be used for diagnostic purposes and
should not be used in the user program.
This function block outputs the configured CPU No. at output Y.

I/O
Y

CPU number

Configuringdata

(default: 1)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

5,0
1,7
0,9

7-3

Service-/diagnostic blocks

7.4

PSL Processor utilization (REAL type)

Symbol
PSL
simulated comput. load T1
simulated comput. load T2
simulated comput. load T3
simulated comput. load T4
simulated comput. load T5

TS
TS
TS
TS
TS

T1
T2
T3
T4
T5

Y1
Y2
Y3
Y4
Y5
QW

R
R
R
R
R
BO

meas. value:utilization T1
meas. value:utilization T2
meas. value:utilization T3
meas. value:utilization T4
meas. value:utilization T5
Alarm: simulated comput. time

Brief description

The REAL type function block is used to measure the utilization of five
cyclic tasks. There is also the possibility to simulate the effect of
additional computation load in the tasks.

Mode of operation

The function block determines the time between the start and end of a
cyclic task (run time). This run time is divided by the sampling time,
configured for the particular task in order to compute the utilization level
T1 to T5.
The utilization levels are output at Y1 to Y5. Values of less than 1 at
these outputs indicate that the particular task can be computed in the
sampling time configured.
If the output values Y1 to Y5 are greater than 1, this indicates that the
associated task is too large to be computed within one sampling cycle.
For example, an output is 1.3 which means that the associated task
would only be completed after approximately 30% of the second
sampling cycle after it was originally started. Thus, the task can only be
re-started at each second sampling cycle, i.e. sampling time failures
occur.
In this case, the task sampling time should be increased or the scope of
the task reduced; i.e. by shifting several blocks from this task into a
slower one.

NOTE

There is no (statistical) average value generation when determining the


run times. It involves the time actually required for the task. This time can
vary due to the different nesting of the cyclic tasks and if alarm tasks or
process interrupts are inserted while the task is being processed.
A computation time can be additionally added at inputs T1 to T5 for each
task. Input values greater than 0 ms correspond to an additional
simulated computation load. An input value of 0 ms means that there is
no additional computation load.
These additional simulation computation loads can be used to determine
how the task utilization is influenced when additional function blocks are
added.
Binary output QW is 1 if at least one simulated computation load was
specified. For QW = 0 this indicates that there is no simulated
computation load.

7-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

I/O
T1-T5

Simulated computation load T1-T5

(default: 0ms)

Y1-Y5

Measured value: utilization T1-T5

(default: 0.0)

QW

Simulated computation time

(default: 0)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

36,6
12,1
6,1

7-5

Service-/diagnostic blocks

7.5

RFG Ramp function (REAL type)

Symbol
RFG
amplitude
change per samling time
run-up time
on-button

R
R
TS
BO

X
A
T
I

R ramp function

Brief description

REAL type function block to generate test functions (ramp) with


adjustable amplitude and gradient (rate of change).

Mode of operation

If binary input I = 0, output Y is set to 0. The function block is enabled


with I = 1. While the ramp rises, Y is calculated from the previous output
value Y and gradient A.
Gradient A specifies by how many percent Y changes referred to 100%
output change during one sampling period (rate of change).
Algorithm:

Yn = Yn-1 + A
Block diagram

7-6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

Timing diagram

Y
X

T(X) > T
Fig. 1
T

T(X)

Y
X

Yn-Yn-1
Fig. 2

T(X) = T

TA
T = T(X)

Y
X

T(X) < T
Fig. 3
T(X)T

The following situations, referred to time instant T are illustrated in the


timing diagram:
final value still not reached Y(T) < X: T(X) > T
final value just reached

Y(T) = X: T(X) = T

final value already reached Y(T) > X: T(X) < T


T(X) the time, in which the ramp function would or has reached the value
of amplitude X.
Ramp-up time T influences the rise function, if, at instant T
the output value Y < X; in this case, at instant T a step is output on the
ramp. Value X is switched-through to Y (Fig. 1).
the output value Y > X; in this case, at instant T, value Y is limited to
the amplitude of X (Fig. 3).
If a timing characteristic in accordance with Fig. 2 is required, then the
following must be valid

X Yn - Yn-1
A
=
=
T
TA
TA
In this case, TA is the sampling time. With as the number of sampling
intervals, then

T = TA =

X
TA
A

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

7-7

Service-/diagnostic blocks

I/O
X

Amplitude

(default: 0.0)

Change per sampling time

(default: 0.0)

Ramp-up time

(default: 0ms)

On button

(default: 0)

Ramp function

(default: 0.0)

Configuringdata

7-8

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,7
0,9
0,5

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

7.6

SER Service block

Symbol
SER
Coupling module name
Address parameter
No. of PG
No. of OS
Telegram ormat

Brief description

GV
S
I
I
I

CTS
US
NPG
NOS
TLF

QTS
YTS

BO Block status
I Status display

Function block for start up, service and diagnostics, e.g. using the CFC in
the test mode.
The SER block is not required to connect CFC to the local CPU
interface. This functionality is included in the system and does not have
to be configured!
Function block to control and monitor I/O on the CPU using display
devices (e.g. SIMATIC OPs, WinCC etc.), which were provided within the
scope of the configuring.
The function block processes and responds to the tasks sent from the
display devices. If permanently defined response times are required for
these tasks, then default value 0 should be kept at input NOS, and, in
addition, function block S7OS should be configured (as it is not possible
to assign a channel to a display device, this means that the response
time is not guaranteed).

Mode of operation

Function block SER initializes and processes the number of


communication connections to CFC-PCs and display devices, specified
at inputs NPG and NOS (SIMATIC OPs, WinCC etc.).
Changes made to the configured software using CFC in the test mode,
are saved in the changed memory (EEPROM) of the program memory,
and, after a restart, are retrieved from there.
The card programming data is used, in both cases to differentiate
between a first run-up and a new run-up. If the program memory is reloaded, even if the programming is not changed, this results in a first runup.
The telegram size (PDU length) can be set at input TLF. If an illegal-entry
is made, an entry is made into the communications error field, and the
PDU length is automatically set.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

7-9

Service-/diagnostic blocks

I/O
CTS

Initialization input for configured coupling module names. Module designator (and
optionally, connectors X01, X02 or X03), to which the coupling partner is connected.
(Default: -)

US

Initialization input for address data. The data (entry) consists of a channel name,
comprising max. 6 characters, and depending on the coupling time, of one or two address
stages.
(Default: Empty string)

NOS

Initialization input for the number of displayed devices, which access to the CPU.
(Default: 0)

NPG

Initialization input for the number of CFC PCs, which access the CPU.
(Default: 2)

TLF

Telegram form: The net data size (PDU length) of a telegram can be defined here:
TLF = 0 the largest possible PDU length is automatically set
TLF = 1 PDU length = 112 byte
TLF = 2 PDU length = 240 byte
TLF = 3 PDU length = 480 byte
TLF = 4 PDU length = 960 byte
(Default: 0)

QTS

Output to display the correct block initialization (QTS=1). For QTS=0, the block becomes
inactive after a communications error signal has been entered.
(Default: 0)

YTS

Output to display all temporary faults, irreparable errors and channel initialization errors of
the data interface. For values at YTS, refer to:
D7-SYS online help "Dialog box, general". (press key F1 in the CFC and call-up the topic
"Dialog box, general" under "CFC for SIMADYN D")
(Default: 0)

Configuringdata

7-10

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,0
0,7
0,4

Can be inserted online

--

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

7.7

SQG Square wave generator (REAL type)

Symbol
SQG
amplitude
off period
on period
on button

Brief description

R
TS
TS
BO

X
T1
T2
I

R square-wave pulses

REAL type function block to generate square wave pulses with adjustable
amplitude,
period,
pulse/period (mark-to-space ratio - or on/off times).

Mode of operation

This function block is a square wave generator, whose pulse amplitude,


period and pulse duration can be changed.
If binary input I = 0, output Y is set to 0, whereby the function block is
enabled with I = 1.
The square wave pulses at output Y are defined by X (amplitude), T1
(off period) and T2 (on period).
This is illustrated in the timing diagram.

Block diagram

T1

T2

Timing diagram

1
0

T2

T2

X
In %
Y
In %

T1

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

T1

7-11

Service-/diagnostic blocks

I/O
X

Amplitude

(default: 0.0)

T1

Off period

(default: 0ms)

T2

On period

(default: 0ms)

On button

(default: 0)

Square-wave pulses

(default: 0.0)

Configuringdata

7-12

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

2,2
0,7
0,4

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

7.8

SQGB Clock generator for binary signals (BOOL type)

Symbol
SQGB
off-period TS
on period TS
on button BO

T1
T2
I

BO square-wave pulses

Brief description

BOOL type function block to generate a pulse sequence (pulse train) with
adjustable period and pause duration.

Mode of operation

The function block is a clock generator for binary signals.


If the binary input I = 0, output Q is set to 0.
If binary input I = 1, binary signals with adjustable on period T2 and off
period T1 are output at Q.
If T2 <= T1, output Q is set to 0.
The configured on period T2 must be greater than the sampling time of
the function block.

Block diagram

T1

T2

Timing diagram

1
0

T2

1
0

T2

T1

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

T1

7-13

Service-/diagnostic blocks

I/O
T1

Off period

(default: 0ms)

T2

On period

(default: 0ms)

On button

(default: 0)

Square-wave pulses

(default: 0)

Configuringdata

7-14

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

3,1
1,0
0,5

Can be inserted online

--

Can be configured in:

Interrupt tasks
Cyclic tasks

Executed in:

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

7.9

SSD Output on 7-segment display (WORD type)

Symbol
SSD
input value W

Brief description
NOTE

Mode of operation

IS

This WORD type function block is integrated in the @SIMD system FP.
This function block should only be used for diagnostic purposes and
should not be used in the user program.
The function block outputs the least-significant 7-bits of the input value on
the 7-segment display of the CPU module.

I/O
IS

Input value

Configuringdata

(default: 16#0000)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Systemmode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

4,6
1,5
0,8

7-15

Service-/diagnostic blocks

7.10 STG Step function (REAL type)


Symbol
STG
amplitude R
delay time TS
on button BO

Brief description

X
T
I

R step function

REAL type function block to generate test functions (step function) with
adjustable
amplitude
delay time

Mode of operation

This function block generates a step function.


Output Y is set to 0 if binary output I = 0.
If binary output I = 1, then value X is output at Y after time T.
Delay time T is variable.

Block diagram

Timing diagram

1
0

X
In %
Y
In %

I/O
X

Amplitude

Delay time

(default: 0ms)

On button

(default: 0)

Step function

(default: 0.0)

7-16

(default: 0.0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

2,7
0,9
0,5

7-17

Service-/diagnostic blocks

7.11 SYF1 System error field (WORD type, 1 word long)


Symbol
SYF1
error field number I
acknowledge signal BO

Brief description

NO
IAC

Y
QF

W error field image


BO group error message

this WORD type function is integrated in the @SIMD system FP.


memory area in the operating system for hardware and software
errors.

Mode of operation

if an error occurs, the appropriate bit is set in the error field.


This function block provides the image of the error field, associated with
the number of the error field at input NO, at output Y. If at least one bit is
set in this status word (error field), the error field message at output QF is
simultaneously set to 1.
If the acknowledge signal at input IAC is 1, the appropriate error field,
and therefore also the image of the error field at output Y and the group
error message are reset.
This block may only be used to read-out 1-word error fields. Function
block SYF4 must be used for 4-word error fields.
If an error field number is entered, which is not included in the following
table, is identified as being reserved, or labeled with "4 words", the block
outputs the value 0 as image of the error field and 0 as group error
message. In this case, an acknowledge signal has no effect.

Assignment table
Number NO

Error field image

Large error field

First error

1 word

Fatal system error

1 word

Initialization error

1 word

PN initialization and IB error

1 word

Task administration error

4 words

HW monitoring

4 words

User error

1 word

Number of communication errors

1 word

Communications error (reserve)

1 word

1st communications error

4 words

10

2nd communications error

4 words

11

3rd communications error

4 words

12

4th communications error

4 words

13

5th communications error

4 words

14

6th communications error

4 words

15

7th communications error

4 words

16

8th communications error

4 words

17

9th communications error

4 words

18

Reserved

7-18

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

19

Reserved

20

Reserved

21

Reserved

22

Reserved

23

Reserved

24

Module error (slot 0)

1 word

25

Module error (slot 1)

1 word

26

Module error (slot 2)

1 word

27

Module error (slot 3)

1 word

28

Module error (slot 4)

1 word

29

Module error (slot 5)

1 word

30

Module error (slot 6)

1 word

31

Module error (slot 7)

1 word

32

Module error (slot 8)

1 word

33

Module error (slot 9)

1 word

34

Module error (slot 10)

1 word

35

Module error (slot 11)

1 word

36

Module error (slot 12)

1 word

37

Module error (slot 13)

1 word

38

Module error (slot 14)

1 word

39

Module error (slot 15)

1 word

40

Module error (slot 16)

1 word

41

Module error (slot 17)

1 word

42

Module error (slot 18)

1 word

43

Module error (slot 19)

1 word

44

Module error (slot 20)

1 word

45

Module error (slot 21)

1 word

46

Module error (slot 22)

1 word

47

Module error (slot 23)

1 word

48

Module error (slot 24)

1 word

I/O
NO

Error field number

(default: 0)

IAC

Acknowledge signal

(default: 0)

Error field image

(default: 16#0000)

QF

Group error message

(default: 0)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

7-19

Service-/diagnostic blocks

Configuringdata

7-20

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

5,3
1,8
0,9

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

7.12 SYF4 System error field (WORD type, 4 words long)


Symbol
SYF4
error field number I
acknowledge signal BO

Brief description

NO
IAC

Y1
Y2
Y3
Y4
QF

W
W
W
W
BO

image of error word 1


image of error word 2
image of error word 3
image of error word 4
group error messages

the WORD type function block is integrated in the @SIMD SYSTEMFP.


memory area in the operating system for hardware and software
errors.

Mode of operation

if an error occurs, the appropriate bit is set in the error field.


This function block provides the image of the error field, associated with
the number of the error field at input NO, at outputs Y1...Y4 as image of
error words 1...4. If at least one bit is set in these outputs Y1...Y4, the
error field message at output QF is simultaneously set to 1.
If the acknowledge signal at input IAC is 1, the appropriate error and
therefore also the outputs, error word image 1...4 and group error
message are reset.
This block may only be used to read-out 4-word error fields. Function
Block SYF 1 should be used for 1- word error fields.
If an error field number is entered, which is not included in the following
table, is identified as being reserved, or labeled with "1 word", the
function block outputs the value 0 as image of the error field 1..4 and 0 as
group error message. In this case, an acknowledge signal when set has
no effect.

Assignment table
Number NO

Error field image

Large error field

First error

1 word

Fatal system error

1 word

Initialization error

1 word

PN initialization- and IB error

1 word

Task administration error

4 words

HW monitoring

4 words

User error

1 word

Number of communication errors

1 word

Communication error (reserved)

1 word

1st communications error

4 words

10

2nd communications error

4 words

11

3rd communications error

4 words

12

4th communications error

4 words

13

5th communications error

4 words

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

7-21

Service-/diagnostic blocks

14

6th communications error

4 words

15

7th communications error

4 words

16

8th communications error

4 words

17

9th communications error

4 words

18

Reserved

19

Reserved

20

Reserved

21

Reserved

22

Reserved

23

Reserved

24

Module error (slot 0)

1 word

25

Module error (slot 1)

1 word

26

Module error (slot 2)

1 word

27

Module error (slot 3)

1 word

28

Module error (slot 4)

1 word

29

Module error (slot 5)

1 word

30

Module error (slot 6)

1 word

31

Module error (slot 7)

1 word

32

Module error (slot 8)

1 word

33

Module error (slot 9)

1 word

34

Module error (slot 10)

1 word

35

Module error (slot 11)

1 word

36

Module error (slot 12)

1 word

37

Module error (slot 13)

1 word

38

Module error (slot 14)

1 word

39

Module error (slot 15)

1 word

40

Module error (slot 16)

1 word

41

Module error (slot 17)

1 word

42

Module error (slot 18)

1 word

43

Module error (slot 19)

1 word

44

Module error (slot 20)

1 word

45

Module error (slot 21)

1 word

46

Module error (slot 22)

1 word

47

Module error (slot 23)

1 word

48

Module error (slot 24)

1 word

I/O
NO

Error field number

(default: 0)

IAC

Acknowledge signal

(default: 0)

Y1-Y4

Image of error word 1-4

(default: 16#0000)

QF

Group error message

(default: 0)

7-22

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

Service-/diagnostic blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8,2
2,7
1,4

7-23

Service-/diagnostic blocks

7.13 USF User flags (WORD type)


Symbol
USF
status word of the user error W

IS

Brief description

WORD type function block to save user defined error statuses in the
system error field.

Mode of operation

This function block reads the "user error field", "ORs" it with input ES and
writes the result of this operation back into the user error field.
The user error field is integrated in the system error field and can be
read-out and reset using function blocks SYF1 and SYF4.
When a user defined error status occurs for the first time, then bit 11 of
the first error field is set to 1 by this function block, if, previously no bit of
the first error field was set.

I/O
IS

Status word of the user error

Configuringdata

7-24

(default: 16#0000)

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be inserted online

--

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2,0
0,7
0,4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

8.1

Control block

Symbol
SFC
SFC name S
Block enable BO
Enable manual changeover BO
Changeover, automatic BO
Start SFC chart BO
Stop SFC chart BO
Hold SFC chart BO
Re-start SFC chart BO
Switching mode transition BO
Reset SFC chart BO
Command output BO
Cyclic operation BO
Time monitoring BO
Step error acknowledgment BO
Operator acknowledgment BO

Brief description

SFC
EN
EMO
AO
RUN
STP
BRE
RES
SMT
RST
SOT
CYC
TMC
SFQ
TOQ

QTS
QFA
QMO
QCT
QRC
QRU
QAB
QHT
QTM
QID
QSM
QSF
QTO
SRT
RRT

BO
I
BO
I
I
BO
BO
BO
BO
BO
I
BO
BO
DI
DI

Block active
Error word
Actual mode
Number of chart runs
Number of proc. ops. in the actual chart run
Chart status active
Chart status abort
Chart status hold
Chart status end
Chart status off
Switching mode
Step error
Request transition condition
Step run time in ms
Remaining step runtime in ms

An SFC chart is checked and controlled using the CFC control block.
This allows a SFC chart to be influenced by CFC charts. The status of an
SFC chart can be interrogated and its run properties influenced using the
SFC control block. The SFC control block is inserted in the CFC chart
from the block catalog and inter-connected and parameterized.
The SFC control block can, just like other function blocks of the CFC
chart, be used in the properties dialog box of the steps and transitions of
the SFC chart. This means, that other SFC charts can also be controlled
using the SFC control block of an SFC chart.
The SFC control block is not a control block in the sense of S7, but
instead, is an SFC function block which must be configured for
every SFC chart.
The SFC control block carries the SFC functionality. Using the name,
configured at input SFC, it searches for the associated SFC chart and
interprets this as program. This means, that for the run position of the
SFC chart, only the block position in the task is decisive.
In order to avoid confusion regarding the run-time properties of the SFC
chart, you should

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-1

SFC blocks

always configure the associated SFC chart in front of the appropriate


SFC block
and when deleting, remove the SFC chart as well as the associated
SFC block.
If you configure an SFC block in an interrupt task, please observe, that
each time that the task is activated, the SFC block is only run once.
Mode of operation

In the initialization phase, the SFC control block defines the SFC chart
assigned via input SFC. If the SFC chart cannot be defined, or if an
additional error occurs in the chart initialization, output QTS is set to 0.
The error word is simultaneously set at output QFA.
An SFC chart can be used in the Manual or Automatic modes (also refer
to SFC online help under "Operating modes"). In the Automatic mode, the
SFC control block is responsible in controlling the SFC chart, and in the
Manual mode, the operator control and visualization system (HMI). In the
Manual mode, several inputs of the SFC control block are not evaluated
(also refer under I/O).
The SFC chart is processed in the normal mode. An SFC chart can also
be in the "Active", "Abort", "Hold", "Term" or "Idle" statuses (also refer to
the SFC online help under "Operating statuses"). Appropriate state
transitions can be made in the Automatic mode using the RUN, STP,
BRE, RES and RST inputs.
If the chart state is "Active", then the steps are processed. One state
transition of the chart is evaluated and initiated, or if required the
transition to the next steps, per sampling cycle. This means, the transition
belonging to the active steps. The then active steps are only re-evaluated
in the next sampling cycle.

I/O
SFC

Name of the associated SFC chart

(Default: Empty
string)

EN

Process block

(Default: 1)

EN=0: The block is not processed


EMO

Manual operating mode selection permitted

(Default: 1)

EM0=1: The mode may be changed by the operator control and


visualization system to Manual
EM0=0: It is not permissible that the mode is set to Manual
AO

(Default: 0)

Automatic mode
With a rising edge, the SFC chart goes into the Automatic mode. It can
only be set back to Manual via the operator control and visualization
system.

RUN

(Default: 0)

Start SFC chart


For a rising edge, the chart goes into the "Active" state (this is only
checked in the "Idle", "Hold" and "Term" states).
This connection is only evaluated in the Automatic mode.

8-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

STP

Stop SFC chart

(Default: 0)

For a rising edge, the chart goes into the "Abort" state (this is only
checked in the "Active" state).
This connection is only evaluated in the Automatic mode.
BRE

Hold SFC chart

(Default: 0)

For a rising edge, the chart goes into the "Hold" state (this is only
checked in the "Active" state).
This connection is only evaluated in the Automatic mode.
RES

Re-start SFC chart

(Default: 0)

For a rising edge, the chart goes into the "Active" state and starts to
process the starting step (this is only checked in the "Hold" state).
This connection is only evaluated in the Automatic mode.
SMT

Switching mode transition

(Default: 1)

If this input is 1, then the block operates in the automatic mode with
switching mode transition (T).
If SMT=0, the block operates with switching mode control with a stepspecific acknowledgment by the operator (T/T and B).
This connection is only evaluated in the Automatic mode.
RST

Reset SFC chart

(Default: 0)

For a rising edge, the chart goes into the "Idle" state (this is only checked
in the "Hold", "Abort" and "Term" states).
This input is only evaluated in the Automatic mode.
SOT

Command output

(Default: 1)

SOT=0: No command output


SOT=1: Command output
This input is only evaluated in the Automatic mode.
CYC

Cyclic mode

(Default: 1)

CYC=0: No cyclic operation


CYC=1: Cyclic operation
This connection is only evaluated in the Automatic mode.
TMC

Time monitoring

(Default: 0)

TMC=0: No time monitoring


TMC=1: Time monitoring
This connection is only evaluated in the Automatic mode.
SFQ

Step error acknowledgment


If there is a step error (QSF=1), then this can be acknowledged via input
SFQ. Step errors are always acknowledged as long as SFQ=1.

(Default: 0)

This connection is only evaluated in the Automatic mode.


TOQ

Operator acknowledgment

(Default: 0)

If an operator request (QTO=1) is present, then this can be


acknowledged via the TOQ input. An operator acknowledgment is always
issued as long as TOQ=1.
This input is only evaluated in the Automatic mode.
QTS

Block active
QTS=0: Block not active
QTS=1: Block active

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-3

SFC blocks

QFA

Error word (error display)


If the block is not active (QTS=0), then the error number is marked here,
which prevents correct block operation.
The following error numbers have been defined:

QMO

No error

No memory
Program too large Reduce the program size

2-14

Erroneous load object build-up


System error Inform Siemens AG

15

SFC chart does not match user program


(CPU-OID)
System error Inform Siemens AG

16

SFC chart and user program have


different versions
System error Inform Siemens AG

17

Compilation instant of the user program


is more recent than for SFC
SFC chart not compiled Compile the complete
program

18-31

Information which cannot be interpreted, in the load


object
System error Inform Siemens AG

32

Chart does not exist


SFC not configured Configure the SFC control block
with this name or correct the SFC I/O

33

Several control blocks configured for an SFC chart


Only use one SFC control block for this SFC chart

Actual mode
QMO=0: Automatic
QMO=1: Manual

QCT

Number of chart runs since the last start/restart command

QRC

Number or processing operations (cycles) in the actual chart run

QRU

Chart state, Active


"Active" operating state

QAB

Chart state, Abort


"Abort" operating state

QHT

Chart state, Hold


"Hold" operating state

QTM

Chart state, Term


"Term" operating state

QID

Chart state, Idle


"Idle" operating state

QSM

Switching mode
0: Step control with transition (SSMT)
1: Step control with transition or operator control (SSMTOB)
2: Step control with transition and operator control (SSMTUB)
3: Step control with operator intervention (SSMB)
4: Step group control (SGS)

8-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

QSF

Step error
QSF=0: No step error
QSF=1: Step error

QTO

Operator request
QTO=0: No operator request
QTO=1: Operator request

SRT

Step run time in ms


This output has a constant value of 0.
If the output is used in a chart designated by the SFC control block, then
it specifies the run time of the step in which it is used.
If the output is configured in a transition, then it is the run time of the step
which precedes the transition.
If several steps precede the transition (combining in parallel), then it is
the run time of the lefthand step.

RRT

Remaining step run time in ms


This specifies the run time until the maximum run time has been
reached. If the maximum run time is exceeded or has not been
configured, then the value is 0.

Note

The commands are assigned a priority regarding their I/O position. If two
commands are simultaneously present, then the command with the
higher priority applies.
The following table indicates with which priority the I/O are checked, if the
chart is in a specific state:
I/O Priority

Configuring data

Chart status
Active

Abort

Hold

Term

STP

RUN

RUN

RUN

BRE

RES

RES

RST

RST

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Generic FB

No

Can be inserted online

Yes

75
25
12,5

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The SFC control block may only be configured


once for each SFC chart.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-5

SFC blocks

8.2

SFCSI SFC step information block

Symbol
SFCSI
SFC name S
Step name S
Step error acknowledgment BO

SFC
SN
SFQ

QF
YFC
ST

BO Group error
W Error display
I Step state

SGS
ZS
MIN
MAX
ACT
REM
IUx
ITx
IDx
ISx
ZUx
ZTx
ZDx
ZSx
EUx
ETx
EDx
ESx

BO
BO
TS
TS
TS
TS
BO
I
DI
DI
BO
I
DI
DI
BO
I
DI
DI

Acknowledgment
Target step
Min. run time
Max. run time
Actual run time
Run time up to the max. run time
Init: Assignment x configured
Init: Data type, assignment x
Init: Value, target assignment x
Init: Value source, assignment x
Cycl: Assignment x configured
Cycl: Data type, assignment x
Cycl: Value, target assignment x
Cycl: Value source, assignment x
End: Assignment x configured
End: Data type, assignment x
End: Value, target assignment x
End: Value source, assignment x

x is provided as space retainer for the numbers 1 to 9


Brief description

Using the SFCSI block, information is provided about a step.


Furthermore, a single step error acknowledgment can be output via an
input.
The block outputs the states of a maximum of 9 assignments in the
initialization, cyclic and end processing mode. When configuring the
block, the I/O of assignments 2 to 9 are set to invisible, but when
required, they can be switched to visible.

Mode of operation

In the initialization phase, the SFC control block defines the SFC chart
assigned via the SFC I/O. If the SFC chart cannot be defined, or if an
additional error occurs in the chart initialization, output QF is set to 1. The
error display at output YFC is simultaneously set.
If the block was correctly initialized (output QF to 0), then it switches the
actual step data to the outputs in each cycle.

8-6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

I/O
SFC

Name of the assigned SFC chart

(Default: Empty
string)

SN

Step name

(Default: Empty
string)

SFQ

Step error acknowledgment

(Default: 0)

For a positive edge, a step error acknowledgment is set for the selected
step.
QF

Group error
QF=0: There is no block error present
QF=1: Block error present (error, refer to connection YFC)

YFC

Error word (error display)


If the block is not active (QTS=0), then the error number is marked here,
which prevents correct block operation.The following error numbers have
been defined:
0

ST

No error

No memory
Program too large Reduce the program size

2-14

Erroneous load object build-up


System error Inform Siemens AG

15

SFC chart does not match user program


(CPU-OID)
System error Inform Siemens AG

16

SFC chart and user program have


different versions
System error Inform Siemens AG

17

Compilation instant of the user program


is more recent than for SFC
SFC chart not compiled Compile the complete
program

18-31

Information which cannot be interpreted,


in the load object
System error Inform Siemens AG

32

Chart does not exist


SFC not configured Configure the SFC control block
with this name or correct the SFC I/O

33

Several control blocks configured for an SFC chart


Only use one SFC control block for this SFC chart

Step state
The step state can assume the following values:
0
1
2
3
4

(Default: Empty
string)

Step inactive, not run


Step inactive, run
Step active
Step held
Step error

SGS

Acknowledgment
(also refer to the SFC online help)

(Default: Empty
string)

ZS

Target step

(Default: 0)

(also refer to the SFC online help)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-7

SFC blocks

MIN

Minimum run time in ms


For 0: No minimum run time has been configured

MAX

Max. run time in ms


For 0: No maximum run time has been configured

ACT

Actual run time in ms

(Default: Empty
string)

REM

Remaining run time up to the maximum run time in ms

(Default: Empty
string)

IUx

Specifies whether the assignment is configured (init processing) x is


provided as space retainer for numbers 1 to 9

(Default: 0)

IUx=0: The assignment is not configured in this step


IUx=1: The assignment is configured in this step
ITx

Data type of the assignment (init processing) x is provided as space


retainer for numbers 1 to 9
The data is coded as follows:
BOOL
BYTE
WORD
INT
DWORD
DINT
REAL
SDTIME

1
2
4
5
6
7
8
81

This connection is only updated, if the assignment is configured (IUx=1).


IDx

Target value of the assignment (init processing) x is provided as space


retainer for numbers 1 to 9
The value is always specified as DINT and should be interpreted
corresponding to the data type of the assignment.
This connection is only updated if the assignment is configured (IUx=1).

ISx

Source value of the assignment (init processing) x is provided as space


retainer for numbers 1 to 9
The value is always output as DINT and should be interpreted
corresponding to the data type of the assignment.
This connection is only updated if the assignment is configured (IUx=1).

ZUx

Specifies, whether an assignment is configured (cyclic processing) x is


provided as space retainer for numbers 1 to 9

(Default: 0)

ZUx=0: The assignment is not configured in this step


ZUx=1: The assignment is configured in this step
ZTx

Data type of the assignment (cyclic processing) x is provided as space


retainer for numbers 1 to 9
The data type is coded as follows:
BOOL
BYTE
WORD
INT
DWORD
DINT
REAL
SDTIME

1
2
4
5
6
7
8
81

This connection is only updated if the assignment is configured (ZUx=1).

8-8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

ZDx

Target value of the assignment (cyclic processing) x is provided as


space retainer for numbers 1 to 9
The value is always output as DINT and should be interpreted
corresponding to the data type of the assignment.
This connection is only updated if the assignment has been configured
(ZUx=1).

ZSx

Source value of the assignment (cyclic processing) x is provided as


space retainer for numbers 1 to 9
The value is always output as DINT and should be interpreted
corresponding to the data type of the assignment.
This connection is only updated if the assignment is configured (ZUx=1).

EUx

Specifies whether an assignment is configured (end processing) x is


provided as space retainer for numbers 1 to 9

(Default: 0)

EUx=0: The assignment is not configured in this step


EUx=1: The assignment is configured in this step
ETx

Data type of the assignment (end processing) x is provided as space


retainer for numbers 1 to 9
The data type is coded as follows:
BOOL
BYTE
WORD
INT
DWORD
DINT
REAL
SDTIME

1
2
4
5
6
7
8
81

This connection is only updated if the assignment is configured (EUx=1).


EDx

Target value of the assignment (end processing) x is provided as space


retainer for numbers 1 to 9
The value is always output as DINT and should be interpreted
corresponding to the data type of the assignment.
This connection is only updated if the assignment is configured (EUx=1).

ESx

Source value of the assignment (end processing) x is provided as space


retainer for numbers 1 to 9
The value is always output as DINT and should be interpreted
corresponding to the data type of the assignment.
This connection is only updated if the assignment is configured (EUx=1).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-9

SFC blocks

Configuring data

8.3

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

30
10
5,0

Generic FB

No

Can be inserted online

Yes

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block should be configured in the same


sampling time as the assigned SFC control block.
Only then is the data consistency of the data at the
outputs (all data come from the same sampling
time) and the correct mode of operation of the
single step error acknowledgment guaranteed.
Block SFCSI does not check this configuring rule.

SFCTI SFC transition information block

Symbol
SFCTI
SFC name S
Transition name S
Operator acknowledgment BO

SFC
TN
BQ

QF
YFC
ACT
QTO
BE
TR
LR
FR
Ux
Dx
Cx
Lx
Rx

BO
W
BO
BO
I
DI
DI
DI
BO
I
I
DI
DI

Group error
Fault display
Transition active
Operator request
Logical combination of the comps.
Actual results
Results of the last cycle
Results for an error condition
Comparison x configured
Data type comparison x
Comparison type, comparison x
Left operand, comparison x
Right operand, comparison x

x is provided as space retainer for the numbers 1 to 9

Brief description

Using the SFCTI block, information can be defined over a transition.


Furthermore, a single operator acknowledgment can be output via an
input.
The block outputs the states of all 16 comparisons. When configuring the
block, the connections of comparison 2 to 16 are set so that they are
invisible; when required, they can be switched to visible.

Mode of operation

In the initialization phase, the SFC control block defines the SFC chart
assigned via input SFC. If the SFC chart cannot be defined, or if an
additional error occurs in the chart initialization, output QF is set to 1. The
error word is simultaneously set at output YFC.
If the block was correctly initialized (connection QF to 0), the block
switches the actual transition data to the outputs in each cycle.

I/O

8-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

SFC

Name of the SFC chart

(Default: Empty
string)

TN

Transition name

(Default: Empty
string)

TOQ

Operator acknowledgment

(Default: 0)

For a positive edge, for the selected transition, an operator


acknowledgment is issued.
QF

Group error
QF=0: There is no block error
QF=1: Block error present, code referred to connection YFC

YFC

Error word (error display)


If the block is not active (QTS=0), then the error number is marked here,
which prevents correct block operation.
The following error numbers have been defined:

ACT

No error

No memory
Program too large Reduce the program size

2-14

Erroneous load object build-up


System error Inform Siemens AG

15

SFC chart does not match user program


(CPU-OID)
System error Inform Siemens AG

16

SFC chart and user program have


different versions
System error Inform Siemens AG

17

Compilation instant of the user program


is more recent than for SFC
SFC chart not compiled Compile the complete
program

18-31

Information which cannot be interpreted, in the load


object
System error Inform Siemens AG

32

Chart does not exist


SFC not configured Configure the SFC control block
with this name or correct the SFC I/O

33

Several control blocks configured for an SFC chart


Only use one SFC control block for this SFC chart

Transition active
ACT=0: the transition is not active
ACT=1: the transition is active (is evaluated)

QTO

Operator request
QTO=0: the transition does not wait for an operator acknowledgment
QTO=1: the transition waits for an operation acknowledgment

BE

Boolean expressions
Structure of the Boolean expressions (logic operations):

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-11

SFC blocks

E1

E5
E2
E7
E3
E6
E4
There are a total of up to seven Boolean logic operations (E1 to E7) to
generate the overall interlocking result. Each Boolean logic operation can
assume the values AND, OR, NAND or NOR. Each Boolean structure is
represented by a 2-bit value, in which the comparison value is coded as
follows:
0
1
2
3

AND
OR
NAND
NOR

The comparison types are combined, in turn, in a bit vector, which has
the following structure:
Bit 0,1 Logic operation E7
Bit 2,3 Logic operation E5
Bit 4,5 Logic operation E1
Bit 6,7 Logic operation E2
Bit 8,9 Logic operation E6
Bit 10,11
Logic operation E3
Bit 12,13
Logic operation E4
TR

Transition results and intermediate results


Structure of the transition results:
There are a maximum of 16 comparison results as well as seven
Boolean logic operation results. These results are output as follows at
this connection (coded bitwise):

8-12

Bit 0
Bit 1
Bit 2
Bit 3
Bit 4

Partial transition result, comparison 1


Partial transition result, comparison 2
Partial transition result, comparison 3
Partial transition result, comparison 4
Partial transition result, comparison 5

Bit 5

Partial transition result, Boolean expression E1

Bit 6
Bit 7
Bit 8
Bit 9
Bit 10

Partial transition result, comparison 6


Partial transition result, comparison 7
Partial transition result, comparison 8
Partial transition result, comparison 9
Partial transition result, comparison 10

Bit 11
Bit 12

Partial transition result, Boolean expression E2


Partial transition result, Boolean expression E5

Bit 13
Bit 14

Partial transition result, comparison 11


Partial transition result, comparison 12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

SFC blocks

LR

Bit 15

Partial transition result, comparison 13

Bit 16

Partial transition result, Boolean expression E3

Bit 17
Bit 18
Bit 19

Partial transition result, comparison 14


Partial transition result, comparison 15
Partial transition result, comparison 16

Bit 20
Bit 21
Bit 22

Partial transition result, Boolean expression E4


Partial transition result, Boolean expression E6
Partial transition result, Boolean expression E7

Last transition results and intermediate results


Structure as for connection TR

FR

Transition results and intermediate results in the case of a step error


Structure as for connection TR

Ux

Specifies whether the comparison is configured


x is provided as space retainer for the numbers 1 to 16
Ux=0: the comparison is not configured in this transition
Ux=1: the comparison is configured in this transition

Dx

Data type of the assignment x is provided as space retainer for the


numbers 1 to 16
The data type is coded as follows:
BOOL 1
BYTE 2
WORD 4
INT
5
DWORD6
DINT
7
REAL 8
SDTIME 81
This connection is only updated, if the comparison is configured (Ux=1).

Cx

Type of comparison of the operators x is provided as space retainer for


the numbers 1 to 16
The comparison type is coded as follows:
0
1
2
3
4
5

Less than
Less than equal to
No equal to
Equal to
Greater than
Greater than equal to

This connection is only updated if the comparison is configured (Ux=1).


Lx

Value of the lefthand operand x is provided as space retainer for the


numbers 1 to 16
The value is always output as DINT and should be interpreted
corresponding to the data type of the comparison.
This connection is only updated if the comparison is configured (Ux=1).

Rx

Value of the righthand operand x is provided as space retainer for the


numbers 1 to 16
The value is always output as DINT and should be interpreted
corresponding to the data type of the comparison.
This connection is only updated if the comparison is configured (Ux=1).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

8-13

SFC blocks

Configuring data

8-14

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

30
10
5,0

Generic FB

No

Can be inserted online

Yes

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

The block should be configured in the same


sampling time as the higher-level SFC control
block. Only then is the data consistency of the data
at all outputs (all data come from the same
sampling time) and the correct mode of operation
of the individual operator acknowledgment
guaranteed. The SFCTI block does not check this
configuring rule.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 03.2003

GMC blocks

9.1

Motion control functions

9.1.1

Overview
Many machines, especially in the production and packaging areas, can
be classified according to typical drive-specific tasks, such as

Positioning

Referencing

Aligning

Catching-up/shutting-down

Cams

Engaging/disengaging

Gearing

And many more functions

These elementary functions are available as individual function blocks,


and in some cases, as a combination of several functions. These blocks
can be combined as required allowing both basic as well as complex
drive functions to be implemented.
Library

The blocks are included in the FBSGMC library that, from Version V5.2
onwards, is part of the scope of supply of D7-SYS. This library must be
added into the CFC using the following menu item of the STEP7 project:

HW platform

Options / Block types / Import

The motion control functions can be used on the following hardware


platforms: T400, PM5, PM6, FM458 and Simatic TDC.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-1

GMC blocks

9.1.1.1

Structure of a motion control application


A motion control application comprises the following parts

Master
value
generation

Master (leading value) generation (a real or virtual master). A real


master is a position sensing function that evaluates a position encoder
that is mechanically coupled to a master (leading) drive or a
measuring system (sensing wheel). This is the reason that a real
master is subject to many different types of disturbances; these are
transferred to all of the slave (following) drives and the dynamic
performance of a plant or system can be negatively influenced. On the
other hand, a virtual master supplies noise-free position and speed
setpoints of the slave drives.

Setpoint conditioning for all slave axes. This involves all of the drives
whose position setpoint (position reference value) is derived from the
master setpoint (master reference value). In this case, it is not
necessary that the slave axis is continually in synchronism with the
master axis. It can be "coupled-in or coupled-out" at any time.

Actual value sensing for every slave drive

Closed-loop position control for every slave drive

Closed-loop speed control for every slave drive

Position

Structure of the
"speed interface"

Speed setpoint 1

Speed

Position setpoint (position reference value) 1


Control 1
Setpoint
conditioning
for n
drives

Position
sensing
1

Cl.-loop
position
control
1

Speed setpoint n
Position setpoint (position reference value) n

Structure of the
"position interface"

Fig. 9-1

Control n

Position
sensing
n

Cl.-loop
speed
control
1

Cl.-loop
speed
control
n

Cl.-loop
position
control
n

Closed-loop control structure for a motion control application

Generally, the drives are either operated as closed-loop speed or position


controlled drives. Closed-loop torque control is generally not used for this
type of application. This is the reason that there are two versions of the
motion control software in the control system:
1. The position sensing and closed-loop position control are incorporated
in the drive (e.g. for MASTERDRIVES MC). In this case, the function

9-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

of the control stops at the position interface. However, in addition to


the position setpoint (position reference value), the speed setpoint
and additional control information are transferred.
2. Most of the drives have a speed interface. In cases such as these,
the control also handles the position sensing and closed-loop position
control. In the simplest form, the speed interface comprises an analog
channel.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-3

GMC blocks

9.1.2
9.1.2.1

Basics
Position and speed characteristics
For motion control drive applications, a differentiation is made between
drives with a linear axis and drives with a rotary axis.
For a linear axis the position moves between two natural mechanical
limits (e.g.: A trolley for a crane, valve). Position overflows cannot occur.
A linear axis connected to motion control blocks is designated by an axis
cycle AZ = 0.

Linear axis

Rotary axis
For a rotary axis (modulo axis), at a constant speed, periodic position
overflow conditions occur - whereby the position value runs-up from 0 to
the axis cycle and then returns to 0. It needn't necessarily involve a
rotating system. For instance, if the position represents the position of a
product on a conveyor belt, then an axis cycle corresponds to the length
of a product. The position is a measure for how a current operating step
is progressing - for instance, a printing operation. If the position exceeds
the axis cycle, then the operation is repeated for the next product.
Most of the applications in the production or packaging area involve
rotary axis applications. This is because a continuous product flow must
be processed. In this case, continuous position steps occur due to the
axis cycle overflow. In order that these position steps are not transferred
to the closed-loop position control, the steps in the position setpoint
(position reference value) and position actual value must be
synchronized.
Negative speed

Positive speed
AC

Position

Setpoint
(reference
value)
Actual
value

Axis cycle
AC = COR

POV
t

NOV
t
Position
error

Fig. 9-2

Position characteristic for rotary axis applications

The overflow signals POV (positive position overflow) and NOV (negative
position overflow) as well as the correction value COR - by which the
position has jumped - are used for synchronization.

9-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The setpoint generation function generates these three pieces of data


and transfers them to the actual value sensing. This means that the
actual value is corrected by precisely the same step as the setpoint. The
subsequent closed-loop position control does not notice the position step.
Observe the
sequence!

The sequence of the correction is extremely important! The following


sequence must be maintained:
1. Setpoint processing
2. Actual value processing
3. Closed-loop position control

Setpoint generation
Position controller

Speed setpoint
Position setpoint
(ref. value)

To the speed
controller

COR
POV

Position sensing

NOV
Fig. 9-3

Caution: Loss of
POV, NOV

Position
encoder

Structure of the actual value correction for axis cycle overflows

The synchronism between the setpoint generation and the actual value
conditioning is just as important as the processing sequence. The
overflow signals POV and NOV are only present for the duration of a
processing cycle. If the position sensing is not processed in this cycle,
then the information about the position step is lost, and the drive
executes a (significant) mechanical equalization motion by one axis
cycle!
If a non-synchronous communications system is located between the
setpoint generation and the position sensing, then the position correction
must be conditioned in such a way that no corrections are lost. The
OVFHSK or DRVINT blocks handle this conditioning function.

9.1.2.2

Block connections and normalization


A standard schematic is applied when it comes to designating (coding)
and normalizing the connections of the motion control function blocks.
Generally it involves floating point (abbreviated: float) type
connections. For this particular data type, undesirable effects can occur
when values are rounded-off.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-5

GMC blocks

Example: When converting the decimal number 1.1 into a floating value,
then an error of 0.000000238 already occurs as a result of the resolution.
If a position value is to be consecutively increased by a value of 1.1, then
the errors are added and an offset is obtained between the required
position and the actual position.
In all of the cases where these types of rounding-off errors can occur,
type 32-bit integer connections are used.
Examples:

Axis cycle, gear factors

The following block connections have the same meaning for the motion
control blocks:

Connections
Connection Meaning
XP

Input position setpoint (output position reference value)

YP

Output position setpoint (output position reference value)

SV

Setting value for the position output YP

Set position output: For S = 1, YP is set to SV

NFX

Position normalization (this is valid for all position inputs and position outputs)

XV

Input speed or velocity

XV

Output speed or velocity

NFV

Position normalization (this is valid for all position inputs and outputs)

AZ

Axis cycle for input and output position values

AZI

Axis cycle for the input position value XP

AZO

Axis cycle for the output position value YP

VMX

Maximum velocity for equalization operations. In this case, it generally involves a relative
velocity increase or decrease with respect to the master (leading) axis (XV)

AMX

Maximum acceleration in 1/s or in m/s. For equalization operations with respect to a


master (leading) axis, the acceleration of the drive is obtained from the superimposition of
the equalization operation and the acceleration of the master (leading axis).

JRK

Maximum jerk for an equalization operation in 1/s or in m/s.

FWD

Defines the forwards preferred direction for equalizing or positioning operations that
would otherwise be possible in both directions of rotation. FWD is dominant with respect to
BWD.

BWD

Defines the reverse preferred direction for equalizing or positioning operations that would
otherwise be possible in both directions of rotation. Not effective for FWD = 1.

EN

Enables block processing to reduce CPU computation time. For EN = 0, YP = YV = 0.

COR

Correction value by which the position actual value should be corrected. Generally, the
correction value corresponds to the axis cycle.

POV

Positive position overflow or step of the position setpoint (position reference value) by
COR. For POV = 01, the value COR is subtracted from the position actual value.

NOV

Negative position overflow or step of the position setpoint (position reference value) by
+COR. For NOV = 01, the value COR is added to the position actual value.

Table 9-1

9-6

Connections at motion control blocks

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The mathematical interrelationship between distance and velocity is


required to internally calculate times in the blocks themselves. Internally,
the position has the units [m], velocity is in [m/min] (rotary axis: Position
in [revolutions]; speed in [RPM]). Generally, the internal units deviate
from the user units. This is the reason that the user units are converted
using the normalization factors NFX and NFV.

Position
normalization

In order to define the user-specific distance normalization, the following is


defined at connection NFX:

Rotating systems:
Linear systems:

NFX = number of steps per revolution


NFX = number of steps per meter

It should be noted that a linear arrangement with endless product


transport is also treated as a rotary axis system. This means that the
units [mm] for distance and [m/s] for velocity are also possible for a rotary
axis.
Restriction:
In order to avoid rounding-off errors, it is important that the position
normalization is selected so that the smallest unit that can be set is
emulated as 1.0.
Example:
A machine is used to package products that are 120 mm long. The
position is to have a resolution of 0.1 mm. This results in a position
normalization of
NFX = 10000

(0.1 mm corresponds to 10000 increments per meter)

As a result of the product length the processing operation is repeated


every 120 mm (rotary axis!). For the distance normalization specified
above, this results in an axis cycle of AZ = 1200.
The user-specific speed inputs and outputs are converted into the
internal block normalization using the normalization factor NFV.

Speed
normalization

The speed value is specified in RPM (or velocity in [m/min]) at NFV - that
is then displayed as 1.0.
Required user units

Conversion

RPM

1.0 RPM corresponds to 1.0 RPM

1.0 1/s corresponds to 60 RPM

60

1.0 inch/min corresponds to 0.0254


RPM

0.00254

1.0 corresponds to 3000 RPM

3000

/s

inch

/min

Referred to the rated speed 3000 RPM


m

Referred to the plant/system velocity 480 /min


Referred to the plant/system velocity 1500
rad

Table 9-2

mm

/min

/s

NFV

480

1.5

1.0 corresponds to 480 /min


1.0 corresponds to 1.5 /min
1.0

rad

/s corresponds to 30/ RPM

9.5493

Examples of speed normalization factors

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-7

GMC blocks

9.1.3

Application example with SIMOLINK coupling to the drive

9.1.3.1

SIMOLINK interface
SIMOLINK is a communications system where the nodes are arranged in
a ring-type topology via fiber-optic cable. SIMOLINK transfers net (useful)
data and synchronizing information in extremely short cycle times to up to
200 nodes.
For motion control applications, the FM 458 module is used with the EXM
448-1 expansion module as SIMOLINK master. The setpoints for the
drive are centrally generated on the FM 458. The drives run, via
SIMOLINK, synchronized to the FM548. This measure ensures that the
drives receive the important control bits (POV, NOV) - even if they are
only present for the duration of a processing cycle.

9.1.3.2

FM458 as SIMOLINK master

HW Config

The basic sampling time T0 and the fastest cycle time T1 of the FM 458
should be set to the cycle time with which SIMOLINK is to be operated. In
the following example, T1 is set to 1.6 ms. This cycle time is practical
because the drive is operated with a pulse frequency of 5 kHz (factory
setting).
The "process I/O" option should be selected in the hardware
configuration of the EXM448-1 expansion module and the I/O addresses
should be pre-assigned names (I/O address 2 = EXM 448_Slot).

CFC, @SL

The @SL block should be configured (recommendation: In the cyclic task


T4). It handles the initialization and management of the SIMOLINK
interface. The following settings should be made:

Connection Setting

Meaning

TAD

EXM 448_Slot

Connects to the margin area to define the


hardware address

MOD

Mode 5: Cyclic operation with FM458 as


SIMOLINK master

ASL

Address of the master (this is always 0)

POW

Optical send power (0 ... 3)

EN

Enable

Table 9-3

9-8

Settings at the SIMOLINK central block @SL

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

SLSVAV

An SLSVAV block should be configured for every slave drive. This


transfers the setpoint to the drives and reads-out the actual values.
These blocks should be processed at the end of the fastest sampling
time (T1) - i.e. after the setpoints for the drives have been calculated.
Connection
TAD

Setting

Meaning

EXM448_Slot Connects to the margin area to define the


hardware address

ASL

Address

NSV

Number of setpoints (type, 32-bit integer)

SIMOLINK address of the slave

NAV

Number of actual values (type, 32-bit integer)

XS0

Setpoint 1

Position setpoint (position reference value)

XS1

Setpoint 2

Correction value (COR)

XS2

Setpoint 3

Speed setpoint

XS3

Setpoint 4

Control words
Low word:
High word:

Control word 1 for the drive


Motion control control bits

YA0

Actual value 1 Position actual value

YA1

Actual value 2 Measured value memory

YA2

Actual value 3 Following error

YA4

Actual value+ Status words


4
Low word:
High word:

Table 9-4

Status word 1 of the drive


Motion control status bits

SLSVAV block: Connection assignment and drive interface

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-9

GMC blocks

9.1.3.3

Motion control - control and status bits


Setpoint 4 at the drive contains, in the upper word (word 8 at the slave
drive) a combination of control bits these are specifically intended to
activate motion control functions
(for a detailed description of the drive, refer to
ReferencesReferencesReferences /1/).

Bit

Control bit

POV

Use
Position actual value correction: Xact = Xact - COR

(edge active)
1

NOV

Position actual value correction: Xact = Xact + COR

(edge active)
2

Enable measured
value memory
(edge active)

The measured value save function in the drive saves the actual position
when an external event occurs - e.g. when a pass mark is detected. As a
result of the measured value, an offset can be calculated in the FM458 and
corrected. To do this, the measured value is transferred to the FM458 as
actual value 2 (refer to the table above).

Enable referencing The drive must be referenced if the absolute position after power-up is
unknown (e.g. when incremental encoders are being used). When
(edge active)
referencing, the drive passes a proximity switch (BERO). The position of
the BERO is known and when the BERO is passed, this is transferred to
the position actual value.
After a positive signal edge at enable referencing", the referencing logic in
the drive is enabled for a referencing (homing) operation.

Sets the position


actual value

Optional control bit.

Sets the position


setpoint (position
reference value)

Optional control bit.

This signal can be used to set the position actual value in the position
sensing or to set the lowpass filter in the actual value channel of the
position controller.
This signal can be used to set the lowpass filter in the setpoint channel of
the position controller.

Inhibits the position This bit is used to control (closed-loop speed control) drive operation.
controller
When the position controller is inhibited, at the same time, the speed
controller setpoint is changed-over to the speed setpoint from the FM458.
Open-loop controlled operation is, for example, practical for a drive that
has not been referenced (not been homed).

Enables the speed The speed controller enable signal is connected to control word 2 bit 9
controller
(refer to the MASTERDRIVES MC documentation). It is a prerequisite for
torque to be established in the drive.
Opens the brake

Optional control bit.


This bit is used to open the holding brake of the connected motor if the
brake control, used in the drive, isn't to be used.

9 ... 15
Table 9-5

9-10

Not assigned

Motion control control bits

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The drive signals the actual motion control status in the upper word of
actual value 4.
Bit

Status bit

POV feedback

Use
Feeds back the POV bit of the control word.
This bit is only required for the case where the FM458 and drive must be
operated in synchronism with one another (e.g. when establishing a coupling
through PROFIBUS). In this case, on the FM458 side, an POV pulse must
be extended until the bit that is being fed back is received.

NOV feedback

Measured value
valid

This bit indicates that after the measured value save function has been
enabled, a measured value was sensed. When enable measured value
memory" is withdrawn, the bit is set to 0.

Reference point
detected

This bit is set when the drive reaches the reference point. When the enable
referencing is withdrawn (refer to the motion control control word), the bit is
set to 0.

Position corrected

Feedback that the position actual value has been corrected. The bit is only
present for one sampling interval.

5 ...
15

Table 9-6

9.1.3.4

Feedback of the NOV bit of the control word. (refer to POV feedback)

Not assigned

Motion control status bits

Settings for MASTERDRIVES MC


In the configuration with FM458 to generate a setpoint and as SIMOLINK
master, only a small proportion of the drive converter functions are
required. This means that the computational utilization allows, when
required, the setpoint input of SIMOLINK to be operated in the sampling
time T3 = 1 ms. To achieve this, the drive converter should be operated
with a pulse frequency of 8 kHz (assuming that this is permissible from
the thermal perspective).
After the factory setting, the following components should be
parameterized when commissioning the system:

Drive converter type, motor selection and pulse frequency

Position sensing

SIMOLINK

Control words

Closed-loop position control with torque pre-control

Speed controller

Generating the motion control status word using freely-assignable


blocks

The option package F01 is not required!

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-11

GMC blocks

MASTERDRIVES MC
Speed setpoint

Position
controller

Following error

Speed controller
Torque
control

Position setpoint
Position actual value
Enable

Meas. value memory


Correction value

Position
sensing

Enable

Speed

Control words

Control words

Status words

Fig. 9-4

Status word 1

Structure of the drive with position interface to the FM458 and SIMOLINK coupling

Param.

Value

P353

3000

P340

5.0 kHz

P740.1

Adr

P741

4.8 ms

Telegram failure monitoring for SIMOLINK (3 T3)

P746.1

1.6 ms

SIMOLINK cycle time

P749.1
P749.2
P749.3
P749.4

Adr.0
Adr.1
Adr.2
Adr.3

U950.12

Process SIMOLINK in time slice T3

U960.12

Process SIMOLINK in the sequence at the first position (in time)

P755

0x0100

P751.1
P751.2

120
120

1st actual value: Position actual value (double word)

P751.3
P751.4

122
122

2nd actual value: Measured value memory (double word)

P751.5
P751.6

130
130

3rd actual value: Following error (double word)

P751.7

32

4th actual value (low): Status word 1 (word)

P751.8

431

4th actual value (high): Motion control status bits (word)

P173

9-12

Meaning
Reference speed. Use the same value as for FM458
The cycle time T3 for SIMOLINK and the closed-loop position control are defined by
selecting the pulse frequency. (T3 = 8 1/ P340)
SIMOLINK address of the drive

Addresses for the 4 setpoint channels (receive data). Every slave reads the first 4
double words that are sent to its address.

SIMOLINK configuration: It is synchronized precisely to the cycle time

De-active the setting function of the position sensing

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Param.

Value

Meaning

P174

7033

Retrieve the correction value of the position sensing from SIMOLINK (from word 3)

P175.1

7801

Use the NOV signal to correct the position by +COR

P175.2

7800

Use the POV signal to correct the position by -COR

P177

7803

Enable referencing (enable homing)

P179

7802

Enable, save measured value

P190.1

7031

Position setpoint (position reference value) as input quantity of the position


controller

P193.1

7804

Set the position setpoint (reference value) (filter at the position controller input)

P197.1

7805

Set position actual value (filter at the position controller input)

P209.1

7035

P210.1
P211.1

1
1

Use the speed setpoint to pre-control the position controller


Enable the position controller with fixed value (actual enable here: Refer to P213)

P212.1

7035

Inject the speed setpoint as setpoint for controlled operation

P213.1

7806

Inhibit the position controller and simultaneously changeover to controlled operation

P220.1

131

Use the output of the position control as setpoint for the speed controller

P221.1

0.8 ms

P262.1

135

Accept the pre-control of the torque controller from the closed-loop position control

P554.1

7700

OFF1 for control word 1 (0 = stopping)

P555.1

7701

OFF2 for control word 1 (0 = pulse inhibit)

P558.1

7702

OFF3 for control word 1 (0 = fast stop)

P561.1

7703

Enable inverter for control word 1

P562.1

7704

Enable ramp-function generator for control word 1

P563.1

7705

Start ramp-function generator for control word 1

P564.1

7706

Enable setpoint for control word 1

P565.1

7707

Acknowledge fault/error for control word 1

P568.1

7708

Jogging, bit 0 for control word 1

P569.1

7709

Jogging, bit 1 for control word 1

P571.1

7711

Enable positive direction of rotation for control word 1

P572.1

7712

Enable negative direction of rotation for control word 1

P575.1

7715

External fault/error for control word 1

P585.1

7807

Enable speed controller for control word 2

Filter time for the speed setpoint (the setpoint generation is slower as the speed
controller is processed 4x more frequently than the position controller)

U952.89

U076.1

7800

Process binectorconnector converter in T3


POV in status word

U076.2

7801

NOV in status word

U076.3

212

Measured value valid in status word

U076.4

210

Reference point sensed in the status word

U076.5

211

Position corrected in the status word

Table 9-7

Basic parameter settings for MASTERDRIVES MC drive converters

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-13

GMC blocks

The settings for the position sensing depend on the type of encoder
being used. Only the position normalization is discussed here (not the
encoder selection, power supply, etc.). In this particular example, one
revolution should be emulated as 36000 increments, i.e. AC = 36000.
Param.

Encoder

Resolver

Pulse
encoder
1024 pulses

Meaning

P171

20

12

10

P180.1

36000

36000

36000

Axis cycle (increments per revolution)

P180.2

1048576

4096

1024

Encoder resolution in increments

P183.1

0x10*1

0x10*1

0x10*1

Configuration of the encoder; * defines the


version when referencing (refer to References
/1/);
Standard: 0x1001 referencing inhibited

P205

108000

108000

108000

0.001 increments per revolution at the reference


speed (3000 36000 / 1000)

P770

Setpoint input and closed-loop position control


operate in the same time slice (for slow setpoint
input, an interpolation is made in order to ensure
that the setpoint is in finer stages)

P771

5760

5760

5760

Maximum step width of the position setpoint


(position reference value) for each sampling time
(increments at 6000 RPM in 1.6 ms)

Table 9-8

Encoder resolution (in bits)

Parameters to normalize the position (axis cycle)

Step

Param.

P235

Meaning and procedure


Proportional gain of the speed controller
P240 = 1 s. Set open-loop controlled operation (inhibit the position controller). The
FM458 specifies a constant speed (500 RPM) with a superimposed squarewave (50
RPM). Increase P235 until the transient response of the speed actual value has
been optimized. (If required, optimize the proportional gain for different speeds and
enter using a characteristic f (setpoint speed).)

P240

Integral action time of the speed controller


After P235 has been optimized, P240 is reduced until the transient response has
been optimized.

P773

Torque pre-control
Enable the position controller. Select the proportional gain P204 = 0.1. Enter speedvarying, periodic setpoints (e.g. engaging/disengaging operation). Increase P773
until the signal amplitude at the speed controller output (K0153) is at a minimum.

P204

Proportional gain of the position controller


After step 3, P204 is increased until the transient response of the position actual
value has been optimized.

Table 9-9

9-14

Controller optimization

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.1.3.5

Basic functions to generate a setpoint

Poweringup/powering-down
a drive

The prerequisite to power-up a drive is that it is ready to be powered-up


(status word 1, bit 0).
If a fault is present, this must first be removed and then acknowledged (a
positive signal edge at control word 1, bit 7). After this, the drive is
powered-up using a rising signal edge at OFF1 (control word 1, bit 0)
(control word for operation: 0x9C7F).

DRVIF

The logic required to power-up/power-down and acknowledge faults can


be individually configured using discrete function blocks. We recommend
the DRVIF block for these functions when it comes to basic applications
(DRVIF = drive interface). DRVIF converts setpoints from float to integer.
This is the reason that this block represents the interface between the
setpoint generation and the SIMOLINK output (refer to the CFC chart
below).
The drive is powered-up/powered-down using input EN. For ACK = 1,
drive fault messages/signals when powering-up are automatically
acknowledged. An input is available for the motion control bits of the
control word (Table 9-1). An exception is the bit "open brake" - that is
automatically generated at power-on/power-off taking into account the
brake delay time.

Fig. 9-5

CFC chart for the SIMOLINK interface to the drive

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-15

GMC blocks

MASTERDRIVES MC units exclusively use integer and bit variables.


Before being transferred with SIMOLINK, the setpoint type must be
converted according to the table below. This conversion is either realized
using discrete blocks or when using the interface block DRVIF (Fig. 9-5).

Converting the
setpoint type

Setpoint

FM458
type

Drive converter
type

Block

Position

Float

Integer

Speed

Float

Referred to the
reference speed

Examples
FM458

MASTERDRIVES

R_I

12345.6

12345

R_N4

123.576 RPM

44186623 = 4.115 %
for reference speed
3000 RPM

1073741824 = 100%
Correction
value

Integer

Integer

36000

36000

Control bits

Byte

Bit

B_DW

Combined to form
a 32-bit control
word before being
transferred with
SIMOLINK

Evaluate SIMOLINK
receive words bitserially

Table 9-10

Data types for the position interface to the drive

The DRVIF block has input RS for speed conversion (this corresponds to
input NF at block R_N4). Here, the speed is specified in the user
normalization that is sent to the drive converter as 100% (reference
speed).
Example:
The following data are applicable for a roller feed:
User speed normalization:
m
/min)
Reference speed of the drive:
conversion value:

NFV = 1.0

(1.0 corresponds to 1

P353 = 3000 RPM


RS = 188.496 (refer to the diagram)

200mm

Vmaterial

Feed
200mm
=
= 62.832mm
Motor revolution
10
3000 RPM = 188.496 m
min

1
10

Motor

nmotor
Fig. 9-6

9-16

Example: Converting the speed normalization

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Initializing the
closed-loop
position controlled
mode

After a plant or system has been powered-up it must be assumed that the
position setpoint and actual value generally assume different values from
one another - more or less random. If, in this case, the drive closed-loop
position control is enabled, then the drive will execute a sudden
correction motion as it aligns itself to the setpoint. This behavior
represents potential hazards for both man and machine and is therefore
generally undesirable.
The MDCMP or MDCMP1 equalization blocks can help counter-measure
this effect. For different operating states or operating mode changes,
these blocks ensure that a defined and jerk-free (smooth) transition takes
place. They are always configured as the last block in the setpoint
generation chain - directly before DRVIF.
The equalization block function is effective when the closed-loop position
control is enabled. To do this, the following steps are to be executed:
1. The position actual value of the drive is connected to the setting input
SV of MDCMP(1) (it must first be converted into float!).
2. With the position controller inhibited, the setting function is activated
(S = 1). This means that the position actual value is accepted as
position setpoint YP (position reference value YP). At the same time a
check is made as to whether the position actual value lies within the
specified axis cycle; i.e. whether the drive was rotated/moved while
powered-down. If the position actual value lies outside the axis cycle
(i.e. SV < 0 or SV > AZ [AC]), then using an automatic correction by n
axis cycles (n is an integer number), the position actual value is set to
the appropriate value within the axis cycle.
3. The setpoint channel is disabled, i.e. the speed is zero and the
position is constant.
4. The closed-loop position control is enabled. Setpoint and actual value
are the same, i.e. the drive initially remains stationary.
5. There is an offset at block MDCMP(1) between the input setpoint
(reference) position XP and output YP. This is due to the setting
operation. In order to remove this offset, a positive signal edge must
be provided at input SOC. As a result, block MDCMP(1) YP executes
an equalization motion at XP. This means that the drive aligns itself to
position XP. This alignment is realized taking into consideration limit
values VMX, AMX and JRK and the direction inputs FWD and BWD
(Table 9-1). The MDCMP1 has the same effect at a transition from a
local operating mode (stopping, jogging, positioning, referencing
[homing]) to synchronous operation.
6. If the equalization operation at plant standstill is not possible or is not
desirable (e.g. in order not to cause a web break), then the system
can also be ramped-up with the initial offset. The equalization
operation can then be corrected while the system runs and therefore
slowly so that it is distributed over a number of products.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-17

GMC blocks

SV(t) position actual value

AZ
XP
XP(t)

YP(t)

SV(t) position actual value

0
Alignment

SOC
S

Setting

Enable position
controller

Fig. 9-7

Virtual master

INT_MR

t
t

Setting function and alignment of the drive

The virtual master is used to generate position and speed setpoints. It


generates the start of the setpoint generation. All of the drives of a group
operating in synchronism derive their setpoints from a virtual master.
In the simplest case, the virtual master comprises a ramp-function
generator and the INT_MR block. The ramp-function generator supplies
the system speed and INT_MR generates, from this, the position setpoint
(position reference value) taking into account the axis cycle.

Fig. 9-8

RGE

Virtual master from the RGE and INT_MR blocks

The ramp-up and ramp-down times can be set separately at the rampfunction generator RGE. Data refers to the speed at the input NRM. In
the example in Fig. 8 this means that the drive accelerates to 1000 RPM
in 2 s (TU = 2000 ms) and brakes down to standstill from 1000 RPM in 5
s (TD = 5000 ms).
Fig. 8 involves a speed normalization in [RPM] (possibly also [m/min]). This
is because of the fact that NFV = 1.0 at the INT_MR (Virt_Master)
block.

9-18

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Virtual master for


precise stopping at
a position
(using FB
CLUTCH)

The CLUTCH block can be used as virtual master. It already includes a


ramp-function generator with jerk limiting for the speed setpoint (input
VLC). Further, it can also stop either as quickly as possible (input HLT) or
stop at a defined stop position XPS (input STP).
The following example clearly shows this. The setpoint speed is changed
during operation followed by precise stopping at a specific position.

Stop, closed-loop position controlled


STP
t
Velocity
300
VLC
YV
100

t
Acceleration
5
t
Position
YP
36000
20000

t
Fig. 9-9

Example: Virtual master with FB CLUTCH

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-19

GMC blocks

Inserting motion
control functions

Fig. 9-10

Simple example for gearing (CFC chart)

The setpoint generation chain starts with the virtual master and ends with
the equalization block MDCMP(1). Depending on the application, blocks
can be inserted in between that influence the setpoint (e.g. gear, cam,
engaging/disengaging).
When configuring/engineering the system, the processing sequence
should be carefully observed; this should be the same as the setpoint
flow.

9-20

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.1.4
9.1.4.1

Application example with central closed-loop position control


System schematic and task profile
The system shown in the diagram below is to be implemented. Products
are transported from a conveyor belt into compartments. The closed-loop
position control is realized centrally and the drive is controlled via a
speed interface. All of the position values are specified in [mm] (NFX =
1000); all velocities are specified in [m/min] (NFV = 1).
The products are located at uneven distances along the conveyor belt,
however with at least 200 mm between them. A sensor detects the last
product on the conveyor belt (production detection). After a product has
been detected, the chain with the compartments is moved upwards by
one compartment.
The compartment height fluctuates - however, every compartment should
be precisely positioned at the upper edge of the conveyor belt. In so
doing, it is detected at which instant in time the base of the compartment
reaches a sensor (compartment base detection).
Product
detection
Belt position XP
(master)

Direction of motion
5

1
2

dx >200 mm

Fig. 9-11

Direction of motion

70
mm

200 mm

dF = 60 mm 5 mm
Compartment position
YP (slave)

25 mm

System schematic for the application example

As a result of the task profile, the following sub-tasks are obtained:


1. Central position sensing
2. Central closed-loop position control
3. Referencing with an incremental encoder
4. Real master (the product position is used as reference)
5. Offset equalization (every compartment base is detected and
positioned)
6. Position setpoints (position reference values) to shift the
compartments are generated using positioners, engaging function and
cam.
Three different solutions to shift the compartments are presented. These
three different solutions will then clearly underline the differences
between the various setpoint blocks.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-21

GMC blocks

9.1.4.2
Belt drive

Central position sensing with an incremental encoder


The NAVMC block is used to sense the position and speed. In the
example, position in [mm] and the velocity in [m/min] are to be output.
The zero position of the belt drive is the product position XP when
reaching the product detection. The zero position of a compartment is the
quiescent position where the product is introduced.
The belt drive comprises a geared motor according to the following
schematic.

Motor

Gear

Roll

Belt

19

50 mm

1024
pulses/rev.
Fig. 9-12

Drive for the conveyor belt in Fig. 9-11

Position normalization:
One revolution of the conveyor belt shaft corresponds to 50 mm * =
157.08 mm. For a motor without gear, the encoder rotates through 1024
4 = 4096 pulses (4x evaluation for incremental encoders with 2 encoder
tracks offset through 90). In order to achieve integer values, the number
of pulses for 100 revolutions of the shaft is taken into account in the
formula.
Converting an encoder pulse into a position value:

Position actual value = encoder pulses


Example:

15708 3

in [mm]
409600 19

The motor makes 19 revolutions


the shaft makes 3 revolutions
the belt advances by 471.239 mm

Position actual value = 19 4096

15708 3 15708
=
3 = 471.239mm
409600 19
100

The NAVMC block calculates the position according to the formula:

Position actual value = encoder pulse(sin ce _ zero position)

NPN NM

NPD DN

Whereby the gear ratio effective between the encoder and distance
moved (belt) is specified using NM, DN. This is the reason that the
position normalization inputs should be set as follows:

9-22

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

NPN
NPD
NM
DN

=
=
=
=

15708
409600
3
19

The belt position reference point is there where a product is detected for
the first time by the product detection function. The leading edge of the
signal "product detected" is used to set the position actual value to zero.
The signal is connected at the zero pulse input of the position sensing
function. (Caution: The edge evaluation depends on the module; if
required use an inverted signal!)
Zero position:
The following settings are required for synchronizing:
Input

Value

Meaning

MHW

0000 0xxx 00xx xxxx b Bit 6=0 synchronizing using the zero pulse
Bit 7=0 the edge depends on the direction of rotation (always at
the same position)

MSW

0000 x00x xxxx xxxx b Bits 10, 9 = 00 - when synchronizing, the position YP = SVS is
set.

SVS

0.0

SP

Table 9-11

Setting value for the position at the leading edge of the product
detection
Enables the setting mechanism with zero pulse

Settings to synchronize to the zero pulse

Referencing is not required for the belt drive as the position is resynchronized to each product.
Speed normalization:
The speed YV, calculated by block NAVMC, is obtained according to the
following formula:

YV = speed _ encoder[ RPM ]

NM
DN RS

In order to determine the speed, the encoder resolution is required that is


entered at input PR (PR = 1024).
If the motor rotates with 19 RPM, then this corresponds to a belt feed
(belt advance) of 3 157.08 mm/min = 0.47124 m/min. This results in a
reference speed RS (to output the velocity in [m/min]) as follows:

RS =

19 RPM 3
= 6.3662 rev
m
m
0.47124
19
min

In this particular case, the result corresponds to the number of


revolutions of the drive shaft in order to move the conveyor belt by 1 m.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-23

GMC blocks

Rated speed:
At the rated motor speed (3000 RPM) the conveyor belt feed is 74.41
m
/min or 1.24 mm/ms.
Drive for the
storage
compartments

The compartments are driven by a geared motor through a drive chain.


The position is normalized corresponding to the normalization of the belt
drive.
100 mm
Motor

M
1024
pulses/rev.
Fig. 9-13

NPN
NPD
NM
DN

=
=
=
=

Gear
10
1

Chain drive for


compartments

Chain drive to transport the compartments

31415
409600
1
10

(314.15 mm/revolution, pinion wheel)


(4096 pulses per revolution)
(gear, numerator)
(gear, denominator)

The position of the compartment is obtained from the compartment base


detection (refer to Fig. 9-11). If the compartment base reaches a
proximity switch (BERO), the position is set. This is realized for the first
time when referencing and during operation, always when the next
compartment base is detected.
The following settings are required for synchronizing:
Input

Value

Meaning

MHW

0000 0xxx 00xx xxxx b Bit 6=0 synchronizing using the zero pulse
Bit 7=0 the edge depends on the direction of rotation (always at the
same position)

MSW

0000 x00x xxxx xxxx b Bits 10, 9 = 00 when referencing, position YP = SVS is set.
0000 x10x xxxx xxxx b 10 : In cyclic operation, only the offset is calculated!

SVS

35.0

SP

Table 9-12

Setting value for the position for the leading edge of the compartment
base detection
(dF 25 mm = 60 mm 25 mm)
Enables the setting mechanism with a zero pulse

Setting the synchronization to the compartment base detection

The speed normalization is realized according to the same formula as for


the belt feed. For a motor speed of 10 RPM, a feed velocity of 0.31415
m
/min is obtained. The reference speed RS is calculated as follows

RS =

9-24

10 RPM 1
= 3.18319 rev
m
0.31415 m
10
min

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

When the system is first powered-up, initially, the position of the


compartments is not known. This is the reason that the transport chain is
driven with a low speed until the first compartment base (reference point)
is detected. This is realized in the closed-loop speed controlled mode i.e. the closed-loop position control is not active.

Referencing the
compartment
bases

When the base of the compartment is detected, the compartment position


is set to the setpoint (reference value). The waiting position of a
compartment is 60 mm (refer to Fig. 9-11); its detection is 25 mm in front
of this. This means that the setpoint is 35 mm. This value is available as
setting value (Table 9-12).
After the reference point has been passed, then the system can continue
to be operated in the closed-loop position controlled mode. In this case,
the compartment should move to the quiescent position.
When referencing, essentially 3 blocks are being used:
1. The setpoint generation for position and speed (MDCMP1)
2. The position sensing (NAVMC)
3. The closed-loop position control (PC)

Setpoints
0
60.0
3
1

MDCMP1
YV
HLT
QRF
XHM
VRF
MDR
REF
SV
SYN

Speed setpoint
Enable position controller

PC

Position setpoint (position reference


YP value)
POV
NOV
COR

NAVMC
YP
1
35.0

SP
SVS

Position controller

Speed
setpoint for
the drive

Position
actual value

SS

Synchronizing pulse
Fig. 9-14

Position controller structure and block connections for referencing

To reference, REF is set to 1 (MDCMP1). When referencing starts,


MDCMP1 inhibits the position controller and enters the speed setpoint
(corresponding to input VRF). At the reference point, the position sensing
NAVMC generates a pulse at output SS. MDCMP1 then accepts the
position actual value as position setpoint (position reference value) and
re-enables the closed-loop position control.
As a result of the selected referencing mode (MDR = 3), the chain
continues to the quiescent position XHM (60.0) and stops there. This
means that referencing can be ended (REF = 0) and a changeover made
to the setpoint channel or standstill is forced (HLT = 1).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-25

GMC blocks

The compartment bases repeat every 60 mm. This is the reason that for
the blocks, to generate a setpoint (e.g. MDCMP1), an axis cycle AZ = 60
is selected. This is the reason that the quiescent position XHM = 60
corresponds to the position XHM = 0.
VRF

60

Velocity

Position actual value or position


setpoint (position reference value)

35

REF

Referencing

SYN

Synchronizing pulse

QRF

Enable position controller

Fig. 9-15

The distances between the compartment bases fluctuate according to the


specifications. This is the reason that the position actual value must be
corrected for each compartment base. This procedure is comparable with
a referencing sequence while each compartment is raised. However, it is
realized with the closed-loop position control active. This means that the
actual value correction must be realized bumplessly (without step).

Offset equalization
for the
compartment
bases

Setpoints
0
60

MDCMP1
YV
HLT
QRF
AZ
SV
SYN
DOC
OFS

Signal characteristics for referencing

Speed setpoint
Enable position controller = 1

PC

Position setpoint (position reference


YP value
NAVMC

POV
NOV
COR

MSW
1
35.0

SP
SVS

YP
YDS

Speed
setpoint for
the drive
Position controller
Position actual value
Offset

SS

Synchronizing pulse

Fig. 9-16

Structure for the offset equalization for every compartment

To achieve this, the mode of the position sensing (NAVMC) is changed


(refer to Table 9-11). When the compartment base detection responds,
the position actual value is no longer set. Instead, the offset is calculated
and output at YDS. A pulse is simultaneously output at SS.

9-26

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Offset:
The offset is the deviation of the actual value from the expected value. If
the base of the compartment is detected at position actual value 35 mm,
then the offset is zero. On the other hand, if the compartment base is
detected at a position actual value of 30 mm, then the offset is 5 mm.
This means that the position actual value must be corrected from 30 mm
to 35 mm.
Offset and synchronizing pulse SS are combined using the MDCMP1
block. This means that at every synchronizing pulse, an offset
equalization takes place. To do this, MDCMP1 first corrects the position
setpoint (position reference value) and actual value by the offset and then
transitions the setpoint to the actual position setpoint (position reference
value) according to the entered speed VMX, acceleration AMX and jerk
JRK. Normally, only small corrections are made when equalizing the
offset. This means that only acceleration (AMX) and jerk (JRK) are
effective from the dynamic data.

9.1.4.3

Setpoint generation (basic structure and analog value output)


Three versions are shown to generate the position and speed setpoints
for the compartment bases. In each case, the setpoints are entered at
inputs XP1, XV1 of block MDCMP1.
Basic functions

Setpoint generation
Positioning
Engager

Position

MDCMP1

Speed

Vset

Scaling factor
SF

Xset

Speed
constant

Cam

Position actual value

1500 RPM = 8 V

NAVMC
Xact

Fig. 9-17

Rough structure for the compartment base drive (without control signals)

The output is in the form of an analog speed setpoint - whereby 0 V


should correspond to standstill and 8 V, a speed of 1500 RPM. This
means that the scaling factor is calculated as follows:

Voltage =

X
1500 RPM
5V =
5V = 8V
SF
SF

SF = 937.5 RPM
Solution 1:
Positioning

When the product detection responds (Fig. 9-11), positioning starts and
advances the compartment bases by one compartment (60 mm). This is
a relative positioning operation. For absolute positioning to the position
60 mm, no motion would occur - this is because 60 mm corresponds to 0
mm for a rotary axis with an axis cycle of 60. This would mean that the
target and start positions would be the same.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-27

GMC blocks

Positioning is independent of the movement of the conveyor belt. It is


characterized using the dynamic inputs VMX, AMX and JRK. Using these
inputs it must be ensured that the compartment chain moves forwards by
one compartment before the next product is introduced.
In this particular case, for conveyor belt movement, closed-loop position
controlled operation is not required as the belt position is not relevant.
This means that the position sensing for the belt is not required. The
drive is controlled using a speed setpoint.
Belt drive
Belt velocity

Speed

D
A

Analog output

Conveyor base drive


Xact
60.0

XP
XPD
STR

Axis cycle
Position normalization
Speed normalization
Relative positioning

60
1000
1
0

AZ
NFX
NFV
ABS

Fig. 9-18

Solution 2:
Engaging function

POSMC

Actual position
(starting value)
Target
Starting

MDCMP1
YP
YV

Position
Speed

XP1
XV1

Structure of the setpoint generation with positioning function

The engaging function is an emulation of the motion (position) of an axis


(master axis) to another axis (slave axis). In this particular case, the belt
drive is the master axis and the compartment base drive the slave axis.
After a product has been detected the slave (compartment base) is
accelerated to the velocity of the belt. It advances by the "insertion
distance" - this means it is moved forwards by 60 mm. If the belt moves
faster, then the compartment chain automatically moves faster as well.
During the insertion operation, there is a unique position interdependency
between both axes.
Due to the position interdependencies, both axes must be closed-loop
position controlled. They should have a defined axis cycle. The reason
for this is that a unique, clear position emulation can only be achieved in
this way. In this particular example, this is not guaranteed for the
conveyor belt position as the products are located on the belt at irregular
distances.
This represents a special case! When implementing the project this was
taken into account in so much that during the engaging operation the
master axis does not make a position step. The master axis is defined as
linear axis (AZI = 0) - whereby the position actual value is set to zero
when the product detection responds.
The engager block (EDC1) is simultaneously triggered. This means that
the engaging operation starts as soon as the position value of the
conveyor belt (XP) exceeds the coupling position the next time. The

9-28

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

coupling position XCP is selected so that it is exceeded shortly after XP


is reset (max. belt velocity is 1.24 mm/ms; refer to Fehler! Verweisquelle
konnte nicht gefunden werden.).
Belt position

Compartment base drive


EDC1

NAVMC YP
YV
SS

Belt position
Belt velocity
Product detected

0
60
Coupling position
5
Insertion length 60
Mode: Insertion
1
Axis cycle

Fig. 9-19

XP
XV
SST
AZI
AZO
XCP
DXL
ED

MDCMP1
YP
YV

Position
Speed

XP1
XV1

Structure of the setpoint generator with engager

Product
detection

200

Belt
position
XCP

60

Compartment
position
t
v_belt
v_compartme
nt

Velocity
Fig. 9-20

Timing when generating a setpoint with the engaging function

Disadvantages, engaging function:


The interdependency between the conveyor belt position and the
compartment position is, for the engaging function, realized using a
characteristic (output position = f(input position)). In this case, the output
velocity, independent of the insertion length, always ramps-up from the
standstill to the input velocity and then returns to standstill. Extremely
high acceleration levels can occur for extremely short insertion lengths.
Solution 3: Cam

Using a cam, the compartment base motion can be implemented in a


similar way to that of the engager function. Generally, a cam has the
advantage over the engager that the output quantity (setpoints for the
compartment base) can be freely defined. This means that the output
velocity can be lower or higher than the input speed. This also allows
small movements to be implemented with low levels of acceleration.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-29

GMC blocks

A cam is formed using two blocks. The SPLINE block calculates


mathematical functions that run through the individual points along the
cam. The cam functions can be calculated in a slow time slice (e.g. T5).
The CAMD block evaluates this cam by determining a slave position YP
(ordinate) from the master position XP (abscissa). At the same time it
calculates the velocity of the slave drive. The CAMD block is processed
in the time slice for the setpoint generation.
Belt position

Compartment base drive


CAMD

NAVMC YP
YV

Fig. 9-21

Belt velocity

0
60
Absolute output 1
Axis cycle

SPLINE
X1, X2, ...
Y1, Y2, ...
G1, G2, ...

Belt position

FKT

Definition

XP
XV

MDCMP1
YP
YV

Position
Speed

XP1
XV1

AZI
AZO
ABS
FKT

Structure of the setpoint generation using a cam (SCX = SCY = SCV = 1.0)

The point along the cam i is specified using coordinates Xi and Yi.
Optionally, the gradient Gi of the cam can be specified in point i. In order
to activate the gradient input, the bit, belonging to point i of inputs GM1 or
GM2 is set to 1. Individual sections between two points can be
considered to be linear. Within a linear section, the master and slave
velocities are proportional to one another (refer to the block
documentation for SPLINE).
The cam can be defined at the SPLINE block, either when configuring in
the CFC or in the runtime in the CFC test mode or using the "Spline
Editor" tool. Cams that were downloaded into the module using the
Spline Editor are deleted as soon as the program is again downloaded
onto the module!
Defining cams using the Spline Editor:
The Spline Editor tool is available as program "p7sdspex.exe" in the path
"..\Step7\s7bin".
The compartment base position (Y axis) corresponds to the characteristic
in Fehler! Verweisquelle konnte nicht gefunden werden.. In order to
define the engager function for the compartment bases, a cam with two
points is sufficient. A 3rd order cam is configured between the two points
(for Order Nos. = 0 and 3). This means that the velocity has a parabolic
characteristic with respect to time.
After a product has been detected, the master position jumps to zero.
The compartment position increases by one compartment while the
master advances by 100 mm. The compartment then stabilizes at this
position until the next product is detected. (Horizontal sections up to
are located to the left and right of the cam.)

9-30

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Fig. 9-22

Entering the cam with SplineEdit

The cam can be saved as text file. The file contains the values of all of
the relevant inputs of the SPLINE block. These values can be entered at
the block connections in the CFC. This ensures that after the project has
been compiled, the cam is kept.
Alternatively, the cam can be transferred to the module via the online
interface. To do this, the menu entry "SIMADYN D" "Transfer Data" is
selected.
The following options are available in the transfer dialog box:
1. To search the configured software for "SPLINE" type blocks
("Search")
2. The cam can be transferred to the selected block ("Transmit data")
3. A cam can be generated from the curve points transferred ("Validate
data")
4. The actual cam of the selected block can be read-out of the module
(Read back curve)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-31

GMC blocks

Fig. 9-23

Transfer dialog box of SplineEdit

Write mode:
When transferring the cam to the module, the permanent write mode
should be selected. This means that the cam is kept even after the
module is re-started.
Scaling factor for
cams

Cams can be extended or compressed in operation using the SCX and


SCY scaling factors. This means, for example, that referenced cams can
be used. These are cams, that, in the X and Y axes are defined in the
range 0 to 1.0.
For the example described above, it does not make any sense to scale
the Y axis as the compartment bases are always to be moved through 60
mm. On the other hand, the X axis can be scaled in order to define,
during operation for which belt motion the compartment chain should be
advanced by one compartment. The associated cam looks like this:
YP
60.0

1.0
Fig. 9-24

XP

Cam definition with referenced X axis (e.g.: SCX = 100)

An X scaling of SCX = 100 means that the output quantity YP


(compartment base position) increases from 0 to 60 mm - while the input
quantity XP (belt position) increases from zero to 100 mm.

9-32

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

If, in this case, the scaling SCY is increased from 1.0 to 2.0, then the
compartment chain advances by 120 mm after each product detection i.e. it advances by two compartments.
The setpoint velocity for the compartment base is automatically and
correctly calculated also when cams are scaled (SCX, SCY). The scaling
factor for the derivation of SCV only has to be changed in exceptional
cases - for example, if different speed normalization is required at the
input (XV) and at the output (YV).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-33

GMC blocks

9.1.5

Integrating drives using the DSC technique via PROFIBUS


We recommend the DSC technique for dynamic, distributed closed-loop
position control functions (refer to the References /2/). In this case, the
closed-loop position control in the drive converter is used. This technique
can be used, for example, with the SIMODRIVE 611U drive converter
system.
Communications between a control and a drive converter with an
encoder is realized with a protocol specified in /2/ - the standard telegram
5. The telegram type 105 represents a version where in addition, a value
to reduce the torque is transferred.

Standard
telegram 5

Telegram 105

STW1

STW1

Control word 1 (for the drive converter)

NSOLL_B

NSOLL_B

Speed setpoint

STW2

STW2

Control word 2 (including sign-of-life)

---

MomRed

Value for the torque reduction (0 = no reduction)

G1_STW

G1_STW

Encoder 1 control word

XERR

XERR

Incremental following error in the control

KPC

KPC

Proportional gain of the drive converter position controller


(the position controller is de-activated with the value zero)

Table 9-13

Words

Meaning

Send telegrams for DSC drives

Standard
telegram 5

Telegram 105

Words

Meaning

ZSW1

ZSW1

Status word 1 (from the drive converter)

NIST_B

NIST_B

Speed actual value

ZSW2

ZSW2

Status word 2 (including sign-of-life)

---

MeldW

Message word (refer to References /3/)

G1_ZSW

G1_ZSW

Encoder 1 status word

G1_XIST1

G1_XIST1

Incremental position actual value from encoder 1

G1_XIST2

G1_XIST2

Second incremental position actual value from encoder 1


(this is used, for example for measured values)

Table 9-14

Telegrams received from DSC drives

Standard resources in the CFC can be used to configure both telegram


types 5 and 105. To simplify this, alternatively, the FBs RCVT5 and
SNDT5 are available. In addition to the protocol structure they can be
used to convert data types and to normalize quantities. They include an
"offset input" - which means that also several of these telegrams can be
transferred to a drive converter (this is necessary, e.g. when using
double-axis modules).
The following functions are required to control the drive:

9-34

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The drive must be powered-up and down

A fast stop must be able to be initiated

Faults acknowledged

The drive sign-of-life monitored

Its own sign-of-life must be able to be generated

The DRVIF2 block handles these functions.


Further, the incremental position actual values of the encoder must be
conditioned for the particular application (normalization, set position,
etc.). The NAVDP block handles this task. It also controls the referencing
or the sensing of measured values in the drive converter. The NAVDP
behaves in a similar way to an NAVMC for encoders connected locally to
the control. However it supports incremental as well as also absolute
encoder systems. Further, it does not calculate any speed actual value
as this is already included in the telegrams.
The NAVDP also calculates the following error in encoder increments
from the reference and actual position. These are then sent to the drive
converter as "XERR". At a constant speed, this value is not equal to zero
- even if there is no real following error. The fictitious error is obtained
due to the signal runtimes (signal propagation times) through the
communications network. When the DSC technique is used, this error is
automatically compensated in the drive converter.
The interaction of the specified FBs is shown in the following diagram.
The processing sequence must be precisely maintained in order that
unnecessary runtimes are not caused (deadtimes).
In the diagram, the setpoint generation is represented as an example by
a virtual master (FB CLUTCH).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-35

GMC blocks

Fig. 9-25

Example for integrating a DSC drive in the CFC chart (principle)

References

9-36

/1/

SIMOVERT MASTERDRIVES Compendium Motion Control


Order No. 6SE7080-0QX50

/2/

PROFIdrive - Profile Drive Technology


PROFIBUS Profile Order No.: 3.172

/3/

SIMODRIVE 611 Universal; Funktionsbeschreibung


Order No. 6SN11970AB200AP7

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.2

MDCMP Compensation block for mode changeover

Symbol
MDCMP
Reference position
Reference velocity
Setting value, position
Dynamic position offset
Correction value for the position act. value
Relative velocity for compensation
Relative acceleration for compensation
Jerk
Position normalization
Velocity normalization
Axis cycle
Set position
Correct position actual value
Steady-state offset compensation
Dynamic offset compensation
Mode changeover
Compensation using forwards motion
Compensation using reverse motion

Brief description

R
R
R
R
R
R
R
R
R
R
DI
BO
BO
BO
BO
BO
BO
BO

XP
XV
XPS
OFS
XCP
VMX
AMX
JRK
NFX
NFV
AZ
SET
CP
SOC
DOC
MOC
FWD
BWD

YP
YV
COR
POV
NOV
DON
QF

R
R
DI
BO
BO
BO
BO

Pos. reference value output


Ref. velocity output
Correction value
Positive position overflow
Negative position overflow
Compensation ended
Group error

This block is used to smoothly (jerk-free) changeover synchronous


functions and to compensate an offset in the actual value channel.
When changing operating modes (e.g. from a gearbox synchronous
operation to cam disk), steps can occur in the position (XP) and velocity
setpoint (XV), which may not be transferred to the drive. The MDCMP
block generates internal compensation functions to compensate these
steps.
The compensation functions are subject to the specified velocity and
acceleration values.

Mode of operation

The first of three functions of the block is setting the position value. As
long as the input SET = 1 (SET command), an internal offset (refer to the
block diagram dXP) is added to the position reference value XP. Output
YP then assumes the value YP = XSP. Generally, a step appears at
output YP. This means that this setting mechanism is only practical for
operation with the drive inhibited.
Compensation operations which might not have been completed, are
cancelled using the SET command (block diagram: dx = dv = 0). The
internal offset is steady-state. It remains unchanged until a new setting
function is executed, or a steady-state offset compensation is made.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-37

GMC blocks

The steady-state offset compensation is initiated by a rising edge at input


SOC. After this, the internal offset value is reduced smoothly (jerk-free) to
zero. If the SET and SOC inputs are simultaneously set to 1, the steadystate offset compensation starts immediately after the SET command is
withdrawn.
Steady-state
compensation

YP
YP

dXP

SOC
SET

Steady-state offset compensation


Set steady-state offset

Example for SOC

When the drive is powered-up, the setpoint generation function provides


a position reference value, which is different than the actual drive
position. In order to prevent inadmissible drive motion after it has been
enabled, output YP is set to the position actual value using the setting
function. The drive is then enabled.
In order to align the drive to a setpoint, the steady-state offset
compensation is activated. The drive then rotates to the reference
position XP.
YP
XP
OFS

YP

DOC

MOC

Dynamic offset compensation

Mode change
(MOC)

Mode changeover

The second block function is used to changeover modes (also in the


motion).
At the same time that a new mode is selected, a rising edge must be
connected to input MOC. Using this edge, the block senses the jump at
the position and velocity inputs, which occurred due to the mode
changeover. This initiates an automatic compensation operation, i.e. the
position and velocity of the old mode are transitioned, jerk-free to the
position and velocity of the new mode.

9-38

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

AZO

YP
POV
NOV
YV

XP
XV
dXP
YP
XPS
SET

Internal
steadystate
offset

x(t)

dXo

dv

v(t)

dVo
dAo

dx

SOC
OFS
DOC
MOC
FWD
BWD
NFV

Offset
compensation

VMX AMX

JRK

YP
YV
COR
Block diagram

Offset
compensation
(DOC)

The third mode is used to compensate the offset in the position actual
value channel. If an offset is recognized when sensing the position actual
value, the actual value isnt directly corrected, but instead via the setpoint
channel. This has the advantage that the setpoint and actual value
channels can be processed in different time sectors and the actual value
channel does not have to compute the offset compensation (computation
time).
Procedure: Initially, the offset is subtracted from the setpoint and from the
actual value as correction value. The setpoint is then transitioned to the
previous value (before the correction) using a compensation operation.

Direction of the
compensation
operation

XCP, CP

For applications with rotary axis (AZ > 0), there are three compensation
versions which can be selected for mode changeover (MOC) or steadystate offset compensation (SOC):
AZ

FWD

BWD

Motion direction ( * means any)

>0

>0

Backwards

>0

Forwards

Shortest distance

Shortest distance

If the position actual value and position reference value are to be


changed according to a step function, connections XCP and CP become
effective. The position change is entered at XCP at the same time as the
setpoint step, and is transferred as correction to the position actual value
with rising edge at CP. This function is required, e.g. if when "referencing
on the fly" the setpoint is to be adapted at the same time.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-39

GMC blocks

I/O
Pre-assign.
XP

Reference position

0.0

XV

Reference velocity

0.0

XPS

Setting value, position

0.0

OFS

Dynamic position offset

0.0

XCP

Correction value for the position actual value. With a rising edge at CP, the
position actual value is increased by XCP using corrective action (outputs
COR, POV, NOV).

0.0

VMX

Maximum relative velocity for the compensation process. The compensation


process is superimposed on the synchronous operation (XV). This means
that the sum of XV and dv is effective at output YV, values can be obtained
which are greater than the rated drive velocity!

100.0

AMX

Maximum relative acceleration for compensation. The effective acceleration


is the sum of the compensation and synchronous operation.
Units: Rotary axis [1/s]
linear axis [m/s]

100.0

JRK

Jerk = change in the acceleration per unit time for the compensation
operation.
Units: Rotary axis [1/s]
linear axis [m/s]
JRK = 0, means no rounding-off.

1000.0

NFX

Position normalization:

360000

Rotary axis:

Number of LU per revolution


Linear axis:
Number of LU

per meter
NFV

Velocity normalization: Factor to convert the application-specific speed


normalization into [rev./min] for a rotary axis or [m/min] for a linear axis.
Examples:
User normalization

Conversion

NFV

1/s
mm/s

60 s/min
0.001 m/mm 60 s/min

60.0
0.06

1.0

AZ

Axis cycle for the input and output position value

SET

Set position. For SET = 1, compensation operations which have not been
completed are cancelled.

CP

Correct position actual value. The position actual value is increased by XCP
with a rising edge.

SOC

Steady-state offset compensation, edge-triggered

DOC

Dynamic offset compensation, edge-triggered. For SET = 1, the DOC input


is ignored.

MOC

Mode changeover, edge-triggered. For SET = 1, input MOC is ignored.

FWD

Compensation operation, always forwards; dominant with respect to BWD


(not evaluated for DOC)

BWD

Compensation operation, always backwards; (not evaluated for DOC)

YP

Output, position reference value

0.0

YV

Output, velocity setpoint

0.0

COR

Correction value for steps in the position reference value and actual value

POV

Positive overflow of the position reference value (COR was subtracted)

NOV

Negative overflow of the position reference value (COR was added)

9-40

360000

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

DON

0: Compensation operation (dynamic or steady-state offset compensation


and mode changeover active
1: Compensation operation completed

QF

Group error: Initialization: Not sufficient working memory;


during operation: Inputs VMX, AMX, NFX, NFV must be > 0; JRK must be
0.

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Computed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

20
7
3,5

9-41

GMC blocks

9.3

CAMSW Cam block with 2 cams

Symbol
CAMSW
Position actual value
Velocity
Position normalization
Velocity normalization
Axis cycle of the position actual value
Enable, forwards
Enable, backwards
Reset mode
Switch-in threshold 1
Switch-out threshold 1
Switch offset time 1 [ms]
Switch-in threshold 2
Switch-out threshold 2
Switch delay time 2 [ms]

Brief description

R
R
R
R
DI
BO
BO
BO
R
R
R
R
R
R

XP
XV
NFX
NFV
AZ
ENF
ENR
RM
XA1
XB1
DT1
XA2
XB2
DT2

Q
QN
Q1
QN1
Q2
QN2
QF

BO
BO
BO
BO
BO
BO
BO

Cam active
Cam not active
Cam 1 active
Cam 1 not active
Cam 2 active
Cam 2 not active
Group error

The block forms a cam controller for 2 cams. For each cam, the position
and timing delay when switching-in/out can be individually defined. All of
the cams refer to the same position actual value XP and the associated
velocity XV.
A positive time delay (leading) can only be reliably executed for a velocity
which also remains approximately constant! Negative switching delay
times (lagging cams) are generated using a time delay independent of
the velocity. This means, that the velocity signal is only required for
leading cams.

Mode of operation

As a result of the velocity V, position X* is calculated delayed by


switching delay time DT. If this position lies within the switching interval
between XA X* XB, output Q is set. For positive DT values, the
switching time instant is brought forward (deadtime compensation); it is
delayed for negative values.

XA = XB

If XA and XB are close to one another (extreme case XA = XB), then


when the interval is exceeded {XA, XB}, for a minimum of one sampling
time, output Q is set. This is also true, if X* skips the complete interval
{XA, XB} in one sampling time.
Q

Q
XA

XB

XB

XA

LU

For the case XA > XB, the active cam range is at both ends of the range.
In the range {XB, XA}, Q = 0.

9-42

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

XA > XB

Direction of
rotation

The direction of rotation can be changed in operation. For systems with


linear axis (AZI = 0) this is even the rule. If the cam is only to be effective
in one direction of motion, then only this is enabled (ENF, ENR). The
enable function is only effective for switch-in, but not for the switch-out. If,
e.g. ENF = 1 and ENR = 0, then output Q can only be set to 1 for
forwards motion (when XA is exceeded). If the direction of rotation
changes with the output active, then Q is set to 0 when the switching
interval is exited.
ENF = 1
ENR = 0
DT = 0

X
XB
XA

t
Q

AZI

The operating range of position actual value XP is limited to the range 0


XP < AZI for systems with rotary axis (AZI > 0). If XP exceeds the value
AZI (or if XP falls below the value 0), then the position actual value jumps
by this value. This characteristic is emulated inside the block for delayed
cams.

POV, NOV

A rising edge at one of the inputs POV or NOV is used to recognize a


position jump. When using input RM (reset mode), it can be arranged that
the cams can only be shifted within one cycle of the input sawtooth. For
RM = 1, an active cam becomes inactive with the position jump.
Examples
RM = 0

XP

RM = 1

XB
XA
t
DT = 0

DT = 0
XA XB

DT = 0
XA XB

t
Q
t
DT

Q
DT > 0
DT

DT < 0

DT

Q
DT

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

DT

9-43

GMC blocks

The velocity and position normalization are used to calculate the position
offset from the velocity XV and delay DT (specified in [ms]). The definition
is valid for any application-specific normalization of XV and XP.
Example:

NFV, NFX

m
m
User normalization
s
s = 60
NFV =
=
=
m
Internal _ normalization m
min
60 s
I/O
Pre-assign.
XP

Reference position

0.0

XV

Reference velocity

0.0

NFX

Position normalization:

Rotary axis:

Number of LU per revolution


Linear axis:
Number of LU

360000

per meter
NFV

Velocity normalization: Factor to convert the application-specific speed


normalization into [rev./min] for a rotary axis or [m/min] for a linear axis.
Examples:
User normalization

NFV

1/s
mm/s

60.0
0.06

1.0

AZ

Upper limit value

ENF

Enable forwards motion

ENR

Enable backwards motion

RM

Reset mode: For a 1, active cams are reset with the position jump.

POV

Position overflow, positive (X was reduced by AZI)

NOV

Position overflow, negative (X was increased by AZI)

XA1

Switch-in threshold, 1st cam; when reversing, acts as a switch-out threshold

1000.0

XB1

Switch-out threshold, 1st cam; when reversing, acts as a switch-in threshold


(default value: 0.6)

2000.0

DT1

Switching delay time 1st cam in [ms]

XA2

Switch-in threshold, 2nd cam; when reversing, acts as a switch-out threshold

5000.0

XB2

Switch-out threshold, 2nd cam; when reversing, acts as a switch-in threshold

6000.0

DT2

Switching delay time 2nd cam in [ms] (default value 0.0)

Group output cam active; Q1 to Q4 OR'd

QN

Group output cam not active (inverse to Q)

Q1

Output cam 1 active (default value 0)

QN1

Output cam 1 not active (default value 1)

Q2

Output cam 2 active (default value 0)

QN2

Output cam 2 not active (default value 1)

QF

Group error: Not sufficient working memory.

9-44

360000

0 ms

0 ms

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

28
9
4,5

9-45

GMC blocks

9.4

CATCH Catch-up/shutdown

Symbol
CATCH
Reference position
Reference velocity
Shutdown position
Offset setpoint
Local velocity
Max. compensation velocity
Max. compensation acceleration
Jerk
Position normalization
Velocity normalization
Axis cycle
Position/speed-controlled
Local/synchronous operation
Overcontrol permitted
Trigger
Enable

Brief description

R
R
R
R
R
R
R
R
R
R
DI
BO
BO
BO
BO
BO

XP
XV
XPS
DYP
VLC
VMX
AMX
JRK
NFX
NFV
AZ
PN
LOC
OVD
TRG
EN

YP
YV
COR
POV
NOV
QSY
QLC
QST
QTR
DON
QF

R
R
DI
BO
BO
BO
BO
BO
BO
BO
BO

Position ref. value output


Ref. velocity output
Correction value
Positive position overflow
Negative position overflow
Synchronous operation
Local velocity reached
Standstill
Compensation operation active
Compensation operation completed
Group error

The block is used to couple-in or couple-out a drive from a drive group. In


the coupled-out condition, the drive runs with any local velocity. This
velocity can also be zero.
The transition from local operation to synchronous operation (catch-up)
or vice-versa (shutdown) is realized using specified jerk and acceleration
values.
The block can either be operated in the position or speed-dependent
mode. In the speed-dependent mode, shutdown or catch-up is realized
as quickly as possible. The position at standstill or the offset between the
input position XP and the output position YP is random.
In the position-dependent mode, the shutdown or catch-up function is
super-imposed on a positioning function. In this case, the drive comes to
a standstill at the shutdown position, or, after the catch-up operation has
been completed, there is offset DYP between XP and YP.

Mode of operation

The block has several operating modes. The transition from one mode to
another is realized using a rising edge at trigger input TRG (trigger
event). The mode inputs PN and LOC are then evaluated and
compensation started. Inputs XPS, DYP, AMX and JRK are only
evaluated when there is a trigger event. This means, that a change at
one of these inputs only becomes effective after a trigger event.
The mode after power-on is determined by the values at the inputs PN,
LOC, VLC and DYP during initialization.

9-46

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Modes
PN

LOC

VLC

Mode (this is set after compensation has been completed)

Any

Speed-controlled synchronous operation. YP and XP are in


synchronism. The offset between XP and YP is random.

Not equal to Speed-controlled local operation. After compensation has been


zero
completed, the block operates like a virtual master. The following
applies
TRG = 1 changes at VLC are immediately accepted and
transferred to YV
TRG = 0 the actual value of YV is kept

Any

Closed-loop speed controlled shutdown. After braking has been


completed, YP is at any random position
Closed-loop position controlled synchronous operation. YP and XP
are in synchronism. The offset between XP and YP is DYP:
YP = ( XP + DYP ) modulo AZ
When changing the offset setpoint and a new trigger event, the
offset is compensated up to the new offset setpoint.

Any

Closed-loop position controlled shutdown at position XPS.


When changing the shutdown position and a new trigger event
occurs, then the offset is compensated to the new shutdown
position.

I/O
Pre-assign.
XP

Reference position

0.0

XV

Reference velocity

0.0

XPS

Shutdown position for shutdown in the closed-loop position controlled mode


(PN = 1)

0.0

DYP

Offset setpoint for synchronous operation in the closed-loop position


controlled mode (PN = 1)

0.0

VLC

Local setpoint velocity for local operation (LOC =1) in the closed-loop speed
controlled mode (PN = 0). A change is effective as long as TRG = 1.

0.0

VMX

Maximum velocity for offset compensation. This is only valid if the setpoint
velocity remains unchanged (standstill or synchronous operation). This has
no significance for shutdown or when catching-up.

1000.0

AMX

Maximum acceleration/deceleration for the transition statuses.


Units:
Rotary axis [1/s]
Linear axis [ 1/m]

JRK

Jerk (da/dt, derivative of the acceleration [time])


Units : Rotary axis 1/s]

m
50 2
da
s = 2000 m
=
dt
25ms
s3
NFX

Position normalization:

50.0
2000.0

linear axis [m/s]).

Example:
This means that for JRK = 2000,
acceleration is 50m/s after 25 ms.
Rotary axis:
Linear axis:

Number of LU per revolution


Number of LU per meter

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

360000

9-47

GMC blocks

NFV

Velocity normalization: Factor to convert the application-specific speed


normalization into [rev./min] for a rotary axis or [m/min] for linear axis.
Examples:
User normalization

Conversion

NFV

1/s
mm/s

60 s/min
0.001 m/mm 60 s/min

60.0
0.06

1.0

AZ

Axis cycle for the input and output position value (O = linear axis)

PN

Speed or position-controlled operation (0 = speed-controlled; this means


XPS and DYP are not evaluated)

360000
0

LOC

Local velocity input or synchronous operation (0 = synchronous operation)

OVD

Overcontrol (saturation) permitted: Synchronizing or shutdown is realized as


quickly as possible. In this case, YV can be briefly greater than XV. Motion in
the opposite direction to the reference is also permitted.

TRG

Trigger to start a mode change or after changing an input quantity (XPS,


DYP, AMX, JRK, NFX or NFV). The rising edge at input TRG (0 1) is
evaluated.

EN

Enable. For EN = 0 (not enabled) YP = 0 and YV = 0

YP

Position reference value, output quantity

0.0

YV

Reference velocity, output quantity

0.0

COR

Correction value for position reference value jumps (steps)

POV

Positive position reference value overflow (COR was subtracted)

NOV

Negative position reference value overflow (COR was added)

QSY

Synchronous operation: This is set to 1 as soon as XP and YP run in


synchronism

QLC

Local velocity reached. This is set to 1 as soon as the transition status in the
speed-controlled local mode has been completed.

QST

Standstill signal

QTR

1: Compensation operation operational

DON

1: Compensation operation completed

QF

Group error: Not sufficient working memory

VLC is accepted level-dependent for TRG = 1.

Configuring data

9-48

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

23
8
4,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.5

EDC Engage/disengage

Symbol
EDC
Reference position
Reference velocity
Axis cycle
Coupling position
Engage/disengage length
Ramp length
Rounding-off (percentage)
Position setting value
Set position
Start/stop trigger
Start/stop continuous
Engage/disengage
Enable

R
R
DI
R
R
R
R
R
BO
BO
BO
BO
BO

XP
XV
AZ
XCP
DXL
RMP
DRP
SV
S
SST
SSC
ED
EN

YP
YV
COR
POV
NOV
QSY
QST
QF

R
R
DI
BO
BO
BO
BO
BO

Position reference value, slave


Ref. velocity, slave
Correction value
Positive position overflow
Negative position overflow
Synchronous operation
Standstill
Group error

Brief description

This block is used to couple-in or couple-out a drive from a drive group,


dependent on the position when a specific trigger condition is present.
The position actual value XP at the input represents the reference
position of a master drive. Output YP is the position reference value for a
slave drive.

Switch-in operation

When engaging, the output status of the slave is standstill. Engaging is


activated using a trigger signal (SST or SSC). If the master XP exceeds
the coupling position XCP, the slave (YP) moves along the engaging
length distance DXL where it remains stationary.
Engaging operation
YV

XV

YV

YP

Engaging operation with post-triggering


XV

YP
2 DXL

DXL
SST

SST

Post-trigger range

Post-triggering range

Engaging can be extended by one or several additional engaging


lengths, if additional trigger edges (SST = 0 1) occur while engaging.
The trigger edges must lie within the post-trigger range. After the start of
the delay, the trigger event only becomes effective after the next coupling
position is passed, whereby a new coupling position is only taken into
account after the system comes to a standstill.
During engaging, the master axis (reference position) moves through

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-49

GMC blocks

dXP = engaging length + ramp length = DXL + RMP.


When disengaging, the slave is initially in synchronism with the master
drive. If the master passes the coupling position after a trigger event, the
slave decelerates and then accelerates back to the synchronous velocity.
At each disengaging operation, the offset grows between the master and
slave by the disengaging length DXL.
Switch-out
operation

Post-triggering, in order to implement an offset by additional disengaging


lengths, is possible up to the start of the synchronizing operation.
Disengaging operation
YV

Disengaging operation with post-triggering


YV

XV

YP

XV

YP

2 DXL

DXL

SST

SST

Post-trigger range

Post-trigger range

While engaging, the master axis moves through


dXP = engaging length + ramp length = DXL + RMP.
Negative speed

Engaging and disengaging is also possible when the drive reverses


(negative speeds). In this case, the operation starts when the coupling
position is not reached. The engaging/disengaging length then becomes
effective in the other direction. This means for XV < 0 and for DXL = 90,
the slave moves through 90 when engaging.

Continuous
operation

In addition to edge-triggered operation, which has been described up


until now (with SST), continuous operation is also possible. Continuous
operation is active as long as SSC is set to 1. Furthermore, the following
prerequisites must be fulfilled:
It involves a system with linear axis
Or the coupling position is passed a second time before
engaging/disengaging has been completed.
In both cases, engaging/disengaging is continually extended by the value
DXL, until SSC is set to 0.

9-50

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Continuous engaging operation

Intermittent engaging operation

YV

YV
0 XCP

0 XCP

0 XCP

XP

0 XCP

SSC

Intermittent
operation

0 XCP

0 XCP

SSC

For systems with rotary axis and one engaging/disengaging length


DXL < AZ - RMP
intermittent operation occurs. This means that engaging/disengaging is
completed before the coupling position is passed again. In this case, a
sequence of individual engaging/disengaging operations is obtained,
which start, when the coupling position is exceeded. The sequence is
continued as long as SSC = 1.

Ramps, roundingoff

The signal characteristics of YP and YV are dependent on input


quantities XP and XV (position-dependent; not time-dependent!). This
means, that acceleration and rounding-off are defined as positiondependent quantities. The acceleration ramp specifies the component of
the distance where the slave drive accelerates or decelerates (ramp
length). The rounding-off defines by how many percent the acceleration
ramp is used to establish the torque.
Ramp length and rounding-off

YP
RMP
2

Rounding-off DRP

RMP
2

DRP = 0 %

YV
DRP = 50 %
dYV
dt
DRP

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

DRP = 100 %

9-51

GMC blocks

I/O
Pre-assign.
XP

Reference position

0.0

XV

Reference velocity

0.0

AZ

Axis cycle for input and output position value (O = linear axis)

XCP

Coupling position. Engaging/disengaging operations are started if XP


exceeds this position value (or falls below it for a negative speed)

DXL

Engaging/disengaging length. Engaging operation: The slave is moved in the


actual direction of motion by DXL for each engaging operation. Disengaging
operation: The offset between the master and slave grows by DXL.

360000

RMP

Distance component, which is used for acceleration and deceleration.


The master moves through RMP for each acceleration/deceleration
operation; the slave only moves through 50% of RMP/2. (Caution: This
occurs 2x per engaging/disengaging operation)

120000

DRP

Component of the acceleration/deceleration ramp as a percentage, which is


used to ramp-up and ramp-down to the maximum acceleration. Permissible
range 0 DRP 100

SV

Position setting value

Set position reference value YP = SV

SST

An engaging/disengaging operation is started, triggered by an edge. This can


be used to extend the operation, if a new 01 edge occurs within the posttrigger range.

SSC

An engaging or disengaging operation is started as a function of a level, for


continuous or intermittent operation.

ED

Operating mode selection:

EN

Enable. For EN = 0 (not enabled), YP = 0 and YV = 0

YP

Position reference value for the slave drive

0.0

YV

Reference velocity for the slave drive

0.0

COR

Correction value when jumping to YP due to the limit to the axis cycle for
systems with rotary axis.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of
a machining cycle (position overflow for a positive direction of rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration
of a processing cycle (position overflow for a negative direction of rotation).

QSY

Synchronous operation: Indicates that the master axis and slave axis are in
angular synchronism

QST

Standstill: Indicates that the slave velocity YV = 0.

QF

Group error; this is always set, if YFC is not equal to zero.

9-52

360000
0.0

10 %

0.0

0: Disengaging

1: Engaging

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

20
7
3,5

9-53

GMC blocks

9.6

NAVMC Speed/position actual value sensing

Symbol
NAVMC
Hardware address
Encoder pulse number
Reference speed
Master/slave
Mode, hardware
Mode, software
Axis cycle (max. position value)
Reset position
Set position
Position setting value
Setting value for synchronization
Pos. ref. value for synchronization
Enable synchronization
Enable, pulse output at SYP
POV: Subtract position correction
NOV: Add position correction
COR: Position correction value
Normalization, YP numerator
Normalization, YP denominator
Gear factor, numerator
Gear factor, denominator
Position register for interrupt
Use encoder ENC
Alternative encoder
Activate simulation
Simulation speed

Brief description

G
DI
R
BO
W
W
DI
BO
BO
R
R
R
BO
BO
BO
BO
DI
DI
DI
DI
DI
DI
BO
DI
BO
R

AD
PR
RS
MS
MHW
MSW
AZ
R
S
SV
SVS
XPS
SP
ESP
CP
CN
DYP
NPN
NPD
NM
DN
REG
SEL
ENC
SIM
XSI

YV
YP
YPS
YDS
YPI
SS
SYP
QPI
COR
POV
NOV
QF
YFC

R
R
R
R
R
BO
BO
BO
DI
BO
BO
BO
W

Speed actual value


Position actual value
Position when synchronizing
Offset actual value
Position at interrupt
Position for synchronization set
Synchronizing pulse
YPI changed
Corrective value
Positive position overflow
Negative position overflow
Group error
Error code

Digital speed sensing with pulse encoder with the following features:
The machine speed or velocity is sensed with a normalization which
can be specified (e.g.: in [rev/min], [Hz], [m/min], [mm/s] ....) and
taking into account a gearbox between the encoder and machine.
The machine position is sensed with a normalization which can be
specified (e.g.: in [0.01], [m], [mm], ....) and taking into account a
gearbox between the encoder and machine.
Position sensing according to the master-slave principle. This means
that the block, configured as master, senses all of the slave position
actual values which are assigned to it, at the same time.
A synchronizing pulse is monitored and output (e.g. zero pulse). This
pulse is used to correct the position actual value.

9-54

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The position actual value is corrected to synchronize the sawtooth


signal at the position output (rotary axis) with a reference sawtooth
(virtual or real master)
A sawtooth signal is automatically generated when operated as real
master.
During operation changeover between encoder tracks at various
terminals (please refer to block ENC2)
The encoder can be simulated by entering the required speed
The block must be configured in a sampling time 20 ms. The maximum
pulse frequencies, which are dependent on the module, should be
observed at the encoder inputs.
A master-slave configuration is formed using NAVMC blocks, which are
configured in the same sampling time. The block which is configured first,
becomes the master by setting input MS to 1. All of the following blocks
in the execution sequence with MS = 0 are assigned to this master as
slave.
Mode of operation

The master saves the counter statuses for the encoder pulses which it
received in the last interval and the required time. It does this for itself
and all of the slaves which are assigned to it. This means that the
position and speed values of all blocks in a master-slave configuration
are referred to precisely the same instant. It is also possible that the
master and slaves evaluate the same encoder (the same hardware
address). If several NAVMCs are configured at the same hardware
address, then only the hardware settings (input MHW) of the first
configured NAVMC are used.
The following schematic applies for speed and position:
Motor

Machine
DN
NM

Gearbox

Speed

YP, YV

Output Y indicates the machine speed according to the following formula:

YV =

speed _ encoder[ 1

min

NM
DN

RS

Any speed or velocity normalization can be implemented using the


reference speed RS.
Examples

Required units for YV Machine feed per revolution Value for RS


Revolutions / min

Any

1.0

Hz

Any

60.0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-55

GMC blocks

Position

m / min

0.335 m

1 / 0.335 = 2.985

Inch / s

22.5 inch

60 / 22.5 = 2.66667

The position outputs YP, YPS, YDP and COR have the basis unit LU
(length unit). If angular degrees are to be used for rotary axis systems,
we recommend 1 LU = 0.001 as base unit; for linear axis systems, 1 LU
= 1 m.
Essentially, any basis unit can be selected. However, it should be
observed that 1 LU is the finest system resolution. This means that
several inputs and outputs are exclusively implemented as integer values
(type DINT). This prevents rounding-off errors from being summed, and
guarantees long-time stability of the position sensing.
The position actual value is calculated as follows

YP = encoder pulses

NM NPN

+ DYP
DN NPD

The quotient NPN / NPD defines the basic unit. In this case, NPN
specifies the required position value, and NPD, the required number of
encoder pulses. (Please note: An encoder with 1024 pulses per
revolution generates 4 1024 = 4096 pulses per revolution, as each
signal edge is evaluated.)
Example

For an encoder with 2048 pulses/revolution, one revolution should be


emulated on a linear system with 1 LU = 0.1 mm. One machine revolution
represents a feed of 525.8 mm.
NPN = 5258;
NPD = 8192;

( 5258 0.1 mm)


( 4 2048 )

This data is also valid if a gearbox is located between the motor and
machine, as this is taken into account using the gearbox factor (NM, DN).
Sawtooth
generation

For rotary axis systems, a position overflow at YP must be prevented.


This means that YP must be cyclically corrected (e.g. after every
revolution) by the distance it moved through (axis cycle). This generates
a sawtooth signal at output YP (at constant speed). Various techniques
are available.
1. A synchronizing signal is used to reset (hardware; e.g. zero pulse). In
this case, YP is optionally set to SVS, or the value SVS is subtracted
from YP (refer to MSW).
2. Corrected by the value DYP with a rising edge at inputs CP and CN.
These signals are generally supplied from the setpoint channel. This
technique should not be simultaneously combined with the two other
techniques.
3. The sawtooth signal is internally generated. In this case, bit 11 of
MSW must be set to 1. If YP exceeds the value AZ, then YP is set to
YP AZ. If YP falls below 0, YP is set to YP + AZ.

9-56

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

POV, NOV, COR

At each correction, the absolute corrective value is output at COR. For a


positive overflow, COR is subtracted from YP and output POV is set for
the duration of a cycle. For a negative overflow, COR is added to YP and
a pulse is generated at output NOV.
If a correction with the same sign (polarity) is made in two or more
consecutive sampling times, the correction is shown alternating at POV
and NOV. The sign of COR is adapted, so that subsequent blocks can
execute the correction with the correct sign.

Hardware mode MHW


Bit(s)

Function

2 ... 0

Hardware filter
000

Encoder type 1
No filter

Encoder type 2
No filter

001

500 ns

125 ns

010

2 s

Not permissible

011

8 s

Not permissible

100

16 s

Not permissible

Otherwise

Not permissible

Not permissible

5 ... 3 Coarse pulse evaluation


(only influences T400)

6
7

10

Significance

Value

000

Mode
0

Logic
Coarse pulse ignored

001

Coarse pulse ignored

010

Coarse pulse and 1st fine pulse

011

Coarse pulse and each fine pulse

100

Coarse pulse, inverse and 1st fine pulse

101

Otherwise

>5

Coarse pulse, inverse and each fine


pulse
Coarse pulse ignored

Via the zero pulse

Via the trigger signal (only possible for IT41)

0
1

Direction of rotation dependent (always the same


position value)
Always the rising edge of the zero pulse

Source of the track signals

From terminal XE1 of T400

(involves encoder 1 at T400)

From the basic drive converter/inverter via backplane


bus
From terminal XE1 of T400

Synchronization
Edge evaluation

Source of the zero pulses

(involves encoder 1 at T400)

Encoder type

From the basic drive converter/inverter via backplane


bus
Encoder type 1: Two tracks offset through 90
Max. frequency: 1 MHz
Pulse quadrupling
Encoder type 2: Every direction of rotation has its
own pulse track
Max. frequency: 2.5 MHz
No pulse quadrupling!

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-57

GMC blocks

Software mode
MSW
Bit(s)

Function

Value

6 ... 0

Measuring interval for


standstill identification

Not used

Behavior for S = 1

10 .. 9

11

12
13
14

Significance

0 X 127

If no track pulses are recognized after X+1


sampling cycles, the speed actual value YV is set
to 0.

Set position value: YP = SV

Subtract setting value: YP = YP SV

Behavior for synchronization

00

Set position value: YP = SVS

(zero pulse)

01

Subtract setting value: YP = YP SVS

prerequisite: SP = 1

1*

YP is not influenced. Synchronization only


updates YPS and YDP. ( * = any)

Enable internal

Position YP is not limited

sawtooth generation

Limiting: 0 YP < AZ; with automatic POV / NOV


generation for overflow/underflow.

Interpretation of AZ for the


internal sawtooth generation

AZ has the same normalization as YP

AZ is interpreted as encoder increments

Interpretation of DYP for the


position correction

DYP has the same normalization as YP

DYP is interpreted as encoder increments

Take into account AZ when


synchronizing (mode: YP =
SVS)

Set YP = SVS for synchronization

When setting YP, the next possible value from


{SVS, SVS+AZ, SVS-AZ} is used in order to
obtain a position step < AZ

Comment regarding bit 14 in the MSW:


This mode simplifies the combination of automatic sawtooth generation
and synchronization (e. g. to print marks) for the case that the print mark
is located close to the position step.

9-58

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Pre-assign.
AD

Hardware address

PR

Encoder pulse number (this may not be 0! )

RS

Reference speed; YV = speed [RPM] / RS; (this may not be 0!)

MS

Master/slave

MHW

Hardware mode

0x0002

MHS

Software mode

0x007F

AZ

Axis cycle for automatic sawtooth generation and determining the offset
(this may not be negative)

360000

Reset position

Set position

SV

Setting value for input S

0.0

SVS

Setting value for synchronization

0.0

XPS

Position reference value for synchronization. This is used to calculate the


offset

0.0

SP

Synchronization enable

ESP

Enable pulse output at SYP

CP

Subtract corrective value DYP from YP (positive overflow)

CN

Add corrective value DYP to YP (negative overflow)

DYP

Corrective value for the position actual value

NPN

Normalization for position; numerator (this may not be 0!)

NPD

Normalization for position; denominator (this may not be 0!)

NM

Gearbox factor; numerator (this may not be 0!)

DN

Gearbox factor; denominator (this may not be 0!)

REG

Position register for an interrupt. The input value is converted into a position
value and displayed at output YPI (refer to block POSREG)
This function is not possible in the simulation mode. POSREG must be
connected to the same hardware address which is evaluated at NAVMC.

SEL

Use encoder ENC (only effective for SIM = 0)

ENC

Alternative encoder. In order to use an alternative encoder,


this connection must be connected to the ENC output of block ENC2.

SIM

Activate simulation. For SIM = 1, an immediate changeover is made from the


real encoder to internally calculated encoder pulses. In so doing, steps
(jumps) can occur at the velocity output if the real encoder supplies another
velocity than that at input XSI.

1024
1.0
1

The synchronization (zero pulse evaluation) has an error in the simulation


mode. The maximum error is the position changed per sampling cycle.
XSI

Simulation speed. Speed normalization, effective at output YV, is used.

0.0

YV

Velocity actual value

0.0

YP

Position actual value

0.0

YPS

Position actual value for the synchronizing event (zero pulse).

0.0

YDS

Offset actual value = ( XPS YPS ) modulo AZ

0.0

YPI

Input REG converted taking into account the set position


normalization

0.0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-59

GMC blocks

SS

The position actual value was set as a result of a synchronizing pulse.


Prerequisite: SP = 1 and mode MSW bit10 = 0.

SYP

Synchronizing pulse was recognized. This is generated for a processing cycle


at each synchronizing signal, independent of SP and MSW.

QPI

After changing the output YPI, a pulse is output at QPI for one cycle.

COR

Corrective value for the position actual value. If the position actual value
changes due to CP, CN, synchronization or automatic sawtooth generation,
the absolute value of the change (signed) is indicated at COR.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of
a processing cycle.

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration
of a processing cycle.

QF

Group error, this is always set, if YFC is not equal to zero.

YFC

Error code (refer to the table)

0x0000

YFC error codes


Bit

Significance

At least one of the block inputs PR, RS, DN, NM, NPN or NPD has the value zero.

The block was configured in a sampling time > 20 ms.

Illegal filter setting

Block was configured as a slave; no master was found (in the same sampling time and in the
execution sequence before the slave).

Master and slave are not configured in the same sampling time.

Several masters are configured at the same hardware address.

Master and slave are configured at the same address.

AZ is negative.

The measured sampling time was > 20 ms.

No valid ENC2 block connected at input ENC

10

External encoder at connection ENC signals a fault.


(the fault is only displayed when selecting this encoder)

Configuring data

9-60

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

30
10
5,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.7

POSREG Position register reading

Symbol
POSREG
Hardware address
Enable

Brief description

G
BO

AD
EN

REG
QF

DI
BO

Position register
Group error

The function block is used for an event driven position sensing for
incremental encoders. It has to be calculated in an interrupt task which
becomes active with the event (e.g. at the rising edge of a binary input).
The function block should be used in combination with the position
sensing block NAVMC. The NAVMC has to be configured in a cyclic task
and it is responsible for normalization and setting function for the position
actual values.
This kind of event-driven position sensing should not be applied if the
corresponding NAVMC is configured in a master-slave-group where all
position values have to be sampled absolutely synchronous.

Mode of operation

The function block latches the pulse counter of the corresponding


incremental encoder register and outputs the counter status at REG. This
output has to be connected to the input REG of the NAVMC which is
assigned to the same hardware address.
NAVMC calculates the corresponding position actual value and outputs it
at YPI. Any change of YPI will cause a pulse at the output QPI.
Zyklische Task
NAVMC
AD
Alarmtask
YPI Lage zum Alarmereignis

POSREG
AD

REG

REG

QPI

I/O
Pre-assign.
AD

Hardware address

EN

Enable 1 :

REG

Actual status of the position register of the incremental encoder. Connect this
output to the input REG of the corresponding NAVMC.

QF

Group error: not enough memory

function block is processed

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-61

GMC blocks

Configuring data

9-62

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

No

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

2
1
0,5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.8

PHSFT Phase shifter

Symbol
PHSFT
Position actual value 1
Position actual value 2
Reference velocity 1
Reference velocity 2
Axis cycle

R
R
R
R
DI

XP1
XP2
XV1
XV2
AZ

YP
YV
COR
POV
NOV

R
R
DI
BO
BO

Position value shifted


Velocity setpoint
Corrective value
Positive overflow
Negative overflow

Brief description

The block shifts a position value by one offset value and limits the result
to a specified axis cycle. It can either involve a steady-state or dynamic
offset value.

Mode of operation

The position output YP is obtained as follows


YP = ( XP1 + XP2 ) modulo AZ.
A sawtooth signal is obtained at YP which is offset with respect to XP1
and XP2. For a positive position overflow, YP jumps from a high to a low
value. A pulse is generated at output POV for 1 sampling time.
For negative velocities, a negative position overflow occurs, whereby YP
increases by the value AZ, and a pulse is generated at output NOV for
one sampling time. For a dynamic offset value, its rate of change must be
entered at input XV2. XV1 and XV2 must have the same velocity
normalization!

I/O
Pre-assign.
XP1

Position actual value 1

0.0

XP2

Position actual value 2

0.0

XV1

Reference velocity 1

0.0

XV2

Reference velocity 2

0.0

AZ

Axis cycle of the position inputs and outputs (0 means linear axis)

YP

Shifted position value: YP = ( XP1 + XP2 ) modulo AZ

YV

Velocity setpoint:

COR

Correction value around YP jumps if the range 0 YP < AZ is exceeded or


fallen below.

POV

For a positive position overflow, POV is set to 1 for a processing cycle.

NOV

For a negative position overflow, NOV is set to 1 for a processing cycle.

YV = XV1 + XV2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

0
0
0.0

9-63

GMC blocks

Configuring data

9-64

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

10
3
1,5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.9

ADDAZ Adder with axis cycle limiting

Symbol
DDAZ
Axis cycle
Position actual value 1
Position actual value 2
Position actual value 3
Position actual value 4
Position actual value 5
Position actual value 6
Position actual value 7
Position actual value 8

DI
R
R
R
R
R
R
R
R

AZ
XP1
XP2
XP3
XP4
XP5
XP6
XP7
XP8

YP

Position value shifted

Brief description

The block adds 8 position values and limits the result to the specified axis
cycle.

Mode of operation

The position output YP is obtained as follows


8

YP = (

XPi) mod AZ
i =1

Output YP is limited to the range 0 YP < AZ. For a positive position


overflow, YP jumps back from a high (approx. AZ) to a low value (approx.
0).
I/O
Pre-assign.
AZ

Axis cycle for the position output and all position inputs (0 means linear axis)

XP1 ...

Position actual values 1 to ..

0.0

... XP8

... position actual value 8

0.0

YP

Position output value: (sum of XP1 to XP8) modulo AZO

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

360000

5
2
1,0

9-65

GMC blocks

9.10

SPLINE Cam disk with 32 points (calculation)

Symbol
SPLINE
Type
Start calculation
Linear sections 1
Linear sections 2
Abscissa value, point 1
Ordinate value, point 1
Abscissa value, point 2
Ordinate value, point 2

Abscissa value, point 31


Ordinate value, point 31
Abscissa value, point 32
Ordinate value, point 32

Brief description

I
BO
W
W
R
R
R
R

TYP
CAL
LM1
LM2
X1
Y1
X2
Y2

R
R
R
R

X31
Y31
X32
Y32

FKT
QF

DI
BO

Result functions (pointer)


Input error

The SPLINE block calculates a characteristic comprising up to 32 points.


The result of the calculation is provided in tabular form as 3rd order
functions. This segmentation means that the complicated calculation can
be calculated in slow time sectors, while curve values are accessed in
fast time sectors.
The functions can be evaluated by a type SPLFKT or CAMD block. This
block accesses up to 31 curve segments, which are defined by points 1
to 32.

Mode of operation

Up to 32 points along a curve are defined at inputs X1, Y1 to X32, Y32.


The X values must be in an increasing sequence. The first point, whose
X value is less than/equal to the X value of the previous point, defines the
number of points which are used. All additional points are ignored.
Example: X5 = 10.0; X6 = 0.0; 5 points are evaluated.
The block calculates the curves, which connect the points, using a rising
edge at input CAL. The curve order number is defined by the value at
input TYP:
Type Curve sections

9-66

3rd order. The gradient at point Xi is the same as the gradient between
the adjacent points = (Yi+1 Yi-1) / (Xi+1 Xi-1 )

1st order (straight line)

2nd order

3rd order. The gradient at point Xi is the same as the average value of
the gradients of the adjacent segments.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Individual sections can then be defined as straight line using inputs LM1
and LM2, if TYP is not set to 1. In this case, LM1 and LM2 are evaluated
bitwise. Each bit is assigned another curve section. If the bit is set, then
the section is shown as a straight line.
Assignment:
For example: Section 7 is the section between points (X7,Y7) and
(X8,Y8).
Bit of LM1 or LM2

15

14

13

12

11

10

Section assigned to LM1

16

15

14

13

12

11

10

Section assigned to LM2

31

30

29

28

27

26

25

24

23

22

21

20

19

18

17

I/O
Pre-assign.
CAL

The calculation is started with a rising edge. The curve which has been used
up until now remains valid until the calculation has been completed.

LM1

Linear section 1. To specify individual straight line sections.

LM2

Linear section 2. To specify individual straight line sections.

X1, Y1 ... 32 points to specify the curve.


X32, Y32
FKT

Result function for SPLFKT. This output may only be connected with the
input of block type SPLFKT with the same name. This signals SPLFKT the
curve specification.

QF

Input error. QF is set if X2 <= X1, or if there is not sufficient memory


available.

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

new calculation: 50 s for T400/PM5


new calculation: 17 s for FM458 / PM6
new calculation: 8,5 s for CPU550 / 551

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

5
2
1,0

9-67

GMC blocks

9.11

CAMD Cam disk

Symbol
CAMD
Reference position
Reference velocity
Calculation function
Axis cycle length, input
Axis cycle length, output
Scaling, input (X axis)
Scaling, output (Y axis)
Scaling, derivation
Absolute output
Stop for YP = AZO
Restart after YP = AZO
Enable

Brief description

R
R
DI
DI
DI
R
R
R
BO
BO
BO
BO

XP
XV
FKT
AZI
AZO
SCX
SCY
SCV
ABS
STP
TRG
EN

YP
YV
COR
POV
NOV
QST
QF

R
R
DI
BO
BO
BO
BO

Position reference value


Velocity setpoint
Correction value
Positive position overflow
Negative position overflow
Stopped for YP = AZO
Group error

The block calculates the ordinate value YP of a cam disk, associated with
input quantity XP, using mathematical functions.
The input position value represents the reference position of a master
axis. The output position YP is the position reference value for a slave
drive. Position steps at the input are transferred, in the absolute output
mode, to the slave. In the relative output mode, the slave remains at the
actual position value for a master axis position jump.

Mode of operation

The cam disk function is configured from block SPLI32 from up to 32


points, and provides this as mathematical functions at output FKT. This
output is connected with input FKT of block SPLFKT.
If another cam disk is to be selected in operation, then this is realized by
changing-over input FKT to another SPLI32 calculation block. In this
case, changeover switches or multiplexors are used.
The input and output position value are normalized using input quantities
SCX and SCY according to the following diagram. The derivative of the
curve is output with the actual velocity XV and the weighting factor SCV
as reference velocity YV.
AZO
SCY

XP
SCX
XV

YP
COR
POV
NOV
YV

SCV

9-68

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Absolute output

There is a clear assignment between the input and output position


values, according the characteristic of the curve, in the absolute output
mode (ABS = 1):
YP = characteristic(XP) modulo AZO
The absolute output is only practical, if:

The input and output are systems with linear axis (AZO = AZI = 0)
The characteristic values for XP = 0 and XP = AZI are the same.

In both cases, position overflows (position jumps) only occur at position


output YP, if it involves a characteristic value less than 0 or greater than
AZO.
Examples for absolute output
Characteristic Y(X)

AZO = 0 or AZO >>YP


YP

AZI
Y

XP
0

AZI
AZO

AZI

Special case: STP = 1 (stop for YP = AZO)


XP

Special case: YP is limited by AZO

YP
TRG

XP

AZI
AZO

YP
t

t
POV
NOV

Relative output

For the relative output of a curve, the return jump of the input position
reference value XP (sawtooth) is not transferred to the slave axis. This
means that it is possible to attach original characteristics seamlessly
together ( i.e.:Y(0) = 0 ).
Example of relative output:
When the sawtooth jumps back, the characteristic is attached, offset by
the value Y(AZI). This means, that at each cycle, YP grows by the value
Y(AZI). If the range 0 YP < AZO is exceeded or fallen below, a modulo
AZO correction is made, which is designated with outputs POV or NOV.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-69

GMC blocks

Characteristic Y(X)

AZO
YP

Y(AZI)
0

XP
X

AZI

POV

I/O
Pre-assign.
XP

Reference position of a master axis

0.0

XV

Reference velocity of a master axis

0.0

FKT

Link to characteristic definition (block type SPLI32)

AZI

Axis cycle for the reference position (O = linear axis)

360000

AZ0

Axis cycle for the output position reference value (O = linear axis)

360000

SCX

Reference position scaling ( characteristic: X = XP / SCX ).

1000.0

SCY

Position reference value YP scaling ( characteristic: YP = Y(X) SCY )

1000.0

SCV

Scaling the derivative of the curve ( YV = dy/dx XV SCV )

ABS

Absolute output of the curve: 0 = relative output; 1 = absolute output

STP

Stop for YP = AZO. For STP = 1

TRG

Restart after the axis cycle limit AZO has been reached for STP = 1

EN

Enable. For EN = 0 (not enabled), YP = 0 and YV = 0

YP

Position reference value

0.0

YV

Velocity setpoint

0.0

COR

Correction value for jumps at YP due to limiting to the axis cycle for rotary
axis systems.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of
a processing cycle (position overflow for a positive direction of rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration
of a processing cycle (position overflow for a negative direction of rotation).

QST

Indicates that a stop was made for YP = AZO (to continue: TRG = 0 1).

QF

Group error : Not sufficient memory space

Configuring data

9-70

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

1.0

35
12
6,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.12

TABCAM Cam disk in tabular form

Symbol
TABCAM
Reference position
Reference speed
Table reference
Axis cycle, input
Axis cycle, output
Scaling factor, input
Scaling factor, output
Scaling factor, derivation
Mode absolute
Stop for YP = AZO
Restart after YP = AZO
Enable

Brief description

R
R
DI
DI
DI
R
R
R
BO
BO
BO
BO

XP
XV
TAB
AZI
AZO
SCX
SCY
SCV
ABS
STP
TRG
EN

YP
YV
COR
POV
NOV
QST
QF

R
R
DI
BO
BO
BO
BO

Position setpoint
Speed setpoint
Position correction value
Positive overflow
Negative overflow
Stopped for YP = AZO
Group error

The block calculates the ordinate value YP of a cam disk, associated with
input quantity XP, using a table of X- and Y-values.
The input position value represents the reference position of a master
axis. The output position YP is the position reference value for a slave
drive. Position steps at the input are transferred, in the absolute output
mode, to the slave. In the relative output mode, the slave remains at the
actual position value for a master axis position jump.

Mode of operation

The cam disk table contains the X- and Y-coordinates generated by the
block TAB. The link to the table is done by connecting output TAB of
block TAB to input TAB of block TABCAM.
If another cam table is to be selected in operation, then this is realized by
changing-over input TAB to another TAB calculation block. In this case,
changeover switches or multiplexors are used.
The input and output position value are normalized using input quantities
SCX and SCY according to the following diagram. The derivative of the
curve is output with the actual velocity XV and the weighting factor SCV
as reference velocity YV.
AZO
SCY

XP
SCX
XV

YP
COR
POV
NOV
YV

SCV

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-71

GMC blocks

Absolute output

There is a clear assignment between the input and output position


values, according the characteristic of the curve, in the absolute output
mode (ABS = 1):
YP = characteristic(XP) modulo AZO
The absolute output is only practical, if:

The input and output are systems with linear axis (AZO = AZI = 0)
The characteristic values for XP = 0 and XP = AZI are the same.

In both cases, position overflows (position jumps) only occur at position


output YP, if it involves a characteristic value less than 0 or greater than
AZO.
Examples for absolute output
Characteristic Y(X)

AZO = 0 or AZO >>YP


YP

AZI
Y

XP
0

AZI
AZO

AZI

Special case: STP = 1 (stop for YP = AZO)


XP

Special case: YP is limited by AZO

YP
TRG

XP

AZI
AZO

YP
t

t
POV
NOV

Relative output

For the relative output of a curve, the return jump of the input position
reference value XP (sawtooth) is not transferred to the slave axis. This
means that it is possible to attach original characteristics seamlessly
together ( i.e.:Y(0) = 0 ).
Example of relative output:
When the sawtooth jumps back, the characteristic is attached, offset by
the value Y(AZI). This means, that at each cycle, YP grows by the value
Y(AZI). If the range 0 YP < AZO is exceeded or fallen below, a modulo
AZO correction is made, which is designated with outputs POV or NOV.

9-72

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Characteristic Y(X)

AZO
YP

Y(AZI)
0

XP
X

AZI

POV

I/O
Pre-assign.
XP

Reference position of a master axis

0.0

XV

Reference velocity of a master axis

0.0

TAB

Link to table definition (block type TAB)

AZI

Axis cycle length for the reference position (0 = linear axis)

360000

AZ0

Axis cycle length for the output position reference value (0 = linear axis)

360000

SCX

Reference position scaling ( characteristic: X = XP / SCX ).

1000.0

SCY

Position reference value YP scaling ( characteristic: YP = Y(X) SCY )

1000.0

SCV

Scaling the derivative of the curve ( YV = dy/dx XV SCV / SCX )

ABS

Absolute output of the curve: 0 = relative output; 1 = absolute output

STP

Stop for YP = AZO. For STP = 1

TRG

Restart after the axis cycle limit AZO has been reached for STP = 1

EN

Enable. For EN = 0 (not enabled), YP = 0 and YV = 0

YP

Position reference value

0.0

YV

Velocity setpoint

0.0

COR

Correction value for jumps at YP due to limiting to the axis cycle for rotary
axis systems.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of
a processing cycle (position overflow for a positive direction of rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration
of a processing cycle (position overflow for a negative direction of rotation).

QST

Indicates that a stop was made for YP = AZO (to continue: TRG = 0 1).

QF

Group error : Not sufficient memory space

Configuring data

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

1.0

35
12
6,0

9-73

GMC blocks

9.13

POSMC Positioning block

Symbol
POSMC
Position actual value
Velocity actual value
Target position
Following error window
Target window
Max. velocity
Max. acceleration
Jerk
Position normalization
Velocity normalization
Axis cycle
Forwards
Backwards
Absolute/relative positioning
Start
Stop
Accept actual values
Enable

Brief description

R
R
R
R
R
R
R
R
R
R
DI
BO
BO
BO
BO
BO
BO
BO

XP
XV
XPD
DXE
DYE
VMX
AMX
JRK
NFX
NFV
AZ
FWD
BWD
ABS
STR
HLT
SET
EN

YP
YV
YA
COR
POV
NOV
QP
DON
QXE
QF

R
R
R
DI
BO
BO
BO
BO
BO
BO

Reference position
Reference velocity
Reference acceleration
Correction value
Positive position overflow
Negative position overflow
Positioning active
Position actual value in the target window
Following error exceeded
Group error

The POSMC block is a setpoint generator for position and velocity for
positioning with either linear or rotary axes. The setpoint characteristics
are obtained as a result of the target position, maximum velocity,
maximum acceleration and their derivatives (jerk). The velocity and
position are calculated, under this secondary condition so that when the
target position is reached, velocity and acceleration go to zero.
The positioning operation within an axis cycle can either be absolute or,
over any distances, relative.
The acceleration parameters AMX and JRK should be selected, so that
the drive can follow the setpoints with the minimum following error. Under
this prerequisite, precision positioning is possible without overshoot.

Mode of operation

The block is de-activated for EN = 0; outputs YP and YV are zero. For


SET = 1, the block is transparent, i.e.: YP = XP and
YV = XV. The acceleration is calculated from the change of XV.
Every positioning operation starts with a 01 edge at start input STR
(start pulse). YP is set to XP by the start pulse. Positioning starts with the
actual velocity and acceleration values.

Absolute
positioning

9-74

For the absolute positioning, the position reference value YP runs from
the initial value XP to the target position XPD. The distance moved
through is always less than the axis cycle length. The direction of motion
for rotary axis systems is defined by inputs FWD and BWD:

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

AZ

FWD

BWD

>0

>0

Backwards

>0

Forwards

No alternatives, as it involves a linear axis

Relative
positioning

Direction of motion ( ABS = 1; * means any)


Shortest distance (when position from the motion, the next possible standstill
position is decisive)

For relative positioning, the position reference value YP changes by XPD


with respect to the initial value. XDP can be any size, which also means
that positioning operations can be executed over several axis cycles. The
direction of motion is obtained from the sign of XPD. The inputs FWD and
BWD are not effective for relative positioning!.
Position overflows (YP > AZ) or underflows (YP < 0) are displayed at
outputs POV and NOV, and are corrected by the modulo AZ calculation
in the range 0 YP < AZ.
VMX
AMX

Reference position YP
Ref. speed YV

dt

AMX
Rounding-off (da/dt)=
dt

Changes during
positioning

Reference
acceleration

The input quantities can change during positioning. In this case, a new
start pulse must be generated. After this, an equalization operation takes
place as transition into the new positioning operation.

I/O
Pre-assign.
XP

Position actual value (normalization NFX). This is transferred, for SET=1, to


output YP. This is used when starting positioning as initial position of YP.

0.0

XV

Velocity actual value. Accepted at output YV for SET=1. When starting


positioning, XV is the initial velocity.

0.0

XPD

Absolute positioning:
Relative positioning:

0.0

DXE

Following error window (refer to QXE)

1000

DYE

Target window (refer to DON)

100.0

VMX

Maximum velocity when positioning. This value must be > 0. Normalization


NFV applies. If the initial velocity is greater than VMX, an equalization
operation takes place. YV is > VMX during this operation.

10.0

AMX

Max. acceleration. Value must be > 0.


Units: Rotary axis [1/s];
linear axis [m/s]

10.0

Target position
Positioning distance

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-75

GMC blocks

Jerk = change in the acceleration per unit time for equalization.


This value must be 0. JRK = 0 means that there is no rounding-off.
Units:

Rotary axis [1/m]

1000.0

linear axis [m/s]

NFX

Position normalization:

Rotary axis:
Linear axis:

Number of LU per revolution


Number of LU per meter

NFV

Velocity normalization: Factor to convert the user-specific speed


normalization into [rev./min] for a rotary axis or [m/min] for a linear axis.
Examples:
User normalization

Conversion

NFV

1/s
mm/s

60 s/min
0.001 m/mm 60 s/min

60.0
0.06

360000
1.0

AZ

Axis cycle for input and output position value

FWD

Forwards motion for absolute positioning and rotary axis (refer to the table
above)

BWD

Backwards motion for absolute positioning, rotary axis and FWD = 0

ABS

0: Relative positioning
1: Absolute positioning

STR

Positioning start with a positive edge

SET

For SET = 1, YP is set to XP and YV is set to XV. Any positioning operation


running is immediately cancelled. If SET = 0, positioning is not continued.

EN

Enable input. For EN = 0, YP = 0 and YV = 0.

YP

Output, reference position

0.0

YV

Output, reference velocity

0.0

YA

Output, reference acceleration

0.0

COR

Correction values for jumps in the position reference value

POV

Positive position reference value overflow (COR was subtracted)

NOV

Negative position reference value overflow (COR was added)

QP

0: Positioning completed (YP = target position; YV = YA = 0)


1: Positioning

DON

0: Positioning or position actual value outside the target window


1: Positioning completed and the position actual value in the target window

QXE

1: Setpoint/actual value deviation greater than the following error window (


|XP YP| > DXE )

QF

Group error: Initialization: Not sufficient working memory;


during operation: Inputs VMX, AMX must be > 0; JRK must be 0

Configuring data

9-76

360000

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

35
12
6,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.14

OFSSAV Offset calculation

Symbol
OFSSAV
Position actual value
Position reference value
Axis cycle
Save offset

R
R
DI
BO

XP
XPS
AZ
S

YPD
YPM

R
R

Position difference XPS - XP


Shortest path

Brief description

The block is used to sense the position offset. It generates the deviation
between the reference and actual position and the shortest path between
two position values for rotary axis systems.

Mode of operation

The difference between the reference and actual position is calculated


with a rising edge at input S ( 0 1).
YPD = XPS XP for S = 0 1
At the same time, the shortest position change is calculated, in order to
reach the reference position from the actual position.
Examples ( AZ = 360 ):
XPS

XP

YPD

YPM

350

10

340

-20

190

270

-90

-90

10

340

-330

30

I/O
Pre-assign.
XP

Position actual value

0.0

XPS

Position reference value

0.0

AZ

Axis cycle for input and output position values

Calculate offset with rising edge

YPD

Position difference (this is saved for S = 0 1)

0.0

YPM

Shortest path between the position actual value and position reference value.

0.0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

360000
0

9-77

GMC blocks

Configuring data

9-78

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

1
0,3
0,2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.15

OFSGEN Offset input

Symbol
OFSGEN
Offset setpoint
Velocity for compensation
Acceleration for compensation
Jerk
Position normalization
Velocity normalization
Axis cycle
Setting value
Accept setting value
Start offset change
Absolute / relative offset
Compensation using forwards motion
Compensation using backwards motion
Enable

R
R
R
R
R
R
DI
R
BO
BO
BO
BO
BO
BO

XP
VMX
AMX
JRK
NFX
NFV
AZ
SV
S
STR
ABS
FWD
BWD
EN

YP
YV
COR
POV
NOV
DON
QF

R
R
DI
BO
BO
BO
BO

Offset / position offset


Reference velocity
Corrective value
Positive position overflow
Negative position overflow
Compensation ended
Group error

Brief description

The block is used to generate or change a position offset in the setpoint


(reference value) channel. The position offset is used to offset position
reference values of other synchronous operation functions.

Mode of operation

Compensation is started with a rising edge at start input STR. In this


case, the position offset output YP is transitioned to the new offset value,
comparable with a positioning operation. The characteristic for the
compensation operation is specified by the maximum velocity VMX, the
maximum acceleration AMX and jerk JRK.

Absolute (ABS = 1)

In the absolute mode (ABS =1), for compensation, the offset YP


changes towards the new offset setpoint XP. For rotary-axis systems, the
absolute offset is limited to the axis cycle (XP modulo AZ is used).
For applications with rotary axis (AZ > 0) and absolute operating mode
(ABS = 1), there are three compensation versions which can be selected:

Relative (ABS = 0)

AZ

FWD

BWD

Direction of motion ( * means any)

>0

Shortest distance

>0

Backwards

>0

Forwards

Shortest distance

In the relative mode (ABS = 0), the new offset value is given by
YP(new) = YP(old) + XP
taking into account the axis cycle for rotary axis systems. If a new
compensation operation is started during compensation which is already
running, then the old operation is extended by the value XP. For the
relative mode, XP is not restricted by the axis cycle.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-79

GMC blocks

I/O

Pre-assign.

XP

Offset setpoint (absolute or relative)

0.0

VMX

Maximum velocity for compensation.

1.0

AMX

Maximum acceleration for compensation.

1.0

Units:

Rotary axis [1/m]

linear axis [m/s]

JRK

Jerk = change in the acceleration per unit time for compensation.


Units: Rotary axis [1/m]
linear axis [m/s]
JRK = 0 means no rounding-off.

NFX

Position normalization:

NFV

Velocity normalization: Factor to convert the application-specific speed


normalization into [rev./min] for a rotary axis or [m/min] for a linear axis.
Examples:

Rotary axis:
Linear axis:

Number of LU per revolution


Number of LU per meter

User normalization

Conversion

NFV

1/s
mm/s

60 s/min
0.001 m/mm 60 s/min

60.0
0.06

10.0

360000
1.0

AZ

Axis cycle for input and output offset values

360000

SV

Setting value for the offset

For S = 1, the offset is set to the setting value. A compensation operation


which is already running, is cancelled. The setting function is also effective for
EN = 0.

STR

The offset change is started with a 01 edge at STR

FWD

Compensation operation always forwards; dominant over BWD

BWD

Compensation operation always backwards

EN

1: Enable offset input


0: No offset compensation for S = 0:
for S = 1:

0.0

1
YP = 0;
YP = SV;

YV = 0
YV = 0

YP

Position offset, added in the setpoint channel

0.0

YV

Output, velocity setpoint during compensation

0.0

COR

Correction value for steps/jumps in the position reference value

POV

Positive position reference value overflow (COR was subtracted)

NOV

Negative position reference value overflow (COR was added)

DON

0: Compensation operation running


1: Compensation operation completed

QF

Group error: Initialization: Not sufficient working memory;


during operation: Inputs VMX, AMX must be > 0; JRK must be 0

Configuring data

9-80

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

30
10
5,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.16

GEAR Gearbox block

Symbol
GEAR
Reference position
Reference velocity
YV correction factor
Axis cycle, input
Axis cycle, output
Ratio, numerator
Ratio, denominator
Setting value
Set position
Enable

R
R
R
DI
DI
DI
DI
R
BO
BO

XP
XV
CYV
AZI
AZO
NM
DN
SV
S
EN

YP
YV
COR
POV
NOV
QF

R
R
DI
BO
BO
BO

Position reference value


Reference velocity
Correction value
Positive position overflow
Negative position overflow
Group error

Brief description

The gearbox block is used to convert speeds and/or axis cycles.

Mode of operation

The output speed YV (gradient of YP) is obtained from:


YV = XV CXV NM / DN
The ratio and axis cycles can be changed in operation. When changing
the ratio, the output speed jumps according to the formula shown above.
If this is to be prevented, the ratio must be varied via a ramp-function
generator.

AZI AZO

Caution: For the case AZI AZO, the normalization for the reference
velocity can change. This depends on the interpretation of the position
values, and is therefore application-specific.
Example:
720

DN = NM = 1;

AZI = 360; AZO = 720

Position
YP

360
XP
t

Case 1:

The output axis cycle represents 1 revolution


(double the resolution of the position value with respect
to the input). In this particular case, the output reference
velocity is only half the magnitude of theinput velocity (YV
= 2 XV).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-81

GMC blocks

Case 2:

One output axis cycle should correspond to 2 motor


revolutions (e.g. 720). In this case, the input and output
speed are identical (YV = XV).

I/O
Pre-assign.
XP

Reference position of a master axis

0.0

XV

Reference velocity of the master axis

0.0

CYV

Correction factor to adapt the output velocity when using the block for axis
cycle conversion (AZI AZO )

1.0

AZI

Axis cycle for the reference position (O = linear axis)

360000

AZ0

Axis cycle for the output position reference value (O = linear axis)

360000

NM

Ratio, numerator (this must be > 0)

DN

Ratio, denominator (this must be > 0)

SV

Setting value for the position output YP

Set position YP (level active)

EN

Enable. For EN = 0 (not enabled), YP = 0 and YV = 0

YP

Position reference value

0.0

YV

Velocity setpoint

0.0

COR

Corrective value for jumps at YP due to limiting to the axis cycle for rotaryaxis systems.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of
a processing cycle (position overflow for a positive direction of rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration
of a processing cycle (position overflow for a negative direction of rotation).

QF

Group error : Not sufficient memory space available

Configuring data

9-82

0.0
0

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

25
8
4,0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.17

INT_MR Virtual master

Symbol
INT_MR
Reference velocity
Position normalization
Velocity normalization
Axis cycle
Setting value
Set position
Hold position
Enable

R
R
R
DI
R
BO
BO
BO

XV
NFX
NFV
AZ
SV
S
HLD
EN

YP
YV
COR
POV
NOV
QF

R
R
DI
BO
BO
BO

Position reference value


Reference velocity
Correction value
Positive position overflow
Negative position overflow
Group error

Brief description

The virtual master generates a position reference value for linear or


rotary axis systems from a specified reference velocity (which is entered
via a ramp-function generator!).

Mode of operation

The inter-relationship between position and velocity is specified using the


normalization inputs NFX and NFV.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-83

GMC blocks

I/O

Pre-assign.

XV

Reference velocity of the master axis

NFX

Position normalization:

Rotary axis:

0.0
Number of LU per revolution
Linear axis:
Number of LU

360000

per meter
NFV

Velocity normalization: Factor to calculate the user-specific speed


normalization into [rev./min] for a rotary axis or [m/min] for a linear axis.
Examples:
User normalization

NFV

1/s
mm/s

60.0
0.06

1.0

AZ

Axis cycle for an output position reference value (O = linear axis)

SV

Setting value for the position output YP

Set position YP (level-active)

HLT

Hold position (level-active)

EN

Enable. For EN = 0 (not enabled), YP = 0 and YV = 0

YP

Position reference value

YV

Velocity reference value

COR

Correction value for jumps at YP due to limiting to the axis cycle for rotary-axis
systems.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of
a processing cycle (position overflow for a positive direction of rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration of
a processing cycle (position overflow for a negative direction of rotation).

QF

Group error : Not sufficient memory space available

Configuring data

9-84

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

15
5
2,5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.18

WEBSFT Measured value offset

Symbol
WEBSFT
Position actual value
Measured value 1
Measured value 2
Position offset
Max. measured value number
Axis cycle
Save measured value
Delete measured value memory
Enable

R
R
R
R
I
DI
BO
BO
BO

XP
XM1
XM2
DX
NMX
AZ
SAV
CLR
EN

YP
QV
QF

R
BO
BO

Measured value offset (shift)


Output YP valid (pulse)
Group error

Brief description

The WEBSFT block is used for material tracking, especially to track


measured offset values. In this case, the measured value is first saved,
and after the material web has been moved through the required
distance, is output again.

Mode of operation

The difference (XM1 XM2) is saved as the measured value. This


means, e.g. that a offset actual value is formed from a reference and
actual position.
This is saved with the rising edge at input SAV. After the position XP has
changed by more than DX, the measured value is output at YM. At the
same time, QV is set to 1 for one processing cycle.
This block can save up to NMX measured values. If more than NMX
values are saved within the shift range, then measured values are lost!
If the position offset DX is changed, this also effects the already saved
measured values. Measured values are output in the same sequence in
which they were saved. This guarantees the consistency of the output
data.
Measured values should only be saved, as long as the machine moves in
the same direction. In all of the other cases, no values should be saved,
or values, which are of no practical use, should be deleted by deleting the
measured value memory (CLR).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-85

GMC blocks

I/O
Pre-assign.
XP

Position actual value

0.0

XM1

Measured value 1

0.0

XM2

Measured value 2

0.0

DX

Position offset (shift)

0.0

NMX

Maximum number of measured values (initialization input)

32

AZ

Axis cycle for output position reference value (O = linear axis)

SAV

Save measured value (edge-active; with an increasing edge at input SAV)

CLR

Delete measured value memory (level-active)

EN

Enable. For EN = 0 (not enabled), YP = 0.0.

YP

Position reference value

QV

Output YP valid. QV is set to 1 for one cycle for a valid YP value.

QF

Group error : Not sufficient memory space available

Configuring data

9-86

360000

0.0

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

15
5
2,5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.19

OVFHSK Overflow handshake procedure

Symbol
OVFHSK
Correction value, input DI
Positive overflow, input BO
Negative overflow, input BO
POV checkback signal BO
NOV checkback signal BO

Brief description

COI
POI
NOI

COR DI Correction value


POV BO Positive overflow
NOV BO Negative overflow

PFB
NFB

The block transfers position overflow control signals from a position


reference value generation to a converter with closed-loop position
control. The correction of the position actual value sensing of the
converter is synchronized to the position reference value using these
control signals. It must be guaranteed that also short control pulses
(duration: 1 processing cycle) are evaluated for the converter.
This problem always occurs, if the setpoint generation, data transfer and
closed-loop position in the converter dont run in absolute synchronism,
or if individual data transfer telegrams can fail due to faults/errors.

Mode of operation

Setpoint
generation
COR1
POV1
NOV1

The block contains the overflow signals POI, NOI and the correction
value as input signals. It transfers these to the converter via the
communications interface. The signals are received at the converter and
are sent back as receive acknowledgment via the communications
interface. There, they are connected to the feedback signal inputs PFB,
NFB. Only after an overflow signal has been fed back, is the overflow
signal reset. This overflow cycle generally takes several processing
cycles due to the double transfer involved.
OVFHSK
COI
POI
NOI
PFB
NFB

COR
POV
NOV

Communications
interface

Converter
COR2
POV2
NOV2

If the block recognizes a new input correction pulse during an overflow


cycle, the correction operations are collected. The correction involving all
of the collected correction operations are realized after the overflow cycle
has been completed.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-87

GMC blocks

Example: The position reference value


oscillates around the axis cycle limit
COR = 3 COI - 2 COI = COI

POI
NOI
POV
PFB
COI

COR
t

I/O
Pre-assign.
COI

Correction value, input

POI

Positive position overflow, input

NOI

Negative position overflow, input

PFB

POV feedback signal from the converter

NFB

NOV feedback signal from the converter

COR

Correction value, output

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration
of a processing cycle (e. g. position overflow for a positive direction of
rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration
of a processing cycle (e. g. position overflow for a negative direction of
rotation).

QF

Group error: Not sufficient memory space available

Configuring data

9-88

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interupt tasks
Cyclic tasks

Executed in

Normal mode

Special features

10
3
1,5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.20

TAB, TAB_D Tabular values manager

Symbol
TAB
Coupling module name
User data area (DB No.)
Address parameter, receive
Receive mode
Telegram failure time
Table name
SAVE area
Manual/automatic mode
Valid table
No. of points
X value point i
Y value point i
Index point i
Write point
Output point
Enable

Brief description

GV
GV
S
S
R
S
BO
BO
BO
DI
R
R
DI
BO
BO
BO

CTS
XDB
US
MOD
TFT
NAM
SAV
AUT
TVL
NP
XP
YP
IP
WR
RD
EN

TAB
DB
YNP
YXP
YYP
YIP
QTS
YTS
YTC

DI
W
DI
R
R
DI
BO
W
W

Table
DB number of the table
Number of points actual
X value actual point i
Y value actual point i
Index actual point i
Block status
Status display
Status display, communications

The function blocks FB TAB and FB TAB_D are used to manage the
tabular values of SIMATIC and SIMADYN D. They only differ by the
managed data types. The FB TAB manages tabular values of the data
type REAL, FB TAB_D, data type DINT.
The following diagram shows a schematic overview of the inputs and
outputs of the FB TAB and its data types:
The representation of FB TAB corresponds, with the exception of the
data types of the following I/O, the representation of the FB TAB_D:

XP

YP

YXP

YYP

For FB TAB_D, these I/O, have data type DINT.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-89

GMC blocks

I/O
Pre-assign.
CTS

Coupling module name


Initialization connection to enter the configured name of the module, via
whose data interface receive operation should be realized.

XDB

Initialization connection to enter symbol names and number of the virtual


SIMATIC DBs for the table values.

US

Initialization connection for address data. The data comprises a channel


name and in addition, depending on the coupling type (e.g. DUST1 or
SINEC H1), 1 or 2 address stages.

Empty string

MOD

Initialization connection to enter the access mechanism; possible entries:


"H = Handshake
R = Refresh
S = Select
M = Multiple

TFT

Monitoring time. Maximum telegram failure time while receiving table


values. (initialization connection)

NAM

Table name
(initialization connection)

SAV

SAVE area
(initialization connection)
At this initialization connection it is specified as to whether the table should
be saved in the battery-buffered RAM (SAV = 1) or in the unbuffered RAM
(SAV = 0).

AUT

Manual/automatic mode
Changeover between the manual and automatic mode. Automatic mode
(AUT = 1)

TVL

Valid table
The table becomes valid and is available at output TAB using a positive
edge at input TVL. This is only effective in the manual mode

100 ms
Empty string

After the new table values have been activated, for larger tables, brief
delays can occur before the block again responds to user entries in the
manual mode. In this time, data in the table is internally copied between the
active and inactive tables.
NP

Number of points
(initialization connection)

XP

X value point i

0.0

YP

Y value point i

0.0

IP

Index point i

WR

Write point

RD

Output point default

EN

Block enable. The block is not processed for EN=0

TAB

Table

DB

DB number of the table

YNP

Actual number of points (with increasing value)

YXP

X value of the actual point

0.0

YYP

Y value of the actual point

0.0

YIP

Index of the actual point

9-90

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

QTS

Block status
At block output QTS it is displayed as to whether the block is operating
error-free (QTS = 1) or was inactive (QTS = 0).

YTS

Detailed status display; for values at YTS refer to: D7-SYS online help
"Help for
events" (press key F1 in the CFC and call the help on events topic under
"CFC for SIMADYN D".)

YTC

Number of telegrams received via the communications interface.


Note: After all of the data blocks have been transferred, FB WR_TAB still
sends a final telegram, this means that the number of received telegrams is
one more than the number of data blocks that were required to transfer the
table.

Configuring data

Computation time [s]

When setting-up the table


(after a 0 to 1 edge at the inverter) for
T400/PM5
FM 458/PM6
CPU550/551

4.5/point
1.5/point
0.8/ point

others:
T400/PM5:
FM 458/PM6:
CPU550/551

45
15
7.5/point

Can be inserted online

No

Can be configured in

Cyclic tasks

Executed in

Initialization mode
Normal mode

Special features

It is not possible to change-over from


manual mode to automatic mode:
memory card after run-up.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-91

GMC blocks

9.21

DRVIF Interface to the drive

Symbol
DRVIF
Position ref. value
Speed setpoint
Reference speed
Position correction value input
Drive status word
Brake delay time
Positive position overflow
Negative position overflow
Non-synchronous operation
Standstill detected
Drive fast stop
Enable acknowledge fault
Enable save measured value

R
R
R
DI
DI
SD
BO
BO
BO
BO
BO
BO
BO

XP
XV
RS
COI
STW
TBR
POV
NOV
ASY
STS
STP
ACK
ENM

Enable referencing
Set position actual value
Set position ref. value
Enable position control
Enable drive

BO
BO
BO
BO
BO

REF
SPA
SPS
ENP
EN

Brief description

YP
YPI
COR
YVI
CTW
QOP
QE
QEN
BRK
ERR
QMV
QRP
QF

R
DI
DI
DI
DI
BO
BO
BO
BO
BO
BO
BO
BO

Position ref. value


Position ref. value (integer)
Correction value
Speed setpoint (integer)
Drive control word
Drive enable
Setpoint generation enabled
Inhibit setpoint generation
Open brake
Drive fault
Measured value detected
Reference point detected
Group fault

The block forms the interface between the Motion Control


setpoint/reference value generation (position and speed) and the
communications interface (e.g. SIMOLINK) to the drive.
The position reference value and speed setpoint are converted into
integer values and control bits are combined to form a control word
(double word CTW). This control word comprises a control word 1 (low
word) for a Masterdrives MC type of drive and special bits to control
Motion Control functions (high word).
If the drive and setpoint/reference value generation are operated in
asynchronous time sectors with respect to one another, the DRVIF block
conditions the position reference value and the overflow signals (POV,
NOV, COR) so that none of the short control pulses are lost.

Mode of operation

The inputs EN, ENP, ACK and STS are used to generate control word 1
(refer to the documentation for MASTERDRIVES MC, Chart 180). The
status word 1 of the drive should be placed at the lower word of input
STW.
The drive can be powered-up and power-down using input EN. A rising
edge (EN = 0 1) should be generated to power-up the drive.

9-92

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

If the drive has a fault condition when it is being powered-up, the fault is
automatically acknowledged if ACK is set to 1, If the fault cannot be
acknowledged, the power-up operation is cancelled after 2 seconds. In
this case, the drive can only be powered-up, after the fault has been
removed, by a new 0 1 signal edge at EN.
Fast stop

It should be noted that the drive cannot be powered-down using EN = 0,


if the drive does not come to a standstill due to a plant/system fault or
error. In this case, the drive can be actively braked by activating the fast
stop function (STP = 1) and then powered-down at standstill.

Holding brake

If the connected drive has a holding brake, the setpoints must be


maintained up until the brake is opened (i.e. position reference value =
position actual value; speed setpoint = 0). The same status must be set
when closing the brake, before the drive is de-activated.
To realize this, the DRVIF block generates the enable signals QE and
QEN to control the setpoint/reference value generation. If a time greater
than 0 ms is entered at input TBR, then this time is taken into account as
delay when opening or closing the holding brake. The output QE (enable
setpoint/reference value generation) is then set TBR ms after the drive
operating signal (run signal) (QE = 1; QEN = 0).
The following state diagram shows the sequences and interdependencies/inter-relationships when powering-up and powering-down
the drive.
Acknowledge fault

EN and fault and ACK=1

EN=0

EN=1 and drive ready to be


powered-up

Initial status
Drive inhibited
Brake closed

EN and drive ready to be powered-up


EN=0
or fault

EN=0
or fault

Power-up drive

Close brake

Drive operational

Standstill

Open brake

Wait for standstill

Open brake

Setpoint/ref. value
generation active

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

EN=0 or fault

9-93

GMC blocks

When shutting down, the brake is only closed when the standstill signal
STS = 1 is present. The drive is only inhibited (pulse inhibit) after the
brake has been closed.
The assignment of the control word (CTW) and status word (STW) can
be taken from the following table. Only the entries of the status word,
identified with are evaluated.
Bit

9-94

Status word STW

Control word CTW

Ready to power-up

ON

Ready

No OFF2 (pulse inhibit)

Operation

No OFF3 (fast stop)

Fault

Enables the inverter

No OFF2 present

Enables the ramp-function generator

No OFF3 present

Ramp-function generator start

Power-on inhibit

Setpoint is enabled

Alarm

Signal edge, acknowledge fault

No setpoint/reference value-actual value


deviation

Jogging, bit 0 (always 0)

PZD control requested

Jogging, bit 1 (always 0)

10

Comparison value reached

Control requested (always 1)

11

Fault, undervoltage

Enables the positive direction of rotation


(always 1)

12

Close main contactor request

Enables the negative direction of rotation


(always 1)

13

Ramp-function generator

Raise motorized potentiometer (always 0)

14

Positive speed setpoint

Lower motorized potentiometer (always 0)

15

- Reserve -

No external fault (always 1)

16

POV feedback

POV

17

NOV feedback

NOV

18

Measured value valid QMV

Enables the measured value memory


(optional)

19

Reference point detected QMP

Enables referencing (optional)

20

Position corrected

Set position actual value (optional)

21

- not assigned -

Set position reference value (optional)

22

- not assigned -

Inhibits the position controller (open-loop


controlled operation)

23

- not assigned -

Enables the speed controller

24

- not assigned -

- not assigned -

25

- not assigned -

Opens the brake

Rest

- not assigned -

- not assigned -

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Non-synchronous
operation

For applications with rotary axis, the position reference value is corrected
(position step) by the axis cycle length, as soon as the rotary axis cycle
has been exceeded. The same position step must be simultaneously
made in the actual value channel in order to avoid giving the closed-loop
position control a fictitious position error. This means that at the same
time as the position step, an overflow signal (POV or NOV) is generated
which means that the correction value COR is either subtracted or added
to/from the position actual value.
This principle assumes that the setpoint/reference value and actual value
generation operate in absolute synchronism, as the overflow signals are
only present for the duration of a machining cycle. For asynchronous
operation (e.g. setpoint generation in a 1 ms cycle, actual value channel
and closed-loop position control (drive) in 3.2 ms), not every overflow
signal is received in the drive. A fictitious error of one axis cycle is
obtained if the overflow signal is missing, as the actual position is not
corrected.
The following steps are required in order to permit asynchronous
operation:
1. POV and NOV signals of the control word in the drive must be
inserted in the status word according to the table above. This means
that the overflow pulses are returned to the setpoint/reference value
generation (feedback).
2. Set input ASY to 1. This means that the POV/NOV signals are
extended until they appear in the status word via the feedback
channel.
If new overflow conditions occur between a position correction and
receiving a feedback pulse, then these are buffered and no position steps
are transferred to the drive. In this particular case, a new position
correction is only made after the feedback pulse has been received. With
this new position correction, all of the buffered overflows are taken into
account.

I/O
Pre-assign.
XP

Reference position

XV

Speed setpoint

RS

Reference speed of the drive: The speed, for the speed normalization used,
which is displayed in the drive as 100%. Also refer to Parameter P353 for
MASTERDRIVES MC. It is not permissible that RS is 0.0!

COI

Position correction value input

STW

Drive status word (refer to the Table above)

TBR

Brake delay time; Time to open or close the motor holding brake

0 ms

POV

Positive position overflow (this is inserted in control word CTW)

NOV

Negative position overflow (this is inserted in control word CTW)

ASY

Non-synchronous operation

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3000.0

0
0

9-95

GMC blocks

STS

Standstill detected. STS = 1 is a prerequisite that the drive should be shut


down!

STP

Drive fast stop: brakes the drive along the current limit down to standstill.

ACK

Enable acknowledge fault. For ACK=1, faults present before the drive is
powered-up, are acknowledged.

ENM

Enables the position measured value to be saved in the drive

REF

Enables the referencing function in the drive

SPA

Sets the position actual values in the drive

SPS

Sets the position reference values in the drive

ENP

Enables the position controller in the drive. The drive can be operated in the
closed-loop speed controlled mode when the position controller is inhibited

EN

Enables the drive. The drive can be powered-up and powered-down using
this input. Also refer to the state diagram above.

YP

Position reference value output. For non-synchronous operation, XP and YP


differ in so much that YP outputs position steps with a delay, and if required,
with a different step height.

YPI

Position reference value as 32 bit integer to output to the drive.

COR

Correction value (step height) to correct the position actual value in the
drive.

YVI

Speed setpoint as 32-bit integer value in the drive normalization.

CTW

Control word for the drive (refer to the Table above)

QOP

Drive enable: Status bit for diagnostics

QE

Setpoint enable. As long as QE = 0, the reference speed should be zero.

QEN

Inverse setpoint enable

BRK

Open brake. This output is included as bit in control word CTW.

ERR

Drive fault.

QMV

Measured value detected

QRP

Reference point detected

QF

Group fault: Fault/error when initializing the block

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be configured in

Interrupt tasks

15
5
2,5

Cyclic tasks
Computed in:

9-96

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.22

MDCMP1 basic and equalization functions for


Motion Control

Symbol
MDCMP1
1. Position ref. value
1. Velocity setpoint
2. Position ref. value
2. Velocity setpoint
Channel selection
Setting value, position
Dynamic position offset
Correction value for the position act. value
Relative velocity for equalization
Relative acceleration for equalization

R
R
R
R
BO
R
R
R
R
R

XP1
XV1
XP2
XV2
SEL
SV
OFS
XCP
VMX
AMX

Jerk
Position normalization
Velocity normalization
Axis cycle
Set position
Correct position actual value
Static offset compensation
Dynamic offset compensation
Equalization using forwards motion
Equalization using reverse motion
Hold
Jog velocity
Jogging forwards
Jogging backwards
Referencing velocity
Referencing mode
Referencing
Reference point detected
Initial position
Traverse to the initial position

R
R
R
DI
BO
BO
BO
BO
BO
BO
BO
R
BO
BO
R
I
BO
BO
R
BO

JRK
NFX
NFV
AZ
S
CP
SOC
DOC
FWD
BWD
HLT
VJG
JGF
JGB
VRF
MDR
REF
SYN
XHM
POS

Brief description

YP
YV
COR
POV
NOV
DON
QRF
QER
QST
QF

R
R
DI
BO
BO
BO
BO
BO
BO
BO

Reference position
Reference velocity
Correction value
Positive position overflow
Negative position overflow
Equalization completed
Referenced
Enable referencing
Standstill
Group fault

This block generates the setpoint/reference values for various basic


functions for closed-loop position controlled operation of a drive. In this
case, this includes the local operating modes - jogging, referencing and
positioning, to an output position.
In addition to the local mode, there is also a synchronous operation
mode, where, the position reference value and speed setpoint at the
block input (if required, with constant offset) are switched through to the
output. The setpoints can be switched-over, jerk-free to each of the two
external sources.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-97

GMC blocks

All transition functions are subject to the specified velocity and


acceleration values.
Mode of operation

To select the actual block mode, the following priority list applies (* = any;
DOC and SOC can occur simultaneously):

Priority

HLT

JGF

JGB

REF

POS

SOC DOC
*

Setting function

Operating mode

Stopping

Jog with speed VRF

Jog with speed -VRF

Referencing

Position after XHM

01

Static offset compensation for


synchronous operation (aligning)

Local operation

01 Dynamic offset compensation for


synchronous operation (flying
referencing, pass mark
synchronization)
0

Synchronous operation (if require


with internal offset between YP and
XP)

For HLT = 1, the reference (setpoint) velocity is ramped-down to


standstill corresponding to AMX, JRK. Standstill is displayed at output
QST (QST=1).
In the jogging mode, for JGF = 1, the reference (setpoint) velocity is
ramped-up to the values specified at VJG; for JGB = 1 to the value
VJG. When changing the value VJG the new velocity is tracked via
ramps (AMX, JRK).
For POS=1, the position reference value is positioned to the initial
position XHM. The maximum velocity for positioning is VMX. If XHM is
changed, the system positions to the new output position. When
stationary, XHM should be a constant position value (i.e. not entered
from an analog channel) in order to avoid continually initiating new
positioning operations. This would result in an unnecessarily high
processor loading of the module.
The referencing mode is activated by REF=1. At the start of referencing,
outputs QRF=0 (not referenced) and QER=1 (enable referencing) are
set. After this, the velocity ramps-up to VRF. When the reference point is
reached, this must be displayed as rising edge at input SYN. Output
QER is then set to 0 and QRF set to 1.
There are 4 different versions of the referencing procedure which are
selected at input MDR.

9-98

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

MDR

Behavior when referencing

Referencing not possible. Set this mode when using absolute value
encoders.

The reference velocity remains, also after passing the reference point
to VRF to REF=0, or another mode is activated.

After the reference point has been passed the drive remains
stationary.

After passing the reference point the drive continues to traverse to


the initial position XHM where it then remains stationary.

After passing the reference point, the drive positions itself to the initial
position XHM. Positioning also depends on the data entered at inputs
VMX, AMX, JRK, FWD and BWD.

Exiting local
operation

After all of the local operating modes have been exited (i.e. for S = HLT =
JGF = JGB = POS = 0) the position and speed are smoothly transitioned
to the setpoint channel selected using SEL. The block is then in the
synchronous mode.

Setting function
and static
equalization

The setting function is an important prerequisite so that a closed-loop


position controlled drive can be powered-up without any jerk. In this case,
the position reference value is set to the position actual value, and the
closed-loop position control then enabled. An equalization sequence
does not occur in the drive as the position reference value and actual
value are the same.
Practical approach:
1. Connect-up the position actual value at input SV.
2. With the drive inactive with S=1, set setpoint YP to SV.
3. After the closed-loop position control of the drive has become active,
the position reference value YP is routed (aligned) to the input
position reference value XP of the upstream setpoint generation. This
is realized using a rising edge at input SOC (static offset equalization).
When setting, an internal offset is added to the position reference value
XP whereby output YP has the value YP = SV. This means that a step
occurs at output YP. This is the reason that this setting mechanism is
only practical for operation with the drive inhibited.
YP

XP(t)

YP(t)

YP

XP(t)

YP(t)

SV
S

SOC
Setting the static offset

Static offset compensation

An equalization sequence, which may not have been completed, is


interrupted when setting. The internal offset is static. This means that it
remains unchanged until a new setting function is executed, a static
offset equalization takes place or a local mode is selected.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-99

GMC blocks

Changing the
setpoint channel

In synchronous operation, the position and speed setpoint at the input


are transferred to the output. Two setpoint channels are available at the
input. The following applies for static operation:
SEL = 0 YP = XP1; YV = XV1
SEL = 1 YP = XP2; YV = XV2
When selecting SEL, in operation, it is possible to toggle, jerk-free,
between the two setpoint channels.

Offset equalization
(DOC)

The dynamic offset equalization is used to equalize the offset in the


position actual value channel (e.g. for flying referencing). If an offset is
identified for the position actual value sensing, then the correction is not
directly made by setting the actual value, but instead via the setpoint
channel. This has the advantage that the setpoint and actual value
channel can be processed in different time sectors and the actual value
channel does not have to calculate any (time consuming) offset
equalization.
Procedure: Initially, the offset is subtracted, as correction value, both
from setpoint YP and from the actual value. Setpoint YP is then corrected
to the actual setpoint XP via an equalization operation.

Direction of the
equalization
operation

XCP, CP

9-100

For rotary axis application (AZ > 0) three equalization sequence


operations are available. The inputs FWD and BWD are evaluated for
static offset compensation (SOC), when the setpoint channel is changed
(SEL), positioning (POS) and referencing in the mode MDR=4.
AZ

FWD

BWD

Motion direction ( * means any)

>0

Shortest distance

>0

Backwards

>0

Forwards

Shortest distance

If the position actual value and position reference value are changed as
step function, then connections I/O XCP and CP become active. At the
same time as the setpoint step, the position change is entered at XCP
and is transferred as correction to the position actual value with a rising
edge at CP. This function is, e.g. required, if for flying referencing, the
setpoint is to be simultaneously adapted.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Pre-assign.
XP1

1st position reference value. Evaluated when SEL=0

0.0

XV1

1st velocity setpoint. Evaluated when SEL=0

0.0

XP2

2nd position reference value. Evaluated when SEL=1

0.0

XV2

2nd velocity setpoint. Evaluated when SEL=1

0.0

SEL

Selects the setpoint channel: SEL=0 selects XP1, XV1

SV

Setting value, position

0.0

OFS

Dynamic position offset

0.0

XCP

Correction value for the position actual value. For a rising edge at CP, the
position actual value is increased by XCP as correction (outputs COR, POV,
NOV).

0.0

VMX

Max. relative velocity for the equalization sequence (XV). The equalization
sequence is superimposed on the synchronous operation YV. This means that
the sum of XV and dv act at output YV which means that values greater than the
rated drive velocity can be obtained!

100.0

AMX

Max. relative acceleration for the equalization sequence. The effective


acceleration is the sum of the equalization and synchronous operation.
Units: Rotary axis [1/m]
Linear axis [m/s]

100.0

JRK

Jerk = Change in the acceleration per unit time for the equalization sequence.
Units: Rotary axis [1/m]
Linear axis [m/s]
JRK = 0 means no rounding-off.

1000.0

NFX

Position normalization:

36000

NFV

Velocity normalization: Factor to convert the application-specific speed


normalization in [RPM] for the rotary axis or [m/min] for the linear axis. NFV is
the velocity in m/min (rotary axis: Speed in RPM), which should be displayed as
1.0. This is effective for connections I/O XV, YV, VJG, VRF, VMX.

Rotary axis:
Linear axis:

Number of LU per revolution


Number of LU per meter

1.0

Examples:
User normalization
1

1.0 = 1 /s
1.0 = 1 mm/s

Conversion
1

1 /s = 60 /min
1 mm/s = 0.06 m/ min

NFV
60.0
0.06

AZ

Axis cycle for the input and output position value

Set position. For S = 1, equalization sequences which have not been completed,
are cancelled.

CP

Correct the position actual value. The position actual value is increased by XCP
with a rising edge.

SOC

Static offset compensation, edge triggered

DOC

Dynamic offset compensation, edge triggered. For S = 1, input DOC is ignored.

FWD

Equalization sequence, always forwards; dominant with respect to BWD (not


evaluated for DOC)

BWD

Equalization sequence, always backwards; (not evaluated for DOC)

HLT

Hold. For HLT=1, the reference velocity goes to zero.

VJG

Velocity for jogging

JGF

Jogging with velocity VJG

JGB

Jogging with velocity - VJG

VRF

Velocity for referencing

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

36000

0.0

0.0

9-101

GMC blocks

MDR

Mode for the behavior after passing the reference point (refer to the table above)

REF

Enable referencing

SYN

A rising edge at SYN signals that the reference point is passed in the referencing
mode.

XHM

Initial position. This position is approached when positioning or when referencing


(MDR=3 or MDR=4).

0.0

POS

Positioning as long as POS = 1, the initial position XHM is approached.

YP

Output, position reference value

0.0

YV

Output, velocity setpoint

0.0

COR

Correction value for steps in the position reference value

POV

Positive overflow of the position setpoint (COR is subtracted)

NOV

Negative overflow of the position reference value (COR is added)

DON

0: Equalization sequence (dynamic or static offset compensation or mode


changeover active)
1: Equalization sequence completed

QRF

Referenced. This is used, for example, to enable a position controller.

QER

Enable referencing. This is used, e.g. to enable synchronization


(input SP at block NAVMC)

QST

Standstill: Indicates that the reference speed YV=0.

QF

Group fault: Initialization: Insufficient working memory;


during operation: Inputs VMX, AMX, NFX, NFV must be > 0; JRK must be 0.

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5:
FM458 / PM6:
CPU550 / 551

Can be configured in

Interrupt tasks

22
7.5
6,0

Cyclic tasks
Computed in:

9-102

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.23

CLUTCH engage/disengage (coupling)

Symbol
CLUTCH
Reference position
Referencing velocity
Shutdown position
Offset setpoint
Local velocity
Max. equalization velocity
Acceleration when equalizing
Jerk
Position normalization
Velocity normalization
Axis cycle
Position setting value
Set position
Stop as fast as possible
Hold for XPS
Synchronous operation (YP=XP)
Speed synchronism
Local operation
Over control permitted
Forwards
Backwards
Enable

Brief description

R
R
R
R
R
R
R
R
R
R
DI

XP
XV
XPS
DYP
VLC
VMX
AMX
JRK
NFX
NFV
AZ

R
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO

SV
S
HLT
STP
SYP
SYN
LOC
OVD
FWD
BWD
EN

YP
YV
COR
POV
NOV
QSY
QLC
QST
QTR
DON
QF

R
R
DI
BO
BO
BO
BO
BO
BO
BO
BO

Position reference value output


Reference velocity output
Correction value
Positive position overflow
Negative position overflow
Synchronous operation
Local velocity reached
Standstill
Equalization sequence active
Equalization sequence completed
Group fault

This block is used to engage or disengage a drive from a drive group. In


the disengaged condition (clutch open), the drive can run with any local
velocity, which can also be zero.
The transition from local operation to synchronous operation (engaging)
or vice versa (disengaging) is realized using specified jerk and
acceleration values.
The block can be operated either position or speed dependent. In the
speed-dependent mode, engaging and disengaging are realized as fast
as possible. The position at standstill or the offset between the input
position XP and the output position YP are randomly obtained.
In the position-dependent mode, the engaging and disengaging functions
are superimposed with positioning. The drive then comes to a standstill at
the standstill position or after engaging, there is offset DYP between XP
and YP.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-103

GMC blocks

The block differentiates itself from the CATCH block by a simpler control
interface. Every operating mode can be activated using an input,
whereby the operating data are staggered according to priority. It is not
possible to re-calculate equalization motion in order to enter changed
limit values for speed (VMX), acceleration (AMX) or jerk (JRK) (refer to
input TRG at block CATCH).
The block has several operating modes. To activate a mode, the
associated input should be set to 1. The control inputs are prioritized
according to the following table (* = any input; 1 has the highest priority):

Mode of operation

Prior
ity

HLT

STP

SYP

SYN

LOC

Operating mode

Input

Setting function: YP = SV

Shutdown (as fast as possible; any


position)

Hold at the shutdown position XPS

XPS

Synchronous operation with YP =


XP+DYP

DYP

Synchronous operation with undefined


offset between XP and YP

Operation with local velocity VLC

Shutdown (as a mode is not active)

VLC
-

For several operating modes, an associated input is continuously


monitored (refer to the table above). If this input quantity changes, a new
operating point is automatically approached.
Example:
If DYP changes in synchronous operation, then equalization takes place.
When this is completed, there is a new offset between YP and XP.
The transition from one operating mode into another takes place within
an equalization operation which is specified by the maximum acceleration
AMX and jerk JRK.
For OVD = 0 the speed changes from the current value (old operating
status) to the final value (new operating status) without any overshoot.
For operating modes with defined end position, the transition status is
delayed so that the required position is assumed after the equalization
process has been completed.
Example:
In synchronous operation, the drive should be held at position XPS. The
drive continues to run in synchronous operation until the distance to the
target is precisely the same as the braking travel. It then brakes and
remains stationary at XPS.

9-104

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

If overcontrol is enabled (OVD = 1), when the operating mode is


changed, the transition to the new mode is as quickly as possible. In this
particular case, excess speeds up to VMX are possible.
Example:
The system should change from the disengaged mode to the
synchronous mode. However, the master axis (XP, XV) is presently at a
standstill. For OVD = 0, the system waits (any length of time!), until the
master axis starts. The drive is only synchronized after the standstill
position has been exceeded. However, for OVD = 1, the drive is
immediately positioned to the stationary master axis.
I/O
Pre-assign.
XP

Reference position

0.0

XV

Referencing velocity

0.0

XPS

Shutdown position (disengaging position) for disengaging in position-controlled


operation (PN = 1)

0.0

DYP

Offset reference value for synchronous operation in the closed-loop position


controlled mode (PN = 1)

0.0

VLC

Local reference velocity for the local operation. When changed, output YV
tracks the ramp, defined by AMX and JRK.

0.0

VMX

Maximum velocity when equalizing the offset.

AMX

Maximum acceleration/deceleration for the transition states.


Units:
Rotary axis [1/s]
Linear axis [ 1/m]

JRK

Jerk (da/dt time derivative of the acceleration)


Units : Rotary axis 1/s]

1000.0
50.0
2000.0

Linear axis [m/s]).

m
50 2
da
s = 2000 m
=
dt 25ms
s3
Example:
This means that for JRK = 2000, an acceleration of 50m/s is reached after 25
ms.
NFX

Position normalization:

Rotary axis:
Linear axis:

Number of LU per revolution


Number of LU per meter

NFV

Velocity normalization: Factor to convert the application-specific speed


normalization in [RPM] for a rotary axis or [m/min] for a linear axis. NFV is the
velocity in m/min (rotary axis: Speed in RPM), which should be displayed as 1.0.
This is effective for connections I/O XV, YV, VJG, VRF, VMX.

360000
1.0

Examples:
User normalization
1

1.0 = 1 /s
1.0 = 1 mm/s

Conversion
1

1 /s = 60 /min
1 mm/s = 0.06 m/ min

NFV
60.0
0.06

AZ

Axis cycle for the input and output position value (O = linear axis)

SV

Setting value for the position. This is accepted for S = 1.

Setting position YP = SV.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

36000
0.0
0

9-105

GMC blocks

HLT

Stopping as quickly as possible: For HLT=1 the speed setpoint is ramped down
to zero.

STP

Hold at XPS: For STP = 1 the reference position remains stationary at XPS.
For OVD = 1, the axis positions to XPS.

SYP

Synchronous operation with a defined offset (DYP) between YP and XP. When
the mode is activated, ramp-up is delayed until YP can engage with the
required offset.

SYN

Synchronous operation for undefined offset between YP and XP. When the
operating mode is activated, YV immediately ramps-up to XV.

LOC

Local velocity input VLC. When VLC is changed, the setpoint speed follows via
ramps.

OVD

Overcontrol permitted. For OVD = 1, the new state is approached as quickly as


possible. In this case, the equalization can be faster than the reference velocity
or opposite to the direction of motion!

FWD

Equalization motion is made in the forwards direction (refer to the table above)

BWD

Equalization motion is made in the backwards direction (refer to the table


above)

EN

Enable. For EN = 0 (not enabled) YP = 0 and YV = 0

YP

Position ref. value, output quantity

0.0

YV

Reference velocity, output quantity

0.0

COR

Correction values for steps in the position reference value

POV

Positive overflow of the position reference value (COR was subtracted)

NOV

Negative overflow of the position reference value (COR was added)

QSY

Synchronous operation: This is set to 1 as soon as XP and YP run in


synchronism

QLC

Local velocity reached.

QST

Standstill signal.

QTR

1: Equalization operation running

DON

1: Equalization operation completed

QF

Group fault: Not sufficient working memory

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5:
FM458 / PM6
CPU550 / 551

Can be configured in

Interrupt tasks

23
7,5
3,8

Cyclic tasks
Computed in:

9-106

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.24

SHEAR cross-cutter/cross sealer

Symbol
SHEAR
Material position
Format (product length)
Shears circumference
Synchronous operation [degrees]
Velocity normalization
Axis cycle output
Cut enable
Enable block

R
R
R
R
R
DI
BO
BO

XP
FMT
CIR
SYR
NFV
AZO
CUT
EN

YP
YV
YFR
YFI
COR
POV
NOV
QST

R
R
R
DI
DI
BO
BO
BO

Position, shears
Speed, shears
Format actual value (floating point)
Format actual value (integer)
Correction value
Positive overflow
Negative overflow
Standstill

QCO BO Cutting operation active


QF BO Group fault

Brief description

The block calculates the reference position and speed for rotary shears
or a cross-sealing device as a function of the material position and
product length.
During operation, the shears can be shutdown at the quiescent position,
which is located with a 180 offset with respect to the cut/sealing position.
The product length can be changed during operation.

Mode of operation

Under steady-state operating conditions, the block behaves like a


characteristic which emulates the material position with respect to the
position of the shears. The cut is made at position XP = 0 (this
corresponds to XP = FMT). The gradient (rate of rise) within the cutting
range is 1, i.e. the circumferential velocity of the shears is the same as
the material velocity. In the cutting range, the shears are in synchronism
with the material. The synchronous range width is specified in degrees at
input SYR. The gradient outside the cutting range is a function of the ratio
between cross cutter circumference and the product length.

YP

YP

AZO

AZO
Characteristic for
FMT = CIR

AZO

AZO

CIR

FMT

XP

Transfer characteristic for a large format


(FMT > CIR)

Characteristic for
FMT = CIR

FMT

CIR

XP

Transfer characteristic for a small format


(FMT < CIR)

For large formats, the shears brakes down to standstill (estimated value:
From product lengths FMT > 2 CIR; dependent on SYR). On the other
hand, for product lengths less than CIR outside the cutting range, the
speed of the shears is higher than the material velocity.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-107

GMC blocks

Cutting is either enabled or inhibited using the CUT input. In the inhibited
state, the shears are in the quiescent position and AZO. If cutting is
then enabled with CUT = 1, the shears accelerate up to the material
velocity and then cut according to the selected product length.
XP

YP

FMT

XP(t)

AZO

YP(t)

t
CUT
t
Cut

YV

Cut range
t
Behavior when cutting is enabled

Format change

If the cut format is changed (product length), then this only becomes
effective after the next cut. The change must be synchronized with the
axis cycle for the material position. XP must maintain the old axis cycle
limits until the new format has been accepted (old value of FMT)
GEAR
XP
AZI
AZO

SHEAR
YP
Format

XP

YP

FMT

YFI

For practical purposes, the format change is made as follows. In this


case, output YFI (currently valid format length) is used to define the axis
cycle for the material position, by entering the axis cycle of a gearbox
block or a virtual master (INT_MR).

9-108

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Pre-assign.
0.0

XP

Material position. Position actual value of the products or the endless material
which is either cut using the shears or is transversely sealed using the sealing
device. (Position normalization as FMT)

FMT

Cutting format. Clearance between two products. The material position must
have axis cycle FMT. XP, FMT and CIR must have the same position
normalization!

20000.0

CIR

Circumferential scope of the shears/sealing device. (Position normalization: As


for FMT)

50000.0

SYR

Synchronous range in degrees.

10.0

NFV

Speed normalization for the shears speed YV. NFV is the reference speed, i.e.
the speed in RPM, which should be displayed as YV = 1.0.

1.0

AZO

Axis cycle for the shears position. This means a default value of 36000
increments per revolution.

CUT

Enables cutting operation. For CUT = 0 the shears come to a standstill at AZO/2

EN

Block enable

YP

Position of the shears ( 0 ... AZO)

YV

Speed of the shears (normalization according to NFV)

0.0

YFR

Actually used format length as floating-point value.

0.0

YFI

Actually used format length as 32-bit integer value.

COR

Correction value through which YP jumps if the range 0 YP < AZ is to be


exceeded or fallen below

POV

For a positive position overflow, POV is set to 1 for one processing cycle.

NOV

For a negative position overflow, NOV is set to 1 for one processing cycle.

QST

Shears standstill

QCO

Cutting operation active. After the cut enable has been withdrawn (CUT = 0),
QCO is set to 0 when the shears come to a standstill.

QF

Group fault

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be configured in

36000
0

17
5,5
2,8

Interrupt tasks
Cyclic tasks

Computed in:

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Normal mode

9-109

GMC blocks

9.25

EDC1 engager/disengager

Symbol
EDC1
Reference position
Referencing velocity
Axis cycle, input
Axis cycle, output
Coupling position
Engage/disengage length
Ramp length
Rounding-off (percentage)
Position setting value
Set position
Start/stop trigger
Start/stop continuous
Engage/disengage
Enable

Brief description

R
R
DI
DI
R
R
R
R

XP
XV
AZI
AZO
XCP
DXL
RMP
DRP

R
BO
BO
BO
BO
BO

SV
S
SST
SSC
ED
EN

YP
YV
COR
POV
NOV
QSY
QST
QF

R
R
DI
BO
BO
BO
BO
BO

Position reference value, slave


Reference velocity, slave
Correction value
Positive position overflow
Negative position overflow
Synchronous operation
Standstill
Group fault

This block is used to couple-in or couple-out a drive from a drive group,


as a function of the position, when a trigger condition is available. The
position actual value XP at the input represents the reference position of
a master drive. Output YP is the position reference value for a slave
drive.
Contrary to the EDC block, for EDC1, the axis cycles for the input and
output position can be selected to be different.

Engaged operation

In the engaged mode, the initial slave status is standstill. Engaging


(coupling-in) is activated using a trigger signal (SST or SSC). If the
master XP has the coupling position XCP, the slave (YP) moves through
the engaging length (coupling-in length) DXL and it then remains
stationary.
Engaging operation
YV

XV

YV

YP

Engaging operation with post


triggering

YP
2 DXL

DXL
SST

SST

Post trigger range

9-110

XV

Post trigger range

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The engaging sequence can be extended by one or several additional


engaging lengths if there are additional trigger edges (SST = 0 1)
during triggering. The trigger edges must lie within the post trigger range.
After the start of the deceleration operation, the trigger event is only
effective after passing-over the next coupling position, whereby a new
coupling position is only taken into account after standstill has been
reached.
During the engaging operation, the master axis (reference position)
moves through the distance given by
dXP = engaging length + ramp length = DXL + RMP

Disengaging
operation

For disengaging operation, the slave is initially in synchronous operation


with the master drive. If, after the trigger event, the master goes past the
coupling position, the slave decelerates and then re-accelerates back to
the synchronous velocity. After each disengaging operation (couplingout) the offset between the master and slave increases by the
disengaging length DXL.
Post triggering is possible up to the start of the synchronizing operation in
order to implement an offset by additional disengaging lengths.
Disengaging operation
YV

Disengaging operation with post triggering


YV
XV

XV

YP

YP

2 DXL

DXL

SST

SST

Post trigger range

Post trigger range

During disengaging, the master axis travels through a distance given by


dXP = disengaging length + ramp length = DXL + RMP
Negative speed

Engaging and disengaging operation is also possible when reversing the


drive (negative speeds). In this case, the operation is started when the
coupling position is not reached. In this case, the engaging/disengaging
length acts in the opposite direction. This means that for XV < 0 and for
DXL = 90, the slave moves through 90 when engaging.

Continuous
operation

In addition to the previously-described edge-triggered operation (with


SST), continuous operation is also possible. Continuous operation is
active as long as SSC is set to 1. Furthermore, the following prerequisites
must be fulfilled:

a system with linear axis is involved,

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-111

GMC blocks

or, the coupling position is passed a second time before the


engaging/disengaging operation has been completed.

In both of these cases, the engaging/disengaging operation is continually


extended by the value DXL until SSC is set to 0.
Continuous engaging operation

Intermittent engaging operation

YV

YV
0 XCP

0 XCP

0 XCP

SSC

XP

0 XCP

0 XCP

0 XCP

SSC

For systems with rotary axis and one engaging/disengaging length


DXL < AZ - RMP

Intermittent
operation

intermittent operation is involved. This means that the


engaging/disengaging operation has been completed before the coupling
position is again passed. In this particular case, a sequence of individual
engaging/disengaging operations is obtained which always start when
the coupling position is exceeded. The sequence is continued as long as
SSC = 1.
Ramp length and rounding-off

YP
RMP
2

Rounding-off DRP

RMP
2

DRP = 0 %

YV
DRP = 50 %
dYV
dt
DRP

Ramps, roundingoff

9-112

DRP = 100 %

The signal characteristics of YP and YV are dependent on input


quantities XP and XV (distance dependent; not time dependent!). This
means that acceleration and rounding-off are defined as distantdependent quantities. The acceleration ramp specifies the component of
the distance where the slave drive accelerates or decelerates (ramp
length). The rounding-off defines what percentage of the acceleration
ramp is used to establish the torque.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Pre-assign.
XP

Reference position

0.0

XV

Referencing velocity

0.0

AZI

Axis cycle for the input position value (0 = linear axis)

36000

AZO

Axis cycle for the output position value (0 = linear axis)

36000

XCP

Coupling position. An engaging/disengaging operation is started if XP exceeds


these position values (or falls below, for a negative speed)

DXL

Engaging/disengaging length. Engaging operation: For each engaging


operation, the slave is moved through DXL in the actual direction of motion.
Disengaging operation: The offset between master and slave increases by DXL.

36000

RMP

Component of the distance which is used for acceleration or deceleration. For


each acceleration/deceleration operation, the master moves through distance
RMP; the slave only moves through the half, RMP/2. (Caution: Occurs twice per
engaging/disengaging operation)

12000

DRP

Component of the acceleration/deceleration ramp as a percentage, which is


used to establish and reduce to the maximum acceleration.
Permissible range 0 DRP 100

10 %

SV

Position setting value

Set position reference value YP to SV

SST

Edge-triggered starting of an engaging or disengaging operation. This can be


used to extend the operation if a new 01 edge is output within the post trigger
range.

SSC

Level-dependent starting of an engaging or disengaging operation for


continuous or intermittent operation.

ED

Mode selection: 0: Disengaging

EN

Enabled. For EN = 0 (not enable) YP = 0 and YV = 0

YP

Position reference value for the slave drive

0.0

YV

Reference velocity for the slave drive

0.0

COR

Correction value for steps at YP due to limiting the axis cycle for systems with
rotary axis.

POV

For the position correction YP = YP - COR, POV is set to 1 for the duration of a
processing/machining (position overflow for positive direction of rotation).

NOV

For the position correction YP = YP + COR, NOV is set to 1 for the duration of a
processing/machining (position overflow for negative direction of rotation).

QSY

Synchronous operation: This signal indicates that the master axis and slave axis
are operating in angular synchronism with respect to one another

QST

Standstill: Indicates that the slave velocity YV = 0.

QF

Group fault; this is always set if YFC is not equal to zero.

0.0

0.0

1: Engaging

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-113

GMC blocks

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be configured in

27
9
4,5

Interrupt tasks
Cyclic tasks

Computed in:

9-114

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.26

MCSB generating motion sequences (basis block)

Symbol
MCSB
Start position
Start velocity
Start acceleration
End position
End velocity
End acceleration
Time inputs
Max. velocity
Max. deceleration
Jerk
Position normalization
Velocity normalization
No. sequence blocks
Motion command
Update curve

Brief description

R
R
R
R
R
R
R
R
R

X0
V0
A0
XE
VE
AE
TX
VMX
AMX

R
R
R
I
I
BO

JRK
NFX
NFV
NFB
CMD
UPD

FKT
DSO
YDT
YTT
YAZ
QVM
QAM
QF
YFC

DI
DI
R
R
DI
BO
BO
BO
I

Calculation function
Cascade output
Duration of the section
Total duration
Total duration (rounded-off)
Vmax exceeded
Amax exceeded
Group fault
Fault code

The block is used to generate position reference value curves (position =


f(time)), which is output using the characteristic block CAMD. A
characteristic can comprise several sections. The first section is always
generated from a type MCSB block - all of the following, from an MCSS
block type.
For each section, a different motion type can be selected (e.g.
positioning, accelerate to velocity, wait). Complex motion sequences can
be defined using combinations of these. This means that the block
generates a defined motion sequence from the time perspective, which
can be executed either periodically or event-controlled.

Mode of operation

Different limit velocities and accelerations can be entered for each


section.
The MCSB block forms the basis for a motion sequence. It generates a
curve which can be expanded by subsequent blocks (type MCSS). The
number of subsequent blocks should be specified at input NFB. The
curve is a function of the position with respect to time whereby no
position overflows occur (in this case, rotary axis behavior is not
supported!). The abscissa of the characteristic and all time information
refer to the units [ms].
The connections between the blocks of a motion sequence and to the
cam is shown in the diagram below. For instance, an integrator is used to
enter the time axis. The following settings are required at block CAMD:
XV = SCX = SCY =1.0
ABS = 1

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

(de-activate scaling)
(absolute output of the characteristic)

9-115

GMC blocks

SCV =

60000
NFX NFV

(scaling of the velocity)

Supplem
entary FB

Basis-FB
MCSB
DSO

DSI

MCSS
DSO

MCSS

FKT
YAZ
YTT

Cam
FKT
AZI
XP

INT
X = 1000
TI = 1 s

60000
NFX * NFV

CAMD

SCV

Combination of blocks for composite motion functions (simplified)

The initial and end conditions for position, velocity, and acceleration are
entered at block NCSB. If subsequent blocks are used, their motion
sequence starts with the end data of the preceding block.

9-116

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The input CMD defines the required motion sequence version. 9 versions
are available:

CMD
CMD

Command

End position

End velocity

End
acceleration

No function

X0

V0

A0

Absolute positioning

XE

VE

AE

Relative positioning

X0 + XE

VE

AE

Absolute positioning and wait until t > TX

X0

Relative positioning and wait until t > TX

X0 + XE

Traverse to velocity VE

undefined

VE

Traverse to velocity VE and hold this


velocity for duration TX

undefined

VE

Traverse to velocity VE and hold this


velocity until t >TX

undefined

VE

Positioning at the initial position

X0

V0

A0

Positioning after XE, VE, AE; TX is the


absolute instant in time at the end of the
section ;
Curve X(t) is generated as 5th Order
polynomial. It is not guaranteed that VMX,
AMX and JRK are maintained! Refer to the
alarm outputs QVM, QAM.

XE

VE

AE

10

Positioning up to after XE, VE, AE; TX is the


duration of this section.
Curve X(t) is generated as 5th Order
polynomial. It is not guaranteed that VMX,
AMX and JRK are maintained! Refer to the
alarm outputs QVM, QAM.

XE

VE

AE

Maintaining VMX,
AMX

For certain entries, for motion sequence, limit values VMX and AMX
cannot be maintained. This is especially true for CMD = 9, as the time
required for the operation is specified. The shorter the time entered, then
the higher the acceleration rates and velocities. If the limit value is
exceeded, this is displayed as alarm at outputs QVM or QAM. The
following rule applies:
If the limit value is exceeded at the start or the end of the operation, this
is not displayed as alarm. For example, for VMX = 5 m/s, the initial value
of the velocity V0 = 10 m/s is used as start velocity, then this is
interpreted as a transition from a fast to a slow motion section. In this
case, an alarm is not output, i.e. QVM = 0.
However, if the operation starts at VMX = V0 = 5 m/s and A0 = 20 m/s,
then it is unavoidable that the velocity is exceeded along the curve as a
result of the initial acceleration (assumption:
JRK 0). In this case,
QVM is set to 1.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-117

GMC blocks

Updating the UPD


curve

Internally, the block makes a differentiation between 3 modes which are


identified by widely differing computation times. The lowest computation
time occurs for UPD = 0. In this mode, all of the changes at the block
inputs are ignored (input NFB). This is also valid for possible subsequent
blocks, type MCSS.
For UPD = 1, all inputs are cyclically checked for changes, which means
that the computation time increases with respect to UPD = 0. If at least
one changed input is detected, all motion sequences are re-calculated.
This means that the computation time drastically increases. If UPD is
continually set to 1, all inputs should be constant in order to avoid
excessively high computation loading. (e.g. do not connect an analog
value!). Furthermore, we recommend that the block is configured in a
slow sampling cycle (e.g.: T3, T4).
The output characteristic is not valid while the runs are being
updated! The associated CAMD curve block outputs position YP = 0 and
signals QF = 1 (group fault).
This means that changes may only be made if the drive is in a safe
condition!

Rotary/linear axis

MSCB and MCSS are designed to generate time characteristics (position


= (time) ) for linear axis systems. This means that the use for rotary axis
applications is restricted, as the blocks do not take into account any
rotary axis cycle. This means that the rotary axis behavior must be
simulated using suitable position reference values and the axis cycle
must be set at the cam disk CAMD.

Example, rotary
axis

Initial position X0 = 0; rotary axis cycle = 1000; actual position = 3500;


For the positioning in the initial position command, the drive was moved
from 3500 to 0,. i.e. 3.5 axis cycles were executed. The same final
position can be approached in a shorter time by entering the target
position 3000 (or 4000).

Fault codes

9-118

YFC

Significance

NO fault

Illegal input value


(VMX, AMX, NFV, NFX must be greater than 0)

Illegal command, CMD

Incorrect number of subsequent blocks configured

Insufficient memory available for supplementary blocks inserted


online! Restart required.

Insufficient memory available

Sequence not possible within the time entered at TX; or the end of
the previous section is located after TX (this involves CMD = 3; 4; 7;
9)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Pre-assign.
X0

Start position (initial position) with reference to CMD = 8 )

0.0

V0

Start velocity (initial velocity with respect to CMD = 8 )

0.0

A0

Start acceleration (initial acceleration with respect to CMD = 8 )

0.0

XE

Final position

0.0

VE

Final velocity

0.0

AE

Final acceleration

0.0

TX

Time input in [ms]. Depending on CMD this is interpreted as duration or absolute


time.

0.0

VMX

Maximum velocity for all sections of the curve (QVM!). When required, VMX is
individually entered for each subsequent block.

10.0

AMX

Max. acceleration for all sections of the curve (observe QAM!).


Units: Rotary axis [1/m]
Linear axis [m/s]

10.0

JRK

Jerk = Change in the acceleration per unit time.


Units: Rotary axis [1/m]
Linear axis [m/s]
JRK = 0, means no rounding-off.

1000.0

NFX

Position normalization:

10000

NFV

Velocity normalization: Factor to convert the application-specific speed


normalization in [RPM] for a rotary axis or [m/min] for a linear axis. NFV is the
velocity in m/min (rotary axis: speed in RPM), which should be displayed as 1.0.
This is effective for I/O V0, VE, VMX.

Rotary axis:
Linear axis:

Number of LU per revolution


Number of LU per meter

60.0

Examples:
User normalization
m

1.0 = 1 /s
1.0 = 1 mm/s

Conversion
m

1 /s = 60 /min
1 mm/s = 0.06 m/ min

NFV
60.0
0.06

NFB

Number of subsequent blocks. This input is used to reserve memory space for
the characteristics. Furthermore, it is required for the interaction with the
subsequent blocks.

CMD

Motion command (refer to the table above)

FKT

Reference to the calculated time runs. This output should be connected to the
cam (input FKT)

DSO

Cascade output to extend the curve using subsequent blocks. This output should
be connected with input DSI (block MCSS)

YDT

Duration of the characteristic section in [ms] generated by block MCSB

0.0

YTT

Total duration of all cascaded curve sections in [ms]

0.0

YAZ

Rounded-off total duration of all cascaded curve sections in [ms] to input the
input axis cycle AZI of cam disk CAMD.

QVM

Alarm: Vmax exceeded. The alarm indicates that the motion inputs will cause the
maximum velocity VMX to be exceeded.

QAM

Alarm: Amax exceeded. The alarm indicates that the motion inputs will cause the
maximum acceleration AMX to be exceeded.

QF

Group fault

YFC

Fault code (refer to the table above)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-119

GMC blocks

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be configured in

20 (... 300)
7 (... 100)
3,5 (... 50)

Interrupt tasks
Cyclic tasks

Computed in:

Normal mode

The computation times in brackets apply when re-calculating the characteristic.

9-120

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.27

MCSS generating motion sequences


(subsequent block)

Symbol
MCSS
Cascade input
Final position
Final velocity
Final acceleration
Time input
Max. velocity
Max. acceleration

DI
R
R
R
R
R
R

Motion command I

Brief description

DSI
XE
VE
AE
TX
VMX
AMX

DSO
YDT
YTE
QVM
QAM
QF
YFC

DI
R
R
BO
BO
BO
I

Cascade output
Section duration
Time at section end
Vmax exceeded
Amax exceeded
Group fault
Fault code

CMD

The block is used to extend a motion function, which was generated by a


type MCSB block. In this case, it is possible to cascade several
subsequent blocks one after the other.
This allows a complex time function, distance = f(time) to be generated
which is output with the curve block CAMD. Different types of time
functions can be selected (e.g. positioning, traverse to velocity, wait).

Mode of operation

Input DSI should be connected to the block output which defines the
previous motion section. This means that block MCSS generates a
motion sequence which connects seamlessly and jerk-free to the final
conditions (position, velocity, acceleration) of the previous block.
For the MCSS block, the settings VMX, AMX, JRK, NFX and NFV apply
at the basis block (MCSB) of the motion sequence. VMX or AMX should
be set greater than zero if, for the section being considered, different limit
values should apply for velocity and acceleration.

CMD

Input CMD defines the motion sequence version required. 9 versions are
available. In the table, the meanings are as follows:
X0 Initial position (final position of the previous section)
V0 Initial velocity
(final velocity of the previous section)
A0 Initial velocity
(final velocity of the previous section)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-121

GMC blocks

Updating curves

CMD

Caution: Changes made at the input only update curves if input UPD is
set to 1 at the basis block. While a characteristic is being re-calculated,
the old curve is no longer valid! The associated characteristic block
CAMD outputs position YP = 0 and signals QF = 1 (group fault).
Command

Final position

Final velocity

Final
acceleration

No function

X0

V0

A0

Absolute positioning

XE

VE

AE

Relative positioning

X0 + XE

VE

AE

Absolute positioning and wait until t > TX

X0

Relative positioning and wait until t > TX

X0 + XE

Traverse to velocity VE

Undefined

VE

Traverse to velocity VE and maintain velocity


for duration TX

Undefined

VE

Traverse to velocity VE and maintain velocity


to t >TX

Undefined

VE

Positioning at the initial position

X0

V0

A0

Positioning after XE. TX is the instant in time


at the end of the section.
Curve X(t) is generated as 5th order
polynomial. It is not guaranteed that VMX,
AMX and JRK are maintained! Refer to alarm
outputs QVM, QAM.

XE

VE

AE

10

Positioning after XE. TX is the duration of the


section.
Curve X(t) is generated as 5th order
polynomial. It is not guaranteed that VMX,
AMX and JRK are maintained! Refer to alarm
outputs QVM, QAM.

XE

VE

AE

Maintaining VMX,
AMX

9-122

For certain entries, for motion sequence, limit values VMX and AMX
cannot be maintained. This is especially true for CMD = 9, as the time
required for the operation is specified. The shorter the time entered, then
the higher the acceleration rates and velocities. If the limit value is
exceeded, this is displayed as alarm at outputs QVM or QAM (also refer
to MCSB).

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

YFC

Fault codes

Significance

No fault

Illegal input value


(VMX, AMX, NFV, NFX must be greater than 0)

Illegal command CMD

Incorrect number of subsequent blocks configured

Insufficient memory available for supplementary blocks inserted


online. Restart required!

Insufficient memory

Sequence not possible within the time entered at TX or, the end of
the previous section is after TX (involves CMD = 3; 4; 7; 9)

Input DSI is not connected with a valid predecessor block (upstream


block)

Predecessor block has signaled a fault

I/O
Pre-assign.
DSI

Cascade input (connect to DSO of the predecessor block)

XE

Final position

0.0

VE

Final velocity

0.0

AE

Final acceleration

0.0

TX

Time input in [ms]. This is interpreted as time duration or absolute time


depending on CMD.

0.0

VMX

Optional max. velocity for the actual curve sections (observe QVM!). For VMX =
0.0, the VMX setting applies at the basis block MCSB of the cascade (chain).

0.0

AMX

Optional max. acceleration for the actual curve sections (observe QVM!). For
AMX = 0.0, the AMX setting applies at the basis block MCSB of the cascade
(chain)..

0.0

Units:

Rotary axis [1/m]

Linear axis [m/s]

CMD

Motion command (refer to the table above)

FKT

Reference to the calculated time curves, This output should be connected to the
cam (input FKT)

DSO

Cascade output to extend the curve using additional subsequent blocks.

YDT

Duration of the currently generated curve section in [ms]

0.0

YTE

Time at the end of the actual curve section in [ms] referred to the start of the
characteristic.

0.0

QVM

Warning: Vmax exceeded. The alarm signifies that the specified motion causes
the maximum velocity VMX to be exceeded.

QAM

Alarm: Amax exceeded. The alarm signifies that the specified motion causes the
maximum acceleration AMX to be exceeded.

QF

Group fault

YFC

Fault code (refer to the table above)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-123

GMC blocks

Configuring data

Can be loaded online

Yes

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be configured in

9 (... 300)
3 (... 100)
1,5 (... 50)

Interrupt tasks
Cyclic tasks

Computed in:

Normal mode

The computation times in brackets apply for a re-calculation of the characteristic.

9-124

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.28

CAMSW1 cam controller for time characteristics

Symbol
CAMSW1
Time since the curve start
Refer to the curve definition
Curve value switch-in
Deadtime switch-in [ms]

Start, search range switch-in


Curve value, switch-out
Deadtime, switch-out [ms]
Start search range, switch-out
Shift mode
Update inputs
Enable

R
DI
R
R

XP
FKT
Y1
DT1

R
R
R
R
BO
BO
BO

XS1
Y2
DT2
XS2
TSM
UPD
EN

Q
QN
QF
YFC

BO
BO
BO
I

Cam active
Cam inverse
Group fault
Fault code

Brief description

The block creates a switching cam as a function of the initial position of a


motion sequence (generated using type MCSB, MCSS blocks). The cam
switching instants can be precisely brought forward (deadtime
compensation) or delayed.

Mode of operation

The block inputs XP and FKT are connected to the same outputs as the
associated cam. The reference of the block to the characteristic is
established by connecting input FKT to the outputs of block MCSB
having the same name (generates the characteristic). A sawtooth signal
is connected at input XP; this increases (rate-of-rise) by a value of 1.0
per millisecond.
Characteristic YP(t)

Search direction for

XS1 < 0

XS1 > 0

Search direction for XS2 < 0

Y1
Y2

XP = t
Example 1:
XS1>0; XS2 < 0;
DT1 = DT2 = 0
Example 2:
DT1 = 20 ms
DT2 = -20 ms

|XS2|

|XS1|
Q(t)

XP = t
Q(t)
XP = t
20 ms

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

20 ms

9-125

GMC blocks

Switch-in threshold

Switch-in (Q = 0 1) is realized for DT1 = 0, as soon as the curve value


Y1 is passed through. Generally, value Y1 can occur a multiple number
of times in the curve. In order to demarcate the required curve range, a
search range is defined. XS1 defines the start of the search range. For
negative values for XS1, the curve value Y1 is searched for in the
reverse (backwards) direction from instant in time |XS1|.

Deadtime

The switch-in instant can be offset using input DT1. Positive values of
DT1 are effective, to compensate the deadtime, this means that switch-in
is realized DT1 milliseconds earlier than the switching threshold is
reached. Negative values delay the switch-in instant.

Switch-out

An independent curve point Y2, search range XS2 and time offset DT2
apply for the switch-out instant.

Shift mode

For the switching offset (DT1, DT2) it must be known whether the curve
is passed-through sporadically or periodically. If the curve is sporadically
passed-through, this means that an undefined time expires after the
curve has been completed before the curve is passed-through again. On
the other hand, if the curve is periodically passed through, this means
that input XP is controlled from a continuous sawtooth signal, whereby
the curve is passed through once in one sawtooth cycle.
For the sporadic mode, the switching instants can be shifted as a
maximum up to the range limits. In this case, TSM should be set to 0. For
the periodic mode (TSM = 1), the switching instant can be shifted beyond
the range limit. This means, for example, switch-in can be shifted so far
that it occurs in the previous cycle.

Computation time

The search for the instant which is associated with a required switching
threshold involves a lot of computation time. The search mechanism can
be de-activated (UPD = 0) in order to avoid unnecessarily high
computation times. In this case, a change at the inputs (Y1, Y2, XS1,
XS2, DT1, DT2 and TSM) is not detected.
For UPD =1 all of the inputs with the exception of XP should be
connected to fixed values. Connections to fluctuating values (e.g. analog
values) result in high computation loads!

Fault codes

9-126

YFC

Significance

No fault

Curve presently not valid (no points have been defined)

Input FKT not connected to a valid curve

Insufficient memory

Search range lies outside the curve (the search starts after the curve
and the search direction is increasing)

Point not found (Y1or Y2 are not located on the curve)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Pre-assign.
0.0

XP

Time since the start of the curve. This input should be connected with a
sawtooth signal which increases by 1.0 per millisecond each time the curve is
run-through!

FKT

Reference to the curve function. Connect the input with output FKT of the
curve generation (block MCSB).

Y1

Curve value for the switch-in threshold

0.0

DT1

Switch-in deadtime in [ms]. Negative values delay switch-in

0.0

XS1

Absolute value of XS1: Starting the search range for switch-in.


Sign of XS1: Search direction

0.0

Y2

Characteristic value for switch-out threshold

0.0

DT2

Switch-out deadtime in [ms]. Negative values delay switch-out

0.0

XS2

Absolute value of XS2: Start of the search range for switch-out.


Sign of XS2: search direction

0.0

TSM

Shift mode:

UPD

Activates the automatic input monitoring. For UPD = 1 changes to the


switching inputs are immediately evaluated.

EN

Enables the block

Configuring data

0: only within the curve


1: beyond the curve limit (periodic mode)

Can be loaded online

Yes

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be configured in

11 (... 168)
3.5 (... 56)
1,8 (... 28)

Interrupt tasks
Cyclic tasks

Computed in:

Normal mode

The computation times in brackets apply once after the switching thresholds have
been changed.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-127

GMC blocks

9.29

ENC2 Optional incremental encoder for NAVMC

Symbol
ENC2
Hardware address
Hardware mode
Gearbox factor, numerator
Gearbox factor, denominator

G
W
DI
DI

AD
MHW
NM
DN

ENC
QF
YFC

DI Encoder output for NAVMC


BO Group error
W Error code

Brief description

Block ENC2 allows that in a configured software with incremental


encoder sensing NAVMC, it is possible to change over, during operation,
to an incremental encoder that is connected at other terminals.

Mode of operation

The ENC2 block behaves like an NAVMC configured as slave. The


evaluating NAVMC should be configured in the same master-slave circuit
so that the position sensing is in synchronism.
Output ENC should be connected to input ENC of block NAVMC. Input
SEL at NAVMC is used to define which incremental encoder is used. The
changeover becomes immediately effective. A speed step (jump) is
obtained if both encoders supply a different speed.
Encoder 1

NAVMC
AD

Encoder 2

ENC2
AD

ENC

SEL
ENC

Encoder 3

ENC2
AD

ENC

If the system is to toggle between more than two encoders, then this can
be realized by changing-over to additional ENC2 blocks using switches
or multiplexers.
If all of the encoders used supply the same position data per increment,
then a gearbox factor of 1 is set (NM = DN = 1).
In all other cases, it is possible to convert the position normalization of
the NAVMC using the gearbox factor. This is required, for example, if the
encoders have another resolution or a mechanical gear is being used.
Example: Changing-over to an encoder with higher resolution
Encoder 1: 512 increments/revolution
Encoder 2: 2048 increments/revolution
NM / DN = 512 / 2048 NM = 1; DN = 4

9-128

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Example: Changing-over from the motor encoder to machine encoder


Encoder 1

Encoder 2
37

Motor

19

1024 Pulses/rev

1024 Pulses/rev

NM = 19; DN = 37
Hardware mode

MHW
Bit(s)
2 ... 0

Function

Value

Hardware filter

Encoder type 1

Encoder type 2

000

No filter

No filter

001

500 ns

125 ns

010

2 s

Not permissible

011

8 s

Not permissible

100

16 s

Not permissible

Others

Not permissible

Not permissible

5 ... 3 Coarse pulse evaluation


(this only involves the
T400)

6
7

10

Significance

Synchronization

Mode

Logic

000

Coarse pulse ignored

001

Coarse pulse ignored

010

Coarse pulse and 1st fine pulse

011

Coarse pulse and every fine pulse

100

Coarse pulse inverted and 1st fine pulse

101

Coarse pulse inverted and every fine pulse

Others

>5

Coarse pulse ignored

Via the zero pulse

Via trigger signal (this is only possible for IT41)

Dependent on the direction of rotation (always the same


position value)

Always the front edge of the zero pulse

Source of the track signals

From terminal XE1 of the T400

(this involves encoder 1


on T400)

From the basic drive converter via backplane bus

Edge evaluation

Source of the zero pulses

From terminal XE1 of the T400

(this involves encoder 1


on T400)

From the basic drive converter via backplane bus

Encoder type

Encoder type 1: Two tracks offset through 90


Maximum frequency: 1 MHz
Pulse quadrupling

Encoder type 2: Each direction of rotation has its own


pulse track
Maximum frequency: 2.5 MHz
No pulse quadrupling!

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-129

GMC blocks

I/O
Pre-assign.
AD

Hardware address of the incremental encoder input

MHW

Hardware mode

NM

Gearbox factor, numerator. The value NM = 0 is not permissible.

DN

Gearbox factor, denominator. The value DN = 0 is not permissible.

ENC

Encoder output for NAVMC. This connection should be connected to


input ENC of the NAVMC

QF

Group error signal

YFC

Error code

YFC error codes

Configuring data

9-130

Bit

0
16#0002

Significance

Input DN has the value zero

Input NM has the value zero

Illegal filter setting

Block was configured as slave; a master was not found


(in the same sampling time and in the sequence before the slave).

Master and slave are not configured in the same sampling time.

Block was configured in a sampling time > 20 ms

Not sufficient memory available

Can be loaded online

Yes

Computation time [s]

T400, PM5
FM458, PM6
CPU550/CPU551

Can be configured in

Interrupt tasks
Cyclic tasks

Computed in

Normal mode

Special features

4.5
1.5
0.8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.30

NAVDP Position actual value sensing

Symbol
NAVDP
Position reference value R
Encoder position DI
Position measured value DI
Encoder status word W
Operating mode W
No. of binary positions of GX2 I
Axis cycle DI
Pos. normalization, numerator DI
Pos.normalization, denominator DI
Reset position BO
Set position BO
Position setting value R
Request synchronization BO
Setting value f. synchronization R
Request measured value BO
Pos.ref.value of the meas.value R
Subtract pos. correction value BO
Add position correction value BO
Position correction value DI
Acknowledge encoder fault BO

Brief description

XP
GX1
GX2
G1S
MOD
BIT
AZ
NPN
NPD
R
S
SV
SYN
SVS
MES
XPM
CP
CN
DYP
ACK

XER
YP
YPM
YDM
G1C
QM
QMA
QMD
QSA
QSD
COR
POV
NOV
QF
YFC
ERR

DI
R
R
R
W
BO
BO
BO
BO
BO
DI
BO
BO
BO
W
DW

Incremental pos. difference


Position actual value
Measured value position
Offset act. value XPM-YPM
Encoder control word
Status, measuring probe
Measurement active
Measurement completed
Synchronization active
Synchronization completed
Correction value
Positive position overflow
Negative position overflow
Group fault
Fault code
Encoder fault code

This function block is used to couple drives corresponding to the


specifications of the PROFIdrive profile (for instance, SIMODRIVE or
SINAMICS) together with the function blocks RCVT5, SNDT5 and
DRVIF2.
This function block may only be established on the FM458-1 DP by
the integrated PROFIBUS interface and activated constant bus cycle
time.
The NAVDP block is used for digital position sensing with the following
characteristics and features:
From the encoder actual value, the function block calculates the
position actual value using the gear factors. This encoder actual value
can either be received from an incremental or an absolute encoder
and may have between 8 and 32 binary positions. For incremental
encoders, after they have been powered-up, the position actual value
is always zero.
The position can be set or reset through the software.
The function block can optionally supply a position value that is
modulo limited.
The function block supplies an encoder control word to acknowledge
faults, to request position measured values or for referencing.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-131

GMC blocks

Additional output quantities include position, measured value position,


offset of the position measured value (if required in the modulo cycle) and
status bits.
Calculating the
position

The position outputs YP, YPM, YDM and COR have the basis unit LU
(length unit). If systems with rotary axis and angular degrees are to be
used, we recommend the basis unit
1 LU = 0.001 - for systems with linear axis, 1 LU = 1 m.
Principally, every basis unit can be adjusted. However it should be
carefully noted that 1 LU is the lowest system resolution. This is the
reason that several inputs and outputs are exclusively implemented as
values with an integer multiple (type DINT). This prevents rounding-off
errors from being summed (accumulated) and guarantees long-term
stability of the position sensing function.
The position actual value is calculated as follows

YP = encoder pulses

NPN
+ DYP
NPD

The quotient NPN / NPD defines the basis unit. In this case, NPN
specifies the required position value and NPD the required number of
encoder pulses. (Please note: An encoder with 1024 pulses per
revolution supplies 4 * 1024 = 4096 pulses per revolution as every signal
edge is evaluated.)
Example:

For an encoder with 2048 pulses/revolution, one revolution should be


emulated on a linear system with 1 LU = 0.1 mm. One revolution of the
motor results in a feed
of 525.8 mm.
NPN = 5258;
NPD = 8192;

( 5258 * 0.1 mm = 525.8 mm)


( 4 * 2048 )

If a gearbox is located between the motor and the machine, then the
gearbox factors
in NPN and NPD must be taken into account.

9-132

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Sawtooth
generation

For systems with rotary axis, a position overflow must be prevented for
YP. This means that YP must
be cyclically corrected (e.g. after every revolution) by the distance moved
(axis cycle). A sawtooth signal is obtained at output YP (at constant
speed). To achieve this, two different techniques are available.
1. The correction by the value DYP with rising edge at inputs CP and
CN. Generally, these signals are received from the setpoint channel.
However, this technique should not be used simultaneously with
other techniques (i.e. it should not be combined with other
techniques).
2. Internal generation of the sawtooth signal. In this case, bit 11 of MOD
should be set to 1.
If YP exceeds the value AZ, YP is set to YP - AZ. If YP drops below
0, YP is set to YP + AZ. The outputs POV and NOV are set for the
duration of one cycle.

Position correction

For each correction, the absolute value of the correction value is output
at COR. For a positive
overflow, COR is subtracted from YP and output POV is set for the
duration of a cycle.
For a negative overflow, COR is added to YP and a pulse is generated at
the NOV output.
If a correction with the same sign is made in two or several consecutive
sampling times, the correction is displayed, alternating, at POV and NOV.
In this case, the sign of COR is adapted so that the subsequent blocks
execute the correction with the correct sign.

Operating mode
Bit
0

Relevant bits of input MOD

Function
Edge for measured value
sensing

Value

Meaning

Measurement with a rising edge of the measuring


probe

Measurement with a falling edge of the measuring


probe

Defines the encoder type

Incremental encoder

(Is evaluated only in


initialization.)

Absolute value encoder

Behavior for synchronization,


(e.g. zero pulse)

The position actual value is the same as the


setting value when synchronizing:
YP = SVS + pulse since synchronization

When synchronizing, the setting value is


subtracted from the position actual value:
YP = YP SVS

11

Enables the internal

The position actual value YP is not limited;

sawtooth generation

Limit: 0 YP < AZ;


with automatic POV / NOV generation for overflow/
underflow.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-133

GMC blocks

Flying
measurement and
referencing
(synchronizing)

MES, SYN inputs

Both of these functions run in a similar fashion. They are started using
the particular input signals. The block generates the required encoder
control word according to the PROFIdrive specifications, sets the outputs
and evaluates the encoder status word. This sequence can be roughly
sub-divided into three phases:

Activation
The function has been activated and waits for an acknowledgement
from the drive

Measurement
The acknowledgement has been received, waits until the measured
value is there

Read measured value


Fetches the measured value from G1_XIST2

A positive edge at MES activates the measurement and causes output


QMA to be set. MES = 0 means that a measurement has not been
requested and causes output QMD to be deleted (cleared).
A positive edge at SYN activates the measurement and causes output
QSA to be set. SYN = 0 means no synchronization and causes output
QSD to be deleted.
The measurement has priority if a positive edge is simultaneously
present at SYN and MES.

Encoder control
word G1C

Depending on input MOD, bit 0, bit 7, 4-5 and bit 0 or bit 1 are set in the
encoder control word G1C.
Relevant bits in the encoder control word G1C

Bit

Function

Value

Meaning+

Flying measurement or
referencing (homing)

0
1

No function requested
Measuring probe, pos. edge or reference mark 1

Flying measurement or
referencing (homing)

0
1

No function requested
Measuring probe, negative signal edge

Command

00
01
10
11

No function requested
Activate referencing
Read value
Cancel

Flying measurement or
referencing (homing)

0
1

Referencing (homing)
Flying measurement

15

Acknowledge encoder fault

0
1

No function requested
Reset

4-5

G1S encoder
status word

9-134

Bit 8 = 1 signals that the measuring probe has been deflected. When the
measuring probe is deflected, output QM is set. Bit 15 signals an encoder
fault and causes the measurement to be cancelled using command 3
in bit 4, 5 from encoder control word G1C. Bit 15 is set in control word
G1C after an encoder fault and after the encoder fault acknowledgement
ACK.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Fault codes

YFC:
Bit

Significance

Illegal parameter at input BIT. The value lies outside the interval
8...32

A value of zero at input NPN

A value of zero at input NPD

Negative value at input AZ

Encoder fault occurred

The faults/errors due to incorrect parameterization are signaled once


when the input value is changed. In an error case, the old parameters are
not overwritten and remain valid. Additional calculations are stopped. The
group fault signal is output.
After the fault has been acknowledged, the fault code is not re-output as
long as the input has not changed.
ERR:
Value Significance
1

Encoder group fault

Zero mark monitoring

Cancel, parking encoder

Cancel, reference mark search

Cancel, retrieve reference value

Cancel, flying measurement

Cancel, fetch (retrieve) measured value

Cancel, absolute value transfer on

Errors when reading the absolute track of the absolute value encoder

For an encoder fault/error ERR contains bits 0...4 from GX2 - also refer to
the documentation to communicate via PROFIBUS-DP.
I/O
Default
XP

Position reference value

GX1

Encoder actual value

GX2

Encoder measured value

G1S

Encoder status word

MOD

Mode

BIT

Encoder resolution. Values of between 8.. 32 are possible.

24

AZ

Axis cycle to automatically generate the sawtooth and


to determine the offset (this may not be negative)

36000

NPN

Position normalization, numerator. The value may not be zero.

36000

NPD

Position normalization, denominator. The value may not be zero.

Reset position

Set position

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

0.0

4194304

9-135

GMC blocks

SV

Position setting value

SYN

Request synchronization

SVS

Setting value for synchronization

MES

Request measurement

XPM

Position reference value of the measured value

CP

Subtract position correction value

CN

Add position correction value

DYP

Position correction value

ACK

Encoder fault acknowledgement

XER

Incremental position difference

YP

Position actual value

0.0

YPM

Position measured value

0.0

YDM

Offset actual value XPM-YPM

0.0

G1C

Encoder control word

QM

Status, measuring probe

QMA

Measurement active

QMD

Measurement completed

QSA

Synchronization active

QSD

Synchronization completed

COR

Correction value for the position actual value. When the position actual value
is changed
due to CP, CN, synchronization or automatic
sawtooth generation, the absolute value (with sign)
of the change is displayed at COR.

POV

For the position correction YP = YP - COR, POV is set to 1


for the duration of a processing cycle.

NOV

For the position correction YP = YP + COR, NOV is set to 1


for the duration of a processing cycle.

QF

Group fault

YFC

Fault code (refer to table)

ERR

Encoder fault code

Configuring data

9-136

0.0
0
0.0
0
0.0

360000

Computation time [s]

FM458-1 DP

Can be loaded online

Yes

Can be configured in

Alarm tasks
Cyclic tasks

Executed in

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.31

DRVIF2 Interface to the drive

Symbol
DRVIF2
Status word 1 W
Status word 2 W
Fast stop, drive BO
Enable drive BO
Acknowledge fault BO
Drive-specific control word 1 W
Drive-specific control word 2 W
Max. number of incorrect cycles I

Brief description

SW1
SW2
STP
EN
ACK
CW1
CW2
MXE

CT1
CT2
SON
SOP
SOE
ERR
SOI
WRN
CES
QF
QSL
QLZ

W
W
BO
BO
BO
BO
BO
BO
BO
BO
BO
BO

Control word 1
Control word 2
Ready to power-up
Ready
Operation enabled
Drive fault
Power-on inhibit
Alarm
Enable setpoint
Group fault
Sign of life error status
Sign of life error for slaves

This function block is used to connect drives in compliance with the


PROFIdrive profile specifications (for instance, SIMODRIVE, SINAMICS)
in conjunction with the RCVT5, SNDT5 and NAVDP function blocks.
This function block may only be established on the FM458-1 DP by
the integrated PROFIBUS interface and activated constant bus cycle
time.
The DRVIF2 block controls and monitors the drive.
The drive is powered-up and powered-down using the function block.
The two control words corresponding to the PROFIdrive profile are
completely generated. Device-specific inputs are possible. The status
words of the drive are evaluated.
The function block monitors the sign of life of a DP slave and generates
its own sign of life. The maximum number of failed or incorrect signs of
life can be parameterized.
Queued faults/errors can be acknowledged.
Signals to control a brake must be externally generated.

Powering-up and
powering-down a
drive

The inputs EN, ACK and STP are used to generate control word 1.
The drive can be powered-up and powered-down using input EN. A rising
edge (EN = 0 1) must be generated to power-up a drive.
If a drive fault is present when attempting to power-up a drive, then the
fault is automatically
acknowledged if ACK is set to 1. If the fault cannot be acknowledged,
then the power-on operation is interrupted after 2 seconds. In this case,
the drive can only be powered-up after the fault has been removed
using a new 0 1-edge at EN.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-137

GMC blocks

Fast stop

It should be carefully noted that the drive cannot be powered-down by


using EN = 0 if, the drive does not come to a standstill as a result of a
system fault. In this case, the drive can be actively braked by activating
the fast stopping function (STP = 1); it can then be shutdown at standstill.

Status diagram

S1 : Power on inhibited

Fast stop

Drive off

Fast stop

Fast stop

Ready to be
powered-up

S2:

Drive on

S3:

Drive off

Ramp stop

Power up

Enabled, CT1 Bit3

Drive off

S4: Operation

If bit 3 of CT1 is set the drive goes directly into state S4 from state S3.
Control word 1,
CT1

The drive is mainly controlled by changing bits 0, 2, 6.


Phase

Value

Cause

Drive fast stop

0x043A

STP = 1

Drive off

0x043E

Fault (SW1, bit 3), EN = 0, fault cannot


acknowledged

Drive on

0x047F

Rising edge of EN and successful


acknowledgement

Bit 6 from CT1 is additionally output as a single output signal CES


(control word, enable setpoint), type BOOL.

9-138

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Overview, control word 1


Bit
0

Function

Value

Meaning

Off

On

Operating condition

All OFF2 commands have been removed

OFF3

Fast stop

Operating condition

All OFF3 commands have been removed

Operation enabled

Enables operation

Operating condition

The ramp-function generator is not inhibited

Enables the ramp-function


generator

Enables the ramp-function generator

Inhibits the setpoint

Enables the setpoint

No significance

Acknowledgement

Acknowledges the message

Jogging 1 off

Not used

Jogging 2 off

Not used

10

Control from the PLC

Control via the interface

Powers-down and powers-up the drive

The drive is operated

Status word 1, SW1


Bit

Value

Meaning

Off

Drive OFF

Ready to power-up

Drive ON

Ready

Not evaluated

Inhibits operation

Releases operation

Fault-free

Fault

The drive is powered-down when a fault occurs

Not evaluated

Function

4-10 Refer to the PROFIdrive profile

Drive ON

Note: The function block evaluates the values in italics.


Several signals of status word 1 are output as single type BOOL output
signal.
Bit

Signal

Name

General State Diagram

SON

Ready to power-up

S2

SOP

Ready to operate

S3

SOE

Operation enabled

S4

ERR

Error

SOI

Power-on inhibited

WRN

Alarm

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

S1

9-139

GMC blocks

Device-specific
inputs

The user can inter-link device-specific signals with control words CT1
and CT2 via inputs CW1 and CW2. The following bits are masked:
CW1, bit 11 - 15 with CT1,
CW2, bit 0 - 11 with CT2.

Sign-of-life
monitoring

The sign-of-life monitoring corresponds to the PROFIBUS specifications.


The monitoring of the slave sign-of-life starts with the first valid slave
sign-of-life.
If a DP slave sign-of-life error occurs, and if the transfer is then faulty,
then the function block uses the old values to make the appropriate
calculation.
The output sign-of-life error QLZ goes to zero as soon as the slave again
sends a sign-of-life.
The sign-of-life error status QSL goes to zero with a positive edge of EN
and if ACK is set to 1 and STP is set to 0.
The DRVIF2 generates the sign-of-life for the PROFIBUS master in CT2.

I/O
Default
SW1

Status word 1 (ZSW1)

0x0040

SW2

Status word 2 (ZSW2)

0xF000

STP

Drive fast stop, bit 2 from STW1

EN

Enable drive, bit 3 from STW1

ACK

Acknowledge fault, bit 7 from STW1

CW1

Control word 1 (STW1), device-specific inputs

0x07FF

CW2

Control word 2 input (STW2), device-specific inputs

0xF000

MXE

Max. number of incorrect cycles

CT1

(STW1) control word 1

0x0000

CT2

(STW2) control word 2

0xF000

SON

Ready to power-up, bit 0 from ZSW1

SOP

Ready, bit 1 from ZSW1

SOE

Operation enabled, bit 2 from ZSW1

ERR

Drive fault, bit 3 from ZSW1

SOI

Power-on inhibit, bit 6 from ZSW1

WRN

Alarm, bit 7 from ZSW1

CES

Enable setpoint, bit 6 from STW1

QF

Group fault

QSL

Status, sign of life error

QLZ

Sign of life error for slaves

9-140

10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

Configuring data

Computation time [s]

FM458-1 DP

Can be loaded online

Yes

Can be configured in

Alarm tasks
Cyclic tasks

Executed in

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-141

GMC blocks

9.32

RCVT5 Receive block

Symbol
RCVT5
Pointer to the telegram buffer DW
Offset ( bytes ) DI
Reference speed R
Telegram 5 /105 BO

Brief description

PTR
OFF
RS
TLG

ST1
NIB
ST2
G1S
GX1
GX2
Y
MLD
QF
YF

W
DI
W
W
DI
DI
R
W
BO
W

Status word 1
Speed actual value B
Status word 2
Encoder status word
Encoder position
Position measured value
Speed actual value
Message word
Fault status block
Status info block

This function block is used to connect drives corresponding to the


specifications of the PROFIdrive profile (for example, SIMODRIVE,
SINAMICS) in conjunction with the function blocks NAVDP, DRVIF2 and
SNDT5.
This function block may only be established on the FM458-1 DP by
the integrated PROFIBUS interface and activated constant bus cycle
time.
RCVT5 supplies the net (useful) data from PROFIBUS telegrams 5 or
105.

Mode of operation

The RCVT5 accesses the receive data using a pointer operation. It


provides this data as individual elements at the outputs corresponding to
the telegram specification. For instance, a function block CRV_P can
supply the pointer for the receive data.
The function blocks must be executed in the following sequence:
CRV_P RCVT5 NAVDP DRVIF2 SNDT5 CTV_P
After the block has been initialized, a plausibility check is made as to
whether pointer PTR is pointing to a valid memory area. As long as the
pointer PTR has no valid value, the pre-assignments (defaults) remain at
the outputs. As soon as a correct pointer is present, then the value is
transferred (accepted) once. A new pointer is only accepted after the
block has been initialized.
Only PROFIBUS telegrams 5 or 105 can be received.
The telegram selection is realized when initializing using the input TLG.

9-142

TLG

Telegram

Data buffer length

MLD

9 words (18 bytes)

105

10 words (20 bytes)

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

The complete telegram length in bytes, that is received from a DP slave,


is specified at input NBY (telegram length) of block CRV_P. These can
also be telegrams from several axes (double-axis modules) that can be
selected using the address offset OFF.
Example for a double-axis module:
Input OFF contains the address offset in bytes in the telegram buffer for
the 1st or 2nd axis.
The input is cyclically read. OFF may only have values between 0 and
240.
Axis

Telegram

OFF

18

105

105

20

The reference speed in the units revolutions/minute is available at input


RS. This value should not be zero.
NIST_B contains the percentage of the speed, normalized to RS with
100% = 0x40000000H.
Max. value is 200% = 0x80000000H. Negative values are possible.
All output values are output rotated.
Fault codes

QF

Meaning

No fault detected, there is a valid pointer to the telegram buffer

Fault detected, for the cause, refer to YF - not for YF=7

YF
1

Meaning
Insufficient memory for the buffer;
Remedy: Reduce the buffer length or the configured software.

No valid buffer pointer at the PTR connection;


it is possible that the connection does not go to the PTR connection;
Remedy: Check the CFC connections at the PTR connectors;

The block connected via PTR does not have the same sampling time.
Remedy: All of the pointer-based communication blocks, inter-linked
through a PTR-CFC connection, must have the same sampling time.

Offset greater than the buffer length, cyclic check, as OFF can be
changed online
Remedy: The offset must lie within the buffer length.

No data present;
Remedy: Check whether the telegram blocks CRV_P/CTV_P have
been
correctly initialized, are operating correctly and data is being
transferred.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-143

GMC blocks

I/O
Default
PTR

Pointer to the telegram buffer

OFF

Offset in bytes

RS

Reference speed

3000.0

TLG

Telegram 5 /105

ST1

Status word 1 (ZSW1)

NIB

Speed actual value B (NIST_B)

ST2

Status word 2 (ZSW2)

G1S

Encoder 1, status word (G1_ZSW)

GX1

Encoder 1, position actual value 1 (G1_XIST1)

GX2

Encoder 1, position actual value 2 (G1_XIST2)

Speed actual value

MLD

Message for telegram 105 (MELDW)

QF

Fault status block (for the fault codes, refer to the table above)

YF

Status information on the block


(for the fault codes, refer to the table above)

Configuring data

9-144

0
0

0x0040
0
0xF000

0
0.0
0x0000
0
16#0000

Computation time [s]

FM458-1 DP

Can be loaded online

Yes

Can be configured in

Alarm tasks
Cyclic tasks

Executed in

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

9.33

SNDT5 Send block

Symbol
SNDT5
Pointer to the telegram buffer DW
Offset (bytes) DI
Control word 1 W
Speed setpoint R
Control word 2 W
Encoder control word W
Incremental position difference DI
Position controller gain factor R
Reference speed R
Torque reduction I
Telegram 5 /105 BO

Brief description

PTR
OFF
CT1
Y
CT2
G1C
XER
KPC
RS
TRQ
TLG

NSB DI Speed setpoint B


QF BO Fault status block
YF W Status info block

This function block is used to connect drives corresponding to the


specifications of the PROFIdrive profile (for example, SIMODRIVE,
SINAMICS) in conjunction with the function blocks NAVDP, DRVIF2 and
RCVT5.
This function block may only be established on the FM458-1 DP by
the integrated PROFIBUS interface and activated constant bus cycle
time.
SNDT5 supplies the net data for the PROFIBUS telegrams 5 or 105.

Mode of operation

SNDT5 accesses the send data buffer using a pointer operation and
retrieves the individual values from the inputs corresponding to the
telegram specification. The CTV_P function block can, for example,
supply the pointer for the data buffer.
The function blocks must be executed in the following sequence:
CRV_P RCVT5 NAVDP DRVIF2 SNDT5 CTV_P
After the block has been initialized, a plausibility check is used to
determine whether the pointer PTR is pointing to a valid memory range.
As long as the pointer PTR does not have a valid value, then the send
data buffer is not written into. As soon as a correct pointer is present, the
value is transferred (accepted) once. A new pointer is only accepted after
the block has been initialized.
Only PROFIBUS telegrams 5 or 105 can be sent.
The telegram is selected when initializing using the TLG input.
TLG

Telegram

Data buffer length

TRQ

9 words

105

10 words

0-100%

The complete telegram length in bytes, that is sent to a DP slave, is


specified at input NBY (telegram length) of block CTV_P. These can also
be the telegrams from several axes (double-axis modules) that can be
selected using the address offset OFF.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

9-145

GMC blocks

Example for a double-axis module:


The OFF input receives the address offset in bytes in the telegram buffer
for the 1st or 2nd axis.
The input is cyclically read. OFF may only have values between 0 and
240.
Axis

Telegram

OFF

18

105

105

20

The reference speed in units of revolutions/minute is available at input


RS. The value should not be zero.
NSOLL_B contains the percentage normalized speed referred to RS with
100% = 0x40000000H.
Max. value is 200% = 0x80000000H. Negative values are possible.
The position controller gain factor KPC (units 1/s) is, before it is
transferred into the buffer,
multiplied by 1000 and transferred as data type DI.
Only values of between 0 and less than 100 are practical at input TRQ.
All input values are rotated before data transfer.
Fault codes

QF

Meaning

No fault detected, valid pointer available to the telegram buffer

Fault detected, for the cause, refer to YF - not for YF=7

YF
1

Meaning
Insufficient memory for the buffer;
Remedy: Reduce the buffer length or the configured software.

No valid buffer pointer at the PTR connection;


it is possible that the connection does not go to the PTR connection;
Remedy: Check the CFC connections at the PTR connectors;

The block connected via PTR does not have the same sampling time.
Remedy: All of the pointer-based communication blocks, inter-linked
through a PTR-CFC connection, must have the same sampling time.

Offset greater than the buffer length, cyclic check, as OFF can be
changed online
Remedy: The offset must lie within the buffer length.

9-146

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

GMC blocks

I/O
Default
PTR

Pointer to the telegram buffer

OFF

Offset in bytes

CT1

Control word 1 (STW1)

Speed setpoint

CT2

Control word 2 (STW2)

G1C

Encoder control word (G1_STW)

XER

System deviation (XERR)

KPC

Position controller gain factor (KPC)

RS

Reference speed

3000.0

TRQ

Torque reduction

TLG

Telegram 5 /105

NSB

Speed setpoint B (NSOLL_B)

QF

Fault status block (for the fault codes, refer to the table above)

YF

Status information on the block (for the fault codes, refer to the table above)

Configuring data

0
0
0x0000
0
0x0000

1.0

Computation time [s]

FM458-1 DP

Can be loaded online

Yes

Can be configured in

Alarm tasks
Cyclic tasks

Executed in

Normal mode

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

16#0000

2.5

9-147

10

Special blocks

10.1

FGEN Format generator

Symbol
FGEN
Reference position R
Reference velocity R
Angle, end of cut R
Angle, start of cut R
Transition point, normal curve R
Format R
Factor, overspeed R
Position normalization R
Curve selection I
Calculate constants BO
Select diagnostics DG1 I
Select diagnostics DG2 I

Brief description

ARF
VRF
AX
AY
AZ
FMT
OVS
NRM
MOD
CAL
DS1
DS2

YDS
YDV
FEL
PST
LST
DXN
DXS
YAR
AM1
AM2
SIN
DG1
DG2
QCR
QFR
QHL
QF
YFC

R
R
R
R
R
R
R
R
R
R
R
R
R
BO
BO
BO
BO
W

Position ref. value


Speed setpoint
Format, electrical
Starting position
Starting length
Starting value, referred
Starting distance [mm]
Start of the wait range
Acceleration, phase 1
Acceleration, phase 2
f( sinus(arg1) )
Diagnostics output 1
Diagnostics output 2
Shears in the cutting range
Shears in the format range
Hardlock missing
Input error
Error code

The FGEN function block is a setpoint/reference value generator for the


position and speed of a direct cross-cutter. For flying shears with linear
knife motion it can be used to synchronize the cutting device at a precise
position. In addition, it provides various auxiliary quantities to control the
cutting device.
The block operates exclusively with referred (per unit) quantities:
Position value and angle are referred to the mechanical synchronous
format
Velocities are referred to the rated velocity
Please refer to Section 4 - documentation for the standard configuring
cross cutters/shears control - for a description of the function.
The element is executable only on the module FM458, FM458-1 DP and
T400 with plugged hardlock.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

10-1

Special blocks

Mode of operation

The velocity characteristic is characterized by the following input


quantities; these input quantities are transferred for CAL = 1:
AX

Position of the shears from which the shears and material run
asynchronously (the shears are then no longer in contact with the
material)

AY

Position of the shears from which the shears and material run in
synchronism (the shears are then in contact with the material)

AZ

Symmetry between the acceleration and synchronizing phase. The


value lies between 0 and 1, whereby 0.5 represents the symmetrical
distribution.

FMT

Relative format to the sheet to be cut (referred to the mechanical


synchronous format).

MOD Sequence of acceleration phases


0: Sinusoidal section
1: Linear ramps
2: Linear ramps with rounding-off

For a constant velocity VRF of the material web, the following typical
velocity characteristics are obtained. The setpoint velocity for the shears
drive (Vknife) is obtained from the sum of the material velocity (Vmaterial)
and the output quantity YDV:
AZ=0

AZ=1.0

AZ
Vknife

Vmaterial
AY

AY

AX

AX

Format range
Cutting range

10-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Special blocks

The position reference value YDS is formed from the reference position
ARF. After the cut, the reference position must be reduced by the cut
format so that the various operations are repeated. For systems using a
rotary axis, the reference position and the actual value of the shears
position should be set to zero at the center of the cutting range.
Knife velocity
AY
Vmaterial

AX

AY

AX

Vknife

t
Knife position

?
AY
Waiting
pos.
AX
t

Overvelocity OVS

If, when cutting, the knife is to be moved faster than the material (above
synchronous operation), then input OVS is set to a value greater than 1.
At the same time, the setpoint velocity must be externally multiplied by
the overvelocity factor.
For OVS = 1.05, the shears, when cutting, move 5% faster than the
material. OVS is limited to within the range 0.5< OVS < 2.0.

Fault codes

Bit

Significance

Specified FMT format is too low

Comment: (AY AX) should be greater than 0.5, as the nonsynchronous motion to the material must occur in the angular range
between AX and AY.

AY greater than 1.0 (this is only an alarm) or (AY AX) < 0.1

AZ not in the range 0 AZ 1.0

Illegal operating mode (MOD)

Illegal overvelocity factor


OVS 0: Error(QF =1)
0 < OVS < 0.5: Alarm and limit to 0.5
2.0 < OVS: Alarm and limit to 2.0

Hardlock not detected

Not sufficient memory available

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

10-3

Special blocks

I/O
Default
ARF

Reference position

VRF

Reference velocity

AX

Angle, end of cut

0.1

AY

Angle, start of cut

0.9

AZ

Transition point, normal curve

0.5

FMT

Format

1.0

OVS

Factor, overvelocity (Incorporation only at CAL=1)

1.0

MOD

Curve selection

NRM

Position normalization to display of DXS (Incorporation only at CAL=1)

CAL

Calculate constants

DS1

Select diagnostics DG1 (only for diagnostic purposes)

DS2

Select diagnostics DG2

YDS

Position reference value

YDV

Velocity setpoint; supplementary setpoint that must be added to the material velocity
in order to calculate the velocity of the knife drive

FEL

Format electrical: Product of FMT and OVL

PST

Starting position: Standstill position (quiescent position) of the shears

LST

Starting length: Reference position where shears synchronization starts

DXN

Starting distance, normalized

DXS

Starting distance in [mm]; (DXS = DXN NRM)

YAR

Start of the waiting range: Reference position at which the de-synchronization


operation has been completed

AM1

Acceleration, phase 1: Maximum acceleration in the de-synchronization phase

AM2

Acceleration, phase 2: Maximum acceleration in the synchronization phase

SIN

f(sinusoidal (arg1)): Distance-dependent help function


Range, ARF < AX :
Range, AX < ARF < AZ:
Range, AZ < ARF:

0
0

(only for diagnostic purposes)

SIN = 0
SIN = sin( (ARF- AX) / (AZ AX))
SIN = 1.0

DG1

Diagnostics output 1 (only for diagnostic purposes)

DG2

Diagnostics output 2 (only for diagnostic purposes)

QCR

Shears in the cutting range

QFR

Shears in the format range

QHL

Hardlock missing: The block checks whether there is hardlock


(this is copy protection). If a hardlock is not detected then the
block is inhibited.

QF

Input error

YFC

Error code (refer above) or alarm (QF = 0)

10-4

1.0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Special blocks

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Computed in

Init mode
Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

105.0
35.0
17.5

10-5

Special blocks

10.2

STATIS Statistical evaluation

Symbol
STATIS
Evaluation quantity
1st range limit
2nd range limit
3rd range limit
4th range limit
5th range limit
6th range limit
7th range limit
8th range limit
Edge trigger input
Level trigger input
Reset
Use abs. value X
Number of values
Maximum number of values

Brief description

R
R
R
R
R
R
R
R
R
BO
BO
BO
BO
I
I

X
XL1
XL2
XL3
XL4
XL5
XL6
XL7
XL8
TGE
TGL
R
ABS
N
NMX

YL1
Y12
Y23
Y34
Y45
Y56
Y67
Y78
YG8
VAL
QF

R
R
R
R
R
R
R
R
R
BO
BO

< XL1 component


XL1 .. XL2 component
XL2 .. XL3 component
XL3 .. XL4 component
XL4 .. XL5 component
XL5 .. XL6 component
XL6 .. XL7 component
XL7 .. XL8 component
> XL8 component
Outputs are valid
Initialization error

This block calculates the relative frequency with which evaluation


quantity X remains in a specific value range.
The value range is sub-divided into 9 ranges using 8 limit values (XL1 ...
XL8). For every range, the frequency is determined, with which the
evaluation quantity was within the particular range in the last N traced
values.
The ranges must be unique and clear, this means:
XL1 XL2 XL3 XL4 XL5 XL6 XL7 XL8

Example

N = 100
XL1 = 0.0
XL2 = 1.0
XL3 ... XL8 > 1.0
For example, contained in 100 measured values:
26 values with value < 0.0
14 values with 0.0 < value < 1.0
YL1 = 26/100 = 0.26
Y12 = 14/100 = 0.14

Trigger inputs

10-6

The evaluation is enabled with the trigger inputs. As long as TGL = 1


(level triggering), then a new calculation is made in every processing
interval. For edge triggering
(TGL = 0), at TGE = 0 1 transition, the actual measured value is
included in the statistics.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Special blocks

I/O
Default
X

Evaluation quantity

0.0

st

XL1

1 range limit

0.1

XL2

2nd range limit

0.25

XL3

3rd range limit

0.5

th

XL4

4 range limit

0.75

XL5

5th range limit

1.0

XL6
XL7

th

1.5

th

2.0

th

5.0

6 range limit
7 range limit

XL8

8 range limit

TGE

Edge trigger input

TGL

Level trigger input

Reset. Deletes the existing evaluation

ABS

Use the absolute value of input quantity X for evaluation

Number of measured values (0 < N NMX)

0.01

NMX

Maximum number of measured values (initialization connection)

100

YL1

< XL1 component

0.0

Y12

XL1 .. XL2 component

0.0

Y23

XL2 .. XL3 component

0.0

Y34

XL3 .. XL4 component

0.0

Y45

XL4 .. XL5 component

0.0

Y56

XL5 .. XL6 component

0.0

Y67

XL6 .. XL7 component

0.0

Y78

XL7 .. XL8 component

0.0

YG8

> XL8 component

0.0

VAL

Outputs are valid. Is set after N valid measured values.

Prerequisite: The range limits XL1 ... XL7 are sorted in increasing numbers (the
range limits are only checked in each processing cycle).
QF

Initialization error (insufficient working memory)

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Computed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

27.0
9.0
4.5

10-7

Special blocks

10.3

TRACK Cut optimization for cross-cutters

Symbol
TRACK
Position actual value R
Cut length setpoint R
Equivalent cutting length R
Maximum format, waste sheets R
Minimum format, waste sheets R
Minimum clearance between defects R
Distance, detector R
Tolerance R
Position actual value for a cut R
Number of defects (4..32) INT
Operating mode INT
Defect detection BO
Start cut pattern calculation BO
Delete defect memory BO
Enable BO

Brief description

XP
CL
CLS
MAX
MIN
MEG
DXD
TOL
XPC
NE
MOD
ERR
CAL
RES
EN

YCL
YEC
QE
QFC
QFE
QFS
QFF
QNC
END

R Cut length
DINT Defect counter
BO Material defect
BO Immediate format change
BO Replacement format
BO Waste cut
BO Sheet with defect position
BO Cut with defect position
BO End of the material web

The block evaluates a sensor which detects material defects or markings


on the material web and which is located a distance DXD in front of a
cross-cutter. From this signal it calculates the optimum length of the
sheets to be cut.
This function block should be computed in a fast cycle, in order to be able
to determine the position of the defect as precisely as possible.

Mode of operation

The block tracks the position actual value of the material web to be cut
(input XP). If XP reaches the value position actual value for cut (XPC),
then the next cut is made. The distance to the next cut can be calculated
from this.
It is assumed that the position actual value XP increases and when
cutting is reduced by the length of the sheet presently being cut. The cut
length for the subsequent sheet is output at YCL. After the cut has been
detected, the cut length of the following sheet is output.
The distance between the defect detection and the shears (DXD) must
be at least twice that of the synchronous cutting length of the shears
(circumference of the knife drum).
DXL

Detector

Shears

Detector

DXL

Shears

Material defect

Material defect

Max.
cutting length

DXL > maximum cut length

Max.
cutting length

DXL < maximum cut length

Generally, the detector to detect material defects is further away from the
shears as the largest sheet to be cut. In this particular case, the cut
length can already be determined before the start of the sheet was cut.

10-8

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Special blocks

If the required cut length is greater than the distance between the
detector and the shears, then the cut length of the current sheet can still
change if a material defect is detected. This is indicated using a pulse at
output QFC. In this case, the system changes-over from an extremely
long cut length (>DXD) to a somewhat shorter cut length. As a result of
the large cut length, during the format change, the shears are in the
quiescent position so that no steps/jumps can occur in the position
reference value of the shears.
The start and end of a material defect are detected at input ERR. Up to
32 defects can be simultaneously tracked; these flow into a cut
optimization.
There are 4 different versions to optimize the cut. These are selected as
a function of the mode MOD.
MOD = 0

cut standard format (CL) or replacement format (CLS)

Prerequisites

DXD > CL > CLS


The distance between the defect detection and the cut must be greater
than the largest format to be cut.
The standard format is larger than the replacement format. (if CLS > CL,
then a replacement format cannot be cut)
Shears
Material defect

MIN

Strategy

CL

CL

MIN

CLS

CL

This mode is intended for applications where as many possible sheets


are to be cut with either length CL or CLS.
If there is no defect-free length CL as a result of a material defect, then
an attempt is made to cut a sheet with CLS.
If this is not possible, then a cut is made after the defective location
(waste sheet).
If there are several defective locations one after the other over a short
distance without a sheet of either length CL or CLS between these
positions then a cut is made after the last defect.
For waste sheets, the MIN and MAX limits apply.

MOD = 1 cutting-out locations with defects


Prerequisites

CLS > CL (not effective)


The distance between the defect detection and the cut can be less than
the largest format to be cut.
Shears
Material defect

X
MIN

CL
MIN

X: Cut length depending on the position of the defect (random); MIN < X < CL

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

10-9

Special blocks

Strategy

This mode is suitable for applications where areas with defects are to be
cut-out with the smallest possible pieces of waste material. The standard
CL format is only used as maximum format to limit the sheet length if no
defects are detected.
The first cut is made before the position with defect and the second cut
after the position with defect - however, offset by a minimum distance
MIN.
If additional positions with defects follow within a short distance (< MIN),
the sheet length is increased up to a maximum of MAX.

MOD = 2 cut before the location with defect


Prerequisites

CLS > CL (not effective); MAX > CL (ineffective)


The distance between the defect detection and the cut can be less than
the largest format to be cut.
Shears
Material defect

CL

X: Cut length depending on the position of the defect (random); MIN < X < CL

Strategy

This mode is intended to synchronize the cut to an irregular material


marking. The standard CL format is only used as maximum format to limit
the sheet length if no defect is detected.
The cut is made before the position with defect.
If other defects follow with a short distance between them, then a
minimum sheet length of MIN is maintained.

MOD = 3 cut after the location with defect


Prerequisites

CLS > CL (not effective); MAX > CL (ineffective)


The distance between the defect detection and the cut can be less than
the largest format to be cut.
Shears
Material defect

CL

X: Cut length depending on the position of the defect (random); MIN < X < CL

Strategy

This mode is intended to synchronize the cut to an irregular material


marking. The standard CL format is only used as maximum format to limit
the sheet length if no defect is detected.
The cut is made after the location with defect.
If other defects follow with a short distance between them, then a
minimum sheet length of MIN is maintained.

10-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Special blocks

MOD = 4 material change (a gap between the old and new material web)
Prerequisites

CLS > CL (not effective); MAX > CL (ineffective)


MIN < CL;
The gap may not be greater than 1000DXD

Old material web

New material web


5

MIN
3

4
CLnew

CLnew

Shears

Cutting positions

MIN

2
CLold

1
CLold

This cut is not permissible as the residual piece is then too short
Prerequisite: MIN < CL

Strategy

For MOD = 4, the cut length is controlled for two consecutive material
webs. If the remaining piece of the old material web may not fall below a
minimum length, then this minimum length is defined at input MIN (pieces
which are too small can possibly jam in the machine).
The first sheet of the new material web is CL long.
If the new material web is to be cut with a different cutting length than the
previous one, then CL must be set to the new cutting length as soon as
output END is set to 1.
At the last cut before the gap, the position of the next cutting position
must be known in order to be able to calculate the associated cutting
length. This is not possible for extremely large gaps as the new start of
the material was still not detected at this instant in time. In this case, the
format length is initially defined to be an extremely large format (1000
DXD) and after the start of the material has been detected, is corrected to
correspond to the actual format (this is displayed by QFC = 1).
This technique cannot be used for larger gaps.

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

10-11

Special blocks

I/O
Default
XP

Actual position actual value of the material web

CL

Cutting length setpoint (standard format; highest priority). This standard format is
not limited by MIN or MAX!

1000

CLS

Replacement cutting length (replacement format; second highest priority), which


then becomes effective if the available defect-free material web is greater than CLS
and less than CL. In order that CLS can be used, CLS must be less than CL.

600

The replacement format is not limited by MIN or MAX!


MAX

Maximum waste sheet length. If, due to many material defects, no sheets with
length CL or CLS can be cut, then MAX is the maximum size of the waste pieces to
be cut.

5000

MIN

Minimum format. This is the shortest sheet length for waste pieces which may be
cut. The following must apply: MAX MIN

500

Special case, MAX = MIN: All waste sheets have the length MAX.
MEG

Minimum distance between defects. If the distance between two material defects is
less than MEG, then they are considered to be one defect.

DXD

Distance between the shears and the detector that detects the material defect.

TOL

Defect detection tolerance. The start and end of the detected material defect is
shifted by the value TOL which means that the length of the defect position is
increased by the absolute value 2 TOL. This allows inaccuracies when detecting
defects or sequences of defects to be compensated if under all circumstances it
should be prevented that a cut is made within the defect position.

XPC

Position actual value of the material where the cut is made.

NE

Maximum number of positions with defect which can be simultaneously tracked.


Permissible value range, 4 to 32.

MOD

Operating mode

0:
1:
2:
3:
4:

50
5000
1

1000

Cut in the standard format (CL) or replacement format (CLS)


Cutting-out positions with defect (cut before and after the defect position)
Cut before the defect position
Cut after the defect position
Material change

ERR

Defect detection. Connection of the signal from the material defect detection (1 =
defect present)

CAL

Start of the cutting pattern calculation. A rising signal edge (01) at CAL initiates
the evaluation of the detected defects whereby the cut length for the next cuts are
calculated.

This function is optional as an automatic cut pattern calculation is made before each
cut.
RES

Deletes the defect memory. For Res = 1, all of the material defects which are
presently being tracked are deleted.

EN

Enables the cut optimization. For EN = 0, the cutting length setpoint is transferred
through to the output (YCL= CL).

YCL

Cutting length setpoint for the following cut (not for the current sheet).

YEC

Defect counter. Number of detected material defects since the block was enabled or
since the defect memory was deleted

QE

Material defect. While material defects are being tracked, QE = 1.


QE = 0 means that presently no defects are being processed.

10-12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Special blocks

Default
QFC

Immediate format change is required.


Normally the cutting length (format) for the subsequent cut is output at YCL. This
cutting length is transferred at the cutting instant.

For the special case that the cutting length is greater than the distance to the defect
detection (CL > DXD), then the currently active cutting length must be corrected.
This is displayed at output QFC (this is a pulse which is 20 cycles long).
QFE

Actual cutting length is the replacement format

QFS

Waste cut. The actual cutting length is neither the standard format nor the
replacement format.

QFF

QFF indicates that the current sheet has a location with defect

QNC

Indicates that the cut is made at a position with a defect. For large positions/areas
with defects and restricted cutting conditions, it can occur that the cut must be made
at the defect position. (for example, at MIN = MAX then waste sheets are always cut
with length MAX)

END

End of the material web. This output only becomes active for MOD = 4. This
indicates that a change in the cutting length CL only has an effect on the
subsequent material web.

Configuringdata

Computation time [s]

T400 / PM5
FM458 / PM6
CPU550 / 551

Can be loaded online

Yes

Can be configured in

Interrupt tasks
Cyclic tasks

Computed in

Normal mode

Special features

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

13.5
4.5
2.3

10-13

Appendix

A.1

Type overview Function Blocks

Typ

Designation

Computation time (s)

Capter

@CPN

Local coupling, central block

T400/PM5
FM458/PM6
CPU550/551

50,0
16,5
8,3

4.7.1

@DPH

Parameter processing central block

T400/PM5
FM458/PM6
CPU550/551

15,4
5,1
2,6

4.3.1

@MSC

Message system central block

T400/PM5
FM458/PM6
CPU550/551

8,1
2,7
1,4

4.2.1.1

@TCI

System trace central block

T400/PM5
FM458/PM6
CPU550/551

50,0
16,5
8,3

4.5.3.1

@TCP

Single trace central block

T400/PM5
FM458/PM6
CPU550/551

50,0
16,5
8,3

4.4.2.1

@TRI

Acquisition block system trace

T400/PM5
FM458/PM6
CPU550/551

16,0
5,3
2,7

4.5.3.2

ACOS

Arc cosine function

T400/PM5
FM458/PM6
CPU550/551

38,4
12,7
6,4

2.1

ADC

Analog input via A/D converter

T400/PM5
FM458/PM6
CPU550/551

18,6
6,1
3,1

3.1

ADD

Adder

T400/PM5
FM458/PM6
CPU550/551

5,4
1,8
0,9

2.2

ADD_D

Adder (DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

3,7
1,2
0,6

2.4

ADD_I

Adder (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

3,7
1,2
0,6

2.3

ADD_M

Modulo adder for axis cycle-correct


addition

T400/PM5
FM458/PM6
CPU550/551

60,0
19,8
9,9

2.5

ADDAZ

Adder with axis cycle limiting

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

9.8

AENC

Absolute value encoder (SSI/EnDat)

T400/PM5
FM458/PM6
CPU550/551

50,0
16,5
8,3

3.3

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

A-1

Appendix

Typ

Designation

Computation time (s)

Capter

AFC

Analog input via V/f/D converter

T400/PM5
FM458/PM6
CPU550/551

5,8
1,9
1,0

3.2

AND

AND block (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,2
1,4
0,7

6.1.1

AND_W

AND block ( WORD type)

T400/PM5
FM458/PM6
CPU550/551

4,2
1,7
0,9

6.1.3

AND12

AND block status word (WORD type)

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

6.1.2

ANS

Automatic numerical changeover switch


(REAL type)

T400/PM5
FM458/PM6
CPU550/551

4,8
1,6
0,8

6.5.1

ANS_I

Automatic numerical changeover switch


(INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

4,5
1,5
0,8

6.5.2

ASI

Acknowledge signal (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,2
1,4
0,7

7.1

ASIN

Arc sine function

T400/PM5
FM458/PM6
CPU550/551

17,3
5,7
2,9

2.6

ATAN

Arc tangent function

T400/PM5
FM458/PM6
CPU550/551

7,1
2,3
1,2

2.7

AVA

Absolute value generator with sign


evaluation

T400/PM5
FM458/PM6
CPU550/551

2,6
0,9
0,5

2.8

AVA_D

Absolute value generator with sign


evaluation (Typ DOUBLE-INTEGER)

T400/PM5
FM458/PM6
CPU550/551

2,6
0,9
0,5

2.9

B_DW

Conversion, 32 binary quantities into a


double word (32 bit)

T400/PM5
FM458/PM6
CPU550/551

15,0
5,0
2,5

5.1.2

B_W

Converter, 16 binary quantities into a


status word

T400/PM5
FM458/PM6
CPU550/551

20,8
6,7
3,4

5.1.1

BF

Flash function for a binary quantity


(BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,2
1,1
0,6

6.9.1

BF_W

Flash function for a status word (WORD


type)

T400/PM5
FM458/PM6
CPU550/551

6,8
2,2
1,1

6.9.2

BII8

Binary input

T400/PM5
FM458/PM6
CPU550/551

13,4
4,4
2,2

3.4

BIQ8

Binary output

T400/PM5
FM458/PM6
CPU550/551

12,7
4,2
2,1

3.5

A-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

Computation time (s)

Capter

BNR

Binary thumbwheel switch input

T400/PM5
FM458/PM6
CPU550/551

6,6
2,2
1,1

5.2.1

BSW

Binary changeover switch

T400/PM5
FM458/PM6
CPU550/551

2,2
0,7
0,4

6.5.3

(INTEGER type)
BY_W

Status byte to status word converter

T400/PM5
FM458/PM6
CPU550/551

2,5
0,8
0,4

5.1.3

CAMD

Cam disk

T400/PM5
FM458/PM6
CPU550/551

35,0
11,6
5,8

9.10

CAMSW

Cam block with 2 cams

T400/PM5
FM458/PM6
CPU550/551

28,0
9,2
4,6

9.2

CAMSW1

Cam controller for time characteristics

T400, PM5
FM458, PM6

CATCH

Catch up/shutdown

T400/PM5
FM458/PM6
CPU550/551

23,0
7,6
3,8

9.3

CCC4

Collect block process data

T400/PM5
FM458/PM6
CPU550/551

249,3
82,3
41,2

4.1.1

CDC4

Distribution block process data

T400/PM5
FM458/PM6
CPU550/551

185,9
61,4
30,7

4.1.2

CLUTCH

Engage/disengage (coupling)

T400, PM5:
PM6, FM458

23
7,5

9.22

CNM

Controllable numerical quantity (REAL


type)

T400/PM5
FM458/PM6
CPU550/551

2,9
1,0
0,5

6.7.1

CNM_D

Controllable numerical memory


(DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

2,9
1,0
0,5

6.7.2

CNM_I

Controllable numerical memory


(INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

2,6
0,9
0,5

6.7.3

COS

Cosine function

T400/PM5
FM458/PM6
CPU550/551

14,9
4,9
2,5

2.10

CPY_P

Copying block for pointer-based


processing

T400/PM5
FM458/PM6
CPU550/551

9,0
3,0
1,5

4.9.1

CRV

Receive block process data

T400/PM5
FM458/PM6
CPU550/551

71,7
23,7
11,9

4.1.3

CRV_P

Telegram block, receive with pointer

T400 / PM5
+0,05 per Byte
FM458 / PM6
+0,05 per Byte
CPU550 / 551
+0,05 per Byte

60

4.9.2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

11 (... 168) 9.27


3,5 (... 56)

20
10

A-3

Appendix

Typ

Designation

Computation time (s)

Capter

CTR

Counter (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

6,3
2,1
1,1

6.3.1

CTV

Transmit block process data

T400/PM5
FM458/PM6
CPU550/551

66,9
22,1
11,1

4.1.4

CTV_P

Telegram block, sending with pointer

T400 / PM5
per Byte
FM458 / PM6
per Byte
CPU550 / 551
per Byte

105, 0+1

4.9.3

35, 0+1
17,5+1

D_I

DOUBLE-INTEGER to INTEGER
converter

T400/PM5
FM458/PM6
CPU550/551

1,3
0,4
0,2

5.1.4

D_R

DOUBLE-INTEGER to REAL converter

T400/PM5
FM458/PM6
CPU550/551

1,8
0,6
0,3

5.1.5

DAC

Analog output

T400/PM5
FM458/PM6
CPU550/551

12,8
4,2
2,1

3.6

DAT

Function block to input/output real


values in/out of a data memory (REAL
type)

T400/PM5
FM458/PM6
CPU550/551

2,8
0,9
0,5

6.8.1

DB_P

Data block for pointer-based processing

T400/PM5
FM458/PM6
CPU550/551

3,9
1,3
0,7

4.9.4

DEL

Dead line block

T400/PM5
FM458/PM6
CPU550/551

2,1
0,7
0,4

1.1

DEZ

Dead zone block

T400/PM5
FM458/PM6
CPU550/551

2,5
0,8
0,4

1.2

DFR

D flipflop, R-dominant (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

6,0
2,0
1,0

6.7.4

DFR_W

Reset dominant, D flipflop (WORD type)

T400/PM5
FM458/PM6
CPU550/551

4,3
1,4
0,7

6.7.5

DIAPRO

Diagnostics DP (PROFIBUS DP
coubling )

T400/PM5
FM458/PM6
CPU550/551

30,5
10,1
5,1

4.6.1

DIF

Differentiator block

T400/PM5
FM458/PM6
CPU550/551

9,5
3,1
1,6

1.3

DIV

Divider

T400/PM5
FM458/PM6
CPU550/551

35,7
11,8
5,9

2.11

DIV_D

Divider (DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

5,3
1,8
0,9

2.13

A-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

Computation time (s)

Capter

DIV_I

Divider (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

5,3
1,8
0,9

2.12

DIV_R

Divider (REAL type)

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

2.14

DLB

Delay block (REAL type)

T400/PM5
FM458/PM6
CPU550/551

2,6
0,9
0,5

6.8.2

DPI

Parameter block

T400/PM5
FM458/PM6
CPU550/551

4,7
1,6
0,8

4.3.2

DRD; DRD_D,
DRD_I

DRD Read blocks for pointer-based


communications

T400 / PM5
FM458 / PM6
CPU550 / 551

3,6
1,2
0,6

4.9.5

DRD_8

T400 / PM5
FM458 / PM6
CPU550 / 551

11,4
3,8
1,9

DRD_8D

T400 / PM5
FM458 / PM6
CPU550 / 551

30,0
10,0
5,0

DRD_8I

T400 / PM5
FM458 / PM6
CPU550 / 551

13,8
4,6
2,3

DRD_BY

T400 / PM5
FM458 / PM6
CPU550 / 551

3,0
1,5
0,8

DRVIF

Interface to the drive

T400 / PM5
PM6 / FM458

15
5

9.20

DRVIF2

Interface to the drive

FM458/PM6
CPU550/551

5
2.5

9.31

DT1

DT1 block

T400/PM5
FM458/PM6
CPU550/551

13,3
4,4
2,2

1.4

DTS

Synchronization delay time (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

5,3
1,8
0,9

6.9.3

DW_B

Conversion double word (32 bit) into 32


binary quantities

T400/PM5
FM458/PM6
CPU550/551

15,0
5,0
2,5

5.1.6

DW_W

Conversion 32 bit double word into two


16 bit words

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

5.1.7

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

A-5

Appendix

Typ

Designation

Computation time (s)

Capter

DWR, DWR_D,
DWR_I

DWR Write blocks for pointer-based


communications

T400 / PM5
FM458 / PM6
CPU550 / 551

3,6
1,2
0,6

4.9.6

DWR_8

T400 / PM5
FM458 / PM6
CPU550 / 551

12,0
4,0
2,0

DWR_8D

T400 / PM5
FM458 / PM6
CPU550 / 551

30,0
10,0
5,0

DWR_8I

T400 / PM5
FM458 / PM6
CPU550 / 551

25,8
8,6
4,3

DWR_BY

T400 / PM5
FM458 / PM6
CPU550 / 551

5,4
1,8
0,9

DX8

Demultiplexer, 8 outputs, can be


cascaded (REAL type)

T400/PM5
FM458/PM6
CPU550/551

4,3
1,4
0,7

6.6.1

DX8_I

Demultiplexer, 8 outputs, can be


cascaded (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

4,2
1,4
0,7

6.6.2

EDC

Engage/disengage

T400/PM5
FM458/PM6
CPU550/551

20,0
6,6
3,3

9.4

EDC1

Engager/disengager

T400, PM5
FM458, PM6

27
9

9.24

ENC2

Optional incremental encoder for


NAVMC

T400, PM5
FM458, PM6
CPU550/ 551

4,5
1,5
0,8

9.28

EPE

Delete change memory

T400/PM5
FM458/PM6
CPU550/551

6,7
2,2
1,1

7.2

ETE

Edge evaluator (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,0
1,0
0,5

6.9.4

FGEN

Format generator

T400 / PM5
FM458 / PM6
CPU550 / 551

105,0
35,0
17,5

10.1

FRM

Formula block

T400 / PM5
xx
(fr den Ausdruck:
(X1+X2)*X3)
FM458 / PM6
CPU550 / 551

xx
xx

2.30

FUZ_I

Fuzzy controller (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

70,0
23,1
11,6

1.6

GEAR

Gearbox block

T400/PM5
FM458/PM6
CPU550/551

25,0
8,3
4,2

9.15

A-6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

Computation time (s)

Capter

I_D

INTEGER to DOUBLE-INTEGER
converter

T400/PM5
FM458/PM6
CPU550/551

1,6
0,5
0,3

5.1.8

I_R

INTEGER to REAL converter

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

5.1.9

INT

Integrator

T400/PM5
FM458/PM6
CPU550/551

7,5
2,5
1,3

1.7

INT_MR

Virtual master

T400/PM5
FM458/PM6
CPU550/551

15,0
5,0
2,5

9.16

LIM

Limiter

T400/PM5
FM458/PM6
CPU550/551

3,0
0,9
0,5

1.8

LIM_D

Limiter (DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

3,0
0,9
0,5

1.9

LVM

Limit value monitor with hysteresis, 2


directions (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,9
1,6
0,8

6.9.6

MAS

Maximum evaluator

T400/PM5
FM458/PM6
CPU550/551

3,9
1,3
0,7

2.15

MCSB

Generating motion sequences (basis


block)

T400/PM5
20 (...300)
FM458/PM6 7 (...100)
CPU550/551 3,5 (...50)

9.25

MCSS

Generating motion sequences


(subsequent block)

T400/PM5
FM458/PM6
CPU550/551

9 (...300)
3 (...100)
1,5 (...50)

9.26

MDCMP

Compensation block for mode


changeover

T400/PM5
FM458/PM6
CPU550/551

20,0
6,6
3,3

9.1

MDCMP1

Basic and equalization functions for


Motion Control

T400/PM5
FM458/PM6
CPU550/551

22
7,5
3,8

9.26

MER

Message block for one activated


messages with measured value (R type)

T400/PM5
FM458/PM6
CPU550/551

8,1
2,7
1,4

4.2.3.1

MER_I

T400/PM5
FM458/PM6
CPU550/551

7,8
2,6
1,3

MER_D

T400/PM5
FM458/PM6
CPU550/551

9,6
3,2
1,6

MER1

Message block for one activated


message with text

T400/PM5
FM458/PM6
CPU550/551

4,0
1,3
0,7

4.2.2.2

MER16

Message block for 16 activated


messages with text

T400/PM5
FM458/PM6
CPU550/551

13,1
4,3
2,2

4.2.2.3

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

A-7

Appendix

Typ

Designation

Computation time (s)

Capter

MERF

Message block for an activated and a


deactivated message with measured
value

T400/PM5
FM458/PM6
CPU550/551

10,5
3,5
1,8

4.2.5.1

MERF_I

T400/PM5
FM458/PM6
CPU550/551

7,6
2,5
1,3

MERF_D

T400/PM5
FM458/PM6
CPU550/551

11,1
3,7
1,9

MERF0

Message block for activated and


deactivated messages without value

T400/PM5
FM458/PM6
CPU550/551

18,0
5,9
3,0

4.2.4.1

MERF1

Message block for an activated an a


deactivated message

T400/PM5
FM458/PM6
CPU550/551

10,1
3,3
1,7

4.2.4.2

MERF16

Message block for 16 activated an


deactivated messages with text

T400/PM5
FM458/PM6
CPU550/551

17,2
5,7
2,9

4.2.4.3

MERO

Message block for 16 messages without


value

T400/PM5
FM458/PM6
CPU550/551

7,0
2,3
1,2

4.2.2.1

MFP

Pulse generator (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,8
1,3
0,7

6.2.1

MIS

Minimum evaluator

T400/PM5
FM458/PM6
CPU550/551

4,4
1,5
0,8

2.16

MSI

Message output block

T400/PM5
FM458/PM6
CPU550/551

13,0
4,3
2,2

4.2.1.2

MSIPRI

Message output block (printer)

T400/PM5
FM458/PM6
CPU550/551

22,4
7,4
3,7

4.2.1.3

MUL

Multiplier

T400/PM5
FM458/PM6
CPU550/551

5,5
1,5
0,8

2.17

MUL_D

Multiplier (DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

5,3
1,8
0,9

2.19

MUL_I

Multiplier (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

5,3
1,8
0,9

2.18

MUX8

Multiplexer, can be cascaded (REAL


type)

T400/PM5
FM458/PM6
CPU550/551

4,6
1,5
0,8

6.6.3

MUX8_I

Multiplexer, can be cascaded (INTEGER T400/PM5


type)
FM458/PM6
CPU550/551

3,4
1,1
0,6

6.6.4

N2_R

conversion 16 bit fixed point format (N2)


to REAL

2,0
0,7
0,4

5.1.10

A-8

T400/PM5
FM458/PM6
CPU550/551

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

N4_R

Conversion 32 bit fixed point format (N4) T400/PM5


to REAL
FM458/PM6
CPU550/551

2,0
0,7
0,4

5.1.11

NACTON

Natural constants

T400/PM5
FM458/PM6
CPU550/551

-------

2.20

NAND

NAND block (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,2
1,1
0,6

6.1.4

NAV

Speed/position actual value sensing

T400/PM5
FM458/PM6
CPU550/551

38,5
12,7
6,4

3.7

NAVDP

Position actual value sensing

FM458/PM6
CPU550/551

9
4.5

9.30

NAVMC

Speed/position actual value sensing

T400/PM5
FM458/PM6
CPU550/551

30,0
10,0
5,0

9.5

NAVS

Speed/position/position difference
sensing

T400/PM5
FM458/PM6
CPU550/551

48,5
16,0
8,0

3.8

NCM

Numerical comparator (REAL type)

T400/PM5
FM458/PM6
CPU550/551

3,7
1,2
0,6

6.4.1

NCM_D

Numerical comparator (DOUBLEINETGER type)

T400/PM5
FM458/PM6
CPU550/551

2,6
0,9
0,5

6.4.3

NCM_I

Numerical comparator (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

2,6
0,9
0,5

6.4.2

NOP1

Dummy block (REAL type)

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

6.9.7

NOP1_B

Dummy block (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

6.9.8

NOP1_D

Dummy block (DOUBLE-INTEGER type) T400/PM5


FM458/PM6
CPU550/551

1,5
0,5
0,3

6.9.9

NOP1_I

Dummy block (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

1,2
0,4
0,2

6.9.10

NOP8

Dummy block (REAL type)

T400/PM5
FM458/PM6
CPU550/551

6,7
2,2
1,1

6.9.11

NOP8_B

Dummy block, 8 binary quantities (BOOL T400/PM5


type)
FM458/PM6
CPU550/551

6,8
2,2
1,1

6.9.12

NOP8_D

Dummy block, 8 4 byte quantities


(DOUBLE-INTEGER type)

6,5
2,2
1,1

6.9.13

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Computation time (s)

T400/PM5
FM458/PM6
CPU550/551

Capter

A-9

Appendix

Typ

Designation

Computation time (s)

Capter

NOP8_I

Dummy block, 8 word quantities


(INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

6,9
2,3
1,2

6.9.14

NOR

NOR block (BOOL type))

T400/PM5
FM458/PM6
CPU550/551

3,5
1,2
0,6

6.1.5

NOT

Inverter (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

1,6
0,5
0,3

6.1.6

NOT_W

Invertierer Zustandswort (Typ WORD)

T400/PM5
FM458/PM6
CPU550/551

1,6
0,5
0,3

6.1.7

NSW

Numerical changeover switch (REAL


type)

T400/PM5
FM458/PM6
CPU550/551

2,1
0,7
0,4

6.5.4

NSW_D

Numerical changeover switch (DOUBLE- T400/PM5


INTEGER type)
FM458/PM6
CPU550/551

2,1
0,7
0,4

6.5.5

NSW_I

Numerical changeover switch (INTEGER T400/PM5


type)
FM458/PM6
CPU550/551

2,5
0,8
0,4

6.5.6

OFSGEN

Offset input

T400/PM5
FM458/PM6
CPU550/551

30,0
10,0
5,0

9.14

OFSSAV

Offset calculation

T400/PM5
FM458/PM6
CPU550/551

1,0
0,3
0,2

9.13

OR

OR-Stufe (Typ BOOL)

T400/PM5
FM458/PM6
CPU550/551

2,8
0,9
0,5

6.1.8

OR_12

OR logic gate status word (WORD type)) T400/PM5


FM458/PM6
CPU550/551

1,5
0,5
0,3

6.1.9

OR_W

OR block status word (WORD type)

T400/PM5
FM458/PM6
CPU550/551

3,9
1,3
0,7

6.1.10

OVFHSK

Overflow handshake procedure

T400/PM5
FM458/PM6
CPU550/551

10,0
3,3
1,7

9.18

PAC

Process interrupt counter

T400/PM5
FM458/PM6
CPU550/551

4,0
1,3
0,7

6.10.1

PAI

Process interrupt periphery input

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

6.10.2

PAS

Process interrupt software

T400/PM5
FM458/PM6
CPU550/551

4,0
1,3
0,7

6.10.3

PC

P controller

T400/PM5
FM458/PM6
CPU550/551

11,7
3,9
2,0

1.10

A-10

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

Computation time (s)

Capter

PCL

Pulse contractor (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

2,1
0,7
0,4

6.2.2

PDE

Switch on delay (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

2,2
0,7
0,4

6.2.3

PDF

Switch off delay (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,0
1,3
0,7

6.2.4

PHSFT

Phase shifter

T400/PM5
FM458/PM6
CPU550/551

10,0
3,3
1,7

9.7

PIC

PI controller

T400/PM5
FM458/PM6
CPU550/551

14,3
4,7
2,4

1.11

PIN8

Priority evaluator

T400/PM5
FM458/PM6
CPU550/551

13,7
4,5
2,3

6.9.15

PLI10

Polygon curve, 10 points

T400/PM5
FM458/PM6
CPU550/551

12,3
4,1
2,1

2.21

PLI20

Polygon curve, 20 breakpoints

T400/PM5
FM458/PM6
CPU550/551

14,9
4,9
2,5

2.22

PNO

CPU number (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

7.3

POSMC

Positioning block

T400/PM5
FM458/PM6
CPU550/551

35,0
11,6
5,8

9.12

POSREG

Position register reading

T400/PM5
FM458/PM6
CPU550/551

2,0
0,7
0,4

9.6

PSL

Process utilization (REAL type)

T400/PM5
FM458/PM6
CPU550/551

36,6
12,1
6,1

7.4

PST

Pulse extender (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,4
1,5
0,8

6.2.5

PT1

PT1 element

T400/PM5
FM458/PM6
CPU550/551

5,5
1,8
0,9

1.12

PWM

Pulse width modulator

T400/PM5
FM458/PM6
CPU550/551

3,1
1,0
0,5

1.13

R_D

REAL to DOUBLE-INTEGER converter

T400/PM5
FM458/PM6
CPU550/551

5,2
1,7
0,9

5.1.12

R_I

REAL to INTEGER converter

T400/PM5
FM458/PM6
CPU550/551

4,8
1,6
0,8

5.1.13

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

A-11

Appendix

Typ

Designation

Computation time (s)

Capter

R_N2

Conversion REAL to 16 bit fixed point


format (N2)

T400/PM5
FM458/PM6
CPU550/551

2,0
0,7
0,4

5.1.14

R_N4

Conversion REAL to 32 bit fixed point


format (N4)

T400/PM5
FM458/PM6
CPU550/551

2,0
0,7
0,4

5.1.15

RCVT5

Receive block

FM458/PM6
CPU550/551

4
2

9.32

RFG

Ramp function (REAL type)

T400/PM5
FM458/PM6
CPU550/551

2,7
0,9
0,5

7.5

RGE

Ramp function generator

T400/PM5
FM458/PM6
CPU550/551

32,9
10,9
5,5

1.14

RGJ

Ramp function generator with jerk


limiting

T400/PM5
FM458/PM6
CPU550/551

15,0
5,0
2,5

1.15

RSR

RS flipflop, R dominant (INTEGER type) T400/PM5


FM458/PM6
CPU550/551

3,5
1,2
0,6

6.7.6

RSS

RS flipflop, S dominant (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,5
1,2
0,6

6.7.7

RTCABS

Date and time output

T400/PM5
FM458/PM6
CPU550/551

7,0
2,3
1,2

4.5.1

RTCREL

Relative time output

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

4.5.2

SAV

Value buffer (REAL type)

T400/PM5
FM458/PM6
CPU550/551

4,1
1,4
0,7

6.8.3

SAV_B

Value buffer (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,0
1,3
0,7

6.8.4

SAV_D

Value buffer (DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

3,8
1,3
0,7

6.8.5

SAV_I

Value buffer (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

3,5
1,2
0,6

6.8.6

SBI

Status byte input

T400/PM5
FM458/PM6
CPU550/551

5,6
1,8
0,9

3.9

SBQ

Status byte output

T400/PM5
FM458/PM6
CPU550/551

5,4
1,8
0,9

3.10

SER

Service block

T400/PM5
FM458/PM6
CPU550/551

2,0
0,7
0,4

7.6

A-12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

Computation time (s)

Capter

SFC

SFC control block

T400/PM5
FM458/PM6
CPU550/551

75,0
25,0
12,5

8.1

SFCSI

SFC step information block

T400/PM5
FM458/PM6
CPU550/551

30,0
10,0
5,0

8.2

SFCTI

SFC transition information block

T400/PM5
FM458/PM6
CPU550/551

30,0
10,0
5,0

8.3

SH

Shift block (WORD type)

T400/PM5
FM458/PM6
CPU550/551

3,7
1,2
0,6

6.9.16

SHEAR

Cross-cutter/cross sealer

T400/PM5
FM458/PM6
CPU550/551

17
5,5
2,8

9.23

SII

Inverter

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

2.23

SIN

Sine function

T400/PM5
FM458/PM6
CPU550/551

7,7
2,5
1,3

2.24

SNDT5

Send block

FM458/PM6
CPU550/551

2.5
1.3

9.33

SPLINE

Cam disk with 32 points (calculation)

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

9.9

SQG

Square wave generator (REAL type)

T400/PM5
FM458/PM6
CPU550/551

2,2
0,7
0,4

7.7

SQGB

Clock generator for binary signals


(BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,1
1,0
0,5

7.8

SQR

Square-root extractor

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

2.25

SSD

Output on 7 segment display


(WORD type)

T400/PM5
FM458/PM6
CPU550/551

4,6
1,5
0,8

7.9

STATIS

Statistical evaluation

T400 / PM5
FM458 / PM6
CPU550 / 551

27,0
9,0
4,5

10.2

STG

Step function (REAL type)

T400/PM5
FM458/PM6
CPU550/551

2,7
0,9
0,5

7.10

SUB

Subtractor

T400/PM5
FM458/PM6
CPU550/551

4,6
1,5
0,8

2.26

SUB_D

Subtractor (DOUBLE-INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

2,8
0,9
0,5

2.28

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

A-13

Appendix

Typ

Designation

Computation time (s)

Capter

SUB_I

Subtractor (INTEGER type)

T400/PM5
FM458/PM6
CPU550/551

2,8
0,9
0,5

2.27

SWB_DW

Byte reverser for DOUBLE-WORD


inputs

T400/PM5
FM458/PM6
CPU550/551

1,6
0,5
0,3

5.2.2

SWB_W

Byte reverser for WORD inputs

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

5.2.3

SWBI

Byte reverser for REAL inputs

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

5.2.4

SWBO

Byte reverser for REAL outputs

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

5.2.5

SYF1

System error field (WORD type , 1 word


long)

T400/PM5
FM458/PM6
CPU550/551

5,3
1,8
0,9

7.11

SYF4

System error field (WORD type, 4 words


long)

T400/PM5
FM458/PM6
CPU550/551

8,2
2,7
1,4

7.12

SYNPRO

SYNC/FREEZE DP (PROFIBUS DP
coupling)

T400/PM5
FM458/PM6
CPU550/551

10,0
3,3
1,7

4.6.2

TAB, TAB_D

Tabular values manager

When setting-up the table


(after a 0 to 1 edge at the
inverter) for
T400/PM5
FM 458/PM6
CPU550/551
sonst:

4,5/point
1,5/point
0,8/point

T400/PM5
FM 458/PM6
CPU550/551

45
15
7,5

9.19

TABCAM

Cam disk in tabular form

T400/PM5
FM458/PM6
CPU550/551

35,0
11,6
5,8

9.11

TAN

Tangent function

T400/PM5
FM458/PM6
CPU550/551

23,1
7,6
3,8

2.29

TRACK

Cut optimization for cross-cutters

T400 / PM5
FM458 / PM6
CPU550 / 551

13,5
4,5
2,3

10.3

TRCC, TRCC_D

Analog trace acquisition block

T400/PM5
FM458/PM6
CPU550/551

50,0
16,5
8,3

4.4.1.1

T400/PM5
FM458/PM6
CPU550/551

18,0
5,9
3,0

T400/PM5
FM458/PM6
CPU550/551

0,2
0,1
0,1

TRCC_I

TRHI

A-14

Single trace header block

4.4.2.2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Typ

Designation

Computation time (s)

Capter

TRP, TRP_B, TRP_I, Single trace acquisition block


TRP_D

T400/PM5
FM458/PM6
CPU550/551

5,0
1,7
0,9

4.4.2.3

TSAV, TSAV_B,
TSAV_I, TSAV_D

TSAVE values are backed-up in the


technology save area (TSAVE area)

T400 / PM5
FM458 / PM6
CPU550 / 551

4.0
1.3
0.7

6.8.7

UDI

Up/down pulse evaluator (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

4,4
1,5
0,8

6.3.2

USF

User flags (WORD type)

T400/PM5
FM458/PM6
CPU550/551

2,0
0,7
0,4

7.13

W_B

Converter status word into 16 binary


quantities

T400/PM5
FM458/PM6
CPU550/551

16,2
5,3
2,7

5.1.16

W_BY

Status word to status byte converter

T400/PM5
FM458/PM6
CPU550/551

2,4
0,8
0,4

5.1.17

W_DW

Conversion from two 16 bit words into a


32 bit double word

T400/PM5
FM458/PM6
CPU550/551

1,5
0,5
0,3

5.1.18

WEBSFT

Measured value offset

T400/PM5
FM458/PM6
CPU550/551

15,0
5,0
2,5

9.17

XOR

XOR block (BOOL type)

T400/PM5
FM458/PM6
CPU550/551

3,2
1,1
0,6

6.1.11

XOR_W

XOR block status word (WORD type)

T400/PM5
FM458/PM6
CPU550/551

3,8
1,3
0,7

6.1.12

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

A-15

Appendix

A.2

Numerical table

I/O types and value


ranges
Numerical interpretation
Designation

Connection Explanation
type

Value range

Resolution

Binary signal

BO

Boolean quantity

Logical 0 or 1

Normal signal

Floating point
number

-3.4 E38 .. 0 .. 3.4 E38

X*1.2E-7
with X in the
value range 1)

Integer

Integer number

-32768 .. 0 .. 32767

DI

Increased accuracy

BY

Status word

00H ... FFH

Status word

0000H ... FFFFH

DW

Increased accuracy

0000H ... FFFF FFFFH

TS

Real time
(as floating-point
number)

0 ms .. 3.4 E38 ms

X*1.2E-7 ms
with X in the
value range 1)

Binar vector

Time

1)

Transfer
characteristics

1. -2.147483648 E9 .. 1
0 .. 2.147483647 E9

If X is outside the value range, then a coarser resolution can be expected

The diagrams below illustrate the value range for all SIMADYN D
connection types. The abscissa has the value of the user interface.
These values are valid when configuring with CFC, for service and
diagnostics as well as operator control and visualization using CFC
online.
The ordinates represent internal processing values. The graph shows the
conversion syntax and possible statements regarding the transformation
of values when interconnecting connectors having different
interpretations.

A-16

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Appendix

Floating-point value
R

0
Internal
processing
value

-R
-3.4 E38

3.4 E38

User interface values

Hex value

BO

BY, W

Hex value

7F

FF, FFFF

FFFF FFFF

0
FF

7F, 7FFF

7FFF FFFF

80

Hex value

I, DI

Floating-point value

7FFF,
7FFF FFFF

0
FFFF,
FFFF FFFF
8000,
8000 0000
-32768
-2.147 E9

0
0

7F
7FFF

32767
2.147 E9

FF
FFFF

Floating-point value

-R
0

DW

Hex value

-3.4 E38

7FFF FFFF FFFF FFFF

TS

-R
0

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

3.4 E38

0 ms

3.4 E38 ms

A-17

Index
@
@CPN Local coupling, central block........................................................................................... 4-77
@DPH Parameter processing central block................................................................................ 4-41
@MSC Message system central block ....................................................................................... 4-12
@TCI System trace central block................................................................................................ 4-54
@TCP Single trace, central block ............................................................................................... 4-46
@TRI Acquisition block system trace.......................................................................................... 4-57

A
ACOS Arc cosine function............................................................................................................. 2-1
ADC Analog input via A/D converter ............................................................................................. 3-2
ADD Adder .................................................................................................................................... 2-1
ADD_D Adder (Double Integer type)............................................................................................. 2-1
ADD_I Adder (Integer type)........................................................................................................... 2-1
ADD_M Modulo adder for axis cycle-correct addition................................................................... 2-2
ADDAZ adder with axis cycle limiting.......................................................................................... 9-65
AENC absolute value encoder (SSI/EnDat).................................................................................. 3-5
AND block (BOOL type) ................................................................................................................ 6-1
AND_W AND block (Word type) ................................................................................................... 6-3
AND12 AND block, status Word (Word type)................................................................................ 6-1
ANS Automatic numerical changeover switch (Real type).......................................................... 6-22
ANS_I Automatic numerical changeover switch (Integer type)................................................... 6-23
ASI Acknowledge signal (BOOL type) .......................................................................................... 7-1
ASIN Arc-sine function .................................................................................................................. 2-3
ATAN Arc-tangent function............................................................................................................ 2-3
AVA Absolute value generator with sign evaluation ..................................................................... 2-3
AVA_D Absolute value generator with sign evaluation (Double Integer type).............................. 2-4

B
B_DW Conversion, 32 binary quantities into a double word (32-bit) ............................................ 5-1
B_W Converter, 16 binary quantities into a status Word .............................................................. 5-1
BF Flash function for a binary quantity (BOOL type) .................................................................. 6-52
BF_W Flash function for a status Word (Word type) .................................................................. 6-53
BII8 Binary input .......................................................................................................................... 3-15
BIQ8 Binary output ...................................................................................................................... 3-17
BNR Binary thumbwheel switch input ......................................................................................... 5-11
BSW Binary changeover switch (Integer type)............................................................................ 6-24
BY_W Status byte to status Word converter................................................................................. 5-1

C
CAMD cam disk........................................................................................................................... 9-68
CAMSW cam block with 2 cams ................................................................................................. 9-42
CAMSW1 cam controller for time characteristics...................................................................... 9-125

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

I-1

Index

CATCH catch-up/shutdown......................................................................................................... 9-46


CCC4 Collect block process data.................................................................................................. 4-1
CDC4 Distribution block process data........................................................................................... 4-4
CLUTCH engage/disengage (coupling) .................................................................................... 9-103
CNM Controllable numerical quantity (Real type) ....................................................................... 6-33
CNM_D Controllable numerical memory (Double Integer type).................................................. 6-34
CNM_I Controllable numerical memory (Integer type)................................................................ 6-37
COS Cosine function ..................................................................................................................... 2-5
CPY_P Copying block for pointer-based processing .................................................................. 4-78
CRV receive block process data ................................................................................................... 4-7
CRV_P Telegram block, receive with pointer.............................................................................. 4-80
CTR Counter (BOOL type) .......................................................................................................... 6-17
CTV Transmit block process data ............................................................................................... 4-10
CTV_P Telegram block, sending with pointer ............................................................................. 4-83

D
D_I Double-Integer to Integer converter........................................................................................ 5-2
D_R Double Integer to real converter............................................................................................ 5-3
DAC Analog output...................................................................................................................... 3-19
DAT Function block to input/output real values in/out of a data memory (Real type)................. 6-44
DB_P Data block for pointer-based processing .......................................................................... 4-86
DEL Dead line block ...................................................................................................................... 1-1
DEZ Dead zone block.................................................................................................................... 1-3
DFR D-flipflop, R-dominant (BOOL type) ....................................................................................6-38
DFR_W Reset-dominant D flipflop (Word type) ..........................................................................6-40
DIAPRO Diagnostics DP (PROFIBUS DP coupling)...................................................................4-72
DIF Differentiator block.................................................................................................................. 1-5
DIV Divider .................................................................................................................................... 2-5
DIV_D Divider (Double Integer type)............................................................................................. 2-5
DIV_I Divider (Integer type)........................................................................................................... 2-5
DIV_R Divider (real type)............................................................................................................... 2-5
DLB Delay block (Real type) ....................................................................................................... 6-45
DPI PKW parameter block .......................................................................................................... 4-41
DRD Read blocks for pointer-based communications............................................................ 4-88
DRVIF Interface to the drive........................................................................................................ 9-92
DRVIF2 Interface to the drive.................................................................................................... 9-137
DT1 block ...................................................................................................................................... 1-7
DTS Synchronization delay time (BOOL type)............................................................................ 6-54
DW_B Conversion double word (32-bit) into 32 binary quantities ................................................ 5-3
DW_W Conversion 32-bit double word into two 16-bit words ....................................................... 5-3
DWR Write blocks for pointer-based communications ........................................................... 4-91
DX8 Demultiplexer, 8 outputs, can be cascaded (Real type)...................................................... 6-25
DX8_I Demultiplexer, 8 outputs, can be cascaded (Integer type)............................................... 6-27

E
EDC engage/disengage .............................................................................................................. 9-49
EDC1 engager/disengager........................................................................................................9-110
ENC2 Optional incremental encoder for NAVMC ..................................................................... 9-128
EPE Delete change memory ......................................................................................................... 7-2
ETE Edge evaluator (BOOL type) ............................................................................................... 6-55

I-2

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Index

F
FGEN Format generator.............................................................................................................. 10-1
FRM Formula block ..................................................................................................................... 2-16
FUI_W First-up indicator (Word type) ......................................................................................... 6-56
FUZ Fuzzy controller (Real type) ................................................................................................ 1-10
FUZ_I Fuzzy controller (INTEGER type)..................................................................................... 1-13

G
GEAR gearbox block................................................................................................................... 9-81

I
I_D Integer to Double Integer converter........................................................................................ 5-4
I_R Integer to real converter.......................................................................................................... 5-4
INT Integrator .............................................................................................................................. 1-15
INT_MR virtual master ................................................................................................................ 9-83

L
LIM Limiter................................................................................................................................... 1-18
LIM_D Limiter (Typ Double Integer)............................................................................................ 1-20
LVM Limit value monitor with hysteresis, 2 directions (BOOL type) ........................................... 6-57

M
MAS Maximum evaluator .............................................................................................................. 2-6
MCSB generating motion sequences (basis block) .................................................................. 9-115
MCSS generating motion sequences (subsequent block) ........................................................ 9-121
MDCMP compensation block for mode changeover................................................................... 9-37
MDCMP1 basic and equalization functions for Motion Control.................................................. 9-97
MER, MER_I, MER_D Message block for one activated message with measured value (R type) 428
MER0 Message block for 16 activated messages ...................................................................... 4-21
MER1 Message block for one activated message with text........................................................ 4-23
MER16 Message block for 16 activated messages with text...................................................... 4-25
MERF, MERF_I, MERF_D Message block for an activated and a de-activated message with
measured value ....................................................................................................................... 4-38
MERF0 Message block for 16 activated and de-activated messages ........................................ 4-31
MERF1 Message block for an activated and a de-activated message....................................... 4-33
MERF16 Message block for 16 activated and de-activated messages with text........................ 4-35
MFP Pulse generator (BOOL type) ............................................................................................. 6-10
MIS Minimum evaluator................................................................................................................. 2-7
MSI Message output block .......................................................................................................... 4-15
MSIPRI Message output block (printer) ...................................................................................... 4-18
MUL Multiplier................................................................................................................................ 2-8
MUL_D Multiplier (Double Integer type)........................................................................................ 2-8
MUL_I Multiplier (Integer type) ...................................................................................................... 2-8
MUX8 Multiplexer, can be cascaded (Real type) ........................................................................ 6-29
MUX8_I Multiplexer, can be cascaded (Integer type) ................................................................. 6-31

N
N2_R Conversion 16-bit fixed-point format (N2) to real................................................................ 5-5

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

I-3

Index

N4_R Conversion, 32-bit fixed-point format (N4) to real ............................................................... 5-6


NAND block (BOOL type).............................................................................................................. 6-4
NATCON Natural constants .......................................................................................................... 2-9
NAV speed/position actual value sensing ................................................................................... 3-21
NAVDP Position actual value sensing....................................................................................... 9-131
NAVMC speed/position actual value sensing ............................................................................. 9-54
NAVS speed/position/position difference sensing....................................................................... 3-29
NCM Numerical comparitor (Real type) ......................................................................................6-21
NCM_D Numerical comparator (Double Integer type) ................................................................ 6-21
NCM_I Numerical comparator (Integer type) ..............................................................................6-21
NOP1 Dummy block (Real type) ................................................................................................. 6-58
NOP1_B Dummy block (BOOL type) ..........................................................................................6-59
NOP1_D Dummy block (Double Integer type) ............................................................................6-59
NOP1_I Dummy block (Integer type) .......................................................................................... 6-59
NOP8 Dummy block (Real type) ................................................................................................. 6-59
NOP8_B Dummy block, 8 binary quantities (BOOL type)........................................................... 6-59
NOP8_D Dummy block, 8 4-byte quantities (Double Integer type)............................................. 6-59
NOP8_I Dummy block, 8 Word quantities (Integer type) ............................................................ 6-60
NOR block (BOOL type) ................................................................................................................ 6-4
NOT Inverter (BOOL type)............................................................................................................. 6-4
NOT_W Inverter status Word (Word type) .................................................................................... 6-4
NSW Numerical changeover switch (Real type) ......................................................................... 6-24
NSW_D Numerical changeover switch (double Integer type) ..................................................... 6-24
NSW_I Numerical changeover switch (Integer type) .................................................................. 6-24

O
OFSGEN offset input................................................................................................................... 9-79
OFSSAV offset calculation .......................................................................................................... 9-77
OR block (BOOL type)................................................................................................................... 6-5
OR_12 OR logic gate, status word (WORD type) ......................................................................... 6-5
OR_W OR block, status Word (Word type)................................................................................... 6-6
OVFHSK overflow handshake procedure ................................................................................... 9-87

P
PAC Process interrupt counter.................................................................................................... 6-64
PAI Process interrupt, periphery input.........................................................................................6-66
PAS Process interrupt software .................................................................................................. 6-68
PC P controller ............................................................................................................................ 1-22
PCL Pulse contractor (BOOL type) ............................................................................................. 6-11
PDE Switch-on delay (BOOL type) ............................................................................................. 6-12
PDF Switch-off delay (BOOL type).............................................................................................. 6-13
PHSFT phase shifter ................................................................................................................... 9-63
PIC PI controller .......................................................................................................................... 1-25
PIN8 Priority evaluator................................................................................................................. 6-60
PLI10 Polygon curve, 10 points................................................................................................... 2-10
PLI20 Polygon curve, 20 breakpoints.......................................................................................... 2-12
PNO CPU number (INTEGER type).............................................................................................. 7-3
POSMC positioning block............................................................................................................ 9-74
POSREG Position register reading ............................................................................................. 9-61
PSL Processor utilization (Real type)............................................................................................ 7-4
PST Pulse extender (BOOL type) ............................................................................................... 6-15
PT1 element ................................................................................................................................ 1-34
PWM Pulse-width modulator ....................................................................................................... 1-36

I-4

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Index

R
R_D Real to Double Integer converter .......................................................................................... 5-7
R_I Real to Integer converter ........................................................................................................ 5-7
R_N2 Conversion, real to 16-bit fixed-point format....................................................................... 5-8
R_N4 Conversion, real to 32-bit fixed-point format....................................................................... 5-9
RCVT5 Receive block ............................................................................................................... 9-142
RFG Ramp function (REAL type) .................................................................................................. 7-6
RGE Ramp-function generator.................................................................................................... 1-45
RGJ Ramp-function generator with jerk limiting.......................................................................... 1-53
RSR RS flipflop, R-dominant (Integer type) ................................................................................ 6-41
RSS RS flipflop, S-dominant (BOOL type).................................................................................. 6-42
RTCABS Date and time output ................................................................................................... 4-58
RTCREL Relative time output ..................................................................................................... 4-59

S
S7AMA User data area alarmmessages..................................................................................... 4-67
S7EMA User data area eventmessages ..................................................................................... 4-65
S7FKA User data area functionkeyarea...................................................................................... 4-70
S7IA User data area interfacearea.............................................................................................. 4-62
S7OS OS-Communication .......................................................................................................... 4-60
SAV Value buffer (Real type) ...................................................................................................... 6-46
SAV_B Value buffer (BOOL type) ............................................................................................... 6-47
SAV_D Value buffer (Double Integer type) ................................................................................. 6-48
SAV_I Value buffer (Integer type) ............................................................................................... 6-49
SBI Status byte input................................................................................................................... 3-38
SBQ Status byte output............................................................................................................... 3-40
SER Service block......................................................................................................................... 7-9
SFC control block .......................................................................................................................... 8-1
SFCSI SFC step information block ............................................................................................... 8-6
SFCTI SFC transition information block...................................................................................... 8-10
SH Shift block (Word type) .......................................................................................................... 6-62
SHEAR cross-cutter/cross sealer.............................................................................................. 9-107
SII Inverter ................................................................................................................................... 2-14
SIN Sine function......................................................................................................................... 2-14
SNDT5 Send block.................................................................................................................... 9-145
SPLINE cam disk with 32 points (calculation)............................................................................. 9-66
SQG Square-wave generator (Real type) ................................................................................... 7-11
SQGB Clock generator for binary signals (BOOL type).............................................................. 7-13
SQR Square-root extractor.......................................................................................................... 2-14
SSD Output on 7-segment display (Word type) .......................................................................... 7-15
STATIS Statistical evaluation ...................................................................................................... 10-6
STG Step function (REAL type) .................................................................................................. 7-16
SUB Subtractor ........................................................................................................................... 2-15
SUB_I Subtractor (Integer type) .................................................................................................. 2-15
SWB_DW Byte reverser for double-Word inputs ........................................................................ 5-14
SWB_W Byte reverser for Word inputs....................................................................................... 5-16
SWBI Byte reverser for real-type inputs...................................................................................... 5-18
SWBO Byte reverser for real outputs.......................................................................................... 5-20
SYF1 System error field (Word type, 1 word long)...................................................................... 7-18
SYF4 System error field (Word type, 4 words long).................................................................... 7-21
SYNPRO SYNC/FREEZE DP (PROFIBUS DP coupling) .......................................................... 4-74

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

I-5

Index

T
TAB, TAB_D Tabular values manager ....................................................................................... 9-89
TABCAM cam disk in tabular form .............................................................................................. 9-71
TAN Tangent function.................................................................................................................. 2-15
TRACK Cut optimization for cross-cutters................................................................................... 10-8
TRCC, TRCC_I, TRCC_D Analog trace acquisition block .......................................................... 4-42
TRHI Single trace, header block ................................................................................................. 4-50
TRP, TRP_B, TRP_I, TRP_D Single trace acquisition block ...................................................... 4-52
TSAV, TSAV_B, TSAV_I, TSAV_Dvalues are backed-up in the technology save area (TSAVE
area)......................................................................................................................................... 6-50

U
UDI Up/down pulse evaluator (BOOL type) ................................................................................6-19
USF User flags (Word type) ........................................................................................................ 7-24

W
W_B Converter, status Word into 16 binary quantities ............................................................... 5-10
W_BY Status Word to status byte converter............................................................................... 5-10
W_DW Conversion from two 16-bit words into a 32-bit-double word ......................................... 5-10
WEBSFT measured value offset ................................................................................................. 9-85

X
XOR block (BOOL type) ................................................................................................................ 6-7
XOR_W XOR block, status Word (Word type).............................................................................. 6-8

I-6

Function Blocks - T 400, FM 458-1 DP, SIMADYN D, SIMATIC TDC


Edition 12.2004

Potrebbero piacerti anche