0% found this document useful (0 votes)
150 views146 pages

Manual Converting Library V2.2.7 2018-10-30

The document is a manual for the SIMOTION Converting Library, which provides functions for converting data types, units, and formats. It can be used for tasks like converting temperature scales or units of measurement. The library has legal disclaimers for liability and users are responsible for ensuring proper and safe usage. An overview of the library's functions and applications is provided.

Uploaded by

Duvan Tamayo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views146 pages

Manual Converting Library V2.2.7 2018-10-30

The document is a manual for the SIMOTION Converting Library, which provides functions for converting data types, units, and formats. It can be used for tasks like converting temperature scales or units of measurement. The library has legal disclaimers for liability and users are responsible for ensuring proper and safe usage. An overview of the library's functions and applications is provided.

Uploaded by

Duvan Tamayo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 146

SIMOTION

Converting Library

Siemens
Manual - V2.2.7 - 10/2018 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/48805235 Support
Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
 Siemens AG 2018 All rights reserved

foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 5
1.1 Functional scope .................................................................................. 6
1.2 Possible applications ............................................................................ 8
1.3 Hardware .............................................................................................. 8
1.4 Software ............................................................................................... 8
1.5 Data types, Enumeration types and structures .................................... 9
1.6 Abbreviations of the units ..................................................................... 9
2 Tools ................................................................................................................. 10
2.1 FCLConTaskIdentification – Determining the cycle time ................... 10
2.2 Scaling functions ................................................................................ 12
2.2.1 FCLConScalingDWDRL ..................................................................... 12
2.2.2 FCLConScalingRLDWD ..................................................................... 14
2.2.3 FCLConScalingRLWD........................................................................ 16
2.2.4 FCLConScalingWDRL........................................................................ 18
2.2.5 FCLConScaling .................................................................................. 20
2.3 FCLConLinear – Linear interpolation ................................................. 21
2.4 FBLConPolygonA / FBLConPolygonB – Non-linear
characteristic ...................................................................................... 23
2.5 FBLConRFG – Basic ramp-function generator .................................. 26
2.6 FBLConRFGJerkLimit – Ramp-function generator with
 Siemens AG 2018 All rights reserved

rounding-off ........................................................................................ 33
2.7 FCLConCalculateDistance ................................................................. 41
2.8 FCLConEvaluateModulo .................................................................... 45
3 Drive functions ................................................................................................. 48
3.1 FBLConFrictionMeasurement – Friction characteristic ...................... 48
3.2 FBLConEnableInterface – Activate Interfaces ................................... 51
4 Closed-loop control functions ....................................................................... 56
4.1 FBLConPT1 – PT1 element ............................................................... 56
4.2 FBLConINT – Integrator ..................................................................... 60
4.3 FBLConDIF – Differentiating element ................................................ 64
4.4 FBLConDT1 – DT1 filter ..................................................................... 66
4.5 FBLConLIM – Limiter with feedback signal ........................................ 69
4.6 FBLConLevelControl – Limit value monitor........................................ 71
4.7 FCLConDeadBand – Dead band element ......................................... 73
4.8 FCLConDeadZone – Dead zone element .......................................... 75
4.9 FBLConAverageValue – Average value generator ............................ 77
4.10 FBLConPIDController ......................................................................... 79
4.11 FBLConTechnologyController – Technology controller ..................... 87
5 Winding functions ........................................................................................... 95
5.1 FBLConDiameterCalculation – Diameter calculator .......................... 95
5.2 FBLConTorquePrecontrol – Torque pre-control .............................. 116
5.3 FBLConTaperCharacteristic – Tension taper characteristic ............ 124
5.4 FCLConRLC – Residual length calculation ...................................... 130
5.5 FBLConCalcTargetDiamStopCondition ........................................... 132
5.6 FCLConRDC – Target diameter calculation..................................... 135
5.7 FBLConThicknessAverage – High resolution thickness
calculation ........................................................................................ 137
5.8 FBLConSetUnits – Setting conversion factors ................................. 141
6 Glossary ......................................................................................................... 143

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 3
Table of contents

7 Appendix ........................................................................................................ 144


7.1 Service and support ......................................................................... 144
7.2 Application support ........................................................................... 145
7.3 Links and literature ........................................................................... 145
7.4 Change documentation .................................................................... 145
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 4
1 Introduction

1 Introduction
The "Converting Library" is intended to provide SIMOTION users with help when
engineering and programming converting machinery.
The Converter Library 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 are available as 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 standard functions that go beyond this should
only be made in exceptional cases as this is not in-line with the level of
standardization that we wish to achieve here.
Only functions that are not covered by the standard applications are described in
this documentation. Additional information is provided in the corresponding
application examples.

Additional software packages:


 SIMOTION Rotary Knife
 SIMOTION Flying Saw
 SIMOTION Traversing Drive
 SIMOTION Splice Control
 Siemens AG 2018 All rights reserved

 SIMOTION Winder
 SIMOTION Web Accumulator
 SIMOTION Easy Basics
 SIMOTION Messagehandling
 SIMOTION Axis Function Block

All of the software packages are available through the application database of the
Application Centers.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 5
1 Introduction

1.1 Functional scope


Table 1-1
Function Library / Source Description
FCLConTaskIdentification LConlib / fConvTools Cycle time identification
FCLConScalingDWDRL LConlib / fConvTools Converting and scaling function
to convert a DWORD value into
an REAL format.
FCLConScalingRLDWD LConlib / fConvTools Converting and scaling function
to convert an REAL value into a
DWORD format.
FCLConScalingWDRL LConlib / fConvTools Converting and scaling function
to convert a WORD value into
an REAL format.
FCLConScalingRLWD LConlib / fConvTools Converting and scaling function
to convert an REAL value into a
WORD format.
FCLConScaling LConlib / fConvTools Scaling function.
FCLConLinear LConlib / fConvTools Linear interpolation between two
points
FBLConPolygonA LConlib / fConvTools Characteristic block Type A
 Siemens AG 2018 All rights reserved

FBLConPolygonB LConlib / fConvTools Characteristic block Type B


FBLConRFG LConlib / fConvTools Basic ramp-function generator
FBLConRFGJerkLimit LConlib / fConvTools Ramp-function generator with
jerk limiting
FCLConCalculateDistance LConlib / fConvTools Calculation of breaking distance
and time
FCLConEvaluateModulo LConlib / fConvTools Calculation of the position
difference between two
sampling values of a modulo
axis
FBLConFrictionMeasurement LConlib / fConvTools Function to plot a motor friction
characteristic.
FBLConEnableInterface LConlib / fConvTools Axis interface activation
FBLConPT1 LConlib / fConvTools PT1 filter
FBLConINT LConlib / fConvTools Integrating element
FBLConDIF LConlib / fConvTools Differentiating element
FBLConDT1 LConlib / fConvTools DT1 filter
FBLConLIM LConlib / fConvTools Limit value monitor with
feedback

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 6
1 Introduction

Function Library / Source Description


FBLConLevelControl LConlib / fConvTools Limit value monitor with
parameterizable limits and
hysteresis
FCLConDeadBand LConlib / fConvTools Dead band element
FCLConDeadZone LConlib / fConvTools Dead zone element
FBLConAverageValue LConlib / fConvTools Floating average value
generator
FBLConPidController LConlib / fConvTools PID-controller
FBLConTechnologyController LconLib / fConvTools Technology controller
FBLConWinder LConlib / fWinder Center winder function block
FBLConDiameterCalculation LConlib / fWinderTools Diameter calculator for axial
winder
FBLConTorquePrecontrol LConlib / fWinderTools Calculating the moment of
inertia and the torque pre-
control for an axial winder
FBLConTaperCharacteristic LConlib / fWinderTools Tension taper characteristic for
the tension setpoint
FCLConRLC LConlib / fWinderTools Calculating the material length
on a roll
FCLConRDC LConLib /fWinderTools Calculating the target diameter
 Siemens AG 2018 All rights reserved

of a roll.
FBLConThicknessAverage LConLib /fWinderTools Calculation of the material
thickness with increased
resolution – external option
block for FBWinder /
FBDiameterCalculation
FBLConSetUnits LConlib / fWinderTools Sets the units for the winder
blocks.
Limit, Min, Max <System function> Limiting, Minimum, Maximum
determination
_getAxisStoppingData <System function> Function to calculate the braking
distance and the braking time
when specifying the velocity,
acceleration and jerk at the start
of braking.
_readDriveParameter <System function> Function to read/write drive
_readDriveMultiParameter parameters.
_writeDriveParameter
_writeDriveMultiParameter
_readDriveFaults <System function> Reading the actual fault buffer
entries of the drive

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 7
1 Introduction

1.2 Possible applications


The Converting Library can be used for the widest range of applications, e.g.:
 Foil machines
 Printing machines
 Coating machines
 Paper finishing machines
 Wire drawing machines
 Textile machines
 Post printing machines

1.3 Hardware
The functions of the Converting Library are available for the following hardware
platforms:
 SIMOTION C2xx
 SIMOTION P3xx
 Siemens AG 2018 All rights reserved

 SIMOTION D4xx

1.4 Software
The following software versions are required to implement the standard functions
contained in this library:
 SIMOTION SCOUT from V4.2
 SIMOTION kernel from V4.2
 SIMOTION technology packages from V4.2

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 8
1 Introduction

1.5 Data types, Enumeration types and structures

The interface parameters of each function or function block are described in this
document in the respective sections.
Additionally to the interface parameter, some of the function blocks using a
configuration structure for parameterization and a diagnostic structure for feedback
reason. These structures are defined as sub-structures of the sWinderConfig and
sWinderDiag structures and are described in the FBLConWinder documentation.

1.6 Abbreviations of the units


The abbreviations of the units used for the speed and positioning axes are shown
in the following table in order to ensure consistency for the metric as well as the
Anglo-American dimension system.
LU stands for a length unit, TU stands for a time unit.

Table 1-2: Abbreviations of the units


Measurement Units Metric Anglo-American
quantity
 Siemens AG 2018 All rights reserved

Length LU e.g.: m (Meter) e.g.: ft (feet)


Length (basis unit) LUb m (meters) ft (feet)
Velocity LU / TU e.g.: mm / min e.g.: inch / min
Acceleration LU / TU² e.g.: m / s² e.g.: ft / s²
Speed rpTU o. ° / TU e.g.: rev / min e.g.: rpm
Mass, weight m kg lb
Density m / LUb³ kg / m³ lb / ft³
Moment of inertia J = mLUb² kgm² lbft²
Torque M = mLUb²/s² Nm = kgm² / s² lbf ft = lbft² / s²
Tension, force Z = mLUb/s² N = kg m / s² lbf = lb ft / s²

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 9
2 Tools

2 Tools
2.1 FCLConTaskIdentification – Determining the cycle time
Identifies the task and outputs the associated cycle time

Block name
FCLConTaskIdentification

Task
The function identifies the type of task in which this is called, determines the actual
cycle time and outputs this.

Integration in the run-time system


The function must be called in a synchronous task (Servo, IPO, IPO_2 or Timer).

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConTaskIdentification

eTaskNameType taskMode FCLConTaskIdentification REAL

Block parameters

Input parameters
Name Data type Initial value Description
Calling task:
SERVO_SYNCHRONOUS_TASK:
Servo Synchronous Task
eTaskName
taskEnum - IPO_SYNCHRONOUS_TASK: Ipo Synchronous Task
Type
IPO_SYNCHRONOUS_TASK_2:
Ipo Synchronous Task 2
TIMER_INTERRUPT_TASK: in a Timer Interrupt Task

Output parameters
Name Data type Initial value Description
[ ms ] The actual real cycle time of the task in the REAL
FCLConTask format,
REAL -
Identification If the function outputs a 0, the task is not time
synchronous and Ipo-dependent.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 10
2 Tools

Functionality
Using the input parameter taskMode of type eTaskNameType, the function
determines the actual task in which the FC is called. If the task is known, then the
cycle time can be determined. By mapping the cycle time in the Time Format in the
TaskStartInfo, this time must be interrogated using the system variables and
precisely calculated. The precise cycle time of the task is output at
FCLConTaskIdentification output in the REAL format. This function can only work
when called in a time synchronous Ipo-dependent task. 0.0 is output when called in
another task.
In systems where the cycle time of the IPO task shorter is than 1.0ms the cycle
time of the TIMER_INTERRUPT_TASK can not be identified. In this case the
function returns with 0.0.
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 11
2 Tools

2.2 Scaling functions


2.2.1 FCLConScalingDWDRL

Block name
FCLConScalingDWDRL

Task
Converting a DWORD into an REAL value

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FCLConScalingDWDRL
 Siemens AG 2018 All rights reserved

DWORD x FCLConScalingDWDRL REAL

REAL maxValue

REAL base

Block parameters

Input parameters
Name Data type Initial value Description
x DWORD - [ - ] Input value as DWORD
maxValue REAL 2147483647.0 [ - ] Maximum value
[ - ] Normalization value
base REAL -
(FCScalingDWDRL = 0 if base = 0)

Output parameters
Name Data type Initial value Description
FCLConScaling
REAL - [ - ] Output value in REAL [ -2*maxValue - 2*maxValue]
DWDRL

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 12
2 Tools

Functionality
The function converts a DWord (x) using a normalization value (base) and the
maximum reference value (maxValue) into a real value (FCLConScalingDWDRL).
In so doing, the output value is limited between the values -2*maxValue and
2*MaxValue.

x
FCLConScalingDWDRL  * max Value
base
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 13
2 Tools

2.2.2 FCLConScalingRLDWD

Block name
FCLConScalingRLDWD

Task
The block converts a REAL value into a DWORD

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FCLConScalingRLDWD

REAL x FCLConScalingRLDWD DWORD

REAL maxValue
 Siemens AG 2018 All rights reserved

REAL base

Block parameters

Input parameters
Name Data type Initial value Description
x REAL - [ - ] Input value as REAL [ -2*maxValue - 2*maxValue]
[ - ] Maximum value
maxValue REAL -
(FCScalingRLDWD = 0 if maxValue = 0)
base REAL 2147483647.0 [ - ] Normalization value

Output parameters
Name Data type Initial value Description
FCLConScaling
DWORD [ - ] Output value as DWORD
RLDWD

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 14
2 Tools

Functionality
The function converts a real value (x) into a DWord (FCLConScalingLRLDWD)
using a normalization value (base) and the maximum reference value (maxValue).
In so doing, input value x is limited between the values -2*maxValue and
2*maxValue.

x
FCLConScalingRLDWD  * base
max Value
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 15
2 Tools

2.2.3 FCLConScalingRLWD

Block name
FCLConScalingRLWD

Task
This block converts a REAL value into a WORD value

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FCLConScalingRLWD

REAL x FCLConScalingRLWD WORD

REAL maxValue
 Siemens AG 2018 All rights reserved

REAL base

Block parameters

Input parameters
Name Data type Initial value Description
x REAL - [ - ] Input value as REAL [ -2*maxValue - 2*maxValue]
[ - ] Maximum value
maxValue REAL -
(FCScalingRLWD = 0 if maxValue = 0)
base REAL 16384.0 [ - ] Normalization value

Output parameters
Name Data type Initial value Description
FCLConScalingRLWD WORD - [ - ] Output value as WORD

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 16
2 Tools

Functionality
This function converts a real value (x) into a word value (FCLConScalingRLWD)
using a normalization value (base) and the maximum reference value (maxValue).
In so doing, input value x is limited between the values -2*maxValue and
2*maxValue.

x
FCLConScalingRLWD  * base
max Value
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 17
2 Tools

2.2.4 FCLConScalingWDRL

Block name
FCLConScalingWDRL

Task
This block converts a WORD value into a REAL value

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FCLConScalingWDRL

WORD x FCLConScalingWDRL REAL

REAL maxValue
 Siemens AG 2018 All rights reserved

REAL base

Block parameters

Input parameters
Name Data type Initial value Description
x WORD - [ - ] Input value as WORD
maxValue REAL - [ - ] Maximum value
[ - ] Normalization value
base REAL 16384.0
(FCScalingWDRL = 0 if base = 0)

Output parameters
Name Data type Initial value Description
FCLConScaling
REAL - [ - ] Output value in REAL [ -2*maxValue - 2*maxValue]
WDRL

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 18
2 Tools

Functionality
This function converts a word value (x) into a Real value (FCLConScalingWDRL)
using a normalization value (base) and the maximum reference value (maxValue).
In so doing, the output value is limited between the values -2*maxValue and
2*maxValue.

x
FCLConScalingWDRL  * max Value
base
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 19
2 Tools

2.2.5 FCLConScaling

Block name
FCLConScaling

Task
This block scales a real value

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FCLConScaling

REAL x FCLConScaling REAL

REAL maxValue
 Siemens AG 2018 All rights reserved

REAL base

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input value as WORD
maxValue REAL 0.0 [ - ] Maximum value
[ - ] Normalization value
base REAL 16384.0
(FCScaling = 0 if base = 0)

Output parameters
Name Data type Initial value Description
FCLConScaling REAL - [ - ] Output value in REAL

Functionality
This function scales a word value (x) using a normalization value (base) and the
maximum reference value (maxValue).
x
FCLConScaling  * max Value
base

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 20
2 Tools

2.3 FCLConLinear – Linear interpolation


Block name
FCLConLinear

Task
This function interpolates a point from a specified straight line.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FCLConLinear

REAL x FCLConLinear REAL

REAL pointX1
 Siemens AG 2018 All rights reserved

REAL pointY1

REAL pointX2

REAL pointY2

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 Input point X
pointX1 REAL 0.0 X Coordinate point 1
pointY1 REAL 0.0 Y Coordinate point 1
pointX2 REAL 0.0 X Coordinate point 2
pointY2 REAL 0.0 Y Coordinate point 2

Output parameters
Name Data type Initial value Description
FCLConLinear REAL - Output point Y

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 21
2 Tools

Functionality
Using the straight lines entered, this function determines the matching Y coordinate
of the coordinate X present at input x. The straight line is defined by point 1
(pointX1 / pointY1) and point 2 (pointX2 / pointY2). The interpolated Y coordinate is
provided as return value of the function with FCLConLinear. The input point x is
limited by the coordinates pointX1 and pointX2. The calculation is continued with
pointX1 or pointX2. If the coordinates pointX1 and pointX2 are equal, 0.0 is
displayed at output FCLConLinear and no interpolation is carried-out.

X  po int X 1
FCLConLinear  *  po int Y 2  po int Y 1  po int Y 1
po int X 2  po int X 1

Graphic representation of the function


Figure 2-1: Graphic representation of the function

pointY2
 Siemens AG 2018 All rights reserved

FCLCon
Linear

pointY1

pointX1 X pointX1

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 22
2 Tools

2.4 FBLConPolygonA / FBLConPolygonB – Non-linear


characteristic
This block determines a value from a non-linear characteristic that is entered.

Block name
FBLConPolygonA, FBLConPolygonB

Task
The function block implements the function of a non-linear characteristic by linearly
interpolating between two table values entered using the input quantities.

Integration in the run-time system


The function block can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FBLConPolygonA, FBLConPolygonB

eLConPolygonModeType mode error BOOL

UINT entryNum errorID DWORD

REAL x y REAL

ARRAY OF REAL abscissaValue ARRAY OF REAL

ARRAY OF REAL ordinateValue ARRAY OF REAL

ARRAY OF REAL ordinateFactor ARRAY OF REAL

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 23
2 Tools

Block parameters

Input parameters
Name Data type Initial value Description
The individual weighting is enabled
NO_POLYGON: No Polygon calculation (y = x).
eLConPolygonMo ORDINATE_ ORDINATE_FACTORS_USED: Weighting successful,
mode de FACTORS_ interpolated with the product
Type NEGLECTED (ordinateValue*ordinateFactor).
ORDINATE_FACTORS_NEGLECTED: No weighting,
interpolated with (ordinateValue).
FBPolygonA
Number of grid points [1… LCONLIB_
LCONLIB_MAX_IDX_A+1] (21)
entryNum UINT 0
FBPolygonB
Number of grid points [1 … LCONLIB_
LCONLIB_MAX_IDX_B+1] (181)
x REAL 0.0 [ - ] Actual input value of the FB

Output parameters
Name Data type Initial value Description
FALSE: No error
error BOOL FALSE
 Siemens AG 2018 All rights reserved

TRUE: An error has occurred, refer to error identification


Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
y REAL 0.0 [ - ] Interpolated output value of the FB

Input/Output parameters
Name Data type Initial value Description
FBLConPolygonA:
ARRAY Abscissa grid points, monotonically (steadily) increasing
[0.. from a value perspective [2 … LCONLIB_MAX_IDX_A+1]
abscissaValue -
LCONLIB_MAX_I FBLConPolygonB:
DX_x] OF REAL Abscissa grid points, monotonically (steadily) increasing
from a value perspective [2 … LCONLIB_MAX_IDX_B+1]
ARRAY FBLConPolygonA:
[0.. Ordinate grid points [2 … LCONLIB_MAX_IDX_A+1]
ordinateValue -
LCONLIB_MAX_I FBLConPolygonB:
DX_x] OF REAL Ordinate grid points [2 … LCONLIB_MAX_IDX_B+1]
ARRAY FBLConPolygonA:
[0.. Ordinate weighting factor [2 … LCONLIB_MAX_IDX_A+1]
ordinateFactor -
LCONLIB_MAX_I FBLConPolygonB:
DX_x] OF REAL Ordinate weighting factor [2 … LCONLIB_MAX_IDX_B+1]

