Você está na página 1de 163

SIMATIC Converting Toolbox

SIMATIC

Application August 2014

Applications & Tools


Answers for industry.
Siemens Industry Online Support
This article is taken from the Siemens Industry Online Support. The following link
takes you directly to the download page of this document:
http://support.automation.siemens.com/WW/view/en/58565043

Caution
The functions and solutions described in this article confine themselves to the
realization of the automation task predominantly. Please take into account
furthermore that corresponding protective measures have to be taken up in the
context of Industrial Security when connecting your equipment to other parts of the
plant, the enterprise network or the Internet. Further information can be found
under the Item-ID 50203404.
http://support.automation.siemens.com/WW/view/en/50203404
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 2
s Application Description 1

Technology overview 2

Integration 3

Functional Description 4
SIMATIC
SIMATIC Converting Toolbox Application example as
5
demonstration system
Winder and line tension control
Related literature 6

Contact 7
Siemens AG 2014 All rights reserved

History 8
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 3
Warranty and liability

Warranty and liability


Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. These application examples do not
relieve you of the responsibility to use safe practices in application, installation,
operation and maintenance. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time without prior notice.
If there are any deviations between the recommendations provided in these
application examples and other Siemens publications – e.g. Catalogs – the
contents of the other documents have priority.

We do not accept any liability for the information contained in this document.

Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
Siemens AG 2014 All rights reserved

not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
(“wesentliche Vertragspflichten”). The damages for a breach of a substantial
contractual obligation are, however, limited to the foreseeable damage, typical for
the type of contract, except in the event of intent or gross negligence or injury to
life, body or health. The above provisions do not imply a change of the burden of
proof to your detriment.
Copyright

Any form of duplication or distribution of these Application Examples or excerpts


hereof is prohibited without the expressed consent of Siemens Industry Sector.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 4
About this Document

About this Document


Targeted Readers
The SIMATIC Converting Toolbox is intended for programmers who would like to
develop and implement programs for converting machines based on the SIMATIC
controller family and SINAMICS drives.
Basic know-how about SIMATIC, S7-SCL and SINAMICS is required to
successfully use the toolbox.
The knowledge of terminology and operating principles for converting, tension
control, winding and control theory is necessary.

Main Contents
The documentation gives a detailed overview about each implemented function or
function block which are ready to apply.
The toolbox contains functions and function blocks from ranging from simple handy
functions to sophisticated solution for tension control and winding.

Limitations
The documentation does not discuss the properties of different S7 platform nor
does it discuss how SINAMICS drives are operated.
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 5
Table of contents

Table of contents
Warranty and liability ............................................................................................... 4
About this Document ............................................................................................... 5
1 Application Description ................................................................................. 8
1.1 Area of Application ............................................................................ 8
1.1.1 Segment, Machine, Unit Description .................................................. 8
1.1.2 Scope of Application .......................................................................... 8
1.2 Objectives ......................................................................................... 8
1.2.1 Task .................................................................................................. 8
1.2.2 Advantages ....................................................................................... 8
1.3 Automation and Drive Overview ......................................................... 9
1.3.1 System Requirements ....................................................................... 9
1.3.2 Scope of Supply ................................................................................ 9
2 Technology overview ................................................................................... 10
2.1 Tension control principles ................................................................ 10
2.2 Winder related functions .................................................................. 17
3 Integration..................................................................................................... 20
3.1 Integration into a User Program ....................................................... 20
Siemens AG 2014 All rights reserved

4 Functional Description ................................................................................. 22


4.1 Tools ............................................................................................... 22
4.1.1 ReadCycleTime – Determining the cycle time .................................. 22
4.1.2 Linear – linear interpolation .............................................................. 22
4.1.3 TableChar – Non linear characteristic .............................................. 23
4.1.4 RFG – Ramp-function generator ...................................................... 26
4.1.5 RFGJ – Ramp-function generator with rounding-off .......................... 31
4.1.6 CalcStopDistance ............................................................................ 36
4.2 Logic function blocks ....................................................................... 37
Copyright

4.2.1 F_TRIG ........................................................................................... 37


4.2.2 R_TRIG ........................................................................................... 38
4.2.3 TRIG ............................................................................................... 39
4.3 Conversion function blocks .............................................................. 40
4.3.1 BytesIntoWord ................................................................................. 40
4.3.2 BitsIntoByte ..................................................................................... 41
4.3.3 BitsIntoWord .................................................................................... 42
4.3.4 WordIntoBytes ................................................................................. 43
4.3.5 ByteIntoBits ..................................................................................... 43
4.3.6 WordIntoBits .................................................................................... 44
4.4 Scaling function blocks .................................................................... 46
4.4.1 ScalingDWDRL................................................................................ 46
4.4.2 ScalingRLDWD................................................................................ 47
4.4.3 ScalingWDRL .................................................................................. 47
4.4.4 ScalingRLWD .................................................................................. 48
4.4.5 Scaling ............................................................................................ 49
4.5 Closed-loop function blocks ............................................................. 50
4.5.1 PT1 – PT1 filter................................................................................ 50
4.5.2 ReadAnalogInput ............................................................................. 52
4.5.3 Differentiator .................................................................................... 53
4.5.4 Integrator ......................................................................................... 54
4.5.5 DT1 – DT1-filter ............................................................................... 57
4.5.6 Limiter – Limiter with feedback signal ............................................... 59
4.5.7 LevelControl – Limit value monitor ................................................... 61
4.5.8 DeadBand – Dead-band filter........................................................... 63

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 6
Table of contents

4.5.9 DeadZone – Dead-zone filter ........................................................... 64


4.5.10 AverageValue – Average-value filter ............................................... 66
4.5.11 PID – PID-controller ......................................................................... 68
4.5.12 TPID – PID-controller with setpoint channel ..................................... 74
4.6 Drive related function blocks ............................................................ 80
4.6.1 DriveControl .................................................................................... 80
4.6.2 SetpointChannel .............................................................................. 88
4.6.3 FrictionMeasurement – Friction characteristic measurement ............ 92
4.7 Sectional Drive ................................................................................ 95
4.7.1 SectionalConfigSetup ...................................................................... 95
4.7.2 TorquePrecontrol ............................................................................. 97
4.7.3 SectionalDrive ............................................................................... 102
4.8 Winder function blocks................................................................... 109
4.8.1 DiamCalcDivision .......................................................................... 109
4.8.2 DiamCalcIntegral ........................................................................... 112
4.8.3 DiamCalcAddition .......................................................................... 116
4.8.4 WITorquePrecontrol....................................................................... 119
4.8.5 RestLengthCalc ............................................................................. 124
4.8.6 RestDiameterCalc ......................................................................... 126
4.8.7 Taper............................................................................................. 127
4.8.8 WinderConfigSetup........................................................................ 131
4.8.9 Winder........................................................................................... 135
4.9 Overview of Structures................................................................... 143
4.9.1 SectionalConfigType...................................................................... 143
Siemens AG 2014 All rights reserved

4.9.2 WinderConfigType ......................................................................... 144


5 Application example as demonstration system ........................................ 147
5.1 Installing the hardware and software .............................................. 147
5.1.1 Regarding your safety.................................................................... 147
5.1.2 Hardware structure and mounting/installation ................................. 149
5.1.3 Installing the standard SIEMENS software ..................................... 149
5.1.4 Downloading the user program and the drive parametrization
into the devices.............................................................................. 150
Copyright

5.2 Using the application example ....................................................... 152


5.2.1 Brief instructions to demonstrate .................................................... 152
5.2.2 Detailed operating instructions ....................................................... 156
6 Related literature ........................................................................................ 162
6.1 Bibliography................................................................................... 162
6.2 Internet link specifications .............................................................. 162
7 Contact........................................................................................................ 163
8 History ........................................................................................................ 163

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 7
1 Application Description
1.1 Area of Application

1 Application Description
1.1 Area of Application
1.1.1 Segment, Machine, Unit Description

The "Converting Toolbox" is intended to provide SIMATIC users with help when
engineering and programming converting machinery. The Converting Toolbox
provides standards that can be adapted depending on the particular machine and
application. These standards cover the typical basic functions of a converting
machine. The functions available are open source. The appropriate interfaces are
provided to make adaptations depending on the specific machine and application.
These interfaces are described in detail in the following documentation. Changes
to these standard functions should only be made in exceptional cases.

1.1.2 Scope of Application

The SIMATIC Converting Toolbox can be used for the widest range of applications,
e.g.:
Foil & film machines
Siemens AG 2014 All rights reserved

Printing machines
Coating machines
Paper-finishing machines
Wire-drawing machines
Textile machines
Post-printing machines
Copyright

1.2 Objectives
1.2.1 Task

The SIMATIC Converting Toolbox is intended to offer a comprehensive solution for


the converting industry to quickly implement typical machine functions.
The Toolbox consist of simple building blocks which can be helpful for any machnie
and also includes complete solutions to fulfill the demanding requirements of
winders, tension controlled sections and material transport.

1.2.2 Advantages

The SIMATIC Converting Toolbox is an open source solution, which contrary to


black-box solutions, allows the user to modify or expand its functionality if
necessary. With the use of the Toolbox programming and commissioning can be
speeded up as the tasks will be shifted from programming to parameterization.
The Toolbox is documented and updated on a regular basis.
The Toolbox is available free of charge.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 8
1 Application Description
1.3 Automation and Drive Overview

1.3 Automation and Drive Overview


1.3.1 System Requirements

The SIMATIC Converting Toolbox is intended to be used with SIMATIC S7-300,


S7-400 and S7-1200 series PLCs.
As the Toolbox is available as a SCL source file an additional license is required in
order to use the SCL editor.
The package is intended to be used with SINAMICS S120, S150 and G120 series
drives.

1.3.2 Scope of Supply

The SIMATIC Converting Toolbox consists of the following components:


SCL source file of the implemented functions, function blocks and user defined
types.
A configuration Script to be used with the drive commissioning tool STARTER
or SCOUT to set up the communication interface with the respective drives.
Documentation of the implemented functions, function blocks and user defined
Siemens AG 2014 All rights reserved

types.
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 9
2 Technology overview
2.1 Tension control principles

2 Technology overview
2.1 Tension control principles
Generally the mechanical system in which tension or dancer position control is
necessary consists of the material web which needs to be controlled, of a motor
which drives the web and of an equipment which is used to set or measure the web
tension.
Typical machines with tension control are for example coating lines, rewinders,
slitters, narrow web machines usually running with materials like paper, laminates,
wire, foil and film (plastic or metal), textiles or cables.
Siemens AG 2014 All rights reserved

The task of the controlled motor is to:


transport the material with the defined machine velocity
hold or control the setpoint tension in order to avoid tension drops or increases
the motor is typically connected via a gearbox to a roll which is used to transmit
tension and velocity to the material web. It must be ensured that the roll
surface and the roll surface contact area can transmit the desired tension
effectively to avoid slippage and tension drop. Additional mechanical elements
Copyright

may be required (nips, s-rolls, etc.). The roll diameter is typically constant.
In case of simple concepts the tension is only set and not controlled. This
means that the speed setpoint of the motor is preset and the tension is defined
by the friction between the material and the roll surface.
If a more sophisticated tension control is required then the system must be
amended to include a tension measuring cell or a dancer system. Closed-loop
tension control and dancer control require a controller – in this document
referenced as the technology controller or TPID. The technology controller is
realized as a PID controller which includes setpoint conditioning and jerk-free
switch-on functionality.

Dancer system
A dancer control system is a position based measuring system, which is used to
set the material tension. In conjunction with a dancer the motor controls the
position instead of the tension. Typically the system is designed so that the dancer
normally sits in the cenres position during production. The position of the dancer is
controlled by the drive, with the change of the speed setpoint.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 10
2 Technology overview
2.1 Tension control principles

+
sact
P -
U

In the simplest design the dancer is tensioned using a spring, and therefore the
tension varies as the dancer roll moves. More complex systems can consist of
pressure controlled cylinders in order to maintain a constant tension even if the
dancer roll is deflected.

Load cell
With tension measuring the material tension is directly measured for example using
a load cell. The measured value is interpreted by the technology controllers
algorithm and is used to adjust the speed or torque setpoint of the drive.
Siemens AG 2014 All rights reserved

Inertia compensation and torque pre-control


Copyright

When the material web is being accelerated and decelerated an additive torque
can be switched to the drive in order to respond dynamically (quickly) to velocity
changes.
The inertia compensation method avoids tension dips or tension increases due to
velocity change. This pre-control is required, especially for indirect tension control
but also for tension control with a load cell.
Apart from the acceleration torque the torque pre-control has two other
components:
Tension torque, a function of the set tension, gear ratio and actual diameter
Friction torque from the friction characteristic

Draw Control
Using this method the web tension is set via the web segments velocity ratio,
meaning that the velocity of the transport rolls at the segment beginning is slower
than at the segment end. The velocity difference causes material tension, which in
turn defines the web tension. The resulting tension depends on the material type,
the friction between the material and the transport roll (slip) and the transport
system itself.
v OUT - v IN
T2 T1 C
v IN

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 11
2 Technology overview
2.1 Tension control principles

This method is used for simple tension control, especially when an additional
measuring system is not available or is to be avoided, but it does not offer high
level tension accuracy. This method cannot be used with axial winders.
Siemens AG 2014 All rights reserved
Copyright

Tension control with dancer roll


In the case of dancer control, in comparison to tension control with a load cell, it is
not the tension that is controlled but the dancer position. The web tension is set by
the dancer system itself. The actual dancer position is measured using an encoder
or potentiometer. Position control is based on the difference between the setpoint
and the actual position. The controller output is used as additional velocity setpoint
in order to maintain the setpoint position.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 12
2 Technology overview
2.1 Tension control principles
Siemens AG 2014 All rights reserved
Copyright

Indirect tension control


With this method the web tension is set on the basis of the process parameters.
There is no measuring system necessary as there is no feedback used to control
the tension. To set the web tension the tension setpoint is converted into a torque
setpoint which is based on the roll diameter and the gear ratio. The motor is driven

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 13
2 Technology overview
2.1 Tension control principles

using this torque setpoint. Friction and acceleration compensation are absolutely
necessary to achieve accurate web tension control.
When using this control method is must be ensured that the gear ratio of the
system is kept as low as possible. This includes good motor selection and the
selection of a highly efficient gearbox with low friction losses.
Siemens AG 2014 All rights reserved
Copyright

Tension control with a load cell and torque limiting


Compared with indirect tension control the mechanical system is expanded using a
web tension measuring device, which is used to give feedback to the

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 14
2 Technology overview
2.1 Tension control principles

superimposed tension controller. The controller output is interpreted as an


additional torque setpoint for the controlled axis. Tension control is used if the
accuracy of the indirect tension control is not sufficient, for example if the losses in
the transmission system are not known or there are disturbances in the system
which need to be eliminated.
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 15
2 Technology overview
2.1 Tension control principles

Tension control with a load cell and velocity correction


Compared with indirect tension control the mechanical system is expanded using a
web tension measuring device which is used to give feedback to the superimposed
tension controller. The controller output is interpreted as an additional speed
setpoint for the controlled axis. Tension control is used if the accuracy of the
indirect tension control is not sufficient, for example if the losses in the transmission
system are not known or there are disturbances in the system which need to be
eliminated.
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 16
2 Technology overview
2.2 Winder related functions

V-constant control
In this mode the winder will be controlled by the line set velocity without override. The tension
will be build up by a nip – the winder build up a holding torque to hold its set velocity.
Siemens AG 2014 All rights reserved

For the diameter calculation the line actual velocity is necessary. This value will be detected by
Copyright

a tachometer. If a line axis with nip is available the set velocity of this axis can be used also to
control the winder in this mode.

The interconnection of the line actual velocity is done with the input variable
<lineActualVelocity> of the winder function block.

2.2 Winder related functions


In general a winder solution comprises of a winder drive, a material web and
possibly sensors. The function of a winder is to unwind or rewind a material web
with a defined tension. When winding the diameter changes. Depending on
whether it involves an unwinder or rewinder, the material is unwound or wound.
The motion control system calculates the actual diameter using several system
variables and controls the motor speed so that the tension of the material web is
kept constant. To do this, the actual velocity of the material web and the speed of
the winder shaft must be known. If the system must fulfill higher demands
regarding the performance and tension accuracy, then an appropriate range of
sensors must be added to the winder solution.

Surface (contact) winder


With a surface winder the roll is driven by one or several rolls that are in contact
with the roll being wound. The drive speed and power depend on the diameter of

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 17
2 Technology overview
2.2 Winder related functions

the roll being wound. From a mechanical design perspective this winding technique
is more complicated than that of a center winder.

The surface (contact )winder is used if there are no special requirements placed on
the surface quality of the material being wound.

Center (axial) winder


With a center (axial) winder the roll is driven by a central shaft. The diameter range
is an important factor when designing this winder type. The reason for this is that
for constant web velocity and constant tension, the speed is inversely proportional
to the diameter. This means that the maximum required drive speed is defined by
the minimum roll diameter – whereby the maximum required torque is defined by
Siemens AG 2014 All rights reserved

the maximum diameter.


Copyright

The center winder is more complicated and, from a control perspective more
difficult to handle than the surface winder; however it is still the more widely
established of the two winder types.

Diameter calculation
The following different methods can be used to calculate the diameter of the roll
being wound:
Using the ratio between the velocity of the material web and the winder speed
By adding the material thickness
Using an external sensor
Using the ratio between the material length and the number of revolutions of
the winder (integration)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 18
2 Technology overview
2.2 Winder related functions

Tension taper
A tension taper characteristic is required if the tension, with which the material is to
be wound, is to be decreased as the diameter of the roll being wound increases. 5
different methods are available to calculate the tension taper characteristic:
No characteristic
Linear characteristic – the tension is reduced linearly as a function of the actual
diameter
Hyperbolic characteristic type 1 – the tension decreases according to a
hyperbolic function/characteristic
Hyperbolic characteristic type 2 – the tension decreases according to a
hyperbolic function/characteristic
Interpolated characteristic using a table of points

Controller adaptation
The gain of the technology controller can be adapted as a function of the diameter.
This permits higher controller gain at larger diameters.
The speed controller gain in the drive can be adapted as a function of the moment
Siemens AG 2014 All rights reserved

of inertia or the actual diameter of the roll being wound. This is necessary so that a
full roll can also be rapidly accelerated or decelerated
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 19
3 Integration
3.1 Integration into a User Program

3 Integration
3.1 Integration into a User Program
Importing the source code
The SCL source file of the SIMATIC Converting Toolbox (S7LConLib.scl) can be
imported into the user project using the Step7 manager.

Step Screenshot

Open Sources in the project


tree

After a right click select Insert


New Object > External
Source…

Select the S7LConLib.scl


Siemens AG 2014 All rights reserved

source file and import it


Copyright

SCL editor settings


All blocks in the SIMATIC Converting Toolbox have symbolic names and therefore
an appropriate symbol table needs to be generated. To do this set up the SCL
editor to create block numbers automatically during compilation.

Step Screenshot

Go to options and select


Customize… or push Ctrl +
Alt + E
On the first tab click and
activate the Create
block numbers
automatically option.
After compilation the
symbol table can be
adjusted if necessary.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 20
3 Integration
3.1 Integration into a User Program

Compile the source code


The imported SCL source code is ready to be compiled. After compilation the
blocks are ready to be used in the user program. The SCL source can either be
compiled in the Step7 manager or in the SCL editor itself.

Step Screenshot

Select the source in the Step7


manager, open the option
menü by a right click and
select compile or push Ctrl + B

The SCL editor will be opened


and the source will be compiled.

As an alternative you can also


Siemens AG 2014 All rights reserved

compile the source code in the


SCL editor using the buttons or by
pushing Ctrl + B.
In the SCL editor selective
compilation is also possible.
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 21
4 Functional Description
4.1 Tools

4 Functional Description

4.1 Tools
4.1.1 ReadCycleTime – Determining the cycle time

Determine the cycle time of the calling OB.


The function can be called in any task. ID: 1001

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and Output Parameters


Name Type Data type M/O Initial value Description

RET_VAL OUT REAL - - [ ms ] The actual cycle time of the task in REAL
format.
If the function outputs a 0.0, the block is not
called in a cyclic task (OB30-OB38).
Copyright

Functionality
The function determines the cycle time of the calling OB by using the system
function SFC6 (RD_SINFO). The cycle time of the OB is the return value in REAL
format.
If the return value is 0.0 the function is not called in a cyclic task.

4.1.2 Linear – linear interpolation

Linear interpolation between two breakpoints


The function can be called in any task. ID : 0001.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 22
4 Functional Description
4.1 Tools

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M 0.0 Input value

X1 IN REAL M 0.0 First breakpoint, x value

Y1 IN REAL M 0.0 First breakpoint, y value

X2 IN REAL M 0.0 Second breakpoint, x-value


Siemens AG 2014 All rights reserved

Y2 IN REAL M 0.0 Second breakpoint, y value

RET_VAL OUT REAL - - Output value

Functionality
Using the breakpoints entered, this function determines the matching Y coordinate
of the coordinate present at input x. The interpolated Y coordinate is provided as a
return value of the function. The input point x is limited by the coordinates X1 and
X2. If the coordinates X1 and X2 are equal, 0.0 is displayed as return value and no
Copyright

interpolation is performed.
X X1
RET _ VAL * Y 2 Y1 Y1
X 2 X1

Graphical representation

4.1.3 TableChar – Non linear characteristic

Interpolation from breakpoint table


The function block can be called in any cyclic task. ID: 0106

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 23
4 Functional Description
4.1 Tools

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

enable IN BOOL M - TRUE: Function block activation


FALSE: function block deactivation

x IN REAL M - Input value

dbPointer IN ANY M - Pointer to breakpoint table data block with


REAL elements:
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Siemens AG 2014 All rights reserved

Offset: 8 REAL x2 value


Offset: 12 REAL y2 value
.. .. .. ..

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to
error identification

errorID OUT DWORD - 16#0000_0000 Error identification, refer to error messages


errorID 16#0000_8000: Warning
Copyright

errorID 16#0000_8000: Error

y OUT REAL - 0.0 Output value

busy OUT BOOL - FALSE TRUE: Function block active


FALSE: Function block inactive

Functionality
The function blocks adapts the output value y corresponding to the input value x
based on a breakpoint table of variable size. Between the breakpoints the values
are interpolated linearly.
The purpose of the function block is to e.g.:
Linearize characteristic curves
Simulation of non-linear transfer elements
The minimum number of breakpoint elements is two. The x values of the curve
must increase monotonically, the y values have no limitation. The total number
of breakpoints is defined by the size of the data reference. The data type of the
addressed data area must be REAL. Is x is less than the x value of the first
coordinate, the output y value will maintain the level of the y value of the first
coordinate. The same applies if x is larger than the last x coordinate of the
table.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 24
4 Functional Description
4.1 Tools

Graphical representation
Siemens AG 2014 All rights reserved

Warning messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
ErrorID Description
Copyright

16#0000_0000 No warning

16#0106_4005 The table of entered values is not monotonically (steadily)


increasing -> no matching value found

16#0106_4008 The table of entered values is not monotonically (steadily)


increasing -> 2 values are identical

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#0106_8003 Less than two pairs of values in the breakpoint table or uneven
number of points.

16#0106_8005 Invalid configuration data:


Pointer is not addressing a data block

16#0106_84A1 Data block number bigger than allowed or zero (SFC 24 /


TEST_DB)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 25
4 Functional Description
4.1 Tools

ErrorID Description

16#0106_84B1 Data block not existent (SFC 24 / TEST_DB)

16#0106_84B2 Data block unlinked (SFC24 / TEST_DB)

4.1.4 RFG – Ramp-function generator

