Professional Documents
Culture Documents
Rotary Knife
LRotaryKnife for SIMATIC
Siemens
Application description Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109757260 Support
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
© Siemens AG 2021 All rights reserved
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.
Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.
Table of contents
Legal information ..................................................................................................... 2
1 Basic information ........................................................................................... 6
1.1 The objective and purpose of this standard application ...................... 6
1.1.1 Task .................................................................................................. 6
1.1.2 Advantages ....................................................................................... 7
1.2 Components included in the standard application............................... 8
2 Possible applications ..................................................................................... 9
2.1 Applications ....................................................................................... 9
2.1.1 Approved controllers .......................................................................... 9
2.1.2 Tasks that can be addressed using the core functions ....................... 9
2.1.3 Features of the application ................................................................. 9
2.1.4 Restrictions ..................................................................................... 11
2.1.5 Details regarding Printmarkcorrection .............................................. 11
2.1.6 Details regarding Interrupt-/ Continue Production ............................. 15
2.2 Application environment................................................................... 16
3 Geometry and function ................................................................................ 17
3.1 Design of the Rotary Knife ............................................................... 17
3.2 Rotary knife cams ............................................................................ 19
3.2.1 Structure of a cam for cyclic operation ............................................. 19
3.2.2 Segment structure of a cam for rotary knife ...................................... 21
© Siemens AG 2021 All rights reserved
1 Basic information
1.1 The objective and purpose of this standard application
1.1.1 Task
A material web fed in using a material feeder unit is to be cut into equal parts.
A rotary knife is used as cutting tool in order to process high feed rates and short
format lengths of the cut parts.
The crosscutter comprises a rotating roll; one or several knives are attached to its
circumference. While the roll rotates, the knife cuts the material strip fed-in below
the roll into equal, defined sections.
Rotary Knife
Feeder
Material infeed cutted material cutted material
Material flow
© Siemens AG 2021 All rights reserved
When developing a crosscutter, the control of the rotating crosscutter axis must be
programmed so that during the cut the crosscutter motion is synchronized with the
material web. Between the cuts, the crosscutter axis is moved with a special
velocity profile. This means that in time for the next step, synchronized motion can
be resumed. The next cut can then be made.
The term "Rotary Knife" is representative in the subsequent text for all other
conceivable machine versions.
Definition
Further, the term "Knife" is representative for the part of the machine that is in
direct contact with the material when a cut is made.
1.1.2 Advantages
The standard SIMATIC Rotary Knife application described here helps to realize the
tasks indicated and allows a functioning crosscutter to be quickly developed.
As core function, the standard application already includes preconfigured motion
control of the rotary knife axis. It can be adapted to the required application using
the appropriate parameters. The core function handles the complete control of the
rotary knife axis.
Using the user program, only the material feed has to be controlled and the core
function parameterized.
Further, the standard application includes a block to connect a user interface (HMI)
to test and diagnose rotary knife functions.
The standard SIMATIC Rotary Knife application offers users the following
advantages:
• Fast program generation
Based on the standard SIMATIC Rotary Knife application, comprehensive
crosscutter functionality can be quickly implemented by generating the
appropriate program with SIMATIC.
The core functions included in the standard application can be quickly and
simply transferred into the application to be generated by copying. Configuring
steps that are additionally required are explained in this description of the
standard application.
© Siemens AG 2021 All rights reserved
In this way, the core functions of the standard SIMATIC Rotary Knife application
can be quickly and simply integrated into a user project that you have generated
yourself.
© Siemens AG 2021 All rights reserved
2 Possible applications
2.1 Applications
2.1.1 Approved controllers
The SIMATIC Rotary Knife standard application can run on any SIMATIC 15xx T(F)
controller.
The "Rotary Knife" core function completely handles the motion control of the
rotary knife axis. The functionality of the material feed is implemented outside the
© Siemens AG 2021 All rights reserved
The following features have been implemented and can be used in the user
program.
The following functions are available in the SIMATIC Rotary Knife standard
application:
• Constant cutting curve with optional over velocity
During the cut, the material and crosscutter axis move with the same
(circumferential) velocity - or optionally with an over velocity.
• Polynomial cutting curve
The cutting curve is defined using over velocities
– At the beginning of the cut
– At the "zero" position within the cut itself
– At the end of the cut
• Cosine cutting curve
The cutting curve is defined by start sync angle of cutting area
– Automatic calculation of overspeed at the beginning of the cut
– The cutting curve ends at the "zero" position
– At the end of the cut the linear cutting curve “kickout” is commended
• Cam profile
Cams are defined for the motion control of the crosscutter axis. The following
cam profiles can be parameterized:
– Linear (constant acceleration)
– Trapezoidal (jerk limiting)
– Polynomial 5
– Sinusoidal
– Polynomial 6
• Print mark correction with adjustable correction speed
During operation, users can correct deviations of print marks that have been
identified using superimposed motion. More in detail at Details regarding
Printmarkcorrection.
• Activating/deactivating the print mark correction while operational
Print mark correction can be activated/deactivated while the system is
operational. Starting from a specific start position is not required for
synchronization. More in detail at Details regarding Printmarkcorrection.
• Multi-knife systems
The SIMATIC Rotary Knife application supports multi-knife systems.
• Quiescent position of the crosscutter axis can be adjusted
The quiescent position of the knife between two cuts can be parameterized.
• Defined start and stop behavior
The start and stop behavior of the crosscutter axis is implemented using
special cams. Therefore, the motion control of the crosscutter axis before and
after cuts can be precisely determined.
• Constant velocity during cut
This function should be activated when strong interferences disturbing the run
of the knife during cut.
© Siemens AG 2021 All rights reserved
In this case, while the RotaryKnife is in the synchronous cut area, the
AuxiliaryAxis will decouple from the master (leading value) and will continue to
move at the last speed measured before entering the cut area. At the end of
the cutting area, the AuxiliaryAxis is again coupled to the master value A
possibly occurring length error is detected and corrected with the methods of
the print mark correction
(This correction is working with or without activated print mark correction)
• Precontrol of the accelerating torque
The motor torque required to accelerate and decelerate the rotary knife is
derived from the acceleration profile - and is pre controlled with precise timing.
• Interruption of automatic crosscutter operation
When the material web is at a standstill, automatic crosscutter operation can
be interrupted. The crosscutter and material web axis are disabled. The
crosscutter can then freely move; however, the material web only backward
(generally this happens automatically as a result of the tension in the material
web!). Once the fault has been resolved, operation is resumed at the position
left at the interruption and automatic crosscutter operation continues without
any waste.
• Cutting torque pre control
An additional torque set point can be entered within the cutting range using an
interpolation point table with up to 10 interpolation points.
• "Utilize inertia" using a pendulum cut
Above a cut length of 4 x knife circumference (see Fig. 3-1), the cam
calculation permits a pendulum cut to be made. The pendulum curve is then
automatically generated if the following applies:
Starting angle + 5° < 180° < stopping angle + 5°
The "Single cut" operating mode also allows a "Utilize inertia" type cutting
behavior when the start and stop positions are suitably selected.
"DCLPC" expansion
The following function is additionally provided in the "DCLPC" expansion of the
SIMATIC Rotary Knife standard application:
DC link voltage pre control
to control a capacitor bank for optimum energy usage
This function allows the infeed power to be reduced to just cover the power
loss - the power required for accelerating and braking
is provided/absorbed by the battery of capacitors.
Using the currently required cam (format length, cam profile and over speed),
using an iteration technique, the function calculates the maximum possible
material velocity, taking into account the limit values defined by the power
ratings of the infeed, converter and motor.
• Calculation of the performance curves of the rotary knife considering the
power ratings of the infeed unit, converter and motor
Over one cut length range, using the Vmax calculation, this function
determines curves of Vmax as well as the power data of the motor, converter
and infeed unit being used.
2.1.4 Restrictions
The following functions were not taken into consideration when implementing this
application:
• Non-linear cutting characteristic
The application cannot be used unchanged if the cutting characteristic must be
influenced by a non-linear cutting curve, which cannot be emulated using a
polynomial cutting curve with velocity peaks or corresponds to a cosine cutting
curve.
• Seamless continuation of a cut after an error stop
If the crosscutter develops a fault during the cut, then the application does not
allow the cut to be continued. Crosscutter operation can only be resumed after
the cause of the error has been resolved and acknowledged, which is only
possible by traversing to the initial position.
Print mark correction is used to detect deviations from the set product length with
the help of a sensor and print marks, or other detection criteria on the web, to
Figure 2-1
Startposition
startPosAtSensor masterSyncPosition
Sensor
DistanceToSensor
© Siemens AG 2021 All rights reserved
Position 1. Printmark
Startlength
For all print mark positions that are detected before the first cut, the deviations from
the set format length are calculated "cutPositionDeviationMeasured(i)" and entered
in the "cutPositionBuffer". In the cut, the Rotary Knife changes from the start cam
to the cyclic cam. At the same time cutPositionDeviationMeasured(1) is read from
the buffer and the correction value for the next cut is forwarded to the AuxiliaryAxis.
The further procedure is described in the subitem "cyclic correction".
Figure 2-2
cutPosAtSensor cutPosAtCut
Cutposition
startPosAtSensor
Sensor
cutPositionCorrectionOn := TRUE
cutPositionCorrectionBasicCorrectionValue
Cyclic correction
If the cross cutter is no longer in the synchronous area and is therefore no longer in
material contact, cutPositionDeviationMeasured(i) is read from the
"cutPositionBuffer". This deviation is compensated in the AuxiliaryAxis via a
MC_PosSuperimposed command. The following adjustments are already included
in the print mark correction:
© Siemens AG 2021 All rights reserved
Figure 2-3
mark correction can be read. These function blocks call further sub functions and
function blocks which are needed for the print mark correction
(LRK_CutPositionBufferRead/-Out/-In/-Reset).
All mentioned data types are located in the UsersInterface.
• LRK_CutPositionMeasuring: Measurement value detection
• LRK_Servo: Contains the clock-synchronous detection of the cut position.
• LRK_RotaryKnife: Initiates the measurement value measurement cyclically and
contains, among other things, the reading of the correction values, the
recognition of the correction conditions and the output of the correction
movement to the AuxiliaryAxis.
In case of a standstill of the web, the automatic cross cutter operation can be
interrupted, e.g. in case of malfunctions or short maintenance work. The cross
cutter and virtual web axis (Auxiliary Axis) are deactivated. The cross cutter may
then be moved freely. If possible, the web should not be moved. If it is moved,
which is often done automatically by the web tension, the following points should
be noted:
• The web position is not allowed to be moved so far that the cutter passes the
cutting area.
• The difference of the web position during "Interrupt Production" is not allowed
to exceed half a format length.
Once the defect has been eliminated or the maintenance is done, the drive is
switched on again with "continue production" and the cross cutter axis is brought
into position. Automatic cross cutter operation is thus continued without scrap.
Sequence
Interrupt Production:
1. cross cutter in automatic mode, production interruption "interrupt production" =
true requested. Production not yet interrupted "production interrupted" = false.
2. waiting for the web to come to a standstill.
3. Current positions are automatically stored temporarily.
4. axes are set in simulation and deactivated.
Continue Production:
1. cross cutter in automatic mode, production interruption "production interrupted"
= true and resumption of production requested "continue production" = true.
2. enabling of the axes
3. repositioning of the axes
4. start cam and gear synchronization
NOTE Interrupt -/ Continue Production does not take over any saftey functionalities
such as Safe Torque Off (= STO).
Fig. 2-1 Application environment of the SIMATIC Rotary Knife standard application
PG/PC S7-1511 T
SINAMICS S120
Encoder
RotaryKnife
Motor
© Siemens AG 2021 All rights reserved
Meas. RotaryKnife
encoder
Feeder
Material infeed cutted material cutted material
Material flow
Motor
Feeder
Encoder
A SIMATIC S7-1500 T controller can be used to control the material feed and the
drive control of the rotary knife. Alternatively, a coupling using a machine encoder
(measuring encoder) is also possible.
Fig. 3-1 Geometrical variables used for the "Rotary Knife" standard application
InflectionPoint
FormatArea
KnifeCircumference
SynchronArea
Sensor
StopAngle
© Siemens AG 2021 All rights reserved
StartAngle
StartSyncAngle EndSyncAngle
Synchronous sector
Synchronous sector is calculated from the synchronous angle and the
circumference. The synchronous angle is defined by the StartSyncAngle and the
EndSyncAngle. Cutting takes place within this range, and the knife moves
corresponding to the defined cutting curve.
Format sector
The rotary knife axis moves in the format sector between two cutting operations.
The dynamic response values of the rotary knife axis must be selected so that
motion control is possible within this range; this means that the rotary knife axis
can move through the length of the format sector – with all acceleration and
deceleration phases between two cutting operations – so that it can again have the
same velocity as the material web. The resulting dynamic response values can be
influenced by the profile type, the length of the format sector and the material web
velocity.
The format sector is obtained according to the following formula:
Basic structure
Fig. 3-2 Range of a cam for Rotary Knife
Cutting point
Circumference Rotary Knife
200 mm
Format sector
180 mm
Synchronous
© Siemens AG 2021 All rights reserved
Cutting point
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Warenbahn
The cam has two essential tasks:
1.) Defining the cutting curve in the synchronous sector
The shape of the cam in the synchronous sector is derived from the
specification of the cutting curve. The cutting curve is independent of the
format length.
2.) Adapting the format in the format sector
The shape of the cam in the format sector is derived from the difference
between the circumference and format length and is therefore dependent on
the format length.
This is the reason that the cutting point (defined as the 0 position) is selected as
the changeover point of the cam. This is because the synchronous sector is always
identical, and therefore a changeover can be made without any jerk.
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Circumference Rotary Knife Web
20 mm
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Circumference Rotary Knife Web
20 mm
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Circumference Rotary Knife Web
Cam Description
Circumference Rotary Knife Circumference << format length
200 mm If the format length is 4x greater than the
circumference, then the cam calculation
permits pendulum motion if the following
180 mm applies:
Starting angle + 5° < 180° < stopping angle
+ 5°
100 mm
Pendulum operation reduces the resulting
acceleration and deceleration levels
20 mm
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Circumference Rotary Knife Web
As the format length increases, there is a risk that the knife moves backwards into
the synchronous sector. This can cause damage and must be avoided. The format
length, above which there is a risk of backward motion, is known as the critical
length.
© Siemens AG 2021 All rights reserved
Therefore, the format sector of the cam is subdivided into three segments. For
format lengths greater than the critical length, this allows the knife to dwell at the
starting position.
Fig. 3-3 Diagram showing the segments, which comprise the cam of the rotary knife
200 mm
180 mm
100 mm
20 mm
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Web
• Segments I and V define the synchronous sector, and therefore the specified
cutting curve.
• Segments II, III and IV define the format sector.
20 mm
0 mm
0 mm 20 mm FormatLength – 20 mm FormatLength
Web
Using a linear cutting curve, thin materials can be essentially cut in the form of
points. At the cutting point, the circumferential velocity of the knife is precisely the
same as that of the material web. As the material thickness increases, the material
is compressed as the knife enters and exits the material. (vectoral breakdown of
the circumferential velocity in the material direction!)
Knife Speed V
Maximum
Speed
Synchron
Speed
(Web Speed)
Knife Knife
In Out
Synchron Synchron
Area Format Area Area
endSyncAngle startSyncAngle t
Cycle Time
0
CuttingPoint
For thicker materials, generally special cutting curves must be developed that
equalize these velocity differences. The application allows cutting curves to be
defined using velocity increases (start of the cut, center of the cut, end of the cut).
A 5th degree polynomial is used to interpolate between these points.
Knife Speed V
Maximum
Speed
Synchron
Speed
(Web Speed)
Knife Knife
In Out
Synchron Synchron
Area Format Area Area
endSyncAngle startSyncAngle t
0 Cycle Time
Cutting Point
4
Manual
1 0
Disable Error
2
Startposi-
tion
5
Single
© Siemens AG 2021 All rights reserved
3 Cut
Auto-
matic
Users can employee these operating modes to implement their rotary knife
functionality in the user program and can be controlled at the FB LRK_RotaryKnife
using input parameters.
FB LRK_RotaryKnife shows the actual state that has been reached using output
parameter "status".
1
2
No. Task
1. All the rotary knife standard application blocks are saved in this group.
Drag all the blocks belonging to the version to be selected (basic, DCLPC or Vmax
((not tested at depth in the field!)) and drop into the user program.
Overview
Fig. 4-1 Master copies LRotaryKnife_Blocks (overview)
1
2
3
4
5
6
3. LRK_RotaryKnife_DB
Instance data of the core block of the "Rotary Knife" standard application
4. BasicBlocks
This group contains all of the blocks required for the standard application.
5. DCLPCBlocks
This group contains all the blocks that are required to expand the standard application to include
the "DCLPC" AddOn.
6. VmaxBlocks (not tested at depth in the field!)
This group contains all the blocks that are required to expand the standard application using
AddOn "DCLPC" and AddOn "Vmax" (AddOn "Vmax" requires AddOn "DCLPC" as basis).
Overview
Fig. 4-2 Master copies LRotaryKnife_Blocks
6
© Siemens AG 2021 All rights reserved
AxisBlocks
1
2
3
4
Coupling block between the axis control and core block of the "Rotary Knife" for the auxiliary axis
2. LRK_LeadingValue
Coupling block between the axis control and core block of the "Rotary Knife" for the leading value
- with automatic identification as to whether the leading value is an external encoder or an axis.
3. LRK_LeadingValueMeasuringInput
Control block of the measuring input "Rotary Knife" core block.
4. LRK_RotaryKnifeAxis
Coupling block between the axis control and core block of the "Rotary Knife" for the
RotaryKnifeAxis
CamCalculationBlocks
1
2
3
DataBlocks
1
2
3
4
5
6
InternalAxisFunctionBlocks
1
2
3
Internal "axis FB" to control an external encoder via the axis FB interface
2. LRK_IAFB_Pos
Internal "axis FB" to control a positioning axis via the axis FB interface
3. LRK_IAFB_Sync
Internal "axis FB" to control a synchronous axis via the axis FB interface
Note The use of this function block is explained in the following in Chapter
6.4.1 LRK_AuxiliaryAxis Table 6-6 Switching over to reduced axis handling (Part 1)
0
LRK_LeadingValue Table 6-7 Switching over to reduced axis handling (Part 2),
LRK_EncoderAsAAMaster Table 6-12 Switching over to reduced axis handling (Part 3),
LRK_SyncAxisAsAAMaster Table 6-14 Switching over to reduced axis handling (Part 5),
LRK_EncoderAsLVSAMaster Table 6-15 Switching over to reduced axis handling (Part 6),
LRK_PosAxisAsLVSAMaster Table 6-16 Switching over to reduced axis handling (Part 7),
Organization blocks
1
2
3
No. Block
1. LRK_Main
"OB1" of the Rotary Knife standard application
2. LRK_Startup
Starting OB of the Rotary Knife standard application
3. MCPreServo
MCPreServo prepared with the call of the FB LRK_Servo
SubBlock
Fig. 4-8 SubBlocks
1
2
3
4
5
6
7
8
© Siemens AG 2021 All rights reserved
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
9. LRK_EncoderAsAAMaster
Block to call the axis FB for the auxiliary axis with external encoder as master
10. LRK_EncoderAsLVSAMaster
Block to call the axis FB for the leading value axis as synchronous axis with external encoder as
master
11. LRK_GetAccelerationTorqueValue
Block to determine the actual accelerating torque for torque pre control
12. LRK_GetAuxRotAxisServoValues
Block to read out the reduced actual axis data of auxiliary axis and rotary knife axis in the servo
clock cycle
13. LRK_GetCamServoValues
Block to read out significant values from a TO_Cam in the servo clock cycle for the Rotary Knife
standard application
14. LRK_GetCamValues
Block to read out significant values from a TO_Cam for the Rotary Knife standard application
15. LRK_GetExternalEncoderValues
Block to read out significant values from a TO_ExternalEncoder for the Rotary Knife standard
application.
16. LRK_GetLVExtEncServoValues
Block to read out significant values from a TO_ExternalEncoder for the Rotary Knife standard
application in servo clock.
17. LRK_GetLVPosAxisServoValues
Block to read out significant values from a TO_PositioningAxis for the Rotary Knife standard
application in servo clock.
18. LRK_GetLVSyncAxisServoValues
Block to read out significant values from a TO_SynchronousAxis for the Rotary Knife standard
application in servo clock.
19. LRK_GetPosAxisValues
Block to read out significant values from a TO_PositioningAxis for the Rotary Knife standard
application.
No. Block
20. LRK_GetSyncAxisValues
Block to read out significant values from a TO_SynchronousAxis for the Rotary Knife standard
application.
21. LRK_MCResetCAM
Block to reset the TO_Cam
22. LRK_MCResetMI
Block to reset the TO_MeasuringInput
23. LRK_MCTorqueAdditive
Block to call the MC_TorqueAdditive with DB_ANY as TO reference.
24. LRK_PosAxisAsAAMaster
Block to call the axis FB for the auxiliary axis with positioning axis as master
25. LRK_PosAxisAsLVSAMaster
Block to call the axis FB for the leading value axis as synchronous axis with positioning axis as
master
26. LRK_Servo
Block to generate signals "Cut", "KnifeInSynchronousSector" and "KnifeInFormatSector" as well
as to call calculations for cutting torque and acceleration torque from the PreServo OB.
27. LRK_SyncAxisAsAAMaster
Block to call the axis FB for the auxiliary axis with synchronous axis as master
28. LRK_SyncAxisAsLVSAMaster
Block to call the axis FB for the leading value axis as synchronous axis with synchronous axis as
© Siemens AG 2021 All rights reserved
master
29. LRK_SyncAxisAsRKMaster
Block to call the axis FB for the rotary knife axis with synchronous axis as master
Test blocks
Fig. 4-9 Test blocks
1
2
1
2
3
1. HMI_1_Basic
HMI project for the Rotary Knife application
2. HMI_1_DCLPC
HMI project for the Rotary Knife application with AddOn DCLinkPreControl
3. HMI_1_Vmax (not tested at depth in the field!)
HMI project for the Rotary Knife application with AddOn DCLinkPreControl and AddOn Vmax
calculation.
Overview
Fig. 4-12 Master copies LRotaryKnife_Types (overview)
1
2
3
1
2
3
4
5
6
7
8
9
10
11
12
13
3
14
15
16
17
© Siemens AG 2021 All rights reserved
18
19
20
21
22
23
24
25
No. Block
9. LRK_typeCuttingTorquePreControlAngle
Data structure to enter the cutting torque via the knife angle
10. LRK_typeCuttingTorquePreControlPosition
Data structure to enter the cutting torque via the knife position
11. LRK_typeGetAuxRotAxisServoValues
Data structure to display TO data from AuxiliaryAxis and RotaryKnifeAxis read in the servo clock
cycle
12. LRK_typeGetCamServoValues
Data structure to display TO data of a cam read in the servo clock cycle
13. LRK_typeGetLVServoValues
Data structure to display TO data of leading value read in the servo clock cycle
14. LRK_typeLeadingValueCommand
Data structure to control the leading value
15. LRK_typeLeadingValueMeasuringInputCommand
Data structure to control the measuring input at the leading value
16. LRK_typeLeadingValueMeasuringInputOutput
Data structure of the return information of the measuring input at the leading value
17. LRK_typeLeadingValueOutput
Data structure of the return information of the leading value
18. LRK_typeLeadingValueTOs
© Siemens AG 2021 All rights reserved
– For "Cam_2"
a TO_Cam as cyclic cam
– For "Cam_3"
a TO_Cam as stop cam
Note The startup organization blocks of the example supplied with the LRotaryKnife
library are set to the TO designations listed above. If, for system-specific
reasons, users employ different TO designations, then these must be adapted in
the startup organization blocks.
LeadingValueAxis
Leading MeasuringInput
Value
Axis Cam 1
1:1 RotaryKnife
Auxiliary Cam 2
Axis Axis
1:1
Cam 3
LeadingValue
External
Encoder LeadingValue TO_SynchronousAxis
ExternalEncoder TO_PositioningAxis
MeasuringInput TO_ExternalEncoder
TO_MeasuringInput
SynchronousOperation
Auxiliary axis
The auxiliary axis is coupled to the leading value in a 1:1 gearing relationship and
is used to decouple the leading value motion from the cam motion of the rotary
knife axis.
For example, this decoupling is required for print mark correction, which is
executed as superimposed positioning of the auxiliary axis.
Cam axis
The rotary knife axis is coupled to the auxiliary axis through a camming
relationship.
3 cams are available:
• Cam 1, start cam or cyclic cam
• Cam 2, cyclic cam
• Cam 3, stop cam
As leading value TO for the rotary knife, you can either use
5. A TO axis (TO_PositioningAxis/TO_SynchronousAxis) or
Action
2. Configure
• axis type
• dimension units
• modulo
Action
4. The settings for
• encoder
• data exchange, drive
• data exchange, encoder
• mechanical system
• dynamic response
default setting
• Emergency Stop
• position limits
• dynamic limits
• torque limiting
• fixed stop detection
• homing active/passive
• position monitoring
• standstill signal
• following error
must all be carried out
5. The control parameters are
set here.
Recommended setting in
conjunction with SINAMICS
© Siemens AG 2021 All rights reserved
S120
Precontrol = 100.0 %
Speed control loop substitute
time = 0.0 s
2. Configure
© Siemens AG 2021 All rights reserved
• encoder type
• dimension units
• modulo
The "LeadingValue
ExternalEncoder" can be
operated with or without
modulo.
If the encoder is to be
operated without modulo, it
must be ensured that the
axis is reset from time to
time, as otherwise
inaccuracy problems can
occur.
Action
3. Here, the
PROFIdrive encoder is
assigned to
TO LeadingValue
ExternalEncoder
2. Configure
• axis type
• dimension units
• modulo
Action
3. TO AuxiliaryAxis is not
assigned to any drive as this
involves a virtual axis!
• homing active/passive
• position monitoring
• standstill signal
• following error
must be made depending on
the application
5. Under Mechanics, parameter
Leadscrew pitch must be set
to value KnifeCircumference
Action
7. The control parameters are
set here.
Recommended setting as a
virtual axis
Precontrol = 100.0 %
Speed control loop substitute
time = 0.0 s
2. Configure
• axis type
• dimension units
• modulo
• simulation
Action
3. The drive type is selected
here.
(for example, PROFIdrive)
and the drive assignment.
• Emergency Stop
• position limits
• dynamic limits
• torque limiting
• fixed stop detection
• homing active/passive
• position monitoring
• standstill signal
• following error
must be made depending on
the application
5. Under Mechanics, parameter
Leadscrew pitch must be set
to value KnifeCircumference
Action
6. Here, the leading value
interconnections must be
entered with their associated
coupling type as set point
coupling.
7. The control parameters are
set here.
Recommended setting in
conjunction with SINAMICS
S120
Precontrol = 100.0 %
Speed control loop substitute
time = 0.0 s
2. It is not necessary to
configure the cam,
the application does this
automatically when
generating the cam.
3. For cams
"Cam_2" and "Cam_3"
repeat step 1.
LRK_Main
userConfig
internalConfig userConfig
internalConfig
LRK_RotaryKnife
© Siemens AG 2021 All rights reserved
EN ENO
formatLength done
execute busy
mode error
startSingleCut errorId
numberOfInstanz state
LRK_Data
automatic
Active
axisTOs
singleCut usersInterface
Active
cutPositionBufferManagement
cutPosition camCalculation
CorrectionActive
flyingSawInfo
rotaryKnifeAxis measuringValue
Active
activeCam userCommandRotaryKnifeAxis
rotaryKnifeAxis userConfigRotaryKnifeAxis
rotaryKnifeAxis Command InternalCommandRotaryKnifeAxis
Output
auxiliaryAxis InternalConfigRotaryKnifeAxis
auxiliaryAxis Command
Output outputRotaryKnifeAxis
userCommandAuxiliaryAxis
leadingValue
userConfigAuxiliaryAxis
Output
InternalCommandAuxiliaryAxis
rotaryKnifeAxisConfig
InternalConfigAuxiliaryAxis
auxiliaryAxisConfig outputAuxiliaryAxis
usersInterface internalCommandLeadingValueMeasuringInput
camCalculation outputLeadingValueMeasuringInput
commandLeadingValue
rotaryKnifeInfo
configLeadingValue
measuringValue
outputLeadingValue
cutPositionBufferManagement
leadingValueMeasuringInputOutput
leadingValueMeasuringInputCommand
LRK_Test
EN ENO
Block name
LRK_Data
LRK_Data
rotaryKnife
Array[0..“MAX_NUMBER_OF Array[0..“MAX_NUMBER_OF_
_ROTARY_KNIFE-1“] of ROTARY_KNIFE-1“] of
„LRK_typeRotaryKnife“ „LRK_typeRotaryKnife“
OB1_RunTimeMem
LREAL LREAL
© Siemens AG 2021 All rights reserved
OB1_RunTimeMax_µs
LREAL LREAL
OB1_RunTimeMean_µs
LREAL LREAL
IPO_RunTimeMax_µs
LREAL LREAL
IPO_RunTimeMean_µs
LREAL LREAL
Servo_RunTimeMax_µs
LREAL LREAL
Servo_RunTimeMean_µs
LREAL LREAL
PreServo_RunTimeMax_µs
LREAL LREAL
PreServo_RunTimeMean_µs
LREAL LREAL
PostServo_RunTimeMax_µs
LREAL LREAL
PostServo_RunTimeMean_µs
LREAL LREAL
HMI_Init
BOOL BOOL
HMI_DCLPC_Existent
BOOL BOOL
HMI_DCLPC_Init
BOOL BOOL
HMI_Vmax_Existent
BOOL BOOL
HMI_Vmax_Init
BOOL BOOL
Data structure
Block name
LRK_RotaryKnife
Task
The block includes the following functions:
• Operating mode manager of the application, including operating modes
ERROR, DISABLE, MANUAL, STARTPOSITION, AUTOMATIC and
SINGLE_CUT
• Automatic format change
• Individual processing program
• Control to calculate the travel profiles, including the linear (constant
acceleration), trapezoidal (defined jerk limiting), polynomial and sinusoidal
profile types
• Print mark correction
• Synchronizing to the material web
© Siemens AG 2021 All rights reserved
LRK_RotaryKnife
LRK_type
rotaryKnifeAxisCommand RotaryKnifeAxis
Command
Command Command
LAxisCtrl_type rotaryKnifeAxisConfig LAxisCtrl_type
AxisConfig AxisConfig
Block parameters
Input parameters
Name Data type Initial Description
value
formatLength REAL 200.0 Length of the cut material in mm.
An active operating mode switchover is activated via
Execute BOOL FALSE
this input.
Using mode, the mode is preselected, which is
activated with the next positive edge at the execute
input.
LRK_OM_ERROR (0): Preselection ERROR mode
Operation LRK_OM_DISABLE (1): Preselection DISABLE mode
ModesRotary LRK_OM_ LRK_OM_START_POSITION (2): Preselection
Mode
KnifeType ERROR STARTPOSITION mode
(DINT) LRK_OM_AUTOMATIC (3): Preselection AUTOMATIC
mode
LRK_OM_MANUAL (4): Preselection, MANUAL
LRK_OM_SINGLE_CUT (5) mode: Preselection
SINGLE_CUT mode
startSingleCut BOOL FALSE Start of a single cut in the SINGLE_CUT mode.
numberOfInstance INT 0 Instance number of the actual call.
LRK_type
Interface with all the rotary knife axis data relevant for
rotaryKnifeAxisOutput RotaryKnifeAxis
the rotary knife block
© Siemens AG 2021 All rights reserved
Output
LRK_type
Interface with all the auxiliary axis data relevant for the
auxiliaryAxisOutput AuxiliaryAxis
rotary knife block
Output
LRK_type
Interface with all of the leading value data relevant for
leadingValueOutput LeadingValue
the Rotary Knife block
Output
Output parameters
Name Data type Initial Description
value
cutPositionCorrection
BOOL FALSE Correction motion for the actual cut position is active
Active
Input/output parameters
Name Data type Initial Description
value
LRK_type
auxiliaryAxis Internal interface to operate the auxiliary axis from the
AuxiliaryAxis
Command rotary knife block.
Command
LAxisCtrl_type Definition of all of the axes, external encoders, cams and
rotaryKnifeAxisConfig
© Siemens AG 2021 All rights reserved
cutPositionBuffer LRK_type
Internal data area for entering precise cut position and
CutPositionBuffer
Management cut position deviation for the print mark correction.
Management
LRK_type
leadingValue LeadingValue Interface with all of the measuring input data at the
MeasuringInputOutput Measuring leading value data relevant for the rotary knife block
InputOutput
LRK_type
leadingValue
LeadingValue Internal interface to operate the measuring input of the
MeasuringInput
Measuring leading value by the rotary knife block.
Command
Command
Functionality
Function block LRK_RotaryKnife is the most important element of the application.
The connected rotary knife is parameterized and controlled using this block.
includes possible operating states, which can be activated and shows possible
operating mode changes that can be initiated by the user:
RESTART
4
Manual
1 0
Disable Error
2
Startposi-
tion
5
Single
Cut
3
Automa- Standard Zustandsübergang
tic Fehlerzustandsübergang
Automatische Zustandswechselkette
Fig. 6-3 Inputs and outputs of the operating mode switchover function
CutLength Done
Execute Busy
Mode Error
„FBRotaryKnife()“ ErrorID
State
To transition the block into an operating mode, the number of the required
operating mode must be specified at input mode. The switchover is activated using
a rising edge at the execute input.
The active switchover to the new block operating mode is signaled using a high
signal at output busy. If all switchover actions are successfully performed, and the
new operating mode is reached, this is indicated by a high signal at output done of
the block. The number of the new operating mode can be read at output state.
The signal sequences for operating mode changes most frequently used are
shown in the following diagrams:
© Siemens AG 2021 All rights reserved
Fig. 6-4 Signal sequence when changing the operating mode from
ERROR → DISABLE
execute 1
(IN) 0
mode
DISABLE
(IN)
done 1
(OUT) 0
busy 1
(OUT) 0
error 1
(OUT) 0
errorId
???? H 0000 H
(OUT)
state
ERROR CHANGING DISABLE
(OUT)
Fig. 6-5 Signal sequence when changing the operating mode from
DISABLE → STARTPOSITION
execute 1
(IN) 0
mode
STARTPOSITION
(IN)
done 1
(OUT) 0
busy 1
(OUT) 0
state
DISABLE CHANGING STARTPOSITION
(OUT)
rotaryKnifeAxisActive 1
(OUT) 0
Fig. 6-6 Signal sequence when changing the operating mode from
STARTPOSITION → AUTOMATIC
execute 1
(IN)
© Siemens AG 2021 All rights reserved
mode
AUTOMATIC
(IN)
done 1
(OUT) 0
busy 1
(OUT) 0
state
STARTPOSITION CHANGING AUTOMATIC
(OUT)
automaticActive 1
(OUT) 0
rotaryKnifeAxisActive 1
(OUT) 0
Each time the control system powers up, initialization must be executed by
setting the restart bit ("LRK_Data".rotaryKnife(0).usersInterface.restart) in the
Note startup OB (this is realized automatically when using the LRK_Startup
organizational block)
After restart, the block checks the essential parameters of the technology as well
Note as the existence of technology objects that have been saved
© Siemens AG 2021 All rights reserved
execute 1
(IN) 0
mode
beliebig
(IN)
done 1
(OUT) 0
busy 1
(OUT) 0
error 1
(OUT) 0
errorId
0000 H
(OUT)
state
beliebig CHANGING ERROR CHANGING DISABLE
(OUT)
automaticActive 1
(OUT) 0
rotaryKnifeAxisActive 1
(OUT) 0
usersInterface.restart 1
b)
(UI) 0
a)
a) In the ERROR mode, after restart, the function block goes through a complete
initialization cycle.
b) After the block has been successfully initialized, the restart bit is automatically
reset again.
Task
The default start situation of the LRK_RotaryKnife is synchronization at the start of
the material. However, if the crosscutter is to start and be synchronized with the
material already in the crosscutter, then the program must run through another
synchronization mechanism.
The quick start bit is used to make a differentiation as to which synchronization
mechanism the user requires.
Principle of operation
Table 6-1 Principle of operation of the quick start bit
quickStart Description
=1 The rotary knife immediately synchronizes with mode = 3 and execute
= true, independent of the actual material position.
=0 The rotary knife synchronizes with mode = 3 and execute = true only
© Siemens AG 2021 All rights reserved
Synchronizing mechanism
Task
The task of the example is to synchronize the rotary knife at the start of the
material. This should be done so that the first cut is realized precisely after the
specified cutting length after the start of the material.
Table 6-2 Synchronizing the rotary knife
Phase Representation What happens
Initial situation:
• No material in the cutting range
• The knife is at the zero position
• The quick start bit is not set!
• The user switched the LRK_RotaryKnife
1 into the DISABLE mode
Sensor
Initial situation:
• No material in the cutting range
• The knife is located at its start position
• The STARTPOSITION operating mode is
Startposition active
Task of the user:
Sensor
2
Change the operating mode to
AUTOMATIC
Initial situation:
• The material has reached the sensor, and
the measuring input function has
received the first measured value relating
to the material position
Startposition
• The knife is located at its start position
Sensor
Initial situation:
• The material has reached the rotary knife
The start cam has been started once this
synchronous position was reached
Startposition
4
Sensor
Distance to Sensor
Synchronposition
0 Referenzpunkt Warenbahn
Initial situation:
• The first cutting length has passed below
the rotary knife
• The rotary knife is at the zero position
• A switchover is made to the cyclic cam
when this position is reached.
Sensor
Result:
The rotary knife has started in synchronism
CutLength with the start of the material and cuts the
material with the required cutting length
Error handling
If, during operation of the LRK_RotaryKnife errors occur in the block itself or at
the technology objects and technology functions involved, then these are signaled
at the error and errorID block outputs.
cutLength done
execute busy
mode error
FBRotaryKnife() errorID
state
The error bit signals an active error, while an error code is output at errorID; this
can be used to analyze the cause of the error.
Output error is only set, if input execute is set. ErrorID and state = 0 (ERROR)
Note are still output even after execute has been reset!
Error messages
Table 6-3 List of message priorities
ErrorID Priority Description
16#xxxx_0xxxx Lowest priority Warning/notification
16#xxxx_4xxx Low priority Warning. Can still be executed
16#xxxx_8xxx High priority Error, cannot be executed any further
© Siemens AG 2021 All rights reserved
Warnings
Warning messages are indicated by the state of the error and errorID outputs: error
= FALSE and errorID <> 16#0000_0000.
ErrorID Description
16#050B_400B Parameter overspeedEndCut not accepted (invalid value)
(AUTOMATIC or SINGLE_CUT operating mode)
16#050B_400C Parameter jerkPhase1 replaced by a substitute value (invalid value)
(Substitute value = 0 %)
16#050B_400D Parameter jerkPhase2 replaced by a substitute value (invalid value)
(Substitute value = 0 %)
16#0503_400E Interrupt Production is waiting for standstill at leading- or auxiliaryaxis
Error messages
Error messages are indicated by the state of the error and errorID outputs: error =
TRUE and errorID <> 16#0000_0000.
ErrorID Description
16#050B_8008 Invalid parameter:
stopAngle <= endSyncAngle + (LRK_FORMAT_ANGLE_MIN *
LRK_MIN_VAL_INFLECTION_POINT / 100.0)
(stop angle of the knife lies before the smallest possible inflection point position of
the cyclic cam)
or
stopAngle >= startSyncAngle
(stop angle of the knife lies in the synchronous sector)
16#050B_8009 Invalid parameter:
knifeOverspeedStartCut < - LRK_MAXIMUM_OVERSPEED_KNIFE
or
knifeOverspeedStartCut > LRK_MAXIMUM_OVERSPEED_KNIFE
16#050B_800A Invalid parameter:
knifeOverspeedZero < - LRK_MAXIMUM_OVERSPEED_KNIFE
or
knifeOverspeedZero > LRK_MAXIMUM_OVERSPEED_KNIFE
16#050B_800B Invalid parameter:
knifeOverspeedEndCut < - LRK_MAXIMUM_OVERSPEED_KNIFE
or
knifeOverspeedEndCut > LRK_MAXIMUM_OVERSPEED_KNIFE
16#050B_800C Invalid parameter:
jerkPhase1 < 0.0 [%]
or
jerkPhase1 > 100.0 [%]
16#050B_800D Invalid parameter:
© Siemens AG 2021 All rights reserved
ErrorID Description
16#0521_8001 STARTPOSITION to DISABLE
Error when stopping the auxiliary axis
16#0521_8002 STARTPOSITION to DISABLE
Error when stopping the rotary knife axis
16#0522_8001 STARTPOSITION to STARTPOSITION
Error when positioning the rotary knife axis
16#0523_8000 STARTPOSITION to AUTOMATIC
Error for start length
startLength > distanceToSensor – LRK_START_SYNC_WAITING_DISTANCE
or
startLength < knifeCircumferenceActivated – startSyncPos
16#0523_8001 STARTPOSITION to AUTOMATIC
Error when homing the auxiliary axis
16#0523_8002 STARTPOSITION to AUTOMATIC
Error when activating camming of the rotary knife axis
[Start cam]
16#0523_8003 STARTPOSITION to AUTOMATIC
Error when activating the relative gearing of the auxiliary axis
16#0523_8004 STARTPOSITION to AUTOMATIC
Error when activating the absolute gearing of the auxiliary axis
16#0523_8005 STARTPOSITION to AUTOMATIC
Error when activating camming of the rotary knife axis
[cyclic cam]
© Siemens AG 2021 All rights reserved
ErrorID Description
Error when stopping the auxiliary axis
16#0541_8002 MANUAL to DISABLE
Error when stopping the rotary knife axis
16#0542_8001 MANUAL to STARTPOSITION
Error when stopping the auxiliary axis
16#0542_8002 MANUAL to STARTPOSITION
Error when stopping the rotary knife axis
16#0542_8003 MANUAL to STARTPOSITION
Error when positioning the rotary knife axis
16#0505_8001 SINGLE_CUT
Error when activating camming of the rotary knife axis
[Start cam]
16#0505_8002 SINGLE_CUT
Error when activating the relative gearing of the auxiliary axis
16#0505_8003 SINGLE_CUT
Error when activating the absolute gearing of the auxiliary axis
16#0505_8004 SINGLE_CUT
Error when activating camming of the rotary knife axis
[stop cam]
16#0505_8005 SINGLE_CUT
Error when deactivating camming of the rotary knife axis
16#0505_8006 SINGLE_CUT
© Siemens AG 2021 All rights reserved
Block name
LRK_AuxiliaryAxis
LRK_AuxiliaryAxis
operationMode LRK_type
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial value Description
mode OperationMode Rotary knife block mode
RotaryKnifeType
(DINT)
Input/output parameters
Name Data type Initial value Description
userConfig LAxisCtrl_type Configuration data of the user interface
AxisConfig
Output parameters
Name Data type Initial value Description
Output LRK_type Interface with all of the auxiliary axis data relevant for
AuxiliaryAxis the rotary knife block
Output
Functionality
This block controls the active call interface for the axis FB of the auxiliary axis, as a
function of the operating mode of the rotary knife block.
Further, when calling the axis FB, the block makes a distinction regarding the type
of leading axis by using help blocks:
• LRK_EncoderAsAAMaster
• LRK_PosAxisAsAAMaster
• LRK_SyncAxisAsAAMaster
As a result, the block provides the rotary knife block with all the relevant data of the
auxiliary axis.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FBs LAxisCtrl_PosAxis,
LAxisCtrl-SyncAxisCamming and LAxisCtrl_ExtEncoder of the global axis handling
of the LAxisCtrl library. The scope of these blocks goes far beyond addressing the
requirements of basic rotary axes. Therefore, it is possible to replace these blocks
by simpler blocks that require less memory. These are the LRK_IAFB_Pos,
LRK_IAFB_Sync and LRK_IAFB_ExtEnc blocks belonging to the LRotaryKnife
library.
All FBs access the same data types – which means that users only must replace
the data type of the internal instances, as described in the following:
2. by instance
LRK_IAFB_Sync
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
6.4.2 LRK_LeadingValue
Block name
LRK_LeadingValue
Task
Identifies whether the axis or external encoder is interconnected as leading value.
Controls the leading value - whether axis or external encoder - by calling the
appropriate axis FB functions using the user interface.
Reads out all the leading value data relevant for the rotary knife block.
Changeover between several leading values. (The number is fixed by the user
constant LRK_MAX_NUMBER_OF_LEADING_VALUES)
LRK_LeadingValue
Block parameters
Input/output parameters
Name Data type Initial value Description
userCommand LRK_type Interface for user commands
LeadingValue
Command
Output LRK_type Interface with all of the data of the leading value
LeadingValue relevant for the rotary knife block.
Output
Config LAxisCtrl_type Configuration data of the user interface to the axis as
AxisConfig leading value
Functionality
Identifies whether the axis or external encoder is interconnected as leading value.
If an axis, then provides the axis FB interface to operate the axis as leading value
for the user.
If an encoder, then provides the axis FB interface to operate the external encoder
as leading value for the user.
Provides all the relevant axis data as leading value for the rotary knife block.
Switching between leading values at defined position. (e.g. measuring wheel 1 to
measuring wheel 2)
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FBs LAxisCtrl_PosAxis,
LAxisCtrl_SyncAxisCamming and LAxisCtrl_ExtEncoder of the global axis handling
of the LAxisCtrl library. The scope of these blocks goes far beyond addressing the
requirements of basic rotary axes. Therefore, it is possible to replace these blocks
by simpler blocks that require less memory. These are the LRK_IAFB_Pos,
LRK_IAFB_Sync and LRK_IAFB_ExtEnc blocks belonging to the LRotaryKnife
library.
All FBs access the same data types – which means that users only must replace
the data type of the internal instances, as described in the following:
© Siemens AG 2021 All rights reserved
2. by instances
LRK_IAFB_Sync,
LRK_IAFB_Pos and
LRK_IAFB_ExtEnc
Messages
The block does not generate any messages.
6.4.3 LRK_LeadingValueMeasuringInput
Block name
LRK_LeadingValueMeasuringInput
Task
Controls the LeadingValueMeasuringInput by calling PLC open blocks MC_RESET
and MC_MEASURINGINPUT.
LRK_LeadingValueMeasuringInput
LRK_type LRK_type
© Siemens AG 2021 All rights reserved
LeadingValue LeadingValue
internalCommand Output
MeasuringInput MeasuringInput
Command Output
Block parameters
Input parameters
Name Data type Initial value Description
internalCommand LRK_type Internal interface to operate the measuring
LeadingValue input of the leading value by the rotary knife
MeasuringInput block.
Command
Output parameters
Name Data type Initial value Description
Output LRK_type Interface with all the measuring input data at
LeadingValue the leading value data relevant for the rotary
MeasuringInput knife block
Output
Functionality
Identifies as to whether a valid measuring input is interconnected.
Calls the measuring input functions via the rotary knife block via internal command
interface.
Provides all the relevant measuring input data at the leading value for the rotary
knife block.
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
6.4.4 LRK_RotaryKnifeAxis
Block name
LRK_RotaryKnifeAxis
LRK_RotaryKnifeAxis
operationMode LRK_type
mode Output RotaryKnifeAxis
RotaryKnifeType
(DINT) Output
© Siemens AG 2021 All rights reserved
LRK_type
RotaryKnifeAxis userCommand
Command
LRK_type
RotaryKnifeAxis internalCommand
Command
Block parameters
Input parameters
Name Data type Initial value Description
Mode OperationMode Rotary knife block mode
RotaryKnifeType
(DINT)
userCommand LRK_type User interface to operate the rotary knife axis if the
RotaryKnifeAxis rotary knife block is in the "MANUAL" mode
Command
internalCommand LRK_type Internal interface to operate the rotary knife axis by
RotaryKnifeAxis the rotary knife block in all modes except "MANUAL"
Command
Input/output parameters
Name Data type Initial value Description
userConfig LAxisCtrl_type Configuration data of the user interface
AxisConfig
internalConfig LAxisCtrl_type Configuration data of the internal interface to the
AxisConfig rotary knife block
Output parameters
Name Data type Initial value Description
Output LRK_type Interface with all of the rotary knife axis data relevant
RotaryKnifeAxis for the rotary knife block
Output
Functionality
This block controls the active call interface for the axis FB of the rotary knife axis,
as a function of the operating mode of the rotary knife block.
standard application, users have unrestricted access to the rotary knife axis.
Further, when calling the axis FB, the block makes a distinction regarding the type
of leading axis by using the help block:
• LRK_SyncAxisAsRKMaster
As a result, the block provides the rotary knife block with all the relevant data of the
rotary knife axis.
Messages
The block does not generate any messages.
Block name
LRK_CamCalc
Task
This function block generates cams for rotary knives based on specified
geometrical parameters and velocity profiles.
LRK_CamCalc
BOOL execute done BOOL
LREAL formatLength
busy BOOL
INT nextCam
errorId DWORD
LREAL knifeCircumference
LREAL startSyncAngle materialPosSegment1End LREAL
LREAL endSyncAngle
materialPosSegment2End LREAL
LREAL startAngle
LREAL stopAngle materialPosSegment3End LREAL
LREAL inflectionPoint
materialPosSegment4End LREAL
INT numberOfKnives
LREAL knifeOverspeedStartCut materialPosSegment5End LREAL
LREAL knifeOverspeedZero
camSegmentsCalculated INT
LREAL knifeOverspeedEndCut
Array[1..50] of
cutProfileType
cutProfileCutOut camSegmentsRK TO_Cam_Struct_
(DINT)
SegmentData
camProfileType
camProfilePhase1 Array[1..50] of
(DINT) camSegmentsRKValid
BOOL
LREAL jerkPhase1
camProfileType copyDone BOOL
camProfilePhase2
(DINT)
Array[1..4] of
LREAL jerkPhase2 camCommand LRK_type
CamCommand
cutProfileType
cutProfileCutIn
(DINT)
LREAL startBacklashOffset
BOOL copySegmentCalculated
Array[1..4] of
LRK_type camStatus
CamStatus
nextCamDBANY
DB_ANY DB_ANY
Block parameters
Input parameters
Name Data type Initial value Description
execute BOOL FALSE Start of the calculation
formatLength LREAL 200 [mm] Cut length
Reference to the technology object of the cam.
nextCam INT 0 If a cam is not specified, then only a parameter
check
START_CAM(0)
Cam to move the crosscutter from the start
position into cyclic operation.
typeOfCam
START_ CYCLIC_CAM(1)
typeOfCam Type
CAM(0) Cam for cyclic operation of a crosscutter.
(DINT)
STOP_CAM(2)
Cam to stop the crosscutter from cyclic
operation.
knifeCircumference LREAL 200.0 [mm] Knife circumference
[°] Start angle of the synchronous sector (cutting
range), i.e. the angle where the knife enters the
material, the
knife center point is defined as 0°
startSyncAngle LREAL 345.0
(The permissible value range lies between
START_SYNC_ANGLE_MIN and 360.0°).
StartSyncAngle and endSyncAngle together
© Siemens AG 2021 All rights reserved
Cut
MAXIMUM_OVERSPEED_KNIFE (%)]
referred to the synchronous speed of the knife.
Motion profile from the cut:
LRK_CUTPT_CONST(0):
Constant cutting profile for overspeed = 0.0
polynomial cutting profile for overspeed > 0.0
cutProfileType LRK_CUTPT_ LRK_CUTPT_LINEAR(1):
cutProfileCutOut Constant cutting profile for overspeed = 0.0
(DINT) CONST(0)
Cutting profile with constant acceleration (linear)
for overspeed > 0.0
LRK_CUTPT_SINUS(2):
Constant cutting profile for overspeed = 0.0
Sinusoidal cutting profile for overspeed > 0.0
Motion profile phase 1 (endSyncAngle –
inflectionPoint)
LRK_CAMPT_LINEAR(0):
Curve profile with constant acceleration
LRK_CAMPT_JERK(1):
camProfileType LRK_CAMPT_
camProfilePhase1 Curve profile with constant acceleration and jerk
(DINT) POLY_5(2)
limiting
LRK_CAMPT_POLY_5(2):
Motion profile as fifth order polynomial
LRK_CAMPT_SINUS(3):
Sinusoidal motion profile
[%] Jerk limiting component in phase 1 (only for
camProfilePhase1 = LRK_CAMPT_JERK(1)).
jerkPhase1 LREAL 0.0 The valid value range lies between 1.0 and
100.0. The phase where the acceleration is not
constant is obtained for 100%. The absolute jerk
depends on the machine velocity.
Output parameters
Name Data type Initial value Description
done BOOL FALSE TRUE: Cam generation has been completed
FALSE: No cam calculation
busy BOOL FALSE
TRUE: Cam generation is active
FALSE: No error
error BOOL FALSE
TRUE: CamCalculation error
errorID DWORD 16#0000_0000 Error identification
materialPosSegment1End LREAL 0.0 Material position, end of segment 1
materialPosSegment2End LREAL 0.0 Material position, end of segment 2
materialPosSegment3End LREAL 0.0 Material position, end of segment 3
materialPosSegment4End LREAL 0.0 Material position, end of segment 4
materialPosSegment5End LREAL 0.0 Material position, end of segment 5
camSegmentsCalculated INT 0 Number of calculated cam segments
Array[1..50] of
camSegmentsRK TO_Cam_Struct_ Array of the segment structures of the TO cam
SegmentData
Array[1..50] of Segment structure of the TO Cam assigned is
camSegmentsRKValid
BOOL valid
Functionality
The function block generates the cam for the specified crosscutter geometry for the
parameterized cut length. Input nextCam defines the reference to the cam object.
The block is started with a rising edge at the input execute, the input parameters
are then checked for plausibility. If the input parameters are invalid, block
processing is interrupted and an appropriate error message (error and errorID) is
output. A rising edge at the done output signals that the cam has been generated.
When initiating the cam calculation, the following actions are executed in the
individual sections:
CC_IDLE(0)
CC_ERROR(1)
© Siemens AG 2021 All rights reserved
CC_INIT(2)
CC_CHECK_PARAMETER(3)
CC_CALC_GENERAL(4)
CC_CALC_START_SEGMENTS(5)
CC_CALC_NEXT_SEGMENTS(6)
CC_CALC_STOP_SEGMENTS(7)
CC_DONE(8)
CC_CLEAR(9)
CC_ADD_SEGMENTS(10)
CC_INTERPOLATE(11)
inflectionPoint
(Middle Position) Synchronous Angle
(Synchronous Area)
knifeCircumference
knifeCircumference
startAngle 0°
Angle
endS
stopAngle
Phase2 Phase1
yn cA
Sync
Format Area Format Area
Format Area Phase1 Phase2
ngle
start
stopAngle startAngle inflectionPoint inflectionPoint
(Middle Position) (Middle Position)
endS
Angle
ngle
endS
Phase2 Phase1
yn cA
yn cA
Sync
yn cA
ngle
start
startS
stopAngle startAngle
ngle
0°
0° web
web Synchronous Angle
(Synchronous Area)
Synchronous Angle
(Synchronous Area)
Table 6-8: Overview of properties and parameters for the cam calculation
Parameter Description
Synchronous sector The synchronous sector is defined by the synchronous angle referred to the knife
circumference or the knife geometry. The synchronous angle is obtained from parameters
© Siemens AG 2021 All rights reserved
Parameter Description
knifeOverspeedStart In the standard configuration, the rotary knife operates with a linear cutting curve. This means
Cut, knifeOverspeed a velocity characteristic, where the circumferential velocity of the knife corresponds to the
Zero, material velocity. However, the knife and the material are only perpendicular with one another
knifeOverspeedEnd at the cut center point. This means that at the remaining points of the synchronous sector,
Cut speed differences occur between the knife and material. These differences depend on the
material thickness and/or the knife diameter or knife geometry.
The knife speed can be specifically adapted in the synchronous sector using the specified
parameters.
Parameter Description
knifeOverspeedStartCut Defines the speed offset of the knife when entering the
synchronous sector, corresponding to parameter
startSyncAngle.
knifeOverspeedZero Defines the speed offset at the zero position.
knifeOverspeedEndCut Defines the speed offset at the end point of the synchronous
sector, corresponding to parameter endSyncAngle.
Interpolation based on a fifth order polynomial is applied between the individual points. The
parameter values are correspondingly interpreted as offset to the synchronous speed.
Speed
(Web Speed)
Synchronous Synchronous
Area Format Area Area
endSyncAngle startSyncAngle t
Cycle Time
Synchronous Synchronous
Area Format Area Area
endSyncAngle startSyncAngle t
Cycle Time
Synchronous Synchronous
Area Format Area Area
endSyncAngle startSyncAngle t
Cycle Time
Parameter Description
inflectionPoint The switchover instant between phase 1 and phase 2 is defined using parameter
inflectionPoint. The value is entered as a percentage, and refers to the format sector, i.e. a
value of 50% represents the center point of the format sector.
startAngle / For rotary knives, the start position, center position and stop position are generally identical.
stopAngle However, it may be necessary to separate these positions in order to achieve a certain
machine behavior (e.g. for a single cut program in order to reduce the load on the motor). As
already described, the center position is defined using the parameter inflectionPoint, the start
position using startAngle and the stop position using stopAngle.
If the start position is shifted away from the center position using parameter startAngle, then
the accelerating distance of the rotary knife increases. This in turn reduces the motor load and
can result in higher operating speeds. The maximum value for startAngle is theoretically the
endSyncAngle, otherwise the knife would move in the cutting range.
The same considerations also apply to parameter stopAngle, which is limited by the value of
parameter startSyncAngle.
jerkPhase1 / These parameters define the percentage component of the phase, which is used for jerk
jerkPhase2 limiting. The absolute jerk is obtained from the machine speed based on the specified motion
profile. Values between 1.0 % and 100 % are permitted for these parameters; value 0.0
© Siemens AG 2021 All rights reserved
camProfilePhase1 / These parameters define the motion profile in phase 1 and/or in phase 2. The parameters do
camProfilePhase2 not have to be assigned the same value.
LINEAR
This selection defines a motion profile with constant acceleration.
Format Area
endSyncAngle
(Synchronous Area)
inflectionPoint
Format Length
Parameter Description
JERK
This selection defines a profile with constant acceleration and jerk limiting. The jerk limiting
is specified using parameters jerkPhase1 / jerkPhase. The parameters are only evaluated
in this profile.
Format Area
jerkPhase1 jerkPhase2
endSyncAngle
(Synchronous Area)
inflectionPoint
Format Length
POLY_5
This selection defines a 5th order polynomial as basis for the motion profile.
(Synchronous Area)
Format Area
endSyncAngle
(Synchronous Area)
inflectionPoint
Format Length
SINUSOIDAL
This selection defines a sinusoidal waveform as basis for the motion profile.
Format Area
endSyncAngle
(Synchronous Area)
inflectionPoint
Format Length
typeOfCam This parameter specifies the cam type that should be calculated.
Type Description
START_CAM The start cam defines the behavior when starting of the rotary knife
from the start point (startAngle) up to the cutting point (0°). The profile
selection is also considered when calculating the start cam.
CYCLIC_CAM Motion profile of the rotary knife in cyclic operation.
STOP_CAM The stop cam defines the transition from cyclic operation to standstill of
the rotary knife; this means the distance from the cutting point to the
stop position (corresponding to stopAngle).
Messages
ErrorID Priorität Beschreibung
16#xxxx_0xxxx Lowest priority warning
16#xxxx_4xxx Low priority Warning, run can be continued
16#xxxx_8xxx High priority Error, continue of run not possible
16#xxxx_Cxxx Highest priority Critical error
Warnings
Warning messages are indicated by the state of the error and errorID outputs: error
= FALSE and errorID <> 16#0000_0000.
Table 6-9: Warning messages
© Siemens AG 2021 All rights reserved
ErrorID Description
16#0000_0000 No warning
Error messages
Error messages are indicated by the state of the error and errorID outputs: error =
TRUE and errorID <> 16#0000_0000.
Table 6-10 Error messages
ErrorID Description
Invalid parameter:
16#05CC_8000
knifeCircumference <= 0.0
Invalid parameter:
16#05CC_8001
numberOfKnives < 1 or numberOfKnives > 6
Invalid parameter:
16#05CC_8002 startSyncAngle < LRK_START_SYNC_ANGLE_MIN / numberOfKnives
or
startSyncAngle > 360.0° / numberOfKnives
Invalid parameter:
endSyncAngle < 0.0°
16#05CC_8003 or
endSyncAngle > (LRK_START_SYNC_ANGLE_MIN – FORMAT_ANGLE_MIN) /
numberOfKnives
Invalid parameter:
16#05CC_8004 numberOfKnives * synchronous angle >= 360°
or
synchronous angle < 0°
Invalid parameter:
16#05CC_8005 formatLength <= synchronous length *
LRK_FACTOR_SYNCLENGTH_FOR_MIN_CUTLENGTH
ErrorID Description
Invalid parameter:
inflectionPoint < LRK_MIN_VAL_INFLECTION_POINT
16#05CC_8006 (lowest permissible inflection point %)
or
r64inflectionPoint > 100.0 – LRK_MIN_VAL_INFLECTION_POINT
(highest permissible inflection point %)
Invalid parameter:
startAngle <= endSyncAngle
(start angle of the knife lies within the synchronous sector)
16#05CC_8007 or
startAngle >= startSyncAngle – (LRK_FORMAT_ANGLE_MIN *
LRK_MIN_VAL_INFLECTION_POINT / 100.0)
(start angle of the knife lies after the largest possible inflection point position of
the cyclic cam)
Invalid parameter:
stopAngle <= endSyncAngle + (LRK_FORMAT_ANGLE_MIN *
LRK_MIN_VAL_INFLECTION_POINT / 100.0)
(stop angle of the knife lies before the smallest possible inflection point position of
16#05CC_8008
the cyclic cam)
or
stopAngle >= startSyncAngle
(stop angle of the knife lies in the synchronous sector)
Invalid parameter:
16#05CC_8009 knifeOverspeedStartCut < - LRK_MAXIMUM_OVERSPEED_KNIFE
or
knifeOverspeedStartCut > LRK_MAXIMUM_OVERSPEED_KNIFE
© Siemens AG 2021 All rights reserved
Invalid parameter:
16#05CC_800A knifeOverspeedZero < - LRK_MAXIMUM_OVERSPEED_KNIFE
or
knifeOverspeedZero > LRK_MAXIMUM_OVERSPEED_KNIFE
Invalid parameter:
16#05CC_800B knifeOverspeedEndCut < - LRK_MAXIMUM_OVERSPEED_KNIFE
or
knifeOverspeedEndCut > LRK_MAXIMUM_OVERSPEED_KNIFE
Invalid parameter:
16#05CC_800C jerkPhase1 < 0.0 [%]
or
jerkPhase1 > 100.0 [%]
Invalid parameter:
16#05CC_800D jerkPhase2 < 0.0 [%]
or
jerkPhase2 > 100.0 [%]
Invalid parameter:
16#05CC_800E nextCam = 0
This error is only signaled if the parameter check is OK!!!!
Cam management
Block name
LRK_CamManagement
LRK_CamManagement
Array[1..4] of
INT nextCam camState LRK_type
CamStatus
Array[1..4] of
LRK_type camCommand nextCamDBANY DB_ANY
© Siemens AG 2021 All rights reserved
CamCommand
nextCamDBNumber UINT
nextCamName WString
Block parameters
Input parameters
Name Data type Initial value Description
References to the next cam
nextCam INT 0
using numbers 1 ... 4
Array[1..4] of
camCommand LRK_type Command interface for cams 1 – 4
CamCommand
Output parameters
Name Data type Initial value Description
Array[1..4] of
camState LRK_type Status of cams 1 - 4
CamStatus
nextCamDBANY DB_ANY Next cam as DB
nextCamDBNumber UINT DB number of the next cam
nextCamName WString TO name of the next cam as character string
Functionality
This block reads the status information of the selected cam, the DB number and
the TO name.
In addition, it allows the selected cam to be reset via the command interface.
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
Block name
LRK_CamShow
Task
This block prepares the values for position, velocity, acceleration and jerk of a
specified cam as table of values for display on the HMI user interface.
LRK_CamShow
TO_Cam cam done BOOL
BOOL execute busy BOOL
error BOOL
© Siemens AG 2021 All rights reserved
status WORD
trendViewData LRK_type
LRK_type
SCTrendViewData SCTrendViewData
Block parameters
Input parameters
Name Data type Initial Description
value
cam TO_Cam Cam to be displayed
execute BOOL FALSE Rising edge starts the display.
Output parameters
Name Data type Initial Description
value
done BOOL FALSE TRUE: Writing to all parameters completed
TRUE: FB still not ended; new output data are being
busy BOOL FALSE
prepared
A rising edge indicates that an error occurred when
error BOOL FALSE
the FB was being executed.
Status LREAL 16#7000 Status display
Input/output parameters
Name Data type Initial Description
value
LRK_type
Data to display the cam.
trendViewData SCTrendView
(Position, velocity, acceleration and jerk)
Data
Functionality
This block prepares the values for position, velocity, acceleration and jerk of a
specified cam as table of values for display on the HMI user interface.
Messages
The block generates the following messages at its status output:
Block name
LRK_CutPositionMeasuring
Task
Controlling the measured value sensing to determine the deviation between the
setpoint and actual cut position at the print mark, if available.
LRK_CutPositionMeasuring
Management Management
Block parameters
Input/output parameters
Name Data type Initial Description
value
cutPositionBufferManagement LRK_type Interface to the
CutPositionBuffer CutPositionBufferManagement
Management
leadingValueMeasuringInputCommand LRK_type Command interface of the
LeadingValueMeasuring measuring input
InputCommand
leadingValueMeasuringInputOutput LRK_type Output interface of the measuring
LeadingValueMeasuring input
InputOutput
measuringValue LRK_type Measured value sensing data
MeasuringValue
Functionality
Determines the 1st cut position after activating the cut position sensing (print mark
detection!).
The cut position is then sensed and the deviation to the currently entered format
length determined.
Missing print marks are detected and are indicated by incrementing the error
counter. The error counter is automatically reset when the next print mark is
detected.
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
Block name
LRK_CutPositionBufferReset
Task
Deleting and resetting the measured value memory.
LRK_CutPositionBufferReset
Management Management
Block parameters
Input/output parameters
Name Data type Initial Description
value
cutPositionBuffer LRK_type
Structure of the measured value memory with all the
CutPositionBuffer
Management required control signals and pointers
Management
Functionality
• Deletes all memory content by overwriting memory elements with 0.0 or FALSE
• Resets all pointers to 0
• Resets all status signals to FALSE
Messages
The block does not generate any messages.
Enters a measured value (position measured value and/or position deviation) in the
measured value memory.
Block name
LRK_CutPositionBufferIn
Task
With each call, the values available at the block (position measured value and
position deviation) are entered a free location of the measured value memory.
LRK_CutPositionBufferIn
LREAL positionDeviation
LREAL actPosition
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial Description
value
[mm] Position deviation (deviation between the set
positionDeviation LREAL 0.0
point position and actual position)
actPosition LREAL 0.0 [mm] Position measured value
Input/output parameters
Name Data type Initial Description
value
cutPositionBuffer LRK_type Structure of the measured value memory with all the
CutPositionBuffer required control signals and pointers (see Chapter,
Management Management Data types).
Functionality
• Enters the position measured value into the measured value memory.
• Enters the position deviation into the measured value memory.
Messages
The block does not generate any messages.
Block name
LRK_CutPositionBufferRead
Task
This block reads the deviation of the currently measured position from the setpoint
position defined by the specified cutting length - and the actual position from the
measured value memory.
LRK_CutPositionBufferRead
cutPositionDeviationValid BOOL
© Siemens AG 2021 All rights reserved
cutPositionDeviationMeasured LREAL
cutPositionMeasured LREAL
Block parameters
Output parameters
Name Data type Initial Description
value
cutPositionDeviationValid BOOL FALSE A position deviation has been identified
cut PositionDeviation
LREAL 0.0 [mm] Position correction value
Measured
cutPositionMeasured LREAL 0.0 [mm] Next synchronizing position
Input/output parameters
Name Data type Initial Description
value
cutPositionBuffer LRK_type Structure of the measured value memory with all the
CutPositionBuffer required control signals and pointers (see Chapter,
Management Management Data types).
Functionality
This block monitors the measured value memory. This block provides these values
in its output interface as soon as the measured value sensing has entered a new
position and deviation.
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
Deletes a measured value (position measured value and position deviation) from
the measured value memory.
Block name
LRK_CutPositionBufferOut
Task
After processing, the function block deletes the last measured value (position
measured value and position deviation) from the measured value memory and
releases the memory for the memory management.
LRK_CutPositionBufferOut
CutPositionBuffer CutPositionBuffer
Management Management
Block parameters
Input/output parameters
Name Data type Initial Description
value
Functionality
When the block is called, the actual measured value (position measured value and
position deviation) are deleted from the measured value memory.
Messages
The block does not generate any messages.
Block name
LRK_ServoTask
Servo block of the SIMATIC Rotary Knife application. The block fulfills the following
tasks:
• Generates control and display signals.
• Servo clock accurate calculation of the “actual” cut length by using the signal
“knife in cut “cut” “.
• Synchronization of the print mark detection when starting in "run".
• Calling the precontrol of the accelerating torque.
• Calling the precontrol of the cutting torque.
• Controlling the technology interface to the drive for the additional torque.
• Control of the function “constantVelocityAtCut” and detection of the caused
length error of the leading value.
When the print mark correction is enabled, using a probe, the function block
determines the cutting position specified by the print marks, calculates the position
deviation from the difference between two consecutive cutting positions and the
specified cut length – and saves the position measured value and position
deviation in the measured value memory. The block determines the first cutting
© Siemens AG 2021 All rights reserved
LRK_Servo
LRK_type
leadingValueOutput
LeadingValueOutput
operationMode
modeEnabled
RotaryKnifeType (DInt)
operationMode
modeSelected
RotaryKnifeType (DInt)
Block parameters
Input parameters
Name Data type Initial Description
value
LRK_type
leadingValueOutput LeadingValue Interface with all the relevant leading value data.
Output
LRK_OM_ERROR(0): ERROR mode
LRK_OM_DISABLE(1): DISABLE mode
LRK_OM_START_POSITION(2): STARTPOSITION
Operation mode
ModesRotary LRK_OM_ LRK_OM_AUTOMATIC(3): AUTOMATIC mode
modeEnabled
Knife ERROR LRK_OM_MANUAL(4): MANUAL mode
(DINT) LRK_OM_SINGLE_CUT(5): SINGLE_CUT mode
LRK_OM_NOTHING_SELECTED(8):
NOTHING_SELECTED mode
LRK_OM_CHANGING(9): CHANGING mode
LRK_OM_ERROR(0): ERROR mode
LRK_OM_DISABLE(1): DISABLE mode
LRK_OM_START_POSITION(2): STARTPOSITION
Operation mode
ModesRotary LRK_OM_ LRK_OM_AUTOMATIC(3): AUTOMATIC mode
modeSelected
Knife ERROR LRK_OM_MANUAL(4): MANUAL mode
(DINT) LRK_OM_SINGLE_CUT(5): SINGLE_CUT mode
LRK_OM_NOTHING_SELECTED(8):
NOTHING_SELECTED mode
LRK_OM_CHANGING(9): CHANGING mode
Input/output parameters
Name Data type Initial value Description
Interface for the user to enter physical secondary
conditions, cam profiles, manual cut position
LRK_type
usersInterface corrections. It is also used for entering sequence
UsersInterface
options such as new start, fast start and flying
format change in operation
Internal data area to display actual geometrical
LRK_type values, converted to circumferential lengths in
rotaryKnifeInfo
RotaryKnifeInfo [mm], actual cut position as well as binary signals
for the knife position.
LRK_type
measuringValue Internal data area for print mark correction.
MeasuringValue
LRK_type Structure of the CutPositionBuffer with all of the
cutPositionBuffer
CutPositionBuffer required control signals and pointers (see Chapter,
Management
Management Data types).
Functionality
The block includes the following functions:
• Generates signals:
– Knife in synchronous sector
– Knife in format sector
–
© Siemens AG 2021 All rights reserved
The block compares the actual knife position with startSyncPos and
endSyncPosthat are defined in the user interface, and depending on the position,
sets the following bits in the RotaryKnifeInfo structure:
In the synchronous range
knifeInSynchronousSector = TRUE
knifeInFormatSector = FALSE
In the format range
knifeInSynchronousSector = FALSE
knifeInFormatSector = TRUE
The block compares the actual knife position with 0.0 and endSyncPos and sets
in the cutting range
rotaryKnifeInfo.cut = TRUE
outside the cutting range
rotaryKnifeInfo.cut = FALSE
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
Block name
LRK_GetAccelerationTorqueValue
Task
From the cam and the actual material velocity, the block calculates the accelerating
torque required for the rotary knife drive.
LRK_GetAccelerationTorqueValue
DB_ANY actualCam
LREAL totalInertia
LREAL lookAHead
LREAL actPosMat
LREAL actVelMat
LREAL actAccMat
LREAL factorMmToDegree
LREAL leadingRangeEnd
Block parameters
Input parameters
Name Data type Initial value Description
TRUE: Block calculates an accelerating torque
enable BOOL FALSE
to precontrol the drive
LRK_PCM_GET
preControlMode _VALUE_FROM
torquePreControlMode Precontrol mode
(DINT) _CAM_DIRECT
(0)
accelerationDirect LREAL 0.0 Acceleration value from the setpoint generation.
actualCam DB_ANY 0 Actual cam of the synchronous operation
[kgm²] Motor moment of inertia of the rotary
totalInertia LREAL 0.0
knife system
lookAHead LREAL 0.0 [µs] Preview
actPosMat LREAL 0.0 [mm] Actual material position
Output parameters
Name Data type Initial value Description
busy BOOL FALSE TRUE: FB generates actual torque values
TRUE: FB is in the error state, no torque values
error BOOL FALSE
are generated
errorID DWORD 16#0000_0000 Error status
accelerationTorque REAL 0.0 Actual accelerating torque
Functionality
The block calculates the pre control values for the drive as soon as the "enable"
parameter at the block is set to TRUE, and initialization was successfully carried
out.
Messages
© Siemens AG 2021 All rights reserved
Block name
LRK_CuttingTorquePreControl
Task
This block calculates the cutting torque from a table saved in the rotary knife info
as a function of the rotary knife position.
LRK_CuttingTorquePreControl
BOOL enable busy BOOL
preControlMode error BOOL
cuttingTorquePreControlMode
(DINT) erroId DWORD
© Siemens AG 2021 All rights reserved
usersInterface LRK_type
LRK_type
UsersInterface UsersInterface
rotaryKnifeInfo LRK_type
LRK_type
RotaryKnifeInfo RotaryKnifeInfo
Block parameters
Input parameters
Name Data type Initial value Description
TRUE: Block calculates a cutting torque to pre
enable BOOL FALSE
control the drive
LRK_PCM_GET
cuttingTorquePreControl preControlMode _VALUE_FROM
Precontrol mode
Mode (DINT) _CAM_DIRECT
(0)
lookAHead LREAL 0.0 [µs] Preview
actPosKnife LREAL 0.0 [mm] Actual knife position
actVelKnife LREAL 0.0 [mm/s] Actual knife velocity
actAccKnife LREAL 0.0 [mm/s²] Actual knife acceleration
Output parameters
Name Data type Initial value Description
busy BOOL FALSE TRUE: FB generates actual cutting torque values
TRUE: FB is in the error state; no cutting torque
error BOOL FALSE
values are generated
errorId DWORD 16#7000 Error status
cuttingTorque LREAL 0.0 Actual cutting torque
Input/output parameters
Name Data type Initial value Description
LRK_type
usersInterface User interface
UsersInterface
LRK_type
rotaryKnifeInfo Information interface
RotaryKnifeInfo
Functionality
The block calculates the pre control values for the drive as soon as the "enable"
parameter at the block is set to TRUE, and initialization was successfully carried
out.
© Siemens AG 2021 All rights reserved
Messages
The block does not generate any messages.
6.4.16 LRK_EncoderAsAAMaster
Control block of the axis FB for the auxiliary axis if an external encoder is
interconnected as leading value.
Block name
LRK_EncoderAsAAMaster
LRK_EncoderAsAAMaster
LRK_type
TO_ExternalEncoder master Output
AuxiliaryAxisOutput
© Siemens AG 2021 All rights reserved
TO_SynchronousAxis slave
LRK_type
command
AuxiliaryAxisCommand
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_ExternalEncoder Conversion DB_ANY to TO_ExternalEncoder
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
LRK_type Interface to operate the auxiliary axis using the
command
AuxiliaryAxisCommand auxiliary axis block
Input/output parameters
Name Data type Initial Description
value
LAxisCtrl_type
Config Configuration data
AxisConfig
instAxisCtrl LAxisCtrl_SyncAxis
Instance of axis FB of auxiliary axis
AuxiliaryAxis Camming
Output parameters
Name Data type Initial Description
value
LRK_type
Interface with all the auxiliary axis data relevant for
Output AuxiliaryAxis
the rotary knife block
Output
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_ExternalEncoder.
Switching over between standard axis handling and reduced axis handling
© Siemens AG 2021 All rights reserved
Messages
The block does not generate any messages.
6.4.17 LRK_PosAxisAsAAMaster
Control block of the axis FB for the auxiliary axis if a positioning axis is
interconnected as leading value.
Block name
LRK_PosAxisAsAAMaster
LRK_PosAxisAsAAMaster
LRK_type
TO_PositioningAxis master Output
AuxiliaryAxisOutput
TO_SynchronousAxis slave
© Siemens AG 2021 All rights reserved
LRK_type
command
AuxiliaryAxisCommand
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_PositioningAxis Conversion DB_ANY to TO_PositioningAxis
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
LRK_type Interface to operate the auxiliary axis using the
command
AuxiliaryAxisCommand auxiliary axis block
Input/output parameters
Name Data type Initial Description
value
Config LAxisCtrl_type Configuration data
AxisConfig
Output parameters
Name Data type Initial Description
value
LRK_type
Interface with all the auxiliary axis data relevant for
Output AuxiliaryAxis
the rotary knife block
Output
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_ExternalEncoder.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FB
LAxisCtrl_SyncAxisCamming of the global axis handling of the LAxisCtrl library.
This block provides users with a standard control and diagnostics interface for all
the usual motion functions of the TO axis. The scope of this block goes far beyond
addressing the requirements of basic rotary axes. Therefore, it is possible to
© Siemens AG 2021 All rights reserved
replace this block by a simpler block with restricted functionality that requires less
memory. This is the LRK_IAFB_Sync block in the LRotaryKnife library.
Both FBs access the same data type – which means that users only must replace
the data type of the internal instance, as described in the following:
Messages
The block does not generate any messages.
6.4.18 LRK_SyncAxisAsAAMaster
Control block of the axis FB for the auxiliary axis if a synchronous axis is
interconnected as leading value.
Block name
LRK_SyncAxisAsAAMaster
LRK_SyncAxisAsAAMaster
LRK_type
TO_SynchronousAxis master Output
AuxiliaryAxisOutput
TO_SynchronousAxis slave
© Siemens AG 2021 All rights reserved
LRK_type
command
AuxiliaryAxisCommand
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
LRK_type Interface to operate the auxiliary axis using the
command
AuxiliaryAxisCommand auxiliary axis block
Input/output parameters
Name Data type Initial Description
value
LAxisCtrl_type
Config Configuration data
AxisConfig
instAxisCtrl LAxisCtrl_SyncAxis
Instance of axis FB of auxiliary axis
AuxiliaryAxis Camming
Output parameters
Name Data type Initial Description
value
LRK_type
Interface with all the auxiliary axis data relevant for
Output AuxiliaryAxis
the rotary knife block
Output
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_SynchronousAxis.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FB
© Siemens AG 2021 All rights reserved
Messages
The block does not generate any messages.
6.4.19 LRK_EncoderAsLVSAMaster
Control block of the axis FB for the synchronous axis as leading value if an external
encoder is interconnected as leading value.
Block name
LRK_EncoderAsLVSAMaster
LRK_EncoderAsLVSAMaster
TO_ExternalEncoder master
© Siemens AG 2021 All rights reserved
TO_SynchronousAxis slave
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_ExternalEncoder Conversion DB_ANY to TO_ExternalEncoder
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
Input/output parameters
Name Data type Initial Description
value
LAxisCtrl_type
Config Configuration data
AxisConfig
instAxisCtrl LAxisCtrl_SyncAxis
Instance of axis FB of leading value axis
LeadingValue Camming
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_ExternalEncoder.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FB
LAxisCtrl_SyncAxisCamming of the global axis handling of the LAxisCtrl library.
This block provides users with a standard control and diagnostics interface for all
the usual motion functions of the TO axis. The scope of this block goes far beyond
addressing the requirements of basic rotary axes. Therefore, it is possible to
replace this block by a simpler block with restricted functionality that requires less
memory. This is the LRK_IAFB_Sync block in the LRotaryKnife library.
Both FBs access the same data type – which means that users only must replace
the data type of the internal instance, as described in the following:
LRK_IAFB_Sync
Messages
The block does not generate any messages.
6.4.20 LRK_PosAxisAsLVSAMaster
Control block of the axis FB for the synchronous axis as leading value if a
positioning axis is interconnected as leading value.
Block name
LRK_PosAxisAsLVSAMaster
LRK_PosAxisAsLVSAMaster
TO_PositioningAxis master
TO_SynchronousAxis slave
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_PositioningAxis Conversion DB_ANY to TO_PositioningAxis
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
Input/output parameters
Name Data type Initial Description
value
LAxisCtrl_type
Config Configuration data
AxisConfig
instAxisCtrl LAxisCtrl_SyncAxis
Instance of axis FB of leading value axis
LeadingValue Camming
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_PositioningAxis.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FB
LAxisCtrl_SyncAxisCamming of the global axis handling of the LAxisCtrl library.
This block provides users with a standard control and diagnostics interface for all
the usual motion functions of the TO axis. The scope of this block goes far beyond
addressing the requirements of basic rotary axes. Therefore, it is possible to
replace this block by a simpler block with restricted functionality that requires less
memory. This is the LRK_IAFB_Sync block in the LRotaryKnife library.
Both FBs access the same data type – which means that users only must replace
the data type of the internal instance, as described in the following:
LRK_IAFB_Sync
Messages
The block does not generate any messages.
6.4.21 LRK_SyncAxisAsLVSAMaster
Control block of the axis FB for the synchronous axis as leading value if a
synchronous axis is interconnected as leading value.
Block name
LRK_PosAxisAsLVSAMaster
LRK_SyncAxisAsLVSAMaster
TO_SynchronousAxis master
© Siemens AG 2021 All rights reserved
TO_SynchronousAxis slave
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
Input/output parameters
Name Data type Initial Description
value
LAxisCtrl_type
Config Configuration data
AxisConfig
instAxisCtrl LAxisCtrl_SyncAxis
Instance of axis FB of leading value axis
LeadingValue Camming
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_SynchronousAxis.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FB
LAxisCtrl_SyncAxisCamming of the global axis handling of the LAxisCtrl library.
This block provides users with a standard control and diagnostics interface for all
the usual motion functions of the TO axis. The scope of this block goes far beyond
addressing the requirements of basic rotary axes. Therefore, it is possible to
replace this block by a simpler block with restricted functionality that requires less
memory. This is the LRK_IAFB_Sync block in the LRotaryKnife library.
Both FBs access the same data type – which means that users only must replace
the data type of the internal instance, as described in the following:
LRK_IAFB_Sync
Messages
The block does not generate any messages.
6.4.22 LRK_SyncAxisAsRKMaster
Control block of the axis FB for the Rotary Knife axis if a synchronous axis is
interconnected as leading value.
Block name
LRK_SyncAxisAsRKMaster
LRK_SyncAxisAsRKMaster
LRK_type
TO_SynchronousAxis master Output
RotaryKnifeAxisOutput
TO_SynchronousAxis slave
© Siemens AG 2021 All rights reserved
LRK_type
command
RotaryKnifeAxisCommand
Block parameters
Input parameters
Name Data type Initial Description
value
master TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
slave TO_SynchronousAxis Conversion DB_ANY to TO_SynchronousAxis
command LRK_type Internal interface to operate the RotaryKnifeAxis by
RotaryKnifeAxisCommand the RotaryKnifeAxis block.
Input/output parameters
Name Data type Initial Description
value
Config LAxisCtrl_type Configuration data
AxisConfig
Output parameters
Name Data type Initial Description
value
Output LRK_type Interface with all the rotary knife axis data relevant
RotaryKnifeAxis for the rotary knife block
Output
Functionality
This block is used to implicitly convert the leading value for the axis FB from
DB_ANY to TO_SynchronousAxis.
Switching over between standard axis handling and reduced axis handling
As default setting, the block is designed for operating with FB
LAxisCtrl_SyncAxisCamming of the global axis handling of the LAxisCtrl library.
This block provides users with a standard control and diagnostics interface for all
the usual motion functions of the TO axis. The scope of this block goes far beyond
addressing the requirements of basic rotary axes. Therefore, it is possible to
replace this block by a simpler block with restricted functionality that requires less
memory. This is the LRK_IAFB_Sync block in the LRotaryKnife library.
Both FBs access the same data type – which means that users only must replace
the data type of the internal instance, as described in the following:
Messages
The block does not generate any messages.
Block name
LRK_GetPosAxisValues
Task
This block reads the system-relevant data from the TO_PositioningAxis of the
leading value
Integration into the execution system
The function block is called from the LRK_LeadingValue block.
LRK_GetPosAxisValues VOID
toHomingActive BOOL
toNotPositionControled BOOL
toModuloEnabled BOOL
toModuloLength LREAL
toActualPosition LREAL
toActualVelocity LREAL
toActualAcceleration LREAL
toMaxVelocity LREAL
toMaxAcceleration LREAL
toMaxDeceleration LREAL
Block parameters
Input parameters
Name Data type Initial Description
value
TO_LeadingValue TO_PositioningAxis Axis as leading value
Output parameters
Name Data type Initial Description
value
toEnabled BOOL Axis switched on
toError BOOL Axis in error state
toHomed BOOL Axis homed
toStandstill BOOL Axis standstill
toHomingActive BOOL Axis moving in the homing mode
Functionality
Reads out the system-relevant data from the TO_PositioningAxis
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
Block name
LRK_GetSyncAxisValues
Task
This block reads the system-relevant data from the TO_SynchronousAxis
LRK_GetSyncAxisValues VOID
toErrorReaction BOOL
toRestartActive BOOL
toHomed BOOL
toStandstill BOOL
toJogActive BOOL
toHomingActive BOOL
toSynchronizing BOOL
toSynchronous BOOL
toNotPositionControled BOOL
toModuloEnabled BOOL
toModuloLength LREAL
toActualPosition LREAL
toActualVelocity LREAL
toActualAcceleration LREAL
toMaxVelocity LREAL
toMaxAcceleration LREAL
toMaxDeceleration LREAL
toLeadScrew LREAL
toMasterOffset LREAL
toGearFactor LREAL
toVirtualAxisMode LREAL
Block parameters
Input parameters
Name Data type Initial Description
value
TO_Synchronous
TO_SyncAxis SynchronousAxis
Axis
Output parameters
Name Data type Initial Description
value
toDriveCommunicationOK BOOL Drive in conjunction with SIMATIC
toDriveInOperation BOOL Drive in operation
toEnabled BOOL Axis switched on
toError BOOL Axis in error state
toErrorReaction Dint Error response of the axis
toRestartActive BOOL Restart at the TO active
toHomed BOOL Axis homed
toStandstill BOOL Axis standstill
toJogActive BOOL Axis in the jog mode
toHomingActive BOOL Axis moving in the homing mode
toSynchronizing BOOL Axis synchronizing
toSynchronous BOOL Axis synchronized
toNotPositionControlled BOOL Axis motion not with position control
toModuloEnabled BOOL Modulo active
toModuloLength LREAL [mm] Active modulo length
toActualPosition LREAL [mm] Actual axis position
toActualVelocity LREAL [mm/s] Actual axis velocity
toActualAcceleration LREAL [mm/s²] Actual axis acceleration
© Siemens AG 2021 All rights reserved
Functionality
Reads out the system-relevant data from the TO_SynchronousAxis
Messages
The block does not generate any messages.
Block name
LRK_GetExternalEncoderValues
Task
This block reads the system-relevant data from the TO ExternalEncoder of the
leading value
toError Bool
© Siemens AG 2021 All rights reserved
toHomed Bool
toHomingActive Bool
toStandstill Bool
toNotPositionControlled Bool
toModuloEnabled Bool
toModuloLength LReal
toActualPosition LReal
toActualVelocity LReal
toActualAcceleration LReal
toMaxVelocity LReal
toMaxAcceleration LReal
toMaxDeceleration LReal
toStatusSensorState DInt
Functionality
Reads out the system-relevant data from the external encoder TO of the leading
value
Messages
The block does not generate any messages.
© Siemens AG 2021 All rights reserved
Reads out the values of leading value used in servo clock from the
TO_PositioningAxis
Block name
LRK_GetLVPosAxisServoValue
Task
This block reads the system-relevant data from the TO_PositioningAxis of the
leading value
LRK_type
LRK_GetLVPosAxisServoValue GetLVServoValues
TO_PositioningAxis TO_PosAxis
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial Description
value
TO_PosAxis TO_PositioningAxis PositioningAxis as leading value
Functionality
Reads out the system-relevant data from the TO_PositioningAxis
Messages
The block does not generate any messages.
Reads out the values of leading value used in servo clock from the
TO_SynchronousAxis
Block name
LRK_GetLVSyncAxisServoValue
Task
This block reads the system-relevant data from the TO_SynchronousAxis of the
leading value
LRK_type
LRK_GetLVSyncAxisServoValue GetLVServoValues
TO_SynchronousAxis TO_SyncAxis
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial Description
value
TO_SyncAxis TO_SynchronousAxis SynchronousAxis as leading value
Functionality
Reads out the system-relevant data from the TO_SynchronousAxis
Messages
The block does not generate any messages.
Reads out the values of leading value used in servo clock from the
TO_ExternalEncoder
Block name
LRK_GetLVExternalEncoderServoValue
Task
This block reads the system-relevant data from the TO_ExternalEncoder of the
leading value
LRK_type
LRK_GetLVExternalEncoderServoValues GetLVExtEncServoValue
TO_ExternalEncoder TO_ExtEnc
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial Description
value
TO_ExtEnc TO_ExternalEncoder External encoder as leading value
Functionality
Reads out the system-relevant data from the TO_ExternalEncoder
Messages
The block does not generate any messages.
Block name
LRK_MCResetMI
Task
Calls MC_RESET with DB_ANY as TO reference
LRK_MCResetMI VOID
TO_MeasuringInput TOMeasuringInput
MC_RESET_Instance
MC_RESET MC_RESET
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial value Description
TOMeasuringInput TO_MeasuringInput TO-Measuring input
Input/output parameters
Name Data type Initial value Description
MC_RESET_Instance MC_RESET Instance of MC_RESET
Functionality
Calls MC_RESET
Messages
The block does not generate any messages.
Block name
LRK_MCResetCam
Task
Calls MC_RESET with DB_ANY as TO reference
LRK_MCResetCam VOID
TO_Cam Cam
MC_RESET_Instance
MC_RESET MC_RESET
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial value Description
Cam TO_Cam TO cam
Input/output parameters
Name Data type Initial value Description
MC_RESET_Instance MC_RESET Instance of MC_RESET
Functionality
Calls MC_RESET
Messages
The block does not generate any messages.
Block name
LRK_GetCamValues
Task
This block reads the system-relevant data from the TO Cam
LRK_GetCamValues VOID
Block parameters
Input parameters
Name Data type Initial value Description
Cam TO_Cam Cam
Output parameters
Name Data type Initial value Description
LRK_
camStatus Cam status
typeCamStatus
Functionality
Reads out the system-relevant data from the TO_Cam of the selected cam
Messages
The block does not generate any messages.
6.4.32 LRK_AddCamPointsToCam
Block name
LRK_AddCamPointsToCam
LRK_AddCamPointsToCam VOID
INT numberOfPoints
Array[1..
LRK_MAX_NUMBER_OF_CAM_POINTS camPoints
of TO_Cam_Struct_PointData
© Siemens AG 2021 All rights reserved
cam
TO_Cam TO_Cam
Block parameters
Input parameters
Name Data type Initial value Description
numberOfPoints INT Number of cam points
Array[1..”LRK_MAX_NUMBER_
camPoints OF_CAM_POINTS”] of Cam point parameters
TO_Cam_Struct_PointData
Input/output parameters
Name Data type Initial value Description
Array[1..”LRK_MAX_NUMBER_
camSegmentsValid Display of the segment validity
OF_CAM_POINTS”] of BOOL
cam TO_Cam Cam
Functionality
This block enters the calculated segment parameters into the TO-Cam.
Messages
The block does not generate any messages.
6.4.33 LRK_AddCamSegmentsToCam
Block name
LRK_AddCamSegmentsToCam
LRK_AddCamSegmentsToCam VOID
INT numberOfSegments
Array[1..50] of
camSegments
TO_Cam_Struct_SegmentData
© Siemens AG 2021 All rights reserved
cam
TO_Cam TO_Cam
Block parameters
Input parameters
Name Data type Initial value Description
numberOfSegments INT Number of cam segments
Array[1..”LRK_MAX_NUMBER_
camSegments OF_CAM_POINTS”] of Cam segment parameters
TO_Cam_Struct_SegmentData
Array[1..”LRK_MAX_NUMBER_
camSegmentsValid Display of the segment validity
OF_CAM_POINTS”] of BOOL
Input/output parameters
Name Data type Initial value Description
cam TO_Cam Cam
Functionality
This block enters the calculated segment parameters into the TO-Cam.
Messages
The block does not generate any messages.
6.4.34 LRK_GetAuxRotAxisServoValues
Reads out the reduced actual axis data of auxiliary axis and Rotary Knife axis in
the servo clock cycle
Block name
LRK_GetAuxRotAxisServoValues
LRK_GetAuxRotAxisServoValues LRK_type
GetAuxRotAxisServoValues
TO_SynchronousAxis auxiliaryAxis
© Siemens AG 2021 All rights reserved
TO_SynchronousAxis rotaryKnifeAxis
Block parameters
Input parameters
Name Data type Initial value Description
auxiliaryAxis TO_SynchronousAxis Auxiliary axis (decoupled material web!)
rotaryKnifeAxis TO_SynchronousAxis RotaryKnife axis
Functionality
This block reads data from the TO structure of the auxiliary and rotary knife axes
and transfers this data into the FC structure.
Messages
The block does not generate any messages.
6.4.35 LRK_GetCamServoValues
Reads out the reduced actual data of a specified cam in the servo clock cycle.
Block name
LRK_GetCamServoValues
LRK_GetCamServoValues LRK_type
GetCamServoValues
TO_Cam cam_TO
© Siemens AG 2021 All rights reserved
Block parameters
Input parameters
Name Data type Initial value Description
cam_TO TO_Cam Cam
Functionality
This block reads data from the TO structure of a cam and transfers it into the FC
structure.
Messages
The block does not generate any messages.
6.4.36 LRK_MCTorqueAdditive
Block name
LRK_MCTorqueAdditive
Task
Calls the MC_TorqueAdditive with DB_ANY as TO reference.
LRK_MCTorqueAdditive VOID
TO_SynchronousAxis axis
BOOL enable
LREAL value
© Siemens AG 2021 All rights reserved
MC_TORQUEADDITIVE_Instance
MC_TORQUEADDITIVE MC_TORQUEADDITIVE
Block parameters
Input parameters
Name Data type Initial value Description
axis TO_SynchronousAxis TO synchronous axis
enable BOOL Activation of the additional torque pre control
value LREAL [ Nm ] Value of the additional torque
Input/output parameters
Name Data type Initial value Description
MC_TORQUE MC_TORQUE
Instance of MC_TORQUEADDITIVE
ADDITIVE_Instance ADDITIVE
Functionality
Calls the MC_TORQUEADDITIVE
Messages
The block does not generate any messages.
Data structures
In some instances, the function blocks of the application are parameterized using
data structures, which should be created for the particular block. Structures with
the appropriate parameters are available for each block.
7.2.1 operationModesRotaryKnife
This enumeration type contains DINT constants to select and display the operating
state of function block LRK_RotaryKnife.
Element Value Description
LRK_OM_ERROR 0 LRK_RotaryKnife is in the ERROR mode
LRK_OM_DISABLE 1 LRK_RotaryKnife is in the DISABLE mode
LRK_OM_START_POSITION 2 LRK_RotaryKnife is in the STARTPOSITION mode
LRK_OM_AUTOMATIC 3 LRK_RotaryKnife is in the AUTOMATIC mode
LRK_OM_MANUAL 4 LRK_RotaryKnife is in the MANUAL mode
LRK_OM_SINGLE_CUT 5 LRK_RotaryKnife is in the SINGLE_CUT mode
© Siemens AG 2021 All rights reserved
7.2.2 leadingValueCouplingMode
This enumeration type contains DINT constants to describe the leading value
coupling mode selected in the axis configuration.
Element Value Description
LRK_LVCM_SET_POINT 0 This value should be set if the auxiliary axis with setpoint
coupling is interconnected with the leading value (material axis).
LRK_LVCM_ACTUAL_VALUE_WITH 1 This value should be set if the auxiliary axis with actual value
_EXTRAPOLATION coupling is interconnected with the leading value (external
encoder).
LRK_LVCM_ACTUAL_VALUE_WITHOUT 2 Never set this value, it is only used for the sake of
_EXTRAPOLATION completeness!
7.2.3 startStopLengthMode
This enumeration type contains DINT constants to describe the input mode for the
start/stop length.
Element Value Description
LRK_SSLM_AUTOMATIC 0 The system automatically calculates the optimum start/stop
length according to minimum torque requirement.
LRK_SSLM_BY_VALUE 1 Users specify the start/stop length
(StartLength/StopLength)
7.2.4 preControlMode
This enumeration type contains DINT constants to select and display the pre
control mode used for the torque pre control and DC link pre control.
Element Value Description
LRK_PCM_GET_VALUE_FROM_CAM 0 Using this setting, the acceleration of the rotary knife axis,
_DIRECT required for pre control, is taken directly from the value
"currentSlaveData.secondDerivedValue" of the synchronous
object of the rotary knife axis.
LRK_PCM_GET_VALUE_FROM_CAM 1 Using this setting, the acceleration of the rotary knife axis
_WITH_LOOK_AHEAD required for pre control is calculated from the "raw value" taken
from the actual cam according to the leading value position and
the actual leading value velocity. When so doing, an offset
(LookAHead!) - that can be parameterized - is considered.
Further, for this method, the leading value setpoint can be used if
the leading actual values are very noisy
7.2.5 typeOfCam
This enumeration type defines the cam type for the cam calculation:
Element Value Description
LRK_TOCAM_START_CAM 0 Cam to move the crosscutter from the start position into cyclic
operation.
© Siemens AG 2021 All rights reserved
7.2.6 camProfile
This enumeration type defines the travel profile for the cam calculation:
Element Value Description
LRK_CAMPT_LINEAR 0 Acceleration/deceleration profile with constant acceleration
LRK_CAMPT_JERK 1 Acceleration/deceleration profile with jerk limiting
LRK_CAMPT_POLY_5 2 Acceleration/deceleration profile as fifth order polynomial
LRK_CAMPT_SINUS 3 Acceleration/deceleration profile as sinusoidal waveform
LRK_CAMPT_POLY_6 4 Acceleration/deceleration profile as sixth order polynomial
7.2.7 cutProfile
This enumeration type defines the travel profile for the cam calculation:
Element Value Description
LRK_CUTPT_CONST 0 Linear cutting profile for over speed = 0.0
polynomial cutting profile for over speed > 0.0
LRK_CUTPT_LINEAR 1 Linear cutting profile for over speed = 0.0
Cutting profile with constant acceleration for over speed > 0.0
LRK_CUTPT_COSINE 2 Cosine cutting profile, the overspeed is calculated automatically
depending on the start sync angle.
7.2.8 measuringEdge
This enumeration type defines the type of the edge at the measuring input:
Element Value Description
LRK_RISING_EDGE 1 Measurement for a rising edge
LRK_FALLING_EDGE 2 Measurement for a falling edge
7.2.9 syncProfileReference
7.2.10 syncLengthType
© Siemens AG 2021 All rights reserved
status.
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeCamStatus
LRK_typeCutPosition This structure contains the buffer in which the cut positions with
Buffer the associated position deviations are saved.
Declared in: LRotaryKnifeTypes/BasicTypes/
LRK_typeCutPositionBuffer
LRK_typeCutPosition This structure contains the internal data area for entering
BufferManagement precise cut position and cut position deviation for the print mark
correction.
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeCutPositionBufferManagement
LRK_typeCuttingTorque This structure contains a table to enter the cutting torque via the
PrecontrolAngle knife angle.
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeCuttingTorquePrecontrolAngle
LRK_typeCuttingTorque This structure contains a table to display the cutting torque with
PrecontrolPosition respect to the knife position.
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeCuttingTorquePrecontrolPosition
LRK_typeGetAuxRotAxis This structure contains values to display the TO data from the
ServoValues auxiliary axis and the rotary knife axis read in the servo clock
cycle
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeGetAuxRotAxisServoValues
LRK_typeGetCam This structure contains values to display the TO data of a cam
ServoValues read in the servo clock cycle
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeGetCamServoValues
LRK_typeGetLV This structure contains values to display the TO data of leading
ServoValues value read in the servo clock cycle
Declared in: LRotaryKnife_Types/BasicTypes/
LRK_typeGetLVServoValues
[IO]: Values, which depending on how the block is connected, must be supplied by
the user or written by the function
7.3.1 LRK_typeAuxiliaryAxisCommand
This structure contains the command interface to the axis FB, reduced to the
requirements of the auxiliary axis.
I/O Element Data type Description
IN enable BOOL TRUE: Axis-FB activated
IN resetAxis BOOL TRUE: Reset command active
IN enableAxis BOOL TRUE: Axis active
IN jogForward BOOL TRUE: Jog operation forward active
IN jogBackward BOOL TRUE: Jog operation backward active
IN moveVelocity BOOL TRUE: Axis traverses with closed-loop velocity control
IN posAbsolute BOOL TRUE: Axis traverses to the absolute position
IN posRelative BOOL TRUE: Axis traverses to the relative position
TRUE: Axis traverses superimposed through the
IN posSuperimposed BOOL
relative position difference
IN Homing BOOL TRUE: Axis is being homed
IN stop BOOL TRUE: Axis is stopped
IN fastStop BOOL TRUE: Axis is stopped (fast)
© Siemens AG 2021 All rights reserved
7.3.2 LRK_typeAuxiliaryAxisOutput
This structure contains all of the required feedback signals of the auxiliary axis:
I/O Element Data type Description
OUT valid BOOL TRUE: Axis-FB displays valid
OUT busy BOOL TRUE: Axis-FB active
OUT error BOOL TRUE: Axis-FB in error state
OUT status WORD Status word of the axis FB
OUT commandBusy BOOL TRUE: Selected command active
OUT commandDone BOOL TRUE: Selected command completed
OUT commandAborted BOOL TRUE: Selected command canceled
OUT superimposedBusy BOOL TRUE: Superimposed command active
OUT superimposedDone BOOL TRUE: Superimposed command completed
OUT superimposedAborted BOOL TRUE: Superimposed command canceled
OUT homingBusy BOOL TRUE: Homing active
OUT homingDone BOOL TRUE: Homing completed
OUT homingAborted BOOL TRUE: Homing canceled
OUT jogSelected BOOL TRUE: Jog operation selected
OUT moveVelocitySelected BOOL TRUE: Velocity-controlled operation selected
OUT posAbsoluteSelected BOOL TRUE: Absolute positioning selected
7.3.3 LRK_typeAxisTOs
This structure contains all the technology objects as DB_ANY required to run the
application:
I/O Element Data type Description
Array[1..”LRK_MAX_NUMBER_OF
Array of possible leading values (axis or
IN leadingValue _LEADING_VALUES”] of
external encoder!)
LRK_typeLeadingValueTOs
IN toAuxiliaryAxis DB_ANY Interconnection of the auxiliary axis TO
IN toRotaryKnifeAxis DB_ANY Interconnection of rotary knife axis TO
toLeadingValue Interconnection of leading value
IN DB_ANY
MeasuringInput measuring input TO
IN toCam1 DB_ANY Interconnection of Cam_1 TO
IN toCam2 DB_ANY Interconnection of Cam_2 TO
© Siemens AG 2021 All rights reserved
7.3.4 LRK_typeCamCalculation
This structure contains the internal data area for controlling the cam calculation
(this is not relevant for users):
I/O Element Data type Description
IN execute BOOL Start with rising edge (0→1)
IN nextCam INT TO Cam of the cam to be currently calculated
IN actualCam INT TO Cam of the currently active cam
IN nextCamActive BOOL For a cam change, the next cam is loaded
IN actualCamActive BOOL Not used
formatLength
IN LREAL [mm] Activated format length
Activated
Type of cam to be calculated
START_CAM(0): Start cam
typeOfCam
IN typeOfCam CYCLIC_CAM(1): Cyclic cam
(DINT)
STOP_CAM(2): Stop cam
knifeCircumference
IN LREAL [mm] Activated knife circumference
Activated
startSyncAngle
IN LREAL [°] Activated start angle of the synchronous sector
Activated
endSyncAngle
IN LREAL [°] Activated end angle of the synchronous sector
Activated
IN startAngleActivated LREAL [°] Activated start angle
IN startLengthActivated LREAL [mm] Activated start length
IN stopAngleActivated LREAL [°] Activated stop angle
7.3.5 LRK_typeCamCommand
7.3.6 LRK_typeCamStatus
7.3.7 LRK_typeCutPositionBuffer
This structure contains the cut position memory (this is not relevant for users):
I/O Element Data type Description
ARRAY
[0..LRK_CPB_ [mm] Buffers the deviation between the setpoint and the
cutPositionDeviation
I/O MAX-1] actual position for the cut at the time of the
Measured
measurement
OF LREAL
ARRAY
[0..LRK_CPB_
I/O CutPositionMeasured MAX-1] [mm] Buffer for the measured cut positions
OF LREAL
ARRAY
[0..LRK_CPB_
I/O cutPositionRead MAX-1] Buffer of flag "cut position read"
OF BOOL
ARRAY
[0..LRK_CPB_
I/O cutPositionEntered MAX-1] Buffer of flag "cut position entered"
© Siemens AG 2021 All rights reserved
OF BOOL
7.3.8 LRK_typeCutPositionBufferManagement
This structure contains the internal data area to enter the cut position and to
precisely control the cut position correction (this is not relevant for users):
I/O Element Data type Description
LRK_type
I/O cutPositionBuffer Data area of the cut position memory
CutPositionBuffer
I/O bufferIn INT Pointer to the next input position of buffer
I/O bufferOut INT Pointer to next output position of buffer
I/O cutCorrectionWait INT Number of cuts without cut correction
I/O bufferReadTrigger BOOL Start trigger to read the next buffer entry
7.3.9 LRK_typeCuttingTorquePrecontrolAngle
This structure contains values to enter the cutting torque via the knife angle:
I/O Element Data type Description
ARRAY
IN angle [0..LRK_MAX_CT_PRECONTROL_POINTS-1] [°] Knife angle
OF LREAL
ARRAY
IN torque [0..LRK_MAX_CT_PRECONTROL_POINTS-1] [Nm] Cutting torque
OF LREAL
7.3.10 LRK_typeCuttingTorquePrecontrolPosition
This structure contains values to display the cutting torque via the knife position:
I/O Element Data type Description
ARRAY
OUT position [0..LRK_MAX_CT_PRECONTROL_POINTS-1] [mm] Knife position
OF LREAL
ARRAY
OUT torque [0..LRK_MAX_CT_PRECONTROL_POINTS-1] [Nm] Cutting torque
OF LREAL
7.3.11 LRK_typeGetAuxRotAxisServoValues
This structure contains values to display the TO data from the auxiliary axis and
rotary knife axis read in the servo clock cycle:
I/O Element Data type Description
OUT rotaryKnifeAxisActualPosition LREAL [mm] Knife position
OUT rotaryKnifeAxisActualVelocity LREAL [mm/s] Actual velocity
OUT rotaryKnifeAxisActualAcceleration LREAL [mm/s²] Actual acceleration
OUT rotaryKnifeAxisActualCam DB_ANY [-] Actual cam in use
OUT rotaryKnifeAxisCommunicationOK BOOL Rotary knife drive available
© Siemens AG 2021 All rights reserved
7.3.12 LRK_typeGetCamServoValues
This structure contains values to display the TO data of a cam read in the servo
clock cycle:
I/O Element Data type Description
[mm] Start position of the leading value
OUT leadingRangeStartPosition LREAL
range
[mm] End position of the leading value
OUT leadingRangeEndPosition LREAL
range
7.3.13 LRK_typeGetCamServoValues
This structure contains values to display the TO data of the leading value read in
the servo clock cycle:
7.3.14 LRK_typeLeadingValueCommand
This structure contains the command interface to the axis FB, reduced to the
requirements of the leading value. The effect of the signals depends on whether an
axis (A)/(SA) or an external encoder (EE) is used as leading value:
I/O Element Data type Description
A TRUE: Axis-FB activated
IN enable BOOL
EE TRUE Axis-FB activated
A TRUE: Reset command active
IN resetAxis BOOL
EE TRUE: Reset command active
A TRUE: Axis active
IN enableAxis BOOL
EE TRUE: External encoder active
A TRUE: Jog operation forward active
IN jogForward BOOL
EE no function
© Siemens AG 2021 All rights reserved
7.3.15 LRK_typeLeadingValueMeasuringInputCommand
This structure contains the command interface to the axis FB, reduced to the
requirements of the measuring input (MI) at the leading value.
7.3.16 LRK_typeLeadingValueMeasuringInputOutput
This structure contains all the required feedback signals of the measuring input at
the leading value
I/O Element Data type Description
OUT miResetDone BOOL TRUE: Reset (MI) completed
© Siemens AG 2021 All rights reserved
7.3.17 LRK_typeLeadingValueOutput
This structure contains all the required feedback signals of the leading value. The
significance of the signals depends on whether an axis (A) or an external encoder
(EE) is used as leading value:
I/O Element Data type Description
A TRUE: Axis-FB displays valid
OUT valid BOOL
EE TRUE: Axis-FB displays valid
A TRUE: Axis-FB active
OUT busy BOOL
EE TRUE: Axis-FB active
OUT error BOOL A TRUE: Axis-FB in error state
7.3.18 LRK_typeLeadingValueTOs
7.3.19 LRK_typeMeasuringValue
This structure contains the internal data area for the print mark correction (not
relevant for users).
7.3.20 LRK_typeRotaryKnife
This structure contains the complete global data of the rotary knife system:
I/O Element Data type Description
© Siemens AG 2021 All rights reserved
cutPositionBuffer LRK_type
Management CutPositionBuffer Internal data area for entering precise cut position and cut
I/O
Management position deviation for the print mark correction.
Type
camCalculation LRK_type
I/O CamCalculation Internal data area to call the cam calculation
Type
measuringValue LRK_type
I/O MeasuringValue Internal data area for print mark correction.
Type
I/O formatLength LREAL [mm] Length of the cut material.
Activates the mode of operation switchover with the
I/O execute BOOL
operating mode specified in eMode.
Using mode, the mode is preselected, which is activated
with the next positive edge at the execute input.
LRK_OM_ERROR (0): Preselection ERROR
mode
LRK_OM_ DISABLE (1): Preselection DISABLE
mode
operationModes
LRK_OM_ START_POSITION (2): Preselection
I/O Mode RotaryKnife
STARTPOSITION mode
(DINT)
LRK_OM_AUTOMATIC (3): Preselection
AUTOMATIC mode
LRK_OM_MANUAL (4): Preselection MANUAL
mode
LRK_OM_SINGLE_CUT (5): Preselection
SINGLE_CUT mode
I/O startSingleCut BOOL Start of a single cut, if FB is in the SINGLE_CUT mode.
7.3.21 LRK_typeRotaryKnifeAxisCommand
This structure contains the command interface to the axis FB, reduced to the
requirements of the rotary knife axis:
I/O Element Data type Description
IN enable BOOL TRUE: Axis-FB activated
IN resetAxis BOOL TRUE: Reset command active
IN enableAxis BOOL TRUE: Axis active
© Siemens AG 2021 All rights reserved
7.3.22 LRK_typeRotaryKnifeAxisOutput
This structure contains all the required feedback signals of the rotary knife axis:
I/O Element Data type Description
OUT valid BOOL TRUE: Axis-FB displays valid
OUT busy BOOL TRUE: Axis-FB active
OUT error BOOL TRUE: Axis-FB in error state
OUT status WORD Status word of the axis FB
OUT commandBusy BOOL TRUE: Selected command active
7.3.23 LRK_typeRotaryKnifeInfo
This structure contains calculation results and display information, relevant for the
user, about the state of the rotary knife.
I/O Element Data type Description
[mm] Format length, obtained when the knife runs in
OUT fsymech LREAL
synchronism with the material web
[mm] Length of the range in which the knife moves in
OUT synchronousSector LREAL
synchronism with the material web
[mm] Length of the range in which the knife may make
OUT formatSector LREAL
correction motion to achieve the format length
OUT cutPosActual LREAL [mm]Position of the material web at the last cut
[mm] Activated format length to load a cam after the next
OUT formatLengthActivated LREAL
cut
OUT formatLengthActive LREAL [mm] Format length of the cam that is presently active
[mm] Activated start position of the knife referred to the
OUT startPosActivated LREAL
knife axis
[mm] From this distance between material to the cutting
OUT startLength LREAL point, the rotary knife starts to synchronize to
materialspeed
[mm] Activated stop position of the knife referred to the
OUT stopPosActivated LREAL
knife axis
[mm] After the cut, the rotary knife has time to move to
OUT stopLength LREAL
stop position until the material has moved this distance.
[mm] Position of the knife referred to the knife axis within
OUT middlePosActivated LREAL
the format sector with minimum/maximum knife velocity
[mm] Start position of the synchronous sector referred to
OUT startSyncPos LREAL
the knife axis
OUT BOOL Flag to read out in MAIN task if knife is in sync sector
yMain
OUT cut BOOL Flag "Cut"
OUT factorMmToDegree LREAL [°/mm] Conversion factor mm → °
OUT lengthPerAngularDegree LRAEL [mm/°] Conversion factor° → mm
OUT accelerationTorque LREAL [Nm] Actual acceleration torque of the precontrol
OUT rotaryKnifeGearFactor LREAL [-] Gear ratio rotary knife axis (real gear)
OUT activeCam DB_ANY Active cam
Flag "Automatic mode interrupted"
OUT productionInterrupted BOOL When TRUE, then the rotary knife axis is disabled and
can be moved for troubleshooting purposes.
Flag "Automatic mode continued"
OUT productionContinued BOOL When TRUE, then the rotary knife axis is at the position
that it had before the interruption; automatic operation is
resumed when the leading axis starts.
LRK_SPR_RELATE_SYNC_PROFILE_TO_TIME(1)
syncProfileRefer
OUT syncProfileReference LRK_SPR_RELATE_SYNC_PROFILE_TO_LEADING_V
enceType(DINT)
ALUE(2)
Only relevant if sRotaryKnifeInfo.eSyncProfileReference =
RELATE_SYNC_PROFILE_TO_LEADING_VALUE
DIRECT(2)
syncLengthType The value from rotaryKnifeInfo.syncLength is accepted as
OUT syncLengthType
(DINT) synchronous length
When sRotaryKnifeInfo.eSyncProfileReference =
RELATE_SYNC_PROFILE_TO_TIME
EFFECTIVE(1) No significance
OUT syncLength LREAL [mm] Synchronous length
OUT extrapolationTime LREAL [ms] Time constant for extrapolating the set points
interruptPositionMaterialA [mm] Saved position of the leading axis (material!) at the
OUT LREAL
xis time of interruption
interruptPositionAuxiliaryA [mm] Saved position of the help axis at the time of
OUT LREAL
xis interruption
OUT interruptPositionRotaryKni LREAL [mm] Saved position of the rotary knife axis at the time of
7.3.24 LRK_typeSCTrendViewData
7.3.25 LRK_typeUsersInterface
This structure contains the interface for the user to enter physical secondary
conditions, cam profiles, manual cut position corrections. It is also used for entering
sequence options such as new start, fast start and flying format change in
operation (this must be parameterized by the user):
I/O Element Data type Description
[mm] Effective geometrical circumference of the
IN knifeCircumference LREAL
measuring roll (circumference)
[°] Starting angle of the synchronous sector (cutting
range), i.e. the angle where the knife enters the
IN startSyncAngle LREAL
material, the center point is defined to be 0°
(170.0° - 360.0°).
[°] End angle of the synchronous sector, i.e. the
IN endSyncAngle LREAL angle where the knife exits the cutting range
(0.0° - 170.0 °).
[°] start angle of the knife (referred to 0°) (start angle of the
start cam). This value is different from the stopAngle if the
IN startAngle LREAL
machine is to be a pendulum shear. Otherwise the two
parameters are the same.
[°] stop angle of the knife (referred to 0°) (stop angle of the
stop cam). This value is different from the startAngle, if this
IN stopAngle LREAL
is to be a pendulum shear. Otherwise, the two parameters
are the same.
acceleration and
camProfile jerk limiting
IN camProfilePhase1
(DINT) LRK_CAMPT_POLY_5 (2): Motion profile as fifth order
polynomial
LRK_CAMPT_SINE (3): Motion profile as sinusoidal
curve
LRK_CAMPT_POLY_6 (4): Motion profile as sixth order
polynomial
[%] Jerk limiting component in phase 1 (only for
camProfilePhase1 = JERK).
IN jerkPhase1 LREAL The valid value range lies between 1.0 and 100.0. The
phase where the acceleration is not constant is obtained for
100%. The absolute jerk depends on the machine velocity.
Motion profile, phase 2:
LRK_CAMPT_LINEAR (0): Curve profile with constant
acceleration
LRK_CAMPT_JERK (1): Curve profile with constant
acceleration and
camProfile jerk limiting
IN camProfilePhase2
(DINT) LRK_CAMPT_POLY_5 (2): Motion profile as fifth order
polynomial
LRK_CAMPT_SINE (3): Motion profile as sinusoidal
curve
LRK_CAMPT_POLY_6 (4): Motion profile as sixth order
polynomial
[%] Jerk limiting component in phase 2 (only for
camProfilePhase2 = JERK).
IN jerkPhase2 LREAL The valid value range lies between 1.0 and 100.0. The
phase where the acceleration is not constant is obtained for
100%. The absolute jerk depends on the machine velocity.
Negative
Start cut to separate "scrap" and "product" in the
IN cleanCut BOOL
SAMPLE_CUT mode
IN torquePreControlOn BOOL Flag "Precontrol of the accelerating torque on"
totalInertiaOf [kgm2] Moment of inertia of the total system
IN LREAL
Rotary knife system (rolls, knife, gear and motors!)
Changes over the calculation method to control the
accelerating torque
LRK_PCM_GET_VAL_FROM_CAM_DIRECT (0):
The actual acceleration value to calculate the accelerating
torque is read from the slave data (SecondDerivedValue) of
the synchronous object.
LRK_PCM_GET_VAL_FROM_CAM_WITH_LOOK_AHEAD
torquePreControl PreControlMode (1):
IN
Mode (DINT) The actual acceleration value to calculate the accelerating
torque is determined from the actual cam. The actual
machine velocity is compensated.
This method also allows an acceleration value to be
determined in the future (under the assumption that material
motion remains constant!) in order to compensate for any
delays occurring in the set point channel.
The lookahead time is set in variable
usersInterface.r64LookAHead.
LRK_LVCM_SET_POINT (0):
Set point value coupling
leadingValue
leadingValue
IN CouplingMode LRK_LVCM_ACTUAL_VALUE_WITH_
CouplingMode
(DINT) EXTRAPOLATION (1):
Actual value coupling with extrapolation
LRK_LVCM_ACTUAL_VALUE_WITHOUT_
EXTRAPOLATION (2):
Actual value coupling without extrapolation
IN syncLength LREAL [mm] Synchronizing length
[ms] Extrapolation time constant
IN extrapolationTime LREAL (only valid for usersInterface.eLeadingValueCouplingMode =
LRK_LVCM_ACTUAL_VALUE_WITH_EXTRAPOLATION)
TRUE = virtual axis as leading value in the synchronous
boConstantVelocity sector
IN BOOL
AtCut FALSE = actual value as leading value in the synchronous
sector
Settings for defining the start length
LRK_SSLM_AUTOMATIC (0):
The system automatically calculates the optimum start
startStopLength length according to minimum torque requirement.
© Siemens AG 2021 All rights reserved
IN startLengthMode
Mode (DINT)
LRK_SSLM_BY_VALUE (1):
Users specify the start length
(startLength)
LRK_SSLM_AUTOMATIC (0):
The system automatically calculates the optimum stop
startStopLength length according to minimum torque requirement.
IN stopLengthMode
Mode (DINT)
LRK_SSLM_BY_VALUE (1):
Users specify the stop length
(stopLength)
[mm] After the cut, the rotary knife has time to move to
IN stopLength LREAL
stop position until the material has moved this distance.
LRK_type Table "Torque with respect to the knife angle"
cuttingTorque
IN cuttingTorque
Precontrol [optional]
PrecontrolAngle
cuttingTorque Flag "Precontrol of the cutting torque on"
IN BOOL
PreControlOn [optional]
cuttingTorque Number of currently used interpolation points of the
IN PreControlActive INT "Torque with respect to the knife angle" table
Points [optional]
gearInRatio Numerator of gearing ratio between leading value and
IN DINT
Numerator auxiliary axis.
gearInRatio Denominator of gearing ratio between leading value and
IN DINT
Denominator auxiliary axis.
Preconditions
The following preconditions must be fulfilled to operate the application example:
• The required SIMATIC TIA project is available online in the appropriate
SIMATIC S7-15xxT CPU.
© Siemens AG 2021 All rights reserved
8.1 TestFB_RotaryKnife
8.1.1 Operating instructions for the application
Execute the steps listed in the following table in sequence to demonstrate the
application example:
Table 8-1 Operating instructions to demonstrate the TestFB application SIMATIC RotaryKnife
No. Action Comment
1. Start screen after calling the WinCC
RT user interface
© Siemens AG 2021 All rights reserved
(Stop motion)
6. Switching the rotary knife into the
automatic mode
Select the "AUTO" mode
Press the "Execute" button
(edge 0 → 1!)
9 Explanation of the
operating/parameterizing and diagnostic
screen forms
9.1 TestFB_RotaryKnife
9.1.1 Operating/overview screen form RK operating
14 13
Fig. 9-1 RK-Operating 12 11 10
2 9
© Siemens AG 2021 All rights reserved
3 8
4
5 7
6 15
When print mark correction is activated, the cut position can be changed by a coarse and a fine
correction value +/-
Operation is only possible in the "MANUAL" mode. In all other operating modes, this area is used
© Siemens AG 2021 All rights reserved
Operation is only possible in the "MANUAL" mode. In all other operating modes, this area is used
to display actual values.
15.
1 2
_
3
© Siemens AG 2021 All rights reserved
Table 9-2 Explanation of the sub screen forms for RK-Data1 (UI-1)
No. Sub screen form
1. Enter the numerical user parameter
© Siemens AG 2021 All rights reserved
The rotary knife system must be restarted in order to change parameter "KnifeCircumference"!
3.
1
4
3
5
© Siemens AG 2021 All rights reserved
Table 9-3 Explanation of the sub screen forms for RK-Data2 (UI-2)
No. Sub screen form
1. Acceleration pre control parameters
In this case, the system calculates the start/stop length so that synchronization strictly runs
© Siemens AG 2021 All rights reserved
monotonically
or
In addition to entering the parameters required for print mark correction, print mark correction can
also be operated here
• Switch on/switch off
© Siemens AG 2021 All rights reserved
5. Parameters to define the gearing ratio between leading value and auxiliary axis
© Siemens AG 2021 All rights reserved
2
Fig. 9-4 RK-Data4 (MV-CPB)
4
© Siemens AG 2021 All rights reserved
Table 9-4 Explanation of the sub screen forms for RK-Data4 (MV-CPB)
No. Sub screen form
1. Numerical displays of the measured value sensing
© Siemens AG 2021 All rights reserved
The parameters required to adapt and finely adapt are provided in operating screen
form RK-Data2 (UI-2), in area "Cut Position Correction Data".
2
Fig. 9-5 RK-Data5 (RKI-CC)
3
© Siemens AG 2021 All rights reserved
Table 9-5 Explanation of the sub screen forms for RK-Data5 (RKI-CC)
No. Sub screen form
1. Displays for the rotary knife information
© Siemens AG 2021 All rights reserved
10
11
12
13
© Siemens AG 2021 All rights reserved
14
15
16
17
18
19
20
21
3 4
© Siemens AG 2021 All rights reserved
2
© Siemens AG 2021 All rights reserved
Table 9-7 Explanation of the sub screen forms for RK-Read CAM P
No. Sub screen form
1. Select the cam to be displayed and start visualization
3
© Siemens AG 2021 All rights reserved
Table 9-8 Explanation of the sub screen forms for RK-Read CAM VAJ
No. Sub screen form
1. Velocity characteristic of the selected cam
10 Appendix
10.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:
support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts.
Please send queries to Technical Support via Web form:
support.industry.siemens.com/cs/my/src
© Siemens AG 2021 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
web page:
support.industry.siemens.com/cs/sc
The Siemens Industry Mall is the platform on which the entire siemens Industry
product portfolio is accessible. From the selection of products to the order and the
delivery tracking, the Industry Mall enables the complete purchasing processing –
directly and independently of time and location:
mall.industry.siemens.com
\3\