Functionality
Input mode specifies a mode for the function block to calculate the interpolating
value y; this is determined using the input x. For the mode NO_POLYGON there is
no calculation and the Output Value is the same like the Input Value. In mode
ORDINATE_FACTORS_USED, the factors in the field ordinateFactors are included
in the calculation (ordinateValue * ordinateFactor).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 24
2 Tools

For the mode ORDINATE_FACTORS_NEGLECTED, no weighting is applied and


only the values from ordinateValue are used. A maximum of either 21 (default
FBLConPolygonA) or 181 (default FBLConPolygonB) abscissa grid points are
evaluated that are specified to be monotonically (steadily) increasing from a value
perspective using a field:
abscissaValue[i] <= abscissaValue[i+1], otherwise, an error is output and
ordinateOutput keeps the last value.
The values of the two arrays ordinateValue and ordinateFactor correspond to the
abscissa via indices (0<=i<=LCONLIB_MAX_IDX_x+1)
This block is available in two versions, FBLConPolygonA with 21 grid points and
FBLConPolygonB with 181 grid points.

Graphic representation of the function


Figure 2-2: Block diagram
Ordiante Value
ordinateFactors Factors

Ordinate Values of
ordinateValues Polygon
Polygon

Number of table entries


entryNum

Input Value
 Siemens AG 2018 All rights reserved

abscissaInput Output ordinateOutput


Value

[M]
Mode: without ordinate factors
mode

Values of Abscissa
abscissaValues

Warnings
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#0105_4005 The table of entered values is not monotonically (steadily) increasing -> no matching
value found
16#0105_4008 The table of entered values is not monotonically (steadily) increasing -> 2 values are
identical

Errors
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0105_8003 The number of grid points that have been entered is too small
16#0105_8004 The number of grid points that have been entered is too large

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 25
2 Tools

2.5 FBLConRFG – Basic ramp-function generator


Basic ramp-function generator without rounding-off

Block name
FBLConRFG

Task
The basic ramp-function generator is a ramp-function generator to limit the rate of
change of input quantity x. The output quantity of the FBLConRFG can be limited.
The following quantities can be independently set and changed during operation:
 Ramp-up and ramp-down times
 Output limiting upper Limit and lower Limit
 Setting value
Flexible ramp-function generator function:
 Integrating, tracking setpoint x
 The ramp-function generator output can be set to the initial value (load
setValue into the supply integrator)
 Siemens AG 2018 All rights reserved

 The ramp-function generator output can be increased and decreased,


integrating

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 26
2 Tools

Graphic representation of the block

FBLConRFG

REAL x error BOOL

REAL nominalValue
errorID DWORD

REAL upperLimit
y REAL

REAL lowerLimit
ya REAL

REAL setValue
setpointReached BOOL
eLConRampTime
rampTimeMode
ModeType
upperLimitReached BOOL
REAL rampUpTime

lowerLimitReached BOOL
REAL rampDownTime

BOOL set
 Siemens AG 2018 All rights reserved

BOOL followUp

BOOL increase

BOOL decrease

eTaskNameType taskMode

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input quantity
nominalValue REAL 1.0 [ - ] Normalization value
upperLimit REAL 0.0 [ - ] Upper limit value
lowerLimit REAL 0.0 [ - ] Lower limit value
setValue REAL 0.0 [ - ] Setting value
Selection how ramp times are selected.
eLConRamp DIFF_TO_ZERO: ramp up: output value Y moves away
rampTimeMode TimeModeT DIFF_TO_ZERO from zero; ramp down: output value Y approaches zero.
ype DIFF_OF_CHANGE: ramp up: target value > start value;
ramp down: target value < start value
rampUpTime REAL 0.0 [ ms ] Ramp-up time [ cycle time – MaxTU]
rampDownTime REAL 0.0 [ ms ] Braking time constant [ cycle time – MaxTD]
FALSE: A setting value is not accepted/transferred
set BOOL FALSE
TRUE: A setting value is accepted/transferred

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 27
2 Tools

Name Data type Initial value Description


FALSE: Normal sequence
followup BOOL FALSE
TRUE: Output is set the same as the input
FALSE: Normal sequence
increase BOOL FALSE
TRUE: Higher
FALSE: Normal sequence
decrease BOOL FALSE
TRUE: Lower
Specification of the task in which the block is called.
IPO_
SERVO_SYNCHRONOUS_TASK
eTaskName SYNCHRONOUS_
taskMode IPO_SYNCHRONOUS_TASK
Type TASK
IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameters
Name Data type Initial value Description
FALSE: No error
error BOOL FALSE
TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
errorID DWORD 0 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
Y REAL 0.0 [ - ] Output quantity
 Siemens AG 2018 All rights reserved

ya REAL 0.0 [ - / s ] Acceleration value


FALSE: Setpoint calculation active
SetpointReached BOOL FALSE
TRUE: Setpoint (input x) reached
upperLimit FALSE: Upper limit value not reached
BOOL FALSE
Reached TRUE: Upper limit value reached
lowerLimit FALSE: Lower limit value not reached
BOOL FALSE
Reached TRUE: Lower limit value reached

Functionality
The function block includes an integrator with two integration time constants that
can be set independently of one another. Output Y changes according to the
following algorithm:

Yn  Yn1  YAn
The acceleration value YA is separately calculated for the up ramp and down ramp
and is output.
Dependent on the input parameter rampTimeMode, rampUpTime and
rampDownTime will be used differently.
rampTimeMode = DIFF_TO_ZERO:
An up ramp is when the output value Y moves away from zero. A down ramp is
when the output value Y approaches zero.
rampTimeMode = DIFF_OF_CHANGE:
An up ramp is when the target value is bigger than the output value Y. A down
ramp is when the target value is smaller than the output value Y.
By this there is no change between rampUpTime and rampDownTime when the
output value Y moves through 0.0.

For the acceleration value when ramping-up the following applies:

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 28
2 Tools

TA
YA  * no min alValue für Y  0
rampupTime
TA
YA   * no min alValue für Y  0
rampupTime
For the acceleration value when ramping-down the following applies:
TA
YA   * no min alValue für Y  0
rampdownTime
TA
YA  * no min alValue für Y  0
rampDownTime

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


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 control inputs set, followup, increase and decrease, the
operating mode is specified by a control logic. The output quantity can be limited
using inputs upperLimit and lowerLimit. When the set limits are reached, through Y,
binary outputs upperLimitReached or lowerLimitReached are set to TRUE. Binary
output setpointReached goes TRUE, if y=x.
Ramp-up time and ramp-down times
 Siemens AG 2018 All rights reserved

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
TA/rampupTime or TA/rampDownTime, the lower the amplitude change at y from
one sampling instant to the next.
For the control inputs, the following sequence of priority applies:
set before followup before increase and decrease

Table 2-1: Function of the control inputs


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 that are
explained in the following.
For the setting with lowerLimit ≥ upperLimit, the following applies: Limit upperLimit
is dominant with respect to limit lowerLimit.
Behavior of the integrator at the limit
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.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 29
2 Tools

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 again reaches the limit value.
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
again reaches the limit value.

The integrator operates internally with an 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 referred to the ramp-up or ramp-
down time.
rampupTime and TD are internally limited:
rampupTime ≥ TA, rampdownTime ≥ TA.

Table 2-2: Truth table, ramp-function generator stop


set follow increase decrease yan yn Mode Comment
up

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


 Siemens AG 2018 All rights reserved

1) 1) 1)
1 Step setValuen Sets output to setValue is any
setValue value, fixed or
variable
1) 1)
0 1 TA/rampu yn-1+yan Normal rampupTime for [x >
pTime; operation y ⋀ y ≥ 0] ⋁ [x < y ⋀
TA/rampd y→ x y ≤ 0]
ownTime rampdownTime for [x
> y ⋀ y < 0] ⋁ [x < y
⋀ y > 0]
0 0 1 0 TA/ yn-1+yan Approach the rampupTime,
rampupTi upper limit rampdownTime as
me value before, dependent on
(TA/ y→upperLimit the starting (initial)
rampdow position
nTime)
0 0 0 1 TA/ yn-1+yan Approach the rampupTime,
rampdow lower limit rampdownTime as
nTime value before, dependent on
(TA/ y→lowerLimit the starting (initial)
rampupTi position
me)
1) = any

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 30
2 Tools

Graphic representation of the function


Transfer Function
Figure 2-3: Transfer function

upperLimit

x1
nominalValue
nominalValue

rampup rampdown
Time Time
x2
x4 nominal t
rampup rampdown Value
Time Time

nominal
Value

y
x3
x
 Siemens AG 2018 All rights reserved

lowerLimit

Example 1: followup = 1 with lowerLimit < upperLimit and lowerLimit < x <
upperLimit, as well as x1 = 1.5, x2 = x4 = 0.0, x3 = –1.5, upperLimit = 2.0,
lowerLimit = –2.0, rampupTime > rampdownTime

Figure 2-4
1
increase 0
1
decrease 0

upperLimit

lowerLimit

Example 2: Motor potentiometer function with increase and decrease and with
lowerLimit < upperLimit

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 31
2 Tools

Figure 2-5
1
set 0
1
followup 0
1
decrease 0

upperLimit

x
setValue

lowerLimit

Example 3: Setting the integrator with lowerlimit < upperLimit

Errors
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
 Siemens AG 2018 All rights reserved

ErrorID Description
16#0000_0000 No error.
16#0106_8001 The function block is called in an incorrect task.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 32
2 Tools

2.6 FBLConRFGJerkLimit – Ramp-function generator with


rounding-off
Ramp-function generator with ramp-up and ramp-down times, that can be set and
rounding-off.

Block name
FBLConRFGJerkLimit

Task
Depending on the entered integration values and the specified setpoint function
block FBLConRFGJerkLimit calculates an appropriate output value. In so doing,
the acceleration and deceleration times are taken into account as well as a
selected rounding-off. There is a special input for a fast stop. The status of the
ramp-function generator is output via additional outputs.

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
 Siemens AG 2018 All rights reserved

Timer).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 33
2 Tools

Graphic representation of the block

FBLConRFGJerkLimit

BOOL run busy BOOL

BOOL enable error BOOL

BOOL mode errorID DWORD

BOOL enableRounding setpointReached BOOL

BOOL hold setpointZero BOOL

BOOL zeroRounding accelerating BOOL

REAL x decelerating BOOL

REAL nominalValue y REAL


 Siemens AG 2018 All rights reserved

REAL rampupTime ya REAL

REAL rampdownTime

REAL fastRampdownTime

REAL roundingTime

eTaskNameType taskMode

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 34
2 Tools

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: FB de-activated
run BOOL FALSE
TRUE: FB activated
FALSE: No calculation
enable BOOL FALSE
TRUE: The output values are calculated
FALSE: Emergency Stop
mode BOOL TRUE
TRUE: Normal sequence
FALSE: Without rounding-off
enableRounding BOOL TRUE
TRUE: With rounding-off
TRUE: Ramping will be hold, with respect to jerk limiting.
Acceleration will be ramped to zero. The input x is
hold BOOL FALSE ineffective.
FALSE: Normal sequence
TRUE: Rounding at zero crossing
zeroRounding BOOL FALSE
FALSE: No rounding at zero crossing
x REAL 0.0 Setpoint, always positive
Nominal Value
nominalValue REAL 1000.0 Internally, the absolute value is always taken from this
input value
 Siemens AG 2018 All rights reserved

[ s ] Ramp-up time
rampupTime REAL 1.0
Internally limited to between 0.001 – 1000.0
[ s ] Ramp-down time
rampdownTime REAL 1.0
Internally limited to between 0.001 – 1000.0
[ s ] Fast stop ramp-down time
fastRampdownTime REAL 0.1
Internally limited to between 0.001 – 1000.0
[ s ] Rounding-off time
roundingTime REAL 0.5
Internally limited to between 0.001 – 1000.0
Specification of the task in which the block is called.
IPO_ SERVO_SYNCHRONOUS_TASK
eTaskName
taskMode SYNCHRONOUS_ IPO_SYNCHRONOUS_TASK
Type
TASK IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameters
Name Data type Initial value Description
FALSE: It is not calculated
busy BOOL FALSE
TRUE: FB calculates an Output_Value
FALSE: No error
error BOOL FALSE
TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
Setpoint FALSE: Setpoint not reached
BOOL FALSE
Reached TRUE: Setpoint reached
FALSE: Calculated setpoint is not zero
setpointZero BOOL FALSE
TRUE: Calculated setpoint is zero
FALSE: Is not accelerated
accelerating BOOL FALSE
TRUE: Is accelerated

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 35
2 Tools

Name Data type Initial value Description


FALSE: Is not decelerated
decelerating BOOL FALSE
TRUE: Is decelerated
y REAL 0.0 Calculated output value
ya REAL 0.0 [ 1/sec² ] Actual acceleration / deceleration

Functionality
The function block is active with the input run at TRUE and the calculation can be
started or stopped with 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 calculate
the acceleration and deceleration stages with reference to the entered
nominalValue, then the sampling time must be specified using the taskMode input.
In order to reach the setpoint (x), the appropriate interval values are output (at y)
and the actual acceleration is output (at ya). If input enableRounding is set to
TRUE, the ramp is calculated with jerk limiting. The rounding-off is determined by
 Siemens AG 2018 All rights reserved

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. Further, when
accelerating output acceleration is set, when decelerating, output 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.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 36
2 Tools

Graphic representation of the function


Figure 2-6: With rounding-off (enableRounding = TRUE )
y

nominalValue

t
rampupTime rampdownTime
x

Enable

Run

accelerating

decelerating

setpoint
Zero
 Siemens AG 2018 All rights reserved

setpoint
Reached
t

Rounding
Time
t

pos

t
neg

ya

pos

t
neg

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 37
2 Tools

Figure 2-7: Without rounding-off (enableRounding = FALSE )


y

nominal
Value

rampdown t
rampupTime
Time

enable

run

accelerating

decelerating

setpoint
Zero
 Siemens AG 2018 All rights reserved

setpoint
Reached
t

pos

t
neg

pos

t
neg

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 38
2 Tools

Figure 2-8: With rounding-off and Emergency Stop function (mode = FALSE)
y

nominalValue

fastRampDownTime fastRampdownTime t
rampupTime rampdownTime

run

enable

mode

accelerating

decelerating

t
 Siemens AG 2018 All rights reserved

setpoint
Zero
t

setpoint
Reached
t

pos

t
neg

ya

pos

t
neg

Figure 2-9: With or without zero rounding


x,y x,y

0.0 0.0
t t

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 39
2 Tools

Errors
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#010E_8001 The function block is called in an incorrect task.
16#010E_8005 Invalid input parameter
nominalValue = 0.0
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 40
2 Tools

2.7 FCLConCalculateDistance
Calculates the braking distance and time, taking into consideration the dynamic
parameters of the motion sequence.

Block name
FCLConCalculateDistance

Task
This block calculates the braking distance and the associated time for the axis to
brake down to standstill (zero speed) - taking into account the actual motion vector
(velocity, acceleration, jerk).

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConCalculateDistance

REAL initialVelocity FCLConCalculateDistance sRetCalculate


DistanceType

REAL initialAccel

REAL negativeAccelLimit

REAL positiveAccelEndJerkLimit

REAL negativeAccelStartJerkLimit

REAL negativeAccelEndJerkLimit

Block parameters
Input parameters
Name Data Type Initial value Description
[LU / t] actual velocity of the axis – initialVelocity >
initialVelocity REAL 0.0
0.0
[LU/ t²] actual acceleration of the axis - if
initialAccel REAL 0.0 initialVelocity = 0.0 then initialAccel must be
equal = 0.0.
[LU / t²] maximum deceleration –
negativeAccelLimit REAL 0.0 negativeAccelLimit < 0.0 and the absolute value
must be greater than or equal to initialAccel.
[LU / t³] jerk to decrease the acceleration –
positiveAccelEndJerkLimit REAL 0.0
positiveAccelEndJerkLimit <= 0.0

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 41
2 Tools

Name Data Type Initial value Description


[LU / t³] jerk to increase the acceleration –
negativeAccelStartJerkLimit REAL 0.0
positiveAccelEndJerkLimit <= 0.0
[LU / t³] jerk to reduce the deceleration –
negativeAccelEndJerkLimit REAL 0.0
negativeAccelEndJerkLimit >= 0.0.

Output parameters
Name Data Type Initial-value Description
sRet
Return structure of the function with
FCLConCalculateDistance Calculate
subsequently described elements
DistanceType
FALSE: No error
.boError BOOL FALSE TRUE: An error has occurred, refer to error
identification
DWORD Error identification, refer to error messages
.b32ErrorID 16#0000_0000 b32errorID <= 16#000_8000: warning
b32errorID >= 16#0000_8000: error
.r32GrossDistance REAL 0.0 Calculated braking distance
.r32GrossTime REAL 0.0 Calculated braking time
 Siemens AG 2018 All rights reserved

Data types and structures


Name of the structure Contents
sRetCalculateDistanceType This structure includes the output parameter of the
FCCalculateDistance function.
Declared in: LConLib.fConvTools

sRetCalculateDistance
The following type definition applies:
I/O Element Data type Description
FALSE: No error
OUT boError BOOL TRUE: An error has occurred, refer to error
identification
Error identification, refer to error messages
OUT b32ErrorID DWORD b32errorID <= 16#000_8000: warning
b32errorID >= 16#0000_8000: error
The gross distance needed for
OUT r32GrossDistance REAL
axis stop with given inputs.
OUT r32GrossTime REAL The gross time need for axis stop.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 42
2 Tools

Functionality
The motion profile is sub-divided into four segments for jerk-limited stopping of an
axis. In this case, a certain initial velocity and initial acceleration are used as basis.
- In the first segment (S2) the initial acceleration (initialAcceleration) is
decreased with the specified jerk (positiveAccelEndJerkLimit). The velocity
increase is taken into account.
- In the second segment (S3) it is checked as to whether the maximum
deceleration is reached with the specified jerk
(negativeAccelStartJerkLimit). The maximum deceleration is calculated.
- In the third segment (SD), the axis is braked with maximum deceleration
(negativeAccelLimit).
- In the fourth segment (S4) the actual acceleration is reduced with the
specified jerk (negativeAccelEndJerkLimit).
Starting from the parameterization of the block, not all of the segments are always
taken into account in the calculation. An overview of the use is given in the
following table. If a return parameter is zero, then the corresponding segment is
deactivated.
da dv ds dt
S2 neg pos pos T2
S3 neg neg pos T3
SD - neg pos TD
 Siemens AG 2018 All rights reserved

S4 pos neg pos T4

Description of the elements in the table:


a – Acceleration v – Velocity
s – Distance t - time
d in the designations specifies that only changes to the values are taken into
account – not the absolute results. The sign indicates an increase or decrease of
the corresponding value.
Based on the input parameters, the segments are taken into consideration as
follows:
initialVelocity
>0 =0 <0
initialAccel initialAccel initialAccel
>0 =0 <0 >0 =0 <0 -
S2 1 0 0 1 0 error error
S3 1 1 1* 1 0 error error
SD 1* 1* 1* 0 0 error error
S4 1 1 1 1 0 error Error
*dependent on initialVelocity and negativeAccelLimit

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 43
2 Tools

Graphic representation of the function


The following diagram shows the motion phases relevant for the calculation starting
from a positive initial velocity and acceleration.

In this example, all 4 segments are required for the calculation.

Errors
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#010F_8005 Invalid input parameter
The specification of the input parameter was not maintained as described.
negativeAccelLimit >= 0.0
positiveAccelEndJerkLimit > 0.0
 Siemens AG 2018 All rights reserved

negativeAccelStartJerkLimit > 0.0


negativeAccelEndJerkLimit < 0.0
initialVelocity < 0.0
(initialVelocity = 0.0) and (initialAccel < 0.0)
(ABS(initialAccel) > ABS(negativeAccelLimit)) and initialAccel < 0.0)
If the input parameters lie in a valid value range, then it is not possible to stop the
axis with limited jerk using the specified dynamic parameters.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 44
2 Tools

2.8 FCLConEvaluateModulo
Calculates the difference between two sampling values of a signal with overflow
property.

Block name
FCLConEvaluateModulo

Task
The block calculates the difference of an input signal between two calls taking into
account the overflow behavior, e.g. to determine the position difference of modulo
axes.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConEvaluateModulo

LREAL valueAct FCLConEvaluateModulo LREAL

LREAL valueLast

LREAL moduloLength

Block parameters
Input parameters
Name Data type Initial value Description
valueAct LREAL 0.0 [ - ] actual sampling value [ n ]
valueLast LREAL 0.0 [ - ] previous sampling value [ n – 1 ]
[ - ] modulo length, corresponds to #POSAXIS.
activeconfigdata.Modulo.Length.
moduloLength LREAL 0.0
For moduloLength < 0.0, the calculation is made
without modulo correction.

Output parameters
Name Data type Initial value Description
FCLConEvaluateModulo LREAL - [ - ] calculated difference

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 45
2 Tools

Functionality
The block calculates the position difference between two block calls and corrects
the calculated value taking into account the modulo length. The evaluation is
realized by comparing the actual and last position value referred to the modulo
length.
In order that the block correctly operates, it must be ensured that a modulo length
is run through in not less than 2 sampling cycles – as otherwise, reliable detection
is not possible.
Fig. 2-10
Fall #1 Fall #2 Fall #3