Ramp function generator with motor potentiometer and follow-up operation –


without rounding
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1106

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M 0.0 Input quantity

nominalValue IN REAL M 1.0 Normalization value

upperLimit IN REAL M 0.0 Upper limit value

lowerLimit IN REAL M 0.0 Lower limit value

setValue IN REAL O 0.0 Setting value

rampUpTime IN REAL M 0.0 [ ms ] Ramp-up time


[ cycle time – MAX_RAMP_TIME_MS]

rampDownTime IN REAL M 0.0 [ ms ] Ramp-down time


[ cycle time – MAX_RAMP_TIME_MS]

set IN BOOL O FALSE FALSE: Normal ramp calculation


TRUE: Output is set to setValue

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 26
4 Functional Description
4.1 Tools

Name Type Data type M/O Initial value Description

followup IN BOOL M FALSE TRUE: Normal ramp calculation

increase IN BOOL O FALSE FALSE: Normal ramp calculation


TRUE: Increase output with change
rate

decrease IN BOOL O FALSE FALSE: Normal ramp calculation


TRUE: Decrease output with change
rate

error OUT BOOL FALSE FALSE: No error


TRUE: An error has occurred, refer to
error identification

errorID OUT DWORD 16#0000_0 Error identification, refer to error


000 messages
errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

y OUT REAL 0.0 Output value

ya OUT REAL 0.0 [ - / cycle ] Acceleration value

SetpointReached OUT BOOL FALSE FALSE: Setpoint calculation active


Siemens AG 2014 All rights reserved

TRUE: Setpoint (input x) reached

upperLimit OUT BOOL FALSE FALSE: Upper limit value not reached
Reached TRUE: Upper limit value reached

lowerLimit OUT BOOL FALSE FALSE: Lower limit value not reached
Reached TRUE: Lower limit value reached

Functionality
Copyright

The function block includes an integrator with two integration time constants that
can be set independently of each another. Output y changes according to the
following algorithm:
Fehler! Es ist nicht möglich, durch die Bearbeitung von Feldfunktionen
Objekte zu erstellen.
The change rate ya is calculated separately for the up ramp and down ramp. An up
ramp is when the output value y moves away from zero. A down ramp is when the
output value y approaches zero.
For the change rate when ramping-up the following applies:
cycleTime
YA * no min alValue für Y 0
rampupTime
cycleTime
YA * no min alValue für Y 0
rampupTime

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 27
4 Functional Description
4.1 Tools

For the change rate when ramping-down the following applies:


cycleTime
YA * no min alValue für Y 0
rampdownTime
cycleTime
YA * no min alValue für Y 0
rampDownTime
The changeover between ramp-up time and ramp-down time is realized when the
direction changes or at the zero crossover of the transfer function. Depending on
the logical states of the control inputs set, follow-up, increase and decrease, the
operating mode is specified by the control logic. The output quantity can be limited
using inputs upperLimit and lowerLimit. When the set limits are reached the binary
outputs, upperLimitReached or lowerLimitReached, are set to TRUE. Binary output
setpointReached is TRUE if y=x.

Ramp-up time and ramp-down times


The ramp-up time rampupTime is the time in which the absolute value of the output
quantity increases by nominalValue.
The ramp-down rampdownTime is the time in which the absolute value of the
output quantity decreases by nominalValue.
The ramp-up time and ramp-down time can be selected to be different. The lower
Siemens AG 2014 All rights reserved

cycleTime/rampupTime or cycleTime/rampDownTime and the lower the amplitude


change at y from one sampling instant to the next.

Priority of control inputs


For the control inputs, the following priority sequence applies:
set before followup before increase and decrease
Copyright

set = 1 Setting value setValue is loaded into the integrator, non-integrating

followup = 1 Output y integrating to setpoint x, tracking

Increase = 1 Output y integrating torques upperLimit, tracking

decrease = 1 Output y integrating torques lowerLimit, tracking

Operating modes and control of the ramp-function generator


The combination of commands at the control inputs and the possible operating
modes can be taken from the truth tables.
Standard ramp-function generator operation involves lowerLimit 0 upperLimit
and lowerLimit < yn < upperLimit. However, other settings are also possible:
For the setting with lowerLimit upperLimit, the following applies: Limit upperLimit
is dominant with respect to limit lowerLimit.
If output y reaches one of the set limits lowerLimit or upperLimit, during the control
sequence, the integrator value is held. Output value y is then kept constant until
the integrator value leaves the limit due to a change of the input quantities.
If the integrator is at the limit and the limit value is changed the integrator behaves
differently depending on the direction in which the limit value was changed.
If the absolute value of a limit value is increased, and if the control logic specifies
that the ramp-function generator should run in the same direction, then the
integrator integrates from the previously defined value according to the selected
ramp-up time until the output once again reaches the limit value.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 28
4 Functional Description
4.1 Tools

If the absolute value of a limit value is reduced, the integrator integrates from the
previously held value – according to the selected ramp-down time – until the output
once again reaches the limit value.
The integrator operates internally with increased accuracy so that even for small
setpoint-actual value differences it still integrates. However, it should be carefully
noted that the sampling time is sufficiently low compared to the ramp-up or ramp-
down time.
rampupTime and rampdownTime are internally limited:
rampupTime cycleTime, rampdownTime cycleTime

set Follow Inc Dec Yan yn Mode Comment


up

0 0 0 0 0 yn-1 Stop y is constant

1 1 1 1 Step setValuen Sets output to setValue is any


setValue value, fixed or
variable

0 1 1 1 cycleTime / yn-1+yan Normal rampupTime for


rampupTime; operation [x > y y 0]
Siemens AG 2014 All rights reserved

cycleTime / x [x < y y 0]
ramp rampdownTime for
downTime [x > y y < 0]
[x < y y > 0]

0 0 1 0 cycleTime / yn-1+yan Approach the rampupTime,


rampup Time upper limit rampdownTime as
(cycleTime / value before, dependent
rampdown upperLimit on the starting
Time) (initial) position
Copyright

0 0 0 1 cycleTime / yn-1+yan Approach the rampupTime,


rampdown lower limit rampdownTime as
Time value before, dependent
(cycleTime / lowerLimit on the starting
rampup (initial) position
Time)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 29
4 Functional Description
4.1 Tools

Timing diagram - Motor potentiometer


Siemens AG 2014 All rights reserved

Timing diagram - Normal operation


Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 30
4 Functional Description
4.1 Tools

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1106_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

4.1.5 RFGJ – Ramp-function generator with rounding-off

Ramp-function generator with ramp-up, ramp-down times and rounding-off


The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1107

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input parameters
Name Type Data M/O Initial value Description
type

run IN BOOL M FALSE FALSE: Function block de-activated


TRUE: Function block activated

enable IN BOOL M FALSE FALSE: No calculation


TRUE: Function block enabled

mode IN BOOL O TRUE FALSE: Fast stop ramp


(fastRampDownTime)
TRUE: Normal sequence
(rampDownTime)

enable IN BOOL O TRUE FALSE: Without rounding-off


Rounding TRUE: With rounding-off

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 31
4 Functional Description
4.1 Tools

Name Type Data M/O Initial value Description


type

hold IN BOOL O FALSE FALSE: Normal sequence


TRUE: Ramping will be held with respect
to jerk limiting change rate will be
decreased to zero. Input x is ineffective.

zeroRounding IN BOOL O FALSE TRUE: Rounding at zero crossing


FALSE: No rounding at zero crossing

x IN REAL M 0.0 Setpoint value

nominalValue IN REAL O 1000.0 Max. setpoint and reference value


Internally processed as absolute value

rampupTime IN REAL O 1.0 [ s ] Ramp-up time


cycleTime < rampupTime <
MAX_RAMP_TIME_S (1000.0)

rampdownTime IN REAL O 1.0 [ s ] Ramp-down time


cycleTime < rampupTime <
MAX_RAMP_TIME_S (1000.0)

FastRampdown IN REAL O 0.1 [ s ] Fast ramp-down time


Siemens AG 2014 All rights reserved

Time cycleTime < rampupTime <


MAX_RAMP_TIME_S (1000.0)

roundingTime IN REAL O 0.5 [ s ] Rounding-off time


cycleTime < rampupTime

busy OUT BOOL - FALSE FALSE: Function block disabled


TRUE: Function block enabled

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to
Copyright

error identification

errorID OUT DWORD - 16#0000_0 Error identification, refer to error messages


000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

Setpoint OUT BOOL - FALSE FALSE: Setpoint not reached


Reached TRUE: Setpoint reached

setpointZero OUT BOOL - FALSE FALSE: Calculated setpoint is not zero


TRUE: Calculated setpoint is zero

accelerating OUT BOOL - FALSE FALSE: Absolute output value not


increasing
TRUE: Absolute output value increasing

decelerating OUT BOOL - FALSE FALSE: Absolute output value not


decreasing
TRUE: Absolute output value decreasing

y OUT REAL - 0.0 Output value

ya OUT REAL - 0.0 [ / sec ] Actual change rate

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 32
4 Functional Description
4.1 Tools

Functionality
The function block is active with the input run set to TRUE and the calculation can
be started or stopped with input enable. Depending on the parameterization of the
inputs a ramp function is calculated. Various options can be set by selecting the
inputs. If mode is at False, the ramp is braked using a special entered deceleration
time (fastRampdownTime) and without jerk limiting. This means that the ramp can
be effectively decelerated for an Emergency Stop – this is also possible while
accelerating. If mode is at True, then the drive is braked normally with the entered
deceleration time (rampdownTime). The acceleration is always calculated with the
entered acceleration time (rampupTime) independent of mode.
In order to reach the setpoint (x), the appropriate interval values are output (at y)
and the actual change rate is output (at ya). If input enableRounding is set to
TRUE, the ramp is calculated with jerk limiting. The rounding-off is determined by
the rounding-off time (roundingTime). The zero crossing (when the input x changes
direction) can be parameterized with or without rounding. As soon as the output
value is zero this is displayed using the setpointZero output. When accelerating the
output acceleration is set, when decelerating theoutput deceleration is set and for a
constant value setpointReached is set. If the block is in the enable mode, then
output busy is set to TRUE. If the hold input is set to TRUE, the ramp-function
generator is stopped (held) and the actual acceleration is ramped-down to zero. As
long as hold is TRUE, setpoint x is ignored and output ya is set to zero.
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 33
4 Functional Description
4.1 Tools

Normal operation with rounding


Siemens AG 2014 All rights reserved
Copyright

With and without zero rounding

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 34
4 Functional Description
4.1 Tools

Operation with fast stop mode


Siemens AG 2014 All rights reserved
Copyright

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.Error = TRUE
ErrorID Description

16#0000_0000 No error

16#1107_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#1107_8005 Invalid configuration data:


nominalValue = 0.0

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 35
4 Functional Description
4.1 Tools

4.1.6 CalcStopDistance

Calculation of the braking distance and the associated time to ramp down to zero
with the given ramp parameters from the given speed and acceleration.
The function can be called in any task. ID: 0005

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and output parameters


Name Type Data type M/O Initial value Description

velocity IN REAL M 0.0 [ LU / min ] Actual velocity

acceleration IN REAL M 0.0 [ LU / s²] Actual acceleration

maxVelocity IN REAL M 1000.0 [LU / min ] Reference velocity for


acceleration.
The absolute value is used internally.
Copyright

rampupTime IN REAL M 1.0 [ s ] Ramp-up time


The absolute value is used internally.

rampdownTime IN REAL M 1.0 [ s ] Ramp-down time


The absolute value is used internally.

roundingTime IN REAL O 0.0 [ s ] Rounding time


The absolute value is used internally.

error OUT BOOL - - FALSE: No error


TRUE: An error has occurred, refer to error
identification

errorID OUT BOOL - - Error identification, refer to error messages:


errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

stopDistance OUT REAL - - [ LU ] Stopping distance

stopTime OUT REAL - - [ s ] Stopping time

Functionality
The function calculates the braking time and braking distance taking the actual
motion vector of a drive (velocity, acceleration) as well as the specification of

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 36
4 Functional Description
4.2 Logic function blocks

dynamics (maxVelocity, rampUpTime, rampdownTime, roundingTime) into


account.
The length unit of the calculation corresponds to the unit used as input for the
lineSpeed input. The units of the inputs must be consistent.
With roundingTime = 0.0 the rounding (jerk limiting, smoothing) is deactivated.

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No Error

16#0005_8005 Invalid configuration data:


maxVelocity = 0.0
(rampupTime = 0.0 AND roundingTime <> 0.0)
rampdownTime = 0.0
Initial acceleration too high.
Siemens AG 2014 All rights reserved

4.2 Logic function blocks


4.2.1 F_TRIG

Falling edge detection


The function can be called in any cyclic task. ID: 0102
Copyright

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

CLK IN BOOL M - Input signal

Q OUT BOOL - - FALSE: No falling edge detected


TRUE: Falling edge detected

Functionality
The function block outputs a true signal if a falling edge is detected on the input
signal (CLK). The duration of the output signal is one cycle.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 37
4 Functional Description
4.2 Logic function blocks

Timing diagram

4.2.2 R_TRIG

Rising edge detection


The function can be called in any cyclic task. ID: 0101
Siemens AG 2014 All rights reserved

Schematic LAD Representation


Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

CLK IN BOOL M - Input signal

Q OUT BOOL - - FALSE: No rising edge detected


TRUE: Rising edge detected

Functionality
The function block outputs a true signal if a rising edge is detected on the input
signal (CLK). The duration of the output signal is one cycle.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 38
4 Functional Description
4.2 Logic function blocks

Timing Diagram

4.2.3 TRIG

Edge detection
The function can be called in any cyclic task. ID: 0103
Siemens AG 2014 All rights reserved

Schematic LAD Representation


Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

CLK IN BOOL M - Input signal

QF OUT BOOL - - FALSE: No falling edge detected


TRUE: Falling edge detected

QR OUT BOOL - - FALSE: No rising edge detected


TRUE: Rising edge detected

Functionality
The function block evaluates the input signal (CLK) for rising and falling edges. The
result of a falling edge is signaled on the QF output, the rising edge on the QR
output.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 39
4 Functional Description
4.3 Conversion function blocks

Timing Diagram
Siemens AG 2014 All rights reserved

4.3 Conversion function blocks


4.3.1 BytesIntoWord

Assembling a word out of 2 bytes


The function block can be called in any task. ID: 000B
Copyright

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

byte0 IN BYTE M - Least significant byte/low byte

byte1 IN BYTE M - Most significant byte/high byte

RET_VAL OUT BOOL - - Result

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 40
4 Functional Description
4.3 Conversion function blocks

Functionality
The function assembles a word out of two bytes by specifying high byte and low
byte.

4.3.2 BitsIntoByte

Assembling a byte out of 8 bits


The function can be called in any task. ID: 000C

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

bit0 IN BOOL M - Least significant bit 0/LSB

bit1 IN BOOL M - Bit 1

bit2 IN BOOL M - Bit 2

bit3 IN BOOL M - Bit 3

bit4 IN BOOL M - Bit 4

bit5 IN BOOL M - Bit 5

bit6 IN BOOL M - Bit 6

bit7 IN BOOL M - Most significant bit 7/MSB

RET_VAL OUT BYTE - - Result

Functionality
The function assembles a byte out of 8 bits.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 41
4 Functional Description
4.3 Conversion function blocks

4.3.3 BitsIntoWord

Assembling a word out of 16 bits


The function can be called in any task. ID: 000D

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

bit0 IN BOOL M - Least significant bit 0/LSB

bit1 IN BOOL M - Bit 1

bit2 IN BOOL M - Bit 2

bit3 IN BOOL M - Bit 3

bit4 IN BOOL M - Bit 4

bit5 IN BOOL M - Bit 5

bit6 IN BOOL M - Bit 6

bit7 IN BOOL M - Bit 7

bit8 IN BOOL M - Bit 8

bit9 IN BOOL M - Bit 9

bit10 IN BOOL M - Bit 10

bit11 IN BOOL M - Bit 11

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 42
4 Functional Description
4.3 Conversion function blocks

Name Type Data type M/O Initial value Description

bit12 IN BOOL M - Bit 12

bit13 IN BOOL M - Bit 13

bit14 IN BOOL M - Bit 14

bit15 IN BOOL M - Most significant bit 15/MSB

RET_VAL OUT WORD - - Result

Functionality
The function assembles a word out of 16 bits.

4.3.4 WordIntoBytes

Generates 2 bytes out of a word value


The function can be called in any task. ID: 000E
Siemens AG 2014 All rights reserved

Schematic LAD Representation


Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

IN IN WORD M - Input value

BYTE0 OUT BYTE - - Byte 0, least significant byte

BYTE1 OUT BYTE - - Byte 1, most significant byte

Functionality
The function block generates two bytes out of a word.

4.3.5 ByteIntoBits

Generates 8 bits out of a byte value


The function can be called in any task. ID: 000F

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 43
4 Functional Description
4.3 Conversion function blocks

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description
Siemens AG 2014 All rights reserved

In IN BYTE M - Input value

bit0 OUT BOOL - - Bit 0, least significant bit

bit1 OUT BOOL - - Bit 1

bit2 OUT BOOL - - Bit 2

bit3 OUT BOOL - - Bit 3

bit4 OUT BOOL - - Bit 4


Copyright

bit5 OUT BOOL - - Bit 5

bit6 OUT BOOL - - Bit 6

bit7 OUT BOOL - - Bit 7, most significant bit

Functionality
The function block generates eight bits out of a byte.

4.3.6 WordIntoBits

Generates 16 bits out of a word value


The function can be called in any task. ID: 0010

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 44
4 Functional Description
4.3 Conversion function blocks

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and output parameters


Name Type Data type M/O Initial value Description
Copyright

In IN BYTE M - Input value

bit0 OUT BOOL - - Bit 0, least significant bit

bit1 OUT BOOL - - Bit 1

bit2 OUT BOOL - - Bit 2

bit3 OUT BOOL - - Bit 3

bit4 OUT BOOL - - Bit 4

bit5 OUT BOOL - - Bit 5

bit6 OUT BOOL - - Bit 6

bit7 OUT BOOL - - Bit 7

bit8 OUT BOOL - - Bit 8

bit9 OUT BOOL - - Bit 9

bit10 OUT BOOL - - Bit 10

bit11 OUT BOOL - - Bit 11

bit12 OUT BOOL - - Bit 12

bit13 OUT BOOL - - Bit 13

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 45
4 Functional Description
4.4 Scaling function blocks

Name Type Data type M/O Initial value Description

bit14 OUT BOOL - - Bit 14

bit15 OUT BOOL - - Bit 15, most significant bit

Functionality
The function block generates sixteen bits out of a word.

4.4 Scaling function blocks


4.4.1 ScalingDWDRL

Conversion and scaling of DWORD values into REAL values


The function can be called in any task. ID: 0006

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

x IN DWORD M - Input value in DWORD format

maxValue IN REAL M - Maximum value

base IN REAL O 1073741824.0 Normalization value


(RET_VAL = 0 if base = 0)

RET_VAL OUT REAL - - Output value in REAL format


[ -2*maxValue - 2*maxValue]

Functionality
The function converts a DWORD input (x) using a normalization value (base) and
the maximum reference value (maxValue) into a REAL value. The output value is
limited to -2*maxValue and 2*maxValue.
x
RET _ VAL * max Value
base

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 46
4 Functional Description
4.4 Scaling function blocks

4.4.2 ScalingRLDWD

Conversion and scaling of REAL values into DWORD values


The function can be called in any task. ID: 0007

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description
Siemens AG 2014 All rights reserved

x IN REAL M - Input value in REAL format


[ -2*maxValue - 2*maxValue]

maxValue IN REAL M - Maximum value


(RET_VAL = 0 if maxValue = 0)

base IN REAL O 1073741824.0 Normalization value

RET_VAL OUT WORD - - Output value as WORD


Copyright

Functionality
The function converts a REAL value (x) into a DWORD using a normalization value
(base) and the maximum reference value (maxValue). The input value x is limited
to the values
-2*maxValue and 2*maxValue
x
RET _ VAL * base
maxValue

4.4.3 ScalingWDRL

Conversion and scaling of WORD values into REAL values


The function can be called in any task. ID: 0008

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 47
4 Functional Description
4.4 Scaling function blocks

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

x IN WORD M - Input value in WORD format

maxValue IN REAL M - Maximum value

base IN REAL O 16384.0 Normalization value


(RET_VAL = 0 if base = 0)
Siemens AG 2014 All rights reserved

RET_VAL OUT REAL - - Output value in REAL format

Functionality
This function converts a WORD value (x) into a REAL value using a normalization
value (base) and the maximum reference value (maxValue). The output value is
limited between the values -2*maxValue and 2*maxValue.
Copyright

x
RET _ VAL * max Value
base

4.4.4 ScalingRLWD

Conversion and scaling of REAL values into WORD values


The function can be called in any task. ID: 0009

Schematic LAD Representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 48
4 Functional Description
4.4 Scaling function blocks

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M - Input value in REAL format

maxValue IN REAL M - Maximum value

base IN REAL O 16384.0 Normalization value


(RET_VAL = 0 if base = 0)

RET_VAL OUT WORD - - Output value in WORD format

Functionality
This function converts a REAL value (x) into a WORD value using a normalization
value (base) and the maximum reference value (maxValue). The input value x is
limited between the values -2*maxValue and 2*maxValue.
x
RET _ VAL * base
max Value
Siemens AG 2014 All rights reserved

4.4.5 Scaling

Scaling of a value in REAL format


The function can be called in any task. ID: 000A

Schematic LAD Representation


Copyright

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M - Input value in REAL format

maxValue IN REAL M - Maximum value

base IN REAL M - Normalization value


(RET_VAL = 0 if base = 0)

RET_VAL OUT REAL - - Output value in REAL format

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 49
4 Functional Description
4.5 Closed-loop function blocks

Functionality
This function scales an input value (x) using a normalization value (base) and the
maximum reference value (maxValue).
x
RET _ VAL * max Value
base

4.5 Closed-loop function blocks


4.5.1 PT1 – PT1 filter

Calculation of a PT1 – low-pass filter


The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1101

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and output parameters


Name Type Data M/O Initial value Description
Copyright

type

set IN BOOL O FALSE FALSE: Operation as PT1-filter


TRUE: The setValue is output

x IN REAL M 0.0 Input value

setValue IN REAL O 0.0 Set value, activated with set = TRUE

smoothingTime IN REAL M 100.0 [ ms ] Smoothing time

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer
to error identification

errorID OUT DWORD - 16#0000_0000 Error identification, refer to error


messages:
errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

y OUT REAL - 0.0 Output value

Functionality
The input value x is filtered using the time constant smoothingTime and output at
the output y. To precisely calculate the internal steps the sampling time in which
the block is processed is determined internally. Additionally it is possible to

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 50
4 Functional Description
4.5 Closed-loop function blocks

permanently set the output to the value of the input (setValue) by setting the input
(set).
In order to generate a hold, output y should be connected to the input setValue.
This means that when setting set to TRUE, the output value is maintained until set
is again set to FALSE. If the time constant is set to zero the filter is de-activated
and the output value is equal to the input value.
63% of the input value is reached at the output after one period of the time
constant.
95% of the input value is reached at the output after three periods of the time
constant.
For an appropriately high smoothingTime/cycleTime (smoothingTime/cycleTime >
10) the transfer function corresponds to the following characteristic:
t / smoothingTime
Y (t) X *(1 e ) with t n * cycleTime
The discrete values are calculated using the following algorithm:
cycleTime
Yn Yn 1 * X n Yn 1
smoothingT ime
Siemens AG 2014 All rights reserved

Timing diagram
Copyright

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 51
4 Functional Description
4.5 Closed-loop function blocks

