Escolar Documentos
Profissional Documentos
Cultura Documentos
SIMATIC
Caution
The functions and solutions described in this article confine themselves to the
realization of the automation task predominantly. Please take into account
furthermore that corresponding protective measures have to be taken up in the
context of Industrial Security when connecting your equipment to other parts of the
plant, the enterprise network or the Internet. Further information can be found
under the Item-ID 50203404.
http://support.automation.siemens.com/WW/view/en/50203404
Siemens AG 2014 All rights reserved
Copyright
Technology overview 2
Integration 3
Functional Description 4
SIMATIC
SIMATIC Converting Toolbox Application example as
5
demonstration system
Winder and line tension control
Related literature 6
Contact 7
Siemens AG 2014 All rights reserved
History 8
Copyright
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
Siemens AG 2014 All rights reserved
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
(“wesentliche Vertragspflichten”). The damages for a breach of a substantial
contractual obligation are, however, limited to the foreseeable damage, typical for
the type of contract, except in the event of intent or gross negligence or injury to
life, body or health. The above provisions do not imply a change of the burden of
proof to your detriment.
Copyright
Main Contents
The documentation gives a detailed overview about each implemented function or
function block which are ready to apply.
The toolbox contains functions and function blocks from ranging from simple handy
functions to sophisticated solution for tension control and winding.
Limitations
The documentation does not discuss the properties of different S7 platform nor
does it discuss how SINAMICS drives are operated.
Siemens AG 2014 All rights reserved
Copyright
Table of contents
Warranty and liability ............................................................................................... 4
About this Document ............................................................................................... 5
1 Application Description ................................................................................. 8
1.1 Area of Application ............................................................................ 8
1.1.1 Segment, Machine, Unit Description .................................................. 8
1.1.2 Scope of Application .......................................................................... 8
1.2 Objectives ......................................................................................... 8
1.2.1 Task .................................................................................................. 8
1.2.2 Advantages ....................................................................................... 8
1.3 Automation and Drive Overview ......................................................... 9
1.3.1 System Requirements ....................................................................... 9
1.3.2 Scope of Supply ................................................................................ 9
2 Technology overview ................................................................................... 10
2.1 Tension control principles ................................................................ 10
2.2 Winder related functions .................................................................. 17
3 Integration..................................................................................................... 20
3.1 Integration into a User Program ....................................................... 20
Siemens AG 2014 All rights reserved
1 Application Description
1.1 Area of Application
1.1.1 Segment, Machine, Unit Description
The "Converting Toolbox" is intended to provide SIMATIC users with help when
engineering and programming converting machinery. The Converting Toolbox
provides standards that can be adapted depending on the particular machine and
application. These standards cover the typical basic functions of a converting
machine. The functions available are open source. The appropriate interfaces are
provided to make adaptations depending on the specific machine and application.
These interfaces are described in detail in the following documentation. Changes
to these standard functions should only be made in exceptional cases.
The SIMATIC Converting Toolbox can be used for the widest range of applications,
e.g.:
Foil & film machines
Siemens AG 2014 All rights reserved
Printing machines
Coating machines
Paper-finishing machines
Wire-drawing machines
Textile machines
Post-printing machines
Copyright
1.2 Objectives
1.2.1 Task
1.2.2 Advantages
types.
Copyright
2 Technology overview
2.1 Tension control principles
Generally the mechanical system in which tension or dancer position control is
necessary consists of the material web which needs to be controlled, of a motor
which drives the web and of an equipment which is used to set or measure the web
tension.
Typical machines with tension control are for example coating lines, rewinders,
slitters, narrow web machines usually running with materials like paper, laminates,
wire, foil and film (plastic or metal), textiles or cables.
Siemens AG 2014 All rights reserved
may be required (nips, s-rolls, etc.). The roll diameter is typically constant.
In case of simple concepts the tension is only set and not controlled. This
means that the speed setpoint of the motor is preset and the tension is defined
by the friction between the material and the roll surface.
If a more sophisticated tension control is required then the system must be
amended to include a tension measuring cell or a dancer system. Closed-loop
tension control and dancer control require a controller – in this document
referenced as the technology controller or TPID. The technology controller is
realized as a PID controller which includes setpoint conditioning and jerk-free
switch-on functionality.
Dancer system
A dancer control system is a position based measuring system, which is used to
set the material tension. In conjunction with a dancer the motor controls the
position instead of the tension. Typically the system is designed so that the dancer
normally sits in the cenres position during production. The position of the dancer is
controlled by the drive, with the change of the speed setpoint.
+
sact
P -
U
In the simplest design the dancer is tensioned using a spring, and therefore the
tension varies as the dancer roll moves. More complex systems can consist of
pressure controlled cylinders in order to maintain a constant tension even if the
dancer roll is deflected.
Load cell
With tension measuring the material tension is directly measured for example using
a load cell. The measured value is interpreted by the technology controllers
algorithm and is used to adjust the speed or torque setpoint of the drive.
Siemens AG 2014 All rights reserved
When the material web is being accelerated and decelerated an additive torque
can be switched to the drive in order to respond dynamically (quickly) to velocity
changes.
The inertia compensation method avoids tension dips or tension increases due to
velocity change. This pre-control is required, especially for indirect tension control
but also for tension control with a load cell.
Apart from the acceleration torque the torque pre-control has two other
components:
Tension torque, a function of the set tension, gear ratio and actual diameter
Friction torque from the friction characteristic
Draw Control
Using this method the web tension is set via the web segments velocity ratio,
meaning that the velocity of the transport rolls at the segment beginning is slower
than at the segment end. The velocity difference causes material tension, which in
turn defines the web tension. The resulting tension depends on the material type,
the friction between the material and the transport roll (slip) and the transport
system itself.
v OUT - v IN
T2 T1 C
v IN
This method is used for simple tension control, especially when an additional
measuring system is not available or is to be avoided, but it does not offer high
level tension accuracy. This method cannot be used with axial winders.
Siemens AG 2014 All rights reserved
Copyright
using this torque setpoint. Friction and acceleration compensation are absolutely
necessary to achieve accurate web tension control.
When using this control method is must be ensured that the gear ratio of the
system is kept as low as possible. This includes good motor selection and the
selection of a highly efficient gearbox with low friction losses.
Siemens AG 2014 All rights reserved
Copyright
V-constant control
In this mode the winder will be controlled by the line set velocity without override. The tension
will be build up by a nip – the winder build up a holding torque to hold its set velocity.
Siemens AG 2014 All rights reserved
For the diameter calculation the line actual velocity is necessary. This value will be detected by
Copyright
a tachometer. If a line axis with nip is available the set velocity of this axis can be used also to
control the winder in this mode.
The interconnection of the line actual velocity is done with the input variable
<lineActualVelocity> of the winder function block.
the roll being wound. From a mechanical design perspective this winding technique
is more complicated than that of a center winder.
The surface (contact )winder is used if there are no special requirements placed on
the surface quality of the material being wound.
The center winder is more complicated and, from a control perspective more
difficult to handle than the surface winder; however it is still the more widely
established of the two winder types.
Diameter calculation
The following different methods can be used to calculate the diameter of the roll
being wound:
Using the ratio between the velocity of the material web and the winder speed
By adding the material thickness
Using an external sensor
Using the ratio between the material length and the number of revolutions of
the winder (integration)
Tension taper
A tension taper characteristic is required if the tension, with which the material is to
be wound, is to be decreased as the diameter of the roll being wound increases. 5
different methods are available to calculate the tension taper characteristic:
No characteristic
Linear characteristic – the tension is reduced linearly as a function of the actual
diameter
Hyperbolic characteristic type 1 – the tension decreases according to a
hyperbolic function/characteristic
Hyperbolic characteristic type 2 – the tension decreases according to a
hyperbolic function/characteristic
Interpolated characteristic using a table of points
Controller adaptation
The gain of the technology controller can be adapted as a function of the diameter.
This permits higher controller gain at larger diameters.
The speed controller gain in the drive can be adapted as a function of the moment
Siemens AG 2014 All rights reserved
of inertia or the actual diameter of the roll being wound. This is necessary so that a
full roll can also be rapidly accelerated or decelerated
Copyright
3 Integration
3.1 Integration into a User Program
Importing the source code
The SCL source file of the SIMATIC Converting Toolbox (S7LConLib.scl) can be
imported into the user project using the Step7 manager.
Step Screenshot
Step Screenshot
Step Screenshot
4 Functional Description
4.1 Tools
4.1.1 ReadCycleTime – Determining the cycle time
RET_VAL OUT REAL - - [ ms ] The actual cycle time of the task in REAL
format.
If the function outputs a 0.0, the block is not
called in a cyclic task (OB30-OB38).
Copyright
Functionality
The function determines the cycle time of the calling OB by using the system
function SFC6 (RD_SINFO). The cycle time of the OB is the return value in REAL
format.
If the return value is 0.0 the function is not called in a cyclic task.
Functionality
Using the breakpoints entered, this function determines the matching Y coordinate
of the coordinate present at input x. The interpolated Y coordinate is provided as a
return value of the function. The input point x is limited by the coordinates X1 and
X2. If the coordinates X1 and X2 are equal, 0.0 is displayed as return value and no
Copyright
interpolation is performed.
X X1
RET _ VAL * Y 2 Y1 Y1
X 2 X1
Graphical representation
Functionality
The function blocks adapts the output value y corresponding to the input value x
based on a breakpoint table of variable size. Between the breakpoints the values
are interpolated linearly.
The purpose of the function block is to e.g.:
Linearize characteristic curves
Simulation of non-linear transfer elements
The minimum number of breakpoint elements is two. The x values of the curve
must increase monotonically, the y values have no limitation. The total number
of breakpoints is defined by the size of the data reference. The data type of the
addressed data area must be REAL. Is x is less than the x value of the first
coordinate, the output y value will maintain the level of the y value of the first
coordinate. The same applies if x is larger than the last x coordinate of the
table.
Graphical representation
Siemens AG 2014 All rights reserved
Warning messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
ErrorID Description
Copyright
16#0000_0000 No warning
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#0106_8003 Less than two pairs of values in the breakpoint table or uneven
number of points.
ErrorID Description
upperLimit OUT BOOL FALSE FALSE: Upper limit value not reached
Reached TRUE: Upper limit value reached
lowerLimit OUT BOOL FALSE FALSE: Lower limit value not reached
Reached TRUE: Lower limit value reached
Functionality
Copyright
The function block includes an integrator with two integration time constants that
can be set independently of each another. Output y changes according to the
following algorithm:
Fehler! Es ist nicht möglich, durch die Bearbeitung von Feldfunktionen
Objekte zu erstellen.
The change rate ya is calculated separately for the up ramp and down ramp. An up
ramp is when the output value y moves away from zero. A down ramp is when the
output value y approaches zero.
For the change rate when ramping-up the following applies:
cycleTime
YA * no min alValue für Y 0
rampupTime
cycleTime
YA * no min alValue für Y 0
rampupTime
If the absolute value of a limit value is reduced, the integrator integrates from the
previously held value – according to the selected ramp-down time – until the output
once again reaches the limit value.
The integrator operates internally with increased accuracy so that even for small
setpoint-actual value differences it still integrates. However, it should be carefully
noted that the sampling time is sufficiently low compared to the ramp-up or ramp-
down time.
rampupTime and rampdownTime are internally limited:
rampupTime cycleTime, rampdownTime cycleTime
cycleTime / x [x < y y 0]
ramp rampdownTime for
downTime [x > y y < 0]
[x < y y > 0]
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1106_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
Input parameters
Name Type Data M/O Initial value Description
type
error identification
Functionality
The function block is active with the input run set to TRUE and the calculation can
be started or stopped with input enable. Depending on the parameterization of the
inputs a ramp function is calculated. Various options can be set by selecting the
inputs. If mode is at False, the ramp is braked using a special entered deceleration
time (fastRampdownTime) and without jerk limiting. This means that the ramp can
be effectively decelerated for an Emergency Stop – this is also possible while
accelerating. If mode is at True, then the drive is braked normally with the entered
deceleration time (rampdownTime). The acceleration is always calculated with the
entered acceleration time (rampupTime) independent of mode.
In order to reach the setpoint (x), the appropriate interval values are output (at y)
and the actual change rate is output (at ya). If input enableRounding is set to
TRUE, the ramp is calculated with jerk limiting. The rounding-off is determined by
the rounding-off time (roundingTime). The zero crossing (when the input x changes
direction) can be parameterized with or without rounding. As soon as the output
value is zero this is displayed using the setpointZero output. When accelerating the
output acceleration is set, when decelerating theoutput deceleration is set and for a
constant value setpointReached is set. If the block is in the enable mode, then
output busy is set to TRUE. If the hold input is set to TRUE, the ramp-function
generator is stopped (held) and the actual acceleration is ramped-down to zero. As
long as hold is TRUE, setpoint x is ignored and output ya is set to zero.
Siemens AG 2014 All rights reserved
Copyright
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.Error = TRUE
ErrorID Description
16#0000_0000 No error
16#1107_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
4.1.6 CalcStopDistance
Calculation of the braking distance and the associated time to ramp down to zero
with the given ramp parameters from the given speed and acceleration.
The function can be called in any task. ID: 0005
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
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
Functionality
The function block outputs a true signal if a falling edge is detected on the input
signal (CLK). The duration of the output signal is one cycle.
Timing diagram
4.2.2 R_TRIG
Functionality
The function block outputs a true signal if a rising edge is detected on the input
signal (CLK). The duration of the output signal is one cycle.
Timing Diagram
4.2.3 TRIG
Edge detection
The function can be called in any cyclic task. ID: 0103
Siemens AG 2014 All rights reserved
Functionality
The function block evaluates the input signal (CLK) for rising and falling edges. The
result of a falling edge is signaled on the QF output, the rising edge on the QR
output.
Timing Diagram
Siemens AG 2014 All rights reserved
Functionality
The function assembles a word out of two bytes by specifying high byte and low
byte.
4.3.2 BitsIntoByte
Functionality
The function assembles a byte out of 8 bits.
4.3.3 BitsIntoWord
Functionality
The function assembles a word out of 16 bits.
4.3.4 WordIntoBytes
Functionality
The function block generates two bytes out of a word.
4.3.5 ByteIntoBits
Functionality
The function block generates eight bits out of a byte.
4.3.6 WordIntoBits
Functionality
The function block generates sixteen bits out of a word.
Functionality
The function converts a DWORD input (x) using a normalization value (base) and
the maximum reference value (maxValue) into a REAL value. The output value is
limited to -2*maxValue and 2*maxValue.
x
RET _ VAL * max Value
base
4.4.2 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 and 2*maxValue
x
RET _ VAL * base
maxValue
4.4.3 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 and 2*maxValue.
Copyright
x
RET _ VAL * max Value
base
4.4.4 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 and 2*maxValue.
x
RET _ VAL * base
max Value
Siemens AG 2014 All rights reserved
4.4.5 Scaling
Functionality
This function scales an input value (x) using a normalization value (base) and the
maximum reference value (maxValue).
x
RET _ VAL * max Value
base
type
Functionality
The input value x is filtered using the time constant smoothingTime and output at
the output y. To precisely calculate the internal steps the sampling time in which
the block is processed is determined internally. Additionally it is possible to
permanently set the output to the value of the input (setValue) by setting the input
(set).
In order to generate a hold, output y should be connected to the input setValue.
This means that when setting set to TRUE, the output value is maintained until set
is again set to FALSE. If the time constant is set to zero the filter is de-activated
and the output value is equal to the input value.
63% of the input value is reached at the output after one period of the time
constant.
95% of the input value is reached at the output after three periods of the time
constant.
For an appropriately high smoothingTime/cycleTime (smoothingTime/cycleTime >
10) the transfer function corresponds to the following characteristic:
t / smoothingTime
Y (t) X *(1 e ) with t n * cycleTime
The discrete values are calculated using the following algorithm:
cycleTime
Yn Yn 1 * X n Yn 1
smoothingT ime
Siemens AG 2014 All rights reserved
Timing diagram
Copyright
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
4.5.2 ReadAnalogInput
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 and
2*maxValue.
x
ana log_ value * max Value
base
Optionally the analog value can be filtered using a settable PT1-filter and a filter
time smoothingTime. If the input parameter smoothingTime = 0, the filter is
disabled. The internal limit for the filter time is 5000 ms.
The functionality is a combination of the ScalingWDRL function and the PT1
function block.
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1109_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
base = 0.0
4.5.3 Differentiator
Numerical differentiator
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1103
Copyright
Functionality
The output value y changes as a function of the rate of change of input value x,
multiplied by the differential time constant diffTime.
The input diffTime is internally limited: cycleTime diffTime 1000
Discrete values are calculated using the following algorithm:
diffTime
Yn Xn Xn 1 *
cycleTime
Error messages
Siemens AG 2014 All rights reserved
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
Copyright
4.5.4 Integrator
Numerical integrator
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1102
Functionality
The function block integrates the input value x with integration time integralTime.
The result is output at y. The integrator is limited by the upper limit upperLimit and
the lower limit lowerLimit. If the integrator reaches one of the limits, then this is
connected to the output. When the particular limit at the output is reached this is
indicated using upperLimitReached and lowerLimitReached.
Using the setting function, which is activated with set =True, the output can be set
to a pre-defined value (setValue). If set is reset, then starting from the setting
value, the integrator continues to integrate in the direction specified using input
value x.
The input integralTime is internally limited: cycleTime integralTime 10000
The discrete values are calculated using the following algorithm:
cycleTime
Yn Yn 1 * Xn
integralTi me
Reached Reached
Timing diagram
Siemens AG 2014 All rights reserved
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
Copyright
16#0000_0000 No error
16#1102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
DT1-filte
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1104
Functionality
Input value x is dynamically delayed with the smoothing time constant
smoothingTime entered via a differentiating element. The output value isat output
ypt. The output value y of the complete DT1 element is proportional to the change
Copyright
rate of ypt multiplied with differential time constant diffTime. The input diffTime is
internally limited: cycleTime diffTime 1000
The input smoothingTime defines the gradient of the down ramp of the output
value. This specifies the time after which the transfer function – after smoothing
and differentiation – has dropped to 37% of x-diffTime/ smoothingTime. For a
sufficiently high smoothingTime/cycleTime (smoothingTime /cycleTime > 10), the
transfer function corresponds to a characteristic of:
diffTime t/smoothingTime
Y(t) x* *e where t n * cycleTime
smoothingT ime
The input smoothingTime is internally limited: cycleTime smoothingTime 5000
The discrete values are calculated using the algorithm:
diffTime
Y 1n * ( xn YPTn 1 )
smoothingTime
cycleTime
YPTn YPTn 1 * ( xn YPTn 1 )
smoothingTime
The higher smoothingTime/cycleTime, the lower the amplitude change at y and at
ypt from one sampling instant to the next.
The higher the diffTime/cycleTime, the higher the amplitude change at y from one
sampling instant to the next.
Setting function
When the setting function is active, setting value setValue is transferred to output y;
the output of the smoothing element is obtained as follows:
smoothingTime
YPTn Xn * setValuen for diffTime 0
diffTime
In this case, the internal limits for smoothingTime and diffTime apply. For diffTime
= 0, the output values remain unchanged as long as set = TRUE.
Graphical representation
Siemens AG 2014 All rights reserved
Error messages
Copyright
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1104_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
Limit-value filter
The function can be called in any task. ID: 0004
Functionality
The function block transfers the input value x tothe output value RET_VAL. The
input value is limited dependent on the input parameters upperLimit and lowerLimit.
Siemens AG 2014 All rights reserved
Timing diagram
Copyright
Error messages
If upperLimitReached and lowerLimitReached are both at TRUE, the lower limit
lowerLimit is greater than upper limit upperLimit.
alarmUpper OUT BOOL - FALSE TRUE: Upper alarm limit value exceeded
Limit FALSE: Upper alarm limit value not
exceeded
warningUpper OUT BOOL - FALSE TRUE: Upper warn limit value exceeded
Limit FALSE: Upper warn limit value not
exceeded
warningLower OUT BOOL - FALSE TRUE: Lower warn limit value exceeded
Limit FALSE: Lower warn limit value not
exceeded
AlarmLower OUT BOOL - FALSE TRUE: Lower alarm limit value exceeded
Limit FALSE: Lower alarm limit value not
exceeded
Functionality
This function block monitors an input value (x) to identify whether it violates
(exceeds, falls below) parameterized limit values as long as it is active with run =
TRUE. If the block is enabled this can be identified using the busy output. When
the warningHigh value is exceeded, output warningUpperLimit is set after the
delayTime. The same applies when the alarmHigh value is exceeded with the
associated output alarmUpperLimit. If the input value drops below the limit value
Siemens AG 2014 All rights reserved
warningHigh or alarmHigh minus the hysteresis value (hyst), the particular output is
reset. The same applies for the lower limit monitoring with the limits warningLow
and alarmLow as well as the associated outputs warningLowerLimit and
alarmLowerLimit. However, in this case, the hysteresis (hyst) is added to the limit
value. Warnings are not reset as a result of an alarm.
Copyright
Timing Diagram
Siemens AG 2014 All rights reserved
Copyright
Dead-band filter
The function can be called in any task. ID: 0002
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
Copyright
Dead-zone filter
The function can be called in any task. ID: 0003
Functionality
Siemens AG 2014 All rights reserved
If the input value (x) lies in the range of the dead zone (-zoneBorder < x < +
zoneBorder), the output value is set to zero. If the input value lies at / below (–
zoneBorder) or at / above +zoneBorder, input x is the output value. The dead zone
– symmetrical around the zero point – can be set using the value zoneBorder.
x for x -zoneBorder
0 for -zoneBorder < x < +zoneBorder
x for x +zoneBorder
Copyright
Graphical representation
Average-value filter
The function block must be called in a cyclic task. ID: 0105
maxValueReached OUT BOOL - FALSE FALSE: Array not yet filled with
values
TRUE: Maximum number of values
in the array (sizeOfArray)
Functionality
The function block calculates the moving average value (averageValue) of the
input values that are entered. Each time the block is called the value (x) currently
present is saved in a data block that is created (dbNumber). The data block is
deleted upon deactivation of the function block.
The function block is activated via the input enable and calculates values from that
instant. The output maxValueReached is set if the number of values in the data
block reaches the defined number sizeOfArray.
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
The number of data blocks in the CPU has reached the maximum
possible number
The H CPU is running coupling or update functions
WinAC software CPU has detected an error in the operating system
of the computer where WinAC is installed
The previous delete action is not yet completed
16#0105_83B1 The DB with the specified number does not exist on the CPU.
ErrorID Description
16#0105_83B2 The DB with the specified number created using the keyword
UNLINKED.
16#0105_83C1 The data block cannot be deleted at this time because of a temporary
resource bottleneck (SFC23 / DEL_DB).
16#0105_84A1 Data block number bigger than allowed or zero (SFC 24 / TEST_DB)
PID controller with actual value smoothing and optional D component in the actual
value branch
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1105
Copyright
deviationValue OUT REAL - 0.0 Controller deviation after the deadband filter
dOutValue OUT REAL - 0.0 D component output, unlimited (if not in the
actual value branch)
Functionality
The function block is used to implement a universal PID controller that can be
switched to P controller or I controller modes. The D component can either be
calculated in the actual value branch or in the system deviation.
The integrator can be set using the inputs intSetValue (setting value) and
setIntChannel. In addition, the instantaneous value of the integrator can be held
using holdIntChannel (P controller). Internally the I component is limited, based on
the controller output limits (“anti-windup”). The integrator is set to zero at switch-on.
All of the block parameters can be changed in operation.
The scaled and smoothed actual value (actualValue) is subtracted from the
setpoint (setpointValue) according to the following equation:
t
deviationValue (actualValue actualValueFactor ) actualValueOffset 1 e T setpo int Value
The result is the system deviation deviationValue (after the deadband) and is then
multiplied with the proportional coefficient propGain. The result is transferred to the
integrator – and optionally to the D component. The settable integral time
integTime as well as the time constant of the D component derivTime (optional)
define the controller behavior.
Siemens AG 2014 All rights reserved
Component Calculation
direction.
The inputs setIntChannel and holdIntchannel can be used to set the
integrator (intSetValue) – or manually hold it. The integrator is set to zero
using reset or with a rising edge for enable
D component derivTime
dOutValue n pOutValue n pOutValue n 1
(if activated) cycleTime
Timing diagram
Siemens AG 2014 All rights reserved
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Error messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1105_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
Technology controller based on a PID controller for use as a tension or dancer roll
position controller in closed-loop winder or material web control.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 1108
deadBand IN REAL O 0.0 Width of the deadband filter, deactivated with 0.0
RFGSetpoint OUT BOOL - FALSE FALSE: RFG output <> setpoint value
Reached TRUE: RFG output reached setpoint value
Functionality
The block is enabled using the enable input; as a consequence, the setpoint ramp-
function generator and the limiting ramp-function generator are started with their
respective ramp-up times and the PID controller is activated. In addition with the
rising edge the setpoint ramp-function generator is set to the value that is present
at the input (actualValue). This guarantees jerk-free and smooth transition into the
controlled mode.
When the edge at the enable input falls, the limiting ramp-function generator is
ramped back to zero and therefore the controller output is limited. This results in
bumpless controller shutdown. As soon as the outValue output is zero and enable
= FALSE, the block is deactivated and the output busy is set to FALSE. The
setpoint is internally ramped to the actual value during the switch-off phase.
If input openLoopCtrl = TRUE, then the block operates in the open-loop control
mode. As a consequence, the setpoint channel remains active and the controller or
the output limits remain inactive. The output busy stays TRUE as long as the
setpoint ramp output is not zero. The input actualValue is 0.0.
Setpoint ramping
The setpoint ramp-function generator is used to avoid setpoint steps in the setpoint
channel. The setpoint ramp-function generator is configured using the parameters
setRampTime and setNominalValue, whereby setNominalValue defines the
reference value for the ramp-up or ramp-down time. The function is always active,
if enable = TRUE. If openLoopCtrl = FALSE, enable = FALSE and busy = TRUE
(switch-off phase), then the setpoint is internally set to the actual value.
The ramp times are internally limited to the cycle time.
Controller functionality
The controller setpoint is provided via the input setValue, the actual value via the
actValue input. The setpoint channel includes a settable setpoint ramp-function
generator, via which the setpoint is routed; the effective setpoint can be monitored
at output RFGSetpointValue. The control algorithm used corresponds to that
described in function block PID.
Kp adaptation
A linear adaptation is carried out as Kp adaptation. The interpolation line is defined
by the value tuple (x1, kp1) and (x2, kp2).
Siemens AG 2014 All rights reserved
effectiveKp = kp2
The value kp1 is used as effective Kp if the Kp adaptation is deactivated.
Timing diagram
Siemens AG 2014 All rights reserved
Copyright
Block Diagram
Siemens AG 2014 All rights reserved
Copyright
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
The function block is used as an interface between the PLC program and a drive
from the SINAMICS drive family. The function block enables the full control of the
respective drive.
Siemens AG 2014 All rights reserved
The function can be called in any task but it is highly recommended that the
function is called in a cyclic interrupt task such as OB35, especially if the drive is
part of a higher-level control loop, such as a tension controller. ID: 3101
faultCode OUT DINT - 0 Drive fault code, refer to drive manual for
more information (r2131 from the drive)
speedActual OUT REAL - 0.0 [ rpm ] Speed actual value (r63 from the
drive)
torqueActual OUT REAL - 0.0 [ Nm ] Torque actual value (r80 from the
drive)
Functionality
This function block is utilized to interface and control the drive from the PLC
program. The Drive Control function block is designed to interface to the Sinamics
family of drives but can also be easily adapted to other drives if the telegram
structure is adhered to. Through this function block the programmer is able to
enable, disable, open brake (if available), adjust speed, adjust torque, adjust the
Kp and adjust torque pre-control if required. The programmer also has access to
standard status bits and values.
If torque limiting is active, the function block monitors the actual speed of the drive
to avoid uncontrolled acceleration in the opposite direction to the specified setpoint.
This can happen if the upper torque limit is negative or the lower torque limit is
positive while drive is operating at the torque limit. If the drive accelerates beyond
50 rpm in the opposite direction the drive will be stopped with setpoint zero and the
torque limits will be opened.
Control interface
This function block interfaces with the drive via PROFIBus or PROFINet. The
communication between the drive and the PLC is based on a 10 word in and 10
word out telegram. The function block communicates via SFC14 (DPRD_DAT) and
SFC15 (DPWR_DAT) called from within the function block. The user can enter the
logical address of the drive as an input labeled “logAddr” to the function block. It is
necessary to make the drive’s input and output logical addresses identical.
Siemens AG 2014 All rights reserved
Telegram structure
Copyright
Control Telegram
Element Offset Data Description Interconnected to
(bytes) type
Control Word 1
Element Offset (bits) Data type Description Interconnected to
Control Word 2
Element Offset (bits) Data type Description Interconnected to
Status Telegram
Element Offset Data Description Interconnected to
(bytes) type
Copyright
Status Word 1
Element Offset (bits) Data type Description Interconnected to
over load
Status Word 2
Element Offset (bits) Data type Description Interconnected to
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No warning
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_8065 Torque Limits may not be plausible any more; a break in the web
could cause this problem. Axis runs in the opposite direction too
fast. Reaction: brake with full torque.
4.6.2 SetpointChannel
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 3102
Functionality
The block must be configured using the correct total gear ratio, diameter of driven
roll and max velocity. This function block consistently checks for plausible
parameters and will display an error with corresponding errorId should invalid data
be entered at the rising edge of enable.
With the enableRFG set to true, the velocity1, velocity2 and velocity3 are summed
together and sent to the input of the RFGJ together with the configuration data and
Siemens AG 2014 All rights reserved
ramp control functions for holding, rounding, and ramp times entered at this
function block. With a False entered at enableRFG the input is set to zero and the
ramp is kept enabled until the ramped signal is zero. velocity4, Draw (multiplier)
and the tension correction – velocityPID – inputs are always active unless jog is
requested and the ramp output is zero.
RFG operation has priority over jog. The jog commands must be exclusive
commands.
With the enableRFG false, the jogPos set to true and jogNeg is false, the
jogVelocity is set as the velocity setpoint. Additionally, with the enableRFG false,
Copyright
the jogNeg set to true and jogPos is false, a negative jogVelocity is set as the
velocity setpoint.
The jog velocity, summed velocity setpoints 1-4 times the draw factor are limited to
+/- max velocity value. The tension velocity is added after this limit to allow tension
or any other superimposed control even at 100% velocity.
The function block will calculate the correct drive speed setpoint based upon the
diameter (in meterr or in inches) and gear ratio.
velocitySet
driveSpeedSet * gearRatio
(diameter * PI )
The function block will calculate the correct Shaft actual speed based upon the
actual motor speed and gear ratio.
driveSpeedAct
shaftSpeedAct
gearRatio
The function block will check for zero speed if the absolute actual speed is less
then 0.1 rpm.
LU m ft
(length unit)
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
The function block is used to record the friction characteristic of the drive. The
characteristic can subsequently be used as a component in the torque pre-control.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 3103
speedSetpoint OUT REAL - 0.0 [ rpm ] Speed setpoint for drive control
Copyright
Functionality
The function block measures the friction characteristic (speed/torque breakpoints)
of a specific mechanical system. Speed setpoints are taken and torque values are
saved in the specified data area referenced by dbPointer. The data structure
contains breakpoints of the characteristic (x value: speed, y value: torque), while
the speed setpoint value has to be specified before starting the function block.
The user has to possibility to let the function block pre-assign the speed values into
the data block. For this the input parameter maxSpeed must be unequal to zero.
The speed values will be distributed evenly according to the length of the data
block. The first entry will always be zero speed with zero torque.
The function block is started using the input enable. Once started, the output
speedSetpoint outputs the drive’s speed based on the values in the breakpoint
table. If the input warmupTime > 0.0, the drive moves for this defined period of time
at the maximum speed before starting the measurement of the corresponding
torque values.
The actual torque value of the drive must be connected to the actualTorque input
of the function block. The torque values are averaged with a defined number of
samplings specified by input valueNumber. The ramp times for changing the speed
setpoint are specified using the input ramptime. If the sequence is active, done =
FALSE and busy = TRUE. If finished, done = TRUE and busy = FALSE.
If an error occurs during the sequence, this is displayed at the error output and the
associated errorID. If the abort signal abort is set to TRUE the measurement is
interrupted and the setpoint ramped to zero.
Timing diagram
Siemens AG 2014 All rights reserved
Copyright
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#3103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
16#3103_8003 Less than two pairs of values in the breakpoint table or uneven
entries in the table.
This function block is used to enter individual configuration data into a sectional
drive configuration data structure used by the sectional drive function block.
The function block can be called in any task. ID: 6001
Functionality
This function creates one output structure of SectionalConfigType from the
configuration parameters. This is done to reduce the number of input variables on
the sectional drive function block but still give the user easy access.
4.7.2 TorquePrecontrol
TRUE: Metric
driveSpeed IN REAL O 0.0 [ rpm ] Actual drive speed (for the friction
characteristic)
Functionality
The block determines the pre-controlled torque for v/ t
The torque pre-control outputs the following torque setpoints to pre-control the
drive:
A torque setpoint as a function of the acceleration setpoint of the
machine/system ramp-function generator and the inertia
Friction torque setpoint is generated depending on the drive speed using a
characteristic.
Tension torque based on the tension setpoint and the diameter
In order to quickly compensate for disturbances and to implement the closed-loop
control in the first place (for a replacing speed control), the torque to be provided
from the drive must be specified as accurately as possible. Depending on the
control type, this is either realized additively after the speed controller or by
dynamically adjusting the torque limits.
In both cases the appropriate torque must be calculated using its moment of inertia
and transferred to the drive.
NOTICE The precise setting of the compensation is particularly important for indirect
tension control. This is so that the torque-generating current emulates, as far as
possible, the material tension.
Calculations
The function block FBTorquePrecontrol calculates the following physical quantities:
Quantity Formula
This friction torque is internally determined using the function block TableChar. The
user is responsible for providing valid and sensible values in the appropriate data
Copyright
fields. If the factor FrictionAdjustment is set to 0.0 TableChar is not called and
therefore a frictional torque is not added.
The pre-control torque of the motor, the sum of all pre-control torques and the
tension torque are calculated depending on the drive type. The total torque is
always the sum of the preCtrlMotor and tensionTorque.
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
Siemens AG 2014 All rights reserved
16#6101_8003 Less than two pairs of values in the breakpoint table or uneven
number of points.
The configuration data are checked for plausibility at the rising edge
of enable.
Pointer is not addressing a data block.
16#6101_84A1 Data block number bigger than allowed or zero (SFC 24 / TEST_DB)
4.7.3 SectionalDrive
This function block is used to control a converting line sectional drive from a PLC
program. The function block was designed to handle the requirements of a tension
or ratio adjusted driven section.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 7101
5: INDIRECT
6: DRAW_CONTROL
Value is saved upon rising edge of enable.
frictionDbPointer IN ANY O -
Copyright
driveFaultCode OUT DINT - 0 Drive fault code, refer to drive manual for
Siemens AG 2014 All rights reserved
driveSpeedActual OUT REAL - 0.0 [ rpm ] Speed actual value (r63 from the
drive)
driveTorqueActual OUT REAL - 0.0 [ Nm ] Torque actual value (r80 from the
drive)
Functionality
This function block utilizes the DriveControl, SetpointChannel, TorquePrecontrol
and TechPID function blocks of the Simatic Converting Toolbox. This function block
checks for valid configuration data and calls the individual function blocks to
minimize application development time.
With the enable set to true a plausibility check is done on the configuration data
and will display an error with corresponding error Id should invalid data be entered.
This input allows control functionality. With the function block enabled the
driveControl function block will become active, which in turn will set the busy output
true.
With the enables set true the sectional drive will follow the sum of the lineVelocity
and additionalVelocity multiplied by the draw factor. Sectional drives are typically
made to follow the master without any ramps. The programmer is responsible for
proper interlocks to prevent unwanted behavior.
The configuration data has diameter, gear ratio and max line speed parameters
which are utilized to calculate the correct surface velocity of the driven roll to match
the section to the master line velocity.
The configuration data also has parameters for torque pre-control. Torque pre-
control is necessary for torque based tension control modes and is optional for
speed based tension control modes. Speed based tension control modes with the
_HD (high dynamic) prefix utilize torque pre-control.
With the enable set to true and DrvReadyForMotion and Cntrlenable then the
CntrlSetpoint will be ramped up based on configuration data. The Tension
controller correction value will be added to the total speed setpoint or additional
torque, scaled and sent to the drive using the driveControl function block as
required.
Function block output parameters allow the user to view the calculated surface
velocity of the section (actVelocity), the section’s actual shaft speed
Siemens AG 2014 All rights reserved
axis as well as the orientation of the setting variables (speed, force, torque). The
tension operating mode is selected by the typeOfDrive input of the function block.
The following table shows the different tension operating modes and the direction
of velocity, tension and torque. During commissioning of the application it must be
ensured that the direction convention and signs of the process variables are
aligned. It may might be necessary to change the direction of rotation in the drive
system.
Operation Representation Description
mode
n: speed of drive
nO: velocity override for speed
controller overcontrol
Block diagram
Copyright
Warning Messages
Warnings are indicated by the status of the outputs error and errorID:
error = FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
16#6101_4005 The table of entered values is not monotonically (steadily) increasing ->
no matching value found (Torque Precontrol, friction table)
16#6101_4008 The table of entered values is not monotonically (steadily) increasing -> 2
values are identical (Torque Precontrol, friction table)
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
logAddr 0
referenceSpeed 0.0
referenceTorque 0.0
16#3101_8065 Torque Limits may not be plausible any more; a break in the web could
cause this problem. Axis runs in the opposite direction too fast. Reaction:
brake with full torque. (DriveControl)
16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(SetpointChannel)
Copyright
16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB35. (TPID)
16#6101_8003 Less than two pairs of values in the breakpoint table or uneven number
of points. (Torque Precontrol, friction table)
ErrorID Description
16#6101_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)
(Torque Pre-control, friction table)
16#6101_84B1 Data block does not exist (SFC 24 / TEST_DB) (Torque Precontrol,
friction table)
16#7101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
sectionalConfig.logAddr = 0
The configuration data are checked for plausibility at the rising edge of
enable.
Copyright
4.8.1 DiamCalcDivision
This function block is used to calculate the diameter of a winder by dividing the
material velocity by the winding shaft speed.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5101
Functionality
The function block determines the actual diameter value (diameter) of the roll being
wound (or unwound) using the following input quantities:
Web velocity (lineVelocity) - the web velocity is the setpoint velocity of the
machine and the velocity with which the main drive moves the material web. In
exceptional cases it is possible to use the actual value from a tachometer
measuring the web speed.
Shaft speed of the mandrel (shaftSpeed) – Actual speed of the winder shaft.
Copyright
The actual motor speed is converted to the roll shaft (by the gear ratio) and is
used to calculate the diameter.
The calculation is based on the D = v/( *n) formula.
The holdDiameter input will pause the diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diameterSetvalue as the diameter as long as the
actual shaft speed is below minimum shaft speed. The set value is limited by the
minimum and maximum diameter.
With actual line velocity above the line minimum velocity y and the actual shaft
speed above minimum shaft speed and not held, the diameter is calculated. The
result of the division is limited and smoothed.
Block diagram
Siemens AG 2014 All rights reserved
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
Copyright
ErrorID Description
16#0000_0000 No error
16#5101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
4.8.2 DiamCalcIntegral
This function block is used to calculate the diameter of a winder by dividing the
material length change by the number of winding shaft revolutions.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5103
Functionality
The diameter calculator determines the actual diameter value (diameter) of the roll
being wound (or unwound) using the input quantities:
Web velocity (lineVelocity) - the web velocity is the setpoint velocity of the
machine and the velocity with which the main drive moves the material web. In
exceptional cases, it is possible to use the actual value from a tachometer
Copyright
length m ft
When set to true the holdDiameter input will pause the diameter calculation and
hold the resulting diameter at the current value.
As long as the actual shaft speed is below the minimum shaft speed the
setDiameter input writes the diametersetvalue as the diameter. The set diameter is
limited.
When the actual line velocity is above minimum and the actual shaft speed is
above and not held, the diameter is calculated. The result is limited and
interpolated.
If the number of revolutions of the winding shaft - specified by parameter
measuringRevolutionCount – is reached, then the integrators are reset. One
integrator will give the length change of the material for the specified number of
winder shaft revolutions. From these two values the (average) diameter can be
calculated.
Additionally ,based on the diameter change, the actual material thickness is
calculated in every measuring interval, e.g. for remaining length calculation.
Thickness = |diameterNew – diameterOld|/measuringRevolutionCount
Block Diagram
Siemens AG 2014 All rights reserved
Copyright
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#5103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
ErrorID Description
4.8.3 DiamCalcAddition
This function block is used to calculate the diameter of a winder roll being wound
by adding twice the material thickness per winding shaft revolution.
The function block has to be called in a cyclic interrupt, e.g. OB35. ID: 5102
Functionality
The diameter calculator determines the actual diameter value (diameter) of the roll
being wound (or unwound) using the input quantities:
Web Thickness - the actual web (material) thickness.
Shaft speed of the mandrel (shaftSpeed) – Actual speed of the winder shaft.
The actual motor speed is converted to the roll shaft speed (using the gear
ratio) and is used to calculate the diameter.
The holdDiameter input will pause the diameter calculation and hold the resulting
diameter at the current value when set to true.
The setDiameter input writes the diametersetvalue as the diameter as long as the
actual shaft speed is below minimum shaft speed. The diameter set value is
limited.
With the actual shaft speed above minimum and not held, the diameter is
calculated by integrating the diameter change rate based on the web thickness and
mandrel speed. The result of the integration is limited and smoothed.
NOTICE This calculation method relies very much on the accuracy of the material
thickness and the starting diameter value. Any deviation between the actual
effective material thickness and the set material thickness will lead to an
incorrect diameter, whose error will increase with each revolution. An incorrect
initial value will remain as an offset between the actual and the calculated
diameter.
This calculation mode is mostly useful for metals where air entrapment and
inwound tension does not influence the effective material thickness.
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#5102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
4.8.4 WITorquePrecontrol
driveSpeed IN REAL O 0.0 [ rpm ] Actual winder speed (for the friction
characteristic)
variableInertia OUT REAL - 0.0 [ kgm2 or lbft/s2 ] Inertia resulting from the
material, reflected to the motor side.
Functionality
The block determines the following:
The variable moment of inertia for Kp adaptation of the speed and tension
controller
The pre-controlled torque for v/ t
Siemens AG 2014 All rights reserved
The torque pre-control outputs the following torque setpoints to pre-control the
winder drive:
A torque setpoint as a function of the acceleration setpoint of the
machine/system ramp-function generator and the inertia
Friction torque setpoint is generated depending on the shaft speed of the
winder using a characteristic.
Tension torque based on the tension setpoint and the diameter
Copyright
NOTICE The precise setting of the compensation is especially important for indirect
tension control. This is so that the torque-generating current emulates, as far as
possible, the material tension.
Calculations
The function block FBWITorquePrecontrol calculates the following physical
quantities:
Quantity Formula
This friction torque is internally determined using the function block TableChar. The
Copyright
user is responsible for providing valid and sensible values in the appropriate data
fields. If the factor FrictionAdjustment is set to 0.0, TableChar is not called and
therefore a frictional torque is not added.
The pre-control torque of the motor, the sum of all pre-control torques and the
tension torque are calculated depending on the winder type. The total torque is
always the sum of the preCtrlMotor and tensionTorque.
The winding mode is always defined assuming a positive line speed. If the leading
value becomes negative the winding mode will be inverted automatically (a
rewinder becomes an unwinder and vice versa). The same applies for winding from
above and from below. This inversion is automatic.
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Warning Messages
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#4102_8003 Less than two pairs of values in the breakpoint table or uneven number
of points.
Siemens AG 2014 All rights reserved
16#4102_8005 One or more configuration values are invalid – Check Min values, max
values and other settings.
gearRatio 0.0
density < 0.0
diamMin 0.0
diamMax diamMin
width < 0.0
fillFactor 0.0
Jfix < 0.0
Copyright
16#4102_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)
4.8.5 RestLengthCalc
Functionality
Depending on the roll parameters that have been entered, the function calculates
the remaining length of the material on the roll. To do this the following data is
required – the thickness of the material on the roll (webThickness), the actual
Copyright
4.8.6 RestDiameterCalc
Functionality
The function uses the input parameters to calculate the target diameter of the roll.
The calculation relies on the material thickness (webThickness), the actual roll
diameter (actualDiameter) and the material length to be wound or unwound
(length). The winding mode is defined using the windingMode input. The material
thickness (webThickness) is internally limited (MIN_THICKNESS,
MAX_THICKNESS).
In case of a too high material length input the function result is zero.
Winder:
actualDiameter² webThickness length
RestDiameterCalc 2
4
Unwinder:
actualDiameter² webThickness length
RestDiameterCalc 2
4
Siemens AG 2014 All rights reserved
4.8.7 Taper
Functionality
The tension taper characteristic is used to define with which tension the material
should be wound onto the roll as a function of the roll diameter. The tension taper
characteristic is only used when rewinding in order to wind the inner layers tightly.
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.
0 = No taper No tension taper mode is defined, the function block outputs 1.0 (no reduction
factor).
1 = Linear taper From a starting diameter that has to be entered (taperDiameterStart), the reduction
characteristic factor is linearly reduced to the maximum diameter (taperDiameterMax) with a
reduction defined by the parameter taperRatio.
diamActVal < r32TensionTaperDiameterStart:
tensionTaper 1.0
Siemens AG 2014 All rights reserved
Graphical representation
Siemens AG 2014 All rights reserved
Warning Messages
Copyright
Warnings are indicated by the status of the outputs error and errorID: error =
FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#4101_8003 Less than two pairs of values in the breakpoint table or uneven number
of points.
ErrorID Description
16#4101_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)
taperMode < 0
taperMode > 4
4.8.8 WinderConfigSetup
This function block is used to enter individual configuration data into a winder
configuration data structure used by the winder.
Copyright
percentage.
Functionality
This function creates one output structure of WinderConfigType from the
configuration parameters. This is done to reduce the number of input variables on
the winder function block but still give the user easy access.
4.8.9 Winder
enabled)
driveFaultCode OUT DINT - 0 Drive fault code, refer to drive manual for
more information (r2131 from the drive)
driveSpeedActual OUT REAL - 0.0 [ rpm ] Speed actual value (r63 from the
drive)
driveTorqueActual OUT REAL - 0.0 [ Nm ] Torque actual value (r80 from the
drive)
Functionality
This function block utilizes the DriveControl, SetpointChannel, WITorquePrecontrol,
DiamCalc____ and TechPID function blocks of the Simatic Converting Toolbox.
This function block checks for valid configuration data and calls the individual
function blocks to minimize application development time.
With the enable set to true, a plausibility check is done on the configuration data
and will display an error with the corresponding error id should invalid data be
Copyright
entered. This input also enables the control functionality. With the function block
enabled, the driveControl function block will become active and the busy output will
be set to true.
With the enables set true the winder will follow the sum of the lineVelocity and
additionalVelocity multiplied by the draw factor. Winders are typically made to
follow the master without any ramps. Winders with splice are an exception as they
need to be able to be detached from the running machine and therefore have
separate ramps. The programmer is responsible for proper interlocks to prevent
unwanted behavior.
The configuration data has diameter calculation parameters, gear ratio and max
line speed parameters which are used to calculate the correct surface velocity of
the winder to match the section to the master line velocity.
The actual diameter of the winder can either be calculated using one of the
DiamCalc____ function blocks (division, integral, addition) or can also be supplied
from an external source using the configuration structure of the function block.
The configuration data also has parameters for torque pre-control. Torque pre-
control is necessary for torque based tension control modes and is optional for
speed based tension control modes. Speed based tension control modes with the
_HD (high dynamic) prefix include and utilize torque pre-control.
With the enable set to true and DrvReadyForMotion and Cntrlenable then the
CntrlSetpoint will be ramped up based on configuration data. The Tension
controller correction value will be added to the total speed setpoint or additional
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.
n: speed of winder
nO: velocity override for
speed controller
Siemens AG 2014 All rights reserved
overcontrol
Unwind
from below
Unwind
from above
Block diagram
Siemens AG 2014 All rights reserved
Copyright
Warning Messages
Warnings are indicated by the status of the outputs error and errorID:
error = FALSE and errorID <> 16#0000_0000
ErrorID Description
16#0000_0000 No Warning
Error Messages
Error messages are indicated by the status of the outputs error and errorID: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#0000_0000 No error
16#5104_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
The configuration data are checked for plausibility at the rising edge of
enable.
16#3101_8065 Torque Limits may not be plausible any more; a break in the web could
cause this problem. Axis runs in the opposite direction too fast. Reaction:
brake with full torque. (DriveControl)
Copyright
16#3102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(SetpointChannel)
16#1108_8001 The function block is not called in a cyclic interrupt, e.g. OB35. (TPID)
16#5101_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(DiamCalcDivision)
ErrorID Description
16#5103_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(DiamCalcIntegral)
16#5102_8001 The function block is not called in a cyclic interrupt, e.g. OB35.
(DiamCalcAddition)
typeOfWinder > 0
The configuration data are checked for plausibility at the rising edge of
enable.
16#4102_8003 Less than two pairs of values in the breakpoint table or uneven number
of points. (WITorquePrecontrol, friction table)
16#4102_8005 One or more configuration values are invalid – Check Min values, max
values and other settings. (WITorquePrecontrol)
gearRatio 0.0
Copyright
16#4102_84A1 Data block number larger than allowed or zero (SFC 24 / TEST_DB)
(WITorquePrecontrol, friction table)
SectionalConfigType This data type includes all configuration data required for
parameterization of the SectionalDrive function block. ID: 6201
WinderConfigType This data type includes all configuration data required for
parameterization of the winder function block. ID: 4201
4.9.1 SectionalConfigType
TRUE: Metric
limRampTime REAL 1000.0 [ ms ] TPID - Ramp-up time for PID controller output
limiting
overrideVelocity REAL 10.0 [ LU/min ] Speed controller bias (override, overcontrol) for
torque controlled modes
tensionReference REAL 0.0 [ N or lbf ] Reference value for tension setpoint. If set to
zero the setpoint is interpreted as absolute value instead of
a percentage.
JFixed REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, motor side
JMandrel REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, load side
4.9.2 WinderConfigType
minLineVelocity REAL 0.5 [LU/min ] Minimum line velocity for diameter calculation
minShaftSpeed REAL 2.0 [ rpm ] Minimum shaft speed for diameter calculation
measuringRevolution REAL 2.0 [ rev ] Shaft revolution counts for integral diameter
Count calculation
Siemens AG 2014 All rights reserved
limRampTime REAL 1000.0 [ ms ] TPID - Ramp-up time for PID controller output
limiting
overrideVelocity REAL 10.0 [ LU/min ] Speed controller bias (override, overcontrol) for
torque controlled modes
tensionReference REAL 0.0 [ N or lbf ] Reference value for tension setpoint. If set to
zero the setpoint is interpreted as absolute value instead of
a percentage.
JFixed REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, motor side
JMandrel REAL 0.0 [ kgm2 or lbft/s2 ] Fixed moment of inertia, load side
Siemens AG 2014 All rights reserved
Objectives
The Section of this document should provide the user with
The necessary prerequisites to use this standard SIMATIC application as
demonstration system
The preparations and parameterizing operations
The steps necessary when presenting this standard application
Tips on how to use this standard application
Siemens AG 2014 All rights reserved
operated conscious of safety and hazards, and not taking into account all of
the instructions provided in the documentation
The manufacturer assumes no liabilitiy for incorrect use (misuse).
Qualification of personnel
The operating company/person may only deploy trained, authorized and reliable
personnel. In so doing, all safety regulations must be carefully observed.
Personnel must receive special instructions regarding the hazards/dangers that
can occur.
Overview
The demonstration project can be commissioned using a conventional SINAMICS
demonstration case, a SIMATIC S7 300 CPU and a PC connected via Ethernet.
SIMATIC CPU On the CPU run all the programs used for the
application
HMI system
PG/PC with Ethernet interface The PG/PC is used to run the HMI operator interface
Copyright
Procedure
Proceed as follows to configure and mount the hardware components for the
application example:
Nr. Action Comment
NOTICE If the application is only to be used for demonstrating and presenting, then
it is only necessary to install WinCC flexible 2008 Runtime.
STEP 7 V5.5.0.4
Component Functions
STEP7 V5.5 HF4 STEP7 ist the basis package for the other software
packages and is used to program SIMATIC S7
WinCC flexible 2008 Advanced SP3 WinCC flexible 2008 Advanced is used to program
Upd 3 the HMI interface (screen). You cannot change the
HMI machine interface without this software
WinCC flexible 2008 Runtime SP3 WinCC flexible 2008 Runtime allows you to use a
Upd 3 PG/PC as operator panel
Siemens AG 2014 All rights reserved
5.1.4 Downloading the user program and the drive parametrization into the
devices
Copyright
applied network connection to SIMATIC and open its properties. (Right mous
click -> mark properties or symbol and then File -> Properties)
In the area “Components checked are used by this connection” please select
the “Internet Protocol (TCP/IP)” and open its properties
After setting the SIMATIC CPU to factory defaults the Profinet interface may
has the IP 0.0.0.0 and needs to be set by HW-Config or NetPro under
PLC/Ethernet/Edit Ethernet nodes.
Please set the IP of your PG/PC to an address in the same subnet. Example:
Copyright
Load the SIMATIC program into the CPU and the SINAMICS configuration into the drive
Proceed as follows to download the project:
Download all functions and function blocks in SIMATIC Manager into the CPU
Select the SINAMICS drive in SIMATIC Manager and open the drive
configuration with Starter/Scout
Go online with Starter/Scout an download the SINAMICS Configuration into the
training case (make sure that the Profibus cable is connected and the CU has
Profibus address 8)
Save the SINAMICS Project via RAM_TO_ROM to the CF card
Switch the SIMATIC CPU to operating state “RUN”
Here in these instructions you will only be shown and explained the steps
necessary to demonstrate the application. Not all of the operator screens will be
discussed.
Prerequisites
The following prerequisites must be fulfilled in order to use the application example:
The SIMATIC project is provided online in SIMATIC CPU
SINAMICS has beed loaded with the parametrization for the applications
All devices have been powered-up
Siemens AG 2014 All rights reserved
Brief instructions
Execute the steps in the sequence as listed in the following table to demonstrate
the application example:
No. Action Comment
green
Welcome Screen
Siemens AG 2014 All rights reserved
The application screens are handled using the buttons at the lower edge of the
screens and provide on every screen.
Screen Automatic
The automatic screen is the main screen in the automatic mode of the application
example on how to use the winder.
Siemens AG 2014 All rights reserved
Copyright
Screen Technology
Siemens AG 2014 All rights reserved
The technology screen is only set-up to display variables. This therefore shows the
interaction between the winder FB and the central variables – such as material
velocity, dancer roll position, roll diameter and setpooint velocity of the winder.
Copyright
The winder function block with several important input and output variables is
shown in the center of the diagram. A symbolic graphic showing the drive is located
next to it.
The screen control settings 1 is used to enter parameters for the controller gain
adaption and the PID controller. The parameters that are to be set there act directly
on the winder function block. The parameters to set the PID controller also act
Copyright
directly and their effect can, in some cases, also be monitored / visualized.
The “Control Settings 2“ screen allows the diameter calculation to be selected and
the moment of inertia to be calculated. A mechanical system is not connected to
the demonstration system. This is the reason that the varying diameter of the
Copyright
wound roll is simulated. This means that the selectable diameter calculation
techniques are not effective. The diameter sensing via sensor mode is permanently
set. However, various modes are connected to the HMI to show users that the
possibility does exist. The variables are directly connected to the winder FB and
can also be re-used for subsequent use at the machine.
In this case, the settings of the maximum and minimum roll diameter are important
as well as the settings of the individual moments of inertia. The total moment of
inertia is calculated from the moments of inertia of the mechanical system and load
as a function of the diameter of the roll being wound. The torque pre-control is
calculated as a function of this moment of inertia and is entered into the drive as
additive torque setpoint. This calculation can be enabled using the selection field
“ENABLE INERTIA CALC.“.
A tension taper characteristic can be calculated using the “Tension taper“ screen.
Using this tension taper characteristic, the tension with which the material is wound
can be changed depending on the diameter. This is required in order to achieve a
Copyright
uniform, cylindrical structure of the roll being wound. To achieve this, a higher
tension is used at a low diameter and as the diameter increases, the tension is
reduced. It only makes sense to use the tension taper characteristic for winders.
The tension setpoint, determined by the tension taper characteristic, either acts
directly on the control of a suitable dancer roll (for the winding mode with dancer
roll) – or internally on the torque limits of the drive.
5 different tension taper characteristics can be entered in the screen. No
characteristic, linear characteristic, hyperbolic characteristic typ1/typ2 as well as a
characteristic that is interpolated using a table with 10 points. For the linear and
hyperbolic characteristics, the starting diameter, the reduction as a % of the
maximum diameter as well as the magnitude of the tension reduction as a % of the
reference tension can be set.
The characteristic is only displayed after first pressing the button “start tension
taper calculation”. This characteristic is only displayed as a dancer roll is not
connected to the demonstration system.
6 Related literature
6.1 Bibliography
This list is not complete and only represents a selection of relevant literature.
Subject Title
/1/ STEP7 Automating with STEP 7 in STL and SCL
SIMATIC S7-300/400 Author: Hans Berger
ISBN: 978-3-89578-412-5
/2/ STEP7 Automating with STEP 7 in LAD and FBD
SIMATIC S7-300/400 Author: Hans Berger
ISBN: 978-3-89578-297-8
/3/ STEP7 Automating with SIMATIC S7-300 inside TIA Portal
SIMATIC S7-300 Author: Hans Berger
ISBN: 978-3-89578-382-1
/4/ STEP7 Automating with SIMATIC S7-1200
SIMATIC S7-1200 Author: Hans Berger
Siemens AG 2014 All rights reserved
ISBN: 978-3-89578-356-2
Subject Title
Copyright
7 Contact
Siemens AG
Industry Sector
I DT MC PMA APC
Frauenauracher Straße 80
D - 91056 Erlangen
mailto: tech.team.motioncontrol@siemens.com
8 History
Version Date Modifications
V1.0.0 12/2011 First version
V1.0.1 04/2013 Bug fixes
V1.0.2 03/2014 Bug fixes
Siemens AG 2014 All rights reserved