360 0 360 0 360 0

[n ]
[n]
[n

]
-1
[n

-1

[n
] - 1]
[n

]
moduloLength
 Siemens AG 2018 All rights reserved

[n-1] [n] [n-1] [n] [n] [n-1]

Case #1:
Value [ n ] > Value [ n – 1 ], no modulo overflow, no modulo correction.
FCLConEvaluateModulo = Value [ n ] – Value [ n – 1 ]

Case #2:
Value [ n ] < Value [ n - 1 ], modulo overflow in positive direction
FCLConEvaluateModulo = Value [ n ] – Value [ n – 1 ] + moduloLength

Case #3:
Value [ n ] > Value [ n – 1 ], modulo overflow in negative direction
FCLConEvaluateModulo = Value [ n ] – Value [ n – 1 ] - moduloLength

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 46
2 Tools

In the examples, the modulo length is 360:


Table 2-3
valueLast valueAct Raw value deltaPos deltaNeg Result
130 330 200 200 -160 -160
330 130 -200 160 -200 160
330 150 -180 180 -180 180
330 330 0 0 0 0
150 330 180 180 -180 180
330 170 -160 200 -160 -160
170 330 160 160 -200 160

Error messages
The block does not generate any error messages.
If the input parameters are incorrect, then the difference is calculated without taking
the modulo into consideration.
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 47
3 Drive functions

3 Drive functions
3.1 FBLConFrictionMeasurement – Friction characteristic
The friction characteristic is measured in SIMOTION

Block name
FBLConFrictionMeasurement

Task
The function block runs up to the speeds, stored in the input array, and stores the
corresponding average of the actual moments in the output array. E.g. the stored
friction characteristic can be in the winder function block.

Integration in the run-time system


The function block must be called in a cyclic task (Background, Servo, IPO, IPO_2
or Timer).
 Siemens AG 2018 All rights reserved

Graphic representation of the block

FBLConFrictionMeasurement

BOOL execute done BOOL

BOOL abort busy BOOL

DRIVEAXIS axis commandAborted BOOL

UINT measurements error BOOL

REAL measurementDelayTime errorID DWORD

sLConDynamics dynamics
Type

UINT frictionCurveEntryNum UINT

ARRAY of REAL frictionCurveAbcissa ARRAY of REAL

ARRAY of REAL frictionCurveOrdinate ARRAY of REAL

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 48
3 Drive functions

Block parameters

Input parameters
Name Data type Initial value Description
execute BOOL FALSE FALSE->TRUE starts the friction measurement
FALSE->TRUE: Sequence interrupt and axis
abort BOOL FALSE
stopped
Axis for which the friction characteristic should be
axis DRIVEAXIS TO#NIL
measured [ min. speed axis ]
Number of values to generate the average value [ 0
measurements UINT 50
– 50]
measurementDelay [ms] Delay time before starting the measurement at
REAL 100
Time each speed level
sLConDynamics
dynamics - Axis dynamics from config structure
Type

Input/Output parameters
Name Data type Initial value Description
Number of grid points (Input):
frictionCurveEntryNum UINT 0 [2 ≤ frictionCurveEntryNum ≤
LCONLIB_MAX_IDX_A+1]
 Siemens AG 2018 All rights reserved

[ rpTU ; °/TU ] Abscissa values for the friction


ARRAY [0.. characteristic (speed; velocity)
frictionCurveAbscissa LCONLIB_MAX_I - [maximum’ LCONLIB_MAX_IDX_A+1’ x-y points],
DX_A] OF REAL corresponds to the configured units of the winder
axis ([ rev / TU ] or [ ° / TU ])
ARRAY [0.. [ M ] Ordinate values for the friction characteristic
frictionCurveOrdinate LCONLIB_MAX_I - (torque)
DX_A] OF REAL [maximum ‘ LCONLIB_MAX_IDX_A+1’ x-y points]

Output parameters
Name Data type Initial value Description
FALSE: A friction characteristic is not generated
done BOOL FALSE TRUE: Measurement completed, friction
characteristic generated
FALSE: A measurement is not made
busy BOOL FALSE
TRUE: A measurement is made
FALSE: Measurement was not interrupted
commandAborted BOOL FALSE
TRUE: Measurement was prematurely interrupted
FALSE: No error
error BOOL FALSE TRUE: An error has occurred, refer to error
identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 49
3 Drive functions

Functionality
Dependent on a request entered via the request input, the function block measures
the friction characteristic of the axis axis. If the axis is inactive, then it is enabled
and after the measurement has been completed it is inhibited again; for an active
axis, this remains active. With the measurement, the velocities or speeds – that
should be approached one after the other - are entered via the array
frictionCurveAbscissa. At each velocity or speed level that is reached (constant
move) and after the delay time measurementDelayTime the actual torque is saved
in the array frictionCurveOrdinate. In order to have the actual torque in the TO axis,
the technology data block must be activated. Parameter frictionCurveEntryNum
specifies how many values are to be taken. The average value is calculated over
several cycles. The number of measurements involved in generating the average
value can be defined using the input measurements. In this case, the input is
limited to 50 measurements. Output busy is set to True during the measurement.
After all of the velocities or speeds have been approached, and the measurement
completed, the done output is set to TRUE. If an error occurs during the
measurement, this is displayed at the error output and the associated errorID. If, at
the input, the abort signal abort is set to TRUE, the measurement is interrupted and
the axis stopped. For errors involving the system commands (_enableAxis, _move,
_stop, _disableAxis) and when the measurement is interrupted (aborted) by abort,
the commandAborted output is set.
After the friction characteristic measurement has been successfully completed the
values are in the array frictionCurveAbscissa.
 Siemens AG 2018 All rights reserved

Note The units of the velocity or speed in the array frictionCurveOrdinate, should
correspond to the units of the TO axis. If possible, [RPM] should also be plotted
because FBLConTorquePreControl calculates the friction torque with these units.

Errors
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#0108_C001 Non-compatible TO at the axis input
16#0108_C002 Technology data block is not activated
16#0108_8100 Error when enabling the axis
16#0108_8101 Error for a motion command
16#0108_8103 Error when stopping the axis
16#0108_8104 Error when inhibiting the axis
16#0108_C000 Internal program error

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 50
3 Drive functions

3.2 FBLConEnableInterface – Activate Interfaces


Function block for selective switching of the axis position, speed or torque
interfaces.

Name of function block


FBLConEnableInterface

Task
The function block activates or deactivates the cyclical interface for position,
velocity and torque. The interfaces are necessary e.g. for controlling of an axis
winder or a drive with overlaid tension control.

Integration into the runtime system


The function block must be called in a cyclic task (Background, Servo, IPO, IPO_2
or Timer).
 Siemens AG 2018 All rights reserved

Graphic presentation of the block

FBLConEnableInterface

DRIVEAXIS axis busy BOOL

BOOL enable error BOOL

EnumMovingMode movingMode errorId DWORD

BOOL motionInPosition motionInPositionActive BOOL

BOOL motionInVelocity motionInVelocityActive BOOL

BOOL additiveTorque additiveTorqueActive BOOL

BOOL torqueLimitNegative torqueLimitNegativeActive BOOL

BOOL torqueLimitPositive torqueLimitPositiveActive BOOL

sLConDynamics dynamics
Type

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 51
3 Drive functions

Block parameters

Input parameters
Name Data type Initial value Description
axis DRIVEAXIS - Technology object axis
TRUE: the function block is active, interfaces will be
activated/deactivated accordingly
enable BOOL FALSE
TRUE>FALSE: all interfaces will be deactivated
FALSE: function block inactive
enumMoving SPEED_ Mode selection for axis control.
movingMode
Mode CONTROLLED Only relevant, if the axis is a positioning axis.
TRUE: position interface is activated
FALSE: position interface is deactivated
The position interface is only on available for
positioning axes.
motionInPosition BOOL FALSE
The velocity interface has priority over the position
interface.
No messages are output if the command is not
allowed.
TRUE: velocity interface is activated
FALSE: velocity interface is deactivated
motionInVelocity BOOL FALSE
The velocity interface has priority over the position
interface.
TRUE: Interface for additive torque is activated
 Siemens AG 2018 All rights reserved

FALSE: interface for additive torque is deactivated


additiveTorque BOOL FALSE Technology data block is mandatory.
No messages are output if the command is not
allowed.
TRUE: interface for negative torque limit is activated
FALSE: interface for negative torque limit is
deactivated
torqueLimitNegative BOOL FALSE
Technology data block is mandatory.
No messages are output if the command is not
allowed.
TRUE: interface for positive torque limit is activated
FALSE: interface for positive torque limit is
deactivated
torqueLimitPositive BOOL FALSE
Technology data block is mandatory.
No messages are output if the command is not
allowed.
sLConDynamic
dynamics - Axis dynamics from config structure
sType

Output parameters
Name Data type Initial value Description
FALSE: no processing active
busy BOOL FALSE TRUE: at least one interface is active or being
activated/deactivated or enable = TRUE.
FALSE: No error
error BOOL FALSE TRUE: An error has occurred, refer to error
identification
All interfaces will be deactivated.
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
motionInPosition TRUE: The interface is active.
BOOL FALSE
Active FALSE: The interface is inactive.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 52
3 Drive functions

Name Data type Initial value Description


motionInVelocity TRUE: The interface is active.
BOOL FALSE
Active FALSE: The interface is inactive.
additiveTorque TRUE: The interface is active.
BOOL FALSE
Active FALSE: The interface is inactive.
torqueLimitNegative TRUE: The interface is active.
BOOL FALSE
Active FALSE: The interface is inactive.
torqueLimitPositive TRUE: The interface is active.
BOOL FALSE
Active FALSE: The interface is inactive.

Functionality
The Function Block activates and deactivates interfaces on a SIMOTION axis. The
input parameter axis transfers the name of the axis on which the interfaces should
be activated. Following input parameters de- or activate the interfaces:
motionInVelocity controls the MotionIn interface with velocity-Reference,
motionInPosition controls the MotionIn interface with position-reference,
additiveTorque controls the additive torque and
torqueLimitNegative/torqueLimitPositive are controlling the lower and upper torque
limits.
The interfaces are getting activated/deactivated in the following sequence:
1.) Interface for velocity/ position (_runvelocitybasedmotionin /
 Siemens AG 2018 All rights reserved

_runPositionBasedMotionIn / _move)
System variable: axis.defaultmotionin.velocity / axis.defaultmotionin.position
2.) Interface for additive torque (_enableaxisadditivetorque /
_disableaxisadditivetorque)
System variable: axis.defaultadditivetorque
3.) Interface for negative torque limit (_enableaxistorquelimitnegative /
_disableaxistorquelimitnegative)
System variable: axis.defaulttorquelimitnegative
4.) Interface for positive torque limit (_enableaxistorquelimitpositive /
_disableaxistorquelimitpositive)
System variable: axis.defaulttorquelimitpositive
While calling the commands, the respective system variables are set to zero once.
Exception is the activation of the MotionInPosition where the actual position is set.
Is enable set to FALSE all interfaces become deactivated. As long as the function
block is enabled the interfaces will always be activated and deactivated according
to the respective inputs.
If an error occurs, the output error is set to TRUE and the identification is shown on
output errorID.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 53
3 Drive functions

Graphic representation of the function


Figure 3-1: Graphic representation of the function
enable

busy (5)

<<interface>> (6)

<<interface (7)
active>>
(1) (2) (3) (4)

t
ta td ta td

1.) Interface will be activated, ta is the required activation time.


2.) Interface will be deactivated as the command is reset, td is the required
deactivation time.
 Siemens AG 2018 All rights reserved

3.) Interface will be activated as the command is set once again, ta is the required
activation time.
4.) Interface will be deactivated as the function block enable is switched off, td is
the required deactivation time.
5.) The output busy is set to FALSE when all interfaces are inactive.
6.) And 7.) The sequence for activation/deactivation is the same for all (velocity,
position, additive torque and torque limit) interfaces.

Note For activation of the motion Interface, the current values of UserDefaultDynamics
are taken and can not be changed later. For changing the dynamic values during
run, without calling the command again it is recommended to raise the
userDefaultDynamics and control the dynamic of the axis with
plusLimitsOfDynamics / minusLimitsOfDynamics.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 54
3 Drive functions

Errors
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#0109_810C Error while activating the MotionIn interface with position-reference.
The return value of the command _runPositionBasedMotionin is not 0.
16#0109_8105 Error while activating the MotionIn interface with velocity-reference.
The return value of the command _runVelocityBasedMotionin is not 0.
16#0109_8106 Error while activating the additive torque interface.
The return value of the command _disableAxisAdditiveTorque is not 0.
16#0109_8107 Error while activating the negative torque limit interface.
The return value of the command _disableAxisTorqueLimitNegative is not 0.
16#0109_8108 Error while activating the positive torque limit interface.
The return value of the command _enableAxisTorqueLimitPositive is not 0.
16#0109_8109 Error while deactivating the positive torque limit interface.
The return value of the command _disableaxistorquelimitpositive is not 0.
16#0109_810A Error while deactivating the negative torque limit interface.
The return value of the command _disableaxistorquelimitnegative is not 0.
 Siemens AG 2018 All rights reserved

16#0109_810B Error while deactivating the additive torque interface.


The return value of the command _disableAxisadditiveTorque is not 0.
16#0109_8101 Error while deactivating the MotionIn interface.
The return value of the command _move is not 0.
16#0109_C013 Time monitoring (watchdog) when switching the interfaces.
An interface was not able to be activated or deactivated within one second.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 55
4 Closed-loop control functions

4 Closed-loop control functions


4.1 FBLConPT1 – PT1 element
PT1 filter that can be set.

Block name
FBLConPT1

Task
This function block has the function of a PT1 filter. The input value is output filtered.
The filter effect can be influenced by the entered smoothing time. Further, it is
possible to set the output to a specific value.

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).
 Siemens AG 2018 All rights reserved

Graphic representation of the block

FBLConPT1

BOOL set error BOOL

REAL x errorID DWORD

REAL setValue y REAL

REAL smoothingTime

eTaskNameType taskMode

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input value to be filtered
[ ms ] Smoothing time
SmoothingTime REAL 100.0 Internal limiting in the standard mode – at least one
cycle time
setValue REAL 0.0 [ - ] Value to be set for S = TRUE
FALSE: Normal operation of the filter
set BOOL FALSE
TRUE: Sets the output to the value SV

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 56
4 Closed-loop control functions

Name Data type Initial value Description


Specification of the task in which the block is called.
IPO_ SERVO_SYNCHRONOUS_TASK
eTaskName
taskMode SYNCHRONOUS_ IPO_SYNCHRONOUS_TASK
Type
TASK IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameters
Name Data type Initial value Description
FALSE: No error
error BOOL FALSE TRUE: An error has occurred, refer to error
identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
y REAL 0.0 [ - ] Filtered output value

Functionality
A value (x) is entered into the function block. This value is filtered using the
smoothing time (smoothingTime) and output at output (y). To precisely calculate
 Siemens AG 2018 All rights reserved

the internal steps, the sampling time in which the block is processed is internally
determined. Further, it is possible to permanently set the output to the value of the
input (setValue) by setting the input (set).
Interconnection possibility:
In order to generate a HOLD, output (y) should be connected to the input
(setValue) using a variable. This means that when setting set to TRUE, the output
value is maintained until set is again set to FALSE. If the smoothing time
(smoothingTime) 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 the smoothing time
(smoothingTime).
95% of the input value is reached at the output after three times (300%) of the
smoothing time (smoothingTime).
The proportional gain – internally set – is 1 and cannot be varied.
For an appropriately high smoothingTime /TA (smoothingTime /TA > 10) the
transfer function corresponds to the following characteristic
Y (t ) X * (1  e t / smoothingTime ) with t  n * TA

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 57
4 Closed-loop control functions

The discrete values are calculated using the following algorithm:

*  X n  Yn 1 
TA
Yn  Yn 1 
smoothingTime
Yn Value of Y in sampling interval n
Yn-1 Value of Y in sampling interval n – 1
Xn Value of X in sampling interval n

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

Graphic representation of the function


Figure 4-1: HOLD function (feedback from output y to setValue)
Y

95%
 Siemens AG 2018 All rights reserved

63%
X
( 100%)

3 x smoothingTime t

smoothingTime
X

100 %

50 %
t

set

smoothing
Time

100 %

50%

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 58
4 Closed-loop control functions

Figure 4-2: Setting function (a fixed value is present at input setValue)


Y

95%

63%
X
( 100%)

3 x smoothingTime t

smoothingTime
X

100 %

50 %
0% t

setValue

100 %

50 %
0% t

set

smoothing
 Siemens AG 2018 All rights reserved

Time

100 %

50%

0%
t

Errors
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#0101_8001 The function block is called in an incorrect task.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 59
4 Closed-loop control functions

4.2 FBLConINT – Integrator


Function block with integrating behavior, setting value function and output limiting

Block name
FBLConINT

Task
The function block represents an integrator with upper and lower limiting. Further,
the output can be set to a defined output value.

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FBLConINT

BOOL set error BOOL

REAL x errorID DWORD

REAL setValue y REAL

REAL upperLimit upperLimitReached BOOL

REAL lowerLimit lowerLimitReached BOOL

REAL integralTime

eTaskNameType taskMode

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 60
4 Closed-loop control functions

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: Normal integrator function
set BOOL FALSE
TRUE: Output is set value
x REAL 0.0 [ - ] Input quantity, integration value
setValue REAL 0.0 [ - ] Setpoint input for the setting function
upperLimit REAL 1.0 [ - ] Upper integration limit
lowerLimit REAL 0.0 [ - ] Lower integration limit
integralTime REAL 5.0 [ ms ] Integration time TI [ sampling time – 1000]
Specification of the task in which the block is called.
IPO_
SERVO_SYNCHRONOUS_TASK
eTaskName SYNCHRONOUS_
taskMode IPO_SYNCHRONOUS_TASK
Type TASK
IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameters
Name Data type Initial value Description
FALSE: No error
 Siemens AG 2018 All rights reserved

error BOOL FALSE


TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
y REAL 0.0 [ - ] Output quantity, integration value
upperLimit FALSE: Upper limit not reached
BOOL FALSE
Reached TRUE: Upper limit reached
lowerLimit FALSE: Lower limit not reached
BOOL FALSE
Reached TRUE: Lower limit reached

Functionality
The function block integrates input quantity 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 and saved as internal buffer value. Further, 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.
integralTime is internally limited with
TA  integralTime  1000

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 61
4 Closed-loop control functions

The discrete values (TA is the sampling time in which the function block is
processed) are calculated using the following algorithm:
TA
Yn  Yn 1  * Xn
integralTime
Yn Value of Y in sampling interval n
Yn-1 Value of Y in sampling interval n-1
X Value of X in sampling interval n

Graphic representation of the function


Figure 4-3: Block diagram

IntegralTime lower upper


Limit Limit

setValue upperLimitReached
y
x
lowerLimitReached

set
 Siemens AG 2018 All rights reserved

Table 4-1 Truth table for LL<LU


upper lower Mode
Set Condition y Limit Limit
Reached Reached
lowerLimit < 0 Integrating
0 yn-1 + x * TA/IntegralTime yn 0
< upperLimit
yn-1 + x * TA/integralTime upper 0 Integrator at the
0 >= upperLimit 1 upper limit
Limit
yn-1 + x * TA/integralTime lower 1 Integrator at the
0 <= lowerLimit 0 lower limit
Limit
lowerLimit < setValue < set 0 Setting
1 upperLimit 0
Valuen
setValue >= upperLimit upper 0 Integrator at the
1 1 upper limit
Limit
setValue <= lowerLimit lower 1 Integrator at the
1 0 lower limit
Limit

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 62
4 Closed-loop control functions

Table 4-2 Truth table for lowerLimit > upperLimit


upper lower
Set Condition Y Limit Limit Mode
Reached Reached
lowerLimit < Integrator limited
* yn-1+x * TA/integralTime < yn 0 0 by upper Limit
upperLimit

* = any

Errors
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#0102_8001 The function block is called in an incorrect task.
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 63
4 Closed-loop control functions

4.3 FBLConDIF – Differentiating element


Differentiating element

Block name
FBLConDIF

Task
Function block with differentiating behavior

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Graphic representation of the block

FBLConDIF
 Siemens AG 2018 All rights reserved

REAL x error BOOL

REAL diffTime errorID DWORD

eTaskNameType taskMode y REAL

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input quantity
diffTime REAL 0.0 [ ms ] Differentiating time constant
Specification of the task in which the block is called.
IPO_ SERVO_SYNCHRONOUS_TASK
eTaskName
taskMode SYNCHRONOUS_ IPO_SYNCHRONOUS_TASK
Type
TASK IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameters
Name Data type Initial value Description
FALSE: No error
error BOOL FALSE
TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
y REAL 0.0 [ - ] Output quantity

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 64
4 Closed-loop control functions

Functionality
Output quantity y changes as a function of the rate of change of input quantity x,
multiplied by the differential time constant diffTime. Discrete values are calculated
using the following algorithm:

Yn   X n  X n 1 *
diffTime
TA
Yn Value of Y in sampling interval Y
Xn Value of X in sampling interval n
Xn-1 Value of X in sampling interval n-1