4.5.2 ReadAnalogInput

Analog input evaluation with PT1 filter


The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1109

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and Output Parameters


Name Type Data M/O Initial value Description
type

set IN BOOL O FALSE FALSE: Normal operation


TRUE: Set output of the function block to setValue

x IN WORD M - Input value in WORD format


Copyright

maxValue IN REAL M - Maximum value for output limitation

base IN REAL O 16384.0 Base value for WORD/REAL conversion

setValue IN REAL O 0.0 Value to be set with set = TRUE

smoothingTime IN REAL O 100.0 [ ms ] Smoothing time constant of the internal PT1


filter.
With smoothingTime = 0.0 the filter is inactive.

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to error
identification

errorId OUT DWORD - 16#0000_0 Error identification, refer to error messages:


000 errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

y OUT REAL - 0.0 Output value

Functionality
This function converts an analog input signal in WORD format (x) into a REAL
value using a normalization value (base) and the maximum reference value

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 52
4 Functional Description
4.5 Closed-loop function blocks

(maxValue). The output value is limited between the values -2*maxValue and
2*maxValue.
x
ana log_ value * max Value
base
Optionally the analog value can be filtered using a settable PT1-filter and a filter
time smoothingTime. If the input parameter smoothingTime = 0, the filter is
disabled. The internal limit for the filter time is 5000 ms.
The functionality is a combination of the ScalingWDRL function and the PT1
function block.

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1109_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#1109_8005 Invalid configuration data:


Siemens AG 2014 All rights reserved

base = 0.0

4.5.3 Differentiator

Numerical differentiator
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1103
Copyright

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M 0.0 Input value

diffTime IN REAL M 0.0 [ ms ] Differentiating time constant

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to error
identification

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 53
4 Functional Description
4.5 Closed-loop function blocks

Name Type Data type M/O Initial value Description

errorID OUT DWORD - 16#0000_0000 Error identification, refer to error messages


errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

y OUT REAL - 0.0 Output value

Functionality
The output value y changes as a function of the rate of change of input value x,
multiplied by the differential time constant diffTime.
The input diffTime is internally limited: cycleTime diffTime 1000
Discrete values are calculated using the following algorithm:
diffTime
Yn Xn Xn 1 *
cycleTime

Error messages
Siemens AG 2014 All rights reserved

Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
Copyright

4.5.4 Integrator

Numerical integrator
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1102

Schematic LAD Representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 54
4 Functional Description
4.5 Closed-loop function blocks

Input and output parameters


Name Type Data M/O Initial value Description
type

set IN BOOL O FALSE FALSE: Normal integrator function


TRUE: Output is setValue

x IN REAL M 0.0 Input value

setValue IN REAL O 0.0 SetValue for setting function with set =


TRUE

upperLimit IN REAL M 1.0 Upper integration limit

lowerLimit IN REAL M 0.0 Lower integration limit

integralTime IN REAL M 5.0 [ ms ] Integration time Ti

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to
error identification

errorID OUT DWORD - 16#0000_0000 Error identification, refer to error


messages
Siemens AG 2014 All rights reserved

errorID 16#0000_8000: Warning


errorID 16#0000_8000:Error

y OUT REAL - 0.0 Output value

upperLimitReached OUT BOOL - FALSE FALSE: Upper limit not reached


TRUE: Upper limit reached

lowerLimitReached OUT BOOL - FALSE FALSE: Lower limit not reached


TRUE: Lower limit reached
Copyright

Functionality
The function block integrates the input value x with integration time integralTime.
The result is output at y. The integrator is limited by the upper limit upperLimit and
the lower limit lowerLimit. If the integrator reaches one of the limits, then this is
connected to the output. When the particular limit at the output is reached this is
indicated using upperLimitReached and lowerLimitReached.
Using the setting function, which is activated with set =True, the output can be set
to a pre-defined value (setValue). If set is reset, then starting from the setting
value, the integrator continues to integrate in the direction specified using input
value x.
The input integralTime is internally limited: cycleTime integralTime 10000
The discrete values are calculated using the following algorithm:
cycleTime
Yn Yn 1 * Xn
integralTi me

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 55
4 Functional Description
4.5 Closed-loop function blocks

Truth table for lowerLimit < upperLimit


Set Condition y upper lower Mode
Limit Limit
Reached Reached

0 lowerLimit < yn 0 0 Integrating


yn-1 + x * cycleTime /
integralTime
< upperLimit

0 yn-1 + x * cycleTime / upper 1 0 Integrator at the


integralTime upperLimit Limit upper limit

0 yn-1 + x * cycleTime / lower 0 1 Integrator at the


integralTime lowerLimit Limit lower limit

1 lowerLimit < setValue < set 0 0 Setting


upperLimit Valuen

1 setValue upperLimit upper 1 0 Integrator at the


Limit upper limit
Siemens AG 2014 All rights reserved

1 setValue lowerLimit lower 0 1 Integrator at the


Limit lower limit

Truth table for lowerLimit > upperLimit


Set Condition Y upper lower Mode
Limit Limit
Copyright

Reached Reached

any lowerLimit < Yn 0 0 Integrator limited


yn-1+x * cycleTime / integralTime by upper Limit
< upperLimit

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 56
4 Functional Description
4.5 Closed-loop function blocks

Timing diagram
Siemens AG 2014 All rights reserved

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
Copyright

TRUE and errorID <> 16#0000_0000.


ErrorID Description

16#0000_0000 No error

16#1102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

4.5.5 DT1 – DT1-filter

DT1-filte
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1104

Schematic LAD Representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 57
4 Functional Description
4.5 Closed-loop function blocks

Input and output parameters


Name Type Data M/O Initial value Description
type

set IN BOOL O FALSE FALSE: Operation as DT1-filter


TRUE: setValue is set as output value

x IN REAL M 0.0 Input value

setValue IN REAL O 0.0 Setting value

smoothingTime IN REAL M 0.0 [ ms ] Smoothing time constant

diffTime IN REAL M 0.0 [ ms ] Differentiating time constant

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to
error identification

errorID OUT DWORD - 16#0000_0000 Error identification, refer to error


messages
errorID 16#0000_8000: warning
errorID 16#0000_8000: error

y OUT REAL - 0.0 Output value


Siemens AG 2014 All rights reserved

ypt OUT REAL - 0.0 Output value of the smoothing element

Functionality
Input value x is dynamically delayed with the smoothing time constant
smoothingTime entered via a differentiating element. The output value isat output
ypt. The output value y of the complete DT1 element is proportional to the change
Copyright

rate of ypt multiplied with differential time constant diffTime. The input diffTime is
internally limited: cycleTime diffTime 1000
The input smoothingTime defines the gradient of the down ramp of the output
value. This specifies the time after which the transfer function – after smoothing
and differentiation – has dropped to 37% of x-diffTime/ smoothingTime. For a
sufficiently high smoothingTime/cycleTime (smoothingTime /cycleTime > 10), the
transfer function corresponds to a characteristic of:
diffTime t/smoothingTime
Y(t) x* *e where t n * cycleTime
smoothingT ime
The input smoothingTime is internally limited: cycleTime smoothingTime 5000
The discrete values are calculated using the algorithm:
diffTime
Y 1n * ( xn YPTn 1 )
smoothingTime
cycleTime
YPTn YPTn 1 * ( xn YPTn 1 )
smoothingTime
The higher smoothingTime/cycleTime, the lower the amplitude change at y and at
ypt from one sampling instant to the next.
The higher the diffTime/cycleTime, the higher the amplitude change at y from one
sampling instant to the next.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 58
4 Functional Description
4.5 Closed-loop function blocks

Setting function
When the setting function is active, setting value setValue is transferred to output y;
the output of the smoothing element is obtained as follows:
smoothingTime
YPTn Xn * setValuen for diffTime 0
diffTime
In this case, the internal limits for smoothingTime and diffTime apply. For diffTime
= 0, the output values remain unchanged as long as set = TRUE.

Graphical representation
Siemens AG 2014 All rights reserved

Error messages
Copyright

Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1104_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

4.5.6 Limiter – Limiter with feedback signal

Limit-value filter
The function can be called in any task. ID: 0004

Schematic LAD Representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 59
4 Functional Description
4.5 Closed-loop function blocks

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M 0.0 Input value

upperLimit IN REAL M 0.0 Upper limit value

lowerLimit IN REAL M 0.0 Lower limit value

RET_VAL OUT REAL - 0.0 Output value

upperLimitReached OUT BOOL - TRUE FALSE: Upper limit not reached


TRUE: Upper limit reached

lowerLimitReached OUT BOOL - TRUE FALSE: Lower limit not reached


TRUE: Lower limit reached

Functionality
The function block transfers the input value x tothe output value RET_VAL. The
input value is limited dependent on the input parameters upperLimit and lowerLimit.
Siemens AG 2014 All rights reserved

If the input quantity reaches upper limit upperLimit, output upperLimitReached is


set to TRUE.
If the input quantity reaches lower limit value lowerLimit, output lowerLimitReached
is set to TRUE.
If the lower limit value is greater or equal to the upper limit value, output y is set to
the upper limit value upperLimit.

Timing diagram
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 60
4 Functional Description
4.5 Closed-loop function blocks

Error messages
If upperLimitReached and lowerLimitReached are both at TRUE, the lower limit
lowerLimit is greater than upper limit upperLimit.

4.5.7 LevelControl – Limit value monitor

Limit value monitor


The function block can be called in any cyclic task. ID: 0104

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and output parameters


Copyright

Name Type Data type M/O Initial value Description

run IN BOOL M FALSE TRUE: Enable function block


FALSE: Disable function block
x IN REAL M 0.0 Input value

alarmHigh IN REAL O 100.0 Alarm, upper limit value

warningHigh IN REAL O 80.0 Warning, upper limit value

warningLow IN REAL O -80.0 Warning, lower limit value

alarmLow IN REAL O -100.0 Alarm, lower limit value

hyst IN REAL O 0.0 Hysteresis


This value is taken into account as an
absolute value.

delayTime IN TIME O T#3s [ s ] Output delay time


delayTime = 0, signal delay is disabled
busy OUT BOOL - FALSE TRUE: Function block is disabled
FALSE: Function block is enabled

alarmUpper OUT BOOL - FALSE TRUE: Upper alarm limit value exceeded
Limit FALSE: Upper alarm limit value not
exceeded

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 61
4 Functional Description
4.5 Closed-loop function blocks

Name Type Data type M/O Initial value Description

warningUpper OUT BOOL - FALSE TRUE: Upper warn limit value exceeded
Limit FALSE: Upper warn limit value not
exceeded

warningLower OUT BOOL - FALSE TRUE: Lower warn limit value exceeded
Limit FALSE: Lower warn limit value not
exceeded

AlarmLower OUT BOOL - FALSE TRUE: Lower alarm limit value exceeded
Limit FALSE: Lower alarm limit value not
exceeded

Functionality
This function block monitors an input value (x) to identify whether it violates
(exceeds, falls below) parameterized limit values as long as it is active with run =
TRUE. If the block is enabled this can be identified using the busy output. When
the warningHigh value is exceeded, output warningUpperLimit is set after the
delayTime. The same applies when the alarmHigh value is exceeded with the
associated output alarmUpperLimit. If the input value drops below the limit value
Siemens AG 2014 All rights reserved

warningHigh or alarmHigh minus the hysteresis value (hyst), the particular output is
reset. The same applies for the lower limit monitoring with the limits warningLow
and alarmLow as well as the associated outputs warningLowerLimit and
alarmLowerLimit. However, in this case, the hysteresis (hyst) is added to the limit
value. Warnings are not reset as a result of an alarm.
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 62
4 Functional Description
4.5 Closed-loop function blocks

Timing Diagram
Siemens AG 2014 All rights reserved
Copyright

4.5.8 DeadBand – Dead-band filter

Dead-band filter
The function can be called in any task. ID: 0002

Schematic LAD Representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 63
4 Functional Description
4.5 Closed-loop function blocks

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M 0.0 Input value

bandBorder IN REAL M 0.0 Limit value for dead band

RET_VAL OUT REAL - - Output value

Functionality
If the input value (x) is located in the dead band range (-bandBorder < x <
+bandBorder), the output value is set to zero. However, if it is at or below (–
bandBorder) the output will be x – bandBorder. If the input value is at or above
+bandBorder, x + bandBorder is set as output value. The dead band – symmetrical
around the zero point – can be set using the bandBorder parameter.

x + bandBorder for x -bandBorder


0 for -bandBorder < x < +bandBorder
Siemens AG 2014 All rights reserved

x - bandBorder for x +bandBorder

Graphical representation
Copyright

4.5.9 DeadZone – Dead-zone filter

Dead-zone filter
The function can be called in any task. ID: 0003

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 64
4 Functional Description
4.5 Closed-loop function blocks

Schematic LAD Representation

Input and output parameters


Name Type Data type M/O Initial value Description

x IN REAL M 0.0 Input value

zoneBorder IN REAL M 0.0 Limit value for dead zone

RET_VAL OUT REAL - - Output value

Functionality
Siemens AG 2014 All rights reserved

If the input value (x) lies in the range of the dead zone (-zoneBorder < x < +
zoneBorder), the output value is set to zero. If the input value lies at / below (–
zoneBorder) or at / above +zoneBorder, input x is the output value. The dead zone
– symmetrical around the zero point – can be set using the value zoneBorder.

x for x -zoneBorder
0 for -zoneBorder < x < +zoneBorder
x for x +zoneBorder
Copyright

Graphical representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 65
4 Functional Description
4.5 Closed-loop function blocks

4.5.10 AverageValue – Average-value filter

Average-value filter
The function block must be called in a cyclic task. ID: 0105

Schematic LAD Representation

Input and output parameters


Siemens AG 2014 All rights reserved

Name Type Data M/O Initial value Description


type

enable IN BOOL M FALSE FALSE: Function block is deactivated


TRUE: Function block is activated

x IN REAL M 0.0 Input value

sizeOfArray IN INT M 255 Size of the array

dbNumber INT M - Number of the data block that will be


Copyright

created for storage of the input values

busy OUT BOOL - FALSE FALSE: Function block is deactivated


TRUE: Function block is activated

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer
to error identification

errorID OUT DWORD - 16#0000_0000 Error identification, refer to error


messages
errorID 16#0000_8000: warning
errorID 16#0000_8000: error

averageValue OUT REAL - 0.0 Averaged output value

maxValueReached OUT BOOL - FALSE FALSE: Array not yet filled with
values
TRUE: Maximum number of values
in the array (sizeOfArray)

Functionality
The function block calculates the moving average value (averageValue) of the
input values that are entered. Each time the block is called the value (x) currently

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 66
4 Functional Description
4.5 Closed-loop function blocks

present is saved in a data block that is created (dbNumber). The data block is
deleted upon deactivation of the function block.
The function block is activated via the input enable and calculates values from that
instant. The output maxValueReached is set if the number of values in the data
block reaches the defined number sizeOfArray.

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#0105_8005 Invalid configuration data:


Assigned data block too small
dbNumer invalid (data block not assigned to this function block)

16#0105_8291 Maximum nesting level reached (SFC22 / CREATE_DB)

16#0105_8292 The data block cannot be created because (SFC22 / CREATE_DB):


The “compress user memory” function is currently active
Siemens AG 2014 All rights reserved

The number of data blocks in the CPU has reached the maximum
possible number
The H CPU is running coupling or update functions
WinAC software CPU has detected an error in the operating system
of the computer where WinAC is installed
The previous delete action is not yet completed

16#0105_82A2 Error in the length of the data block (SFC22 / CREATE_DB)


The length is 0
Copyright

The length was specified as an odd number


The length is greater than permitted by the CPU

16#0105_82B1 There is no data block number free (SFC22 / CREATE_DB)

16#0105_82B2 There is not enough free memory available (SFC22 / CREATE_DB)

16#0105_82B3 There is not enough continuous memory space available (SFC22 /


CREATE_DB), compress memory.

16#0105_8391 Maximum nesting level reached (SFC23 / DEL_DB)

16#0105_8392 The data block cannot be deleted (SFC23 / DEL_DB), because:


The compress user memory function is active
The data block to be deleted is in copying process
The H CPU is running coupling or update functions
WinAC software CPU has detected an error in the operating system
of the computer where WinAC is installed

16#0105_83A1 Error in the input parameter DB_NUMBER: the actual parameter


selected
Is 0.
Is greater than the maximum permitted DB number for the CPU used.

16#0105_83B1 The DB with the specified number does not exist on the CPU.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 67
4 Functional Description
4.5 Closed-loop function blocks

ErrorID Description

16#0105_83B2 The DB with the specified number created using the keyword
UNLINKED.

16#0105_83B3 The data block is on a flash card (SFC23 / DEL_DB)

16#0105_83B4 The DB cannot be deleted (SFC23 / DEL_DB), possible reasons:


It belongs to an F-program
It is an instance data block of a block for S7 communication (S7-400)
It is a technology data block

16#0105_83C1 The data block cannot be deleted at this time because of a temporary
resource bottleneck (SFC23 / DEL_DB).

16#0105_84A1 Data block number bigger than allowed or zero (SFC 24 / TEST_DB)

16#0105_84B1 Data block not existent (SFC 24 / TEST_DB)

16#0105_84B2 Data block unlinked (SFC24 / TEST_DB)


Siemens AG 2014 All rights reserved

4.5.11 PID – PID-controller

PID controller with actual value smoothing and optional D component in the actual
value branch
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1105
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 68
4 Functional Description
4.5 Closed-loop function blocks

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and output parameters


Copyright

Name Type Data M/O Initial value Description


type

enable IN BOOL M FALSE FALSE: Function block is deactivated


TRUE: Function block is activated

reset IN BOOL O FALSE FALSE: Normal operation


TRUE: Function block restart

setpointValue IN REAL M 0.0 Setpoint value

actualValue IN REAL M 0.0 Actual value

preControl IN REAL O 0.0 Pre-control value

propGain IN REAL M 2.0 Controller gain

integTime IN REAL O 999.0 [ ms ] Integration time constant


With value = 0.0 the integral channel is
deactivated.

derivTime IN REAL O 0.0 [ ms ] Derivative time constant


With value = 0.0 the differential channel is
deactivated.

filterTime IN REAL O 10.0 [ ms ] Actual value filter time


With values 0.0 the smoothing is
deactivated.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 69
4 Functional Description
4.5 Closed-loop function blocks

Name Type Data M/O Initial value Description


type

upperLimit IN REAL O 100.0 Upper limit value of the control output


upperLimit > lowerLimit

lowerLimit IN REAL O 0.0 Lower limit value of the control output.

intSetValue IN REAL O 0.0 Integrator set value

holdIntChannel IN BOOL O FALSE FALSE: Normal operation


TRUE: Hold integral action

setIntChannel IN BOOL O FALSE FALSE: Normal operation


TRUE: Set integrator

controlMode IN BOOL O FALSE FALSE: D component in controller deviation


TRUE: D component active in actual value
branch

deadBand IN REAL O 0.0 Width of the deadband filter, deactivated with


0.0

actualValue IN REAL O 1.0 Scaling factor of the actual value quantity


Factor
Siemens AG 2014 All rights reserved

actualValue IN REAL O 0.0 Offset of the actual value quantity


Offset

outValueFactor IN REAL O 1.0 Scaling factor of the output value

outValueOffset IN REAL O 0.0 Offset of the output value

busy OUT BOOL - FALSE FALSE: Function block deactivated


TRUE: Function block activated

error OUT BOOL - FALSE FALSE: No error


Copyright

TRUE: An error has occurred, refer to error


identification

errorID OUT DWORD - 16#0000_0 Error identification, refer to error messages


000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

upperLimit OUT BOOL - FALSE FALSE: No output limitation


Reached TRUE: Controller output has reached the
upper limit, the integrator is limited

lowerLimit OUT BOOL - FALSE FALSE: No output limitation


Reached TRUE: Controller output has reached the
lower limit, the integrator is limited

deviationValue OUT REAL - 0.0 Controller deviation after the deadband filter

pOutValue OUT REAL - 0.0 P component output, unlimited

iOutValue OUT REAL - 0.0 I component output, unlimited

dOutValue OUT REAL - 0.0 D component output, unlimited (if not in the
actual value branch)

outValue OUT REAL - 0.0 Controller output, limited and scaled

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 70
4 Functional Description
4.5 Closed-loop function blocks

Functionality
The function block is used to implement a universal PID controller that can be
switched to P controller or I controller modes. The D component can either be
calculated in the actual value branch or in the system deviation.
The integrator can be set using the inputs intSetValue (setting value) and
setIntChannel. In addition, the instantaneous value of the integrator can be held
using holdIntChannel (P controller). Internally the I component is limited, based on
the controller output limits (“anti-windup”). The integrator is set to zero at switch-on.
All of the block parameters can be changed in operation.
The scaled and smoothed actual value (actualValue) is subtracted from the
setpoint (setpointValue) according to the following equation:
t
deviationValue (actualValue actualValueFactor ) actualValueOffset 1 e T setpo int Value

The result is the system deviation deviationValue (after the deadband) and is then
multiplied with the proportional coefficient propGain. The result is transferred to the
integrator – and optionally to the D component. The settable integral time
integTime as well as the time constant of the D component derivTime (optional)
define the controller behavior.
Siemens AG 2014 All rights reserved

Component Calculation

P component pOutValue n propGain deviationV alue n


I component pOutValue n pOutValue n 1 cycleTime
iOutValue n iOutValue n 1
2 int egTime
The integrator includes "anti-windup" functionality, i.e. if the controller
output is limited, the integrator cannot continue to integrate in the same
Copyright

direction.
The inputs setIntChannel and holdIntchannel can be used to set the
integrator (intSetValue) – or manually hold it. The integrator is set to zero
using reset or with a rising edge for enable
D component derivTime
dOutValue n pOutValue n pOutValue n 1
(if activated) cycleTime

The controller output is first scaled and is then limited.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 71
4 Functional Description
4.5 Closed-loop function blocks

Timing diagram
Siemens AG 2014 All rights reserved

Case 1, 6 – Blocked is switched-in with enable = TRUE. Output busy = TRUE,


outValue is activated.
Copyright

Case 2, 7 – An error has been detected, error = TRUE, busy = FALSE,


outValue = 0.0 – up to reset = TRUE or restart.
Case 3 – Block reset – as long as reset = TRUE. Error = FALSE.
Case 4 – Block has been reset and reset = FALSE, output busy = TRUE,
outValue is activated.
Case 5 – Block is deactivated with enable = FALSE while busy = TRUE. Busy
changes to FALSE, outValue = 0.0.
Case 8 – Block is deactivated with enable = FALSE while error = TRUE. Error
changes to FALSE.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 72
4 Functional Description
4.5 Closed-loop function blocks

Block diagram
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 73
4 Functional Description
4.5 Closed-loop function blocks

Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1105_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#1105_8005 Invalid configuration data:


upperlimit < lowerlimit

4.5.12 TPID – PID-controller with setpoint channel

Technology controller based on a PID controller for use as a tension or dancer roll
position controller in closed-loop winder or material web control.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1108

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 74
4 Functional Description
4.5 Closed-loop function blocks

Input and output parameters


Name Type Data M/O Initial Description
type value

enable IN BOOL M FALSE FALSE: Falling edge, the controller output


limitation will be ramped to zero and the
controller will be deactivated
TRUE: Rising edge, RFG will be started and
PID controller activated (if openLoop = FALSE)

openLoopCtrl IN BOOL O FALSE FALSE: PID controller is active


TRUE: PID controller and limiting are
deactivated. Only setpoint generator is enabled.

setpointValue IN REAL M 0.0 Controller setpoint value

