LInfeed SIMATIC V1 0 en

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

S7-1500(T) 智能进料

LInfeed for SIMATIC


https://support.industry.siemens.com/cs/ww/en/view/109770903
Legal information

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

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

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

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

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 2
1 介绍

⽬录
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 5
1.1 Overview............................................................................................... 5
1.2 Mode of operation ................................................................................ 6
1.2.1 Overview infeed system ....................................................................... 6
1.2.2 Functionality of Intelligent Infeed .......................................................... 6
1.2.3 Software architecture ........................................................................... 8
1.2.4 Technological concept .......................................................................... 9
1.2.5 Definitions ........................................................................................... 10
1.3 General requirements ......................................................................... 12
1.3.1 Product requirements ......................................................................... 12
1.3.2 Mechanical requirements ................................................................... 12
1.3.3 Sensor position recommendation ....................................................... 12
1.4 Components used .............................................................................. 13
2 Engineering ...................................................................................................... 14
2.1 Description of interface ....................................................................... 14
2.1.1 FB LInfeed_Manager (FB 31800) ...................................................... 15
2.1.2 FB LInfeed_InletBelt (FB31801) ......................................................... 18
2.1.3 FB LInfeed_InfeedBelt (FB31802) ..................................................... 20
2.1.4 FB LInfeed_OutletBeltBasic (FB31803) ............................................. 22
2.1.5 FC LInfeed_RpmToVelocity (FC 31800) ............................................ 24
2.1.6 FC LInfeed_VelocityToRpm (FC 31801) ............................................ 25
2.1.7 FC LInfeed_MachineSpeedToVelocity (FC 31802) ........................... 26
2.1.8 FC LInfeed_VelocityToDistance (FC 31803) ..................................... 27
2.1.9 PLC data types ................................................................................... 28
2.1.10 PLC tags ............................................................................................. 33
2.2 Project integration .............................................................................. 38
2.2.1 Integrating the library blocks into STEP 7 .......................................... 38
2.2.2 CPU selection and settings ................................................................ 39
2.2.3 Technology object configuration ........................................................ 39
2.2.4 Call of Intelligent Infeed application ................................................... 40
2.2.5 Sensor signal acquisition.................................................................... 41
2.2.6 Change of Intelligent Infeed configuration .......................................... 42
2.2.7 Machine parameters ........................................................................... 42
2.2.8 Product parameters ............................................................................ 45
2.2.9 Pocket length ...................................................................................... 48
2.2.10 Other parameters ............................................................................... 48
2.3 Operation ............................................................................................ 50
2.3.1 Activation and deactivation................................................................. 50
2.3.2 General functionalities ........................................................................ 50
2.3.3 Start of application .............................................................................. 51
2.3.4 Homing of outlet belt .......................................................................... 51
2.3.5 Continuous homing ............................................................................ 51
2.3.6 Control of outlet product rate POutlet (by infeed system) ..................... 52
2.3.7 Control of inlet product rate PInlet (by upstream machine) .................. 52
2.4 Error handling ..................................................................................... 53
2.4.1 Acknowledge of errors........................................................................ 53
2.4.2 Solutions for errors at enabling of manager FB ................................. 53
2.4.3 Solutions for errors at start of functionality ......................................... 53
2.4.4 Solutions for errors during functionality is running ............................. 53
2.4.5 Solutions for insufficient product position accuracy on the outlet
belt ...................................................................................................... 54
3 Additional information .................................................................................... 55

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 3
1 Introduction

3.1 Miscellaneous ..................................................................................... 55


3.1.1 Optimal infeed belt length................................................................... 55
3.1.2 Get friction coefficient with inclined plane test ................................... 55
4 Appendix .......................................................................................................... 56
4.1 Service and support ........................................................................... 56
4.2 Application support ............................................................................. 57
4.3 Links and literature ............................................................................. 57
4.4 Change documentation ...................................................................... 57

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 4
1 介绍

1 介绍
1.1 概览
该应用程序可用于在不规则到达的相同长度的产品之间创建相等的间隙。一个典型
的用例是将产品同步到 tappet chain 中。

智能进料应用程序旨在用于生产机器,主要是包装行业。该应用程序自动计算和
调节产品的适当加速度和速度。由于该过程是非接触式的,智能进料也适用于特
别敏感的产品。

关键事实和好处
• “Ready to run” 解决方案去控制一个进料系统
• 非接触式产品处理
• 支持不同长度的皮带
• 出⼝带上的胶带链(⼝袋)或恒定距离(⽆⼝袋)
• 皮带运动的自动控制和协调
• 只需参数化(无需编程)即可快速工程化
• 模块化概念
• 皮带数量仅受所用CPU类型的限制
• 手动点动功能(例如用于调试)
• 工艺对象配置的自动检查
• 专为梯形图调用而设计; 易于诊断

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 5
1 介绍

1.2 操作模式
1.2.1 进料系统概述

图 1-1: 进料系统基本设计

Inlet belt Infeed belt 1..n Outlet belt

产品流向

进料系统由几条皮带组成:
• Inlet belt
产品(连续)通过这条传送带到达.
• Infeed belts
几个进料带以计算出的速度移动,以使产品适当地到达出口带。所需进料带
的数量取决于不同的参数 (例如机器速度、摩擦系数等)
• Outlet belt
出口带将产品输送到下游机器或作为其一部分。该带上的产品之间有明确的
间隙。出口带可以设计有或没有口袋。 在带有口袋的版本中,产品位于出口
皮带口袋的中间。(例如流式包装机)

表 1-1 Overview belts and axes


Belt type Axis / drive type Controlled by Note
inlet belt 速度或位置控制 user 只需要实际速度

infeed belts 位置控制 Intelligent Infeed


outlet belt 位置控制 user

1.2.2 智能进料功能

本章描述了产品处理的机制.

1.2.2.1 产品同步 (‘autoSync’)

当自动功能运行时,每个产品都会经历以下操作阶段:
• Product detection
当产品传感器检测到新产品时,它会在内部寄存器中初始化,并由进料系统根据
当前的皮带速度进行处理。.
• Identification of target pocket
对于每种产品,每条带(进料轮廓)的快慢带速度会导致出口带的可到达位置范围
。如果可能的话,将产品分配到口袋的方式是不会创建空口袋。

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 6
1 介绍

• Determination of infeed belt velocities / gear ratio


在识别出目标袋之后,计算每个带速度(传动比)。现在已知该产品的单个皮
带速度。
• Controlling of belts according to the product position
当产品在皮带上移动时,下一条皮带的相应速度(传动比)会在正确的时间自
动设置。
图 1-2: Application concept – 概览

Maximum profile Minimum profile


产品传感器 (product velocity) (product v elocity)
产品流向 移动方向

Pocket 6 Pocket 5 Pocket 4

Pocket 1 Pocket 2 Pocket 3

Inlet belt Infeed belts 1..n Outlet belt

Minimum reachable position Maximum reachable position

The figure below shows the minimum and maximum infeed profile along the
system. Only the infeed belts change their velocities. A velocity distribution for a
product is always between a minimum and a maximum value. These values are
depending on different parameters. (e.g. machine speed, friction coefficient, etc.)
图 1-3: Application concept – Infeed profiles (例如: Inlet belt velocity = outlet belt velocity)

Infeed profiles
(product velocities)
v
mm/s

Maximum infeed profile

Current infeed profile

Minimum infeed profile


Inlet velocity /
Outlet velocity

0 Handover position 1 Handover position 2 Handover position 3 s


mm

Inlet belt Infeed belts 1..n Outlet belt

1.2.2.2 叠加运动 (‘positionCorrection’)

The basic product synchronization to the outlet belt is done by the ‘autoSync’
functionality. This is always required for synchronizing products to the outlet belt.
‘PositionCorrection’ is an optional or advanced functionality for correcting product
positions. This can be required due to:
• Unknown slippage of products
• Inaccurate or changing parameters (e.g. friction coefficient)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 7
1 介绍

The figure below shows the functionality of the ‘positionCorrection’ functionality.


When the product has arrived on an infeed belt its position is detected by a product
sensor.
A correction distance value is calculated and a superimposed movement is started
to shift the product to its ideal position.
图 1-4: Position correction of products on the infeed belts

Start position End position

Product velocity

Product sensor

Inlet belt Infeed belt 1 Infeed belt 2

1.2.3 软件架构

图 1-5: 智能进料应用程序的软件架构

模块化概念
智能进料应用程序由一个主模块 (LInfeed_Manager) 和代表真实现有机器零件的
其他(子)模块组成。

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 8
1 介绍

LInfeed_InletBelt 软件模块代表真实的 inlet belt.


LInfeed_InfeedBelt 软件模块代表一个真实的 infeed belt.
LInfeed_OutletBeltBasic 软件模块代表真实的 outlet belt.
启动时,LInfeed_Manager 正在检查所有连接的子模块。主要工作是协调并向所有(
子)模块发送命令。这些模块根据实际执行状态提供反馈。
所有模块之间数据交换的共享的地方是 LInfeed_DataExchange 数据块。

1.2.4 技术概念

在自动功能期间,所有进料带都根据所需的速度循环啮合。这是通过 MC_GearIn
指令实现的。技术概念取决于出口带的控制位置。见以下两个案例。

Outlet belt controlled by same CPU


图 1-6: 技术概念 – Outlet belt controlled by the same CPU

Outlet be lt
TO_PositioningAxis / TO_SynchronousAxis
linear, modulo 0.."pocket length"

rel. MC_GearIn rel. MC_GearIn rel. MC_GearIn rel. MC_GearIn

Infee d b elt 1 Infee d b elt 2 Infee d b elt 3 Infee d b elt n


TO_SynchronousAxis TO_SynchronousAxis TO_SynchronousAxis TO_SynchronousAxis
linear linear linear linear

如果出口皮带由用于智能进料应用相同的 CPU 控制1 ,则需要 SIMATIC S7-


1500 CPU。
出口皮带轴类型可以是:
• TO_PositioningAxis
• TO_SynchronousAxis

注意 出口皮带轴的控制必须由用户完成。

1 除其他外: Power on and set velocity of the axis.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 9
1 介绍

Outlet belt controlled by external CPU


图 1-7: 技术概念 – Outlet belt controlled by an external CPU

Outlet belt
TO_ExternalEncoder
linear, modulo 0.."pocket length"

re l. MC_GearIn re l. MC_GearIn re l. MC_GearIn re l. MC_GearIn

Infeed belt 1 Infeed belt 2 Infeed belt 3 Infeed belt n


TO_SynchronousAxis TO_SynchronousAxis TO_SynchronousAxis TO_SynchronousAxis
linear linear linear linear

如果出口皮带不由用于智能进料应用的同一CPU上控制,则需要 SIMATIC S7-1500


T2 CPU 。
例如,如果下游机器是在单独的CPU中设计的。在这种情况下,需要外部编码器来
获取出口带的实际位置。
出口皮带轴类型必须为 TO_ExternalEncoder.