Note The higher the diffTime / TA the lower the amplitude change at y from one
sampling instant to the next sampling instant. TA is the sampling time in which
the function block is processed. diffTime is internally limited diffTime >= 0.

Graphic representation of the function


Figure 4-4: Block diagram
 Siemens AG 2018 All rights reserved

diffTime

Errors
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#0103_8001 The function block is called in an incorrect task.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 65
4 Closed-loop control functions

4.4 FBLConDT1 – DT1 filter


Function block with DT1 behavior

Block name
FBLConDT1

Task
Function block with differentiating behavior and smoothing. The DT1 output can be
set.

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FBLConDT1

BOOL set error BOOL

REAL x errorID DWORD

REAL setValue y REAL

REAL smoothingTime ypt REAL

REAL diffTime

eTaskNameType taskMode

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: Setting value has no influence on the output
quantity of the DT1 element
set BOOL FALSE TRUE: Output value Y is set to the value of input SV and
the output of the DT1 element corresponds to the
equation below
x REAL 0.0 [ - ] Input quantity
setValue REAL 0.0 [ - ] Setting value
[ ms ] Smoothing time constant
SmoothingTime REAL 0.0
is internally limited :[SamplingTime – T1Max]

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 66
4 Closed-loop control functions

Name Data type Initial value Description


[ ms ] Differentiating time constant
diffTime REAL 0.0
is internally limited : [0.0 – TDMax]
Specification of the task in which the block is called.
IPO_ SERVO_SYNCHRONOUS_TASK
eTaskName
taskMode SYNCHRONOUS_ IPO_SYNCHRONOUS_TASK
Type
TASK IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameters
Name Data type Initial value Description
FALSE: No error
error BOOL FALSE
TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
y REAL 0.0 [ - ] Output quantity DT1
ypt REAL 0.0 [ - ] Output quantity smoothing element

Functionality
 Siemens AG 2018 All rights reserved

Setting function not active (set = FALSE)


Input quantity x is dynamically delayed and the smoothing time constant
smoothingTime is entered at a differentiating element and at block output YPT. The
output quantity Y of the complete DT1 element is multiplied, with the same
relationship of the rated of change of YPT (difference quotient) with differential time
constant diffTime.
SmoothingTime defines the gradient of the down ramp of the output quantity. 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 /TA (smoothingTime /TA > 10), the transfer
function corresponds to a characteristic of:

Y (t )  X * diffTime / smoothingTime* et / smoothingTime mit t  n *TA


The discrete values are calculated using the algorithm:
diffTime
Y 1n  * ( X n  YPTn 1)
smoothingT ime
TA
YPTn  YPTn 1  * ( X n  YPTn 1)
smoothingT ime
YPTn Value of YPT in sampling interval n
Yn Value of Y in sampling interval n
Xn Value of X in sampling interval n
YPTn-1 Value of Y2 in sampling interval n-1

The higher the smoothingTime /TA, the lower the amplitude change at Y and at
YPT from one sampling instant to the next sampling instant. TA is the sampling
time in which the function block is processed.
The higher the diffTime /TA, the higher the amplitude change at Y from one
sampling instant to the next sampling instant. DiffTime and smoothingTime are
internally limited:
0 <= diffTime <= MaxTD, TA <= smoothingTime <= MaxT1

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 67
4 Closed-loop control functions

Setting function active (set = TRUE)


When the setting function is active, setting value setValue is transferred to DT1
output Y; the output of the smoothing element is obtained as follows:
smoothingT ime
YPTn  X n  * setValuen for diffTime  0
diffTime

In this case, the internal limits for smoothingTime1 and diffTime apply. For diffTime
= 0, the output quantities remain unchanged as long as set = TRUE.
Caution: Overcontrol (limits reached) can occur when the setting function is both
active as well as also inactive!

Graphic representation of the function


Figure 4-5: Block diagram

smoothing diff setValue


Time Time

x Y
 Siemens AG 2018 All rights reserved

set
YPT

Figure 4-6: Transfer function

Y1

Y1=f(X,t)
x*diffTime/
smoothingTime
Y1(t=T1)=0,37*x*diffTime/
smoothingTime

t
smoothing
Time

Errors
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#0104_8001 The function block is called in an incorrect task.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 68
4 Closed-loop control functions

4.5 FBLConLIM – Limiter with feedback signal


Limiter with settable limits

Block name
FBLConLIM

Task
Function block for limiting with settable upper and lower limits. If a limit is reached,
this is displayed.

Integration in the run-time system


The function block can be called in any task.

Graphic representation of the block

FBLConLIM
 Siemens AG 2018 All rights reserved

REAL x y REAL

REAL upperLimit upperLimitReached BOOL

REAL lowerLimit lowerLimitReached BOOL

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input quantity to be limited
upperLimit REAL 0.0 [ - ] Upper limit value
lowerLimit REAL 0.0 [ - ] Lower limit value

Output parameters
Name Data type Initial value Description
y REAL 0.0 [ - ] Limited output quantity [lowerLimit – upperLimit]
FALSE: Upper limit not reached
upperLimitReached BOOL TRUE
TRUE: Upper limit reached
FALSE: Lower limit not reached
lowerLimitReached BOOL TRUE
TRUE: Lower limit reached

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 69
4 Closed-loop control functions

Functionality
The function block transfers input quantity x to its output y. The input quantity is
limited dependent on upperLimit and lowerLimit.
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.

Graphic representation
Figure 4-7

lower upper
Limit Limit

upperLimitReached
x y
lowerLimitReached
 Siemens AG 2018 All rights reserved

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

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 70
4 Closed-loop control functions

4.6 FBLConLevelControl – Limit value monitor


Block name
FBLConLevelControl

Task
This function block monitors an input value to identify whether it violates (exceeds,
falls below) the parameterized limit values. The monitoring is only activated as long
as the block is active.

Integration in the run-time system


The function block must be called in a cyclic task (Background, Servo, IPO, IPO_2
or Timer).

Graphic representation of the block

FBLConLevelControl
 Siemens AG 2018 All rights reserved

BOOL run busy BOOL

REAL x alarmUpperLimit BOOL

REAL alarmHigh warningUpperLimit BOOL

REAL warningHigh warningLowerLimit BOOL

REAL warningLow alarmLowerLimit BOOL

REAL alarmLow

REAL hyst

TIME delayTime

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 71
4 Closed-loop control functions

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: Function is de-activated
run BOOL FALSE
TRUE: Function is activated
x REAL 0.0 [ - ] Input value to be monitored
alarmHigh REAL 100.0 [ - ] Upper limit value, alarm
warningHigh REAL 80.0 [ - ] Upper limit value, warning
warningLow REAL -80.0 [ - ] Lower limit value, warning
alarmLow REAL -100.0 [ - ] Lower limit value, alarm
[ - ] Hysteresis
hyst REAL 0.0
This value is always taken into account as absolute value.
delayTime TIME T#3s [s] Delay Time to set outputs

Output parameters
Name Data type Initial value Description
FALSE: Function is de-activated
busy BOOL FALSE
TRUE: Function is activated
 Siemens AG 2018 All rights reserved

Alarm, upper limit value exceeded


alarmUpperLimit BOOL FALSE
rX > rAH, the message is reset with rx < rAH – rHy.
warningUpper Warning, upper limit value exceeded
BOOL FALSE
Limit rX > rWH, the message is reset with rx < rWH – rHy.
warningLower Warning, lower limit value exceeded
BOOL FALSE
Limit rX < rWL, the message is reset with rx > rWL + rHy
Alarm, lower limit value exceeded
alarmLowerLimit BOOL FALSE
rX < rAL, the message is reset with rx > rAL + rHy

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 functioning, then this can be identified using the busy output.
When the warningHigh value is exceeded, output warningUpperLimit is set after
delayTime. The same applies when the alarmHigh value is exceeded with the
associated output alarmUpperLimit. If the input value drops below the limit value
warningHigh or alarmHigh minus the hysteresis value (hyst), the particular output is
again 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 alarms.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 72
4 Closed-loop control functions

4.7 FCLConDeadBand – Dead band element


Settable dead band that sets the value range – symmetrical around the zero point
– to zero.

Block name
FCLConDeadBand

Task
The function generates a dead band whose values cannot be reached. All values
in this value range –symmetrical around the zero point – are set to zero.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConDeadBand

REAL x FCLConDeadBand REAL

REAL bandBorder

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input value that should be checked
bandBorder REAL 0.0 [ - ] Limit value for dead band

Output parameters
Name Data type Initial value Description
FCLConDead
REAL - [ - ] Checked output value
Band

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 73
4 Closed-loop control functions

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) at output input – bandBorder is output. If the input value is at or
above (+bandBorder), x + bandBorder is set to as output value. The dead band –
symmetrical around the zero point – can be set using response value B.
Algorithm:
X+B for X <= -B
Y=0 for -B < X < + B
X-B for X >= +B
with the secondary condition B >= 0. For B < 0, all IN: OUT=IN.
X Input quantity
B Response threshold for the dead band
Y Output quantity

Graphic representation of the function


Figure 4-8: Transfer function
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 74
4 Closed-loop control functions

4.8 FCLConDeadZone – Dead zone element


Settable dead zone that sets the value range – symmetrical around the zero point
– to zero.

Block name
FCLConDeadZone

Task
The function generates a dead zone whose values cannot be reached. All values in
the value range – symmetrical around the zero point – are set to zero.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConDeadZone

REAL x FCLConDeadZone REAL

REAL zoneBorder

Block parameters

Input parameters
Name Data type Initial value Description
x REAL 0.0 [ - ] Input value which should be checked
zoneBorder REAL 0.0 [ - ] Limit value for dead zone

Output parameters
Name Data type Initial value Description
FCLConDeadZone REAL - [ - ] Checked output value

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 75
4 Closed-loop control functions

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

X for X <= -TH


Y=0 for -TH < X < +TH
X for X >= +TH
with the secondary condition TH >= 0. For TH < 0 for all the following applies X: Y
= X.
X Input quantity
TH Response threshold for the dead zone
Y Output quantity

Graphic representation of the function


 Siemens AG 2018 All rights reserved

Figure 4-9: Transfer function

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 76
4 Closed-loop control functions

4.9 FBLConAverageValue – Average value generator


Floating average value generator

Block name
FBLConAverageValue

Task
The function calculates the floating average value for the values entered at the
input.

Integration in the run-time system


The function block must be called in a cyclic task (Background, Servo, IPO, IPO_2
or Timer

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FBLConAverageValue

BOOL run busy BOOL

BOOL reset averageValue REAL

REAL x maxValueReached BOOL

INT sizeOfArray

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 77
4 Closed-loop control functions

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: Function block is not active
run BOOL FALSE TRUE: Function block is active and calculates an average
value
reset BOOL FALSE TRUE: Resets the calculation
x REAL 0.0 [ - ] Actual input value
sizeOfArray INT 0 [ - ] Size of the field to save the value [1 – 50]

Output parameters
Name Data type Initial value Description
FALSE: FB does not calculate any values
busy BOOL FALSE
TRUE: FB calculates values
averageValue REAL 0.0 [ - ] Calculated average value
TRUE: maximum Values in the array
maxValueReached BOOL FALSE
sizeOfArray – Values are in the array
 Siemens AG 2018 All rights reserved

Functionality
The function block calculates the average value (averageValue) of several values
that are entered and saved. Each time the block is called, the value (x) currently
present is saved in a field (sizeOfArray). The larger the field, the more the average
value moves. If the field size is very small, changes and fluctuations can be
immediately identified in the average value, which is present at the output
(averageValue). The function block is activated via the input run and calculates
values from that instant. Similar to that for reset, the field size is accepted and the
associated field counter is reset. The Output maxValueReached is set if
sizeOfArray Values are in the array. With reset = TRUE the output averageValue is
set to the input value x.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 78
4 Closed-loop control functions

4.10 FBLConPIDController
PID controller with actual value smoothing and optional D component in the actual
value branch.

Block name
FBLConPidController

Task
The function block has the following functionality:
PID controller
Actual value smoothing with PT1 element
Scaling of the actual value signal
Proportional, integral and derivative action component
 Optional derivative action component in the actual value arm
 “Anti-windup” integrator: If the controller output is limited, then the integrator is
frozen when the limit is reached
 Pre-control signal
 Siemens AG 2018 All rights reserved

 Deadband filter for the system deviation


 Output scaling
 Output limiting
The block can be used as higher-level controller, e.g. for closed-loop tension
control or closed-loop dancer roll control.

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 79
4 Closed-loop control functions

Graphic representation of the block

FBLConPidController

BOOL enable busy BOOL

BOOL reset error BOOL

REAL setpointValue errorID DWORD

REAL actualValue upperLimitReached BOOL

REAL preControl lowerLimitReached BOOL

REAL propGain deviationValue REAL

REAL integTime pOutValue REAL

REAL derivTime iOutValue REAL


 Siemens AG 2018 All rights reserved

REAL filterTime dOutValue REAL

REAL upperLimit outValue REAL

REAL lowerLimit

REAL intSetValue

BOOL holdIntChannel

BOOL setIntChannel

sPidDataType sPidData

eTaskName taskMode
Type

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 80
4 Closed-loop control functions

Block parameters

Input parameter
Name Data type Initial value Description
TRUE: Controller, active, outputs are calculated
enable BOOL FALSE FALSE: Controller inactive, all outputs are set to the
initial values
TRUE: The outputs are set to the initial values and
reset BOOL FALSE
the integrator to the starting value.
setpointValue REAL 0.0 [ - ] Setpoint signal
actualValue REAL 0.0 [ - ] Actual value signal
preControl REAL 0.0 [ - ] Pre-control signal
propGain REAL 2.0 [ - ] Controller gain
[ ms ] Time constant of the I component – is internally
integTime REAL 999.0
limited to cycle time / 2 as the lower limit value.
[ ms ] Time constant of the D component – the value
derivTime REAL 4.0
is internally limited to cycle time as lower limit value.
[ ms ] Time constant of the actual value smoothing –
this is internally limited to the cycle time as lower limit
filterTime REAL 50.0
value. The smoothing is deactivated if values <= 0.0
are parameterized.
[ - ] Upper limit value of the control output. This must
 Siemens AG 2018 All rights reserved

upperLimit REAL 100.0


be greater than lowerLimit
lowerLimit REAL 0.0 [ - ] Lower limit value of the control output.
intSetValue REAL 0.0 [ - ] Integrator setting value
holdIntChannel BOOL FALSE TRUE: I component is frozen
setIntChannel BOOL FALSE TRUE: I component is set to the initial value
sPidDate sPidDataType Refer to the data type description sPidDataType
Execution level, in which the block is called.
IPO_ SERVO_SYNCHRONOUS_TASK
eTaskName
taskMode SYNCHRONOUS_ IPO_SYNCHRONOUS_TASK
Type
TASK IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Output parameter
Name Data type Initial value Description
FALSE: No error
TRUE: An error has occurred, refer to error
identification
error BOOL FALSE
All outputs have the initial values, errors can be reset
using the reset function or rising edge at the enable
input.
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
busy BOOL FALSE TRUE: Block is active
BOOL TRUE: Controller output has reached the upper limit,
upperLimitReached FALSE
the integrator is limited
BOOL TRUE: Controller output has reached the lower limit,
lowerLimitReached FALSE
the integrator is held
deviationValue REAL 0.0 [ - ] System deviation after the deadband filter
pOutValue REAL 0.0 [ - ] P component output, unlimited
iOutValue REAL 0.0 [ - ] I component output, unlimited

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 81
4 Closed-loop control functions

Name Data type Initial value Description


REAL [ - ] D component output, unlimited (if not in the actual
dOutValue 0.0
value branch)
outValue REAL 0.0 [ - ] Controller output, limited and scaled

Data types and structures


Name of the structure Contents
Configuration data of the PID controller
sPidDataType
Declared in: LConLib.fConvTools

sPidDataType
The following type declaration applies:
I/O Element Data type Description
TRUE: P component is activated
IN boEnPChannel BOOL
Pre-assignment: TRUE
TRUE: I component is activated
IN boEnIChannel BOOL
Pre-assignment: TRUE
 Siemens AG 2018 All rights reserved

TRUE: D component is activated


IN boEnDChannel BOOL
Pre-assignment: FALSE
TRUE: D component is effective in the actual
value branch (after smoothing) and not in the
IN boControlMode BOOL system deviation
Only active, if the D component is activated
Pre-assignment: FALSE
[ - ] Width of the deadband, for r32DeadBand =
IN r32DeadBand REAL 0.0, the deadband is deactivated.
Pre-assignment: 0.0
[ - ] Scaling factor of the actual value quantity
IN r32ActValueFactor REAL
Pre-assignment: 1.0
[ - ] Offset of the actual value quantity
IN r32ActValueOffset REAL
Pre-assignment: 0.0
[ - ] Scaling factor of the output quantity
IN r32OutValueFactor REAL
Pre-assignment: 1.0
[ - ] Offset of the output quantity
IN r32OutValueOffset REAL
Pre-assignment: 0.0

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 82
4 Closed-loop control functions

Functionality
The function block is used to implement a universal PID controller that can be
switched over to the 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) corresponding to the following equation:
 
t

deviationValue  (actualValue  r 32 ActValueFactor)  r 32 ActValueOffset   1  e T   setpo intValue
 
 
The result is the system deviation deviationValue (after the deadband) and is then
multiplied with the proportional coefficient propGain that can be set. 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.

Table 4-3: Calculating the control components


 Siemens AG 2018 All rights reserved

Component Calculation
P component pOutValuen  propGain  deviationValuen
I component pOutValuen  pOutValuen  1 T Zyklus
iOutValuen  iOutValuen  1  
2 int egTime
Tcycle: Sampling time
The integrator includes "anti-windup" functionality, i.e. if the controller
output is limited, the integrator cannot continue to integrate in the same
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
dOutValuen   pOutValuen  pOutValuen  1 
derivTime
(if activated) Tcycle
Tcycle: Sampling time

The controller output is first scaled and is then limited.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 83
4 Closed-loop control functions

Warnings
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
Invalid parameter, it is internally limited
16#0110_4002 derivTime < Tcycle,
integTime < Tcycle / 2

Errors
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#0110_8001 The function block is called in an incorrect task.
Invalid parameter
16#0110_8005
upperlimit < lowerlimit
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 84
4 Closed-loop control functions

Signal diagram
Fig. 4-10

enable 1
(IN) 0

1
reset
(IN) 0

busy 1
(OUT) 0

error 1

(OUT) 0
 Siemens AG 2018 All rights reserved

outValue
(OUT)

Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7 Case 8

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


outValue is activated.
 Case 2, 7 – The error has been detected, error = TRUE, busy = FALSE,
outValue = 0.0 – up to reset = TRUE or restart.
 Case 3 – Block is reset – as long as reset = TRUE. Error = FALSE.
 Case 4 – Block is 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.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 85
4 Closed-loop control functions

Function diagram
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 86
4 Closed-loop control functions

4.11 FBLConTechnologyController – Technology controller


Technology controller based on a PID controller for use as tension or dancer roll
position controller in closed-loop winder or material web controls.

Block name
FBLConTechnologyController

Task
The function block includes the following functionality:
 Setpoint ramp-function generator with setting function
 PID controller
 Ramp function as controller output limiting
 Kp adaptation
 D component can be optionally switched-in in the actual value branch
 Siemens AG 2018 All rights reserved

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 87
4 Closed-loop control functions

Graphic representation of the block

FBLConTechnologyController

BOOL enable busy BOOL

BOOL openLoopCtrl error BOOL

REAL setpointValue errorID DWORD

REAL actualValue upperLimReached BOOL

REAL preControl lowerLimReached BOOL

REAL adaptionValue RFGLimReached BOOL

BOOL holdIntChannel RFGSetpointReached BOOL

BOOL setIntChannel RFGSetpointValue REAL


 Siemens AG 2018 All rights reserved

eTaskNameType taskMode outValue REAL

sTechnology sTechnologyControllerConfig sTechnology


ControllerConfig ControllerConfig
Type Type

Block parameters

Input parameters
Name Data type Initial value Description
FALSE -> TRUE: Ramp-function generators are started,
PID controller is active (if not in the openLoop mode)
enable BOOL FALSE TRUE -> FALSE: Setpoint is integrated to the actual
value, the controller output is limited and then FB
deactivated.
FALSE: PID controller is active
openLoopCtrl BOOL FALSE TRUE: PID controller and RFG limiting are inactive. Only
the setpoint RFG is used.
setpointValue REAL 0.0 [ Z ] / [ LU ] / [ % ] Setpoint signal
actualValue REAL 0.0 [ Z ] / [ LU ] / [ % ] Actual value signal
preControl REAL 0.0 [ rpTU ] or [ °/TU ] pre-control signal
[ - ] Signal for Kp adaptation
adaptionValue REAL 0.0
The units depend on the interconnection.
holdIntChannel BOOL FALSE TRUE: I component is frozen
setIntChannel BOOL FALSE TRUE: set I component

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 88
4 Closed-loop control functions

Specification of the task in which the block is called.


eLConTaskNa IPO_ SERVO_SYNCHRONOUS_TASK
taskMode me SYNCHRONO IPO_SYNCHRONOUS_TASK
Type US_TASK IPO_SYNCHRONOUS_TASK_2
TIMER_INTERRUPT_TASK