actualValue IN REAL O 0.0 Actual value

preControl IN REAL O 0.0 Pre-control value

adaptionValue IN REAL O 0.0 Abscissa value of Kp-adaption

holdIntChannel IN BOOL O FALSE FALSE: Normal operation


TRUE: Hold integral action
Siemens AG 2014 All rights reserved

setIntChannel IN BOOL O FALSE FALSE: Normal operation


TRUE: Set integrator

x1 IN REAL O 0.0 First breakpoint of Kp-adaption characteristic, x1

Kp1 IN REAL O 1.0 First breakpoint of Kp-adaption characteristic,


Kp1

x2 IN REAL O 0.0 Second breakpoint of Kp-adaption characteristic,


x2
Copyright

Kp2 IN REAL O 1.0 Second breakpoint of Kp-adaption characteristic,


Kp2

limRampTime IN REAL O 1000.0 Ramp time for controller output

setNominalValue IN REAL O 100.0 Normalisation value for setpoint RFG

setRampTime IN REAL O 1000.0 Ramp time for setpoint RFG

integTime IN REAL O 2000.0 [ ms ] Integration time constant


With value = 0.0 the integral channel is
deactivated.

derivTime IN REAL O 0.0 [ ms ] Derivative time constant


With value = 0.0 the derivative channel is
deactivated.

filterTime IN REAL O 10.0 [ ms ] Actual value filter time


With values 0.0 the smoothing is deactivated.

intSetValue IN REAL O 0.0 Integrator set value

controlMode IN BOOL O FALSE FALSE: D component in controller deviation


TRUE: D component active in actual value
branch

deadBand IN REAL O 0.0 Width of the deadband filter, deactivated with 0.0

outValueFactor IN REAL O 1.0 Scaling factor of the output value

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 75
4 Functional Description
4.5 Closed-loop function blocks

Name Type Data M/O Initial Description


type value

upperLimit IN REAL O 20.0 Upper limit value of the control output


upperLimit > lowerLimit

lowerLimit IN REAL O -20.0 Lower limit value of the control output.

busy OUT BOOL - FALSE FALSE: Function block deactivated


TRUE: Function block activated

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to error
identification

errorID OUT DWO - 16#0000 Error identification, refer to error messages


RD _0000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

upperLimit OUT BOOL - FALSE FALSE: No output limitation


Reached TRUE: Controller output has reached the upper
limit, the integrator is limited

lowerLimit OUT BOOL - FALSE FALSE: No output limitation


Reached TRUE: Controller output has reached the lower
limit, the integrator is held
Siemens AG 2014 All rights reserved

RFGLimReached OUT BOOL - FALSE FALSE: Controller output limited


TRUE: Controller output limitation deactivated

RFGSetpoint OUT BOOL - FALSE FALSE: RFG output <> setpoint value
Reached TRUE: RFG output reached setpoint value

RFGSetpoint OUT REAL - 0.0 Setpoint after RFG


Value
Copyright

outValue OUT REAL - 0.0 Controller output

effectiveKp OUT REAL - 0.0 Effective gain after adaption

Functionality
The block is enabled using the enable input; as a consequence, the setpoint ramp-
function generator and the limiting ramp-function generator are started with their
respective ramp-up times and the PID controller is activated. In addition with the
rising edge the setpoint ramp-function generator is set to the value that is present
at the input (actualValue). This guarantees jerk-free and smooth transition into the
controlled mode.
When the edge at the enable input falls, the limiting ramp-function generator is
ramped back to zero and therefore the controller output is limited. This results in
bumpless controller shutdown. As soon as the outValue output is zero and enable
= FALSE, the block is deactivated and the output busy is set to FALSE. The
setpoint is internally ramped to the actual value during the switch-off phase.
If input openLoopCtrl = TRUE, then the block operates in the open-loop control
mode. As a consequence, the setpoint channel remains active and the controller or
the output limits remain inactive. The output busy stays TRUE as long as the
setpoint ramp output is not zero. The input actualValue is 0.0.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 76
4 Functional Description
4.5 Closed-loop function blocks

Setpoint ramping
The setpoint ramp-function generator is used to avoid setpoint steps in the setpoint
channel. The setpoint ramp-function generator is configured using the parameters
setRampTime and setNominalValue, whereby setNominalValue defines the
reference value for the ramp-up or ramp-down time. The function is always active,
if enable = TRUE. If openLoopCtrl = FALSE, enable = FALSE and busy = TRUE
(switch-off phase), then the setpoint is internally set to the actual value.
The ramp times are internally limited to the cycle time.

Controller functionality
The controller setpoint is provided via the input setValue, the actual value via the
actValue input. The setpoint channel includes a settable setpoint ramp-function
generator, via which the setpoint is routed; the effective setpoint can be monitored
at output RFGSetpointValue. The control algorithm used corresponds to that
described in function block PID.

Kp adaptation
A linear adaptation is carried out as Kp adaptation. The interpolation line is defined
by the value tuple (x1, kp1) and (x2, kp2).
Siemens AG 2014 All rights reserved

1st case: (adaptionValue < x1) or (x1 = x2):


effectiveKp = Kp1
2nd case: x1 adaptionValue x2:

( adaptionValue x1)( kp 2 kp1)


effectiveK p kp1
( x 2 x1)

3rd case: adaptionValue > x2:


Copyright

effectiveKp = kp2
The value kp1 is used as effective Kp if the Kp adaptation is deactivated.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 77
4 Functional Description
4.5 Closed-loop function blocks

Timing diagram
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 78
4 Functional Description
4.5 Closed-loop function blocks

Block Diagram
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 79
4 Functional Description
4.6 Drive related function blocks

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#1108_8005 Invalid configuration data:


setNominalValue 0.0
upperlimit < lowerlimit

4.6 Drive related function blocks


4.6.1 DriveControl

The function block is used as an interface between the PLC program and a drive
from the SINAMICS drive family. The function block enables the full control of the
respective drive.
Siemens AG 2014 All rights reserved

The function can be called in any task but it is highly recommended that the
function is called in a cyclic interrupt task such as OB35, especially if the drive is
part of a higher-level control loop, such as a tension controller. ID: 3101

Schematic LAD Representation


Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 80
4 Functional Description
4.6 Drive related function blocks

Input and Output Parameters

Name Type Data M/O Initial Description


type value

enable IN BOOL M FALSE FALSE: Function block disabled


TRUE: Rising edge enables
communication and saves the parameters

enableTorqueLimits IN BOOL O FALSE FALSE: No torque limiting, limits are set


to 200% of the reference torque.
TRUE: Enable torque limiting by entered
input values.

onOff1 IN BOOL M FALSE FALSE: Drive disabled


TRUE: Enable drive

noOff2 IN BOOL M FALSE FALSE: Coast stop request


TRUE: No coast stop request

noOff3 IN BOOL M FALSE FALSE: Fast stop request


TRUE: No fast stop request

speedSetpointEnabl IN BOOL M FALSE FALSE: Speed setpoint disabled


Siemens AG 2014 All rights reserved

e TRUE: Speed setpoint enabled

enableFixedEndstop IN BOOL O FALSE FALSE: Travel to fixed end stop disabled


TRUE: Enable travel to fixed end stop
(no error message if torque limits reached)

ackFaults IN BOOL O FALSE FALSE: No fault acknowledgement


TRUE: Rising edge, acknowledge faults

openBrake IN BOOL O FALSE If motor is equipped with holding brake:


FALSE: Brake controlled by brake control
Copyright

TRUE: Release brake

infeedOperation IN BOOL M FALSE FALSE: Infeed disabled


TRUE: Infeed enabled, DC bus is ready

speedSetpoint IN REAL M 0.0 [ rpm ] Speed setpoint

additiveTorque IN REAL O 0.0 [ Nm ] Torque pre-control, additive torque

upperTorqueLimit IN REAL O 0.0 [ Nm ] Upper torque limit

lowerTorqueLimit IN REAL O 0.0 [ Nm ] Lower torque limit

kpAdaption IN REAL O 100.0 [ % ] Speed controller gain adaption value.


At 100% the effective Kp = p1460 in the
drive.

referenceSpeed IN REAL M 100.0 [ rpm ] Normalization speed for S120


drives, this parameter equals p2000 in the
drive
Value is saved upon rising edge of enable.

referenceTorque IN REAL M 1.0 [ Nm ] Normalization torque for S120


drives, this parameter equals p2003 in the
drive
Value is saved upon rising edge of enable.

logAddr IN INT M - Logical IO address of the drive


Value is saved upon rising edge of enable.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 81
4 Functional Description
4.6 Drive related function blocks

Name Type Data M/O Initial Description


type value

busy OUT BOOL - FALSE FALSE: Block disabled, no


communication active
TRUE: Block active, valid configuration,
communication active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorID OUT DWORD - 16#000 Error identification, refer to error


0_0000 messages
errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

readyToPowerUp OUT BOOL - FALSE FALSE: Missing enables


TRUE: Drive is ready

readyForMotion OUT BOOL - FALSE FALSE: Missing enables


TRUE: Drive enabled for motion

fault OUT BOOL - FALSE FALSE: No drive fault


TRUE: Drive fault present
Siemens AG 2014 All rights reserved

faultCode OUT DINT - 0 Drive fault code, refer to drive manual for
more information (r2131 from the drive)

speedActual OUT REAL - 0.0 [ rpm ] Speed actual value (r63 from the
drive)

torqueActual OUT REAL - 0.0 [ Nm ] Torque actual value (r80 from the
drive)

torqueActualFtlbs OUT REAL - 0.0 [ ft / lbs ] Torque actual value


Copyright

torqueActualPercent OUT REAL - 0.0 [ % ] Torque actual value in percent of


nominal torque

Functionality
This function block is utilized to interface and control the drive from the PLC
program. The Drive Control function block is designed to interface to the Sinamics
family of drives but can also be easily adapted to other drives if the telegram
structure is adhered to. Through this function block the programmer is able to
enable, disable, open brake (if available), adjust speed, adjust torque, adjust the
Kp and adjust torque pre-control if required. The programmer also has access to
standard status bits and values.
If torque limiting is active, the function block monitors the actual speed of the drive
to avoid uncontrolled acceleration in the opposite direction to the specified setpoint.
This can happen if the upper torque limit is negative or the lower torque limit is
positive while drive is operating at the torque limit. If the drive accelerates beyond
50 rpm in the opposite direction the drive will be stopped with setpoint zero and the
torque limits will be opened.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 82
4 Functional Description
4.6 Drive related function blocks

Control interface
This function block interfaces with the drive via PROFIBus or PROFINet. The
communication between the drive and the PLC is based on a 10 word in and 10
word out telegram. The function block communicates via SFC14 (DPRD_DAT) and
SFC15 (DPWR_DAT) called from within the function block. The user can enter the
logical address of the drive as an input labeled “logAddr” to the function block. It is
necessary to make the drive’s input and output logical addresses identical.
Siemens AG 2014 All rights reserved

Telegram structure
Copyright

The communication telegram is structured to address the requirements of the most


demanding converting applications. Additionally spare words are incorporated for
customer specific needs.
The interface must be consistent on the PLC and the drive side. For this reason a
configuration script is part of the SIMATIC Converting Toolbox for SINAMICS S120
SERVO controlled drives to create the communication interface.
For detailed descriptions of the control and status signals at the drive level, review
the list and function manuals for the drive.

Control Telegram
Element Offset Data Description Interconnected to
(bytes) type

cw1 0 WORD Control word 1 See Control Word 1

speedSetpoint 2 DINT Main speed setpoint p1155


1073741824 = 100% of the reference
speed (p2000)

cw2 6 WORD Control word 2 See Control Word 2

upperTorqueLimit 8 INT Upper torque limit p1522


16384 = 100% of the reference torque
(p2003)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 83
4 Functional Description
4.6 Drive related function blocks

Element Offset Data Description Interconnected to


(bytes) type

lowerTorqueLimit 10 INT Lower torque limit p1523


16384 = 100% of the reference torque
(p2003)

additiveTorque 12 INT Additional torque p1511


16384 = 100% of the reference torque
(p2003)

kpAdaption 14 INT Speed controlled gain adaption p1455


16394 = 100% of the set gain (p1460)

word09 16 WORD not used -

word10 18 WORD not used -

Control Word 1
Element Offset (bits) Data type Description Interconnected to

onOff1 0 BOOL ON / OFF p840


Siemens AG 2014 All rights reserved

noOff2 1 BOOL No coast stop request p844

noOff3 2 BOOL No fast stop request p848

enable 3 BOOL Enable controller - enable inverter p852

enableRFG 4 BOOL Enable RFG p1140

startRFG 5 BOOL Start RFG p1141

enSpeedSet 6 BOOL Enable speed setpoint p1142


Copyright

acknFault 7 BOOL Acknowledge faults p2103

bit08 8 BOOL not used -

bit09 9 BOOL not used -

controlReq 10 BOOL PLC request control p854

reverseDir 11 BOOL Direction reversal p1113

bit12 12 BOOL not used -

mopRaise 13 BOOL MOP increase value p1035

mopLower 14 BOOL MOP lower value p1036

bit15 15 BOOL not used -

Control Word 2
Element Offset (bits) Data type Description Interconnected to

dds0 0 BOOL Drive data set selection 0 p820

dds1 1 BOOL Drive data set selection 1 p821

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 84
4 Functional Description
4.6 Drive related function blocks

Element Offset (bits) Data type Description Interconnected to

dds2 2 BOOL Drive data set selection 2 p822

dds3 3 BOOL Drive data set selection 3 p823

dds4 4 BOOL Drive data set selection 4 p824

closeBrake 5 BOOL Close brake p858

infeedOn 6 BOOL Infeed module enabled p864

parkAxis 7 BOOL Park drive object p897

travToFixStop 8 BOOL Traverse to fixed stop p1545

bit09 9 BOOL not used -

bit10 10 BOOL not used -

bit11 11 BOOL not used -

bit12 12 BOOL not used -

bit13 13 BOOL not used -

bit14 14 BOOL not used -


Siemens AG 2014 All rights reserved

openBrake 15 BOOL Open brake p855

Status Telegram
Element Offset Data Description Interconnected to
(bytes) type
Copyright

sw1 0 WORD Status word 1 See Status Word 1

actualSpeed 2 DINT Actual speed r63


1073741824 = 100% of the reference speed
(p2000)

sw2 6 WORD Status word 2 See Status Word 2

actualTorque 8 INT Actual torque r80


16384 = 100% of the reference torque (p2003)

faultNum 10 INT Actual fault code r2131

word07 12 WORD not used -

word08 14 WORD not used -

word09 16 WORD not used -

word10 18 WORD not used -

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 85
4 Functional Description
4.6 Drive related function blocks

Status Word 1
Element Offset (bits) Data type Description Interconnected to

rdvTpPwr 0 BOOL Ready to power r899.0

rdyToOp 1 BOOL Ready to operate r899.1

inOperation 2 BOOL In operation r899.2

faultPresent 3 BOOL Fault present r2139.3

noOFF2Act 4 BOOL OFF2 inactive r899.4

noOFF3Act 5 BOOL OFF3 inactive r899.5

powerInhibit 6 BOOL Power ON inhibit active r899.6

alarmPresent 7 BOOL Alarm present r2139.7

spdDevOK 8 BOOL n_act < speed threshold r2197.7


value 3

controlReq 9 BOOL Control requested r899.9

spdValReached 10 BOOL n actual > = compare value r2199.1


speed 2
Siemens AG 2014 All rights reserved

curTrqPwrOK 11 BOOL I, M, P limit not reached r1407.7

brkSetpEN 12 BOOL Enable set point from brake r899.12


control

mtrTempOK 13 BOOL No motor temperature alarm r2135.14

mrtRotDir 14 BOOL Motor direction of rotation r2197.3

pwrUnitTempOK 15 BOOL No power unit temperature r2135.15


Copyright

over load

Status Word 2
Element Offset (bits) Data type Description Interconnected to

dds0 0 BOOL Drive data set 0 r837.0

dds1 1 BOOL Drive data set 1 r837.1

dds2 2 BOOL Drive data set 2 r837.2

dds3 3 BOOL Drive data set 3 r837.3

dds4 4 BOOL Drive data set 4 r837.4

almClass0 5 BOOL Alarm class bit0 r2139.11

almClass1 6 BOOL Alarm class bit1 r2139.12

axisParked 7 BOOL Drive parked r896.0

fixedEndstop 8 BOOL Traverse to fixed end stop r1406.8


active

bit09 9 BOOL not used -

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 86
4 Functional Description
4.6 Drive related function blocks

Element Offset (bits) Data type Description Interconnected to

pulsesEnabled 10 BOOL Output pulses enabled r899.11

dataSetChanging 11 BOOL Data set change over is active r835.0

bit12 12 BOOL not used -

bit13 13 BOOL not used -

bit14 14 BOOL not used -

bit15 15 BOOL not used -

Block diagram
Siemens AG 2014 All rights reserved
Copyright

Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No warning

16#3101_4009 Communication error while reading from bus system

16#3101_400A Communication error while writing on bus system

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 87
4 Functional Description
4.6 Drive related function blocks

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#3101_8005 Invalid configuration data:


logAddr 0
referenceSpeed 0.0
referenceTorque 0.0

16#3101_8065 Torque Limits may not be plausible any more; a break in the web
could cause this problem. Axis runs in the opposite direction too
fast. Reaction: brake with full torque.

4.6.2 SetpointChannel

The SetpointChannel Function Block is designed to provide the functionality


required to produce a drive speed setpoint for the DriveControl function block.
Siemens AG 2014 All rights reserved

The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 3102

Schematic LAD Representation


Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 88
4 Functional Description
4.6 Drive related function blocks

Input and Output Parameters


Name Type Data M/O Initial value Description
type

jogPos IN BOOL O FALSE FALSE: No jog operation


TRUE: Start Jog forward at jogVelocity

jogNeg IN BOOL O FALSE FALSE: No jog operation


TRUE: Start Jog reverse at jogVelocity

enableRFG IN BOOL O FALSE FALSE: Velocity setpoint ramp disabled


TRUE: Enable velocity setpoint ramp

holdRFG IN BOOL O FALSE FALSE: No hold operation of the RFG


TRUE: Hold actual velocity with jerk limit

noFastStop IN BOOL O TRUE FALSE: Fast stop with fastStopTime


TRUE: Normal ramp operation

metricUnits IN BOOL O TRUE FALSE: Imperial units


TRUE: Metric units

jogVelocity IN REAL O 0.0 [ LU/min] Jog velocity setpoint


w/o Ramp
Siemens AG 2014 All rights reserved

velocity1 IN REAL O 0.0 [LU/min ] Velocity setpoint w/ Ramp

velocity2 IN REAL O 0.0 [LU/min ] Velocity setpoint w/ Ramp

velocity3 IN REAL O 0.0 [LU/min ] Velocity setpoint w/ Ramp

velocity4 IN REAL O 0.0 [LU/min] Velocity setpoint w/o Ramp

velocityPID IN REAL O 0.0 [LU/min ] Tension correction velocity w/o


Ramp

draw IN REAL O 1.0 [ % ] Draw ratio [1.00 = 100%]


Copyright

roundingTime IN REAL O 0.5 [ s ] Ramp rounding time

rampUpTime IN REAL O 30.0 [ s ] Ramp up time

rampDownTime IN REAL O 30.0 [ s ] Ramp down time

fastStopTime IN REAL O 3.0 [ s ] Fast stop down time

gearRatio IN REAL M 1.0 Gear ratio, motor:load

diameter IN REAL O 0.0 [ m or inch ] Diameter of driven roll


If the input is zero then a standard value is
used which gives 1.0 LU as circumference.

actDriveSpeed IN REAL M 0.0 [ rpm ] Actual speed from drive

maxVelocity IN REAL M 0.0 [LU/min ] Max line velocity for normalization


and limiting

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorId OUT DWORD - 16#0000_0 Error identification, refer to error messages


000 errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

setVelocity OUT REAL - 0.0 [LU/min] Total velocity setpoint

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 89
4 Functional Description
4.6 Drive related function blocks

Name Type Data M/O Initial value Description


type

actVelocity OUT REAL - 0.0 [LU/min ] Actual velocity

acceleration OUT REAL - 0.0 [ LU/ s2 ] Set line acceleration

setDriveSpeed OUT REAL - 0.0 [ rpm ] Speed setpoint to drive

actShaftSpeed OUT REAL - 0.0 [ rpm ] Actual shaft speed

zeroSpeed OUT BOOL - FALSE FALSE: Shaft speed not zero


TRUE: Actual shaft speed at zero

Functionality
The block must be configured using the correct total gear ratio, diameter of driven
roll and max velocity. This function block consistently checks for plausible
parameters and will display an error with corresponding errorId should invalid data
be entered at the rising edge of enable.
With the enableRFG set to true, the velocity1, velocity2 and velocity3 are summed
together and sent to the input of the RFGJ together with the configuration data and
Siemens AG 2014 All rights reserved

ramp control functions for holding, rounding, and ramp times entered at this
function block. With a False entered at enableRFG the input is set to zero and the
ramp is kept enabled until the ramped signal is zero. velocity4, Draw (multiplier)
and the tension correction – velocityPID – inputs are always active unless jog is
requested and the ramp output is zero.
RFG operation has priority over jog. The jog commands must be exclusive
commands.
With the enableRFG false, the jogPos set to true and jogNeg is false, the
jogVelocity is set as the velocity setpoint. Additionally, with the enableRFG false,
Copyright

the jogNeg set to true and jogPos is false, a negative jogVelocity is set as the
velocity setpoint.
The jog velocity, summed velocity setpoints 1-4 times the draw factor are limited to
+/- max velocity value. The tension velocity is added after this limit to allow tension
or any other superimposed control even at 100% velocity.
The function block will calculate the correct drive speed setpoint based upon the
diameter (in meterr or in inches) and gear ratio.
velocitySet
driveSpeedSet * gearRatio
(diameter * PI )
The function block will calculate the correct Shaft actual speed based upon the
actual motor speed and gear ratio.
driveSpeedAct
shaftSpeedAct
gearRatio
The function block will check for zero speed if the absolute actual speed is less
then 0.1 rpm.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 90
4 Functional Description
4.6 Drive related function blocks

Measure Metric unit Imperial unit

speed revolutions per minute (rpm)

velocity meters per minute (m/min) ft per minute (ft/min)

acceleration meters per second squared (m/s ) 2


ft per second squared (ft /s2)

diameter meters (m) inch (in)

LU m ft
(length unit)

Block diagram
Siemens AG 2014 All rights reserved
Copyright

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#3102_8005 Invalid configuration data:


maxVelocity 0.0
gearRatio = 0.0
The configuration data are checked for plausibility at the enable
rising edge.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 91
4 Functional Description
4.6 Drive related function blocks

4.6.3 FrictionMeasurement – Friction characteristic measurement

The function block is used to record the friction characteristic of the drive. The
characteristic can subsequently be used as a component in the torque pre-control.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 3103

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and output parameters


Name Type Data M/O Initial value Description
type
Copyright

execute IN BOOL M FALSE FALSE: Friction measurement disabled


TRUE: Rising edge starts the friction
measurement

abort IN BOOL O FALSE FALSE: Normal sequence


TRUE: Rising edge interrupts the sequence
and stops the axis

