Positioning To Print Marks With Sinamics V90 and SIMATIC S7-1200 (TO)
Positioning To Print Marks With Sinamics V90 and SIMATIC S7-1200 (TO)
Positioning To Print Marks With Sinamics V90 and SIMATIC S7-1200 (TO)
Marks with
SINAMICS V90 and
SIMATIC S7-1200 (TO)
Siemens
SIMATIC S7-1217C / SINAMICS V90 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109749356 Support
Warranty and Liability
Note The Application Examples are not binding and do not claim to be complete regarding the
circuits shown, equipping and any eventuality. The Application Examples do not represent
customer-specific solutions. They are only intended to provide support for typical
applications. You are responsible for ensuring that the described products are used
correctly. These Application Examples do not relieve you of the responsibility to use safe
practices in application, installation, operation and maintenance. When using these
Application Examples, you recognize that we cannot be made liable for any
damage/claims beyond the liability clause described. We reserve the right to make
changes to these Application Examples at any time without prior notice.
If there are any deviations between the recommendations provided in these Application
Examples and other Siemens publications – e.g. Catalogs – the contents of the other
documents have priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
(“wesentliche Vertragspflichten”). The damages for a breach of a substantial
contractual obligation are, however, limited to the foreseeable damage, typical for
Siemens AG 2017 All rights reserved
the type of contract, except in the event of intent or gross negligence or injury to
life, body or health. The above provisions do not imply a change of the burden of
proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of the Siemens AG.
Security Siemens provides products and solutions with industrial security functions that support the
informa- secure operation of plants, systems, machines and networks.
tion In order to protect plants, systems, machines and networks against cyber threats, it is
necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial
security concept. Siemens’ products and solutions only form one element of such a
concept.
Customer is responsible to prevent unauthorized access to its plants, systems, machines
and networks. Systems, machines and components should only be connected to the
enterprise network or the internet if and to the extent necessary and with appropriate
security measures (e.g. use of firewalls and network segmentation) in place.
Additionally, Siemens’ guidance on appropriate security measures should be taken into
account. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more
secure. Siemens strongly recommends to apply product updates as soon as available and
to always use the latest product versions. Use of product versions that are no longer
supported, and failure to apply latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security
RSS Feed under http://www.siemens.com/industrialsecurity.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 2
Table of Contents
Table of Contents
Warranty and Liability ................................................................................................. 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Mode of operation ................................................................................ 5
1.3 Components used ................................................................................ 5
2 Engineering ........................................................................................................ 7
2.1 Hardware configuration ........................................................................ 7
2.2 Configuring the drive ............................................................................ 7
2.3 Configuring the technology object ........................................................ 9
2.4 Parameterizing the blocks .................................................................. 10
2.4.1 Initializing the automation system ...................................................... 10
2.4.2 Simulating the cutter........................................................................... 12
2.4.3 Processing the FIFO memory ............................................................ 13
2.4.4 Positioning the band ........................................................................... 14
2.4.5 Determining the print-mark position ................................................... 16
2.5 Operation ............................................................................................ 19
2.5.1 General overview ............................................................................... 19
2.5.2 Controlling the drives .......................................................................... 20
2.5.3 Entries of the FIFO memory ............................................................... 21
2.5.4 JOG mode .......................................................................................... 21
2.5.5 System functions ................................................................................ 21
Siemens AG 2017 All rights reserved
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 3
1 Introduction
1 Introduction
1.1 Overview
The TIA Portal V14 enables the control of a SINAMICS V90 drive via the
pulse/direction interface (PTO). For this purpose, the SINAMICS drive can be
configured in a SIMATIC S7-1200 controller as technology object and can be
operated using Motion Control instructions.
Figure 1-1: Components used
SIMATIC HMI
TP700 COMFORT SIMATIC S7-1217C SINAMICS V90
PROFINET / IE
SIMOTICS S-1FL6
Siemens AG 2017 All rights reserved
In this application example, the components shown in figure 1-1 have been used to
implement a cutting device. For this, print marks on a band have to be detected
and their position has to be stored as setpoint values for positioning the band.
Figure 1-2: Overview of the automation system
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 4
1 Introduction
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 5
1 Introduction
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 6
2 Engineering
2 Engineering
2.1 Hardware configuration
Figure 2-1 shows the connections you have to install between the SIMATIC S7-
1200 controller and the SINAMICS V90 drive.
L+
M
Siemens AG 2017 All rights reserved
SB 1223
S7-1217 6ES7 223-3BD30-0XB0
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 7
2 Engineering
6. In the parameterization, set the value for "Number of setpoint pulses per
motor revolution" to 2500.
Figure 2-3: Setpoint pulses
Siemens AG 2017 All rights reserved
8. For the encoder pulse output, set the value 2500 as number of pulses per
revolution.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 8
2 Engineering
When configuring the drive, define also the digital inputs and outputs via which the
drive communicates with the SIMATIC controller.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 9
2 Engineering
During configuration of the mechanics, set the values of the hardware you are
using.
LGF_ InstLgf
Siemens AG 2017 All rights reserved
Main
Frequency Frequency
[OB1] [FB10024] [DB17]
Init InstInit
Machine Machine
[FB5] [DB6]
InstFIFO
FIFOReal
Real
[FB3] [DB2]
Mark InstMark
Sensor Sensor
[FB20] [DB20]
FIFOData
The function block "InitMachine" processes all functions required for starting the
automatic operation of the automation system.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 10
2 Engineering
Bool jogForward
Bool jogBackward
Real jogSpeed
buttonCutPos
Bool
ition
Bool powerOnV90
distanceCutte
Real
rSensor
distanceCutte
Real
rMark
Real moveSpeed
clearFIFO
Bool Bool
step
DInt DInt
axis
TO_PositioningAxis TO_PositioningAxis
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 11
2 Engineering
Init InstInit
Main
Machine Machine
[OB1] [FB5] [DB6]
FIFOReal
[FB3]
MC_
Power
[FB1107]
MC_Move
Jog
[FB1103]
MC_Move
Relative
[FB1104]
Siemens AG 2017 All rights reserved
MC_
Home
[FB1101]
You can start processing the steps in the function block "InitMachine" via the HMI
user interfaces (see chapter "Operation").
In the present application example, the cutting device is simulated. This is realized
using the function block "LGF_Frequency".
Figure 2-11: Calling "LGF_Frequency"
LGF_Frequency
countdown Time
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 12
2 Engineering
Note The "Library of General Functions (LGF)" is available at the following link:
https://support.industry.siemens.com/cs/ww/en/view/109479728
The function block "FIFOReal" processes the memory of the position values
according to the FIFO (First In – First Out) principle. This means that the values
that have been saved first will also be the first values to be taken from the memory.
Bool resetFIFO
Siemens AG 2017 All rights reserved
FIFO_Buffer
Array[*] of Real Array[*] of Real
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 13
2 Engineering
The "FIFOReal" block is always called in the sequence program when the following
tasks are to be processed:
Saving a value to the FIFO memory
Taking a value from the FIFO memory
Clearing the FIFO memory
The function block "StateMachine" responds to the position of the cutter and
positions the band using a technology function.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 14
2 Engineering
FIFOReal
[FB3]
MC_Move
Absolute
[FB1102]
After calling the function block "StateMachine", the current setpoint position to
which the band shall be moved is determined first. To do this, the function block
"FIFOReal" is called which takes the current setpoint position from the FIFO
memory. This setpoint position is then used for positioning the band by means of
the technology function "MC_MoveAbsolute".
Siemens AG 2017 All rights reserved
In this application example, the process alarm OB is triggered by the position of the
cutter. Each time the cutter is in the upper position, a sensor sends a signal to a
digital input of the controller. Due to this signal, the process alarm OB is called and
the band positioning starts.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 15
2 Engineering
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 16
2 Engineering
For high-speed counters, you can set the following counting modes:
Counting
Siemens AG 2017 All rights reserved
Period length
Frequency
Motion Control
In this application example, the counting mode “Counting" is used.
Note Information on how to configure and use high-speed counters is available in the
application example "S7-1200: Application Examples for High-Speed Counters
(HSC)":
https://support.industry.siemens.com/cs/ww/en/view/109742346
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 17
2 Engineering
FIFOReal
[FB3]
CTRL_
HSC_EXT
The count value "CapturedCount" is updated when the specified input event
occurs. This event is the detection of a print mark by the color sensor. The count
value is updated independently of the cyclic user program being processed.
Figure 2-20: Determined count values
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 18
2 Engineering
The encoder value upon detection of a print mark is intended to determine the
setpoint position required for precise band positioning. The setpoint position is
calculated by means of the following formula:
𝑒𝑛𝑐𝑜𝑑𝑒𝑟 𝑣𝑎𝑙𝑢𝑒
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑜𝑟 𝑜𝑛𝑒 𝑚𝑜𝑡𝑜𝑟 𝑟𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛 ∗ ( )
𝑝𝑢𝑙𝑠𝑒𝑠 𝑝𝑒𝑟 𝑒𝑛𝑐𝑜𝑑𝑒𝑟 𝑟𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛
𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑝ℎ𝑎𝑠𝑒 𝑖𝑛 𝑡ℎ𝑒 𝑠𝑒𝑡𝑡𝑖𝑛𝑔𝑠 𝑜𝑓 𝑡ℎ𝑒 ℎ𝑖𝑔ℎ − 𝑠𝑝𝑒𝑒𝑑 𝑐𝑜𝑢𝑛𝑡𝑒𝑟
After calculation, the setpoint positions for band positioning are written to the FIFO
memory by calling the function block "FIFOReal".
2.5 Operation
The following user interfaces are available in the HMI project for operating the
Siemens AG 2017 All rights reserved
application example. The structure of these user interfaces is shown in the figure
below.
Figure 2-21: Overview of the user interfaces
Start screen
Control of the
drives
Entries of the
JOG mode System functions
FIFO memory
If there is no SIMATIC HMI available, the user interfaces can be used in simulation
mode. In the simulation mode, the runtime of the operator panel is displayed in a
TIA framework.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 19
2 Engineering
When activating the SIMATIC HMI or the simulation, the control screen of the
drives is first displayed.
Figure 2-23: Controlling the drives
Siemens AG 2017 All rights reserved
Use the "CutPossition" button to move the band to the first cutting position. Then,
the "simulation cutter" can be started.
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 20
2 Engineering
The first ten entries of the memory are shown in the user interface of the FIFO
memory. Use the button "Clear Buffer" to delete the entries from the memory.
Figure 2-24: User interface of the FIFO memory
The display "entrys in the buffer" shows the number of print-mark positions not yet
approached.
Siemens AG 2017 All rights reserved
In the user interface "JOG", you can control the Motion Control instruction
"MC_MoveJog".
Figure 2-25: User interface for the JOG mode
After the SINAMICS V90 has been enabled, you can move the motor in both
directions via the buttons "JogForward" and "JogBackward".
In this user interface, you can enable the following system functions:
Clean screen (clean-up modem)
Opening the system control (system control open)
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 21
2 Engineering
A navigation bar is located on the right side of the user interfaces. It is used to go
to more user interfaces.
Figure 2-27: Navigation bar
Siemens AG 2017 All rights reserved
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 22
3 Appendix
3 Appendix
3.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers access to our entire service and support
know-how and portfolio around the clock.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks at:
https://support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides fast and competent support
regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send your
queries to the Technical Support via the web form:
www.siemens.com/industry/supportrequest
Service offer
Siemens AG 2017 All rights reserved
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 23
3 Appendix
Druckmarkenkorrektur S7-1217C
Entry ID: 109749356, V1.0, 10/2017 24