Input/output parameters
Name Data type Initial value Description
sLConTechnol
sTechnology Configuration data of the technology controller. Details on
ogy
Controller - this structure are provided in the description of the type
Controller
Config definitions.
ConfigType

Output parameters
Name Data type Initial value Description
FALSE: The function block is deactivated
busy BOOL FALSE TRUE: The function block is activated. The controller
output or the ramped setpoint (in case of openLoopCtrl =
TRUE) is not zero.
FALSE: No error
error BOOL FALSE
TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
 Siemens AG 2018 All rights reserved

errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning


errorID >= 16#0000_8000: error
upperLimReached BOOL FALSE TRUE: Output is limited, upper limit
lowerLimReached BOOL FALSE TRUE: Output is limited, lower limit
TRUE: Output ramp-function generator has reached the
RFGLimReached BOOL FALSE
limit ( = 100%).
RFGSetpoint TRUE: Setpoint has been reached, the ramp-function
BOOL FALSE
Reached generator output corresponds to the setpoint.
[ Z ] / [ LU ] / [ % ] Setpoint after the ramp-function
RFGSetpointValue REAL 0.0
generator
[ LU/TU ] or [Z] controller output after scaling and limiting.
outValue REAL 0.0
The units are dependent on the interconnection.

Note The calculations in this function block are independent of the physical units.
[LU] Length unit, e.g. m
[Z] Tension, force, e.g. N

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 89
4 Closed-loop control functions

Data types and structures


Name of the structure Contents
Configuration data of the PID controller
sPidDataType
Declared in: LConLib.fConvTools
sTechnologyController Configuration data of the technology controller
ConfigType Declared in: LConLib. fConvTools

sLConPidDataType
The following type declaration applies:
I/O Element Data type Description
TRUE: P component is activated
IN boEnPChannel BOOL
Pre-assignment: TRUE
TRUE: I component is activated
IN boEnIChannel BOOL
Pre-assignment: TRUE
TRUE: D component is activated
IN boEnDChannel BOOL
Pre-assignment: FALSE
TRUE: D component is effective in the actual
value branch (after smoothing) and not in the
IN boControlMode BOOL system deviation
 Siemens AG 2018 All rights reserved

Only active, if the D component is activated


Pre-assignment: FALSE
[ - ] Width of the deadband, for r32DeadBand =
IN r32DeadBand REAL 0.0, the deadband is deactivated.
Pre-assignment: 0.0
[ - ] Scaling factor of the actual value quantity
IN r32ActValueFactor REAL
Pre-assignment: 1.0
[ - ] Offset of the actual value quantity
IN r32ActValueOffset REAL
Pre-assignment: 0.0
[ - ] Scaling factor of the output quantity
IN r32OutValueFactor REAL
Pre-assignment: 1.0
[ - ] Offset of the output quantity
IN r32OutValueOffset REAL
Pre-assignment: 0.0

sLConTechnologyControllerConfigType
The following type definition applies:
I/O Element Data type Description
IN r32X1 REAL [ - ] x coordinate for Kp adaptation for Kp1
[ - ] Kp value for r32X1.
IN r32Kp1 REAL If the Kp adaptation is deactivated, then this
parameter is used as Kp value.
[ - ] x coordinate for Kp2
IN r32X2 REAL If r32X1 = r32X2, then the Kp adaptation is
deactivated.
[ - ] second Kp value, assigned corresponding to
IN r32Kp2 REAL
r32X2.
OUT r32EffectiveKp REAL [ - ] effective controller gain after Kp adaptation
[ ms ] ramp-up time of the controller output
IN r32LimRampUpTime REAL limiting.
This is internally limited to the cycle time as

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 90
4 Closed-loop control functions

I/O Element Data type Description


lower value.
[ ms ] ramp-down time of the controller output
limiting.
IN r32LimRampDownTime REAL
This is internally limited to the cycle time as
lower limit.
[ Z ] / [ LU ] / [ % ] setpoint RFG, reference value
IN r32SetNominalValue REAL
for ramp-up/ramp-down time.
[ ms ] setpoint RFG ramp-up time
IN r32SetRampUpTime REAL This is internally limited to the cycle time as
lower limit.
[ ms ] setpoint RFG ramp-down time
IN r32SetRampDownTime REAL This is internally limited to the cycle time as
lower limit.
[ ms ] time constant for I component
IN r32IntegTime REAL This is internally limited to the cycle time / 2 as
lower limit.
[ ms ] time constant for D component
IN r32DerivTime REAL This is internally limited to the cycle time as
lower limit.
[ ms ] time constant for actual value smoothing
This is internally limited to the cycle time as
IN r32FilterTime REAL
lower limit. If r32FilterTime = 0.0, then smoothing
is deactivated.
IN r32IntSetValue REAL [ LU/TU ] / [Z] integrator setting value
 Siemens AG 2018 All rights reserved

PID controller configuration data, refer to the


IN sPidData sPidDataType
type description
IN r32UpperLimit REAL [ LU/TU ] / [Z] controller output, upper limit value
[ LU/TU ] / [Z] controller output, lower limit value.
IN r32LowerLimit REAL
Must be less than r32UpperLimit.

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, for a rising
edge, the setpoint ramp-function generator is set to the actual value that is present
(actualValue). This guarantees a jerk-free and smooth transition into the tension
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 a
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 the input openLoopCtrl = TRUE, then the block operates in the open control
circuit 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.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 91
4 Closed-loop control functions

Setpoint ramp
The setpoint ramp-function generator is used to avoid setpoint steps in the setpoint
channel. The setpoint ramp-function generator is configured using parameter
r32SetRampDownTime , r32SetRampUpTime, and r32SetNominalValue, whereby
r32SetNominalValue 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.
Limit ramp
The limit ramp is only active, if the technology controller is used as closed control
loop. When switching on the controller with enable = TRUE, the limits are ramped
to 100% using the parameterized ramp-up time (r32LimRampUpTime). The output
limit (r32UpperLimit and r32LowerLimit) is therefore completely effective.
When switching off (enable = FALSE), the controller limits are ramped back to 0%
(r32LimRampDownTime), to permit bumpless transition into the non-controlled
mode. The controller is deactivated once zero has been reached.
The times are internally limited to the cycle time.
Controller function
Controller setpoint is provided via the setValue, the actual value via the actValue
input. The setpoint channel includes a settable setpoint ramp-function generator,
 Siemens AG 2018 All rights reserved

via which the setpoint is routed; the effective setpoint can be monitored at output
RFGSetValue. The control algorithm used corresponds to that described in block
FBLConPidController.
Kp adaptation
A linear adaptation is carried out as Kp adaptation. The interpolation straight line is
defined by the value tuple (r32X1, r32Kp1) and (r32X2, r32Kp2).
1st case: (adaptionValue < r32X1) or (r32X1 = r32X2):

r32EffectiveKp = r32Kp1

2nd case: r32X1 <= adaptionValue <= r32X2:

(adaptionValue  r 32 X 1)( r 32 Kp2  r 32 Kp1)


r 32 EffectiveK p  r 32 Kp1 
(r 32 X 2  r 32 X 1)

3rd case: adaptionValue > r32X2:

r32EffectiveKp = r32Kp2

r32Kp1 is used as effective Kp if the Kp adaptation is deactivated.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 92
4 Closed-loop control functions

Graphic representation of the function

1
enable
0

1
busy 0

100%

RFGLim.y
0%

1
RFGLimReached 0

100%
p%
actualValue
0%

100%
setpointValue
0%

100%
RFGSetpointValue p%
0%

1
RFGSetpointReached 0
 Siemens AG 2018 All rights reserved

Warnings
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
Invalid parameter, internal limitation
16#0208_4002 derivTime < Tcycle,
integTime < Tcycle / 2

Errors
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#0208_8001 The function block is called in an incorrect task.
Invalid parameter:
sTechnologyControllerConfig.r32Upperlimit <=
16#0208_8005
sTechnologyControllerConfig.r32Lowerlimit
sTechnologyControllerConfig.r32SetNominalValue <= 0.0

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 93
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Function plan FBTechnologyController SIMOTION Page 1 of 1
modified: 15.01.2009, 16:51:35
1 2 3 4 5 6 7 8

SetpointRFG
1 EN Y RFGSetPointValue
setpointValue
X QE RFGSetPointReached
0.0 0 NRM QU
A MaxReal LU QL
r32SetNominalValue
Function diagram

MinReal LL
SV
r32SetRampUpTime TU
r32SetRampDownTime TD
CU
CD
TRUE CF
S

Manual SIMOTION Converting Library


actualValue
4 Closed-loop control functions

Entry-ID: 48805235, V2.2.7, 10/2018


enable
r32upperLimit
LimitRFG
B EN Y
X QE
NRM QU
1 1.0 LU QL
1.0
LL
0 0 0.0 SV
r32LimRampUpTime TU
TD r32EffectiveKp
r32LimRampDownTime
CU
busy CD
& TRUE CF
openLoopCtrl S

r32lowerLimit
C
= ≥1 busy
KP-Adaption =0
1
r32Kp2 EN PID
0
W Y outValue
r32Kp1 INTEGRATOR
X
X W
P
LU
r32X1 LL
adaptionValue
r32X2 SV
Kp
preControl
D TN
r32IntSetValue
r32IntegTime TD
upperLimitReached
r32DerivTime T
r32FilterTime S QU
setIntChannel lowerLimitReached
HI QL
holdIntChannel
configdata
sPidData

94
5 Winding functions

5 Winding functions
The description of the function block FBLConWinder can be found in a separate
document:
https://support.industry.siemens.com/cs/de/en/view/35818687

5.1 FBLConDiameterCalculation – Diameter calculator


Function block to calculate the actual diameter of an axial winder.

Block name
FBLConDiameterCalculation

Task
This function block calculates the actual diameter of the roll based on the behavior
of the winding drive and line drive. One of 5 modes can be selected for the
calculation. The result of the diameter calculation is subject to a plausibility check.
 Siemens AG 2018 All rights reserved

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 95
5 Winding functions

Graphic representation of the block

FBLConDiameterCalculation

BOOL run busy BOOL

BOOL enable error BOOL

BOOL reset errorID DWORD

BOOL SetDiam diamModeInUse eDiamMode


Type

BOOL holdDiam calculatedWebThickness REAL

eWinding Mode typeOfWinder diamActVal REAL


Type

eDiamMode selectDiamMode diamIsHold BOOL


Type

eTaskName taskMode diamActUpperLimitReached BOOL


Type
 Siemens AG 2018 All rights reserved

REAL diamSetVal diamActLowerLimitReached BOOL

LREAL lineSpeed diamRawUpperLimitReached BOOL

LREAL windingShaftSpeed diamRawLowerLimitReached BOOL

LREAL lineFeedback diamSetUpperLimitReached BOOL

LREAL windingShaftFeedback diamSetLowerLimitReached BOOL

REAL diamExtVal diamChangeLimited BOOL

sDiamConfigType sDiamConfig sDiamConfigType

REAL LatchDiamCalc REAL

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 96
5 Winding functions

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: function block is deactivated
The block sets the output signals to “secure” values
and executes a limitation of the output value
run BOOL TRUE
diamActVal. The limitation is done between
sDiamConfid.diamMin and sDiamConfig.diamMax.
TRUE: function block is activated
FALSE: The diameter calculator is deactivated (acts
like holdDiam)
enable BOOL FALSE TRUE: The diameter calculator is activated. The
calculation mode is assumed and internal stored with a
rising edge.
reset BOOL FALSE TRUE: Resets all of the variables in the FB (also filter)
TRUE: Sets the diameter to a specified value
setDiam BOOL FALSE
The value is specified in sDiamConfig.diamSetVal
holdDiam BOOL FALSE TRUE: Holds the actual diameter
Winder type:
REWIND_FROM_ABOVE
eWinding REWIND_ REWIND_FROM_BELOW
typeOfWinder FROM_ UNWIND_FROM_ABOVE
ModeType ABOVE UNWIND_FROM_BELOW
 Siemens AG 2018 All rights reserved

Only used with selectDiamMode =


DIAM_THICKNESS_ADDITION.
Selects the diameter calculation mode
DIAM_CALC: v/n calculation
DIAM_CALC_INTEGRAL: Integrating up from the
winding speed and web velocity
eDiam DIAM_ DIAM_CALC_POSITION: Measures the position of the
selectDiamMode
ModeType CALC winding angle and material web
DIAM_THICKNESS_ADDITION: The material
thickness is continually added
DIAM_EXT: The external diameter value is used
Can not be changed while enable = TRUE.
Task in which the FB is called:
IPO_ SERVO_SYNCHRONOUS_TASK: Servo Synchronous
eTaskName SYNCHRONO Task
taskMode IPO_SYNCHRONOUS_TASK: Ipo Synchronous Task
Type US_
TASK IPO_SYNCHRONOUS_TASK_2: Ipo Synchronous
Task 2
TIMER_INTERRUPT_TASK: in a Timer Interrupt Task
[ LU ] Setting value of the diameter calculator
diamSetVal REAL 0.0 Assumption when setDiam = TRUE, as long as the
block is deactivated.
[ LU / s ] Web/machine velocity
Generally, the web velocity is the setpoint velocity of
the machine and the velocity with which the main drive
lineSpeed LREAL 0.0 moves the material web. In exceptional cases, or with
a deep understanding of control technology, it is
possible to use the actual value from a tachometer
measuring the web speed, etc.
[ r / s ] Speed of the winder shaft
The winder motor is fed from a variable-speed drive
windingShaftSpeed LREAL 0.0 that has an actual value encoder that has sufficient
resolution. This actual value signal is converted to the
roll shaft and is used to calculate the diameter.
[ Inc ] Value of the counter variable of the web –
lineFeedback LREAL 0.0
position of the web

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 97
5 Winding functions

Name Data type Initial value Description


[ Inc ] Value of the counter variable of the winder shaft
windingShaftFeedback LREAL 0.0
– position (angle) of the winder shaft
[ - ] External diameter value, can be scaled by the
diamExtVal REAL 0.0
characteristics, if necessary.

Input / output parameters


All parameters that are contained in sDiamConfig are input parameters.
Name Data type Initial value Description
latchDiamCalc REAL 0.0 [ LU ] Retain variable, the calculated diameter is saved
sDiam Structure for diameter calculator configuration data
sDiamConfig Config Details about this structure are provided in the
Type description of the type definitions.

Output Parameters
Name Data type Initial value Description
FALSE: Function block is deactivated, values will not
busy FALSE be evaluated
BOOL
TRUE: Function block is activated
FALSE: No error
error BOOL FALSE TRUE: An error has occurred, refer to error
 Siemens AG 2018 All rights reserved

identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
eDiam
diamModeInUse - Actual diameter calculation mode
ModeType
[ LU ] Calculated value of the web thickness
calculatedWebThickness REAL 0.0 only for DIAM_CALC_INTEGRAL and
DIAM_CALC_POSITION mode. Otherwise the output
is set to 0.0.
diamActVal REAL 0.0 [ LU ] Actual diameter value
FALSE: Diameter calculator is enabled
diamIsHold BOOL FALSE
TRUE: Diameter calculator is in the stop condition
diamActUpperLimit TRUE: Upper limit of the actual diameter value
BOOL FALSE
Reached reached
diamActLowerLimit TRUE: Lower limit of the actual diameter value
BOOL FALSE
Reached reached
diamRawUpperLimit TRUE: Upper limit of the actual raw diameter value is
BOOL FALSE
Reached reached
diamRawLowerLimit TRUE: Lower limit of the actual raw diameter value is
BOOL FALSE
Reached reached
diamSetUpperLimit
BOOL FALSE TRUE: Upper limit of the diameter setpoint is reached
Reached
diamSetLowerLimit
BOOL FALSE TRUE: Lower limit of the diameter setpoint is reached
Reached
diamChangeLimited BOOL FALSE TRUE: Diameter change rate is limited.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 98
5 Winding functions

Note In principle, the calculations made in this function block are independent of any
physical units. The input parameter determines the units of the output
parameters. The internal calculations carry-out specific related conversions
[LU] Length unit, e.g. m
[TU] Time unit of the line-/winderAxis
[Inc] Position signal of the winding and the material web axis
[V] Web velocity, derived from LU/min
[n] Speed, e.g. rpm
As far as the physical units of smaller length units and conversion of velocities,
conversions are made into LU/s or rev/s.

Functionality
The diameter calculator determines the actual diameter value (diamActVal) of the
roll being wound (or unwound) using the input quantities:
 Web velocity and position
 Shaft speed of the mandrel or angle
 Web thickness
 Siemens AG 2018 All rights reserved

Calculation modes
The function block implements the following calculation modes:
Table 5-1: Diameter calculation types
Calculation mode Description
DIAM_THICKNESS_ADDITION Integrates the web thickness
Calculates the diameter based on the ratio
DIAM_CALC between the web velocity and winder velocity or
speed (speed)
DIAM_EXT Senses the diameter using a sensor
Calculates the diameter from the ratio between
DIAM_CALC_INTEGRAL the winder angle and web length by integrating
the winding speed and the web velocity.
Calculates the diameter using the ratio between
DIAM_CALC_POSITION the winder angle and web length by measuring
the winder position (angle) and the web length.

Parameter selectDiamMode specifies the calculation modes.


At the first run through or after a reset, the specified mode is accepted and is
issued at output parameter diamModeInUse for the user.
The diameter is calculated in two steps:
 The raw diameter value is calculated
 The raw diameter value is post-conditioned (limited, verified and smoothed)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 99
5 Winding functions

Calculating the raw diameter value


The following structure parameters must always be made available independent of
the selected calculation mode and the input parameters with which the FB is
directly supplied.
Table 5-2: Structure parameters
Name Description
latchDiamCalc [ LU ] Retain variable old/ previous diameter
sDiamConfig
[ LU / s ] velocity limit of line velocity for activation of the diameter
.r32MinLineSpeed calculator.
If lineSpeed < r32MinLineSpeed the diameter is hold.
[ r / s ] velocity limit of winder speed for activation of the diameter
calculator.
.r32MinWinderSpeed
If windingShaftSpeed < r32MinWindingShaftSpeed the diameter s
hold.
.r32DiamMax [ LU ] Maximum diameter value
.r32DiamMin [ LU ] Minimum diameter value
[ LU ] Thickness of the web, used for the limit of the diameter rising
.r32WebThickness
and used in calculation mode DIAM_THICKNESS_ADDITION
[ - ] Factor to adjust rampupTime / rampdownTime of the ramp-
.r32AdjustWebThickness
function generator
 Siemens AG 2018 All rights reserved

[ ms ] Layer jump smoothing


.r32SmoothingTime
The layer jumps are smoothed with this smoothing factor dependent
LayerJump
on diamActVal.
Integration direction of the ramp-function generator
.r32SelectIntegration DONTCARE: Can integrate in both directions
Direction INCREASING: Only increasing (away from 0.0)
DECREASING: Only decreasing (in direction of 0.0)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 100
5 Winding functions

DIAM_THICKNESS_ADDITION
This mode calculates the diameter by continually adding the web thickness that is
added or removed from the roll at each sampling time.
The diameter change is 2 x web thickness (h) x speed of the mandrel (n). Starting
from an initial diameter, the actual diameter value is formed from this change
through numerical integration.
Depending on the winder type eTypeOfWinder the material thickness is either
added or subtracted.
Table 5-3: Parameter list, material thickness integration
Name Description
sDiamConfig Structure for the diameter calculator configuration data
Winder type
UNWIND_FROM_ABOVE
.eTypeOfWinder UNWIND_FROM_BELOW
REWIND_FROM_ABOVE
REWIND_FROM_BELOW

DIAM_CALC
The diameter is obtained by dividing the web quantity by the angular quantity
 Siemens AG 2018 All rights reserved

whereby the following applies:


v
v  R   , with D 
 n
In order that the associated quantities are divided at the same instant of detection,
it is also possible to slightly delay the web velocity (v) and/or the winder speed (n)
using a PT1 element.
Table 5-4: Parameter list V/n diameter calculation
Name Description
sDiamConfig Structure for the diameter calculator configuration data
[ ms ] Symmetrizing time
This parameter correlates between the velocity and speed. It
.r32LineBalancingTime
compensates the offset in time of lagging speed n of the winding
shaft with respect to the machine velocity v.
[ ms ] Symmetrizing time
.r32WindingShaft This parameter correlates between the velocity and speed. It
BalancingTime compensates the offset in time of lagging machine velocity v with
respect to the speed n of the winding shaft.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 101
5 Winding functions

DIAM_EXT
In this particular mode, the diameter is externally sensed using an analog sensor.
The numerical sensor value is assigned to parameter diamExtVal. In the diameter
calculator, this value forms the abscissa value of a characteristic block (refer to
FBLConPolygonA). The user should parameterize this characteristic block so that
its output value ordinateOutput is the actual diameter.
By setting the DiamConfig parameter u16DiamExtCurveEntryNum to zero, the
functionblock FBLConPolygonA won’t be calculated and the value assigned to
diamExtVal will be taken as diameter.
Table 5-5: Parameter list, external diameter

Name Description
[ - ] External diameter value, when required, can be scaled and
diamExtVal
linearized using the characteristic.
sDiamConfig Configuration data of the diameter calculator
.u16DiamExtCurve [ - ] Number of grid points for the polygon calculation [2 –
EntryNum LCONLIB_MAX_IDX_A+1]
[ - ] Abscissa values for the diameter characteristic to linearize the
.r32DiamExtCurveAbscissa external diameter signal (maximum LCONLIB_MAX_IDX_A+1 x-y
points).
[ LU ] Ordinate values for the diameter characteristic to linearize
.r32DiamExtCurveOrdinate the external diameter signal (maximum LCONLIB_MAX_IDX_A+1
x-y points).
 Siemens AG 2018 All rights reserved