warmupTime IN TIME O - [ T# ] System warm-up time at maximum


speed for reaching operating conditions

rampTime IN REAL M - [ ms ] Ramping time for speed setpoint


ramping

actualTorque IN REAL M - [ Nm or ft/lbs ] Torque feedback from the drive

valueNumber IN INT M 100 Number of measurement points per speed


step [limited internally to 50 – 500]

maxSpeed IN REAL O 0.0 [ rpm ] Max. speed reference.


If specified, the data block will be pre-
assigned with the x (speed) values evenly
distributed.
If the input is zero, values for measurement
are taken directly from the data block, the
highest x value will be used as maximum
speed reference.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 92
4 Functional Description
4.6 Drive related function blocks

Name Type Data M/O Initial value Description


type

dbPointer IN ANY M - Pointer to breakpoint table of the friction


characteristic, x: speed, y: torque
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Offset: 8 REAL x2 value
Offset: 12 REAL y2 value
.. .. .. ..
Length defined by size of the data area, min.
length 16 bytes for two breakpoints.
All speed (x) values must be positive.

done OUT BOOL - FALSE FALSE: Measurement of friction characteristic


not active
TRUE: Measurement completed, friction
characteristic generated

aborted OUT BOOL - FALSE FALSE: Measurement was not interrupted


TRUE: Measurement was prematurely
interrupted

busy OUT BOOL - FALSE FALSE: Function block inactive


Siemens AG 2014 All rights reserved

TRUE: Function block active

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to error
identification

errorID OUT DWORD - 16#0000_0 Error identification, refer to error messages


000 errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

speedSetpoint OUT REAL - 0.0 [ rpm ] Speed setpoint for drive control
Copyright

Functionality
The function block measures the friction characteristic (speed/torque breakpoints)
of a specific mechanical system. Speed setpoints are taken and torque values are
saved in the specified data area referenced by dbPointer. The data structure
contains breakpoints of the characteristic (x value: speed, y value: torque), while
the speed setpoint value has to be specified before starting the function block.
The user has to possibility to let the function block pre-assign the speed values into
the data block. For this the input parameter maxSpeed must be unequal to zero.
The speed values will be distributed evenly according to the length of the data
block. The first entry will always be zero speed with zero torque.
The function block is started using the input enable. Once started, the output
speedSetpoint outputs the drive’s speed based on the values in the breakpoint
table. If the input warmupTime > 0.0, the drive moves for this defined period of time
at the maximum speed before starting the measurement of the corresponding
torque values.
The actual torque value of the drive must be connected to the actualTorque input
of the function block. The torque values are averaged with a defined number of
samplings specified by input valueNumber. The ramp times for changing the speed
setpoint are specified using the input ramptime. If the sequence is active, done =
FALSE and busy = TRUE. If finished, done = TRUE and busy = FALSE.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 93
4 Functional Description
4.6 Drive related function blocks

If an error occurs during the sequence, this is displayed at the error output and the
associated errorID. If the abort signal abort is set to TRUE the measurement is
interrupted and the setpoint ramped to zero.

Timing diagram
Siemens AG 2014 All rights reserved
Copyright

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#3103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#3103_8003 Less than two pairs of values in the breakpoint table or uneven
entries in the table.

16#3103_8005 Invalid configuration data:


Pointer is not addressing a data block
Pointer is addressing a write protected data block

16#3103_84A1 Data block number larger than allowed or zero (SFC 24 /


TEST_DB)

16#3103_84B1 Data block does not exist (SFC 24 / TEST_DB)

16#3103_84B2 Data block unlinked (SFC24 / TEST_DB)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 94
4 Functional Description
4.7 Sectional Drive

4.7 Sectional Drive


4.7.1 SectionalConfigSetup

This function block is used to enter individual configuration data into a sectional
drive configuration data structure used by the sectional drive function block.
The function block can be called in any task. ID: 6001

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 95
4 Functional Description
4.7 Sectional Drive

Input and Output Parameters

Name Type Data M/O Initial Description


type value

metricUnits IN BOOL O TRUE FALSE: Imperial


TRUE: Metric

jogVelocity IN REAL O 10.0 [ LU/min ] Jog velocity setpoint (no ramp)

speedMatchRamp IN REAL O 0.5 [ s ] Ramp time for acceleration to line speed


Time

diameter IN REAL O 1.0 [ m or inch ] Diameter value

kpAdaptionValue IN REAL O 0.0 TPID - Kp-Adaption signal

holdIntChannel IN BOOL O TRUE FALSE: TPID – Normal integrator operation


TRUE: TPID - Hold (freeze) integrator

setIntChannel IN BOOL O FALSE FALSE: TPID - Normal integrator operation


TRUE: TPID - Set integrator channel to
intSetValue

x1 IN REAL O 0.0 TPID - Abscissa-1 for KP-adaption(1)


Siemens AG 2014 All rights reserved

kp1 IN REAL O 1.0 TPID - KP-adaption point(1)

x2 IN REAL O 0.0 TPID - Abscissa-2 for KP-adaption(2)

kp2 IN REAL O 1.0 TPID - KP-adaption point(2)

limRampTime IN REAL O 1000.0 [ ms ] TPID - Ramp-up time for PID controller


output limiting

setNominalValue IN REAL O 100.0 TPID - Normalisation value for setpoint RFG


Copyright

setRampTime IN REAL O 1000.0 [ ms ] TPID - Ramp up time for setpoint RFG

integTime IN REAL O 2000.0 [ ms ] TPID - Integration time constant

derivTime IN REAL O 0.0 [ ms ] TPID - Differentiation time constant

filterTime IN REAL O 10.0 [ ms ] TPID - Actual value filter time constant

intSetValue IN REAL O 0.0 TPID - Integrator set value

derivControlMode IN BOOL O FALSE FALSE: TPID – D-Action acts on system


deviation
TRUE: TPID - D-Action acts in the actual value

deadBand IN REAL O 0.0 TPID - Deadband parameter

outValueFactor IN REAL O 1.0 TPID - Output scaling factor

upperLimit IN REAL O 20.0 TPID - Controller output upper limit

lowerLimit IN REAL O -20.0 TPID - Controller output lower limit

overrideVelocity IN REAL O 10.0 [ LU/min ] Speed controller bias (override,


overcontrol) for torque controlled modes

TensionAdjustme IN REAL O 1.0 1.0 = 100%


nt Tension torque adjustment factor

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 96
4 Functional Description
4.7 Sectional Drive

Name Type Data M/O Initial Description


type value

tensionReference IN REAL O 0.0 [ N or lbf ] Reference value for tension setpoint. If


set to zero the setpoint is interpreted as absolute
value instead of a percentage.

JFixed IN REAL O 0.0 [ kgm2 or lbft / s2 ] Fixed moment of inertia, motor


side

JMandrel IN REAL O 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, load


side

JMotor IN REAL O 0.0 [ kgm2 or lbft/s2 ] Motor inertia

frictionAdjustment IN REAL O 0.0 1.0 = 100%


Adjustment factor of the friction characteristic
output. With 0.0 friction compensation is off.

maxVelocity IN REAL M - [ LU/min ] Max velocity for normalization

gearRatio IN REAL M - Gear Ratio, Motor/Load

referenceSpeed IN REAL M - [ rpm ] Normalization speed of drive (p2000)

referenceTorque IN REAL M - [ Nm ] Normalization torque of drive (p2003)


Siemens AG 2014 All rights reserved

logAddr IN INT M - Logical address of the drive

SectionalConfig OUT Section - - Sectional drive configuration Data


al
Config
Type
Copyright

Functionality
This function creates one output structure of SectionalConfigType from the
configuration parameters. This is done to reduce the number of input variables on
the sectional drive function block but still give the user easy access.

4.7.2 TorquePrecontrol

Torque pre-control calculation.


The function block has to be called in a cyclic task. ID: 6101

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 97
4 Functional Description
4.7 Sectional Drive

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and Output Parameters


Name Type Data M/O Initial Description
type value

enable IN BOOL M FALSE FALSE: Deactivate Function block


TRUE: Activate function block

metricUnits IN BOOL O TRUE FALSE: Imperial


Copyright

TRUE: Metric

typeOfDrive IN INT M 0 Drive type:


0: Pull
1: Held

driveSpeed IN REAL O 0.0 [ rpm ] Actual drive speed (for the friction
characteristic)

lineAcceleration IN REAL M 0.0 [ LU/s2 ] Actual line acceleration

diameter IN REAL M 0.0 [ m or inch ] Diameter value

tensionSetpoint IN REAL O 0.0 [ N or lbf ] Tension setpoint values

jFix IN REAL O - [ kgm2 or lbft/s2 ] Fixed moment of inertia,


motor side

jMandrel IN REAL O - [ kgm2 or lbft/s2 ] Fixed moment of inertia,


load side

jMot IN REAL O - [ kgm2 or lbft/s2 ] Motor inertia

gearRatio IN REAL M - Gear Ratio, Motor/Load

frictionAdjustment IN REAL O - 1.0 = 100%


Adjustment factor of the friction
characteristic output. With 0.0 friction
compensation is off.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 98
4 Functional Description
4.7 Sectional Drive

Name Type Data M/O Initial Description


type value

tensionAdjustment IN REAL O - 1.0 = 100%


Tension torque adjustment factor

dbPointer IN ANY O - Pointer to breakpoint table of the friction


characteristic, x: speed, y: torque
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Offset: 8 REAL x2 value
Offset: 12 REAL y2 value
.. .. .. ..
Length defined by size of the data area, min.
length 16 bytes for two breakpoints.

busy OUT BOOL - FALSE FALSE: Function block not activated


TRUE: Function block active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorID OUT DWORD - 16#000 Error identification, refer to error messages


0_0000 errorID 16#0000_8000: warning
Siemens AG 2014 All rights reserved

errorID 16#0000_8000: error

totalInertia OUT REAL - 0.0 [ kgm2 or lbft / s2 ] Total inertia of the


mechanical system, reflected to the motor
side

preCtrlMotor OUT REAL - 0.0 [ Nm ] Motor torque from friction and


acceleration

totalTorquePreCtrl OUT REAL - 0.0 [ Nm ] Sum of motor torque


Copyright

tensionTorque OUT REAL - 0.0 [ Nm ] Motor torque from tension.

Functionality
The block determines the pre-controlled torque for v/ t
The torque pre-control outputs the following torque setpoints to pre-control the
drive:
A torque setpoint as a function of the acceleration setpoint of the
machine/system ramp-function generator and the inertia
Friction torque setpoint is generated depending on the drive speed using a
characteristic.
Tension torque based on the tension setpoint and the diameter
In order to quickly compensate for disturbances and to implement the closed-loop
control in the first place (for a replacing speed control), the torque to be provided
from the drive must be specified as accurately as possible. Depending on the
control type, this is either realized additively after the speed controller or by
dynamically adjusting the torque limits.
In both cases the appropriate torque must be calculated using its moment of inertia
and transferred to the drive.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 99
4 Functional Description
4.7 Sectional Drive

As an alternative to the method integrated in this block, the integrated friction


characteristic of the drive system (SINAMICS) can also be used.

NOTICE The precise setting of the compensation is particularly important for indirect
tension control. This is so that the torque-generating current emulates, as far as
possible, the material tension.

Calculations
The function block FBTorquePrecontrol calculates the following physical quantities:
Quantity Formula

Total moment of inertia JMandrel


TotalInertia JMot JFix
GearRatio 2
Angular acceleration of the lineAcceleration GearRatio
drive 2
diameter
Siemens AG 2014 All rights reserved

Acceleration torque M accel TotalInert ia


Friction torque M frict f (n)

Tension torque tensionSetpo int tensionAdjustment diameter


M tension
2 gearRatio

This friction torque is internally determined using the function block TableChar. The
user is responsible for providing valid and sensible values in the appropriate data
Copyright

fields. If the factor FrictionAdjustment is set to 0.0 TableChar is not called and
therefore a frictional torque is not added.
The pre-control torque of the motor, the sum of all pre-control torques and the
tension torque are calculated depending on the drive type. The total torque is
always the sum of the preCtrlMotor and tensionTorque.

Drive mode Total torque

Pull MpreCtrlMotor = Macc + Mfrict MtensionTorque = MtensionTorque


Held MpreCtrlMotor = Macc + Mfrict MtensionTorque = - MtensionTorque

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 100
4 Functional Description
4.7 Sectional Drive

Block diagram
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 101
4 Functional Description
4.7 Sectional Drive

Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description

16#0000_0000 No Warning

16#6101_4005 The table of entered values is not monotonically (steadily) increasing


-> no matching value found

16#6101_4008 The table of entered values is not monotonically (steadily) increasing


-> 2 values are identical

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error
Siemens AG 2014 All rights reserved

16#6101_8003 Less than two pairs of values in the breakpoint table or uneven
number of points.

16#6101_8005 One or more configuration values are invalid.


gearRatio 0.0
Jfix < 0.0
Jmandel < 0.0
Jmot < 0.0
typeOfDrive < 0
typeOfDrive > 1
Copyright

The configuration data are checked for plausibility at the rising edge
of enable.
Pointer is not addressing a data block.

16#6101_8006 Invalid diameter value


diamActVal 0.0

16#6101_84A1 Data block number bigger than allowed or zero (SFC 24 / TEST_DB)

16#6101_84B1 Data block not existent (SFC 24 / TEST_DB)

16#6101_84B2 Data block unlinked (SFC24 / TEST_DB)

4.7.3 SectionalDrive

This function block is used to control a converting line sectional drive from a PLC
program. The function block was designed to handle the requirements of a tension
or ratio adjusted driven section.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 7101

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 102
4 Functional Description
4.7 Sectional Drive

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and Output parameters


Name Type Data M/O Initial Description
type value

enable IN BOOL M FALSE FALSE: Function block disabled


TRUE: Rising edge enables
communication and saves parameters

onOFF1 IN BOOL M FALSE FALSE: Drive disabled


TRUE: Enable drive

noOFF2 IN BOOL M FALSE FALSE: Coast stop request


TRUE: No coast stop request

noOFF3 IN BOOL M FALSE FALSE: Fast stop request


TRUE: No fast stop request

ackFaults IN BOOL O FALSE FALSE: No fault acknowledgement


TRUE: Rising edge, acknowledge faults

openBrake IN BOOL O FALSE If motor is equipped with holding brake:


FALSE: Brake controlled by brake control
TRUE: Release brake

infeedOperation IN BOOL M FALSE FALSE: Infeed disabled


TRUE: Infeed enabled, DC bus is ready

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 103
4 Functional Description
4.7 Sectional Drive

Name Type Data M/O Initial Description


type value

driveKp IN REAL O 100.0 [ % ] Speed controller gain adaption value.


At 100% the effective Kp = p1460 in the
drive.

lineVelocity IN REAL M 0.0 [ LU/min ] Master line velocity

additionalVelocity IN REAL O 0.0 [ LU/min ] Additional velocity (always


enabled)

draw IN REAL M 1.0 [ - ] Percent ratio to master line speed, 1.0 =


100%

typeOfDrive IN INT O 0 Specifies the drive mode:


0: PULL
1: HELD
Value is saved upon rising edge of enable.

controlMode IN INT O 0 Specifies the tension control mode:


0: DANCER_SPEED_ADAPT
1: DANCER_SPEED_ADAPT_HD
2: TENSION_SPEED_ADAPT
3: TENSION_SPEED_ADAPT_HD
4: TENSION_TORQUE_ADAPT
Siemens AG 2014 All rights reserved

5: INDIRECT
6: DRAW_CONTROL
Value is saved upon rising edge of enable.

jogPos IN BOOL O FALSE FALSE: No jog operation


TRUE: Start Jog forward at Jog Sp

jogNeg IN BOOL O FALSE FALSE: No jog operation


TRUE: Start Jog reverse at Jog Sp

frictionDbPointer IN ANY O -
Copyright

Pointer to breakpoint table of the friction


characteristic, x: speed, y: torque
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Offset: 8 REAL x2 value
Offset: 12 REAL y2 value
.. .. .. ..
Length defined by size of the data area,
min. length 16 bytes for two breakpoints.

CtrlEnable IN BOOL O FALSE FALSE: TPID and tension not enabled


TRUE: TPID enable

CtrlSetpoint IN REAL O 0.0 TPID Setpoint

CtrlActual IN REAL O 0.0 TPID actual value

SectionalConfig IO sectional M - This data type includes all configuration


Config data required for parameterization of the
Tpye SectionalDrive function block

busy OUT BOOL - FALSE FALSE: Block disabled, no communication


active
TRUE: Block active, valid configuration,
communication active

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 104
4 Functional Description
4.7 Sectional Drive

Name Type Data M/O Initial Description


type value

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to
error identification

errorID OUT DWORD - 16#0000 Error identification, refer to error messages


_0000 errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

driveReadyToPowerUp OUT BOOL - FALSE FALSE: Missing enables


TRUE: Drive is ready

driveReadyForMotion OUT BOOL - FALSE FALSE: Missing enables


TRUE: Drive enabled for motion

driveZeroSpeed OUT BOOL - TRUE FALSE: Shaft speed not zero


TRUE: Actual shaft speed at zero

driveFault OUT BOOL - FALSE FALSE: No drive fault


TRUE: Drive fault present

driveFaultCode OUT DINT - 0 Drive fault code, refer to drive manual for
Siemens AG 2014 All rights reserved

more information (r2131 from the drive)

driveSpeedActual OUT REAL - 0.0 [ rpm ] Speed actual value (r63 from the
drive)

driveTorqueActual OUT REAL - 0.0 [ Nm ] Torque actual value (r80 from the
drive)

driveTorqueActualFtlbs OUT REAL - 0.0 [ ft/lbs ] Torque actual value

driveTorqueActual OUT REAL - 0.0 [ % ] Torque actual value in percent of


Copyright

Percent nominal torque

actShaftSpeed OUT REAL - 0.0 [ rpm ] Actual shaft speed

actVelocity OUT REAL - 0.0 [ LU/min ] Actual line velocity

setDriveSpeed OUT REAL - 0.0 [ rpm ] Speed setpoint to drive

pidOutValue OUT REAL - 0.0 TPID controller output

pidEffectiveKp OUT REAL - 0.0 TPID effective Kp

pidUpperLimitReached OUT BOOL - FALSE TPID at upper limit

pidLowerLimitReached OUT BOOL - FALSE TPID at lower limit

Functionality
This function block utilizes the DriveControl, SetpointChannel, TorquePrecontrol
and TechPID function blocks of the Simatic Converting Toolbox. This function block
checks for valid configuration data and calls the individual function blocks to
minimize application development time.
With the enable set to true a plausibility check is done on the configuration data
and will display an error with corresponding error Id should invalid data be entered.
This input allows control functionality. With the function block enabled the

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 105
4 Functional Description
4.7 Sectional Drive

driveControl function block will become active, which in turn will set the busy output
true.
With the enables set true the sectional drive will follow the sum of the lineVelocity
and additionalVelocity multiplied by the draw factor. Sectional drives are typically
made to follow the master without any ramps. The programmer is responsible for
proper interlocks to prevent unwanted behavior.
The configuration data has diameter, gear ratio and max line speed parameters
which are utilized to calculate the correct surface velocity of the driven roll to match
the section to the master line velocity.
The configuration data also has parameters for torque pre-control. Torque pre-
control is necessary for torque based tension control modes and is optional for
speed based tension control modes. Speed based tension control modes with the
_HD (high dynamic) prefix utilize torque pre-control.
With the enable set to true and DrvReadyForMotion and Cntrlenable then the
CntrlSetpoint will be ramped up based on configuration data. The Tension
controller correction value will be added to the total speed setpoint or additional
torque, scaled and sent to the drive using the driveControl function block as
required.
Function block output parameters allow the user to view the calculated surface
velocity of the section (actVelocity), the section’s actual shaft speed
Siemens AG 2014 All rights reserved

(actshaftSpeed), motor actual speed in RPM (actdriveSpeed), motor torques


(driveTorqueActual, driveTorqueActualFtlbs, driveTorqueActualPercent) and
pertinent PID data.

Tension operating modes


The following overview shows the tension operating modes depending on the
position of the dancer or tension measuring devices location in relation to the web
Copyright

axis as well as the orientation of the setting variables (speed, force, torque). The
tension operating mode is selected by the typeOfDrive input of the function block.

The following table shows the different tension operating modes and the direction
of velocity, tension and torque. During commissioning of the application it must be
ensured that the direction convention and signs of the process variables are

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 106
4 Functional Description
4.7 Sectional Drive

aligned. It may might be necessary to change the direction of rotation in the drive
system.
Operation Representation Description
mode

PULL V: Machine velocity


F: Tension in material line

n: speed of drive
nO: velocity override for speed
controller overcontrol

Mf: Friction torque


HELD MP: Pre-control torque
MT: Tension torque
Siemens AG 2014 All rights reserved

Block diagram
Copyright

Warning Messages
Warnings are indicated by the status of the outputs error and errorID:
error = FALSE and errorID <> 16#0000_0000

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 107
4 Functional Description
4.7 Sectional Drive

ErrorID Description

16#0000_0000 No Warning

16#3101_4009 Communication error while reading from bus system (DriveControl)

16#3101_400A Communication error while writing on bus system (DriveControl)

16#6101_4005 The table of entered values is not monotonically (steadily) increasing ->
no matching value found (Torque Precontrol, friction table)

16#6101_4008 The table of entered values is not monotonically (steadily) increasing -> 2
values are identical (Torque Precontrol, friction table)

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#3101_8005 Invalid configuration data: (DriveControl)


Siemens AG 2014 All rights reserved

logAddr 0
referenceSpeed 0.0
referenceTorque 0.0

16#3101_8065 Torque Limits may not be plausible any more; a break in the web could
cause this problem. Axis runs in the opposite direction too fast. Reaction:
brake with full torque. (DriveControl)

16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(SetpointChannel)
Copyright

16#3102_8005 Invalid configuration data: (SetpointChannel)


maxVelocity 0.0
gearRatio = 0.0
The configuration data are checked for plausibility at the rising edge of
enable.

16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB35. (TPID)

16#1108_8005 Invalid configuration data: (TPID)


setNominalValue 0.0
upperlimit < lowerlimit

16#6101_8003 Less than two pairs of values in the breakpoint table or uneven number
of points. (Torque Precontrol, friction table)

16#6101_8005 One or more configuration values are invalid. (Torque Precontrol)


gearRatio 0.0
Jfix < 0.0
Jmandel < 0.0
Jmot < 0.0
typeOfDrive < 0
typeOfDrive > 1
The configuration data are checked for plausibility at the rising edge of
enable.
Pointer is not addressing a data block. (Torque Precontrol, friction table)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 108
4 Functional Description
4.8 Winder function blocks

ErrorID Description

16#6101_8006 Invalid diameter value (Torque Precontrol)


diamActVal 0.0

16#6101_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)
(Torque Pre-control, friction table)

16#6101_84B1 Data block does not exist (SFC 24 / TEST_DB) (Torque Precontrol,
friction table)

16#6101_84B2 Data block unlinked (SFC24 / TEST_DB) (Torque Precontrol, friction


table)

16#7101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#7101_8005 Invalid configuration data


controleMode < 0
controlMode > 6
typeOfDrive < 0
typeOfDrive > 1
sectionalConfig.diameter 0.0
sectionalConfig.maxVelocity = 0.0
sectionalConfig.gearRatio = 0.0
sectionalConfig.referenceSpeed = 0.0
sectionalConfig.referenceTorque = 0.0
Siemens AG 2014 All rights reserved

sectionalConfig.logAddr = 0
The configuration data are checked for plausibility at the rising edge of
enable.
Copyright

4.8 Winder function blocks

4.8.1 DiamCalcDivision

This function block is used to calculate the diameter of a winder by dividing the
material velocity by the winding shaft speed.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5101

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 109
4 Functional Description
4.8 Winder function blocks

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and Output Parameters


Name Type Data type M/O Initial Description
value

enable IN BOOL M FALSE FALSE: Function block disabled


Copyright

TRUE: Function block enabled

holdDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Hold diameter calculation

metricUnits IN BOOL O TRUE FALSE: Imperial