1.2.5 定义

Product rate P (Machine speed)


每次入口带上到达的产品数量由产品速率 P 定义,也称为机器速度。平均而言,该
产物流必须通过出口带排放。

𝑝𝑎𝑟𝑡𝑠
注意 The product rate is defined as 𝑃 =
𝑜𝑟 [𝑝𝑝𝑚] (parts per minute)

Basically, the following condition has to be met:


𝑃𝐼𝑛𝑙𝑒𝑡 = 𝑃𝑂𝑢𝑡𝑙𝑒𝑡
In general, there are two ways to realize this (see chapter: 2.3 Operation).
Table 1-2 Effects of different product rates
PInlet / POutlet Product quantity on inlet Result on outlet
< 1.0 too less cyclically gaps
= 1.0 right no cyclically gaps
> 1.0 too many more products on outlet belt than pockets
available (has to be avoided)

2 Actual value coupling is only supported by a SIMATIC S7-1500T CPU

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 10
1 Introduction

Situation at inlet and outlet belt


Figure 1-8: Velocities and distances at inlet and outlet belt

Inlet belt Infeed belts Outlet belt


inletCenterDistance = product rate
distanceInlet [mm] [ppm]
pocket Length =
distanceOutlet [mm]

ideal ideal ideal

velocity Inlet [mm/s] velocity Outlet [mm/s]

Table 1-3 Comparison of product rate, velocity and distance


Belt P= VelocityBelt = DistanceBelt =
𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝐼𝑛𝑙𝑒𝑡 𝑃 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝐼𝑛𝑙𝑒𝑡
inlet 60 ∗ ∗ 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝐼𝑛𝑙𝑒𝑡 60 ∗
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝐼𝑛𝑙𝑒𝑡 60 𝑃
𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝑂𝑢𝑡𝑙𝑒𝑡 𝑃 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝑂𝑢𝑡𝑙𝑒𝑡
outlet 60 ∗ ∗ 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑂𝑢𝑡𝑙𝑒𝑡 60 ∗
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑂𝑢𝑡𝑙𝑒𝑡 60 𝑃
© Siemens AG 2020 All rights reserved

The Intelligent Infeed application requires the inlet center distance of the products
as parameter. If only the inlet belt velocity is known, it can be converted to
distance.
Example
Table 1-4 Example parameters
Parameter Value
product rate 100ppm
velocity 250mm/s
→Inlet center distance (distanceInlet) = 60 * 250mm/s / 100ppm = 150mm

Velocity ratio R (inlet / outlet belt velocity)


The ratio between inlet and outlet belt velocity is depending on the inlet center
distance and the pocket length and has to be constant.

𝒗𝒆𝒍𝒐𝒄𝒊𝒕𝒚𝑰𝒏𝒍𝒆𝒕 𝒅𝒊𝒔𝒕𝒂𝒏𝒄𝒆𝑰𝒏𝒍𝒆𝒕
𝑹= = = 𝒄𝒐𝒏𝒔𝒕𝒂𝒏𝒕
𝒗𝒆𝒍𝒐𝒄𝒊𝒕𝒚𝑶𝒖𝒕𝒍𝒆𝒕 𝒅𝒊𝒔𝒕𝒂𝒏𝒄𝒆𝑶𝒖𝒕𝒍𝒆𝒕
Table 1-5 Cases of velocity ratio R
R Velocity Distance
< 1.0 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝐼𝑛𝑙𝑒𝑡 < 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝑂𝑢𝑡𝑙𝑒𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝐼𝑛𝑙𝑒𝑡 > 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑂𝑢𝑡𝑙𝑒𝑡
= 1.0 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝐼𝑛𝑙𝑒𝑡 = 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝑂𝑢𝑡𝑙𝑒𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝐼𝑛𝑙𝑒𝑡 = 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑂𝑢𝑡𝑙𝑒𝑡
> 1.0 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝐼𝑛𝑙𝑒𝑡 > 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦𝑂𝑢𝑡𝑙𝑒𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝐼𝑛𝑙𝑒𝑡 < 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑂𝑢𝑡𝑙𝑒𝑡

NOTE For perfect functionality, the velocity ratio R has to be kept constant.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 11
1 Introduction

Example
Table 1-6 Example parameters
Parameter Value
product rate 120ppm
inlet center distance 225mm
pocket length 300mm
→ velocityInlet = 120ppm / 60 * 300mm = 600mm/s
→ velocityOutlet = 120ppm / 60 * 225mm = 450mm/s
→ R = 225mm / 300mm = 0.75
→ velocityInlet = 0.75 * velocityOutlet

In this example this means that the inlet belt has to move at a velocity of 75%
relative to the outlet belt.

1.3 General requirements


1.3.1 Product requirements

• Products must have the same length during operation


© Siemens AG 2020 All rights reserved

The product length can be parameterized.


• Products must have the same friction coefficient.
• Products must arrive on the inlet belt with sufficient distance to ensure the
detection by the inlet belt product sensor.

1.3.2 Mechanical requirements

Figure 1-9: Transition between two belts (example inlet and infeed belt 1)

Inlet belt Infeed belt 1

The following mechanical requirements have to be met for proper functionality:


• Mechanical gap at the transition between belts as small as possible
• There must be no height differences at the belt transitions
• Products must pass from one belt to the next without tilting and turning
• All belts and all products must have equal surface properties (static friction
coefficient)

1.3.3 Sensor position recommendation

The use of sensors between belts transitions may have advantages:


• It is possible to use a light barrier with through beam or reflector. The receiver
or reflector can be mounted below the belt. So, the light beam has to pass the

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 12
1 Introduction

belt transition. (More reliable detection of products than the use of a diffuse or
sensing light barrier)
• Only one sensor for inlet and first infeed is required (rising and falling edge
evaluation). A rising edge at a sensor detects the product. The falling edge is
used for the position correction of products on the infeed belts.
Figure 1-10: Sensor position recommendation (example with 2 infeed belts)

Sensor Sensor Sensor


Inlet / Infeed 1 Infeed 2 Outlet

Inlet belt Infeed belt 1 Infeed belt 2 Outlet belt

Receiver Receiver Receiver


(optional) (optional) (optional)

1.4 Components used


This application example has been created with the following hardware and
software components:
© Siemens AG 2020 All rights reserved

Table 1-7
Component Numbe Article number Note
r
CPU 1516-3 PN/DP 1 6ES7516-3AN02-0AB0 Other S7-1500 CPU
with FW V2.8.3
STEP 7 Professional V16 2 6ES7822-1A.06-..

This application example consists of the following components:


Table 1-8
Component File name Note
LInfeed library LInfeed_V1_0_0.zip
LInfeed example LInfeed_Example_V1_0_0.zip
LInfeed manual LInfeed_SIMATIC_V1_0_en.pdf
LInfeed Questionnaire LInfeed_Questionnaire_V1_0_0.xlsx

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 13
2 Engineering

2 Engineering
2.1 Description of interface
The interfaces and the controlling of the LInfeed library are based on the PLCopen
standard with considering the behavior of execute and enable inputs.
The function blocks are implemented in Structured Control Language (SCL). They
are programmed for use in an equidistant cyclic task.

List of blocks
Table 2-1 Size of blocks
Block Symbol Size in code Size in data Size in load
work-memory work-memory memory
[Kbytes] [Kbytes] [Kbytes]
FB 31800 LInfeed_Manager 47 571
FB 31801 LInfeed_InletBelt 4 78
FB 31802 LInfeed_InfeedBelt 20 250
FB 31803 LInfeed_OutletBeltBasic 11 158
FC 31800 LInfeed_RpmToVelocity 0.1 6
FC 31801 LInfeed_VelocityToRpm 0.1 6
FC 31802 LInfeed_VelocityToDista 0.1 6
© Siemens AG 2020 All rights reserved

nce
FC 31803 LInfeed_MachineSpeed 0.1 6
ToVelocity
DB 31800 LInfeed_DataExchange 76 96

Table 2-2 Size of instances3


Symbol Size in data work- Size in load memory
memory [Kbytes] [Kbytes]

InstLInfeed_Manager 80 118
InstLInfeed_InletBelt 0.3 4
InstLInfeed_InfeedBelt 1.3 8
InstLInfeed_OutletBeltBasic 0.6 7

3Instance data blocks (prefix InstLInfeed_) are not delivered with the library. They will be
generated automatically with the call of a function block.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 14
2 Engineering

2.1.1 FB LInfeed_Manager (FB 31800)

Figure
LInfeed_Manager

Bool enable valid Bool

Bool enableBelts busy Bool

Bool reset error Bool

Bool startAutomatic warning Bool

Bool jogFwd status Word

Bool jogBwd beltsEnabled Bool

Bool stop resetting Bool

Bool fastStop automaticRunning Bool

jogging Bool

stopping Bool

fastStopActive Bool

ready Bool
© Siemens AG 2020 All rights reserved

calculationBusy Bool

actualInfeedProfile LReal

productTransferred Bool

productPositionDeviation LReal

diagnostics LInfeed_typeDiagnostics
LInfeed_typeManage configuration LInfeed_typeManagerConf
rConfiguration iguration
LInfeed_typeDataEx dataExchange LInfeed_typeDataExchang
change e

Principle of operation
This function block is organizing and operating the complete functionality of this
application. Especially functionalities which are affecting all belts are executed and
controlled by the manager FB.

Supported functionalities
• Enable / disable belts (axes)
• Reset errors and acknowledge technology alarms of the belts (axes)
• Jog forward / backward (all infeed belts)
• Automatic functionality
• Stop / fast stop

NOTE More information regarding the operation, see chapter: 2.3 Operation

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 15
2 Engineering

Input parameters
Table 2-3 LInfeed_Manager input parameters
Parameter Data type Comment
enable Bool [TRUE] Enable functionality of FB
enableBelts Bool [TRUE] Enable infeed belts (axes)
reset Bool Rising edge: Acknowledge errors of FB and alarms of
technology objects (belts)
startAutomatic Bool Rising edge: Start automatic functionality
jogFwd Bool [TRUE] Jog all infeed belts in forward direction
jogBwd Bool [TRUE] Jog all infeed belts in backward direction
stop Bool Rising edge: Stop all infeed belts (with ‘autoSync’
dynamics)
fastStop Bool [TRUE] Enable fast stop, all infeed belts will be stopped
(with ‘fastStop’ dynamics)

Output parameters
Table 2-4 LInfeed_Manager output parameters
Parameter Data type Comment
valid Bool [TRUE] Valid set of output values available at
the FB
© Siemens AG 2020 All rights reserved

busy Bool [TRUE] FB is not finished and new output