DIAM_CALC_INTEGRAL
These integral diameter calculation techniques are also based on the division of
the web quantity by the angular quantity. However, quantities v and ω are
integrated over a number of roll revolutions that can be specified
(sDiamConfig.r32MeasuringRevolutionCount). This is to minimize the disturbing
effect of processing just individual values. The following applies:
s
s  R   , with D  2   
 
If the number of revolutions of the winding shaft - specified by parameter
sDiamConfig.r32MeasuringRevolutionCount – is reached, then the integrators are
reset. The calculated diameter value is then further processed.
In order that the associated quantities are divided at the same instant of detection it
is also possible to slightly delay the web velocity signal (v) using a PT1 element.
In addition in every measuring interval the actual material thickness
(r32CalculatedWebThickness) is calculated, e.g. for a rest length calculation.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 102
5 Winding functions

Table 5-6: Parameter list, integral diameter calculation


Name Description
sDiamConfig Structure for the configuration data of the diameter calculator
[ ms ] Symmetrizing time
This parameter correlates between the velocity and speed. It
.r32LineBalancingTime
compensates the offset in time of lagging speed n of the winding
shaft with respect to the machine velocity v.
[ ms ] Symmetrizing time
.r32WindingShaft This parameter correlates between the velocity and speed. It
BalancingTime compensates the offset in time of lagging machine velocity v
with respect to the speed n of the winding shaft.
.r32MeasuringRevolution [ - ] Number of winding shaft revolutions that define the
Count measuring and calculation interval
[ - ] Number of winding shaft revolutions after which the first
.r32FirstDiameterOutput
calculated diameter is output.
[ - ] Number of winding shaft revolutions after which the next
.r32DiameterOutputRate
calculated diameter is output.

DIAM_CALC_POSITION
This diameter calculation technique directly intervenes at the position of the web
and the roll being wound or unwound. In this case, the position is fed back into the
FB via the input parameter lineFeedback and windingShaftFeedback there (in the
 Siemens AG 2018 All rights reserved

FB) the difference to the previous cycle is measured. Overflows are intercepted
using modulo limits that should be entered. Positions are evaluated and weighted
using the scaling factors sDiamConfig.r64LineFeedbackScal and sDiamConfig.-
r64WindingShaftFeedbackScal.
sDiamConfig.r64LineFeedbackScal corresponds to: 1 [LU]
sDiamConfig.r64WindingShaftFeedbackScal corresponds to: 1 [rev]
s
s  R   , with D  2   
 
If the number revolutions of the winding shaft – specified by parameter
sDiamConfig.r32MeasuringRevolutionCount – is reached the differential value is
reset and the calculated diameter value is further processed. In order to be able to
identify overflows, the change of the feedback signal per cycle must be less than
half of the difference of the modulo limits.
ModLength
Feedback 
2
In addition in every measuring interval the actual material thickness
(r32CalculatedWebThickness) is calculated, e.g. for a rest length calculation.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 103
5 Winding functions

Table 5-7: Parameter list, position-based diameter calculation


Name Description
sDiamConfig Structure for diameter configuration data
.r32MeasuringRevolution [ - ] Number of winding shaft revolutions that define the
Count measuring and calculation interval
[ - ] Number of winding shaft revolutions after which the first
.r32FirstDiameterOutput
calculated diameter is output.
[ - ] Number of winding shaft revolutions after which the next
.r32DiameterOutputRate
calculated diameter is output.
.r64WindingShaftFeedback
[ Inc/rev ] Number of increments that correspond to 1 [ rev ]
Scal
.r64LineFeedbackScal [ Inc/LU ] Number of increments that correspond to 1 [ LU ]
[ Inc ] Number of increments for the modulo length of the
.r64LineModLength
LineFeedback Signals
[ Inc ] Number of increments for the modulo length of the
.r64ShaftModLength
WindingShaftFeedback Signals

Floating diameter calculation in modes DIAM_CALC_INTEGRAL, DIAM_CALC_POSITION


The floating diameter calculation can be configured by the following configuration
parameter:
 Siemens AG 2018 All rights reserved

 r32MeasuringRevolutionCount
 r32FirstDiameterOutput
 r32DiameterOutputRate

After rising edge of input “enable” resp. after a change of the diameter calculation
mode the first calculated diameter will be output after the number of revolutions
configured in “r32FirstDiameterOutput”.
After the first diameter output the calculated diameter will be refreshed cylic after
the number of revolutions configured in “r32DiameterOutputRate”.
The calculated diameter will be averaged over the number of revolutions
configured in “r32MeasuringRevolutionCount”, as long as the the parameterized
number of revolutions has been passed already.
The averaging of a specific number or revolutions is determinded by the depth
(array length) of an internal ring buffer. Inside the ring buffer the position deltas of
line and winder axis will be entered. The buffer depth is calculated based on the
following formula:

r32MeasuringRevoluti onCount
buffer depth 
r32DiameterOutputRate

Is the result of the calculation a non natural number the value will be rounded to
next natural number (N = {1, 2,3, …}).Therby the the effective averaging over a
specific number of revolutions can differ to the configured value in
“r32MeasuringRevolutionCount” (compare example 3).
The following sketeches show the interacting of the configuration parameter. In the
function block a modulo cycle from 0° to 360° is recreated. The configuration of the
technology object is independend of that.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 104
5 Winding functions

Example 1:
r32MeasuringRevolutionCount := 4
r32DiameterOutputRate := 1
r32FirstDiameterOutput := 2

r32MeasuringRevolutionCount

r32FirstDiameterOutput

r32DiameterOutputRate
effective averaging:

2 1st diameter output


3 2nd diameter output
4 3rd diameter output
4
 Siemens AG 2018 All rights reserved

4th diameter output


4 5th diameter output

Example 2:
r32MeasuringRevolutionCount := 4
r32DiameterOutputRate := 1
r32FirstDiameterOutput := 0.5

r32MeasuringRevolutionCount

r32FirstDiameterOutput

r32DiameterOutputRate

effective averaging:

0.5 1st diameter output


1.5
2nd diameter output
2.5
3rd diameter output
3.5
4th diameter output
4 5th diameter output
4 6th diameter output

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 105
5 Winding functions

Example 3:
r32MeasuringRevolutionCount := 5
r32DiameterOutputRate := 2
r32FirstDiameterOutput := 1

r32MeasuringRevolutionCount

r32FirstDiameterOutput

r32DiameterOutputRate

effective averaging:

1
1st diameter output
3
2nd diameter output
5
3rd diameter output
6
4th diameter output
 Siemens AG 2018 All rights reserved

Post processing the raw diameter value


Limiting the raw diameter value:
After the calculation using one of the five above mentioned calculating modes, the
raw diameter is limited to the minimum diameter and maximum diameter values:
r32DiamMin ≤ diamActRawVal ≤ r32DiamMax
r32DiamMin, r32DiamMax: -> sDiamConfig
Keeping the limited raw diameter value constant:
It only makes sense to further process the raw diameter value if both the web
velocity as well as the winder shaft speed (lineSpeed, windingShaftSpeed) exceed
their specific minimum values (sDiamConfig.r32MinLineSpeed,
sDiamConfig.r32MinWinderSpeed):
lineSpeed > r32MinLineSpeed
windingShaftSpeed > r32MinWinderSpeed
If one of these conditions is not fulfilled, then internally the diameter is held – it is
not changed.
The same result – i.e the diameter is kept constant – is obtained when the input
signal holdDiam at the function block is active.
Saving the limiting raw diameter value:
The raw diameter value is formed and retentively saved at each FB call in the
calculation modes DIAM_THICKNESS_ADDITION, DIAM_CALC and DIAM_EXT
´(refer to the latchDiamCalc parameter).
In the integrating calculation modes
DIAM_CALC_INTEGRAL as well as

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 106
5 Winding functions

DIAM_CALC_POSITION the raw diameter value is only saved at the end of the
integration or end of the calculation. This means when the specified number of
winding shaft revolutions has been reached.

Further processing the latchDiamCalc value:


The further processing of the latchDiamCalc value essentially comprises smoothing
using an interpolator with a PT1 element connected at its output.

Interpolation modes
The following interpolation modes are implemented in the function block:
Table 5-8: Interpolation modes
Interpolation mode Description
NO_INTERPOLATION No interpolation
Interpolation with ramp-function generator, available in every
INTERPOLATION_1 calculation mode. The material thickness is required for the plausibility
check.
Interpolation with ramp-function generator, only available in the modes
INTERPOLATION_2
DIAM_CALC_INTEGRAL and DIAM_CALC_POSITION.
Interpolation without ramp-function generator, only available in the
calculation modes DIAM_CALC_INTEGRAL and
INTERPOLATION_3
DIAM_CALC_POSITION. The material thickness is required for the
 Siemens AG 2018 All rights reserved

plausibility check.

The interpolation mode is selected using the sDiamConfig.eInterpolationMode


parameter.
Each time it is called – if used – the ramp-function generator executes the following
iteration:
Yk  Yk 1  YA
The value for the acceleration is thereby obtained:
 NRM 
Y A     TA
 when braking, and
 TD 

 NRM 
YA     TA
 when accelerating
 TU 
TA: = task cycle time
When considered from the physical perspective the acceleration values correspond
to the diameter changes per unit time. The following applies:
 NRM  D
 
 T  t as the diameter decreases
 D 

 NRM  D
 
 T  t as the diameter increases
 U 
The diameter calculator either sets the normalization value to 1.0 (ramp-function
generator is operational) or to 0.0 (ramp-function generator is inhibited).
The other two ramp-function generator input parameters TD and TU are calculated
by changing over the above specified formula:

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 107
5 Winding functions

1
 D 
TU  TD   
 t 
Table 5-9: Interpolation modes
Interpolation mode Description
INTERPOLATION_1 In this mode, the differential quotient ΔD/Δt is calculated over the increase in thickness
of the wound roll:
D r 32 AdjustWebThickness  r 32WebThickness  

t 2 
D 2  r 32 AdjustWebThickness  r 32WebThickness  lineSpeed

t   diamActVal
The ramp-function generator input parameters TD and TU are calculated as follows:
NRM    diamActVal
TU  TD 
2  r 32 AdjustWebThickness  r 32WebThickness  lineSpeed
This interpolation mode is available for all diameter calculation types.
INTERPOLATION_2 TU or TD are calculated as in the first mode, however, under the following conditions:
 TU (or TD) is the time interval TR between two reset pulses of the integrators. The
value of TR is obtained from the sum of the cycle times for the duration of the
integration.
 NRM is the change in diameter ΔdiamActVal in this time interval. The value of
∆diamActVal is obtained from the difference between the actual and previous raw
diameter value.
 Siemens AG 2018 All rights reserved

These values could be immediately fed to the ramp-function generator. However, by


setting NRM to 1.0 m or 0.0 m, we switch the complete ramp-function generator in or
out – and must therefore execute the following calculation:
TA TA
YA   NRM  1
TU TR
r 32 AdjustWebThickness  diamActVal

and therefore: TU  TR
r 32 AdjustWebThickness  diamActVal
TR is now obtained from the sum of the cycle times for the duration of the integration.
This corresponds to the value from ΔdiamActVal from the difference between the
actual and previous raw diameter value. This means that the values for TU and TD can
be precisely calculated.
This interpolation mode is not available for the diameter calculation mode
DIAM_THICKNESS_ADDITION, DIAM_CALC, DIAM_EXT.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 108
5 Winding functions

Interpolation mode Description


INTERPOLATION_3 In this mode, the interpolation is numerically realized using the FCLConLinear block.
The interpolation is realized referred to the parameterized measurement interval
between two measuring points based on the calculated diameter change at the
measuring point.
The calculated diameter change is limited by the configured material thickness, the
maximum change is as follows:
ΔDiametermax  2 * Material thickness * Measurement revolutions

diameter
Latch

interpolated

interpolated and smoothed

winder revolutions
1n 2n 3n
n: number of revolutions per calculated raw value

This interpolation mode is not available for the diameter calculation modes
DIAM_THICKNESS_ADDITION, DIAM_CALC, DIAM_EXT.
 Siemens AG 2018 All rights reserved

Note With the calculation modes DIAM_CALC_INTEGRAL and


DIAM_CALC_POSITION with the interpolation modes INTERPOLATION_1 and
INTERPOLATION_2 after holding the diameter calculator and with the web
thickness precisely entered, the actual diameter is no longer reached. For these
modes, the thickness should be manipulated in a specific fashion using the factor
sDiamConfigType.r32AdjustWebThickness in order to correct the diameter
value.
The output diamChangeLimited will be set, if the change rate is limited.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 109
5 Winding functions

Warnings
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#0201_4002 The latchDiamCalc variable contains a value that lies outside the specified limits. It is
probable that either no diameter has been set or an incorrect diameter has been
entered.
16#0201_4015 The table of entered values is not monotonically (steadily) increasing -> a matching
value is not found. (if selectDiamMode = DIAM_EXT)
16#0201_4018 The table of entered values is not monotonically (steadily) increasing -> 2 values are
identical. (if selectDiamMode = DIAM_EXT)

Errors
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 2018 All rights reserved

16#0201_8001 The function block is called in an incorrect task.


16#0201_8005 One or several configuration data are either not plausible or incorrect.
r32DiamMin <= 0.0
r32DiamMax <= r32DiamMin
r32WebThickness <= 0.0
r32AdjustWebThickness <= 0.0
r32MeasuringRevolutionCount < r32DiameterOutputRate
16#0201_8007 Dimension units are incorrect/or are not defined
DIAM_CALC_POSITION
sDiamConfig.r64WindingShaftFeedbackScal <= 0.0
sDiamConfig.r64LineFeedbackScal <= 0.0
16#0201_8013 The specified number of grid points is too low. (if selectDiamMode = DIAM_EXT)
16#0201_8014 The specified number of grid points is too high. (if selectDiamMode = DIAM_EXT)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 110
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Functionsplan FBDiameterCalculation SIMOTION Page 1 von 5
modified: 15.08.2006, 18:00:13
1 2 3 4 5 6 7 8

DIAM_THICKNESS_ADDITION
UNWIND FROM ABOVE or UNWIND FROM BELOW [3, A4]
typeOfWinder
L
5 Winding functions

A
Function diagrams

Web thickness [LU] 0 Diameter setting value


r32WebThickness for the integrator and
1 calculated diameter.
dr / dt = ( h / 2
D from thickness
-1 addition
[RPs] dD / dt [LU/s] [LU]
D1 [3, D1]

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018
2
Set diameter
setDiam

DIAM_CALC
B v / n = D 
Web velocity [LU / s]
lineSpeed X D from v / n / Pi
T [LU]
[ms] SV [LU]
r32LineBalancing Balancing time for v and n phase adjustment
S D2 [3, B2]
Time
>0
Speed of winding shaft [U / s]

windingShaftSpeed X
T
Balancing time for v and n phase adjustment [ms] SV
r32WindingShaft S
BalancingTime
C
DIAM_EXT
arDiamExtCurve Ordinate values
Ordinate

Breakout
u16DiamExtCurve Entry number for the table
table
EntryNum
D from external source
External diameter value [LU]
diamExtVal
D3 [3, B2]

arDiamExtCurve Diameter break points


Abscissa

111
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Functionsplan FBDiameterCalculation SIMOTION Page 2 von 5
modified: 15.08.2006, 18:00:13
1 2 3 4 5 6 7 8

Unlimited raw D-
DIAM_CALC_INTEGRAL Integrator, reference is 0 value [LU] s = r 
v_nominal, speed is
integrated into path, [3, C8]
Web velocity [LU / s] setValue is 0 D from integrating
D = 2 s 
5 Winding functions

lineSpeed X DR calculation
A T [LU]
0
SV D4 [3, B2]
[LU]
Balancing time for v and S 1
n phase adjustment [ms] Raw D value
r32BalancingTime
2 Signal save raw value
Integrator, reference is n_nominal, 0
shaft speed is integrated info angle in
radians, setValue is 0. [3, D1],
≥ B

Manual SIMOTION Converting Library


Speed of winding shaft [RPS] Number of revolutions [5, D1]

Entry-ID: 48805235, V2.2.7, 10/2018


windingShaftSpeed X [rad/s] [rad] for calculation reached
T Set integrators
Balancing time for v and n  x
[ms] SV >
r32WindingShaft phase adjustment S y [4, D1]
≥ R
BalancingTime
[3, B3]
K
Hold diameter

B Selector for calculation mode


selectDiamMode

Number of winding shaft revolutions


r32Measuring- for the calculation [rad]
RevolutionCount 
4 Actual number or revolutions

5 Z [4, C1]
DIAM_CALC_POSITION 
Number of revolutions for
[inc] Modulo evaluation calculation reached
windingShaft
Feedback Δinc x
C Σ [rad] <
[inc] y
r64ShaftModLength

r64WindingShaft Weighting factor [inc/rad]
FeedbackScal Reset summing units

Modulo evaluation
[inc]
lineFeedback Δinc D from length based
Σ [LU] calculation
[inc]
r64LineModLength Raw D value [LU]
D5 [3, B2]
D r64Line Weighting factor [inc/LU]
FeedbackScal
π

112
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Functionsplan FBDiameterCalculation SIMOTION Page 3 von 5
modified: 15.08.2006, 18:00:13
1 2 3 4 5 6 7 8

Hold diameter
Winding shaft speed [RPs]
windingShaftSpeed x
Signal "Diameter is hold”
Minimum winding shaft speed RP s]
y
<
5 Winding functions

r32MinWinderSpeed
A TRUE: v or n is smaller than specified minimum
≥ [4, B1],
Web velocity [LU / s] ≥ K
lineSpeed x [2, A6]
Minimum web velocity [LU / s]
y
<
r32MinLineSpeed
Hold diameter explicitly
holdDiam

Manual SIMOTION Converting Library


Selection of diameter calculation mode

Entry-ID: 48805235, V2.2.7, 10/2018


Selector for calculation mode
selectDiamMode

D3 D2 D1

[1, D8] [1, B8] [1, A8] Diameter raw value reached maximum diamRawUpper
Unlimited D raw LU LUR
1 value [LU] LimitReached
Limited Diameter raw value [LU]
B X D [4, D1], [5, B1]
Diameter raw value reached minimum diamRawLower
LL LLR
5 LimitReached
[2, A8] [2, D8] DR
D4 D5

Set diameter
Diameter maximum [LU]
r32DiamMax diamMax [4, A2]
Diameter minimum [LU]
r32DiamMin diamMin [4, A2]
Diameter set value reached maximum
LU LUR diamSetUpperLimitReached
Diameter set value [LU]
Limited diameter set value [LU]
C diamSetVal X L [4, A1]
Diameter set value reached maximum
LL LLR diamSetLowerLimitReached
Signal „set diameter”
Set Diameter
setDiam
≥ S [4, C1]

VAR_IN_OUT :
Retain-Variable
1 Saved diameter
&
Signal "save raw value"
[2, A8] B 1 [4, A1],
≥ 1 Latch V
0 [5, B1],
0
[5, C1]
D =
DIAM_EXT
DIAM_CALC LU LUR
? ≥ error := FALSE
DIAM_THICKNESS
X
_ADDITION
?
LL LLR

113
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Functionsplan FBDiameterCalculation SIMOTION Page 4 von 5
modified: 15.08.2006, 18:00:13
1 2 3 4 5 6 7 8

INTERPOLATION_1 / INTERPOLATION_2
[LU]
[3, C4] diamMax
[LU]
5 Winding functions

[3, C4] diamMin


A
Saved diameter [3, D8] [LU]
value V

Limited diameter [3, C8] [LU] [LU]


set value L X Y
SV
INTERPOLATION_1: LU

Manual SIMOTION Converting Library


TU = TD = LL

Entry-ID: 48805235, V2.2.7, 10/2018