TRUE: Metric

setDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Set diameter to diameter set value

diameterSetValue IN REAL O 1.0 [ m or inch ] Diameter set value

lineVelocity IN REAL M 0.0 [ LU/min ] Line velocity

shaftSpeed IN REAL M 0.0 [ rpm ] Actual shaft speed

minDia IN REAL M 0.1 [ m or inch ] Minimum diameter

maxDia IN REAL M 2.0 [ m or inch ] Maximum diameter

minLineVelocity IN REAL O 5.0 [ LU/min ] Minimum line velocity for


calculation

minShaftSpeed IN REAL O 5.0 [ rpm ] Minimum shaft speed for calculation

lineFilterTime IN REAL O 20.0 [ ms ] Filter time of the line velocity

shaftFilterTime IN REAL O 20.0 [ ms ] Filter time of the shaft speed

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 110
4 Functional Description
4.8 Winder function blocks

Name Type Data type M/O Initial Description


value

diameterFilter IN REAL O 50.0 [ ms ] Filter time for the calculated diameter


Time

diameter IO REAL - - [ m or inch ] Diameter

busy OUT BOOL - FALSE FALSE: Function block inactive


TRUE: Function block active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorID OUT DWORD - 16#0000 Error identification, refer to error messages


_0000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

atMinDia OUT BOOL - FALSE At minimum diameter

atMaxDia OUT BOOL - FALSE At maximum diameter


Siemens AG 2014 All rights reserved

Functionality
The function block determines the actual diameter value (diameter) of the roll being
wound (or unwound) using the following input quantities:
Web velocity (lineVelocity) - the web velocity is the setpoint velocity of the
machine and the velocity with which the main drive moves the material web. In
exceptional cases it is possible to use the actual value from a tachometer
measuring the web speed.
Shaft speed of the mandrel (shaftSpeed) – Actual speed of the winder shaft.
Copyright

The actual motor speed is converted to the roll shaft (by the gear ratio) and is
used to calculate the diameter.
The calculation is based on the D = v/( *n) formula.

Quantity Metric Imperial

line velocity m/min ft/min

winder shaft speed rpm rpm

diameter meter (m) inch (in)

The holdDiameter input will pause the diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diameterSetvalue as the diameter as long as the
actual shaft speed is below minimum shaft speed. The set value is limited by the
minimum and maximum diameter.
With actual line velocity above the line minimum velocity y and the actual shaft
speed above minimum shaft speed and not held, the diameter is calculated. The
result of the division is limited and smoothed.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 111
4 Functional Description
4.8 Winder function blocks

Block diagram
Siemens AG 2014 All rights reserved

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Copyright

ErrorID Description

16#0000_0000 No error

16#5101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#5101_8005 Invalid configuration data:


minDia 0.0
maxDia 0.0
minDia maxDia
minLineVelocity 0.0
minShaftSpeed 0.0
The configuration data are checked for plausibility at the rising edge of
enable.

4.8.2 DiamCalcIntegral

This function block is used to calculate the diameter of a winder by dividing the
material length change by the number of winding shaft revolutions.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5103

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 112
4 Functional Description
4.8 Winder function blocks

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and Output Parameters


Name Type Data type M/O Initial value Description

enable IN BOOL M FALSE FALSE: Function block disabled


TRUE: Function block enabled
Copyright

holdDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Hold diameter calculation

metricUnits IN BOOL O TRUE FALSE: Imperial


TRUE: Metric

setDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Set diameter to diameter set
value

diameterSetValu IN REAL O 1.0 [ m or inch ] Diameter set value


e

linevelocity IN REAL M 0.0 [ LU/min ] Line velocity

shaftSpeed IN REAL M 0.0 [ rpm ] Actual shaft speed

minDia IN REAL M 0.1 [ m or inch ] Minimum diameter

maxDia IN REAL M 2.0 [ m or inch ] Maximum diameter

minLineVelocity IN REAL O 0.5 [ LU/min ] Minimum line velocity for


calculation

minShaftSpeed IN REAL O 0.5 [ rpm ] Minimum shaft speed for


calculation

lineFilterTime IN REAL O 20.0 [ ms ] Filter time of the line velocity

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 113
4 Functional Description
4.8 Winder function blocks

Name Type Data type M/O Initial value Description

shaftFilterTime IN REAL O 20.0 [ ms ] Filter time of the shaft speed

Measuring IN REAL O 2.0 [ rev ] Winder shaft revolutions for


RevolutionCount diameter calculation interval

diameter IO REAL - - [ m or inch ] Diameter

busy OUT BOOL - FALSE FALSE: Function block inactive


TRUE: Function block active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorID OUT DWORD - 16#0000_0 Error identification, refer to error


000 messages
errorID 16#0000_8000: warning
errorID 16#0000_8000: error

atMinDia OUT BOOL - FALSE At minimum diameter

atMaxDia OUT BOOL - FALSE At maximum diameter


Siemens AG 2014 All rights reserved

Functionality
The diameter calculator determines the actual diameter value (diameter) of the roll
being wound (or unwound) using the input quantities:
Web velocity (lineVelocity) - the web velocity is the setpoint velocity of the
machine and the velocity with which the main drive moves the material web. In
exceptional cases, it is possible to use the actual value from a tachometer
Copyright

which is used to measure the web speed.


Shaft speed of the mandrel (shaftspeed) – Actual speed of the winder shaft.
The actual motor speed is converted to the roll shaft speed (using the gear
ratio) and is used to calculate the diameter.
The integral diameter calculation is also based on the division of the integral of the
web velocity by the integral of the angular velocity. However, v and are
integrated over a number of roll revolutions that can be specified by
measuringRevolutionCount. This is to minimize the disturbing effect of processing
just individual values. The following applies:
Diameter 2 * ( s / )

Quantity Metric Imperial

line velocity m/min ft/min

winder shaft speed rpm rpm

diameter meter (m) inch (in)

angle rad rad

length m ft

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 114
4 Functional Description
4.8 Winder function blocks

When set to true the holdDiameter input will pause the diameter calculation and
hold the resulting diameter at the current value.
As long as the actual shaft speed is below the minimum shaft speed the
setDiameter input writes the diametersetvalue as the diameter. The set diameter is
limited.
When the actual line velocity is above minimum and the actual shaft speed is
above and not held, the diameter is calculated. The result is limited and
interpolated.
If the number of revolutions of the winding shaft - specified by parameter
measuringRevolutionCount – is reached, then the integrators are reset. One
integrator will give the length change of the material for the specified number of
winder shaft revolutions. From these two values the (average) diameter can be
calculated.
Additionally ,based on the diameter change, the actual material thickness is
calculated in every measuring interval, e.g. for remaining length calculation.
Thickness = |diameterNew – diameterOld|/measuringRevolutionCount

Block Diagram
Siemens AG 2014 All rights reserved
Copyright

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#5103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 115
4 Functional Description
4.8 Winder function blocks

ErrorID Description

16#5103_8005 Invalid configuration data:


minDia 0.0
maxDia 0.0
minDia maxDia
measuringRevolutionCount 0.0
minLineSVelocity 0.0
minShaftSpeed 0.0
The configuration data are checked for plausibility at the rising edge of
enable.

4.8.3 DiamCalcAddition

This function block is used to calculate the diameter of a winder roll being wound
by adding twice the material thickness per winding shaft revolution.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5102

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and Output Parameters


Name Type Data type M/O Initial Description
value

enable IN BOOL M FALSE FALSE: Function block disabled


TRUE: Function block enabled

holdDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Hold diameter calculation

setDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Set diameter to diameter set value

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 116
4 Functional Description
4.8 Winder function blocks

Name Type Data type M/O Initial Description


value

typeOfWinder IN INT M 0 Winder type:


0: Rewind from above
1: Rewind from below
2: Unwind from above
3: Unwind from below

diameterSetValue IN REAL O 1.0 [ m or inch ] Diameter set value

webThickness IN REAL M 0.001 [ m or inch ] Web thickness

minDia IN REAL M 0.1 [ m or inch ] Minimum diameter

maxDia IN REAL M 2.0 [ m or inch ] Maximum diameter

minShaftSpeed IN REAL O 0.5 [ rpm ] Minimum shaft speed for calculation

shaftSpeed IN REAL M 0.0 [ rpm ] Actual shaft speed

shaftFilterTime IN REAL O 20.0 [ ms ] Filter time of the shaftSpeedActual

diameter IO REAL - - [ m or inch ] Diameter

busy OUT BOOL - FALSE FALSE: Function block inactive


Siemens AG 2014 All rights reserved

TRUE: Function block active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorID OUT DWORD - 16#0000 Error identification, refer to error messages


_0000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

atMinDia OUT BOOL - FALSE At minimum diameter


Copyright

atMaxDia OUT BOOL - FALSE At maximum diameter

Functionality
The diameter calculator determines the actual diameter value (diameter) of the roll
being wound (or unwound) using the input quantities:
Web Thickness - the actual web (material) thickness.
Shaft speed of the mandrel (shaftSpeed) – Actual speed of the winder shaft.
The actual motor speed is converted to the roll shaft speed (using the gear
ratio) and is used to calculate the diameter.
The holdDiameter input will pause the diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diametersetvalue as the diameter as long as the
actual shaft speed is below minimum shaft speed. The diameter set value is
limited.
With the actual shaft speed above minimum and not held, the diameter is
calculated by integrating the diameter change rate based on the web thickness and
mandrel speed. The result of the integration is limited and smoothed.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 117
4 Functional Description
4.8 Winder function blocks

NOTICE This calculation method relies very much on the accuracy of the material
thickness and the starting diameter value. Any deviation between the actual
effective material thickness and the set material thickness will lead to an
incorrect diameter, whose error will increase with each revolution. An incorrect
initial value will remain as an offset between the actual and the calculated
diameter.
This calculation mode is mostly useful for metals where air entrapment and
inwound tension does not influence the effective material thickness.

Block diagram
Siemens AG 2014 All rights reserved
Copyright

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#5102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#5102_8005 Invalid configuration data:


minDia 0.0
maxDia 0.0
minDia maxDia
webThickness 0.0
minShaftSpeed 0.0
typeOfWinder < 0
typeOfWinder > 0
The configuration data are checked for plausibility at the rising edge of
enable.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 118
4 Functional Description
4.8 Winder function blocks

4.8.4 WITorquePrecontrol

Torque pre-control calculation for a winder.


The function block has to be called in a cyclic task. ID: 4102

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

Input and Output Parameters


Name Type Data type M/O Initial Description
value

enable IN BOOL M FALSE FALSE: Deactivate Function block


TRUE: Activate function block

torqueOn IN BOOL M FALSE FALSE: Only inertia calculation


TRUE: Activate torque calculation

metricUnits IN BOOL O TRUE FALSE: Imperial


TRUE: Metric

typeOfWinder IN INT M 0 Winder type:


0: Rewind from above
1: Rewind from below
2: Unwind from above
3: Unwind from below

driveSpeed IN REAL O 0.0 [ rpm ] Actual winder speed (for the friction
characteristic)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 119
4 Functional Description
4.8 Winder function blocks

Name Type Data type M/O Initial Description


value

lineAcceleration IN REAL M 0.0 [ m/s2 or ft/s2 ] Actual line acceleration

diamActVal IN REAL M 0.0 [ m or inch ] Diameter actual value

tensionSetpoint IN REAL O 0.0 [ N or lbf ] Tension setpoint values

density IN REAL M - [ kg/m3 or lb/ft3 ] Material density

diamMin IN REAL M - [ m or inch ] Minimum diameter

diamMax IN REAL M - [ m or inch ] Maximum diameter

width IN REAL M - [ m or inch ] Width of the material

fillFactor IN REAL O - 1.0 = 100%


Material fill factor (used in the case of
materials being traversed such as wire)

jFix IN REAL O - [ kgm2 or lbft/s2 ] Fixed moment of inertia,


motor side

jMandrel IN REAL O - [ kgm2 or lbft/s2 ] Fixed moment of inertia,


load side
Siemens AG 2014 All rights reserved

jMot IN REAL O - [ kgm2 or lbft/s2 ] Motor inertia

gearRatio IN REAL M - Gear Ratio, Motor/Load

frictionAdjustment IN REAL O - 1.0 = 100%


Adjustment factor of the friction
characteristic output. With 0.0 friction
compensation is inactive.

tensionAdjustment IN REAL O - 1.0 = 100%


Copyright

Tension torque adjustment factor

dbPointer IN ANY O - Pointer to breakpoint table of the friction


characteristic, x: speed, y: torque
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Offset: 8 REAL x2 value
Offset: 12 REAL y2 value
.. .. .. ..
Length defined by size of the data area, min.
length 16 bytes for two breakpoints.

busy OUT BOOL - FALSE FALSE: Function block not activated


TRUE: Function block active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorID OUT DWORD - 16#000 Error identification, refer to error messages


0_0000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

totalInertia OUT REAL - 0.0 [ kgm2 or lbft/s2 ] Total inertia of the


mechanical system, reflected to the motor
side

mass OUT REAL - 0.0 [ kg or lbft ] Mass of the material

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 120
4 Functional Description
4.8 Winder function blocks

Name Type Data type M/O Initial Description


value

preCtrlMotor OUT REAL - 0.0 [ Nm ] Motor torque from friction and


acceleration

totalTorquePreCtrl OUT REAL - 0.0 [ Nm ] Sum of motor torque

variableInertia OUT REAL - 0.0 [ kgm2 or lbft/s2 ] Inertia resulting from the
material, reflected to the motor side.

maxInertia OUT REAL - 0.0 [ kgm2 or lbft/s2 ] Maximum inertia (at


maximum diameter).

tensionTorque OUT REAL - 0.0 [ Nm ] Motor torque from tension.

Functionality
The block determines the following:
The variable moment of inertia for Kp adaptation of the speed and tension
controller
The pre-controlled torque for v/ t
Siemens AG 2014 All rights reserved

The torque pre-control outputs the following torque setpoints to pre-control the
winder drive:
A torque setpoint as a function of the acceleration setpoint of the
machine/system ramp-function generator and the inertia
Friction torque setpoint is generated depending on the shaft speed of the
winder using a characteristic.
Tension torque based on the tension setpoint and the diameter
Copyright

In order to quickly compensate for disturbances and to implement the closed-loop


control in the first place (for a replacing speed control), the torque to be provided
from the drive must be specified as accurately as possible. Depending on the
control type, this is either realized additively after the speed controller or by
dynamically adjusting the torque limits.
In both cases, starting from the weight of the wound material, the appropriate
torque must be calculated using its moment of inertia (wound material) and
transferred to the drive.
As an alternative to the method integrated in this block, the integrated friction
characteristic of the drive system (SINAMICS) can also be used.

NOTICE The precise setting of the compensation is especially important for indirect
tension control. This is so that the torque-generating current emulates, as far as
possible, the material tension.

Calculations
The function block FBWITorquePrecontrol calculates the following physical
quantities:

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 121
4 Functional Description
4.8 Winder function blocks

Quantity Formula

Mass of the wound Density Width diamActVal 2 DiamMin 2


material Mass
4
Moment of inertia of the diamActVal 2 DiamMin 2
wound material VariableInertia Mass
8 GearRatio 2
Total moment of inertia JMandrel
TotalInertia VariableInertia JMot JFix
GearRatio 2
Maximum mass of the Density Width diamMax 2 DiamMin2
wound material massmax
4
Maximum moment of DiamMax 2 DiamMin 2
inertia of the wound variableInertiamax mass max
material 8
Maximum moment of variableIn ertiamax JMandrel
inertia MaxInertia JMot JFix
GearRatio 2
Angular acceleration of lineAcceleration GearRatio
the roll 2
diamActVal
Siemens AG 2014 All rights reserved

Acceleration torque M accel TotalInert ia


Friction torque M frict f (n)

Tension torque tensionSetpo int tensionAdjust diamActVal


M tension
2 gearRatio

This friction torque is internally determined using the function block TableChar. The
Copyright

user is responsible for providing valid and sensible values in the appropriate data
fields. If the factor FrictionAdjustment is set to 0.0, TableChar is not called and
therefore a frictional torque is not added.
The pre-control torque of the motor, the sum of all pre-control torques and the
tension torque are calculated depending on the winder type. The total torque is
always the sum of the preCtrlMotor and tensionTorque.
The winding mode is always defined assuming a positive line speed. If the leading
value becomes negative the winding mode will be inverted automatically (a
rewinder becomes an unwinder and vice versa). The same applies for winding from
above and from below. This inversion is automatic.

Winding mode Total torque

Rewind from above MpreCtrlMotor = Macc + Mfrict MtensionTorque = MtensionTorque

Rewind from below MpreCtrlMotor = - Macc + Mfrict MtensionTorque = - MtensionTorque

Unwind from above MpreCtrlMotor = Macc + Mfrict MtensionTorque = - MtensionTorque

Unwind from below MpreCtrlMotor = - Macc + Mfrict MtensionTorque = MtensionTorque

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 122
4 Functional Description
4.8 Winder function blocks

Block diagram
Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 123
4 Functional Description
4.8 Winder function blocks

Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description

16#0000_0000 No Warning

16#4102_4005 The table of entered values is not monotonically (steadily) increasing


-> no matching value found

16#4102_4008 The table of entered values is not monotonically (steadily) increasing


-> 2 values are identical

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#4102_8003 Less than two pairs of values in the breakpoint table or uneven number
of points.
Siemens AG 2014 All rights reserved

16#4102_8005 One or more configuration values are invalid – Check Min values, max
values and other settings.
gearRatio 0.0
density < 0.0
diamMin 0.0
diamMax diamMin
width < 0.0
fillFactor 0.0
Jfix < 0.0
Copyright

Jmandrel < 0.0


Jmot < 0.0
typeOfWinder < 0
typeOfWinder > 3
The configuration data are checked for plausibility at the rising edge of
enable.
Friction characteristic pointer is not addressing a data block.

16#4102_8006 Invalid diameter


diamActVal 0.0
diamActVal < diamMin

16#4102_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)

16#4102_84B1 Data block does not exist (SFC 24 / TEST_DB)

16#4102_84B2 Data block unlinked (SFC24 / TEST_DB)

4.8.5 RestLengthCalc

Calculation of the rest length of the coil


The function can be called in any task. ID:4001

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 124
4 Functional Description
4.8 Winder function blocks

Schematic LAD Representation

Input and Output parameters


Name Type Data type M/O Initial value Description

webThickness IN REAL M 0.0001 [ m or inch ] Thickness of the material

actualDiameter IN REAL M 0.0 [ m or inch ] Actual diameter of the coil

targetDiameter IN REAL M 0.0 [ m or inch ] Target diameter/end diameter of


the coil

offset IN REAL O 0.0 [ m or inch ] Offset of rest length of the coil


Siemens AG 2014 All rights reserved

RET_VAL OUT REAL - - [ m or inch ] Rest length of the coil

Functionality
Depending on the roll parameters that have been entered, the function calculates
the remaining length of the material on the roll. To do this the following data is
required – the thickness of the material on the roll (webThickness), the actual
Copyright

diameter (actualDiameter) and the diameter to be reached (targetDiameter). In this


case, the target diameter represents the end of the roll or the diameter to be
reached. Depending on whether the target diameter is greater than or less than the
actual diameter, the length of the material on the roll or the length of the material
still to be wound is output. The thickness of the material web (webThickness) is
limited using the internal constants MIN_THICKNESS and MAX_THICKNESS.
RET _ VAL * actualDiameter ² t arg etDiameter² offset
4 * webThickness

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 125
4 Functional Description
4.8 Winder function blocks

Winder mode Actual diameter Target diameter

winder d1 < d2 d2 (full roll, max. diameter)

unwinder d2 < d1 d1 (empty roll, min. diameter)

4.8.6 RestDiameterCalc

Calculation of the rest diameter of the coil


The function can be called in any task. ID: 4002

Schematic LAD Representation


Siemens AG 2014 All rights reserved

Input and Output Parameters


Name Type Data type M/O Initial value Description

webThickness IN REAL M 0.0001 [ m or inch ] Thickness of the material

actualDiameter IN REAL M 0.0 [ m or inch ] Actual diameter of the coil


Copyright

length IN REAL M 0.0 [ m or inch ] Length to unwind/rewind

rewind IN BOOL O FALSE FALSE: Unwinder


TRUE: Rewinder

RET_VAL IN REAL - - [ m or inch ] Remaining diameter to be


coiled

Functionality
The function uses the input parameters to calculate the target diameter of the roll.
The calculation relies on the material thickness (webThickness), the actual roll
diameter (actualDiameter) and the material length to be wound or unwound
(length). The winding mode is defined using the windingMode input. The material
thickness (webThickness) is internally limited (MIN_THICKNESS,
MAX_THICKNESS).
In case of a too high material length input the function result is zero.
Winder:
actualDiameter² webThickness length
RestDiameterCalc 2
4

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 126
4 Functional Description
4.8 Winder function blocks

Unwinder:
actualDiameter² webThickness length
RestDiameterCalc 2
4
Siemens AG 2014 All rights reserved

Winder mode Actual diameter Target diameter

Winder d1 < d2 d2 (full roll, max. diameter)

Unwinder d2 < d1 d1 (empty roll, min. diameter)


Copyright

4.8.7 Taper

Calculation of a reduction factor for the tension setpoint of a winder as a function of


the diameter
The function block can be called in any cyclic task. ID: 4101

Schematic LAD Representation

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 127
4 Functional Description
4.8 Winder function blocks

Input and Output parameters

Name Type Data M/O Initial Description


type Value

enable IN BOOL M FALSE FALSE: Function block is disabled


TRUE Function block is enabled

taperMode IN INT M - Selection of the taper mode:


0: No taper
1: Linear taper characteristic
2: Hyperbolic taper characteristic (max.
reduction at target diameter)
3: Hyperbolic taper characteristic (max.
reduction at infinite diameter)
4: Breakpoint Table

diamActVal IN REAL M 0.0 [ m or inch ] Actual diameter value

upperLimitTaper IN REAL O 100.0 [ % ] Max. taper value

lowerLimitTaper IN REAL O 0.0 [ % ] Min. taper value

taperRatio IN REAL O 0.0 [ % ] Reduction factor


Siemens AG 2014 All rights reserved

taperDiameterStart IN REAL O 0.2 [ m or inch ] Diameter starting value for the


tension reduction

taperDiameterMax IN REAL O 1.0 [ m or inch ] Max. diameter value

dbPointer IN ANY O - Pointer to breakpoint table of the taper


characteristic
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Offset: 8 REAL x2 value
Copyright

Offset: 12 REAL y2 value


.. .. .. ..
Length defined by size of the data area, min.
length 16 bytes for two breakpoints.

busy OUT BOOL - FALSE FALSE: Taper block inactive


TRUE: Taper block active

error OUT BOOL - FALSE FALSE: No error


TRUE: Error occurred, refer to error
identification

errorId OUT DWOR - 16#000 Error identification, refer to error messages


D 0_0000 errorID 16#0000_8000: warning
errorID 16#0000_8000: error

tensionTaper OUT REAL - 1.0 Taper reduction factor, typically


0 < tensionTaper < 1.0

Functionality
The tension taper characteristic is used to define with which tension the material
should be wound onto the roll as a function of the roll diameter. The tension taper
characteristic is only used when rewinding in order to wind the inner layers tightly.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 128
4 Functional Description
4.8 Winder function blocks

For dancer roll controls, the tension taper characteristic can be used to reduce the
pressure setpoint for the dancer roll support. In this case, the output of the
characteristic must be multiplied with the tension setpoint and made available for
the dancer system interface, e.g. analog output.
The block is activated using the enable input. Depending on the mode selected at
input tensionTaperMode, the tension reduction factor is calculated as a function of
the diameter present at diamActVal and output in tensionTaper.
The way in which the reduction factor is processed depends on the mode that has
been selected.