values can be expected
error Bool [TRUE] An error occurred during the
execution of the FB
warning Bool [TRUE] A warning occurred during the
execution of the FB
status Word [16#0000 – 16#70FF] Status of the FB;
[16#7100 – 16#7FFF] LInfeed_WarningIDs;
[16#8000 – 16#FFFF] LInfeed_ErrorIDs
beltsEnabled Bool [TRUE] All infeed belts (axes) are enabled
resetting Bool [TRUE] Reset of errors and technology
objects is active
automaticRunning Bool [TRUE] Automatic functionality is running
jogging Bool [TRUE] All infeed belts are jogging
stopping Bool [TRUE] All infeed belts are stopping
fastStopActive Bool [TRUE] Fast stop is enabled
ready Bool [TRUE] No command running
calculationBusy Bool [TRUE] Infeed profile calculation is active
actualInfeedProfile LReal [0.0% - 100.0%] Percent of possible infeed
profile of last detected product
productTransferred Bool Rising edge: Product placed on outlet belt
productPositionDeviation LReal Position deviation of last placed product on
outlet belt
diagnostics LInfeed_typeDiagnostics Diagnostics information of FB

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 16
2 Engineering

InOut parameters
Table 2-5 LInfeed_Manager inOut parameters
Parameter Data type Comment
configuration LInfeed_typeManagerConfiguration Configuration structure of FB
dataExchange LInfeed_typeDataExchange For internal use only. Connection
of dataExchange DB

Status displays
Table 2-6 LInfeed_Manager status displays
Status Meaning Comment
16#7000 STATUS_NO_CALL No call of FB
16#7001 STATUS_FIRST_CALL First call of FB after enabling
16#7002 STATUS_SUBSEQUENT_CALL Subsequent call of FB
© Siemens AG 2020 All rights reserved

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 17
2 Engineering

2.1.2 FB LInfeed_InletBelt (FB31801)

Figure
LInfeed_InletBelt

LReal actualVelocity valid Bool

Bool productSensor busy Bool

error Bool

warning Bool

status Word

expectedVelocity LReal

diagnostics LInfeed_typeDiagnostics
LInfeed_typeInletBeltConfigu configuration LInfeed_typeInletBeltCo
ration nfiguration
dataExchange LInfeed_typeDataExcha
LInfeed_typeDataExchange
nge

Principle of operation
This function block is representing the inlet belt.

Supported functionalities
© Siemens AG 2020 All rights reserved

• Display of expected velocity of the inlet belt. This can be used to control the
inlet belt with correct velocity.

NOTE More information regarding operation, see chapter: 2.3 Operation

Input parameters
Table 2-7 LInfeed_InletBelt input parameters
Parameter Data type Comment
actualVelocity LReal Actual velocity of inlet belt
productSensor Bool Input signal of product sensor

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 18
2 Engineering

Output parameters
Table 2-8 LInfeed_InletBelt output parameters
Parameter Data type Comment
valid Bool [TRUE] Valid set of output values available at
the FB
busy Bool [TRUE] FB is not finished and new output
values can be expected
error Bool [TRUE] An error occurred during the execution
of the FB
warning Bool [TRUE] A warning occurred during the
execution of the FB
status Word [16#0000 – 16#70FF] Status of the FB;
[16#7100 – 16#7FFF] LInfeed_WarningIDs;
[16#8000 – 16#FFFF] LInfeed_ErrorIDs
expectedVelocity LReal Expected velocity of inlet belt in [mm/s], can
be used during commissioning (compare with
actualVelocity) or as setpoint value for axis
control
diagnostics LInfeed_typeDiagnostics Diagnostics information of FB

InOut parameters
Table 2-9 LInfeed_InletBelt inOut parameters
© Siemens AG 2020 All rights reserved

Parameter Data type Comment


configuration LInfeed_typeInletBeltConfiguration Configuration structure of FB
dataExchange LInfeed_typeDataExchange For internal use only. Connection of
dataExchange DB

Status displays
Table 2-10 LInfeed_InletBelt status displays
Status Meaning Comment
16#7000 STATUS_NO_CALL No call of FB
16#7001 STATUS_FIRST_CALL First call of FB after enabling
16#7002 STATUS_SUBSEQUENT_CALL Subsequent call of FB

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 19
2 Engineering

2.1.3 FB LInfeed_InfeedBelt (FB31802)

Figure
LInfeed_InfeedBelt

DB_ANY axis valid Bool

Bool jogFwd busy Bool

Bool jogBwd error Bool

Bool productSensor warning Bool

status Word

beltEnabled Bool

fastStopActive Bool

diagnostics LInfeed_typeDiagnostics
LInfeed_typeInfeedBeltConfi configuration LInfeed_typeInfeedBeltConfi
guration guration
dataExchange
LInfeed_typeDataExchange LInfeed_typeDataExchange

Principle of operation
This function block is representing and controlling an infeed belt.
© Siemens AG 2020 All rights reserved

Supported functionalities
• Jog forward / backward

NOTE More information regarding operation, see chapter: 2.3 Operation

Input parameters
Table 2-11 LInfeed_InfeedBelt input parameters
Parameter Data type Comment
axis DB_ANY Axis specification (TO_SynchronousAxis)
jogFwd Bool [TRUE] Jog infeed belt in forward direction
jogBwd Bool [TRUE] Jog infeed belt in backward direction
productSensor Bool Input signal of product sensor

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 20
2 Engineering

Output parameters
Table 2-12 LInfeed_InfeedBelt output parameters
Parameter Data type Comment
valid Bool [TRUE] Valid set of output values available at
the FB
busy Bool [TRUE] FB is not finished and new output
values can be expected
error Bool [TRUE] An error occurred during the execution
of the FB
warning Bool [TRUE] A warning occurred during the
execution of the FB
status Word [16#0000 – 16#70FF] Status of the FB;
[16#7100 – 16#7FFF] LInfeed_WarningIDs;
[16#8000 – 16#FFFF] LInfeed_ErrorIDs
beltEnabled Bool [TRUE] Infeed belt (axis) is enabled
jogging Bool [TRUE] Infeed belt is jogging
diagnostics LInfeed_typeDiagnostics Diagnostics information of FB

InOut parameters
Table 2-13 LInfeed_InfeedBelt inOut parameters
Parameter Data type Comment
© Siemens AG 2020 All rights reserved

configuration LInfeed_typeInfeedBeltConfiguration Configuration structure of FB


dataExchange LInfeed_typeDataExchange For internal use only. Connection of
dataExchange DB

Status displays
Table 2-14 LInfeed_InfeedBelt status displays
Status Meaning Comment
16#7000 STATUS_NO_CALL No call of FB
16#7001 STATUS_FIRST_CALL First call of FB after enabling
16#7002 STATUS_SUBSEQUENT_CALL Subsequent call of FB

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 21
2 Engineering

2.1.4 FB LInfeed_OutletBeltBasic (FB31803)

Figure
LInfeed_OutletBeltBasic

DB_ANY axis valid Bool

Bool productSensor busy Bool

Bool homing error Bool

Bool continuousHoming warning Bool

status Word

actualMachineSpeedPercent LReal

homingBusy Bool

homingDone Bool

diagnostics LInfeed_typeDiagnostics
LInfeed_typeOutletBelt configuration LInfeed_typeOutletBeltB
BasicConfiguration asicConfiguration
LInfeed_typeDataExch dataExchange LInfeed_typeDataExcha
ange nge

Principle of operation
© Siemens AG 2020 All rights reserved

This function block is representing the outlet belt.

Supported functionalities
• Manual homing
• Continuous homing (when automatic functionality is running)

NOTE More information regarding operation, see chapter: 2.3 Operation

Input parameters
Table 2-15 LInfeed_OutletBeltBasic input parameters
Parameter Data type Comment
axis DB_ANY Axis specification (ExternalEncoder, PositioningAxis,
SynchronousAxis)
productSensor Bool Input signal of product sensor
homing Bool Rising edge: Start homing of outlet belt (according configured
homing mode)
continuousHoming Bool Enable continuous homing of outlet belt (incremental
encoder required)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 22
2 Engineering

Output parameters
Table 2-16 LInfeed_OutletBeltBasic output parameters
Parameter Data type Comment
valid Bool [TRUE] Valid set of output values available at
the FB
busy Bool [TRUE] FB is not finished and new output
values can be expected
error Bool [TRUE] An error occurred during the execution
of the FB
warning Bool [TRUE] A warning occurred during the
execution of the FB
status Word [16#0000 – 16#70FF] Status of the FB,
[16#7100 – 16#7FFF] LInfeed_WarningIDs;
[16#8000 – 16#FFFF] LInfeed_ErrorIDs
actualMachineSpeed LReal Value of actual machine speed in [%] relative
Percent to parameter ‘designMachineSpeed’
homingBusy Bool [TRUE] Homing command at outlet belt is busy
homingDone Bool [TRUE] Homing command at outlet belt is
done
diagnostics LInfeed_typeDiagnostics Diagnostics information of FB

InOut parameters
© Siemens AG 2020 All rights reserved

Table 2-17 LInfeed_OutletBeltBasic inOut parameters


Parameter Data type Comment
configuration LInfeed_typeOutletBeltBasicConfiguration Configuration structure of FB
dataExchange LInfeed_typeDataExchange For internal use only. Connection of
dataExchange DB

Status displays
Table 2-18 LInfeed_OutletBeltBasic status displays
Status Meaning Comment
16#7000 STATUS_NO_CALL No call of FB
16#7001 STATUS_FIRST_CALL First call of FB after enabling
16#7002 STATUS_SUBSEQUENT_CALL Subsequent call of FB

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 23
2 Engineering

2.1.5 FC LInfeed_RpmToVelocity (FC 31800)

Figure
LInfeed_RpmToVelocity

LReal rpm Ret_Val LReal

LReal effectiveRollDiameter

UDInt motorRevolutions

UDInt loadRevolutions

Principle of operation
This function converts speed [rpm] to velocity [mm/s].
𝜋 𝑚𝑜𝑡𝑜𝑟𝑅𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠
𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 = 𝑟𝑝𝑚 ∗ ∗ 𝑒𝑓𝑓𝑒𝑐𝑡𝑖𝑣𝑒𝑅𝑜𝑙𝑙𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 ∗
60 𝑙𝑜𝑎𝑑𝑅𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠
Table 2-19 LInfeed_RpmToVelocity input parameters
Parameter Data type Comment
rpm LReal Motor speed in [rpm]
effectiveRollDiameter LReal [> 0.0] Effective roll diameter (including belt) in [mm]
motorRevolutions UDInt [> 0] Number of motor revolutions
© Siemens AG 2020 All rights reserved

loadRevolutions UDInt [> 0] Number of load revolutions

Table 2-20 LInfeed_RpmToVelocity return value


Parameter Data type Comment
Ret_Val LReal Velocity in [mm/s]

NOTE Evaluate the ENO output of the function for error identification.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 24
2 Engineering

2.1.6 FC LInfeed_VelocityToRpm (FC 31801)

Figure
LInfeed_VelocityToRpm

LReal velocity Ret_Val LReal

LReal effectiveRollDiameter

UDInt motorRevolutions

UDInt loadRevolutions

Principle of operation
This function converts velocity [mm/s] to speed [rpm].
1
𝑟𝑝𝑚 = 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 ∗
𝜋 𝑚𝑜𝑡𝑜𝑟𝑅𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠
∗ 𝑒𝑓𝑓𝑒𝑐𝑡𝑖𝑣𝑒𝑅𝑜𝑙𝑙𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 ∗
60 𝑙𝑜𝑎𝑑𝑅𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠

Input parameters
Table 2-21 LInfeed_VelocityToRpm input parameters
Parameter Data type Comment
velocity LReal Velocity in [mm/s]
© Siemens AG 2020 All rights reserved

effectiveRollDiameter LReal [> 0.0] Effective roll diameter (including belt) in [mm]
motorRevolutions UDInt [> 0] Number of motor revolutions
loadRevolutions UDInt [> 0] Number of load revolutions

Table 2-22 LInfeed_VelocityToRpm return value


Parameter Data type Comment
Ret_Val LReal Motor speed in [rpm]

NOTE Evaluate the ENO output of the function for error identification.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 25
2 Engineering

2.1.7 FC LInfeed_MachineSpeedToVelocity (FC 31802)

Figure
LInfeed_MachineSpeedToVelocity

LReal machineSpeed Ret_Val LReal

LReal distance

Principle of operation
This function converts machine speed [ppm ] to velocity [mm/s].
𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑆𝑝𝑒𝑒𝑑
𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 = ∗ 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
60
Table 2-23 LInfeed_MachineSpeedToVelocity input parameters
Parameter Data type Comment
machineSpeed LReal Machine speed in parts per minute [ppm]
distance LReal [> 0.0] Pocket length or inlet center distance in [mm]

Table 2-24 LInfeed_MachineSpeedToVelocity return value


Parameter Data type Comment
Ret_Val LReal Velocity in [mm/s]
© Siemens AG 2020 All rights reserved

NOTE Evaluate the ENO output of the function for error identification.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 26
2 Engineering

2.1.8 FC LInfeed_VelocityToDistance (FC 31803)

Figure
LInfeed_VelocityToDistance

LReal velocity Ret_Val LReal

LReal machineSpeed

Principle of operation
This function converts velocity [mm/s] to distance [mm].
𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 = 60 ∗
𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑆𝑝𝑒𝑒𝑑
Table 2-25 LInfeed_VelocityToDistance input parameters
Parameter Data type Comment
velocity LReal Velocity (e.g. inlet belt velocity) in [mm/s]
machineSpeed LReal [> 0.0] Machine speed in parts per minute [ppm]

Table 2-26 LInfeed_VelocityToDistance return value


Parameter Data type Comment
© Siemens AG 2020 All rights reserved

Ret_Val LReal Distance (e.g. inlet center distance) in [mm]

NOTE Evaluate the ENO output of the function for error identification.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 27
2 Engineering

2.1.9 PLC data types

2.1.9.1 LInfeed_typeDataExchange

This data type is for the application internal data exchange and the structure is not
relevant for the user.

2.1.9.2 LInfeed_typeManagerConfiguration

Table 2-27 LInfeed_typeManagerConfiguration


Name Type Comment
controlMode Int [1] ‘autoSync’;
[2] ‘autoSync and positionCorrection’;
[3] No active product control (commissioning and test),
infeed belts are moving fixed with 'defaultInfeedProfile'
(default: 2)
defaultInfeedProfile Int [0..100%] Default value of infeed profile;
[0%] Minimum profile;
[100%] Maximum profile;
Profile = Velocity curve along the infeed system
(default: 50)
productParameters LInfeed_typePro Product related settings
ductParameters
productControl Struct Product control settings
© Siemens AG 2020 All rights reserved

autoSyncDynamics Struct Dynamics for ‘autoSync’ functionality


(if 'manager.controlMode' = 1 or 2)
acceleration LReal [-1.0] Default acceleration of axis;
[> 0.0mm/s²] Value is used
(default: 4000.0)
deceleration LReal [-1.0] Default deceleration of axis;
[> 0.0mm/s²] Value is used
(default: 4000.0)
jerk LReal [-1.0] Default jerk of axis;
[0.0] Trapezoidal velocity profile;
[> 0.0mm/s³] Value is used
(default: 400000.0)
positionCorrection Struct Parameters for ‘positionCorrection’ functionality
(if 'manager.controlMode' = 2)
distanceLimit LReal [> 0.0mm] Value is used;
Distance limitation of correction movement
(default: 20.0)
velocityDifference LReal [> 0.0mm/s] Value is used;
Velocity difference of correction movement
(default: 50.0)
acceleration LReal [-3.0] According to
'manager.productParameter.staticFriction';
[-1.0] Default acceleration of axis;
[> 0.0mm/s²] Value is used
(default: -3.0)
deceleration LReal [-3.0] According to
'manager.productParameter.staticFriction';
[-1.0] Default deceleration of axis;
[> 0.0mm/s²] Value is used
(default: -3.0)
jerk LReal [-1.0] Default jerk of axis;
[0.0] Trapezoidal velocity profile;

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 28
2 Engineering

Name Type Comment


[> 0.0mm/s³] Value is used
(default: 400000.0)
manDynamics Struct Dynamics for manual control of infeed belts
jogVelocity LReal [> 0.0mm/s] Value is used
(default: 50.0)
acceleration LReal [-1.0] Default acceleration of axis;
[> 0.0mm/s²] Value is used
(default: -1.0)
deceleration LReal [-1.0] Default deceleration of axis;
[> 0.0mm/s²] Value is used
(default: -1.0)
jerk LReal [-1.0] Default jerk of axis;
[0.0] Trapezoidal velocity profile;
[> 0.0mm/s³] Value is used
(default: -1.0)
fastStopDynamics Struct Dynamics for fast stop of infeed belts
deceleration LReal [-1.0] Max deceleration of axis;
[0.0] Emergency deceleration of axis;
[> 0.0mm/s²] Value is used
(default: -1.0)
jerk LReal [-1.0] Default jerk of axis;
[0.0] Trapezoidal velocity profile;
[> 0.0mm/s³] Value is used
© Siemens AG 2020 All rights reserved

(default: -1.0)
cycleTime LReal [-1.0] Automatic detection;
[> 0.0s] Value is used;
Cycle time of application in seconds
(default: -1.0)
calculationPerformance Int [-1] Automatic detection;
[0] Minimum;
[> 0] Value is used; Adjustment factor of calculation
performance of infeed profile table; Increase for faster
calculation
(default: -1)
changeParametersOnT Bool [FALSE] Parameters are only taken over when
heFly manager output ‘ready’ is set;
[TRUE] Parameters can be changed during automatic
functionality is running (for commissioning)
(default: FALSE)

2.1.9.3 LInfeed_typeDiagnostics

Table 2-28 LInfeed_typeDiagnostics


Name Type Comment
status Word Status of FB when error occurred
(default: 16#0000)
subfunctionStatus Word Status of called subfunction
(default: 16#0000)
errorDetail UDInt ErrorDetail.Number of the axis in case of pending TO
alarm
(default: 0)
errorLocation Int [-1] Manager;
[>= 0] Index of belt;
Source of error
(default: -1)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 29
2 Engineering

Name Type Comment


beltInstanceName WString[24] Name of belt instance

2.1.9.4 LInfeed_typeProductParameters

Table 2-29 LInfeed_typeProductParameters


Name Type Comment
designMachineSpee LReal [> 0.0ppm] Design machine speed in the installed
d environment in parts per minute
(default: 60.0)
length LReal [<= 'inletBeltCenterDistance'] and [<= pocket length];
Length of products in [mm]
(default: 100.0)
staticFriction LReal [> 0.0] Static friction coefficient of products on belt surface
(default: 0.5)
inletBeltCenterDista LReal [-1.0] Equal to pocket length on outlet belt;
nce [> 0.0mm] Value is used;
Mean distance between product centers in case of regular
arriving products on inlet belt
(default: -1.0)
inletBeltMaxDeviatio LReal [-1.0] Internally calculated;
n [>= 0.0mm] Value is used;
Maximum deviation of products on inlet belt from their regular
© Siemens AG 2020 All rights reserved

positions
(default: -1.0)
handoverProfile Int [1] Constant acceleration;
[2] Continuous acceleration;
Handover profile of products at the transition between 2 belts
(default: 2)

2.1.9.5 LInfeed_typeInletBeltConfiguration

Table 2-30 LInfeed_typeInletBeltConfiguration


Name Type Comment
productSensor Struct Product sensor parameters
position LReal [<= 0.0mm] Value is used;
Position of product sensor at inlet belt; Reference position =
Transition between inlet and first infeed belt
(default: 0.0)
signalEvaluation Int [0] Only rising edge;
[1] Only falling edge (position of sensor has to be <= -1*product length
or first infeed belt is set to 'infeedBelt.beltOperation.mode' = 1)
(default: 0)
errorReaction Int [0] None;
[1] Warning;
[2] Error with ‘fastStop’ reaction;
Reaction if deviation of products on inlet belt exceeds parameter
'manager.productParameter.InletBeltMaxDeviation'
(default: 2)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 30
2 Engineering

2.1.9.6 LInfeed_typeInfeedBeltConfiguration

Table 2-31 LInfeed_typeInfeedBeltConfiguration


Name Type Comment
handoverPosition LReal [> 0.0mm] Value is used; Handover position to next belt;
Ascending order: Value > ('handoverPosition[previous belt]' +
product length); Reference position = Transition between inlet
and first infeed belt
(default: 0.0)
productSensor LInfeed_type Product sensor parameters
Sensor
beltOperation Struct Operation mode of infeed belt
mode Int [0] ‘controlled by autoSync’;
[1] ‘synchronized to outlet belt’, see also parameter:
'percentOfOutlet'
(default: 0)
percentOfOutlet LReal [> 0.0%] Value is used;
Effective for 'mode' = 1; Belt is moving with the percentage
velocity value of outlet belt
(default: 100.0)
positionCorrection Struct Parameters for ‘positionCorrection’ functionality
mode Int [-2] Value of 'manager.controlMode';
[0] Position correction deactivated at this belt;
Activation of ‘positionCorrection’ functionality at infeed belt
© Siemens AG 2020 All rights reserved

(default: -2)
distanceLimit LReal [-2.0] Value of 'manager.positionCorrection.distanceLimit';
[> 0.0mm] Value is used;
Distance limitation of correction movement
(default: -2.0)
velocityDifferenc LReal [-2.0] Value of 'manager.positionCorrection.velocityDifference';
e [> 0.0mm/s] Value is used;
Velocity difference of correction movement
(default: -2.0)
acceleration LReal [-2.0] Value of 'manager.positionCorrection.acceleration’;
[-1.0] Default acceleration of axis;
[> 0.0mm/s²] Value is used
(default: -2.0)
deceleration LReal [-2.0] Value of 'manager.positionCorrection.deceleration’;
[-1.0] Default deceleration of axis;
[> 0.0mm/s²] Value is used
(default: -2.0)
jerk LReal [-2.0] Value of 'manager.positionCorrection.jerk’;
[-1.0] Default jerk of axis;
[0.0] Trapezoidal velocity profile;
[> 0.0mm/s³] Value is used
(default: -2.0)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 31
2 Engineering

2.1.9.7 LInfeed_typeOutletBeltBasicConfiguration

Table 2-32 LInfeed_typeOutletBeltBasicConfiguration


Name Type Comment
productPhaseOffset LReal [-1.0..1.0]*pocket length;
Relative shift of product phase at outlet belt in [mm]
(pocket length = modulo length of outlet belt axis)
(default: 0.0)
productSensor LInfeed_typeSensor Product sensor parameters
homing Struct Parameters for homing functionality
position LReal Home position of belt; Value is depending on the
mechanical position of the homing sensor; Required
result after homing: Outlet belt position 0.0 = Tappet in
horizontal position at the transition from the last infeed
belt to the outlet belt
(default: 0.0)
See chapter: 2.2.7 Machine parameters
mode Int [0] Set actual position (absolute);
[2] Passive homing (without reset of homed state)
[7] Absolute encoder adjustment (absolute)
[8] Passive homing (with reset of homed state)
(default: 2)

2.1.9.8 LInfeed_typeSensor
© Siemens AG 2020 All rights reserved

Table 2-33 LInfeed_typeSensor


Name Type Comment
enable Bool [TRUE] Sensor activated;
[FALSE] Sensor deactivated
(default: FALSE)
position LReal [-1.0] Handover position of previous belt is used automatically;
[< 'infeedBelt.handoverPosition'] Value is used;
Position of product sensor in [mm]; Reference position = Transition
between inlet and first infeed belt
(default: -1.0)
signalEvaluation Int [0] Only rising edge;
[1] Only falling edge;
Signal evaluation of product sensor
(default: 1)
errorReaction Int [0] None;
[1] Warning;
[2] Error and ‘fastStop’ reaction;
Reaction if product was not detected within parameter
'positionWindow'
(default: 1)
positionWindow LReal [>= 0.0mm] Value is used;
Position window for product detection
(default: 50.0)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 32
2 Engineering

2.1.10 PLC tags

2.1.10.1 LInfeed_Tags

Table 2-34 Common constants


Name Data Value Comment
type
LINFEED_PRODUCTS_UPP Int 19 Upper limit of internal product array; 0-based,
ER_LIM maximum number of products = constant value +
1
LINFEED_BELTS_UPPER_L Int 9 Upper limit of internal belt array; 0-based,
IM maximum number of belts = constant value + 1
LINFEED_PROFILE_TABLE Int 100 Upper limit of entries in infeed profile table;
_UPPER_LIM 0-based, maximum number of profiles = constant
value + 1
LINFEED_DISTANCE_PER_ LReal 10.0 Maximum distance travelled by the products per
CYCLE_WARNING_VALUE application cycle in [mm];
Example: 0.004s * 2500mm/s = 10mm

2.1.10.2 LInfeed_WarningIDs

Table 2-35 Warning constants


Name Value Comment
© Siemens AG 2020 All rights reserved

(Word)
LINFEED_WARN_NON_CO 16#7100 Warning: Gap between the products on inlet belt is too
NTROLLED_PRODUCT small or product rate at inlet belt is too high; See
parameters 'manager.inletBeltCenterDistance' and
'manager.inletBeltMaxDeviation'
LINFEED_WARN_DISTANC 16#7101 Warning: Distance travelled by the products per
E_PER_CYCLE application cycle exceeds PLC tag
'LINFEED_DISTANCE_PER_CYCLE_WARNING_VALU
E'; Recommendation: Reduce application cycle time
LINFEED_WARN_PRODUC 16#7102 Warning: Product not detected within configured position
T_SENSOR window. See parameters
'infeedBelt.productSensor.positionWindow' or
‘outletBelt.productSensor.positionWindow'

2.1.10.3 LInfeed_ErrorIDs

Table 2-36 Error constants for wrong operation


Name Value Comment
(Word)
LINFEED_ERR_CTRL_MULTIP 16#8001 Error control: Invalid / ambiguous command (more
LE_COMMAND than 1 rising edge at the command inputs per cycle)
LINFEED_ERR_CTRL_ACTIVE 16#8002 Error control: Active homing of the outlet belt is not
_HOMING_NOT_ALLOWED supported

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 33
2 Engineering

Table 2-37 Error constants for faulty application configuration


Name Value Comment
(Word)
LINFEED_ERR_APPCFG_CON 16#8200 Error application config: Invalid value; See parameter
TROL_MODE 'manager.controlMode'
LINFEED_ERR_APPCFG_DEF 16#8201 Error application config: Invalid value; See parameter
AULT_INFEED_PROFILE 'manager.defaultInfeedProfile'
LINFEED_ERR_APPCFG_PRO 16#8202 Error application config: Invalid value; See parameter
DUCT_PARAM_HANDOVER_P 'manager.productParameters.handoverProfile'
ROFILE
LINFEED_ERR_APPCFG_PRO 16#8203 Error application config: Invalid value; See parameter
DUCT_PARAM_LENGTH 'manager.productParameters.length'
LINFEED_ERR_APPCFG_PRO 16#8204 Error application config: Invalid value; See parameter
DUCT_PARAM_STATIC_FRICT 'manager.productParameters.staticFriction'
ION
LINFEED_ERR_APPCFG_PRO 16#8205 Error application config: Invalid value; See parameter
DUCT_PARAM_INLET_MAX_D 'manager.productParameters.inletBeltMaxDeviation'
EVIATION
LINFEED_ERR_APPCFG_PRO 16#8206 Error application config: Invalid value; See parameter
DUCT_PARAM_INLET_CENTE 'manager.productParameters.inletBeltCenterDistance'
R_DISTANCE
LINFEED_ERR_APPCFG_PRO 16#8207 Error application config: Invalid value; See parameter
DUCT_PARAM_MAX_MACHIN 'manager.productParameters.designMachineSpeed'
ESPEED_LOW_LIMIT
© Siemens AG 2020 All rights reserved

LINFEED_ERR_APPCFG_PRO 16#8208 Error application config: Insufficient limit velocity of


DUCT_PARAM_MAX_MACHIN infeed axes; See 'TO.DynamicLimits.MaxVelocity'
ESPEED_HIGH_LIMIT
LINFEED_ERR_APPCFG_PRO 16#8209 Error application config: Invalid value; See parameter
DUCT_CTRL_DISTANCE_LIMIT 'manager.productControl.positionCorrection.distanceL
imit'
LINFEED_ERR_APPCFG_PRO 16#820A Error application config: Invalid value; See parameter
DUCT_CTRL_VELOCITY_DIFF 'manager.productControl.positionCorrection.velocityDi
ERENCE fference'
LINFEED_ERR_APPCFG_SEN 16#820B Error application config: Invalid value; See parameter
SOR_POSITION 'inletBelt.productSensor.position' or
'infeedBelt.productSensor.position'
LINFEED_ERR_APPCFG_SEN 16#820C Error application config: Invalid value; See parameter
SOR_SIGNAL_EVALUATION 'inletBelt.productSensor.signalEvaluation' or
'infeedBelt.productSensor.signalEvaluation'
LINFEED_ERR_APPCFG_SEN 16#820D Error application config: Invalid value; See parameter
SOR_ERROR_REACTION 'inletBelt.productSensor.errorReaction' or
'infeedBelt.productSensor.errorReaction'
LINFEED_ERR_APPCFG_SEN 16#820E Error application config: Invalid value; See parameter
SOR_POSITION_WINDOW 'inletBelt.productSensor.positionWindow' or
'infeedBelt.productSensor.positionWindow'
LINFEED_ERR_APPCFG_HAN 16#820F Error application config: Invalid value; See parameter
DOVER_POSITION_VALUE 'inletBelt.handoverPosition' or
'infeedBelt.handoverPosition'
LINFEED_ERR_APPCFG_HAN 16#8210 Error application config: Invalid order; See parameter
DOVER_POSITION_ORDER 'inletBelt.handoverPosition' or
‘infeedBelt.handoverPosition'
LINFEED_ERR_APPCFG_INFE 16#8211 Error application config: Invalid value; See parameter
ED_OPERATION_MODE 'infeedBelt.beltOperation.mode'
LINFEED_ERR_APPCFG_PER 16#8212 Error application config: Invalid value; See parameter
CENT_OF_OUTLET_VALUE 'infeedBelt.beltOperation.percentOfOutlet'

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 34
2 Engineering

Name Value Comment


(Word)
LINFEED_ERR_APPCFG_PER 16#8213 Error application config: Value of parameter
CENT_OF_OUTLET_LOW_LIMI 'infeedBelt.beltOperation.percentOfOutlet' exceeds
T lower limit; Value not possible because reduction of
product distance inhibited
LINFEED_ERR_APPCFG_INFE 16#8214 Error application config: Infeed belt with parameter
ED_CONFIGURATION_ORDER 'infeedBelt.beltOperation.mode' = ‘synchronized to
outlet belt’ is only allowed behind the inlet belt or in
front of the outlet belt
LINFEED_ERR_APPCFG_NO_ 16#8215 Error application config: No infeed belt configured with
CONTROLLED_INFEED_BELT 'infeedBelt.beltOperation.mode' = ‘controlled by
autoSync’
LINFEED_ERR_APPCFG_INSU 16#8216 Error application config: Insufficient number of infeed
FFICIENT_NUMBER_OF_INFE belts configured with 'infeedBelt.beltOperation.mode'
ED_BELTS = ‘controlled by autoSync’
LINFEED_ERR_APPCFG_PRO 16#8217 Error application config: Invalid value; See parameter
DUCT_PHASE_OFFSET 'outletBelt.productPhaseOffset'
LINFEED_ERR_APPCFG_POSI 16#8218 Error application config: Invalid value; See parameter
TION_CORRECTION_MODE 'infeedBelt.positionCorrection.mode'
LINFEED_ERR_APPCFG_INSU 16#8219 Error application config: Insufficient size of application
FFICENT_PRODUCT_REGISTE internal product register; Increase value of PLC tag
R_SIZE 'LINFEED_PRODUCTS_UPPER_LIM'
© Siemens AG 2020 All rights reserved

Table 2-38 Error constants for invalid TO configuration


Name Value Comment
(Word)
LINFEED_ERR_TOCFG_OUTL 16#8300 Error TO config: Axis type for outlet belt invalid;
ET_AXIS Required: TO_SynchronousAxis, TO_PositioningAxis
or TO_ExternalEncoder
LINFEED_ERR_TOCFG_INFEE 16#8301 Error TO config: Axis type for infeed belt invalid;
D_AXIS Required: TO_SynchronousAxis
LINFEED_ERR_TOCFG_UNIT_ 16#8302 Error TO config: Invalid length or velocity unit;
CONFIGURATION Required: [mm and mm/s]
LINFEED_ERR_TOCFG_VELO 16#8303 Error TO config: Velocity unit is different at another
CITY_UNIT axis
LINFEED_ERR_TOCFG_DYNA 16#8304 Error TO config: Dynamic defaults are different at
MIC_DEFAULTS another axis
LINFEED_ERR_TOCFG_DYNA 16#8305 Error TO config: Dynamic limits are different at
MIC_LIMITS another axis
LINFEED_ERR_TOCFG_LENG 16#8306 Error TO config: Length unit is different at another
TH_UNIT axis
LINFEED_ERR_TOCFG_EMER 16#8307 Error TO config: Emergency deceleration value is
GENCY_DECELERATION different at another axis
LINFEED_ERR_TOCFG_MODU 16#8308 Error TO config: Modulo function is not enabled
LO_DISABLED
LINFEED_ERR_TOCFG_MODU 16#8309 Error TO config: Modulo start value is not equal to 0.0
LO_STARTVALUE
LINFEED_ERR_TOCFG_MOTI 16#830A Error TO config: Motion type linear required
ON_TYPE

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 35
2 Engineering

Table 2-39 Error constants for application call


Name Value Comment
(Word)
LINFEED_ERR_CALL_INLET_I 16#8320 Error application call: No inlet belt instance connected
NSTANCE_NOT_FOUND to dataExchange DB
LINFEED_ERR_CALL_TOO_M 16#8321 Error application call: More than 1 inlet belt instance
ANY_INLET_INSTANCES_FOU connected to dataExchange DB
ND
LINFEED_ERR_CALL_OUTLET 16#8322 Error application call: No outlet belt instance
_INSTANCE_NOT_FOUND connected to dataExchange DB
LINFEED_ERR_CALL_TOO_M 16#8323 Error application call: More than 1 outlet belt instance
ANY_OUTLET_INSTANCES_F connected to dataExchange DB
OUND
LINFEED_ERR_CALL_INFEED 16#8324 Error application call: No infeed belt instance
_INSTANCE_NOT_FOUND connected to dataExchange DB
LINFEED_ERR_CALL_BELTS_ 16#8325 Error application call: More instances (inlet, infeed
ARRAY_EXCEEDS_UPPER_LI and outlet belts) are connected to dataExchange DB
MIT than available with configured array limit; Increase
value of PLC tag 'LINFEED_BELTS_UPPER_LIM'
LINFEED_ERR_CALL_INSTAN 16#8326 Error application call: Illegal call sequence of
CES_CALL_SEQUENCE instances. Required sequence: 1. Manager; 2. Inlet
belt; 3. Infeed belts; 4 Outlet belt
© Siemens AG 2020 All rights reserved

Table 2-40 Error constants for external faults


Name Value Comment
(Word)
LINFEED_ERR_EXT_INFEED_ 16#8400 Error external: Not all infeed belts (axes) are enabled;
BELTS_NOT_ENABLED See manager output ‘beltsEnabled’
LINFEED_ERR_EXT_OUTLET_ 16#8401 Error external: The outlet belt (axis) is not homed
NOT_HOMED
LINFEED_ERR_EXT_INLET_SE 16#8402 Error external: Inlet belt product sensor may not be
NSOR_DEFLECTED deflected at start of automatic; Remove product and
set start command again
LINFEED_ERR_EXT_INLET_P 16#8403 Error external: Gap between the products on inlet belt
RODUCT_DISTANCE is too small or product rate at inlet belt is too high;
See parameters 'manager.inletBeltCenterDistance'
and 'manager.inletBeltMaxDeviation'
LINFEED_ERR_EXT_PRODUC 16#8404 Error external: Product is not detected within
T_SENSOR configured position window; See parameters
'infeedBelt.productSensor.positionWindow' or
'outletBelt.productSensor.positionWindow'

Table 2-41 Error constants for internal faults


Name Value Comment
(Word)
LINFEED_ERR_INT_MC_POW 16#8600 Error internal: MC_POWER;
ER See output ‘diagnostics’
LINFEED_ERR_INT_MC_RESE 16#8601 Error internal: MC_RESET;
T See output ‘diagnostics’
LINFEED_ERR_INT_MC_HOM 16#8602 Error internal: MC_HOME;
E See output ‘diagnostics’
LINFEED_ERR_INT_MC_HALT 16#8603 Error internal: MC_HALT;
See output ‘diagnostics’

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 36
2 Engineering

Name Value Comment


(Word)
LINFEED_ERR_INT_MC_MOVE 16#8604 Error internal: MC_MOVEJOG;
JOG See output ‘diagnostics’
LINFEED_ERR_INT_MC_MOVE 16#8605 Error internal: MC_MOVEVELOCITY;
VELOCITY See output ‘diagnostics’
LINFEED_ERR_INT_MC_MOVE 16#8606 Error internal: MC_MOVESUPERIMPOSED;
SUPERIMPOSED See output ‘diagnostics’
LINFEED_ERR_INT_MC_GEAR 16#8607 Error internal: MC_GEARIN;
IN See output diagnostics; (check leading value
interconnection in TO configuration)
LINFEED_ERR_INT_CYCLE_TI 16#8608 Error internal: Automatic detection of application cycle
ME_DETECTION time failed; Set cycle time manually; See parameter
'manager.cycleTime'
LINFEED_ERR_INT_PROFILE_ 16#8609 Error internal: Infeed profile calculation
CALCULATION
LINFEED_ERR_INT_TIME_CAL 16#860A Error internal: Profile time calculation
CULATION
LINFEED_ERR_INT_UNDEFIN 16#860B Error internal: Undefined FB state
ED_STATE
LINFEED_ERR_INT_UNDEFIN 16#860C Error internal: Undefined FB mode
ED_MODE
LINFEED_ERR_INT_UNDEFIN 16#860D Error internal: Undefined autosync belt state
© Siemens AG 2020 All rights reserved

ED_AUTOSYNC_BELT_STATE
LINFEED_ERR_INT_UNDEFIN 16#860E Error internal: Undefined autosync product state
ED_AUTOSYNC_PRODUCT_S
TATE
LINFEED_ERR_INT_UNDEFIN 16#860F Error internal: Undefined velocity profile calculation
ED_CALCULATION_STATE state

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 37
2 Engineering

2.2 Project integration


2.2.1 Integrating the library blocks into STEP 7
© Siemens AG 2020 All rights reserved

NOTE Please follow the sequence of inserting the folders.

Table 2-42: Integrating the library blocks into STEP 7


No. Action
1. Copy the folder LAnyAxis_Blocks with Drag & Drop into the “Program blocks” in the PLC.
Be careful to use the correct LAnyAxis_Blocks depending on the CPU type (T or non-T).
2. Copy the folder LInfeed_Tags with Drag & Drop into the “PLC tags” in the PLC.
3. Copy the folder LInfeed_Types with Drag & Drop into the “PLC data types” in the PLC.
4. Copy the folder LInfeed_Blocks with Drag & Drop into the “Program blocks” in the PLC.
5. Copy the folder LInfeed_Traces with Drag & Drop into the “Traces” folder in the PLC.
6. Now the blocks can be configured and called in the user program.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 38
2 Engineering

2.2.2 CPU selection and settings

2.2.2.1 Standard or Technology CPU?

Please note that if the outlet belt is represented by an external encoder, the use of
a S7-1500T CPU is required.
See also chapter 1.2.4 Technological concept

2.2.2.2 CPU-Type

The optimal CPU type (performance) is depending on the number of infeed belts
and application cycle time.

Number of infeed belts?


Using more infeed belts requires more CPU performance. The number of required
infeed belts is depending on:
• Product parameters (length, static friction, machine speed, pocket length, …)
• Belt length

NOTE The number of required infeed belts has to be defined in advance and is not part
of this documentation.
© Siemens AG 2020 All rights reserved

Cycle time of application?


The optimal cycle time is depending on the required positioning accuracy of
products on outlet belt.

NOTE accuracyMax ≈ velocityoutlet * cycle time

Table 2-43 Example of accuracy calculation using velocityoutlet = 500mm/s


Cycle time AccuracyMax
1ms 0,5mm
2ms 1,00mm
3ms 1,50mm
4ms 2,00mm
6ms 3,00mm
8ms 4,00mm

2.2.3 Technology object configuration

Every technology object needs a (proper) configuration and commissioning.


Specific settings for Intelligent Infeed application are listed in this chapter.
All mechanical parameters (like leadscrew pitch) have to be exact, otherwise
NOTE
losses of position accuracy will occur.
The real belt velocity (by measuring device) should be compared with setpoint
velocity (e.g. tested with axis control panel).

2.2.3.1 Infeed belt axes

It is necessary to insert a TO_SynchronousAxis in the project for each


representation of an infeed belt.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 39
2 Engineering

(e.g. number of infeed belts = 3 → 3 TO_SynchronousAxis required)

Basic parameters
In the TO configuration the following parameter has to be set:
Axis type: linear

Leading value interconnection


Leading value interconnection: Outlet belt (setpoint value coupling)

Extended parameters
• Mechanical parameters: load gear, leadscrew pitch (exact values required)
• Limits (dynamic limits) have to be set (every infeed requires same values)
• Control loop (optimization)

NOTE The configured limit velocity of axis is relevant for automatic functionality.

2.2.3.2 Outlet belt axis

It is required to insert one axis to the project for representation of the outlet belt.
Possible technology objects:
• TO_PositioningAxis
© Siemens AG 2020 All rights reserved

• TO_SynchronousAxis
• TO_ExternalEncoder (S7-1500T-CPU required)

Basic parameters
Axis type: linear, modulo enabled, modulo length = pocket length

Extended parameters
• Mechanical parameters: load gear, leadscrew pitch (exact values required)
• Limits (dynamic limits) have to be set
• Homing → Select homing mode
(zero mark via PROFIdrive telegram recommended)
• Control loop (optimization)

2.2.4 Call of Intelligent Infeed application

General
A TO_SynchronousAxis is required for each infeed belt.

Call environment of application


Possible call environments of Intelligent Infeed application:
• MC-PreIPO (recommended as of TIA Portal V16 and Firmware 2.8)
• Time_delay_interrupt OB started in MC-PostServo OB
(delay time 0, priority has to be less than priority of MC-Servo and greater
or equal than MC-Interpolator)
• MC-PreServo / MC-PostServo OB

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 40
2 Engineering

NOTICE Call of application synchronously to MC-Interpolator OB


To ensure a high dynamic operation and for reliable functionality, it is required to
call the complete application in an OB which runs synchronously to the MC-
Interpolator OB.

NOTE The user is responsible for an adequate call cycle of the application.

Call and quantity structure


The proposed order to call the blocks of this application is:
1. LInfeed_Manager FB instance (only 1)
2. LInfeed_InletBelt FB instance (only 1)
3. LInfeed_InfeedBelt FB instances (at least 1 instance)
4. LInfeed_OutletBeltBasic FB instance (only 1 instance)

NOTE The complete application has to be called in the same organization block (OB).
All block instances have to be called in every organization block cycle.

Data exchange
The LInfeed_DataExchange DB has to be connected to the inOut parameter
© Siemens AG 2020 All rights reserved

‘dataExchange’ of all instances.


Configuration
A variable of respective type has to be connected to the inOut parameter
‘configuration’ of all instances. These configuration variables can be defined in a
separate data block.

2.2.5 Sensor signal acquisition

The sensor signals are required for product detection and position correction. In
general, there are 2 possibilities to get the signals in the CPU:
• via IO modules (e.g. DI at ET 200SP)
• via drive inputs at SINAMICS S120 (with Tel 390)
• via drive inputs at SINAMICS S210 (with Tel 105 and the bit
G1_ZSW1.Probe1Deflected resp. G1_ZSW1.Probe2Deflected)
Figure 2-1: I/O addresses of an ET 200SP input module (example input address 100)

It is required to assign the sensor inputs to the OB where the Intelligent Infeed
application is called (call synchronously to MC Interpolator → Use MC-Servo).
A (varying) acquisition time of input signals in the user program can cause
inaccuracy positioning of products on the outlet belt.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 41
2 Engineering

NOTE The isochronous mode is recommended to ensure deterministic acquisition time


of input sensor signals (if an ET 200SP is used, then a HF hardware version is
required).

2.2.6 Change of Intelligent Infeed configuration

A change of machine or product parameters triggers a new calculation of infeed


profiles. If parameters are changed when a functionality is running, this has no
immediate effect.
Due to that the Intelligent Infeed application has to be in ready state when
parameters are changed:
• manager output ‘ready’ = TRUE
The calculation is finished successfully when the manager outputs:
• ‘calculationBusy’ = FALSE
• ‘error‘= FALSE

2.2.7 Machine parameters


© Siemens AG 2020 All rights reserved

All relevant machine configuration types can be found in the following chapters:
2.1.9.5 LInfeed_typeInletBeltConfiguration
2.1.9.6 LInfeed_typeInfeedBeltConfiguration
2.1.9.7 LInfeed_typeOutletBeltBasicConfiguration

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 42
2 Engineering

Figure 2-2: Definition of sensor and handover positions

Reference position Sensor position


Outlet

Sensor position
Infeed 2

Sensor position
Sensor Inlet
Infeed 1

Allowed sensor
position range

Inlet belt Infeed belt 1 Infeed belt 2 Outlet belt

Handover position
Infeed 1
Handover position
Infeed 2
0.0 + Position / mm

NOTE The reference position (0.0) is the first belt transition (inlet belt → infeed belt 1).
All position values refer to this point.

Handover positions
© Siemens AG 2020 All rights reserved

The handover positions define where a certain belt ends and the next begins. For
every infeed belt the handover position has to be defined:
handover position belt (n) > handover position (n-1) + product length
That means the product length has to be smaller than the infeed belt lengths.

Sensor positions
The sensors (inlet and infeed belts) have to be located in specified position ranges.
See figure above.
The sensor on the inlet belt is mandatory for product detection and cannot be
deactivated. Sensors on infeed belts are optional for increasing accuracy on the
outlet belt, they have to be activated via configuration structure.

NOTE Infeed belt sensors increase the accuracy on the outlet belt. Recommendation:
Positions of sensors at belt transitions.
See also chapter: 1.3.3 Sensor position recommendation

Sensor signal evaluation


The signalEvaluation parameter defines whether a product is detected with a rising
or a falling edge. The product should only be detected when it is on the infeed belt
with its full length.
Table 2-44 Parameter ‘signalEvaluation’
Value Meaning Inlet belt Infeed / Outlet belt
0 rising edge X (default) X
1 falling edge X X (default)
When the sensors are positioned at belt transitions (according 1.3.3 Sensor
position recommendation) please use following settings:
Inlet belt sensor: Rising edge
Infeed belt and outlet belt sensors: Falling edge

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 43
2 Engineering

Sensor error reaction


The errorReaction parameter defines the reaction of Intelligent Infeed in case of
incorrect sensor values.
Table 2-45 Parameter ‘errorReaction’ at inlet belt
Value Meaning Reason Remedy
0 no reaction check parameter
distance of products is too ‘inletBeltCenterDistance
1 warning
small on inlet belt ‘and
2 error with ‘fastStop’ ‘inletBeltMaxDeviation’

Table 2-46 Parameter ‘errorReaction’ at infeed belts or outlet belt


Value Meaning Reason Remedy
0 no reaction check sensor signal and
product was not detected position or
1 warning
by sensor as expected increase parameter:
2 error with ‘fastStop’ ‘positionWindow’

Infeed belt operation mode


This parameter defines the operation mode of the infeed belts.
Table 2-47 Parameter ‘beltOperation.mode’ at infeed belts
Value Meaning Used for Description
© Siemens AG 2020 All rights reserved

0 controlled by product synchronization This is the default operation mode of


autoSync (autoSync) all infeed belts. It is used for
Superimposed motion automatic synchronization of
(positionCorrection) products to the outlet belt. All
‘controlled by autoSync’ infeed belts
have to be adjacent.
1 synchronized superimposed motion An infeed belt configured with this
to outlet belt (positionCorrection) mode is geared in to the outlet belt
with a fixed ratio. The gear ratio is
specified as a percentage and can be
set in the 'percentOfOutlet'
parameter. (100% means gear ratio
1.0)
Mode ‘synchronized to outlet belt’ can be used at an infeed belt directly in front of
the outlet belt:
• For increasing the accuracy on the outlet belt (no handover of products with
different velocities, friction coefficient has no effect)
• For compensation of different belt materials of infeed and outlet belts

NOTE Only infeed belts with configured operation mode ‘controlled by autoSync’ are
relevant for product synchronization to the outlet belt.
Infeed belts with configured operation mode ‘synchronized to outlet belt’ are
additional and increase the total number of infeed belts.

Outlet belt parameters


Home position
In order that products arrive properly in the pockets, it is required to define a home
position for the outlet belt. The homePosition (reference position) has to be defined
in such a way that the following mechanical position is fulfilled:

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 44
2 Engineering

Figure 2-3: Definition of home position at outlet belt

Outlet Belt position = 0.0

pocket length [mm]

Infeed belt 1..n Outlet belt

The homing of the outlet belt can be done with different modes (see instruction
MC_Home).

Product phase offset


The parameter ‘productPhaseOffset’ can be used to shift the position of the product
in the pocket.
The configured value is effective for all arriving products on the outlet belt. It is not
possible to shift every product individually in a pocket.
This can be used to adjust an inaccurate home position of the outlet belt.
© Siemens AG 2020 All rights reserved

Figure 2-4: Definition of parameter ‘productPhaseOffset’

productPhaseOffset productPhaseOffset
< 0.0 > 0.0

Outlet belt

2.2.8 Product parameters

The relevant product parameters are part of manager FB configuration


2.1.9.2 LInfeed_typeManagerConfiguration.
Figure 2-5: Parameters ‘designMachineSpeed’, ‘length’ and ‘staticFriction’

Inlet belt Infeed belts Outlet belt


1.
designMachineSpeed
[ppm]

3. staticFriction
2. length [0.0 - 1.0]
[mm] pocket length
[mm]

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 45
2 Engineering

1. designMachineSpeed
Defines the maximum rate of arriving products on the inlet belt.
Unit: Parts per minute [ppm].
2. length
Defines the regular length of the products. Unit: [mm]
3. staticFriction
Defines the grip of the products on the belt surface. See data sheet from belt
manufacturer.
Also see chapter: 3.1.2 Get friction coefficient with inclined plane test
© Siemens AG 2020 All rights reserved

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 46
2 Engineering

Figure 2-6: Parameters ‘inletBeltCenterDistance’ and ‘inletBeltMaxDeviation’

Inlet belt Infeed belts

4. inletBeltCenterDistance
[mm]

ideal ideal ideal ideal ideal

5. inletBeltMaxDeviation [mm]

inletBeltMaxDeviation 1 inletBeltMaxDeviation 2
(e.g. -15mm) (e.g. 20mm)

Case 1: Continuous and regular product stream


(with position deviation of products)
The product stream is regular. Single products are shifted or with
deviation related to the ideal inletBeltCenterDistance.

The maximum absolute Range (= smallest value to highest value) of


deviation (in this example 15mm + 20mm = 35mm) is required for
© Siemens AG 2020 All rights reserved

parameter InletBeltMaxDeviation (5.)

Note:
Handling of this case causes a temporary change of the infeed
profile.
After product with position deviation is placed on outlet belt, the
Infeed profile returns to normal (initial) value.

inletBeltMaxDeviation
(positive gap e.g. 50mm)

inletBeltMaxDeviation
(negative gap e.g. -40mm)

Case 2: Non-continuous product stream


(gaps to be handled by Intelligent Infeed)
The regular product stream is (cyclically) interrupted by a positive
or negative gap.

The maximum absolute deviation value


(in this example 50mm) is required for parameter
inletBeltMaxDeviation (5.)

Note:
Handling of this case causes a permanent change of the Infeed
profile.
To recover back to the normal infeed profile it is required to adjust
the velocity of the outlet belt.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 47
2 Engineering

4. inletBeltCenterDistance
Distance between center of products if products arrive with ideal / regular
conditions.
If only the velocity of the inlet belt is known, you can convert it to the inlet
center distance.
See chapter: 1.2.5 Definitions
5. inletBeltMaxDeviation
Defines the maximum position error of products on the inlet belt.

2.2.9 Pocket length

The pocket length is defined from the middle of a tappet to the middle of the next or
the previous tappet. All pockets (distance between middle tappets) must have
same lengths.
Figure 2-7: Pocket length at outlet belt

tappet Pocket length tappet


© Siemens AG 2020 All rights reserved

Outlet belt

NOTE The pocket length has to be equal to the modulo length in the TO configuration
of the outlet belt axis.

2.2.10 Other parameters

Control mode
This parameter defines the operating mode of the automatic functionality (manager
input ‘autoStart’).
Table 2-48: Control modes of automatic functionality
Value Meaning Comment
0 no active control for commissioning and test purposes
1 autoSync Synchronization of products to the outlet
belt (only gearing commands are used by
Intelligent Infeed)
2 autoSync and positionCorrection synchronization of products to the outlet
belt and position correction of products
on the infeed belts (gearing and
superimposed commands are used by
Intelligent Infeed)
More information can be found in chapter: 1.2.2 Functionality of Intelligent Infeed

NOTE It is recommended to use control mode: ‘autoSync and positionCorrection’.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 48
2 Engineering

Product control
1. autoSyncDynamics
These parameters define the dynamics for the ‘autoSync’ functionality. The
dynamics are used to change the velocities of the infeed belts for each arriving
product.
2. positionCorrection
These parameters define the additional dynamics and the maximum distance to be
corrected on an infeed belt.
This configuration (at manager FB) affects the ‘positionCorrection’ functionality at
all infeed belts. It is possible to change parameters individually at the respective
infeed belt (e.g. change dynamics like velocityDifference or distanceLimit).

NOTE Increase the parameters velocityDifference and distanceLimit if the correction on


the infeed belts is not sufficient.
© Siemens AG 2020 All rights reserved

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 49
2 Engineering

2.3 Operation
2.3.1 Activation and deactivation

Figure 2-8: Timing diagram of activation and deactivation

enable

valid

busy

error

LINFEED_ERR_XXX
status

STATUS_SUBSEQUENT_CALL
STATUS_FIRST_CALL
STATUS_NO_CALL
1) 2) 3) 4) 5)

1) The function block is activated by setting the ‘enable’ input. After enabling
the FB, the output ‘status’ is changing to STATUS_FIRST_CALL and
afterwards to STATUS_SUBSEQUENT_CALL. In case there is a
© Siemens AG 2020 All rights reserved

configuration error, (e.g. modulo function at an axis is not enabled) the


output ‘error’ is set and a respective status is displayed.
2) With a falling edge of ‘enable’, the function block is reset.
3) The FB is called now with a correct configuration and the FB input ‘enable’
is set again.
4) The FB is ready for operation when the output ‘valid’ is signalizing TRUE.
5) The FB is deactivated with reset of the input ‘enable’. The output ‘valid’ is
reset immediately. When the deactivation is finished, the output ‘busy’ is
reset and the output ‘status’ changes to STATUS_NO_CALL.

2.3.2 General functionalities

Common functionalities of manager FB are effective at all infeed belts:


Table 2-49 Inputs and outputs of general functionalities
Functionality Input Output Comment
enable belts enableBelts beltsEnabled
(enable logic)
stop stop stopping
(execute logic)
fast stop fastStop fastStopActive higher dynamics than stop
(enable logic)
reset reset resetting precondition:
(execute logic) ready = TRUE
also for outlet belt

Enable belts
With manager FB input ‘enableBelts’ all configured infeed belts are enabled and
disabled. The output ‘beltsEnabled’ is set, if the belts are enabled.

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 50
2 Engineering

NOTE If the manager FB input ‘enableBelts’ is reset while other functionalities are
running, the fast stop functionality is activated to stop all belts as fast as
possible. After stopping is finished the axes are disabled. This can be used for
emergency stop handling.

Stop / fastStop
A rising edge at manager FB input ‘stop’ or ‘fastStop’ triggers a stop for all infeed
belts. While stopping is active, the output ‘stopping’ is set.

NOTE After a stop, the products can no longer be controlled by the infeed system. They
have to be removed.

Reset
The manager FB input ‘reset’ can be used to acknowledge FB errors and reset
technology alarms. During reset is active the output ‘resetting’ is set.

NOTE Axes only get reset (with MC_RESET) if technology alarms are pending.

2.3.3 Start of application

Preconditions for automatic functionality (manager FB input ‘startAutomatic’)


© Siemens AG 2020 All rights reserved

• Manager FB output valid = TRUE


• Infeed belts are enabled (manager FB output ‘beltsEnabled’ = TRUE)
• Outlet belt homed
• Manager FB output ‘ready’ = TRUE
• Calculation finished (manager FB output ‘calculationBusy’ = FALSE)

2.3.4 Homing of outlet belt

The homing functionality of the outlet belt is started by a rising edge at input
‘homing’ of outlet belt FB.
Passive homing (outletBelt.homing.mode 2 or 8) can be aborted via stop
functionality at manager FB.

2.3.5 Continuous homing

This functionality executes a cyclic homing of the outlet belt axis. It is activated via
outlet belt FB input ‘continuousHoming’.
Due to inaccuracies in the mechanical parameters (lead screw pitch, modulo length
of the axis,…) or slippage between the drive roller and the outlet belt, the axis
position of the outlet belt may drift. This can lead to a steadily increasing shift of the
products from the center of the pocket.
Requirements:
• Outlet belt homing sensor present
• Passive homing at outlet belt axis configured (use zero mark via PROFIdrive)
• Home position is configured, see chapter 2.2.7 Machine parameters

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 51
2 Engineering

NOTICE Discontinuities of axis positions


This functionality should be started directly at the beginning of the automatic
functionality. Otherwise, if a large drift has already taken place, a severe change
of the actual position of the outlet belt will take place. Due to the active
synchronization, this could have significant effects on all infeed belts axes.

2.3.6 Control of outlet product rate POutlet (by infeed system)

Normally the product rate PInlet is specified (e.g. by the upstream machine). There
is no influence on it. The value varies from approximately constant to completely
irregular depending on the operating state of the upstream machine.
In the irregular case the POutlet has to be controlled accordingly. That means the
velocity of the outlet belt has to be regulated.

NOTE Empty pockets on the outlet belt cannot be avoided at startup of the infeed
system.

Outlet belt control


In this case the inlet and outlet belt velocities have to be changed simultaneously.
© Siemens AG 2020 All rights reserved

The inlet belt must not be part of the upstream machine.


An upstream “measuring belt” can be used to evaluate how many products are
arriving. With this information the setpoint velocity of the inlet and the outlet belt
can be calculated.
Figure 2-9: Separate outlet belt control design (example with 3 infeed belts)

Setpoint generation for outlet belt: VOutlet Control axis


V = P(act) / 60 * pocketlength velocity
P(act)
Control axis
velocity
Application
Calculation of actual
product rate P(act)
VInletExpected Intelligent Infeed
[ppm]
LInfeed_InletBelt LInfeed_InfeedBelt LInfeed_InfeedBelt LInfeed_InfeedBelt LInfeed_OutletBelt
FB FB 1 FB 2 FB 3 Basic FB

Product sensor Product sensor Product sensor Product sensor Product sensor

Measuring belt Inlet belt Infeed belt 1 Infeed belt 2 Infeed belt 3 Outlet belt

V constant V variable V variable

Control axis Setpoint generation for measuring belt:


velocity V = P(max) / 60 * inletCenterDistance

2.3.7 Control of inlet product rate PInlet (by upstream machine)

In this case the product rate at the outlet belt POutlet is fixed. That means the inlet
and the outlet belt have to move with constant velocity.
The product rate on the inlet belt has to be controlled by changing the inlet center
distance of the products (e.g. controlling product rate of upstream machine).

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 52
2 Engineering

NOTE Empty pockets on the outlet belt cannot be avoided at startup of infeed system.

2.4 Error handling

NOTE The complete list of ErrorID information can be found in tag table
LInfeed_ErrorIDs

2.4.1 Acknowledge of errors

Errors are displayed at the manager FB. If a submodule is affected (belt), the error
is also displayed at the respective block.
To acknowledge pending errors, a rising edge at the input ‘reset’ at the manager
FB is required. The reset process may take a few cycles. As long as reset is active
the manager output ‘resetting’ is set.

NOTE The subfunction status of internally called blocks is shown as subfunctionStatus


in the diagnostics structure.

2.4.2 Solutions for errors at enabling of manager FB


© Siemens AG 2020 All rights reserved

To solve errors at enabling of the manager FB check the following settings:


• Are the modulo settings of the outlet belt axis correct? (see chapter: 2.2.3
Technology object configuration )
• Are TO_SynchronousAxis at the infeed belt FB instances connected?
• Constants for number of modules (inlet, infeed and outlet belts) exceeded?

2.4.3 Solutions for errors at start of functionality

To solve errors at start of functionality check the following items:


• Are all infeed belts enabled? (see manager FB output ‘beltsEnabled’)
• Is the outlet belt homed?
• Configuration of the manager FB instance valid?
• Configuration of the inlet belt FB instance valid?
• Configuration of the infeed belt FB instances valid?
• Configuration of the outlet belt FB instance valid?
• Are the leading values interconnected?
(all infeed belt axes require leading value interconnection to the outlet belt axis)

2.4.4 Solutions for errors during functionality is running

• Check value of input ‘actualVelocity’ at inlet belt FB


• LINFEED_EXT_INLET_PRODUCT_DISTANCE
Products arrived with too small distance; Check configuration variable
‘inletBeltMaxDeviation’ and ‘inletBeltCenterDistance’ at manager FB

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 53
2 Engineering

2.4.5 Solutions for insufficient product position accuracy on the outlet belt

• Outlet belt homed correctly?


• Reduce the cycle time of the application
• Use of an additional infeed belt with configured operation mode ‘synchronized
to outlet belt’ directly in front of outlet belt (different mechanical design).
• Use of product sensors at every infeed belt; also on an infeed belt with
configured operation mode ‘synchronized to outlet belt’ and enabled position
correction functionality.
• Increase PLC tag ‘LINFEED_PROFILE_TABLE_UPPER_LIM’
© Siemens AG 2020 All rights reserved

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 54
3 Additional information

3 Additional information
3.1 Miscellaneous
3.1.1 Optimal infeed belt length

In the following you will find a rough guideline for determining the length of the
infeed belts:

𝑰𝒏𝒇𝒆𝒆𝒅 𝒃𝒆𝒍𝒕 𝒍𝒆𝒏𝒈𝒕𝒉 = 𝟏. 𝟓. . 𝟐. 𝟓 ∗ 𝑷𝒓𝒐𝒅𝒖𝒄𝒕 𝒍𝒆𝒏𝒈𝒕𝒉

3.1.2 Get friction coefficient with inclined plane test

It is possible to get the friction coefficient of products related to the belt surface with
a simple test.
Figure 3-1: Inclined plane test

2.
1.
© Siemens AG 2020 All rights reserved

1. Place a product on the belt surface.


2. Increase the angle α until the product starts to slide.
3. Use the angle (when products started to slide) to calculate the friction
coefficient:
𝑓𝑟𝑖𝑐𝑡𝑖𝑜𝑛 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 = tan (𝛼)

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 55
4 Appendix

4 Appendix
4.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:
www.siemens.com/industry/supportrequest
© Siemens AG 2020 All rights reserved

SITRAIN – Training for Industry


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

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

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for Apple iOS, Android and Windows
Phone:
support.industry.siemens.com/cs/ww/en/sc/2067

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 56
4 Appendix

4.2 Application support


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

4.3 Links and literature


Table 4-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/109770903
\3\ SIMATIC Library LAnyAxis - Motion Control Applications with DB_ANY
© Siemens AG 2020 All rights reserved

https://support.industry.siemens.com/cs/ww/en/view/109779533

4.4 Change documentation


Table 4-2
Version Date Modifications
V1.0 08/2020 First version

LInfeed for SIMATIC


Entry-ID: 109770903, V1.0, 08/2020 57

You might also like