Beruflich Dokumente
Kultur Dokumente
Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. These Application Examples do not
relieve you of the responsibility to use safe practices in application, installation,
operation and maintenance. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time without prior notice.
If there are any deviations between the recommendations provided in these
Application Examples and other Siemens publications – e.g. Catalogs – the
contents of the other documents have priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
© Siemens AG 2019 All rights reserved
Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, systems, machines and networks.
tion 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 only
form one element of such a concept.
Customer is responsible to prevent unauthorized access to its plants, systems,
machines and networks. Systems, machines and components should only be
connected to the enterprise network or the internet if and to the extent necessary
and with appropriate security measures (e.g. use of firewalls and network
segmentation) in place.
Additionally, Siemens’ guidance on appropriate security measures should be
taken into account. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them
more secure. Siemens strongly recommends to apply product updates as soon
as available and to always use the latest product versions. Use of product
versions that are no longer supported, and failure to apply latest updates may
increase customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial
Security RSS Feed under http://www.siemens.com/industrialsecurity.
Table of contents
Warranty and liability ................................................................................................... 2
1 Winding and tension control – Overview ........................................................ 5
1.1 SIMATIC Converting Toolbox .............................................................. 5
1.2 Core functions ...................................................................................... 5
1.3 Additional functions .............................................................................. 7
1.4 Converting Diagnostic Pages (IT-Diag)................................................ 8
2 Basic information about Winding and Tension Control ................................ 9
2.1 General overview of winders ................................................................ 9
2.2 General overview of tension control axis (sectional drive) ................. 11
2.3 Winding/Tension control concepts ..................................................... 12
3 Integration ........................................................................................................ 23
3.1 Integration into user program ............................................................. 23
3.2 Content of the library .......................................................................... 25
3.3 Starter – SINAMICS Configuration ..................................................... 26
3.4 TIA Portal – Hardware part................................................................. 26
4 Example project ............................................................................................... 29
5 Functional description .................................................................................... 31
5.1 General functions ............................................................................... 31
© Siemens AG 2019 All rights reserved
https://support.industry.siemens.com/cs/ww/en/view/109744606
The SIMATIC Converting Toolbox was developed with the objective to provide a
collection of common standard functions which are necessary for any kind of
converting machines.
Converting describes the process of processing/finishing any kind of material. In
most cases this starts with unwinding a material web which then is processed in
one or several steps in machine types like
• Printing machines
• Coating lines
• Laminating machines
• Slitters
© Siemens AG 2019 All rights reserved
The open source library includes tested and documented functions which help the
user during engineering, programming and commissioning. Well-structured
interfaces and documented source code gives the possibility to make adaptions to
user specific requirements.
Diameter calculator
4 different techniques are available to calculate the diameter of the roll being
wound:
• Thickness addition: The diameter is calculated by adding the material
thickness
• Web length calculation: The diameter is calculated using the length of the
winded material and the material thickness
• v/n calculation: The diameter is calculated using the ratio between the velocity
of the material web and the winder speed
• v/n integral: The diameter is calculated from the ratio between the material
length and the revolutions of the winder (integration)
• External diameter: The diameter comes from extern (sensor)
Torque pre-control
The main component of course, is the motor torque which is necessary to build up
the desired web tension.
Beside of that friction torque, acceleration torque and the torque resulting from a
changing roll diameter can be pre-controlled.
© Siemens AG 2019 All rights reserved
Controller Adaptation
The gain of the technology controller can be adapted as a function of the diameter.
This permits a higher controller gain at a bigger diameter.
In case of S120 drives, the speed controller gain in the drive can be adapted as a
function of the moment of inertia or the actual diameter of the roll being wound.
This is necessary to guaranty a well optimized and dynamic speed controller even
the diameter ratio (full roll to empty roll) is big.
Figure 1-1
© Siemens AG 2019 All rights reserved
dancer roll is at its center position, if pulling force of the material web and
counterforce of the dancer system is in balance.
In order to control (closed-loop) the tension in the material web, the technology
controller must ensure that the dancer roll remains at its center position. If the
tension in the system changes, then the position of the dancer roll also changes –
that is in turn coupled with the technology controller. Web tension variations –
detected by dancer position variations - can either be compensated by changing
the motor speed or by adapting the motor torque.
+
sact
P -
U
The load cell directly measures the tension in the material web and transfers this
signal to the technology controller. Tension variations can either be compensated
by changing the motor speed or by adapting the motor torque.
Center Winder
With a center winder, the roll is driven by a central shaft. The diameter range is an
important factor when designing this winder type. The reason for this is that for a
constant web velocity and constant tension, the speed is inversely proportional to
the diameter. This means that the maximum required drive speed is defined by the
minimum roll diameter – whereby the maximum required torque is defined by the
maximum diameter.
The center winder is more complicated and from control perspective more difficult
to handle than the surface winder; however it is still more widely established of the
two winder types.
© Siemens AG 2019 All rights reserved
Surface Winder
For a surface winder, the roll is driven through one or several rolls that are in
contact with the roll being wound. The drive speed and power depends on the
diameter of the roll being wound. From a mechanical design perspective, this
winder technique is more complicated than that of a center winder.
The contact winder (surface winder) is essentially used if there are no special
requirements placed on the surface quality of the material being wound.
Surface winder
M-
n-controlled controlled
that is in turn coupled with the technology controller. Web tension variations –
detected by dancer position variations - can either be compensated by changing
the motor speed or by adapting the motor torque.
+
sact
P -
U
The load cell directly measures the tension in the material web and transfers this
signal to the technology controller. Tension variations can either be compensated
by changing the motor speed or by adapting the motor torque.
Draw Control
This method is used for simple tension regulation, especially when any additional
measuring system is not available. It does not offer high level tension accuracy.
It can’t be used for center driven winders.
Using this method, the web tension is set by the segments velocity ratio, means
that the velocity of the transport rolls at the segment start is slower than at the
segment end. The velocity difference causes material strain which defines the web
tension. The resulting tension depends on the material type, the friction between
the material and the transport roll (slip) and the transport system itself.
v OUT - v IN
T2 = T1 + C
v IN
T1 T2
Vline_IN Vline_OUT
n_1 n_2
M M
© Siemens AG 2019 All rights reserved
Motion
Control
System
LTC axis
Master axis
Actual speed
Power unit
value
Acceleration
setpoint
x + Auxiliary
torque
Torque limits
LTC drive
Torque
precontrol
Torque pre-control
Torque limiting
F
© Siemens AG 2019 All rights reserved
Vline
M_1
n_1
Motion
Control
System
Winding axis
Master axis
FTension [N]
velocity setpoint
Velocity setpoint
velocity / position
velocity override
setpoint
Actual speed
Power unit
value
Acceleration setpoint
Winding drive
Torque torque precontrol
tension setpoint Setpoint precontrol
preparation tension setpoint
(Ramp generator) after RFG
torque limits
Torque limiting
© Siemens AG 2019 All rights reserved
V-constant control
This method is used for simple tension regulation, especially when any additional
measuring system is not available. It does not offer high level tension accuracy.
In this control mode the winder is controlled to run with constant web speed (web
speed command value). No tension control is active.
Winding axis
Actual speed
Power unit
value
velocity setpoint (line axis) Auxiliary Torque limit
torque
Speed setpoint speed setpoint
Winding axis +
© Siemens AG 2019 All rights reserved
Speed Current
controller controller
diameter
Diameter Winding drive
calculation
speed/
position
Precontrol torque
Torque
acceleration setpoint (line axis) precontrol
optional
Load cell
F
Vline
© Siemens AG 2019 All rights reserved
n+ M+
M
Motion
Fact
Control
System
Winding axis
Master axis
FTension [N]
setpoint velocity
velocity setpoint
velocity / position
Geschwindigkeits-
Override
setpoint
Actual speed
Power unit
value
acceleration setpoint
Tension
correction value
tension controller
Setpoint
setpoint
preparation (Ramp
generator) precontrol
torque
Torque
tension setpoint precontrol
RFG +
© Siemens AG 2019 All rights reserved
Load cell
F
© Siemens AG 2019 All rights reserved
Vline
n+ M+
M
Motion
Fact
Control
System
Winding axis
Master axis
FTension [N]
Setpoint velocity
Velocity setpoint
Acceleration setpoint
Velocity/position
Actual speed
setpoint
Power unit
value
+ Speed
setpoint
Auxiliary
torque
Torque limit
Winding drive
Tension actual value
Tension
Tension controller
Setpoint
setpoint
preparation
(Rampgenerator)
Precontrol
Torque torque
precontrol
© Siemens AG 2019 All rights reserved
Dancer roll
F
Vline
n+ M+
M
© Siemens AG 2019 All rights reserved
Posact Motion
Control
System
The dancer roll attempts to deflect the material web with a defined force. The final
web tension is a result of the pulling force to the dancer and its counterforce.
The counterforce of the dancer – in consequence the web tension can be defined
in different ways, dependent on the mechanical construction of the dancer system.
An easy way is a counterforce generated with spring power. However the spring
force and due to this the web tension can only be adjusted by the dancer angle.
More flexible adjustable counterforce can be achieved with pneumatic or hydraulic
dancer system. These systems can keep the counterforce constant even the
dancer angle changes. To do this, the tension setpoint signal is connected to an
analog output and is used as setpoint for the dancer force.
Often, there are additional factors that influence the tension actual value as a result
of the geometrical arrangement (distance to reversing rollers that may be used)
and the weight of the dancer roll itself. However, with a careful mechanical design,
these effects can be eliminated or sufficiently minimized.
The dancer position control has the advantage that brief fluctuations in the web
tension – caused by disturbances - can be absorbed due to the material buffer
function of the dancer roll.
Another advantage of the dancer system is the damping effect on
• Non-round material rolls
• Jumps between layers – e.g. when winding cables
• Influences during flying roll changes (splice)
Even though closed-loop dancer roll controls are quite complex, they offer the best
control technique.
dancer counterforce
Winder axis
Master axis
© Siemens AG 2019 All rights reserved
FTension [N]
+
setpoint velocity
-
velocity setpoint
velocity / position
acceleration setpoint
setpoint
Actual speed
Power unit
value
+ speed
setpoint
Auxiliary
torque Torque
limit
Diameter Speed setpoint
speed / position
calculation
diameter
winder axis +
Speed Current
controller controller
correction value
position
Winder drive
setpoint position
Setpoint RFG
setpoint after
RFG Position
controller
position actual value
3 Integration
3.1 Integration into user program
The SIMATIC Converting Toolbox is provided as global TIA Portal library LCon.
The following steps need to be done for integration to the user program:
2. Copy the folders LCon_Blocks and LCon_Types to the user project. All the
content can be copied to the user program by drag and drop. The global TIA
Portal library “LCon” provides the SIMATIC Converting Toolbox functionalities
for the SIMATIC PLCs S7-300/S7-400 and S7-1200/S7-1500(T).Furthermore it
contains program examples (OB’s) how to trigger the function blocks.
NOTE It is recommended to copy the respective sources together with the overlaid
folder “LCon_.....”
Figure 3-2
© Siemens AG 2019 All rights reserved
Content SIMATIC library LCon for winding and tension control in the TIA-Portal
S7-300/S7-400 LCon
Library is not using any motion control functionality of the controller
and is executable on all SIMATIC controllers of the type S7-300
and S7-400.
S7-1200/S7-1500(T) LCon
Library is not using any motion control functionality of the controller
and is executable on all SIMATIC controllers of the type S7-1200,
S7-1500 and S7-1500T.
S7-1500(T) LConSMC – Standard Motion Control
Library is using standard motion control functions of the controller
to realize winding and tension control. It is executable on the
SIMATIC controllers S7-1500 and S7-1500T in combination with a
technology object.
Both solutions for S7-1500 offer the same functionality for winding and tension
© Siemens AG 2019 All rights reserved
NOTE For all of the three solutions exists a separate manual which contains the
description of the functions
S7-1200/S7-1500
The S7-1200/S7-1500 folder contains the Toolbox function blocks and functions
(LCon_Blocks) as well as the required data types (LCon_Types).
Furthermore it contains examples which help to create a machine project with
winding or tension control functionality.
• LCon_ExamplePLCTags
Contains global user constants used for array length definition of winder and
sectional drive instances.
• LCon_ExampleWatchtable
This folder contains a watchtable to control the state machines and important
variables.
Figure 3-3
2. Afterwards the modules (DO Control Unit, DO infeed, DO Servo, etc.) can be
added.
Figure 3-4
© Siemens AG 2019 All rights reserved
NOTE The order of the DO’s must match with the configuration in STARTER!
b. Standard telegram:
Use telegram 2 (preferred) or telegram 3 and optionally the additional
telegram 750. With this selection the Kp adaptation and the error code are
not available.
The respective variable containing the HW address can be found and copied
by selecting the telegram → properties → System constants
© Siemens AG 2019 All rights reserved
4 Example project
NOTE In case the Converting Toolbox blocks (LCon_Blocks) are used in a S7-1200
PLC, the function LCon_ReadCycleTimeS71500 need to be deleted.
Furthermore the function call of this function in the program OBs LineAxis,
SectionalDrive and Winder need to be changed to
LCon_ReadCycleTimeS71200()!
LCon_Data
© Siemens AG 2019 All rights reserved
The DB contains all data structures which are used in the program blocks.
The data types are defined in PLC data types.
Init
The Init folder contains functions to configure different winder control modes
(Indirect Tension Control, Dancer Control Speed Setpoint Adaption, etc.).
An example startup OB is used to call these functions once during the change of
the operation mode from STOP to RUN.
ITDiag
This folder contains a DB with the variable for the Converting Diagnostic Pages
and an OB to interconnect those variables with the actual values from the program.
LineAxis
The folder LineAxis contains an OB to control a line axis (master axis). The
program shows the necessary function block calls of the Converting Toolbox. A
state machine shows how to trigger the interface variables.
Several line axes can be realized by duplicating the OB and the data block
instances of the function blocks.
SectionalDrive
The folder SectionalDrive contains an OB to control a sectional drive axis (tension
controlled web transport axis). The program shows the necessary function block
calls of the Converting Toolbox. A state machine shows how to trigger the interface
variables.
Several sectional drive axes can be realized by duplicating the OB and the data
block instances of the function blocks.
Winder
The folder Winder contains an OB to control a winder axis. The program shows the
necessary function block calls of the Converting Toolbox. A state machine shows
how to trigger the interface variables.
The optional function block calls for friction measurement and the stop condition at
a preset diameter are also part of this program OB.
Several winder axes can be realized by duplicating the OB and the data block
instances of the function blocks or using the Winder_ForLoop example OB from the
library LCon.
MainControl
This folder contains the MainSequence OB.
The OB contains a main state machine which controls all sub module state
machines (line axis, winder, sectional drive).
© Siemens AG 2019 All rights reserved
5 Functional description
5.1 General functions
5.1.1 LCon_ReadCycleTimeS71200
Determines the cycle time of calling OB, called in cyclic interrupt task.
This function can be used in S7-1200 PLC.
Function ID: 1001
ReadCycleTime
5.1.2 LCon_ReadCycleTimeS71500
Determines the cycle time of calling OB, called in cyclic interrupt or synchronous
operation task.
This function can be used in S7-1500 PLC.
Function ID: 1001
ReadCycleTime
type value
IN OBNumber INT 30 OB number in which the program is called
OUT RET_VAL REAL - [ms] Cycle time of the OB this function is
called in.
5.1.3 LCon_Linear
Linear
Functionality
Using the breakpoints entered, this function determines the matching Y coordinate
of the coordinate present at input x. The interpolated Y coordinate is provided as
return value of the function. The input point x is limited by the coordinates X1 and
X2. If the coordinates X1 and X2 are equal, 0.0 is displayed as return value and no
interpolation is carried-out.
𝑋 − 𝑋1
𝑅𝐸𝑇𝑉𝐴𝐿 = (𝑌 − 𝑌1 ) + 𝑌1
𝑋1 − 𝑋2 2
Graphical Representation
© Siemens AG 2019 All rights reserved
5.1.4 LCon_TableChar
Interpolation from breakpoint table, the function block can be called in any cyclic
task.
Function block ID: 0106
TableChar
Functionality
The function blocks adapts the output value y corresponding to the input value x
based on a breakpoint table of flexible size. Between the breakpoints the values
are interpolated linearly.
The x values of the curve have to increase monotonically; the y values have no
limitation. The total number of breakpoints is defined by the size of the data
reference. The data type of the addressed data area has to be REAL. Is x lower
than the x value of the first coordinate, the output y value will maintain the level of
the y value of the first coordinate. The same applies if x is bigger than the last x
coordinate of the table.
Graphical Representation
© Siemens AG 2019 All rights reserved
Warning messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No warning
16#0106_4005 The table of entered values are not monotonically(steadily) increasing ->no
matching values found
16#0106_4008 The table of entered values are not monotonically(steadily) increasing -> 2
values are identical
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000
ErrorID Description
16# 0000_0000 No error
16# 0106_8003 Number of array elements too small.
© Siemens AG 2019 All rights reserved
LCon_RFG
Int rampTimeMode
Bool set
Bool followup
Bool increase
Bool decrease
Int OBnumber
Real tCycle
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 are separately calculated for the up ramp and down
ramp. 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. By this the used ramp time will be
switched if the output y crosses 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 zero.
𝑐𝑦𝑐𝑙𝑒𝑡𝑖𝑚𝑒
𝑦𝑎 = − ⋅ 𝑛𝑜𝑚𝑖𝑛𝑎𝑙𝑉𝑎𝑙𝑢𝑒 𝑓𝑜𝑟 𝑌 > 0
𝑟𝑎𝑚𝑝𝑢𝑝𝑇𝑖𝑚𝑒
𝑐𝑦𝑐𝑙𝑒𝑡𝑖𝑚𝑒
𝑦𝑎 = ⋅ 𝑛𝑜𝑚𝑖𝑛𝑎𝑙𝑉𝑎𝑙𝑢𝑒 𝑓𝑜𝑟 𝑌 < 0
𝑟𝑎𝑚𝑝𝑢𝑝𝑇𝑖𝑚𝑒
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 the 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.
The combination of commands at the control inputs and the possible operating
modes can be taken from the truth tables.
© Siemens AG 2019 All rights reserved
increase 1
(IN) 0
1
decrease
0
(IN)
1
rampTimeMode
(IN) 0
upperLimit
100 nominalValue
y
(OUT) 0
rampupTime rampdownTime
-100
lowerLimit
Nesting Depth: 4 from the time delay interrupt, time-of-day interrupt, cyclic
NOTE
interrupt, hardware interrupt, time error interrupt, or diagnostic error interrupt OB.
Due to this limitation, the called FB’s are re-written in the calling FB so that the
nesting depth reduces by 1.
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000
ErrorID Description
LCon_RFGJ
Real rampdownTime
Int rampTimeMode
Real fastRampdownTime
Real roundingTime
Int OBnumber
Real tCycle
Functionality
The function block is active with the input run at TRUE and the calculation can be
started or stopped with input enable. Depending on the parameterization of the
inputs, a ramp function is calculated. Various options can be set by selecting the
inputs. If mode is at False, the ramp is braked using a special entered deceleration
time (fastRampdownTime) and without jerk limiting. This means that the ramp can
be effectively decelerated for an Emergency Stop – this is also possible while
accelerating. If mode is at True, then the drive is braked normally with the entered
deceleration time (rampdownTime). The acceleration is always calculated with the
entered acceleration time (rampupTime) independent of mode.
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. By this the used ramp time will be
switched if the output y crosses 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 zero.
In order to reach the setpoint (x), the appropriate interval values are output (at y)
and the actual change rate is output (at ya). If input enableRounding is set to
TRUE, the ramp is calculated with jerk limiting. The rounding-off is determined by
the rounding-off time (roundingTime). The zero crossing (when the input x changes
direction) can be parameterized with or without rounding. As soon as the output
value is zero this is displayed using the setpointZero output. Further, when
© Siemens AG 2019 All rights reserved
100
x
(IN)
0
-100
rampTimeMode 1
(IN)
0
100
y
(OUT) 0
-100
ya
(OUT)
0
© Siemens AG 2019 All rights reserved
Nesting Depth : 4 from the time delay interrupt, time-of-day interrupt, cyclic
NOTE
interrupt, hardware interrupt, time error interrupt, or diagnostic error interrupt OB.
Due to this limitation, the called FB’s are re-written in the calling FB so that the
nesting depth reduces by 1.
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000
Error ID Description
16# 0000_0000 No error
16# 1107_8001 Function block called in Wrong task
16# 1107_8005 Invalid Configuration data:
nominalValue = 0
rampTimeMode > 1
rampTimeMode < 0
5.1.7 LCon_CalcStopDistance
This function calculates the distance remaining for braking and associated time to
ramp down to zero the Unwinder as per the ramp down time, depending upon the
given speed and acceleration.
Function block ID: 0005
CalcStopDistance
Functionality
The function calculates the braking time and braking distance taking the actual
motion vector of a drive (velocity, acceleration) as well as the specification of
dynamics (maxVelocity, rampUpTime, rampdownTime, roundingTime) into
account. The length unit of the calculation corresponds to the unit used as input for
the lineSpeed input. The units of the inputs have to be consistent as described.
With roundingTime = 0.0 the rounding (jerk limiting, smoothing) is deactivated
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000
Error ID Description
16#0000_0000 No error
16#0005_8005 Invalid Configuration data
© Siemens AG 2019 All rights reserved
5.1.8 LCon_ModuloIEC
This function calculates the modulo division for an input value oft he data type
LREAL.
Function block ID: 000C
LCon_ModuloIEC
LReal moduloValue
Functionality
Definition of the return value
• Positive input value -> positive return value
• Negative input value -> negative return value
Error messages
© Siemens AG 2019 All rights reserved
TRIG
Functionality
The function block outputs a true signal for a falling & rising edge is detected on
the input signal (CLK). The duration of the output signal is one cycle.
Timing diagram
ScalingDWDRL
Functionality
The function converts a DWORD input (x) using a normalization value (base) and
the maximum reference value (maxValue) into a REAL value. The output value is
limited to −2 ⋅ maxValue − 2 ⋅ maxValue. The DWORD value will be converted to
DINT value and afterwards to REAL value.
𝑥
𝑅𝐸𝑇_𝑉𝐴𝐿 = ⋅ 𝑚𝑎𝑥𝑉𝑎𝑙𝑢𝑒
𝑏𝑎𝑠𝑒
5.3.2 LCon_ScalingRLDWD
ScalingRLDWD
Functionality
The function converts a REAL value (x) into a DWORD using a normalization value
(base) and the maximum reference value (maxValue). The input value x is limited
to the values: −2 ⋅ maxValue − 2 ⋅ maxValue
𝑥
𝑅𝐸𝑇_𝑉𝐴𝐿 = ⋅ 𝑏𝑎𝑠𝑒
𝑚𝑎𝑥𝑉𝑎𝑙𝑢𝑒
5.3.3 LCon_ScalingWDRL
ScalingWDRL
Functionality
This function converts a WORD value (x) into a REAL value using a normalization
value
(base) and the maximum reference value (maxValue). The output value is limited
between the values −2 ⋅ maxValue − 2 ⋅ maxValue. The WORD value will be
converted to INT value and afterwards to REAL value.
𝑥
𝑅𝐸𝑇_𝑉𝐴𝐿 = ⋅ 𝑚𝑎𝑥𝑉𝑎𝑙𝑢𝑒
𝑏𝑎𝑠𝑒
5.3.4 LCon_ScalingRLWD
ScalingRLWD
Functionality
This function converts a REAL value (x) into a WORD value using a normalization
value (base) and the maximum reference value (maxValue). The input value x is
limited between the values −2 ⋅ maxValue − 2 ⋅ maxValue.
𝑥
𝑅𝐸𝑇_𝑉𝐴𝐿 = ⋅ 𝑏𝑎𝑠𝑒
𝑚𝑎𝑥𝑉𝑎𝑙𝑢𝑒
5.3.5 LCon_Scaling
Scaling
Functionality
This function scales an input value (x) using a normalization value (base) and the
maximum reference value (maxValue).
𝑥
𝑅𝐸𝑇_𝑉𝐴𝐿 = ⋅ 𝑚𝑎𝑥𝑉𝑎𝑙𝑢𝑒
𝑏𝑎𝑠𝑒
Low-pass filter function block, the function block has to be called in a cyclic
interrupt, e.g. OB30.
Function block ID: 1101
PT1
REAL smoothingTime
© Siemens AG 2019 All rights reserved
INT OBnumber
REAL tCycle
Functionality
This input value x is filtered using the time constant smoothingTime and output at
the output y. To precisely calculate the internal steps, the sampling time in which
the block is processed is internally determined. Further, it is possible to
permanently set the output to the value of the input (setValue) by setting the input
(set).
In order to generate a hold, output y should be connected to the input setValue.
This means that when setting set to TRUE, the output value is maintained until set
is again set to FALSE.
If the time constant is set to zero, the filter is de-activated and the output value is
equal to the input value. 63% of the input value is reached at the output after the
time constant.
95% of the input value is reached at the output after three times of the time
constant. For an appropriately high smoothingTime / cycleTime (smoothingTime /
cycleTime > 10) the transfer function corresponds to the following characteristic:
𝑡
−
𝑌(𝑡) = 𝑋 ⋅ (1 − 𝑒 𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑡𝑖𝑚𝑒 ) 𝑤𝑖𝑡ℎ 𝑡 = 𝑛 ⋅ (𝑐𝑦𝑐𝑙𝑒𝑡𝑖𝑚𝑒)
© Siemens AG 2019 All rights reserved
𝑐𝑦𝑐𝑙𝑒𝑡𝑖𝑚𝑒
𝑌𝑛 = 𝑌𝑛−1 + ⋅ (𝑋𝑛 − 𝑌𝑛−1 )
𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑡𝑖𝑚𝑒
Timing Diagram
Nesting Depth : 4 from the time delay interrupt, time-of-day interrupt, cyclic
NOTE
interrupt, hardware interrupt, time error interrupt, or diagnostic error interrupt OB.
Due to this limitation, the called FB’s are re-written in the calling FB so that the
nesting depth reduces by 1.
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Error ID Description
16#0000_0000 No error
16#1101_8001 Function called in Wrong task
© Siemens AG 2019 All rights reserved
5.4.2 LCon_ReadAnalogInput
Analog input evaluation with PT1 filter, has to be called in cyclic interrupt task i.e.
OB30.
Function block ID: 1109
ReadAnalogInput
REAL base
REAL setValue
REAL smoothingTime
© Siemens AG 2019 All rights reserved
INT OBnumber
REAL tCycle
Functionality
This function converts an analog input signal in WORD format (x) into a REAL
value using a normalization value (base) and the maximum reference value
(maxValue). The output value is limited between the values -2⋅maxValue -
2⋅maxValue. The WORD value will be converted to INT value and afterwards to
REAL value.
𝑥
𝑦= ⋅ 𝑚𝑎𝑥𝑉𝑎𝑙𝑢𝑒
𝑏𝑎𝑠𝑒
Optionally the analog value can be filtered with a settable PT1-filter using the filter
time smoothingTime. If the input parameter smoothingTime = 0, the filter is
disabled. The internal limit for the filter time is 5000 ms. The functionality is
basically a combination of the ScalingWDRL function and the PT1 function block.
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
© Siemens AG 2019 All rights reserved
Error ID Description
16#1109_8001 Function called in wrong task
16#1109_8005 Invalid Configuration data
5.4.3 LCon_Differentiator
Differentiator
Functionality
The output value y changes as a function of the rate of change of input value x,
multiplied by the differential time constant diffTime.
The input diffTime is internally limited: cycleTime ≤ diffTime ≤ 1000
Discrete values are calculated using the following algorithm:
𝑑𝑖𝑓𝑓𝑡𝑖𝑚𝑒
𝑌𝑛 = (𝑋𝑛 − 𝑋𝑛−1 ) ⋅
𝑐𝑦𝑐𝑙𝑒𝑡𝑖𝑚𝑒
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Error ID Description
16#0000_0000 No error
16#1103_8001 Function block not called in a cyclic interrupt i.e. OB30
© Siemens AG 2019 All rights reserved
5.4.4 LCon_Integrator
Numerical integrator function block has to be called in a cyclic interrupt, e.g. OB30.
Function block ID: 1102
Integrator
Functionality
The function block integrates the input value x with integration time integralTime.
The result is output at y. The integrator is limited by the upper limit upperLimit and
the lower limit lowerLimit. If the integrator reaches one of the limits, then this is
connected to the output.
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’ input is FALSE, then starting from the set value the integrator continues to
integrate in the direction specified using input value x.
The input integralTime is internally limited: cycleTime ≤ integralTime ≤ 60000
𝑐𝑦𝑐𝑙𝑒𝑡𝑖𝑚𝑒
𝑌𝑛 = 𝑌𝑛−1 + ⋅𝑋
𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑙𝑡𝑖𝑚𝑒 𝑛
Timing diagram
© Siemens AG 2019 All rights reserved
Nesting Depth : 4 from the time delay interrupt, time-of-day interrupt, cyclic
NOTE
interrupt, hardware interrupt, time error interrupt, or diagnostic error interrupt OB.
Due to this limitation, the called FB’s are re-written in the calling FB so that the
nesting depth reduces by 1.
Error messages
Error messages are indicated by the status of the outputs error and errorID:
error = TRUE and errorID <> 16#0000_0000.
Error ID Description
16#0000_0000 No error
16#1102_8001 Function block not called in a cyclic interrupt i.e. OB30
© Siemens AG 2019 All rights reserved
5.4.5 LCon_DT1
DT1-filter
The function block has to be called in a cyclic interrupt, e.g. OB30.
Function block ID: 1104
DT1
REAL diffTime
© Siemens AG 2019 All rights reserved
INT OBnumber
Functionality
𝑑𝑖𝑓𝑓𝑇𝑖𝑚𝑒
𝑌(𝑡) = 𝑥 ( ) ⋅ 𝑒 −𝑡/𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑇𝑖𝑚𝑒 where t=n(cycleTime)
𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑇𝑖𝑚𝑒
𝑑𝑖𝑓𝑓𝑇𝑖𝑚𝑒
𝑌1𝑛 = ⋅ (𝑥𝑛 − 𝑌𝑃𝑇𝑛−1 )
𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑇𝑖𝑚𝑒
© Siemens AG 2019 All rights reserved
𝑐𝑦𝑐𝑙𝑒𝑇𝑖𝑚𝑒
𝑌𝑃𝑇𝑛 = 𝑌𝑃𝑇𝑛−1 ⋅ (𝑥𝑛 − 𝑌𝑃𝑇𝑛−1 )
𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑇𝑖𝑚𝑒
Setting function
When the setting function is active, setting value setValue is transferred to output y;
the output of the smoothing element is obtained as follows:
𝑠𝑚𝑜𝑜𝑡ℎ𝑖𝑛𝑔𝑇𝑖𝑚𝑒
𝑌𝑃𝑇𝑛 = 𝑥𝑛 − ⋅ 𝑠𝑒𝑡𝑉𝑎𝑙𝑢𝑒𝑛 𝑓𝑜𝑟 𝑑𝑖𝑓𝑓𝑇𝑖𝑚𝑒 ≠ 0
𝑑𝑖𝑓𝑓𝑇𝑖𝑚𝑒
In this case, the internal limits for smoothingTime and diffTime apply. For diffTime
= 0, the output values remain unchanged as long as set = TRUE.
Graphic representation
Error messages
Error messages are indicated by the status of the outputs error and errorID:
error = TRUE and errorID <> 16#0000_0000.
© Siemens AG 2019 All rights reserved
Error ID Description
16#0000_0000 No error
16#1104_8001 Function block not called in a cyclic interrupt i.e. OB30
5.4.6 LCon_Limiter
Limiting the input value between specified limits, the function can be called in any
task.
Function block ID: 0004
type value
IN x REAL - Input Value
IN UPPER_LIMIT REAL - Input for specifying upper limit
IN LOWER_LIMIT REAL - Input for specifying lowerlimit
OUT RET_VAL REAL - Output value
OUT UPPER_LIMIT_REACHED BOOL - FALSE: Upper limit not reached
TRUE: Upper limit reached
OUT LOWER_LIMIT_REACHED BOOL - FALSE: Lower limit not reached
TRUE: Lower limit reached
Functionality
The function block transfers the input value x to its return value. The input value is
limited dependent on the input parameters 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.
Timing diagram
© Siemens AG 2019 All rights reserved
Error messages
If upperLimitReached and lowerLimitReached are both at TRUE, the lower limit is
greater than upper limit.
5.4.7 LCon_LevelControl
LevelControl
TIME delayTime
Functionality
This function block monitors an input value (x) to identify whether it violates
(exceeds, falls below) parameterized limit values as long as it is active with run =
TRUE. If the block is enabled, then this can be identified using the busy output.
When the warningHigh value is exceeded, output warningUpperLimit is set after
the delayTime. The same applies when the alarmHigh value is exceeded with the
associated output alarmUpperLimit. If the input value drops below the limit value
warningHigh or alarmHigh minus the hysteresis value (hyst), the particular output is
reset. The same applies for the lower limit monitoring with the limits warningLow
and alarmLow as well as the associated outputs warningLowerLimit and
alarmLowerLimit. However, in this case, the hysteresis (hyst) is added to the limit
© Siemens AG 2019 All rights reserved
value.
Warnings are not reset as a result of alarms.
Timing diagram
5.4.8 LCon_DeadBand
DeadBand
Functionality
If the input value (x) is located in the dead band range (-bandBorder < x <
+bandBorder), the output value is set to zero. However, if it is at or below (–
bandBorder) the output will be x – bandBorder. If the input value is at or above
+bandBorder, x + bandBorder is set as output value. The dead band – symmetrical
around the zero point – can be set using the bandBorder parameter.
Graphical representation
y
(OUT)
x
bandBorder (IN)
(IN)
© Siemens AG 2019 All rights reserved
5.4.9 LCon_DeadZone
DeadZone
Functionality
If the input value (x) lies in the range of the dead zone (-zoneBorder < x < +
zoneBorder), the output value is set to zero. If the input value lies at / below (–
zoneBorder) or at / above +zoneBorder, input x is the output value. The dead zone
– symmetrical around the zero point – can be set using the value zoneBorder.
x for x<=-zoneborder
0 for -zoneBorder < x < +zoneBorder
x for x>=+zoneborder
Graphical representation
© Siemens AG 2019 All rights reserved
5.4.10 LCon_AverageValue
AverageValue
Functionality
The function block calculates the moving average value (averageValue) of the
input values that are entered. Each time the block is called, the value (x) currently
present is saved in an array. The values stored in the array are deleted upon
deactivation of the function block.
The function block is activated via the input enable and calculates values from that
instant. The output maxValueReached is set if the amount of values in an array
reaches the defined number sizeOfArray
Error messages
Error messages are indicated by the status of the outputs error and errorID:
error = TRUE and errorID <> 16#0000_0000.
Error ID Description
16#0000_0000 No error
16#0105_8003 Entry number too small
16#0105_8004 Entry number too big
16#0105_8005 Invalid configuration data
© Siemens AG 2019 All rights reserved
5.4.11 LCon_PID
PID controller with actual value smoothing and optional D component in the actual
value branch, the function block has to be called in a cyclic interrupt, e.g. OB30.
Function block ID: 1105
PID
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:
© Siemens AG 2019 All rights reserved
𝑡
𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛𝑉𝑎𝑙𝑢𝑒 = ((𝑎𝑐𝑡𝑢𝑎𝑙𝑉𝑎𝑙𝑢𝑒 ⋅ 𝑎𝑐𝑡𝑢𝑎𝑙𝑉𝑎𝑙𝑢𝑒𝐹𝑎𝑐𝑡𝑜𝑟) + 𝑎𝑐𝑡𝑢𝑎𝑙𝑉𝑎𝑙𝑢𝑒𝑂𝑓𝑓𝑠𝑒𝑡) ⋅ (1 − 𝑒 −𝑇 )
− 𝑠𝑒𝑡𝑝𝑜𝑖𝑛𝑡𝑉𝑎𝑙𝑢𝑒
The result is the system deviationValue (after the deadband) and is then multiplied
with the proportional coefficient propGain. The result is transferred to the integrator
– and optionally to the D component. The settable integral time integTime as well
as the time constant of the D component derivTime (optional) define the controller
behavior.
Component Calculation
P component pOutValue[n] = propGain ⋅ deviationValue[n]
I component 𝑖𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛] = 𝑖𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛 − 1]
𝑝𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛] + 𝑝𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛 − 1]
+( )
2
𝑐𝑦𝑐𝑙𝑒𝑇𝑖𝑚𝑒
⋅( )
𝑖𝑛𝑡𝑒𝑔𝑇𝑖𝑚𝑒
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.
Component Calculation
D component 𝑑𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛]
(if activated) = (𝑝𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛] − 𝑝𝑂𝑢𝑡𝑉𝑎𝑙𝑢𝑒[𝑛 − 1])
𝑑𝑒𝑟𝑖𝑣𝑇𝑖𝑚𝑒
⋅( )
𝑐𝑦𝑐𝑙𝑒𝑇𝑖𝑚𝑒
Timing Diagram
© Siemens AG 2019 All rights reserved
Block Diagram
© Siemens AG 2019 All rights reserved
Nesting Depth : 4 from the time delay interrupt, time-of-day interrupt, cyclic
NOTE
interrupt, hardware interrupt, time error interrupt, or diagnostic error interrupt OB.
Due to this limitation, the called FB’s are re-written in the calling FB so that the
nesting depth reduces by 1.
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1105_8001 The function block is not called in a cyclic
interrupt, e.g. OB30.
16#1105_8005 Invalid configuration data:
upperlimit < lowerlimit
© Siemens AG 2019 All rights reserved
Technology controller based on a PID controller for use as tension or dancer roll
position controller in closed-loop winder or material web controls
The function block has to be called in a cyclic interrupt, e.g. OB30.
Function block ID: 1108
TPID
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 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 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.
Setpoint ramping
The setpoint ramp-function generator is used to avoid setpoint steps in the setpoint
channel. The setpoint ramp-function generator is configured using the parameters
setRampTime and setNominalValue, whereby setNominalValue defines the
reference value for the ramp-up or ramp-down time. The function is always active,
if enable = TRUE. If openLoopCtrl = FALSE, enable = FALSE and busy = TRUE
(switch-off phase), then the setpoint is internally set to the actual value.
The ramp times are internally limited to the cycle time.
Controller functionality
The controller setpoint is provided via the input setValue, the actual value via the
actValue input. The setpoint channel includes a settable setpoint ramp-function
generator, via which the setpoint is routed; the effective setpoint can be monitored
at output RFGSetpointValue.
The control algorithm used corresponds to that described in function block PID.
Kp adaptation
© Siemens AG 2019 All rights reserved
𝑒𝑓𝑓𝑒𝑐𝑡𝑖𝑣𝑒𝐾𝑝 = 𝐾𝑝1
𝑒𝑓𝑓𝑒𝑐𝑡𝑖𝑣𝑒𝐾𝑝 = 𝑘𝑝2
Timing diagram
© Siemens AG 2019 All rights reserved
Block diagram
© Siemens AG 2019 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#1108_8005 Invalid configuration data:
setNominalValue <= 0.0
upperlimit < lowerlimit
© Siemens AG 2019 All rights reserved
The function block is used as an interface between the PLC program and a drive
from the SINAMICS drive family. The function block enables the full control of the
respective drive.
Function block ID: 3101
Real additiveTorque
Real upperTorqueLimit
Real lowerTorqueLimit
Real kpAdaption
Real referenceSpeed
Real referenceTorque
HW_SUBMODULE HW_Address_Input
HW_SUBMODULE HW_Address_Output
HW_SUBMODULE HWAddressAdditionalTelIn
HW_SUBMODULE HWAddressAdditionalTelOut
Int baseTelegram
Bool Tel750
Int OBnumber
Real tCycle
TRUE: ReleaseMtrBrake
FALSE: Brake controlled by brake control
IN infeedOperatio Bool FALSE TRUE: Infeed enabled DC bus ready
n
IN speedSetpoint Real 0.0 [rpm] Speed setpoint
IN additiveTorque Real 0.0 [Nm] Torque precontrol, additive torque
IN upperTorqueLi Real 0.0 [Nm] Upper Torque Limit
mit
IN lowerTorqueLi Real 0.0 [Nm] Lower Torque Limit
mit
IN kpAdaption Real 100.0 [%] Speed controller gain adaption value.
At 100% the effective Kp = p1460 in the drive. (only
S120)
IN referenceSpee Real 100.0 [rpm] Normalization speed= (P2000) in the drive
d Value is saved upon rising edge of enable
IN referenceTorq Real 1.0 [Nm] Normalization torque= (P2003) in the drive
ue Value is saved upon rising edge of enable
IN HW_Address_ HW_SUB 16#0000 Drive Logical IO address for reading BaseTel (as read
Input MODULE in the hardware config)
IN HW_Address_ HW_SUB 16#0000 Drive Logical IO address for writing BaseTel (as read
Output MODULE in the hardware config)
IN HWAddressAd HW_SUB 16#0000 Drive Logical IO address for reading AdditionalTel (as
ditionalTelIn MODULE read in the hardware config)
IN HWAddressAd HW_SUB 16#0000 Drive Logical IO address for writing AdditionalTel (as
ditionalTelOut MODULE read in the hardware config)
IN baseTelegram Int 999 999: UserDefTel (8/8). Structure as shown in telegram
structure (compatible with previous version)
2: StandardTel2 is used
3: StandardTel3 is used. Only the PZD of telegram 2
are evaluated! Caution: The STW_G1 could be
overwritten!
OUT faultCode DInt 0 Drive fault code, refer to drive manual for more
information
OUT speedActual Real 0.0 [rpm] Speed actual value(r63 from the drive)
OUT torqueActual Real 0.0 [Nm] Total actual torque (r80 from the drive)
OUT torqueActualFt Real 0.0 [ft/lbs] Torque actual torque
lbs
OUT torqueActualP Real 0.0 [%] Torque actual value in percent of nominal torque
ercent
Functionality
This function block is utilized to interface and control the drive from the PLC
program. Through this function block the programmer is able to enable, disable,
open brake (if supplied), adjust speed, adjust torque, adjust the Kp and adjust
torque pre-control if required. The programmer also has access to standard status
bits and values.
If torque limiting is active, the function block monitors the actual speed of the drive
to avoid uncontrolled acceleration in the opposite direction what the set point
specifies. This can happen if the upper limit is negative or lower torque limit is
positive while drive is operating at the torque limit. If the drive accelerates beyond
50 rpm in opposite direction the drive will be stopped with set point zero and the
torque limits will be opened.
Control interface
This function block interfaces with an electronic drive over PROFIBus or
PROFINet. There are different communication possibilities between the drive and
the PLC:
• If "baseTelegram" = 999, then the communication is based on an 8-word input
and 8-word output telegram. The structure is explained in the next subchapter
"Telegram structure".
• If "baseTelegram" = 2 or 3, then the communication is based on the standard
telegram 2 or 3. This does not send / receive any moment data. If this data is
required, "Tel750" must also be set to TRUE and the hardware address must
be connected via "HWAddressAdditionalTelIn -/out". A Kp adaptation is not
possible.
NOTICE If telegram 3 is used, the encoder data is read out but not
forwarded to the output.
CAUTION when using an encoder:
G1_STW is set to 0!
Control Telegram
Control Word 1
Control Word 2
Status Telegram
Element Offset Data Description Interconnected
(bytes) type to
sw1 0 WORD Status word 1 See status Word
1
actualspeed 2 DINT Actual speed r63
1073741824=100% of the
reference speed (p2000)
sw2 6 WORD Status word 2 See Status
Word 2
actualTorque 8 INT Actual torque r79
faultNum 10 INT Actual fault code r2131
word07 12 WORD not used -
word08 14 WORD not used -
Status Word 1
Element Offset Data Description Interconnected
(bytes) type to
rdyToPwr 0 BOOL Ready to Switch ON r899.0
rdyToOp 1 BOOL Ready to operate r899.1
© Siemens AG 2019 All rights reserved
Status Word 2
Element Offset Data Description Interconnected
(bytes) type to
dds0 0 BOOL DDS select bit 0 r837.0
dds1 1 BOOL DDS select bit 1 r837.1
bit02 2 BOOL not used r837.2 in case of
S120
bit03 3 BOOL not used r837.3 in case of
S120
bit04 4 BOOL not used r837.4 in case of
S120
Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No warning
16#3101_4009 Communication error while reading from bus system
© Siemens AG 2019 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#3101_8005 Invalid configuration data:
logAddr <= 0
referenceSpeed <= 0.0
referenceTorque <= 0.0
16#3101_8065 Torque Limits may not be plausible anymore; web break could cause this
problem. Axis runs in the opposite direction too fast. Reaction: brake with
full
torque.
5.5.2 LCon_SetpointChannel
SetpointChannel
Functionality
The block must be configured with the proper total gear ratio, diameter of driven roll
and max velocity. This function block consistently checks for plausible parameters
and will display an error with corresponding errorId should invalid data be entered
at the rising edge of enable.
With the enableRFG set to true, the velocity1, velocity2 and velocity3 are summed
together and sent to the input of the RFGJ with the configuration data and ramp
control functions for holding, rounding, and ramp times entered at this function
block. With a False entered at enableRFG the input is set to zero and the ramp is
kept enabled until the ramped signal is zero. velocity4, Draw (multiplier) and the
tension correction – velocityPID – inputs are alwaysactive unless jog is requested
and the ramp output is zero.
RFG operation has priority over jog. The jog commands must be exclusive
commands. With the enableRFG false, the jogPos set to true and jogNeg is false,
the jogVelocity is set as the velocity setpoint. Additionally, with the enableRFG
false, the jogNeg set to true and jogPos is false, a negative jogVelocity is set as the
velocity setpoint. The jog velocity, summed velocity setpoints 1-4 times the draw
factor are limited to +/- max velocity value. The tension velocity is added after this
limit to allow tension or any other superimposed control even at 100% velocity.
The function block will calculate the correct drive speed setpoint based upon the
diameter (meter or inch) and gear ratio.
© Siemens AG 2019 All rights reserved
𝑠𝑒𝑡𝑉𝑒𝑙𝑜𝑐𝑖𝑡𝑦
𝑠𝑒𝑡𝐷𝑟𝑖𝑣𝑒𝑆𝑝𝑒𝑒𝑑 = ⋅ 𝑔𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜
𝑑𝑖𝑎𝑚𝑒𝑡𝑒𝑟 ⋅ 𝑃𝐼
The function block will calculate the correct Shaft actual speed based upon the
actual motor
speed and gear ratio.
𝑎𝑐𝑡𝐷𝑟𝑖𝑣𝑒𝑆𝑝𝑒𝑒𝑑
𝑎𝑐𝑡𝑆ℎ𝑎𝑓𝑡𝑆𝑝𝑒𝑒𝑑 =
𝑔𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜
The function block will check for zero speed if the absolute actual speed is less
than 0.1 rpm.
Unit of measures
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Table 5-2
ErrorID Description
16#0000_0000 No error
16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB30
16#3102_8005 Invalid configuration data:
maxVelocity <= 0.0
gearRatio = 0.0
The configuration data are checked for plausibility at the rising edge of
enable
© Siemens AG 2019 All rights reserved
5.5.3 LCon_FrictionMeasuement
The function block is used to record a friction characteristic of the drive. The
characteristic can then be used as a component of torque precontrol.
The function block has to be called in a cyclic interrupt, e.g. OB30.
Function block ID: 3103
FrictionMeasurement
Functionality
The function block measures the friction characteristic (speed / torque breakpoints)
of a specific mechanical system. Speed setpoints are taken and torque values are
saved in the specified data area referenced by an array. The data structure
contains breakpoints of the characteristic (x value: speed, y value: torque), while
the speed setpoint value has to be specified before starting the function block.
The user has the possibility to let the function block preassign the speed values
into an array. For this the input parameter maxSpeed must be unequal to zero. The
speed values will be distributed evenly according to the length of the data block.
The first entry will always be zero speed with zero torque.
The function block is started using the input execute. Once started, speedSetpoint
outputs the drives speed based on the values of the breakpoint table. If the input
warmupTime > 0.0, the drive is moving for this defined period of time at the
maximum speed before starting the measurement of the corresponding torque
values.
The actual torque value of the drive has to be connected to the actualTorque input
of the function block. The torque values are averaged with defined number of
samplings specified by input valueNumber. The ramp times for changing the speed
setpoint are specified using the input ramptime. If the sequence is active, done =
FALSE and busy = TRUE. If finished, done = TRUE and busy = FALSE.
If an error occurs during the sequence, 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 setpoint ramped to zero.
Time Diagram
© Siemens AG 2019 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#3103_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#3103_8003 Less than two pairs of values in the breakpoint table or uneven entries in
the table.
ErrorID Description
16#3103_8004 More than twenty pairs of values in the breakpoint table or uneven entries
in the table.
16#3103_8005 Invalid configuration data
© Siemens AG 2019 All rights reserved
This function block is used to control a converting line sectional drive from the PLC
program. The function block was designed to handle the requirements of a tension
or ratio adjusted driven section. The function block has to be called in a cyclic
interrupt, e.g. OB30.
Function block ID: 7101
SectionalDrive
Functionality
The configuration data also has parameters for torque precontrol. Torque
precontrol is necessary for torque based tension control modes and is optional
for speed based tension control modes. Speed based tension control modes
with the _HD (high dynamic) prefix utilize torque precontrol.
With the enable set to true and driveReadyForMotion and Cntrlenable then the
CntrlSetpoint will be ramped up based on configuration data. The Tension
controller correction value will be added to the total speed setpoint or additional
torque, scaled and sent to the drive using the driveControl function block as
required.
Function block output parameters allow the user to view the calculated surface
velocity of the section (actVelocity), the sections actual shaft speed
(actshaftSpeed), motor actual speed in RPM (actdriveSpeed), motor torques
(driveTorqueActual, driveTorqueActualFtlbs, driveTorqueActualPercent) and
pertinent PID data.
The following table shows the different tension operating modes and the orientation
of velocity, tension and torque. At commissioning of the application it must be
ensured that the direction convention and signs of the process variables are
aligned. Eventually it might be necessary to change the direction of rotation in the
drive system.
Block diagram
© Siemens AG 2019 All rights reserved
Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
16#7101_4005 The table of entered values is not monotonically (steadily) increasing -> no
matching value found
16#7101_4008 The table of entered values is not monotonically (steadily) increasing -> 2
values are identical
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#3101_8005 Invalid configuration data: (DriveControl)
© Siemens AG 2019 All rights reserved
HW_Address_Input <= 0
HW_Address_Output <= 0
referenceSpeed <= 0.0
referenceTorque <= 0.0
16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
(SetpointChannel)
16#3102_8005 Invalid configuration data: (SetpointChannel)
maxVelocity <= 0.0
gearRatio = 0.0
The configuration data are checked for plaisubility at the rising edge of
enable.
16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB30. (TPID)
16#1108_8005 Invalid configuration data: (TPID)
setNominalValue <= 0.0
upperlimit < lowerlimit
16#6101_8003 Less than two pairs of values in the breakpoint table or uneven number of
points.
(Torque Precontrol, friction table)
16#6101_8004 More than twenty pairs of values in the breakpoint table or uneven number
of points.
(Torque Precontrol, friction table)
16#6101_8005 One or more configuration values are invalid. (Torque Precontrol)
gearRatio <= 0.0
Jfix < 0.0
Jmandel < 0.0
Jmot < 0.0
typeOfDrive < 0
typeOfDrive > 1
The configuration data are checked for plaisubility at the rising edge of
enable.
16#6101_8006 Invalid diameter value (Torque Precontrol)
diamActVal <= 0.0
ErrorID Description
16#7101_8001 The function block is not called in a cyclic interrupt, e.g. OB30
16#7101_8005 Invalid configuration data
controleMode < 0
controlMode > 6
typeOfDrive < 0
typeOfDrive > 1
sectionalConfig.diameter <= 0.0
sectionalConfig.maxVelocity = 0.0
sectionalConfig.gearRatio = 0.0
sectionalConfig.referenceSpeed = 0.0
sectionalConfig.referenceTorque = 0.0
sectionalConfig. HW_Address_Input <= 0
sectionalConfig.HW_Address_Output <= 0
The configuration data are checked for plaisubility at the rising edge of
enable.
© Siemens AG 2019 All rights reserved
5.6.2 LCon_SectionalConfigSetup
This function is used to enter individual configuration data into a sectional drive
configuration data structure used by the sectional drive function block. The function
block can be called in any task.
Function ID: 6001
SectionalConfigSetup
BOOL metricUnits SectionalConfig SectionalConfigType
BOOL holdIntChannel
BOOL setIntChannel
REAL driveControlMode
REAL jogVelocity
REAL speedMatchRampTime
REAL diameter
REAL KpAdaptionValue
REAL x1
© Siemens AG 2019 All rights reserved
REAL Kp1
REAL x2
REAL Kp2
REAL limRampTime
REAL setNominalValue
REAL setRampTime
REAL integTime
REAL derivTime
REAL
filterTime
REAL
intSetValue
REAL
deadBand
REAL
outValueFactor
REAL
upperLimit
REAL
lowerLimit
REAL
overrideVelocity
REAL
TensionAdjustment
REAL
tensionReference
REAL
Jfixed
REAL
JMandrel
REAL
JMotor
REAL
frictionAdjustment
REAL
maxVelocity
REAL
gearRatio
REAL
referenceSpeed
REAL
referenceTorque
WORD
HW_Address_Input
WORD
HW_Address_Output
channel to intSetValue
IN derivControlMode BOOL FALSE FALSE: TPID – D-Action acts on
system deviation
TRUE: TPID - D-Action acts in the
actual value
IN jogVelocity REAL 10.0 [ LU / min ] Jog velocity setpoint
(no ramp)
IN speedMatchRamp REAL 0.5 [ s ] Ramp time for acceleration to
Time line speed
IN diameter REAL 1.0 [ m or inch ] Diameter value
IN kpAdaptionValue REAL 0.0 TPID - Kp-Adaption signal
IN x1 REAL 0.0 TPID - Abscissa-1 for KP-
adaption(1)
IN kp1 REAL 1.0 TPID - KP-adaption point(1)
IN x2 REAL 0.0 TPID - Abscissa-2 for KP-
adaption(2)
IN kp2 REAL 1.0 TPID - KP-adaption point(2)
IN limRampTime REAL 1000.0 [ms] TPID - Ramp-up time for pid
controller output limiting
IN setNominalValue REAL 100.0 TPID - Normalization value for
setpoint RFG
IN setRampTime REAL 1000.0 [ms] TPID - Ramp up time for
setpoint RFG
IN integTime REAL 2000.0 [ ms ] TPID - Integration time
constant
IN derivTime REAL 0.0 [ ms ] TPID - Differentiation time
constant
IN filterTime REAL 10.0 [ ms ] TPID - Actual value fitler time
constant
IN intSetValue REAL 0.0 TPID - Integrator set value
IN deadBand REAL 0.0 TPID - Deadband parameter
IN outValueFactor REAL 1.0 TPID - Output scaling factor
Functionality
5.6.3 LCon_TorquePrecontrol
Real JFix
© Siemens AG 2019 All rights reserved
Real JMandrel
Real JMot
Real gearRatio
Real frictionAdjustment
Real tensionAdjustment
accelerationAdjustm
Real
ent
Int sizeOfArray
"LCon_BreakPointTable" xn_speedValues
"LCon_BreakPointTable" yn_torqueValues
Functionality
The torque pre-control outputs the following torque setpoints to pre-control the
drive:
1. A torque setpoint as a function of the acceleration setpoint of the
machine/system ramp- function generator and the inertia
2. Friction torque setpoint is generated depending
on the drive speed using a characteristic.
3. Tension torque based on the tension setpoint and the diameter
Calculations
The function block FBTorquePrecontrol calculates the following physical quantities:
Quantity Formula
Total 𝐽𝑀𝑎𝑛𝑑𝑟𝑒𝑙
𝑇𝑜𝑡𝑎𝑙𝐼𝑛𝑒𝑟𝑡𝑖𝑎 = + 𝐽𝑀𝑜𝑡 + 𝐽𝐹𝑖𝑥
moment of 𝐺𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜 2
inertia
Angular 𝑙𝑖𝑛𝑒𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛 ⋅ 𝐺𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜
𝛼 = 2⋅
acceleration 𝑑𝑖𝑎𝑚𝑒𝑡𝑒𝑟
of the drive
Acceleration 𝑀 𝑎𝑐𝑐𝑒𝑙 = 𝑇𝑜𝑡𝑎𝑙𝐼𝑛𝑒𝑟𝑡𝑖𝑎 ⋅ 𝛼
torque
Friction 𝑀 𝑓𝑟𝑖𝑐𝑡 = 𝑓(𝑛)
torque
Tension 𝑡𝑒𝑛𝑠𝑖𝑜𝑛𝑆𝑒𝑡𝑝𝑜𝑖𝑛𝑡 ⋅ 𝑡𝑒𝑛𝑠𝑖𝑜𝑛𝐴𝑑𝑗𝑢𝑠𝑡𝑚𝑒𝑛𝑡 ⋅ 𝑑𝑖𝑎𝑚𝑒𝑡𝑒𝑟
𝑀 𝑡𝑒𝑛𝑠𝑖𝑜𝑛 =
torque 2 ⋅ 𝐺𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜
This friction torque is internally determined using the function block TableChar. The
user is responsible for providing valid and sensible values in the appropriate data
fields. If the factor FrictionAdjustment is set to 0.0, TableChar is not called and
therefore a frictional torque is not added.
The pre-control torque of the motor, the sum of all pre-control torques and the
tension torque are calculated depending on the drive type. The total torque is
always the sum of the preCtrlMotor and tensionTorque.
Block diagram
© Siemens AG 2019 All rights reserved
Warning Messages
Warnings are indicated by the status of the outputs error and errorID:
error = FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
16#6101_4005 The table of entered values is not monotonically (steadily) increasing -> no
matching value found
16#6101_4008 The table of entered values is not monotonically (steadily) increasing -> 2
values are identical
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#6101_8003 Less than two pairs of values in the breakpoint table or uneven number of
© Siemens AG 2019 All rights reserved
points.
16#6101_8004 More than twenty pair of values in breakpoint table
16#6101_8005 One or more configuration values are invalid.
gearRatio <= 0.0
Jfix < 0.0
Jmandel < 0.0
Jmot < 0.0
typeOfDrive < 0
typeOfDrive > 1
The configuration data are checked for plaisubility at the rising edge of
enable.
This function block is used to calculate the diameter of a winder by dividing the
material velocity by the winding shaft speed.
The function block has to be called in a cyclic interrupt, e.g. OB30.
Function block ID: 5101
DiamCalcDivision
REAL maxDia
REAL minLineVelocity
REAL minShaftSpeed
REAL lineFilterTime
REAL shaftFilterTime
REAL diameterFilterTime
INT OBnumber
REAL tCycle
REAL diameter REAL
Functionality
The function block determines the actual diameter value (diameter) of the roll being
wound (or unwound) using the input quantities:
• Web velocity (lineVelocity) - the web velocity is the setpoint velocity of the
machine and the velocity with which the main drive moves the material web. In
exceptional cases, it is possible to use the actual value from a tachometer
measuring the web speed.
• Shaft speed of the mandrel (shaftSpeed) – Actual speed of the winder shaft.
The actual motor speed is converted to the roll shaft (by the gear ratio) and is
used to calculate the diameter.
The calculation is based on the 𝐷 = 𝑣/(𝜋 ⋅ 𝑛) formula.
The holdDiameter input will pause diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diameterSetvalue as the diameter as long as the
actual shaft speed is below minimum shaft speed. The set value is limited by
the minimum and maximum diameter. With actual line velocity above line and
actual shaft speed above minimum and not hold, the diameter is calculated. The
result of the division is limited and smoothed.
Block diagram
© Siemens AG 2019 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#5101_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#5101_8005 Invalid configuration data:
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
minLineVelocity <= 0.0
minShaftSpeed <= 0.0
The configuration data are checked for plausibility at the rising edge of
enable.
5.7.2 LCon_DiamCalcIntegral
LCon_DiamCalcIntegral
Real minDia
Real maxDia
Real minLineVelocity
Real minShaftSpeed
Real lineFilterTime
Real shaftFilterTime
measuringRevolution
Real
Count
Real firstDiameterOutput
Real diameterOutputRate
Int OBnumber
Real tCycle
diameter
Real Real
diameter is calculated
IN diameterOutputRate REAL 1.0 [ - ] Number of rotations after next
diameter value is calculated
IN OBnumber INT 30 Calling Cyclic Interrupt OB number
IN tCyle REAL 0.0 [ms] Cycle time the FB is called
IO diameter REAL - [m or inch] Diameter
OUT busy BOOL FALSE FALSE: Function Block inactive
TRUE: Function Block active
OUT error BOOL FALSE FALSE: No Error
TRUE: Error has occurred
OUT errorID DWORD 16#000 Error identification
0_0000 errorID<16#5103_8000:Warning
errorID>=16#5103_8000:Error
OUT webThickness REAL 0.0 [m or in] Calculated web thickness in
units
OUT atMinDia BOOL FALSE At minimum diameter
OUT atMaxDia BOOL FALSE At maximum diameter
OUT diamIsHold BOOL FALSE Diameter calculation is stopped
Functionality
The diameter calculator determines the actual diameter value (diameter) of the roll
being wound (or unwound) using the input quantities:
• Web velocity (lineVelocity) - the web velocity is the setpoint velocity of the
machine and the velocity with which the main drive moves the material web. In
exceptional cases, it is possible to use the actual value from a tachometer
measuring the web speed.
• Shaft speed of the mandrel (shaftspeed) – Actual speed of the winder shaft.
The actual motor speed is converted to the roll shaft (by the gear ratio) and is used
to calculate the diameter.
The integral diameter calculation is 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 by measuringRevolutionCount. This is to
minimize the disturbing effect of processing just individual values. The following
applies:
Diameter = 2 ⋅ s/𝜑
The holdDiameter input will pause diameter calculation and hold the resulting
diameter at the current value when set to true. The setDiameter input writes the
© Siemens AG 2019 All rights reserved
To optimize the diameter signal quality a floating averaging over a defined number
of rotations (measuringRevolutionCount) is used internally.
The floating diameter calculation can be configured by the following configuration
parameter:
• MeasuringRevolutionCount
• FirstDiameterOutput
• DiameterOutputRate
After rising edge of input “enable” the first calculated diameter will be output after
the number of revolutions configured in “FirstDiameterOutput”.
After the first diameter output the calculated diameter will be refreshed cylic after
the number of revolutions configured in “DiameterOutputRate”.
The calculated diameter will be averaged over the number of revolutions
configured in “MeasuringRevolutionCount”, 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:
MeasuringRevolutionCount
bufferdept h =
DiameterOutputRate
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
“MeasuringRevolutionCount” (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.
Example 1:
MeasuringRevolutionCount := 4
DiameterOutputRate := 1
FirstDiameterOutput := 2
© Siemens AG 2019 All rights reserved
MeasuringRevolutionCount
FirstDiameterOutput
DiameterOutputRate
effective averaging:
Example 2:
MeasuringRevolutionCount := 4
DiameterOutputRate := 1
FirstDiameterOutput := 0.5
MeasuringRevolutionCount
FirstDiameterOutput
DiameterOutputRate
effective averaging:
Example 3:
© Siemens AG 2019 All rights reserved
MeasuringRevolutionCount := 5
DiameterOutputRate := 2
FirstDiameterOutput := 1
MeasuringRevolutionCount
FirstDiameterOutput
DiameterOutputRate
effective averaging:
1
1st diameter output
3
2nd diameter output
5
3rd diameter output
6
4th diameter output
In addition in every measuring interval based on the diameter change the actual
material thickness is also calculated, e.g. for a rest length calculation.
Block Diagram
DiamCalcIntegral
maxDia
metricUnits Diameter = 2 * ( s / )
setDiameter error
12 0
diameterSetValue
1 1
errorId
P 0
Last Raw D value
l diameter
linevelocity X Raw D value
a T
SV 1
u S
0 webThickness
lineFilterTime
s
2
minLineVelocity
a 0 atMaxDia
b X Number of revolutions
[rad/s] for calculation reached
minShaftSpeed
i T
x Latch raw value atMaxDia
SV
[rad] ≥
l S y
i
shaftspeed
t 0
shaftFilterTime
y 1
Last Raw D value
2 0
Diameter
OutputRate
holdDiameter
minDia
© Siemens AG 2019 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#5103_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#5103_8005 Invalid configuration data:
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
measuringRevolutionCount <= 0.0
measuringRevolutionCount < diameterOutputRate
minLineVelocity <= 0.0
minShaftSpeed <= 0.0
The configuration data are checked for plaisubility at the rising edge of
enable.
16#5103_8006 Error during floating diameter calculation:
Calculated buffer depth is bigger as the configured maximum value
(MAX_LENGHTH_AVERAGE_VALE)
5.7.3 LCon_DiamCalcAddition
This function block is used to calculate the diameter of a winder by adding twice
the material thickness per winding shaft revolutions. The function block has to be
called in a cyclic interrupt, e.g. OB30.
Function block ID: 5102
DiamCalcAddition
REAL minShaftSpeed
REAL shaftSpeed
REAL shaftFilterTime
INT OBnumber
REAL tCycle
REAL diameter REAL
Functionality
The diameter calculator determines the actual diameter value (diameter) of the roll
being wound (or unwound) using the input quantities:
• Web Thickness - the actual web (material) thickness.
• Shaft speed of the mandrel (shaftSpeed) – Actual speed of the winder shaft.
The actual motor speed is converted to the roll shaft (by the gear ratio) and is used
to calculate the diameter.
The holdDiameter input will pause diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diametersetvalue as the diameter as long as the
actual shaft speed is below minimum shaft speed. The diameter set value is
limited.
With the actual shaft speed above minimum and not hold, the diameter is
calculated by integrating the diameter change rate based on the web thickness and
mandrel speed. The result of the integration is limited and smoothed.
This calculation method relies very much on the accuracy of the material
NOTE
thickness and the starting diameter value. Any deviation between the actual
effective material thickness and the set material thickness will lead to an invalid
diameter which error will get bigger after each revolution. An inaccurate starting
value will remain as an offset between the actual and the calculated diameter.
This calculation mode is mostly useful for metals where air entrapment and
inwound tension does not influence the effective material thickness.
Block diagram
© Siemens AG 2019 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#5102_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#5102_8005 Invalid configuration data:
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
webThickness <= 0.0
minShaftSpeed <= 0.0
typeOfWinder < 0
typeOfWinder > 0
The configuration data are checked for plaisubility at the rising edge of
enable.
5.7.4 LCon_DiamCalcWebLength
This function block is used to calculate the diameter of a winder based on the
length of the material that is winded up and the material thickness. The function
block has to be called in a cyclic interrupt, e.g. OB30, OB95.
Function block ID: 5106
LCon_DiamCalcWebLength
Int typeOfWinder
Real lineVelocity
© Siemens AG 2019 All rights reserved
Real minDia
Real maxDia
Real minLineVelocty
Real lineFilterTime
Real webThickness
Int OBnumber
Real tCycle
diameter
Real Real
Functionality
The diameter calculator determines the actual diameter value of the roll using the
following input quantities:
• Web Thickness - the actual web (material) thickness.
• The length of the winded material
With the help of the actual velocity of the master axis the length of the rewinded or
unwinded material on the core is calculated. In addition with the material thickness
the current diameter of the winder can be calculated.
The holdDiameter input will pause the diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diametersetvalue as the diameter as long as the
actual line speed is below minimum line speed setpoint. The diameter set value is
limited.
With the actual line speed above minimum and not hold, the diameter is calculated
by integrating the master speed in addition with the material thickness. The input
velocity of the master axis can be smoothed before the integration.
This calculation method relies very much on the accuracy of the material
NOTE
thickness and the starting diameter value. Any deviation between the actual
effective material thickness and the set material thickness will lead to an invalid
diameter which error will get bigger after each revolution. An inaccurate starting
value will remain as an offset between the actual and the calculated diameter.
This calculation mode is mostly useful for metals where air entrapment and
inwound tension does not influence the effective material thickness.
DiamCalcWebLength
enable
error
maxDiam
errorID
metricUnits
holdDiameter
P busy
12
l atMinDia
diameterSetValue
a atMaxDia
setDiameter u 1
diamter
typeOfWinder s
lineFilterTime i
© Siemens AG 2019 All rights reserved
lineVelocity
b
i X F(x)
minLineVelocity
L X
tCycle i -1
OBnumber t
webThickness y
minDiam
Error Messages
ErrorID Description
16#0000_0000 No error
16#5106_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#5106_8005 Invalid configuration data:
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
webThickness <= 0.0
minShaftSpeed <= 0.0
typeOfWinder < 0
typeOfWinder > 0
The configuration data are checked for plaisubility at the rising edge of
enable.
5.7.5 LCon_WITorquePrecontrol
Real diamMax
Real width
Real fillFactor
Real JFix
Real JMandrel
Real JMot
Real gearRatio
Real frictionAdjustment
Real tensionAdjustment
Real accelerationAdjustment
Int sizeOfArray
"LCon_BreakPoint
xn_speedValues
Table"
"LCon_BreakPoint
yn_torqueValues
Table"
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
• The torque pre-control outputs the following torque setpoints to pre-control the
winder drive:
5. A torque setpoint as a function of the acceleration setpoint of the
machine/system ramp-function generator and the inertia
6. Friction torque setpoint is generated depending on the shaft speed of the
winder using a characteristic.
7. Tension torque based on the tension setpoint and the diameter
Calculations
The function block FB WITorquePrecontrol calculates the following physical
quantities:
Quantity Formula
Mass of the 𝜋 ⋅ 𝐷𝑒𝑛𝑠𝑖𝑡𝑦 ⋅ 𝑤𝑖𝑑𝑡ℎ ⋅ (𝑑𝑖𝑎𝑚𝐴𝑐𝑡𝑉𝑎𝑙 2 − 𝑑𝑖𝑎𝑚𝑀𝑖𝑛2 )
wound material 𝑀𝑎𝑠𝑠 =
4
Moment of inertia 𝑑𝑖𝑎𝑚𝐴𝑐𝑡𝑉𝑎𝑙 2 + 𝑑𝑖𝑎𝑚𝑀𝑖𝑛2
of the 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝐼𝑛𝑒𝑡𝑖𝑎 = 𝑀𝑎𝑠𝑠 ⋅
8 ⋅ 𝐺𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜 2
wound material
Total moment of 𝐽𝑀𝑎𝑛𝑑𝑟𝑒𝑙
𝑇𝑜𝑡𝑎𝑙𝐼𝑛𝑒𝑟𝑡𝑖𝑎 = + 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝐼𝑛𝑒𝑟𝑡𝑖𝑎 + 𝐽𝑀𝑜𝑡 + 𝐽𝐹𝑖𝑥
inertia 𝐺𝑒𝑎𝑟𝑅𝑎𝑡𝑖𝑜 2
This friction torque is internally determined using the function block TableChar. The
user is responsible for providing valid and sensible values in the appropriate data
fields. If the factor FrictionAdjustment is set to 0.0, TableChar is not called and
therefore a frictional torque is not added.
The pre-control torque of the motor, the sum of all pre-control torques and the
tension torque are calculated depending on the winder type. The total torque is
always the sum of the preCtrlMotor and tensionTorque.
The winding mode is always defined assuming a positive line speed. If the
leading value becomes negative the winding mode will be inverted automatically (a
rewinder becomes an unwinder and vice versa). The same applies for winding from
above and from below. This inversion is automatic.
Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
16#4102_4005 The table of entered values is not monotonically (steadily) increasing -> no
matching value found
16#4102_4008 The table of entered values is not monotonically (steadily) increasing -> 2
values are identical
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
© Siemens AG 2019 All rights reserved
16#4102_8003 Less than two pairs of values in the breakpoint table or uneven number of
points.
16#4102_8004 More than twenty pairs of values in the breakpoint table or uneven number
of points.
16#4102_8005 One or more configuration values are invalid – Check Min values, max
values and
other settings.
gearRatio <= 0.0
density < 0.0
diamMin <= 0.0
diamMax <= diamMin
width < 0.0
fillFactor <= 0.0
Jfix < 0.0
Jmandrel < 0.0
Jmot < 0.0
typeOfWinder < 0
typeOfWinder > 3
The configuration data are checked for plaisubility at the rising edge of
enable.
16#4102_8006 Invalid diameter
diamActVal <= 0.0
diamActVal < diamMin
5.7.6 LCon_RestLengthCalc
Calculation of the rest length of the coil. The function can be called in any task.
Function ID: 4001
RestLengthCalc
Functionality
Depending on the roll parameters that have been entered, the function calculates
the residual length of the material. 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.
𝜋
𝑅𝐸𝑇𝑉𝐴𝐿 = ⋅ (𝑎𝑐𝑡𝑢𝑎𝑙𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 2 − 𝑡𝑎𝑟𝑔𝑒𝑡𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 2 ) + 𝑜𝑓𝑓𝑠𝑒𝑡
4 ⋅ 𝑤𝑒𝑏𝑡ℎ𝑖𝑐𝑘𝑛𝑒𝑠𝑠
5.7.7 LCon_RestDiameterCalc
RestDiameterCalc
Functionality
The function uses the input parameters to calculate the target diameter 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
Unwinder
5.7.8 LCon_Taper
Taper
INT NoOfBreakpoints
breakPointTable tensionValues
breakPointTable diametervalues
Functionality
© Siemens AG 2019 All rights reserved
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 rewinding 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 for the dancer system interface, e.g. analog
output. The block is activated using the enable input. Depending on the mode
selected at input tensionTaperMode, the tension reduction factor is calculated as a
function of the diameter present at diamActVal and output in tensionTaper. The
way in which the reduction factor is processed depends on the mode that has been
selected.
Table 5-3
Calculation Description
mode
0 = No taper No tension taper mode is defined, the function block outputs 1.0 (no reduction
factor).
1 = Linear From a starting diameter that has to be entered (taperDiameterStart), the
taper reduction factor is linearly reduced to the maximum diameter
characteristic (taperDiameterMax) with a reduction defined by the parameter taperRatio.
Calculation Description
mode
𝑡𝑎𝑝𝑒𝑟𝑟𝑎𝑡𝑖𝑜
𝑡𝑒𝑛𝑠𝑖𝑜𝑛𝑇𝑎𝑝𝑒𝑟 = (1 − ( )
100
𝑑𝑖𝑎𝑚𝐴𝑐𝑡𝑉𝑎𝑙 − 𝑡𝑎𝑝𝑒𝑟𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟𝑆𝑡𝑎𝑟𝑡
⋅( ))
𝑡𝑎𝑝𝑒𝑟𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟𝑀𝑎𝑥 − 𝑡𝑎𝑝𝑒𝑟𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟𝑆𝑡𝑎𝑟𝑡
Graphic representation
Warning Messages
© Siemens AG 2019 All rights reserved
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
16#4101_4005 The table of entered values is not monotonically (steadily) increasing -> no
matching value found
16#4101_4008 The table of entered values is not monotonically (steadily) increasing -> 2
values are identical
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Table 5-4
ErrorID Description
16#0000_0000 No error
16#4101_8003 Less than two pairs of values in the breakpoint table or uneven number of
points.
16#4101_8004 More than twenty pairs of values in the breakpoint table or uneven number of
points.
16#4101_8005 Invalid configuration data:
upperLimitTaper < lowerLimitTaper
lowerLimitTaper < 0.0
Additionally for mode 1 – 3:
taperDiameterStart < 0.0
taperDiameterMax <= taperDiameterStart
ErrorID Description
taperRatio < 0.0
taperRatio > 100.0
The configuration data are checked for plausibility at the rising edge of
enable.
5.7.9 LCon_WinderConfigSetup
This function block is used to enter individual configuration data into a winder
configuration data structure used by the winder.
Function ID: 4003
LCon_WinderConfigSetup
"LCon_Winder
Bool metricUnits WinderConfig
ConfigType"
Real jogVelocity
Real speedMatchRampTime
Int typeOfDiameterCalc
Real diameterSetValue
Real webThickness
Real minDia
© Siemens AG 2019 All rights reserved
Real maxDia
Real minLineVelocity
Real minShaftSpeed
Real lineFilterTime
Real shaftFilterTime
Real diameterFilterTime
measuringRevolutionCo
Real
unt
Real firstDiameterOutput
Real diameterOutputRate
Real KpAdaptionValue
Bool holdIntChannel
Bool setIntChannel
useSetValForFrictionCo
Bool
mp
Real x1
Real Kp1
Real x2
Real Kp2
Real limRampTime
Real setNominalValue
Real setRampTime
Real integTime
Real derivTime
Real filterTime
Real intSetValue
Bool derivControlMode
Real deadBand
Real outValueFactor
Real upperLimit
Real lowerLimit
Real overrideVelocity
Real TensionAdjustment
Real tensionReference
Real MaterialWidth
Real MaterialDensity
Real MaterialFillFactor
© Siemens AG 2019 All rights reserved
Real JFixed
Real JMandrel
Real JMotor
Real accelerationAdjustment
Real frictionAdjustment
Real maxVelocity
Real gearRatio
Real referenceSpeed
Real referenceTorque
HW_SUBMODULE HW_Address_Input
HW_SUBMODULE HW_Address_Output
calculation
IN kpAdaptionValue REAL 0.0 TPID - Kp-Adaption signal
IN holdIntChannel BOOL FALSE FALSE:TPID – Normal integrator operation
TRUE: TPID - Hold (freeze) integrator
IN setIntChannel BOOL FALSE FALSE: TPID - Normal integrator
operation
TRUE: TPID - Set integrator channel to
intSetValue
IN useSetValForFriction BOOL FALSE TRUE: Use speed setpoint for friction
Comp compensation
FALSE: Use speed actual value for friction
compensation
IN x1 REAL 0.0 TPID - Abscissa-1 for KP-adaption(1)
IN kp1 REAL 1.0 TPID - KP-adaption point(1)
IN x2 REAL 0.0 TPID - Abscissa-2 for KP-adaption(2)
IN kp2 REAL 1.0 TPID - KP-adaption point(2)
IN limRampTime REAL 1000.0 [ ms ] TPID - Ramp-up time for PID
controller output limiting
IN setNominalValue REAL 100.0 TPID - Normalization value for setpoint
RFG
IN setRampTime REAL 1000.0 [ ms ] TPID - Ramp up time for setpoint
RFG
IN integTime REAL 2000.0 [ ms ] TPID - Integration time constant
IN derivTime REAL 0.0 [ ms ] TPID - Differentiation time constant
IN filterTime REAL 10.0 [ ms ] TPID - Actual value fitler time
IN intSetValue REAL 0.0 TPID - Integrator set value
IN derivControlMode BOOL FALSE FALSE: TPID – D-Action acts on system
deviation
TRUE: TPID - D-Action acts in the actual
value
IN deadBand REAL 0.0 TPID - Deadband parameter
IN outValueFactor REAL 1.0 TPID - Output scaling factor
Functionality
5.7.10 LCon_Winder
"LCon_BreakPointTable" yn_torqueValues
Int sizeOfArray
Real speedSetpoint
Bool speedSetpointMode
Real tCycle
diameter
Real Real
WinderConfig "LCon_Winder
"LCon_WinderConfigType"
ConfigType"
Functionality
The configuration data also has parameters for torque precontrol. Torque
precontrol is necessary for torque based tension control modes and is optional for
speed based tension control modes. Speed based tension control modes with the
_HD (high dynamic) prefix utilize torque precontrol.
With the enable set to true and DrvReadyForMotion and Cntrlenable then the
CntrlSetpoint will be ramped up based on configuration data The Tension controller
correction value will be added to the total speed setpoint or additional torque,
scaled and sent to the drive using the driveControl function block as required.
Function block output parameters allow the user to view the calculated surface
velocity of the winder (actVelocity), the actual shaft speed (actShaftSpeed), motor
actual speed in RPM (actDriveSpeed), motor torques (driveTorqueActual,
driveTorqueActualFtlbs, driveTorqueActualPercent) and pertinent PID data.
Unwind
from
below
© Siemens AG 2019 All rights reserved
Unwind
from
above
Block diagram
© Siemens AG 2019 All rights reserved
Warning Messages
Warnings are indicated by the status of the outputs error and errorID:
error = FALSE an errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
16#4102_4005 The table of entered values is not monotonically (steadily) increasing -> no matching
value found
16#4102_4008 The table of entered values is not monotonically (steadily) increasing -> 2 values are
identical
Error Messages
Error messages are indicated by the status of the outputs error and errorID:
error = TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
© Siemens AG 2019 All rights reserved
16#5104_8001 The function block is not called in a cyclic interrupt, e.g. OB30.
16#5104_8005 Invalid configuration data
controleMode < 0
controlMode > 5
typeOfWinder < 0
typeOfWinder > 3
winderConfig.typeOfDiameterCalc < 0
winderConfig.typeOfDiameterCalc > 3
winderConfig.minDia = 0.0
winderConfig.maxDia = 0.0
winderConfig.minDia >= winderConfig.maxDia
winderConfig.maxVelocity = 0.0
winderconfig.gearRatio = 0.0
winderConfig.referenceSpeed = 0.0
winderConfig.referenceTorque = 0.0
winderConfig. HW_Address_Input <= 0
winderConfig.HW_Address_Output <= 0
The configuration data are checked for plausibility at the rising edge of enable.
16#3101_8005 Invalid configuration data: (DriveControl)
HW_Address_Input <= 0
HW_Address_Output <=0
referenceSpeed <= 0.0
referenceTorque <= 0.0
16#3101_8065 Torque Limits may not be plausible any more; web break could cause this
problem. Axis runs in the opposite direction too fast. Reaction: brake with full torque.
(DriveControl)
16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB30. (SetpointChannel)
16#3102_8005 Invalid configuration data: (SetpointChannel)
maxVelocity <= 0.0
gearRatio = 0.0
The configuration data are checked for plausibility at the rising edge of enable.
16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB30. (TPID)
16#1108_8005 Invalid configuration data: (TPID)
setNominalValue <= 0.0
upperlimit < lowerlimit
16#5101_8001 The function block is not called in a cyclic interrupt, e.g. OB30. (DiamCalcDivision)
ErrorID Description
16#5101_8005 Invalid configuration data: (DiamCalcDivision)
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
minLineVelocity <= 0.0
minShaftSpeed <= 0.0
The configuration data are checked for plausibility at the rising edge of enable.
16#5103_8001 The function block is not called in a cyclic interrupt, e.g. OB30. (DiamCalcIntegral)
16#5103_8005 Invalid configuration data: (DiamCalcIntegral)
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
measuringRevolutionCount <= 0.0
minLineSVelocity <= 0.0
minShaftSpeed <= 0.0
The configuration data are checked for plausibility at the rising edge of enable.
16#5102_8001 The function block is not called in a cyclic interrupt, e.g. OB30. (DiamCalcAddition)
16#5102_8005 Invalid configuration data: (DiamCalcAddition)
minDia <= 0.0
maxDia <= 0.0
minDia >= maxDia
webThickness <= 0.0
minShaftSpeed <= 0.0
typeOfWinder < 0
typeOfWinder > 0
© Siemens AG 2019 All rights reserved
The configuration data are checked for plausibility at the rising edge of enable.
16#4102_8003 Less than two pairs of values in the breakpoint table or uneven number of points.
(WITorquePrecontrol, friction table)
16#4102_8004 More than twenty pairs of values in the breakpoint table or uneven number of points.
(WITorquePrecontrol, friction table)
16#4102_8005 One or more configuration values are invalid – Check Min values, max values and
other settings. (WITorquePrecontrol)
gearRatio <= 0.0
density < 0.0
diamMin <= 0.0
diamMax <= diamMin
width < 0.0
fillFactor <= 0.0
Jfix < 0.0
Jmandrel < 0.0
Jmot < 0.0
typeOfWinder < 0
typeOfWinder > 3
The configuration data are checked for plausibility at the rising edge of enable.
Friction characteristic pointer is not addressing a data block. (WITorquePrecontrol,
friction table)
16#4102_8006 Invalid diameter (WITorquePrecontrol)
diamActVal <= 0.0 diamActVal < diamMin
5.7.11 LCon_CalcTargetDiamStopCondition
Calculation of stop condition at target diameter. The function block must be called
in a cyclic interrupt, e.g. OB30.
Function block ID: 4004
CalcTargetDiamStopCondition
REAL actualVelocity
REAL actualAcceleration
REAL rampUpTime
REAL rampDownTime
REAL roundingTime
INT OBNumber
REAL tCycle
Functionality
The function block combines the Functions “CalcStopDistance” and
“RestLengthCalc”. It calculates based on the input parameters if the line axis needs
to be stopped to reach the target diameter.
The function block calculates the rest length depending on the actual and target
diameter which needs to be re- or unwinded. The winding mode and an optional
offset will also be used for the calculation. Additionally the distance the axis needs
to stop the motion to 0.0 LU/min will be calculated based on the actul motion vector
of the axis. If the rest length is smaller as the stop distance, the stop condition is
reached and the output “stop” is set to true.
If the actual diameter already exceeded the target diameter – actual diameter is
smaller than target diameter in mode unwinding or actual diameter is larger than
target diameter in mode rewinding – the output “stop” will be set to true
immediately.
After setting a new value for actualDiameter, targetDiameter and / or changing the
windingMode the output will be resetted to false, if a positive rest length to the
target diameter is present.
windingMode =0
&
≤
≥
& ≥1 stop
webThickness
actualDiameter
targetDiameter
RestLengthCalc
≥
offset
actualVelocity
actualAcceleration
maxVelocity
CalcStopDistance
© Siemens AG 2019 All rights reserved
rampUpTime
rampDownTime
roundingTime
Warning messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE an errorID <> 16#0000_0000.
errorID description
16#0000_0000 no warning
16#0000_0001 target diameter was limitted to maximum value. targetDiameter = maxDiameter
16#0000_0002 target diameter was limited to minimum value. targetDiameter = minDiameter
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
errorID description
16#0000_0000 no error
16#4004_8001 function block is not called in an cyclic interrupt
16#4004_8004 invalid configuration data:
rampUpTime ≤ 0.0
errorID description
rampDownTime ≤ 0.0
roundingTime ≤ 0.0
16#4004_8005 invalic configuration data:
minDiameter ≥ maxDiameter
16#0005_8005 invalid configuration data (CalcStopDistance)
© Siemens AG 2019 All rights reserved
For the S7-300/S7-400 solution, only two data types are provided:
• LCon_SectionalConfigType
• LCon_WinderConfigType
For the S7-1200/S7-1500 solution the following data types are available:
LCon_BreakPointTable
The data type LCon_BreakPointTable consists of an array of REAL variables. It is
used in different function blocks like FrictionCharacteristic, Taper,
TorquePrecontrol, etc.
LCon_DriveControlInputType
This data type contains all input interface parameter of the function block
© Siemens AG 2019 All rights reserved
LCon_DriveControl. For more information about the parameter see the description
of the function block.
LCon_DriveControlOutputType
This data type contains all output interface parameter of the function block
LCon_DriveControl. For more information about the parameter see the description
of the function block.
LCon_FrictionCharacteristicType
The data type contains the speed and torque values for the friction characteristic.
LCon_FrictionMeasurementInputType
This data type contains all input interface parameter of the function block
LCon_FrictionMeasurement. For more information about the parameter see the
description of the function block.
LCon_FrictionMeasurementOutputType
This data type contains all output interface parameter of the function block
LCon_FrictionMeasurement. For more information about the parameter see the
description of the function block.
LCon_FrictionMeasurementOutputType
The data type combines the data types FrictionMeasurementInput and Output.
LCon_LineAxisModuleType
This data type collects all data types which are necessary for the module
“LineAxis”. It contains the LCon_SetpointChannel interface, the LCon_DriveControl
interface as well as the operating state for the state machine.
LCon_SectionalDriveConfigType
The data type contains all configuration parameter of the function block
LCon_SectionalDrive.
NOTE For the S7-300/S7-400 solution a separate data type is provided in the library
LCon in the sub folder S7-300/S7-400!
Instead of the parameter HW_Address_Input and HW_Address_Output only one
parameter logAddr is used.
The following parameters are not available: “HWAddressAdditionalTelIn”,
“HWAddressAdditionalTelOut”, “baseTelegram”, “Tel750”.
All other parameters are the same.
© Siemens AG 2019 All rights reserved
mp compensation
FALSE: Use speed actual value for friction
compensation
maxVelocity REAL - [ LU / min ] Max velocity for normalization
gearRatio REAL - Gear Ratio, Motor / Load
referenceSpeed REAL - [ rpm ] Normalization speed of drive (p2000)
referenceTorque REAL - [ Nm ] Normalization torque of drive (p2003)
HW_Address_Input HW_Subm - Hardware address of the input Area of the drive
odul
HW_Address_Output HW_Subm - Hardware address of the output Area of the
odul drive
HWAddressAdditionalT HW_SUB 16#0000 Drive Logical IO address for reading
elIn MODULE AdditionalTel (as read in the hardware config)
HWAddressAdditionalT HW_SUB 16#0000 Drive Logical IO address for writing
elOut MODULE AdditionalTel (as read in the hardware config)
baseTelegram Int 999 999: UserDefTel (8/8). Structure as shown in
telegram structure (compatible with previous
version)
2: StandardTel2 is used
3: StandardTel3 is used. Only the PZD of
telegram 2 are evaluated! Caution: The
STW_G1 could be overwritten!
Tel750 Bool FALSE FALSE: Tel 750 is not used (if user def Tel is
used or Tel2or3 and no Torquedata is
necessary)
TRUE: Tel 750 is used (use only if standardTel
= 2 or 3)
LCon_SectionalDriveInputType
This data type contains all input interface parameter of the function block
LCon_SectionalDrive. For more information about the parameter see the
description of the function block.
LCon_SectionalDriveOutputType
This data type contains all output interface parameter of the function block
LCon_SectionalDrive. For more information about the parameter see the
description of the function block.
LCon_SectionalDriveITDiagValuesType
The data type contains the variables which are necessary for the Converting
Diagnostic Pages.
LCon_SetpointChannelInputType
This data type contains all input interface parameter of the function block
LCon_SetpointChannel. For more information about the parameter see the
description of the function block.
© Siemens AG 2019 All rights reserved
LCon_SetpointChannelOutputType
This data type contains all output interface parameter of the function block
LCon_SetpointChannel. For more information about the parameter see the
description of the function block.
LCon_TargetDiamStopConditionInputType
This data type contains all input interface parameter of the function block
LCon_TargetDiamStopCondition. For more information about the parameter see
the description of the function block.
LCon_TargetDiamStopConditionIOType
The data type combines the data types LCon_TargetDiamStopConditionInput and
Output.
LCon_TargetDiamStopConditionOutputType
This data type contains all output interface parameter of the function block
LCon_TargetDiamStopCondition. For more information about the parameter see
the description of the function block.
LCon_WinderConfigType
The data type contains all configuration parameter of the function block
LCon_Winder.
NOTE For the S7-300/S7-400 solution a separate data type is provided in the library
LCon in the sub folder S7-300/S7-400!
Instead of the parameter HW_Address_Input and HW_Address_Output only one
parameter logAddr is used.
The following parameters are not available: “HWAddressAdditionalTelIn”,
“HWAddressAdditionalTelOut”, “baseTelegram”, “Tel750”.
All other parameters are the same.
LCon_WinderInputType
This data type contains all input interface parameter of the function block
LCon_Winder. For more information about the parameter see the description of the
function block.
LCon_WinderOutputType
This data type contains all output interface parameter of the function block
LCon_Winder. For more information about the parameter see the description of the
function block.
LCon_WinderITDiagValuesType
© Siemens AG 2019 All rights reserved
The data type contains the variables which are necessary for the Converting
Diagnostic Pages.
6 Appendix
6.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 at:
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. You send queries to
Technical Support via Web form:
www.siemens.com/industry/supportrequest
© Siemens AG 2019 All rights reserved
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:
https://support.industry.siemens.com/cs/sc
https://support.industry.siemens.com/cs/de/en/view/109744606