Calculation mode Description

0 = No taper No tension taper mode is defined, the function block outputs 1.0 (no reduction
factor).
1 = Linear taper From a starting diameter that has to be entered (taperDiameterStart), the reduction
characteristic factor is linearly reduced to the maximum diameter (taperDiameterMax) with a
reduction defined by the parameter taperRatio.
diamActVal < r32TensionTaperDiameterStart:
tensionTaper 1.0
Siemens AG 2014 All rights reserved

taperDiameterStart < diamActVal < taperDiameterMax:


taperRatio diamActVal taperDiamet erStart
tensionTaper 1
100 taperDiame terMax - taperDiame terStart
diamActVal > taperDiameterMax:
tensionTaper (1 taperRatio / 100.0)
2 = Hyperbolic From a starting diameter that has to be entered (taperDiameterStart) the reduction
taper factor is reduced as hyperbolic function with taperRatio to the maximum diameter
characteristic 1 (taperDiameterMax). In this case, the reduction is at a maximum when the
Copyright

maximum diameter has been reached.


diamActVal < taperDiameterStart:
tensionTaper 1.0
taperDiameterStart < diamActVal < taperDiameterMax:

taperRatio diamActVal taperDiameterStart


1
100 diamActVal
tensionTaper
taperDiameterMax
taperDiameterMax taperDiameterStart
diamActVal > taperDiameterMax:
tensionTaper (1 taperRatio/ 100.0)
3 = Hyperbolic From a starting diameter that has to be entered (taperDiameterStart) the reduction
taper factor is reduced as hyperbolic function with taperRatio to the maximum diameter
characteristic 2 (taperDiameterMax). In this case, full reduction is never reached.
diamActVal < taperDiameterStart:
tensionTap er 1 .0
taperDiameterStart < diamActVal:
taperRatio taperDiame terStart
tensionTap er 1 1
100 diamActVal

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 129
4 Functional Description
4.8 Winder function blocks

Calculation mode Description

4 = Breakpoint The reduction factor is determined by characteristic defined as a breakpoint table.


table The breakpoint table consists of pairs of values diameter/reduction factor. The
factor is linearly interpolated between the breakpoints of the characteristic.

Graphical representation
Siemens AG 2014 All rights reserved

Warning Messages
Copyright

Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description

16#0000_0000 No Warning

16#4101_4005 The table of entered values is not monotonically (steadily) increasing


-> no matching value found

16#4101_4008 The table of entered values is not monotonically (steadily) increasing


-> 2 values are identical

Error Messages

Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#4101_8003 Less than two pairs of values in the breakpoint table or uneven number
of points.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 130
4 Functional Description
4.8 Winder function blocks

ErrorID Description

16#4101_8005 Invalid configuration data:


upperLimitTaper < lowerLimitTaper
lowerLimitTaper < 0.0
Additionally for mode 1 – 3:
taperDiameterStart < 0.0
taperDiameterMax taperDiameterStart
taperRatio < 0.0
taperRatio > 100.0
The configuration data are checked for plausibility at the rising edge of
enable.
Mode 4:
Pointer is not addressing a data block

16#4101_8006 Invalid diameter


diamActVal 0.0

16#4101_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)

16#4101_84B1 Data block does not exist (SFC 24 / TEST_DB)

16#4101_84B2 Data block unlinked (SFC24 / TEST_DB)

16#4101_C000 Invalid selection of the calculation mode


Siemens AG 2014 All rights reserved

taperMode < 0
taperMode > 4

4.8.8 WinderConfigSetup

This function block is used to enter individual configuration data into a winder
configuration data structure used by the winder.
Copyright

The function block can be called in any task. ID: 4003

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 131
4 Functional Description
4.8 Winder function blocks

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 132
4 Functional Description
4.8 Winder function blocks

Input and Output Parameters


Name Type Data M/O Initial Description
type value

metricUnits IN BOOL O TRUE FALSE: Imperial


TRUE: Metric

jogVelocity IN REAL O 10.0 [ LU/min ] Jog velocity setpoint (no ramp)

speedMatchRamp IN REAL O 0.5 [ s ] Ramp time for acceleration to line speed


Time

typeOfDiameterCalc IN INT O 2 Selection of diameter calculation method:


0: Division
1: Thickness addition
2: Integral calculation
3: External diameter determination.
Input via diameterSetValue.

diameterSetValue IN REAL O 1.0 [ m or inch ] Diameter set value


Used as external diameter source.

webThickness IN REAL O 0.001 [ m or inch ] Web thickness


If integral diameter calculation is used the
calculated thickness is displayed here.
Siemens AG 2014 All rights reserved

minDia IN REAL O 0.01 [ m or inch ] Minimum diameter

maxDia IN REAL O 2.0 [ m or inch ] Maximum diameter

minLineVelocity IN REAL O 0.5 [LU/min ] Minimum line velocity for diameter


calculation

minShaftSpeed IN REAL O 2.0 [ rpm ] Minimum shaft speed for diameter


calculation
Copyright

lineFilterTime IN REAL O 20.0 [ ms ] Filter time for line velocity

shaftFiltertime IN REAL O 20.0 [ ms ] Filter time for shaft speed

diameterFilterTime IN REAL O 50.0 [ ms ] Diameter calculator filter time

measuringRevolution IN REAL O 2.0 [ rev ] Shaft revolution counts for integral


Count diameter calculation

kpAdaptionValue IN REAL O 0.0 TPID - Kp-Adaption signal

holdIntChannel IN BOOL O FALSE FALSE: TPID – Normal integrator operation


TRUE: TPID - Hold (freeze) integrator

setIntChannel IN BOOL O FALSE FALSE: TPID - Normal integrator operation


TRUE: TPID - Set integrator channel to
intSetValue

x1 IN REAL O 0.0 TPID - Abscissa-1 for KP-adaption(1)

kp1 IN REAL O 1.0 TPID - KP-adaption point(1)

x2 IN REAL O 0.0 TPID - Abscissa-2 for KP-adaption(2)

kp2 IN REAL O 1.0 TPID - KP-adaption point(2)

limRampTime IN REAL O 1000.0 [ ms ] TPID - Ramp-up time for PID


controller output limiting

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 133
4 Functional Description
4.8 Winder function blocks

Name Type Data M/O Initial Description


type value

setNominalValue IN REAL O 100.0 TPID - Normalization value for setpoint RFG

setRampTime IN REAL O 1000.0 [ ms ] TPID - Ramp up time for setpoint RFG

integTime IN REAL O 2000.0 [ ms ] TPID - Integration time constant

derivTime IN REAL O 0.0 [ ms ] TPID - Differentiation time constant

filterTime IN REAL O 10.0 [ ms ] TPID - Actual value filter time

intSetValue IN REAL O 0.0 TPID - Integrator set value

derivControlMode IN BOOL O FALSE FALSE: TPID – D-Action acts on system


deviation
TRUE: TPID - D-Action acts in the actual
value

deadBand IN REAL O 0.0 TPID - Deadband parameter

outValueFactor IN REAL O 1.0 TPID - Output scaling factor

upperLimit IN REAL O 20.0 TPID - Controller output upper limit


Siemens AG 2014 All rights reserved

lowerLimit IN REAL O -20.0 TPID - Controller output lower limit

overrideVelocity IN REAL O 10.0 [ LU/min ] Speed controller bias (override,


overcontrol) for torque controlled modes

tensionAdjustment IN REAL O 1.0 1.0 = 100%


Tension torque adjustment factor

tensionReference IN REAL O 0.0 [ N or lbf ] Reference value for tension


setpoint. If set to zero the setpoint is
interpreted as absolute value instead of a
Copyright

percentage.

MaterialWidth IN REAL O 0.0 [ m or inch ] Width of the material

MaterialDensity IN REAL O 0.0 [ kg/m3 or lb/ft3 ] Material density

MaterialFillFactor IN REAL O 1.0 1.0 = 100%


Material fill factor (used in case of traversed
materials like cable)

JFixed IN REAL O 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia,


motor side

JMandrel IN REAL O 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia,


load side

JMotor IN REAL O 0.0 [ kgm2 or lbft/s2 ] Motor inertia

frictionAdjustment IN REAL O 0.0 1.0 = 100% Adjustment factor of the friction


characteristic output. With 0.0 friction
compensation is off.

maxVelocty IN REAL M - [ LU/min ] Max velocity for normalization

gearRatio IN REAL M - Gear Ratio, Motor/Load

referenceSpeed IN REAL M - [ rpm ] Normalization speed of drive (p2000)

referenceTorque IN REAL M - [ Nm ] Normalization torque of drive (p2003)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 134
4 Functional Description
4.8 Winder function blocks

Name Type Data M/O Initial Description


type value

logAddr IN INT M - Logical address of the drive

WinderConfig OUT Winder - - Winder configuration Data


Config
Type

Functionality
This function creates one output structure of WinderConfigType from the
configuration parameters. This is done to reduce the number of input variables on
the winder function block but still give the user easy access.

4.8.9 Winder

Function block for the control of an axial winder.


The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5104

Schematic LAD Representation


Siemens AG 2014 All rights reserved
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 135
4 Functional Description
4.8 Winder function blocks

Input and Output parameters


Name Type Data M/O Initial Description
type value

enable IN BOOL M FALSE FALSE: Function block disabled


TRUE: Rising edge enables
communication and saves parameters

onOFF1 IN BOOL M FALSE FALSE: Drive disabled


TRUE: Enable drive

noOFF2 IN BOOL M FALSE FALSE: Coast stop request


TRUE: No coast stop request

noOFF3 IN BOOL M FALSE FALSE: Fast stop request


TRUE: No fast stop request

ackFaults IN BOOL O FALSE FALSE: No fault acknowledgement


TRUE: Rising edge, acknowledge faults

openBrake IN BOOL O FALSE If motor is equipped with holding brake:


FALSE: Brake controlled by brake control
TRUE: Release brake

infeedOperation IN BOOL M FALSE FALSE: Infeed disabled


Siemens AG 2014 All rights reserved

TRUE: Infeed enabled, DC bus is ready

driveKp IN REAL O 100.0 [ % ] Speed controller gain adaption value.


At 100% the effective Kp = p1460 in the
drive.

lineVelocity IN REAL M 0.0 [ LU/min ] Master line velocity

lineActualVelocity IN REAL O 0.0 [ LU/min ] Master line actual velocity

additionalVelocity IN REAL O 0.0 [ LU/min ] Additional velocity (always


Copyright

enabled)

typeOfWinder IN INT O 0 Specifies the winder mode:


0: REWIND_FROM_ABOVE
1: REWIND_FROM_BELOW
2: UNWIND_FROM_ABOVE
3: UNWIND_FROM_BELOW
Value is saved upon rising edge of enable.

controlMode IN INT O 0 Specifies the tension control mode:


0: DANCER_SPEED_ADAPT
1: DANCER_SPEED_ADAPT_HD
2: TENSION_SPEED_ADAPT
3: TENSION_SPEED_ADAPT_HD
4: TENSION_TORQUE_ADAPT
5: INDIRECT
6: V_CONSTANT
Value is saved upon rising edge of enable.

jogPos IN BOOL O FALSE FALSE: No jog operation


TRUE: Start Jog forward at Jog Sp

jogNeg IN BOOL O FALSE FALSE: No jog operation


TRUE: Start Jog reverse at Jog Sp

speedMatch IN BOOL M FALSE FALSE: No line operation


TRUE: Line operation, follows main
setpoint

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 136
4 Functional Description
4.8 Winder function blocks

Name Type Data M/O Initial Description


type value

holdDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Hold diameter calculation

setDiameter IN BOOL O FALSE FALSE: Diameter calculation


TRUE: Set diameter to diameter set value

frictionDbPointer IN ANY O - Pointer to breakpoint table of the friction


characteristic, x: speed, y: torque
Offset: 0 REAL x1 value
Offset: 4 REAL y1 value
Offset: 8 REAL x2 value
Offset: 12 REAL y2 value
.. .. .. ..
Length defined by size of the data area,
min. length 16 bytes for two breakpoints.

CtrlEnable IN BOOL O FALSE FALSE: TPID and tension not enabled


TRUE: TPID enable

CtrlSetpoint IN REAL O 0.0 TPID Setpoint

CtrlActual IN REAL O 0.0 TPID actual value


Siemens AG 2014 All rights reserved

diameter IO REAL M - [ m or inch ] Actual diameter

winderConfig IO winder M - This data type includes all configuration


Config data required for parameterization of the
Tpye winder function block.

busy OUT BOOL - FALSE FALSE: Block disabled, no communication


active
TRUE: Block active, valid configuration,
communication active
Copyright

error OUT BOOL - FALSE FALSE: No error


TRUE: An error has occurred, refer to
error identification

errorID OUT DWORD - 16#0000 Error identification, refer to error messages


_0000 errorID 16#0000_8000: Warning
errorID 16#0000_8000: Error

driveReadyToPowerUp OUT BOOL - FALSE FALSE: Missing enables


TRUE: Drive is ready

driveReadyForMotion OUT BOOL - FALSE FALSE: Missing enables


TRUE: Drive enabled for motion

driveZeroSpeed OUT BOOL - TRUE FALSE: Shaft speed not zero


TRUE: Actual shaft speed at zero

driveFault OUT BOOL - FALSE FALSE: No drive fault


TRUE: Drive fault present

driveFaultCode OUT DINT - 0 Drive fault code, refer to drive manual for
more information (r2131 from the drive)

driveSpeedActual OUT REAL - 0.0 [ rpm ] Speed actual value (r63 from the
drive)

driveTorqueActual OUT REAL - 0.0 [ Nm ] Torque actual value (r80 from the
drive)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 137
4 Functional Description
4.8 Winder function blocks

Name Type Data M/O Initial Description


type value

driveTorqueActualFtlbs OUT REAL - 0.0 [ ft/lbs ] Torque actual value

driveTorqueActual OUT REAL - 0.0 [ % ] Torque actual value in percent of


Percent nominal torque

atMinDia OUT BOOL - FALSE At minimum diameter

atMaxDia OUT BOOL - FALSE At maximum diameter

actShaftSpeed OUT REAL - 0.0 [ rpm ] Actual shaft speed

actVelocity OUT REAL - 0.0 [ LU/min ] Actual velocity

setDriveSpeed OUT REAL - 0.0 [ rpm ] Speed setpoint to drive

pidOutValue OUT REAL - 0.0 TPID controller output

pidEffectiveKp OUT REAL - 0.0 TPID effective Kp

pidUpperLimitReached OUT BOOL - FALSE TPID at upper limit

pidLowerLimitReached OUT BOOL - FALSE TPID at lower limit


Siemens AG 2014 All rights reserved

Functionality
This function block utilizes the DriveControl, SetpointChannel, WITorquePrecontrol,
DiamCalc____ and TechPID function blocks of the Simatic Converting Toolbox.
This function block checks for valid configuration data and calls the individual
function blocks to minimize application development time.
With the enable set to true, a plausibility check is done on the configuration data
and will display an error with the corresponding error id should invalid data be
Copyright

entered. This input also enables the control functionality. With the function block
enabled, the driveControl function block will become active and the busy output will
be set to true.
With the enables set true the winder will follow the sum of the lineVelocity and
additionalVelocity multiplied by the draw factor. Winders are typically made to
follow the master without any ramps. Winders with splice are an exception as they
need to be able to be detached from the running machine and therefore have
separate ramps. The programmer is responsible for proper interlocks to prevent
unwanted behavior.
The configuration data has diameter calculation parameters, gear ratio and max
line speed parameters which are used to calculate the correct surface velocity of
the winder to match the section to the master line velocity.
The actual diameter of the winder can either be calculated using one of the
DiamCalc____ function blocks (division, integral, addition) or can also be supplied
from an external source using the configuration structure of the function block.
The configuration data also has parameters for torque pre-control. Torque pre-
control is necessary for torque based tension control modes and is optional for
speed based tension control modes. Speed based tension control modes with the
_HD (high dynamic) prefix include and utilize torque pre-control.
With the enable set to true and DrvReadyForMotion and Cntrlenable then the
CntrlSetpoint will be ramped up based on configuration data. The Tension
controller correction value will be added to the total speed setpoint or additional

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 138
4 Functional Description
4.8 Winder function blocks

torque, scaled and sent to the drive using the driveControl function block as
required.
Function block output parameters allow the user to view the calculated surface
velocity of the winder (actVelocity), the actual shaft speed (actShaftSpeed), motor
actual speed in RPM (actDriveSpeed), motor torques (driveTorqueActual,
driveTorqueActualFtlbs, driveTorqueActualPercent) and pertinent PID data.

Winder operating modes


The following table shows the different winder operating modes and the direction of
velocity, tension and torque.
Operating Representation Description
mode

Rewind V: Machine velocity


from above F: Tension in material
line

n: speed of winder
nO: velocity override for
speed controller
Siemens AG 2014 All rights reserved

overcontrol

Rewind Mf: Friction torque


from below MP: Pre-control torque
MT: Tension torque
Copyright

Unwind
from below

Unwind
from above

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 139
4 Functional Description
4.8 Winder function blocks

Block diagram
Siemens AG 2014 All rights reserved
Copyright

Warning Messages
Warnings are indicated by the status of the outputs error and errorID:
error = FALSE and errorID <> 16#0000_0000
ErrorID Description

16#0000_0000 No Warning

16#3101_4009 Communication error while reading from bus system (DriveControl)

16#3101_400A Communication error while writing on bus system (DriveControl)

16#4102_4005 The table of entered values is not monotonically (steadily) increasing


-> no matching value found (WITorquePrecontrol, friction table)

16#4102_4008 The table of entered values is not monotonically (steadily) increasing


-> 2 values are identical (WITorquePrecontrol, friction table)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 140
4 Functional Description
4.8 Winder function blocks

Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description

16#0000_0000 No error

16#5104_8001 The function block is not called in a cyclic interrupt, e.g. OB35.

16#5104_8005 Invalid configuration data


controleMode < 0
controlMode > 5
typeOfWinder < 0
typeOfWinder > 3
winderConfig.typeOfDiameterCalc < 0
winderConfig.typeOfDiameterCalc > 3
winderConfig.minDia = 0.0
winderConfig.maxDia = 0.0
winderConfig.minDia winderConfig.maxDia
winderConfig.maxVelocity = 0.0
winderconfig.gearRatio = 0.0
winderConfig.referenceSpeed = 0.0
winderConfig.referenceTorque = 0.0
winderConfig.logAddr = 0
Siemens AG 2014 All rights reserved

The configuration data are checked for plausibility at the rising edge of
enable.

16#3101_8005 Invalid configuration data: (DriveControl)


logAddr 0
referenceSpeed 0.0
referenceTorque 0.0

16#3101_8065 Torque Limits may not be plausible any more; a break in the web could
cause this problem. Axis runs in the opposite direction too fast. Reaction:
brake with full torque. (DriveControl)
Copyright

16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(SetpointChannel)

16#3102_8005 Invalid configuration data: (SetpointChannel)


maxVelocity 0.0
gearRatio = 0.0
The configuration data are checked for plausibility at the rising edge of
enable.

16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB35. (TPID)

16#1108_8005 Invalid configuration data: (TPID)


setNominalValue 0.0
upperlimit < lowerlimit

16#5101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(DiamCalcDivision)

16#5101_8005 Invalid configuration data: (DiamCalcDivision)


minDia 0.0
maxDia 0.0
minDia maxDia
minLineVelocity 0.0
minShaftSpeed 0.0
The configuration data are checked for plausibility at the rising edge of
enable.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 141
4 Functional Description
4.8 Winder function blocks

ErrorID Description

16#5103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(DiamCalcIntegral)

16#5103_8005 Invalid configuration data: (DiamCalcIntegral)


minDia 0.0
maxDia 0.0
minDia maxDia
measuringRevolutionCount 0.0
minLineSVelocity 0.0
minShaftSpeed 0.0
The configuration data are checked for plausibility at the rising edge of
enable.

16#5102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(DiamCalcAddition)

16#5102_8005 Invalid configuration data: (DiamCalcAddition)


minDia 0.0
maxDia 0.0
minDia maxDia
webThickness 0.0
minShaftSpeed 0.0
typeOfWinder < 0
Siemens AG 2014 All rights reserved

typeOfWinder > 0
The configuration data are checked for plausibility at the rising edge of
enable.

16#4102_8003 Less than two pairs of values in the breakpoint table or uneven number
of points. (WITorquePrecontrol, friction table)

16#4102_8005 One or more configuration values are invalid – Check Min values, max
values and other settings. (WITorquePrecontrol)
gearRatio 0.0
Copyright

density < 0.0


diamMin 0.0
diamMax diamMin
width < 0.0
fillFactor 0.0
Jfix < 0.0
Jmandrel < 0.0
Jmot < 0.0
typeOfWinder < 0
typeOfWinder > 3
The configuration data are checked for plausibility at the rising edge of
enable.
Friction characteristic pointer is not addressing a data block.
(WITorquePrecontrol, friction table)

16#4102_8006 Invalid diameter (WITorquePrecontrol)


diamActVal 0.0
diamActVal < diamMin

16#4102_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)
(WITorquePrecontrol, friction table)

16#4102_84B1 Data block does not exist (SFC 24 / TEST_DB) (WITorquePrecontrol,


friction table)

16#4102_84B2 Data block unlinked (SFC24 / TEST_DB) (WITorquePrecontrol, friction


table)

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 142
4 Functional Description
4.9 Overview of Structures

4.9 Overview of Structures


Some function blocks of the SIMATIC Converting Toolbox require data that is
provided as a collection of individual elements in the form of user defined data
types (UDT). This chapter provides an overview over these specific structures and
its elements.
User defined data type Description

SectionalConfigType This data type includes all configuration data required for
parameterization of the SectionalDrive function block. ID: 6201

WinderConfigType This data type includes all configuration data required for
parameterization of the winder function block. ID: 4201

4.9.1 SectionalConfigType

Name Data Initial Description


type value

metricUnits BOOL TRUE FALSE: Imperial


Siemens AG 2014 All rights reserved

TRUE: Metric

jogVelocity REAL 10.0 [ LU/min ] Jog velocity setpoint (no ramp)

speedMatchRampTime REAL 0.5 [ s ] Ramp time for acceleration to line speed

diameter REAL 1.0 [ m or inch ] Diameter value

kpAdaptionValue REAL 0.0 TPID - Kp-Adaption signal

holdIntChannel BOOL TRUE FALSE: TPID – Normal integrator operation


TRUE: TPID - Hold (freeze) integrator
Copyright

setIntChannel BOOL FALSE FALSE: TPID - Normal integrator operation


TRUE: TPID - Set integrator channel to intSetValue

x1 REAL 0.0 TPID - Abscissa-1 for KP-adaption(1)

kp1 REAL 1.0 TPID - KP-adaption point(1)

x2 REAL 0.0 TPID - Abscissa-2 for KP-adaption(2)

kp2 REAL 1.0 TPID - KP-adaption point(2)

limRampTime REAL 1000.0 [ ms ] TPID - Ramp-up time for PID controller output
limiting

setNominalValue REAL 100.0 TPID - Normalisation value for setpoint RFG

setRampTime REAL 1000.0 [ ms ] TPID - Ramp up time for setpoint RFG

integTime REAL 2000.0 [ ms ] TPID - Integration time constant

derivTime REAL 0.0 [ ms ] TPID - Differentiation time constant

filterTime REAL 10.0 [ ms ] TPID - Actual value fitler time constant

intSetValue REAL 0.0 TPID - Integrator set value