r32WebThickness
(π * diamActVal) / (2 * r32WebThickness TU
* Abs(lineSpeed) * TD
r32AdjustWeb A32AdjustWebThickness * 1000) S
Thickness 0 CF
1 CU, CD
INTERPOLATION_2:
NRM
TU = TD = dT / (r32AdjustWebThickness
B
* Abs (diamActValn – diamActValn-1)
dT: Messintervall [ms]

eSelectIntegration- Selection for integrating direction Internal Upper diameter limit reached
Direction evaluation 1
X LU LUR
3
diamActUpperLimitReached
SV D-Istwert [LU]
S X diamActVal
Selection for diameter change limitation
eInterpolationMode T
LL LLR diamActLowerLimitReached
r32Smoothing- Smoothing time for layer jump [ms]
Lower diameter limit reached
TimeLayerJump
[3, C8]
Signal set diameter S

C INTERPOLATION_3

2.0
+
[3, D8] [LU]
Saved diameter min Y2 1
value V
Y 0
r32TargetDiaLast Y1
X1 X X2

[2, C8] 0.0


D Actual number or
revolutions Z
ABS(r64DeltaShaft) /
r32Measuring- r64WindingShaftFeedbackScal / 2.0 / π
RevolutionCount
Set integrators [2, B8]
R

114
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Functionsplan FBDiameterCalculation SIMOTION Page 5 von 5
modified: 15.08.2006, 18:00:13
1 2 3 4 5 6 7 8
5 Winding functions

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018
Signal „save raw value” [2, A8]
B

B Limited raw D value [LU] [3, B8]


D
1 [LU]
0
calculatedWebThickness

Last saved D value [3, D8]


2
V

intoLU
r32Measuring-
RevolutionCount

115
5 Winding functions

5.2 FBLConTorquePrecontrol – Torque pre-control


Block name
FBLConTorquePrecontrol

Task
This block calculates the variable and total moment of inertia, the mass of the roll
being wound and the torque compensation to compensate for the inertia.

Integration in the run-time system


The function block must be called in a synchronous task (Servo, IPO, IPO_2 or
Timer).

Graphic representation of the block

FBLConTorquePrecontrol
 Siemens AG 2018 All rights reserved

BOOL run busy BOOL

BOOL torqueOn error BOOL

eTaskNameType taskMode errorID DWORD

eWindingMode typeOfWinder totalInertia REAL


Type

REAL windingShaftSpeed mass REAL

REAL lineSpeed preCtrlMotor REAL

REAL lineAcceleration totalTorquePreCtrl REAL

REAL diamActVal variableInertia REAL

REAL tensionSetpoint maxInertia REAL

tensionTorque REAL

sMomentConfig sMomentConfig sMomentConfig


Type
Type

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 116
5 Winding functions

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: Deactivates the block
TRUE: Activates the block
run BOOL FALSE
If the block has been de-activated, the calculated pre-
control and tension torques are set to 0.
FALSE: Only the moment of inertia calculation is active
TRUE: Moment of inertia and torque calculation are
torqueOn BOOL FALSE
active
Functions are only active, if run = TRUE!
Task in which the FB is called:
SERVO_SYNCHRONOUS_TASK:
IPO_ Servo Synchronous Task
eTask
taskMode SYNCHRONO IPO_SYNCHRONOUS_TASK: Ipo Synchronous Task
NameType
US_TASK IPO_SYNCHRONOUS_TASK_2:
Ipo Synchronous Task 2
TIMER_INTERRUPT_TASK: in a Timer Interrupt Task
Winder type:
REWIND_ UNWIND_FROM_ABOVE: Unwinder from the top
eWinding
typeOfWinder FROM_ UNWIND_FROM_BELOW: Unwinder from the bottom
ModeType
 Siemens AG 2018 All rights reserved

ABOVE REWIND_FROM_ABOVE: Winder from the top


REWIND_FROM_BELOW: Winder from the bottom
[ r / TU ] / [ ° / TU ] Winder shaft speed (for friction
windingShaftSpeed REAL 0.0
characteristic)
lineSpeed REAL 0.0 [ LUb / s ] Web speed
lineAcceleration REAL 0.0 [ LUb / s² ] Web acceleration
diamActVal REAL 0.0 [ LUb ] Actual diameter
tensionSetpoint REAL 0.0 [ Z ] Tension setpoint

Input-/Output Parameters
Name Data type Initial value Description
sLConMom Configuration data of the torque pre-control calculation
sMomentConfig ent - Details on this structure are provided in the description of
ConfigType the type definitions.

Output parameters
Name Data type Initial value Description
FALSE: Function block deactivated
busy BOOL FALSE
TRUE: Function block active
FALSE: No error
error BOOL FALSE
TRUE: An error has occurred, refer to error identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
[ mLUb² ] Total moment of inertia referred to the motor
totalInertia REAL 0.0
shaft
mass REAL 0.0 [ m ] Mass of the web
preCtrlMotor REAL 0.0 [ M ] Torque precontrol
[ M ] Total precontrol torque based on motor shaft /
totalTorquePreCtrl REAL 0.0
Torque limitation

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 117
5 Winding functions

Name Data type Initial value Description


[ mLUb² ] Variable moment of inertia referred to the motor
variableInertia REAL 0.0
shaft
[ mLUb² ] Max. moment of inertia at max. Diameter
maxInertia REAL 0.0
referred to the motor shaft
tensionTorque REAL 0.0 [ M ] Tension torque

Note In principle, the calculations made in this function block are independent of any
physical units. The input parameter determines the units of the output
parameters. The internal calculations do not carry-out any conversions.
[LU] Length units, e.g. m
[LUb] Basis length unit, m or ft
[TU] Time unit of the line-/winderAxis
[Z] Tension, force, e.g. N
[m] Mass, weight, e.g. kg, is defined by the units of density
(specific gravity), e.g. kg/m³
[J] = mLUb² Moment of inertia, e.g. kgm²
- -
[M] = mLUb²s ² Torque, e.g. Nm = kgm²s ²
 Siemens AG 2018 All rights reserved

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 and ΔD/Δt
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 instantaneous diameter
actual value

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 118
5 Winding functions

 A torque setpoint as a function of Δn/Δt of the winder motor


Note: This pre-control is especially required, if, e.g. thick material is to be
wound onto a thin sleeve (i.e. mandrel) after a flying roll change. As a result of
the diameter of the wound material that quickly increases, for the same
consistent machine velocity, ΔD/Δt values of 20 x 1/s² can occur. These must
be compensated. This also applies to unwinders.
Friction compensation:
The torque setpoint is generated depending on the shaft speed of the winder.
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.

Note 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.
 Siemens AG 2018 All rights reserved

Calculations:
The function block FBLConTorquePrecontrol calculates the following physical
quantities:
Weight of the wound material:

r 32Mass 

  r 32Density  r 32Width  diamActVal 2  r 32DiamMin 2 
4
The material density can either be pre-assigned by selecting the material (selected
using sMomentConfig.eMaterialType <> USER_DEFINED) or specified as value
(sMomentConfig.eMaterialType = USER_DEFINED and with
sMomentConfig.r32Density <> 0.0).
Moment of inertia of the wound material relating to the motor shaft:
diamActVal 2  r 32DiamMin 2
r32Variabl eInertia  r 32Mass 
8  r 32GearRatio 2

Total moment of inertia with variable moment of inertia for torque precontrol
relating to the motor shaft:
r32JMandre l
r32TotalInertia   r 32VariableIn ertia  r 32JMot  r 32JFix
r32GearRat io2

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 119
5 Winding functions

Maximum moment of inertia at max diameter relating to the motor shaft:

massmax 

  r 32Density  r 32Width  diamMax 2  r 32DiamMin 2 
4
r32DiamMax 2  r 32DiamMin 2
variableIn ertiamax  mass max 
8
variableIn ertiamax  r 32JMandrel
r32MaxInertia   r 32JMot  r 32JFix
r32GearRat io2
Angular acceleration of the roll:
lineAccele ration  r 32GearRatio
 2
diamActVal
Pre-control torque 1
M pre1  r32TotalInertia  

Pre-control torque 2 - Δd/Δt


2  r 32TotalInertia  r 32GearRatio  lineSpeed  1 1 
M pre2    
Tcyc  diamActVa ln diamActVa ln  1 
1000
M pre2  M pre2 * r32DndtAdjust

Speed-dependent frictional torque of the winder:


M frict  M frict (n)
 Siemens AG 2018 All rights reserved

This frictional torque is internally determined using the function block


FBLConPolygonA. The user is responsible for providing valid and sensible values
in the appropriate data fields. If the factor sMomentConfigStruc.r32FrictionAdjust is
set to 0.0, FBLConPolygonA is not called and therefore a frictional torque is not
added.
Finally, depending on the winder type, the pre-control torque of the motor, the sum
of all pre-control torques and the tension torque are calculated.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 120
5 Winding functions

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.
Rewinding from above
M preCtrlMotor  M pre1  M pre2  M frict
M tensionTroque  M tensionTroque
M totalTorque Pr eCtrl  M preCtrlMotor  M tensionTroque
Rewinding from below
M preCtrlMotor   M pre1  M pre2  M frict
M tensionTroque   M tensionTroque
M totalTorque Pr eCtrl  M preCtrlMotor  M tensionTroque
Unwinding from above
M preCtrlMotor  M pre1  M pre2  M frict
M tensionTroque   M tensionTroque
M totalTorque Pr eCtrl  M preCtrlMotor  M tensionTroque

Unwinding from below


 Siemens AG 2018 All rights reserved

M preCtrlMotor   M pre1  M pre2  M frict


M tensionTroque  M tensionTroque
M totalTorque Pr eCtrl  M preCtrlMotor  M tensionTroque

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 121
5 Winding functions

Warnings
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#0203_4015 The table of entered values is not monotonically (steadily) increasing -> no matching
value found. (friction characteristic)
16#0203_4018 The table of entered values is not monotonically (steadily) increasing -> 2 values are
identical. (friction characteristic)

Errors
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#0203_8001 The function block is called in an incorrect task.
16#0203_8005 One or several configuration data are not plausible or lie outside the specified limits:
sMomentConfig.r32GearRatio <= 0.0
 Siemens AG 2018 All rights reserved

sMomentConfig.r32Density < 0.0


sMomentConfig.r32DiamMin <= 0.0
sMomentConfig.r32DiamMax < sMomentConfig.r32DiamMax
sMomentConfig.r32Width < 0.0
sMomentConfig.r32fillFactor <= 0.0
sMomentConfig.r32JFix < 0.0
sMomentConfig.r32JMandrel < 0.0
sMomentConfig.r32JMot < 0.0
16#0203_8006 The diameter actual value is not plausible
sMomentConfig.r32DiamActVal <= 0.0
sMomentConfig.r32DiamActVal < sMomentConfig.r32DiamMin
16#0203_8013 The number of grid points that have been entered is too small. (friction characteristic)
16#0203_8014 The number of grid points that have been entered is too high. (friction characteristic)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 122
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Functionplan FBTorquePrecontrol SIMOTION Page 1 of 1
modified: 14.01.2009, 17:03:13
1 2 3 4 5 6 7 8

Actual diameter [LUb]


diamActVal
[LUb]
mass = r32Widthr32Densityr32DiamActVal2 – r32DiamMin2  / 4
Minimal diameter Variable moment of inertia [mLUb²]
r32DiamMin variableInertia = massr32DiamActVal2 + r32DiamMin2  / 8 variableInertia
Function diagram

Maximal diameter [LUb]


5 Winding functions

A r32DiamMax totalInertia = variableInertia + r32JMandrel  / r32GearRatio2 + r32JMot +


[LUb] Mass of the web [m]
Web width r32JFix mass
r32Width
FillFactor [%]
r32FillFactor Max. moment of inertia [mLUb²]
maxInertia
Gear ratio between winder motor and mandrel variableInertiamax = massmaxr32DiamMax2 + r32DiamMin2  / 8
r32GearRatio
Moment of inertia mandrel [mLUb] maxInertia = variableInertiamax + r32JMandrel  / r32GearRatio2 +
r32JMandrel Total moment of inertia [mLUb²]
Fixed moment of inertia r32JMot + r32JFix totalInertia

Manual SIMOTION Converting Library


without mandrel [mLUb]
r32JFix

Entry-ID: 48805235, V2.2.7, 10/2018


Moment of inertia motor [mLUb]
r32JMot
 = lineAccelerationr32GearRatio / r32DiamActVal / 2 
Web speed [LUb/s]
lineSpeed Mpre1 =  totalInertia
Web acceleration [LUb/s]
lineAcceleration 

B eMaterialType Mpre2 = r32GearRatio 2  lineSpeed  (1 / r32DiamActValn – 1 /
USER_DEFINED =
Vorbelegung
r32DiamActValn-1) / Tcyc  1000  DDdtAdjust  totalInertia
0
Web density [m/LUb]
r32Density 1

r32DDdtAdjust Mpre2 [M] Mpre1 [M]


Winder speed [1/min]
REWIND_FROM_ABOVE:
Winding direction
typeOfWinder preCtrlMotor := Mpre2 + Mpre1 + Mfrict
[M]
totalTorquePreCrl := preCtrlMotor + preCtrlMotor
tensionTorque
Friction torque table
arFrictionCurveOrdinate
REWIND_FROM_BELOW:
C u16FrictionCurveEntry Number of table entries preCtrlMotor := Mpre2 – Mpre1 – Mfrict Total precontrol torque
Polygonzug
tensionTorque := – tensionTorque based on motor shaft
Num [M]
totalTorquePreCrl := preCtrlMotor + totalTorquePreCtrl
Winder speed [U/TU] / [°/TU] [M] tensionTorque
windingShaftSpeed Mfrict [M]

UNWIND_FROM_ABOVE:
preCtrlMotor := Mpre2 + Mpre1 + Mfrict [M]
tensionTorque := – tensionTorque tensionTorque
Winder speed table totalTorquePreCrl := preCtrlMotor +
arFrictionCurveAbscissa
tensionTorque
Scaling factor
r32FrictionAdjustment
UNWIND_FROM_BELOW:
Tension setpoint after tension taper [Z] preCtrlMotor := Mpre2 – Mpre1 – Mfrict
tensionSetpoint
Scaling factor tension setpoint Tension torque [M] totalTorquePreCrl := preCtrlMotor +
D r32TensionAdjust r32gearRatio
tensionTorque
diamActVal
Actual diameter [LUb]
2

123
5 Winding functions

5.3 FBLConTaperCharacteristic – Tension taper


characteristic
Block name
FBLConTaperCharacteristic

Task
This function block calculates a reduction factor for the tension setpoint as a
function of the diameter.

Integration in the run-time system


The function block can be called in any task.

Graphic representation of the block

FBLConTaperCharacteristic
 Siemens AG 2018 All rights reserved

BOOL run busy BOOL

eTaperChar tensionTaperMode error BOOL


ModeType
REAL diamActVal errorID DWORD

tensionTaper REAL

sTensionTaper sTensionTaperConfig sTensionTaper


ConfigType ConfigType

Block parameters

Input parameters
Name Data type Initial value Description
FALSE: The block is not processed
TRUE: The block is processed
run BOOL FALSE
If the block is de-activated (run = FALSE) the output
tensionTaper is set to 1.0.
Tension taper characteristic mode:
TAP_ TAP_CHAR_NO_TAPER: No characteristic
tensionTaper eTaperChar CHAR_ TAP_CHAR_LINEAR: Linear characteristic
Mode ModeType NO_ TAP_CHAR_HYPERBOLIC_1: Hyperbolic char.1
TAPER TAP_CHAR_HYPERBOLIC_2: Hyperbolic char.2
TAP_CHAR_TABLE : Characteristic defined by a table
diamActVal REAL 0.0 [ % ] / [ LU ] Actual diameter value

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 124
5 Winding functions

Input-/Output Parameters
Name Data type Initial value Description

sTension Structure with configuration data of the tension taper


sTensionTaper characteristic
TaperConfig
Config Details on this structure are provided in the description
Type of the type definitions.

Output parameters
Name Data type Initial value Description
FALSE: function block inactive
The output tensionTaper is set to 1.0, actual errors are
busy FALSE
BOOL deleted.
TRUE: function block active
FALSE: No error
TRUE: An error has occurred, refer to error
error BOOL FALSE identification
In case of error (error = TRUE) the output
tensionTaper is set to 1.0.
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
tensionTaper REAL 1.0 [ - ] Taper adjustment factor
 Siemens AG 2018 All rights reserved

sLConTensionTaperConfigType
Name Data type Description
Tension taper characteristic mode:
TAP_CHAR_NO_TAPER: No characteristic
eLConTaperChar TAP_CHAR_LINEAR: Linear characteristic
eTensionTaperMode
ModeType TAP_CHAR_HYPERBOLIC_1: Hyperbolic char.1
TAP_CHAR_HYPERBOLIC_2: Hyperbolic char.2
TAP_CHAR_TABLE : Characteristic defined by a table
r32UpperLimitTaper REAL [ % ] Upper limit for tension reduction
r32LowerLimitTaper REAL [ % ] Lower limit for tension reduction
[ % ] Max. Tension Reduction
r32TensionTaperRatio REAL
Not for tensionTaperMode = TAP_CHAR_TABLE.
[ % ] or [LU] Start diameter for the characteristic calculation
based on the max. diameter sWinderConfig.sDiamConfig.-
r32TensionTaperDiameterStart REAL diamMax
Not for tensionTaperMode = TAP_CHAR_TABLE.
[ % ] or [LU] Maximum diameter with full reduction based on
r32TensionTaperDiameterMax REAL the max. diameter sWinderConfig.sDiamConfig.diamMax
Not for tensionTaperMode = TAP_CHAR_TABLE.
[ - ] Number of grid points to calculate the polygon [2 –
u16TensionTaperEntryNum UINT LCONLIB_MAX_IDX+1]
Only for tensionTaperMode = TAP_CHAR_TABLE
ARRAY [ % ] or [LU] Abscissa values for the diameter
[0.. (maximum ‘ LCONLIB_MAX_IDX_A+1’ x-y points) based
ar32TensionTaperCurveAbscissa
LCONLIB_MAX_I on the max. diameter sWinderConfig.sDiamConfig.diamMax
DX_A] OF REAL Only for tensionTaperMode = TAP_CHAR_TABLE
ARRAY [ % ] Ordinate values for the percentage component
ar32TensionTaperCurveOrdinate [0.. (maximum ‘ LCONLIB_MAX_IDX_A+1’ x-y points)
LCONLIB_MAX_I
DX_A] OF REAL Only for tensionTaperMode = TAP_CHAR_TABLE

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 125
5 Winding functions

Note In principle, the calculations made in this function block are independent of any
physical units. The input parameter determines the units of the output
parameters. The internal calculations do not carry-out any conversions.
[LU] Length units, e.g. m
[%] Percentage, e.g. 100%

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. It only makes
sense to use the tension taper characteristic while actually winding in order to wind
the inner layers tightly.
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 at
the analog output.
The block is activated using the run input. Depending on the mode selected at
input tensionTaperMode, the tension reduction factor is calculated as a function of
 Siemens AG 2018 All rights reserved

the diameter present diamActVal and output in tensionTaper.


The way in which the reduction factor is processed depends on the mode that has
been selected.

Table 5-10: Calculation types of the winding hardness characteristic (taper)


Calculation mode Description
TAP_CHAR_NO_TAPER 1.0 is assigned for the reduction factor for the tension setpoint.
tensionTap er 1.0
TAP_CHAR_LINEAR From a starting diameter that has to be entered r32TensionTaperDiameterStart, the
reduction factor is linearly reduced to the maximum diameter
r32TensionTaperDiameterMax with a reduction of r32TensionTaperRatio.
diamActVal < r32TensionTaperDiameterStart:
tensionTap er 1.0
r32TensionTaperDiameterStart < diamActVal < r32TensionTaperDiameterMax:
 r 32TensionTaperRatio  diamActVal  r 32TensionTaperDiameter Start 
tensionTaper   1     

 100  r32TensionTaperDiameterMax - r32TensionTaperDiameterStart  
diamActVal > r32TensionTaperDiameterMax:
tensionTaper  (1 r32TensiontaperRatio / 100.0)

TAP_CHAR_HYPERBOLIC_1 From a starting diameter that has to be entered r32TensionTaperDiameterStart the


reduction factor is reduced as hyperbolic function with r32TensionTaperRatio to the
maximum diameter r32TensionTaperDiameterMax. In this case, the reduction is at a
maximum when the maximum diameter has been reached.
diamActVal < r32TensionTaperDiameterStart:
tensionTaper 1.0
r32TensionTaperDiameterStart < diamActVal < r32TensionTaperDiameterMax:

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 126
5 Winding functions

Calculation mode Description


 r 32TensionTaperRatio  diamActVal  r 32TensionTaperDiameter Start  
1    
 100  diamActVal  
tensionTaper   
 r 32TensionTaperDiameter Max  

  r 32TensionTaperDiameter Max  r 32TensionTaperDiameter Start  
  

diamActVal > r32TensionTaperDiameterMax:


tensionTaper  (1 r32Tensiontaperratio / 100.0)

TAP_CHAR_HYPERBOLIC_2 From a starting diameter that has to be entered r32TensionTaperDiameterStart the


reduction factor is reduced as hyperbolic function with r32TensionTaperRatio to the
maximum diameter r32TensionTaperDiameterMax. In this case, the full reduction is
never reached. The characteristic is only approached.
diamActVal < r32TensionTaperDiameterStart:
tensionTaper 1.0
diamActVal >r32TensionTaperDiameterStart
 r 32TensionTaperRatio  r32TensionTaperDiameterStart  
tensionTaper  1   1   
 100  diamActVal 

TAP_CHAR_TABLE The reduction factor is determined by entering a characteristic. In this characteristic,


a diameter is assigned a tension reduction. The characteristic is saved in the data
structures arTensionTaperCurveAbscissa and arTensionTaperCurveOrdinate. The
characteristic is linearly interpolated between the two points on the characteristic.
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 127
5 Winding functions

Figure 5-1: Characteristic types:

Taper
100%

NO_TAPER
LINEAR
HYPERBOLIC_1
HYPERBOLIC_2
TABLE

r32TensionTaper
Ratio

r32TensionTaper r32TensionTaper
DiameterStart DiameterMax
D

Warnings
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
ErrorID Description
 Siemens AG 2018 All rights reserved

16#0000_0000 No warning
16#0205_4015 The table of entered values is not monotonically (steadily) increasing -> no matching
value found. (if tensionTaperMode = TAP_CHAR_TABLE)
16#0205_4018 The table of entered values is not monotonically (steadily) increasing -> 2 values are
identical. (if tensionTaperMode = TAP_CHAR_TABLE)

Errors
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#0205_8005 Invalid input parameter.
diamActVal <= 0.0
sTensionTaperConfig.r32UpperLimitTaper <
sTensionTaperConfig.r32LowerLimitTaper
sTensionTaperConfig.r32LowerLimitTaper < 0.0
For TAP_CHAR_LINEAR, TAP_CHAR_HYPERBOLIC_1,
TAP_CHAR_HYPERBOLIC_2:
sTensionTaperConfig.r32TensionTaperDiameterStart < 0.0
sTensionTaperConfig.r32TensionTaperDiameterMax <=
sTensionTaperConfig.r32TensionTaperDiameterStart
sTensionTaperConfig.r32TensionTaperRatio < 0.0
sTensionTaperConfig.r32TensionTaperRatio > 100.0
16#0205_8013 The number of grid points that has been entered is too small. (if tensionTaperMode =
TAP_CHAR_TABLE)
16#0205_8014 The number of grid points that has been entered is too high. (if tensionTaperMode =
TAP_CHAR_TABLE)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 128
 Siemens AG 2018 All rights reserved