derivControlMode BOOL FALSE FALSE: TPID – D-Action acts on system deviation


TRUE: TPID - D-Action acts in the actual value

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 143
4 Functional Description
4.9 Overview of Structures

Name Data Initial Description


type value

deadBand REAL 0.0 TPID - Deadband parameter

outValueFactor REAL 1.0 TPID - Output scaling factor

upperLimit REAL 20.0 TPID - Controller output upper limit

lowerLimit REAL -20.0 TPID - Controller output lower limit

overrideVelocity REAL 10.0 [ LU/min ] Speed controller bias (override, overcontrol) for
torque controlled modes

TensionAdjustment REAL 1.0 1.0 = 100%


Tension torque adjustment factor

tensionReference REAL 0.0 [ N or lbf ] Reference value for tension setpoint. If set to
zero the setpoint is interpreted as absolute value instead of
a percentage.

JFixed REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, motor side

JMandrel REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, load side

JMotor REAL 0.0 [ kgm2 or lbft/s2 ] Motor inertia


Siemens AG 2014 All rights reserved

frictionAdjustment REAL 0.0 1.0 = 100%


Adjustment factor of the friction characteristic output. With
0.0 friction compensation is off.

maxVelocity REAL - [ LU/min ] Max velocity for normalization

gearRatio REAL - Gear Ratio, Motor/Load

referenceSpeed REAL - [ rpm ] Normalization speed of drive (p2000)

referenceTorque REAL - [ Nm ] Normalization torque of drive (p2003)


Copyright

logAddr INT - Logical address of the drive

4.9.2 WinderConfigType

Name Data Initial Description


type value

metricUnits BOOL TRUE FALSE: Imperial


TRUE: Metric

jogVelocity REAL 10.0 [ LU/min ] Jog velocity setpoint (no ramp)

speedMatchRampTime REAL 0.5 [ s ] Ramp time for acceleration to line speed

typeOfDiameterCalc INT 2 Selection of diameter calculation method:


0: Division
1: Thickness addition
2: Integral calculation
3: External diameter determination. Input via
diameterSetValue.
Value is saved upon rising edge of enable of the Winder
FB.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 144
4 Functional Description
4.9 Overview of Structures

Name Data Initial Description


type value

diameterSetValue REAL 1.0 [ m or inch ] Diameter set value


Used as external diameter source.

webThickness REAL 0.001 [ m or inch ] Web thickness


If integral diameter calculation is used the calculated
thickness is displayed here.

minDia REAL 0.01 [ m or inch ] Minimum diameter

maxDia REAL 2.0 [ m or inch ] Maximum diameter

minLineVelocity REAL 0.5 [LU/min ] Minimum line velocity for diameter calculation

minShaftSpeed REAL 2.0 [ rpm ] Minimum shaft speed for diameter calculation

lineFilterTime REAL 20.0 [ ms ] Filter time for line velocity

shaftFiltertime REAL 20.0 [ ms ] Filter time for shaft speed

diameterFilterTime REAL 50.0 [ ms ] Diameter calculator filter time

measuringRevolution REAL 2.0 [ rev ] Shaft revolution counts for integral diameter
Count calculation
Siemens AG 2014 All rights reserved

kpAdaptionValue REAL 0.0 TPID - Kp-Adaption signal

holdIntChannel BOOL FALSE FALSE: TPID – Normal integrator operation


TRUE: TPID - Hold (freeze) integrator

setIntChannel BOOL FALSE FALSE: TPID - Normal integrator operation


TRUE: TPID - Set integrator channel to intSetValue

x1 REAL 0.0 TPID - Abscissa-1 for KP-adaption(1)

kp1 REAL 1.0 TPID - KP-adaption point(1)


Copyright

x2 REAL 0.0 TPID - Abscissa-2 for KP-adaption(2)

kp2 REAL 1.0 TPID - KP-adaption point(2)

limRampTime REAL 1000.0 [ ms ] TPID - Ramp-up time for PID controller output
limiting

setNominalValue REAL 100.0 TPID - Normalization value for setpoint RFG

setRampTime REAL 1000.0 [ ms ] TPID - Ramp up time for setpoint RFG

integTime REAL 2000.0 [ ms ] TPID - Integration time constant

derivTime REAL 0.0 [ ms ] TPID - Differentiation time constant

filterTime REAL 10.0 [ ms ] TPID - Actual value filter time

intSetValue REAL 0.0 TPID - Integrator set value

derivControlMode BOOL FALSE FALSE: TPID – D-Action acts on system deviation


TRUE: TPID - D-Action acts in the actual value

deadBand REAL 0.0 TPID - Deadband parameter

outValueFactor REAL 1.0 TPID - Output scaling factor

upperLimit REAL 20.0 TPID - Controller output upper limit

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 145
4 Functional Description
4.9 Overview of Structures

Name Data Initial Description


type value

lowerLimit REAL -20.0 TPID - Controller output lower limit

overrideVelocity REAL 10.0 [ LU/min ] Speed controller bias (override, overcontrol) for
torque controlled modes

tensionAdjustment REAL 1.0 1.0 = 100%


Tension torque adjustment factor

tensionReference REAL 0.0 [ N or lbf ] Reference value for tension setpoint. If set to
zero the setpoint is interpreted as absolute value instead of
a percentage.

MaterialWidth REAL 0.0 [ m or inch ] Width of the material

MaterialDensity REAL 0.0 [ kg/m3 or lb/ft3 ] Material density

MaterialFillFactor REAL 1.0 1.0 = 100%


Material fill factor (used in the case of materials being
traversed such as wire)

JFixed REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, motor side

JMandrel REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, load side
Siemens AG 2014 All rights reserved

JMotor REAL 0.0 [ kgm2 or lbft/s2 ] Motor inertia

frictionAdjustment REAL 0.0 1.0 = 100%


Adjustment factor of the friction characteristic output. With
0.0 friction compensation is off.

maxVelocty REAL - [ LU/min ] Max velocity for normalization

gearRatio REAL - Gear Ratio, Motor/Load


Copyright

referenceSpeed REAL - [ rpm ] Normalization speed of drive (p2000)

referenceTorque REAL - [ Nm ] Normalization torque of drive (p2003)

logAddr INT - Logical address of the drive

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 146
5 Application example as demonstration system
5.1 Installing the hardware and software

5 Application example as demonstration


system
All of the steps necessary to commission the standard application SIMATIC Tool
Box as demonstration system are explainded in this section.
Preparations and parameterizing operations are explained. Further, you are shown
how to handle the WinCC flexible 2008 interface of the application example step-
by-step.

Objectives
The Section of this document should provide the user with
The necessary prerequisites to use this standard SIMATIC application as
demonstration system
The preparations and parameterizing operations
The steps necessary when presenting this standard application
Tips on how to use this standard application
Siemens AG 2014 All rights reserved

5.1 Installing the hardware and software


5.1.1 Regarding your safety

Safety information and instructions


Copyright

Pictograms, signal words and text


Every piece of safety information/instruction in this document is designated by text
graphics – compromising pictogram and signal word, and supplemented by
explanatory text. A clear classification according to the degree of the potential
hazard is provided as a result of the combination of pictogram and signal word.
Safety information/instructions are provided in front of the information regarding
activities to be executed.
Classification
There are three different stages regarding safety information/instructions. These
are designated by the same pictogram. They differ by the signal word.

This safety information/instruction indicates an immediate hazard. If the


information/instruction is not carefully followed, this results in severe
bodily injury or even death.
DANGER

This safety information/instruction indicates a potential hazard. If the


information/instruction is not carefully followed, this can result in severe
bodily injury or even death.
WARNING

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 147
5 Application example as demonstration system
5.1 Installing the hardware and software

This safety information/instruction indicates a potentially hazardous


situation, which can result in slight to average bodily injury. This
pictogram/text word can also warn about potential material damage.
CAUTION

Responsibility of the operator


Correct use
The correct use of the application components exclusively relates to the control of
test set-ups that were adapted to the power/performance of the application
components. In order that the application functions perfectly, the required standard
SIMATIC components as well as also the necessary hardware and software
components must be installed.
Misuse
The following are considered to be misuse:
Inadmissible loads applied to the application components
Any application deviating from the use specified above, or applications that go
beyond the specified use
Siemens AG 2014 All rights reserved

Non-observance of the safety information and instructions


If faults that could have a negative impact on the safety are not immediately
resolved/removed
Any changes/modifications to equipment/devices that are used to ensure
perfect funciton and operation, unrestricted use as well as active or passive
safety
If recommended hardware and software components are not used
If the application componentes are not in a perfect technical condition, are not
Copyright

operated conscious of safety and hazards, and not taking into account all of
the instructions provided in the documentation
The manufacturer assumes no liabilitiy for incorrect use (misuse).

Responsibility of the monitoring


The company or person operating the system is responsible in continually
monitoring the overall technical status of the application components (defects and
damage that can be externally identified as well as changes in the operating
behavior). The company/person operating the system is responsible in ensuring
that the application is only operated in a perfect state. He must check the state of
the application components before they are used and must ensure that any defect
is removed before commissioning.

Qualification of personnel
The operating company/person may only deploy trained, authorized and reliable
personnel. In so doing, all safety regulations must be carefully observed.
Personnel must receive special instructions regarding the hazards/dangers that
can occur.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 148
5 Application example as demonstration system
5.1 Installing the hardware and software

5.1.2 Hardware structure and mounting/installation

Overview
The demonstration project can be commissioned using a conventional SINAMICS
demonstration case, a SIMATIC S7 300 CPU and a PC connected via Ethernet.

Hardware element functions


Training case, SINAMICS S120 CU 320
SINAMICS S120 demonstration The SINAMICS training case comprises standard
and training case components (SINAMICS CU320, two motors) and
offers two axes. These are used to demonstrate the
application.
The case is already set-up and wired up. It only has
to be connected to the HMI system via Ethernet.
Communications
Profibus Cable The cable is used to connect the SIMATIC CPU to
the SINAMICS drive.
Ethernet Cable The cable is used to connect the SIMATIC CPU to
the HMI System (PG/PC)
Siemens AG 2014 All rights reserved

SIMATIC CPU On the CPU run all the programs used for the
application
HMI system
PG/PC with Ethernet interface The PG/PC is used to run the HMI operator interface
Copyright

Procedure
Proceed as follows to configure and mount the hardware components for the
application example:
Nr. Action Comment

1. Connect the Profibus interface of the SINAMICS In the example the


CU320 to the Profibus interface of the SIMATIC CPU. SINAMICS drive has
Profibus address 8

2. Connect the Ethernet interface of your PG/PC with


the Profinet interface of the SIMATIC CPU

3. Connect the SIMATIC CPU to 24V power supply and


the SINAMICS training case to the power supply unit.

4. Switch on all devices

5.1.3 Installing the standard SIEMENS software

NOTICE If the application is only to be used for demonstrating and presenting, then
it is only necessary to install WinCC flexible 2008 Runtime.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 149
5 Application example as demonstration system
5.1 Installing the hardware and software

Min. required Versions


Component Version

STEP 7 V5.5.0.4

WinCC flexible 2008 V1.4.0.3

WinCC flexible 2008 Runtime V1.4.0.3

Starter / Scout V4.2.0.0/V4.2.1.0

Component Functions

STEP7 V5.5 HF4 STEP7 ist the basis package for the other software
packages and is used to program SIMATIC S7

WinCC flexible 2008 Advanced SP3 WinCC flexible 2008 Advanced is used to program
Upd 3 the HMI interface (screen). You cannot change the
HMI machine interface without this software

WinCC flexible 2008 Runtime SP3 WinCC flexible 2008 Runtime allows you to use a
Upd 3 PG/PC as operator panel
Siemens AG 2014 All rights reserved

Starter 4.2.0.0 /Scout 4.2.1.0 Tool to parameterize and commission the


SINAMICS drive.

5.1.4 Downloading the user program and the drive parametrization into the
devices
Copyright

De-archivining the project


Open SIMATIC Manager
De-archive the project and open it in SIMATIC Manager

Resetting the devices to factory settings


In order to have a fixed starting point fot the description of the loading operation of
the demonstration case, re-establish the factory settings at the demonstration case
and the SIMATIC CPU as described in the following:
Bring the operation state switch at the SIMATIC CPU in the position “MRES”
and keep it there until the “STOP” LED is switched on permanently. In the next
three seconds you need to release the switch and bring it back to the “MRES”
position. The “STOP” LED is blinking while the CPU is reseting.
To re-establish the factory defaults to the SINAMICS you can ether delete the
folder “USER” on the CF card or reset the drive in online mode with Starter or
Scout. (to go online the “HW-Config” must be downloaded or the PG/PC needs
to be connected directly to the drive)

Set PG/PC interface


Open the interface configuration in SIMATIC Manager via Extras -> Set PG/PC
interface
Amogn the features by “Interface Parameter Assignment Used”, please select
your Ethernet card / interface of the PG/PC with “TCP/IP -> …”

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 150
5 Application example as demonstration system
5.1 Installing the hardware and software

Confirm (possible) warnings with YES


Confirm your changes with OK
Return to SIMATIC Manager and open the net configuration NETPRO by using
the button or by selecting the Menu Project –> open NetPro
Double-click on PG/PC(1) to open the properties
Under the feature “Assignment” (which has already been selected
automatically), the applied Ethernet interface has to be indicated under
“Parameter assigned”. If this is already the case, you only have to select it and
put the tick in the box marked ‘S7ONLINE Access: active’.
Please, select “Compile and check everything”
Please close all possible appearing warnings
Before loading the project close NetPro and adjust the Ethernet address of you
PG/PC in the same subnet.

Set the Ethernet address of the PG/PC


Proceed as follows to set the Ethernet address of the PG/PC:
Open the window Network and Dial-Up Connections of your PG/PC, select the
Siemens AG 2014 All rights reserved

applied network connection to SIMATIC and open its properties. (Right mous
click -> mark properties or symbol and then File -> Properties)
In the area “Components checked are used by this connection” please select
the “Internet Protocol (TCP/IP)” and open its properties
After setting the SIMATIC CPU to factory defaults the Profinet interface may
has the IP 0.0.0.0 and needs to be set by HW-Config or NetPro under
PLC/Ethernet/Edit Ethernet nodes.
Please set the IP of your PG/PC to an address in the same subnet. Example:
Copyright

SIMATIC CPU 192.168.0.1/255.255.255.0; PG/PC 192.168.0.2/255.255.255.0

Loading the Hardware Configuration into the device


Proceed as follows to download the hardware configuration:
Change to HW-Config and download the hardware configuration
Confirm with OK
Close the HW-Config and change to SIMATIC Manager

Load the SIMATIC program into the CPU and the SINAMICS configuration into the drive
Proceed as follows to download the project:
Download all functions and function blocks in SIMATIC Manager into the CPU
Select the SINAMICS drive in SIMATIC Manager and open the drive
configuration with Starter/Scout
Go online with Starter/Scout an download the SINAMICS Configuration into the
training case (make sure that the Profibus cable is connected and the CU has
Profibus address 8)
Save the SINAMICS Project via RAM_TO_ROM to the CF card
Switch the SIMATIC CPU to operating state “RUN”

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 151
5 Application example as demonstration system
5.2 Using the application example

5.2 Using the application example


The application can be used to present SIMATIC with SINAMICS S120 and get to
know and test the functions of the CPU.
Brief instructions to demonstrate and present the application example are provided
in the following chapter.
A detailed description of all operator screens is provided in the chapter afterwards.

5.2.1 Brief instructions to demonstrate

Here in these instructions you will only be shown and explained the steps
necessary to demonstrate the application. Not all of the operator screens will be
discussed.
Prerequisites
The following prerequisites must be fulfilled in order to use the application example:
The SIMATIC project is provided online in SIMATIC CPU
SINAMICS has beed loaded with the parametrization for the applications
All devices have been powered-up
Siemens AG 2014 All rights reserved

The SIMATIC CPU has beed switched to operation state “RUN”


At leas WinCC flexible 2008 Runtime is installed on the PC/PG

NOTICE WinCC flexible 2008 Runtime requires authorization. Authorization for at


least 512 power tags is required.
If there is no authorization, reference is made to this and can be
acknowledged.
Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 152
5 Application example as demonstration system
5.2 Using the application example

Overview of the structure


Please refer to the following diagram for the basic operator structure of the
application.
Siemens AG 2014 All rights reserved
Copyright

Brief instructions
Execute the steps in the sequence as listed in the following table to demonstrate
the application example:
No. Action Comment

1 Open the file Project


folder\HmiEs\PROJECT_1\WinCCStation.fwx

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 153
5 Application example as demonstration system
5.2 Using the application example

No. Action Comment

2 At the bottom left, click on AUTO (third


button from the left)

3 You are now in the AUTO mode. To start,


you must thread the material. To do this,
press the “Web THREAD IN” key. The
material will now be slowly thread-in.

4 Wait until the material has been completely


thread-in and the winder signals this with
Siemens AG 2014 All rights reserved

green

5 The tension control must now be switched-in


(enabled). This is done by pressing the
“TENSION ON/OFF” button.
Copyright

The dancer roll rises to the center position.

6 You can now start the material feed! Select


the material speed using the Web Speed
Slider.
Startthe material feed using the Web START
button

7 The two shafts now start to rotate. On the


HMI you can see how the diameter of the roll
increases.
The speed of the winder shaft decreases
with increasing diameter.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 154
5 Application example as demonstration system
5.2 Using the application example

No. Action Comment

8 When the roll reaches the maximum


diameter, the material velocity is slowly
braked until both axes come to a standstill

9 The material has now been completely


wound. To change Winding mode, you have
to switch off Tension. The winding can be
restarted by pressing the “Web Start” button
until the minimum diameter is reached

10 A target diameter can be approached using


the “GO TO Target Diameter” button.
Siemens AG 2014 All rights reserved

The target diameter cam be entered here.


The axis only starts if “Web START” is
selected and if the correct winding direction
to reach the target diameter was entered

11 The shafts move until the target diameter is


reached
Copyright

12 During the simulation, the quantities,


generated by the winder function block, can
be monitored in the technology screen

13 A tension taber characteristic can be


calculated in the “Tension Taper” screen.
The characteristic is selected using the
“Tension Taper Mode”
The characteristic is calculated and
visualized with “Start Tension Taper
Calculation”.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 155
5 Application example as demonstration system
5.2 Using the application example

5.2.2 Detailed operating instructions

Welcome Screen
Siemens AG 2014 All rights reserved

General screen areas


Copyright

The application screens are handled using the buttons at the lower edge of the
screens and provide on every screen.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 156
5 Application example as demonstration system
5.2 Using the application example

Screen Automatic
The automatic screen is the main screen in the automatic mode of the application
example on how to use the winder.
Siemens AG 2014 All rights reserved
Copyright

The application is handled/controlled in this automatic screen. The material can be


started and stopped with the buttons on the left-hand side and the tension control
and the target diameter approached, using the buttons on the right-hand side.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 157
5 Application example as demonstration system
5.2 Using the application example

Screen Technology
Siemens AG 2014 All rights reserved

The technology screen is only set-up to display variables. This therefore shows the
interaction between the winder FB and the central variables – such as material
velocity, dancer roll position, roll diameter and setpooint velocity of the winder.
Copyright

The winder function block with several important input and output variables is
shown in the center of the diagram. A symbolic graphic showing the drive is located
next to it.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 158
5 Application example as demonstration system
5.2 Using the application example

Screen Control settings 1


Siemens AG 2014 All rights reserved

The screen control settings 1 is used to enter parameters for the controller gain
adaption and the PID controller. The parameters that are to be set there act directly
on the winder function block. The parameters to set the PID controller also act
Copyright

directly and their effect can, in some cases, also be monitored / visualized.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 159
5 Application example as demonstration system
5.2 Using the application example

Screen Control settings 2


Siemens AG 2014 All rights reserved

The “Control Settings 2“ screen allows the diameter calculation to be selected and
the moment of inertia to be calculated. A mechanical system is not connected to
the demonstration system. This is the reason that the varying diameter of the
Copyright

wound roll is simulated. This means that the selectable diameter calculation
techniques are not effective. The diameter sensing via sensor mode is permanently
set. However, various modes are connected to the HMI to show users that the
possibility does exist. The variables are directly connected to the winder FB and
can also be re-used for subsequent use at the machine.
In this case, the settings of the maximum and minimum roll diameter are important
as well as the settings of the individual moments of inertia. The total moment of
inertia is calculated from the moments of inertia of the mechanical system and load
as a function of the diameter of the roll being wound. The torque pre-control is
calculated as a function of this moment of inertia and is entered into the drive as
additive torque setpoint. This calculation can be enabled using the selection field
“ENABLE INERTIA CALC.“.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 160
5 Application example as demonstration system
5.2 Using the application example

Screen Tension taper


Siemens AG 2014 All rights reserved

A tension taper characteristic can be calculated using the “Tension taper“ screen.
Using this tension taper characteristic, the tension with which the material is wound
can be changed depending on the diameter. This is required in order to achieve a
Copyright

uniform, cylindrical structure of the roll being wound. To achieve this, a higher
tension is used at a low diameter and as the diameter increases, the tension is
reduced. It only makes sense to use the tension taper characteristic for winders.
The tension setpoint, determined by the tension taper characteristic, either acts
directly on the control of a suitable dancer roll (for the winding mode with dancer
roll) – or internally on the torque limits of the drive.
5 different tension taper characteristics can be entered in the screen. No
characteristic, linear characteristic, hyperbolic characteristic typ1/typ2 as well as a
characteristic that is interpolated using a table with 10 points. For the linear and
hyperbolic characteristics, the starting diameter, the reduction as a % of the
maximum diameter as well as the magnitude of the tension reduction as a % of the
reference tension can be set.
The characteristic is only displayed after first pressing the button “start tension
taper calculation”. This characteristic is only displayed as a dancer roll is not
connected to the demonstration system.

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 161
6 Related literature
6.1 Bibliography

6 Related literature
6.1 Bibliography
This list is not complete and only represents a selection of relevant literature.

Subject Title
/1/ STEP7 Automating with STEP 7 in STL and SCL
SIMATIC S7-300/400 Author: Hans Berger
ISBN: 978-3-89578-412-5
/2/ STEP7 Automating with STEP 7 in LAD and FBD
SIMATIC S7-300/400 Author: Hans Berger
ISBN: 978-3-89578-297-8
/3/ STEP7 Automating with SIMATIC S7-300 inside TIA Portal
SIMATIC S7-300 Author: Hans Berger
ISBN: 978-3-89578-382-1
/4/ STEP7 Automating with SIMATIC S7-1200
SIMATIC S7-1200 Author: Hans Berger
Siemens AG 2014 All rights reserved

ISBN: 978-3-89578-356-2

6.2 Internet link specifications


This list is not complete and only represents a selection of relevant information.

Subject Title
Copyright

\1\ Reference to the http://support.automation.siemens.com/WW/view/de/58565043


entry
\2\ Siemens Industry http://support.automation.siemens.com
Online Support
\3\ Converting http://support.automation.siemens.com/WW/view/en/38493658/136000
standard
applications
\4\ Solutions for http://www.automation.siemens.com/converting
converting

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 162
7 Contact

7 Contact
Siemens AG
Industry Sector
I DT MC PMA APC
Frauenauracher Straße 80
D - 91056 Erlangen
mailto: tech.team.motioncontrol@siemens.com

8 History
Version Date Modifications
V1.0.0 12/2011 First version
V1.0.1 04/2013 Bug fixes
V1.0.2 03/2014 Bug fixes
Siemens AG 2014 All rights reserved

V1.2.0 08/2014 v-constant added


Copyright

SIMATIC Converting Toolbox


V1.2.0, Item-ID: 58565043 163

Você também pode gostar