SIEMENS AG, I DT MC PM APC


Function plan FBTaperCharacteristic SIMOTION Page 1 of 1
modified: 11.12.2008, 16:35:32
1 2 3 4 5 6 7 8

run
Mode taper
tensionTaperMode characteristic
A TAP_CHAR_NO_TAPER
Function diagram
5 Winding functions

1.0

TAP_CHAR_LINEAR

100 %

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018
Tension reduction at [%]
r32TensionTaperRatio r32TensionTaperDiameterMax

B Max. diameter [%] / [LU]


r32TensionTaperDiameterMax
Start diameter [%] / [LU]
r32TensionTaperDiameterStart
Actual diameter [LU]
diamActVal
TAP_CHAR_HYPERBOLIC_1
r 32TensionTaperRatio  diamActVal  r 32TensionTaperDiameterStart  LU LUR
1   1 0
100  diamActVal  2 tensionTaper
3 X 1
 r 32TensionTaperDiameterMax  4
5
 r 32TensionTaperDiameterMax  r 32TensionTaperDiameterStart 
  LL LLR

TAP_CHAR_HYPERBOLIC_1
r 32TensionTaperRatio  r 32TensionTaperDiameterStart 
C 1  1  
100  diamActVal 

TAP_CHAR_TABLE
Tension reduction [%] Polygonzug
arTensionTaperCurveOrdinate Ordinate values

/ 100 %

D
Tension reduction abscissa [%] / [LU]
arTensionTaperCurveAbscissa values
Upper limit [%]
r32UpperLimitTaper / 100 %
Lower limit [%]
r32LowerLimitTaper / 100 %

129
5 Winding functions

5.4 FCLConRLC – Residual length calculation


The residual length of a roll can be calculated using this block.

Block name
FCLConRLC

Task
The length of residual material on a roll can be calculated by entering the
appropriate roll parameters.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConRLC

REAL webThickness FCLConRLC REAL

REAL actualDiameter

REAL targetDiameter

REAL offset

Block parameters

Input parameters
Name Data type Initial value Description
webThickness REAL 0.0001 [ LU ] Thickness of the material on the roll [ 0.000001–1 ]
actualDiameter REAL - [ LU ] Actual diameter of the roll [ - ]
targetDiameter REAL - [ LU ] Target diameter to be reached [ - ]
offset REAL 0.0 [ LU ] Offset to the calculated residual length [ - ]

Output parameters
Name Data type Initial value Description
FCLConRLC REAL - [ LU ] Calculated residual length of the roll [ - ]

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 130
5 Winding functions

Note The calculations made in this function block are in principle independent of the
physical units. The output parameter units are defined by the input parameters.
The internal calculations do not perform any conversions.
[LU] Length units, e.g. m

Functionality
Depending on the roll parameters that have been entered, the function calculates
the residual length (FCLConRLC). To do this, the following data is required – the
thickness of the material on the roll (webThickness), the actual 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.

FCLConRLC  * actualDiam eter ²  t arg etDiameter ²   offset
4 * webThickness
Figure 5-2: Graphic representation of the function
d1 d2
 Siemens AG 2018 All rights reserved

d1

X
p

Δlength d2

X
p

Amount of material between


actual and target diameter

Table 5-11
Winder mode Actual diameter Target diameter
Winder d1 < d2 d2 (full roll)
Unwinder d2 > d1 d1 (empty roll)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 131
5 Winding functions

5.5 FBLConCalcTargetDiamStopCondition
Block name
FBLConCalcTargetDiamStopCondition

Task
The function block calculates the rest length to a specified target diameter and the
necessary stopping time.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block

FBLConCalcTargetDiamStopCondition
 Siemens AG 2018 All rights reserved

BOOL enable busy BOOL

INT windingMode error BOOL

REAL actualDiameter errorID DWORD

stop BOOL
REAL targetDiameter
stopDistance REAL
REAL offset
stopTime REAL
REAL minDiameter
restLengthToTarget REAL
REAL maxDiameter

REAL webThickness

REAL actLineVelocity

REAL actLineAcceleration

REAL negAccelLimitLine

REAL posAccelEndJerkLimitLine

REAL negAccelStartJerkLimitLine

REAL negAccelEndJerkLimitLine

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 132
5 Winding functions

Block parameters

Input parameters
Name Data Initial Description
type value
enable BOOL FALSE TRUE = enable Function Block, False = Disable
0: rewind, 1: unwind
windingMode INT 0
hint: distinguish dependent on line speed sign
actualDiameter REAL 0.0 [LU] actual diameter value
targetDiameter REAL 0.0 [LU] target diameter value
offset REAL 0.0 [LU] offset rest length to target diameter
minDiameter REAL 0.0 [LU] Minimum diameter allowed
maxDiameter REAL 0.0 [LU] Maximum diameter allowed
webThickness REAL 0.0 [LU] Web thickness for rest length calculation
[LU / min] actual velocity (of line)
actLineVelocity REAL 0.0 has to be positive
hint: (use ABS() )
actLineAcceleration REAL 0.0 [LU / min²] actual acceleration (of line)
[ LU / min² ] Deceleration limit (of line),
negAccelLimitLine REAL 0.0
has to be negative
 Siemens AG 2018 All rights reserved

[ LU / min^3 ] Jerk limit (of line),


posAccelEndJerkLimitLine REAL 0.0
has to be negative or zero
[ LU / min^3 ] Jerk limit (of line),
negAccelStartJerkLimitLine REAL 0.0
has to be negative or zero
[ LU / min^3 ] Jerk limit (of line),
negAccelEndJerkLimitLine REAL 0.0
has to be positive or zero

Output parameters
Name Data Initial Description
type value
TRUE = Function Block calculates values,
busy BOOL -
FALSE = Funciton Block idle
TRUE = error occured,
error BOOL -
FALSE = no error
errorID DWORD - Error identification
TRUE = target reached,
stop BOOL -
FALSE = target not reached
[LU] distance to stop line with actual velocity and
stopDistance REAL -
dynamics
stopTime REAL - [s] time to decelerate line to velocity 0
restLengthToTarget REAL - [LU] rest length to target diameter

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 133
5 Winding functions

Functionality
The function block combines internal the the LConLib functions FCLConRLC and
FCLConCalculateDistance.
With a rising edge at the input enable a plausibility check of the input parameter will
be started. Faults will be displayed at the outputs error and errorID.

Rest length calculation:


The rest length calculation is parameterized with the inputs webThickness,
actualDiameter, targetDiameter and offset. The specified target diameter is limited
with minDiameter and maxDiameter. The calculated rest length is output at the FB
output restLengthToTarget.

NOTE The rest length calculation is continued even there is fault active (error= TRUE).

Stopping distance calculation:


The stopping distance (stopDistance) and stopping time (stopTime) is being
calculated dependent on the actual line speed and the active dynamics.
 Siemens AG 2018 All rights reserved

As soon the calculated stopping distance is smaller than the calculated rest length
the FB output stop comes TRUE.

NOTICE The line axis need to be stopped by the user in case stop = TRUE!

With a falling edge at enable all ouput parameters will be reset.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 134
5 Winding functions

5.6 FCLConRDC – Target diameter calculation


Calculating the target diameter of a roll.

Block name
FCLConRDC

Task
With the input of the parameters the target diameter of a roll can be calculated.

Integration in the run-time system


The function can be called in any task.

Graphic representation of the block


 Siemens AG 2018 All rights reserved

FCLConRDC

REAL webThickness FCLConRDC REAL

REAL actualDiameter

REAL length

eWindingMode windingMode
Type

Block parameters

Input parameters
Name Data type Initial value Description
webThickness REAL 0.0001 [ LU ] Material thickness [ 0.000001–1 ]
actualDiameter REAL 0.0 [ LU ] Actual roll diameter
length REAL 0.0 [ LU ] target length to be wound/unwound
REWIND_
eWindingMode
windingMode FROM_ Winding mode (Winder or unwinder)
Type
ABOVE

Output parameters
Name Data type Initial value Description
FCLConRDC REAL - [ LU ] Calculated target diameter of the roll

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 135
5 Winding functions

Note The calculations made in this function block are in principle independent of the
physical units. The output parameter units are defined by the input parameters.
The internal calculations do not perform any conversions.
[LU] Length units, e.g. m

Functionality
The function uses the input parameters to calculate the target diameter
(FCLConRDC) of a 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
actualDiam eter² webThickness  length
FCLConRDC  2  
 Siemens AG 2018 All rights reserved

4 Π

Unwinder
actualDiam eter² webThickness  length
FCLConRDC  2  
4 Π

Figure 5-3: Graphic representation of the function


d1 d2

d1

X
p

Δlength d2

X
p

Amount of material between


actual and target diameter

Table 5-12
Winder mode Actual diameter Target diameter
Winder d1 < d2 d2 (full roll)
Unwinder d2 > d1 d1 (empty roll)

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 136
5 Winding functions

5.7 FBLConThicknessAverage – High resolution thickness


calculation
The function block calculates a floating average value based on the cyclically
calculated material thickness values of the diameter calculator
FBLConDiameterCalculation, to increase the precision and stability of the value.

Block name
FBLConThicknessAverage

Task
The block is used as extension for the FBLConWinder winder block or the
FBLConDiameterCalculation diameter calculator.
Both of these blocks offer several calculation modes for calculating the diameter,
whereby the DIAM_CALC_INTEGRAL and DIAM_CALC_POSITION position
modes, not only calculate the diameter, but also the actual material thickness. The
FBLConThicknessAverage block improves the precision of the material thickness
calculation by generating a floating average value (extension of the measurement
interval), in order to make the value more suitable - for instance to calculate the
 Siemens AG 2018 All rights reserved

remaining length.

Integration in the run-time system


The function block can be called in any task.

Graphic representation of the block

FBLConThicknessAverage

BOOL enable busy BOOL

BOOL hold error BOOL

BOOL newValue errorID DWORD

REAL materialThicknessPartial thickness BOOL


Valid
REAL materialThicknessInitial materialThickness REAL

REAL diameterMeasuring
RevCount

REAL thicknessMeasuring
RevCount

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 137
5 Winding functions

Block parameters

Input parameters
Name Data type Initial value Description
TRUE: Block is active.
A rising edge resets the block and fills the
elements of the ring buffer with
enable BOOL FALSE
materialThicknessInitial.
FALSE: Block inactive, output materialThickness
= materialThicknessInitial.
TRUE: Block does not accept any new values,
hold BOOL FALSE e.g. if the winder is stopped or the machine
velocity is changed.
Rising edge: The value in
newValue BOOL FALSE materialThicknessPartial is written into the ring
buffer.
materialThicknessPartial Actual material thickness calculated by the
REAL 0.0
diameter calculator
materialThicknessInitial REAL 0.0 Initial value of the material thickness calculation
Number of winder revolutions of the diameter
diameterMesuringRevCount REAL 1.0
calculation
Number of winder revolutions of the material
thicknessMeasuringRevCount REAL 1.0
thickness calculation
 Siemens AG 2018 All rights reserved

Output parameters
Name Data type Initial value Description
busy BOOL FALSE TRUE: FB is active
FALSE: No error
error BOOL FALSE TRUE: An error has occurred, refer to error
identification
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error
thicknessValid BOOL FALSE Ring buffer is filled with measured values
Calculated material thickness if FB is active,
materialThickness REAL 0.0
materialThicknessInitial if not.

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 138
5 Winding functions

Functionality
The following equation shows the block functionality:

d i  #t 
mt i  k 
2# d #d 

D d i D D
  2# d  k  2# d  k  2# t
mt i
MT   
2# t k k k

D   d
k
i

MT: Material thickness, calculated from FBLConThicknessAverage, updated after


the specified number of winder revolutions (floating average value)
mti: Material thickness, calculated by FBLConWinder
#d: Number of winder revolutions of the thickness or diameter calculation
 Siemens AG 2018 All rights reserved

#t: Number of winding revolutions for the thickness calculation by the


FBLConThicknessAverage block
k: Ratio #t / #d
Figure 5-4
diameter
Δdi
Δdi
Δdi
Δdi
Δdi
ΔD4

Δdi
ΔD3

Δdi
ΔD2

Δdi
ΔD1
Δdi
Δdi
Δdi

number of
#d #d #d #d #d #d #d #d #d #d #d winder revolutions

#t
#t
#t
#t

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 139
5 Winding functions

Graphic representation of the function


The following diagram represents the logical connection with FBLConWinder. The
trigger to accept the value can be generated from the value change of the variables
latchDiamCalc or sWinderConfig.r32CalculatedWebThickness.
FBLConWinder
FBWinder FBLConThicknessAverage
FBThicknessAverage FCRLC
FCLConRLC
sWinderConfig. materialThickness
materialThickness webThickness
r32CalculatedWebThickness Partial

diameter actualDiameter

targetDiameter restLength

Warnings
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
Table 5-13 Warnings
ErrorID Description
16#0000_0000 No warning
 Siemens AG 2018 All rights reserved

16#0209_4002 Array size is limited, increase diameterMeasuringRevCount AND/OR decrease


thicknessMeasuringCount AND/OR Change
LCONLIB_THICKNESS_MAX_SAMPLES constant value.

Errors
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Table 5-14 Error messages
ErrorID Description
16#0000_0000 No error.
16#0209_8005 Invalid configuration data:
thicknessMeasuringRevCount < diameterMeasuringRevCount
or
diameterMeasuringRevCount <= 0.0

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 140
5 Winding functions

5.8 FBLConSetUnits – Setting conversion factors


Block name
FBLConSetUnits

Task
Sets the internal conversion factors corresponding to the parameterized axis
configuration.

Integration in the run-time system


The function block can be called in any task.

Graphic representation of the block

FBLConSetUnits
 Siemens AG 2018 All rights reserved

eUnitLineAxis unitLineAxisVelocity error BOOL


VelocityType
eUnitLineAxis unitLineAxisAcceleration errorID DWORD
AccelerationType
eUnitWinder unitWinderAxisVelocity
AxisVelocityType
sConversion sConvC sConversion
ConstantsType ConstantsType

Block parameters

Input parameters
The input parameters are used to specify the axis units according to the selected
TO parameterization.
Name Data type Initial value Description
Axis configuration of the velocity corresponding to TO
lineAxis
NOT_DEFINED
M_MIN: m/min
MM_MIN: mm/min
eUnitLine
unitLineAxis NOT_ M_S: m/s
Axis
Velocity DEFINED MM_S: mm/s
VelocityType
FT_MIN: ft/min
INCH_MIN: inch/min
FT_S: ft/s
INCH_S: inch/s
DEG_S_PRINT 360°/s = 1m/s

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 141
5 Winding functions

Name Data type Initial value Description


Axis configuration of the acceleration corresponding to TO
lineAxis
eUnitLine NOT_DEFINED
unitLineAxis Axis NOT_ M_S2: m/s²
Acceleration Acceleration DEFINED MM_S2: mm/s²
Type FT_S2: ft/s²
INCH_S2: inch/s²
DEG_S2_PRINT 360°/s² = 1m/s²
Axis configuration of the velocity corresponding to TO
winderAxis
eUnitWinder NOT_DEFINED
unitWinderAxis NOT_
Axis RPM: U/min
Velocity DEFINED
VelocityType RPS: U/s
DEG_MIN: °/min
DEG_S: °/s

Input/Output parameter
The parameters included in this structure are used as output parameters and are
automatically assigned by the system.
Name Data type Initial value Description
sConversion Structure with conversion factors
 Siemens AG 2018 All rights reserved

sConvC Constants Details on this structure are provided in the description of


Type the type definitions.

Output Parameter
Name Data type Initial value Description
FALSE: No error
TRUE: An error has occurred, refer to error identification
Error BOOL FALSE
In case of error (error = TRUE) the output tensionTaper is
set to 1.0.
Error identification, refer to error messages
errorID DWORD 16#0000_0000 errorID <= 16#000_8000: warning
errorID >= 16#0000_8000: error

Functionality
Using the input parameters, the velocity and the acceleration of the leading axis
(lineAxis) as well as the velocity of the winder axis (winderAxis) are specified
corresponding to the particular TO parameterization. This is realized using three
enumeration types; these are orientated to the units of the physical quantity –
metric and Anglo-American (imperial) units can be selected. The conversion factors
of structure sConvC to convert into the required units, are automatically assigned
by the system starting from the FB parameterization. This means that the user
does not have to change them. Parameterization for printing machines is available
with the DEG_Sx_PRINT option. This is orientated to the requirement that 360°/s =
corresponds to 1m/s.
If one of the input parameters is incorrect or is not available, an error (error) is
generated including an error number (errorID).

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 142
6 Glossary

Note [LU] Length unit, e.g.: m, ft etc.


[LUb] Basis length unit, m or ft
[TU] Time units of the particular axis (under certain circumstances,
different for lineAxis and winderAxis)

Errors
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#0206_8005 The requested dimension unit has not been implemented. Instead, standard
conversion factors are used.
Input parameter Leading axis LU is in Leading axis LU is in
meters feet
unitLineAxisVelocity M_MIN FT_MIN
unitLineAxisAcceleration M_S2 FT_S2
unitWinderAxisVelocity RPM RPM
 Siemens AG 2018 All rights reserved

6 Glossary
Table 6-1
Abbreviation Meaning
FB Function block
FUP Function diagram
IN Input parameter
IN/OUT Input/output parameter
RFG Ramp-function generator
LAD Ladder diagram
LU Length unit
NRM Normalization value
MCC Motion Control Chart (graphic programming language)
OUT Output parameter
SCOUT SIMOTION Controlling with optimized Usability Toolbox
(Engineering System for the family of SIMOTION products)
ST Structured Text (text-based programming language)
TO Technology object
TU Time unit
WHKL Tension taper characteristic

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 143
7 Appendix

7 Appendix
7.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
https://support.industry.siemens.com/

Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send queries
to Technical Support via Web form:
https://www.siemens.com/industry/supportrequest
 Siemens AG 2018 All rights reserved

SITRAIN – Training for Industry


We support you with our globally available training courses for industry with
practical experience, innovative learning methods and a concept that’s tailored to
the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to our web page:
https://www.siemens.com/sitrain

Service offer
Our range of services includes the following:
 Plant data services
 Spare parts services
 Repair services
 On-site and maintenance services
 Retrofitting and modernization services
 Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
https://support.industry.siemens.com/cs/sc

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for Apple iOS, Android and Windows

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 144
7 Appendix

Phone:
https://support.industry.siemens.com/cs/ww/en/sc/2067

7.2 Application support


Siemens AG
Digital Factory Division
Factory Automation
Production Machines
DF FA PMA APC
Frauenauracher Str. 80
91056 Erlangen, Germany
mailto: [email protected]

7.3 Links and literature


Table 7-1
No. Topic
\1\ Siemens Industry Online Support
 Siemens AG 2018 All rights reserved

https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/48805235
\3\ SIMOTION/SIMATIC/SINAMICS – Converting Toolbox
https://support.industry.siemens.com/cs/ww/en/view/109744606

7.4 Change documentation


Table 7-2
Version Date Modifications
V1.0 01.10.2006 First version
V1.1 01.05.2008
V1.1.1 05.06.2008 user-defined units of measurement
V1.2 29.07.2009 New blocks, simplifications
V1.2.1 23.07.2010 New blocks; Simplifications; Changelog in the library
V1.2.2 23.09.2011 Simplifications; Changelog in the library
V1.2.3 26.01.2012 Bugfix in FCTaskIdentification; Changelog in the library
V1.3.0 02.04.2013 New winder control mode “Constant v Control”
V2.0.0 06.08.2015 New Function Block FBCalcTargetDiamStopCondition;
FBWinder description removed;
Update FBDiameterCalculation;
V2.1.0 23.03.2016 Change in Functionblock FBRFG
V2.1.2 15.11.2016 Layout adaptions in this document
V2.2.3 02.03.2017 FB/FC prefix LCon added
V2.2.4 23.07.2017 Minor changes

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 145
7 Appendix

Version Date Modifications


V2.2.5 06/2018 Description of tension taper characteristic extended
V2.2.6 09/2018 Adapted version
V2.2.7 10/2018 For changes see changelog
 Siemens AG 2018 All rights reserved

Manual SIMOTION Converting Library


Entry-ID: 48805235, V2.2.7, 10/2018 146

You might also like