Siemens SIMATIC S7-1500 Manual
Siemens SIMATIC S7-1500 Manual

Siemens SIMATIC S7-1500 Manual

Library palletize pattern generator
Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

Quick Links

Library Palletize Pattern
Generator
SIMATIC S7-1500
https://support.industry.siemens.com/cs/ww/en/view/109800960
Siemens
Industry
Online
Support

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIMATIC S7-1500 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Siemens SIMATIC S7-1500

  • Page 1 Library Palletize Pattern Generator Siemens SIMATIC S7-1500 Industry Online https://support.industry.siemens.com/cs/ww/en/view/109800960 Support...
  • Page 2: Legal Information

    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.
  • Page 3: Table Of Contents

    Table of contents Table of contents Legal information ......................2 Introduction ......................5 Overview....................5 Mode of operation ................6 1.2.1 Objective / Use case ................6 1.2.2 Architecture and concept / workflow ............ 7 Components used ................10 Engineering ...................... 11 Description of interface ...............
  • Page 4 Table of contents 3.6.3 Assignment of routine ................. 63 Add offsets ..................64 3.7.1 Interlayer and bottom layer definition ..........64 3.7.2 Offset height (product dropping height) ..........66 3.7.3 Pallet offset frame definition for usage in WCS ......... 66 3.7.4 Interlayer frame ..................
  • Page 5: Introduction

    1 Introduction Introduction Overview The library LPallPatt provides functionalities to create pallet patterns for homogenous cuboid products. Resulting from the pattern generation a point table is provided. It defines the place positions of the products on a pallet, on a slip- sheet or in a container.
  • Page 6: Mode Of Operation

    1 Introduction Mode of operation 1.2.1 Objective / Use case The stacking of products of different sizes in certain patterns is a common process in many industries. Depending on the variating sizes of product and container or customer specific requirements regarding the packing layout of a pallet, the palletizing processes can be highly variable and therefore cause high programming efforts.
  • Page 7: Architecture And Concept / Workflow

    1 Introduction Figure 1-2: Workflow pattern generation with HMI PalletizePositions Product Data ProductPos[1] Palletize ProductPos[2] Pallet Data Pattern ProductPos[3] Generator Layout ProductPos[4] ProductPos[..] Palletizing modes LPallPatt supports the palletizing of products to the defined maximum stacking height. This mode can be used to for the maximum utilization of the pallet. Furthermore, it is possible to define a number of products which must be palletized.
  • Page 8 1 Introduction Figure 1-3: Workflow of LPallPatt Software structure of pattern generation The pallet pattern configuration and generation can be executed via HMI or directly from the user program in the SIMATIC CPU. The result of the pattern generation is an array of cartesian product positions.
  • Page 9 1 Introduction Figure 1-5: Software structure pattern generation without HMI LPallPatt_ Data • Pallet LPallPatt_ Data Data User Pattern Program • • Generator Product Product Data Positions • Config Pattern Usage of generated product positions (point table) The generated product positions define the place positions for the palletizing applications.
  • Page 10: Components Used

    LPallPatt library LPallPatt_V3_0_0_V17.zip LPallPatt library LPallPatt_V3_0_0_V18.zip LPallPatt example LPallPatt_Example_V3_0_0_ project V17 V17.zip LPallPatt example LPallPatt_Example_V3_0_0_ project V18 V18.zip LPallPatt manual LPallPatt_V3_0_en.pdf SIMATIC S7- https://support.industry.siemens.c 1500T Kinematics om/cs/ww/en/view/109755891 Control SIMATIC S7- https://support.industry.siemens.c 1500T Kinematics om/cs/cy/en/view/109802248 Integrator LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 11: Engineering

    2 Engineering Engineering Description of interface 2.1.1 FB LPallPatt_PatternGenerator The FB “LPallPatt_PatternGenerator” is the main FB of the library LPallPatt. It needs to be called in a cyclic OB, like OB1 (2.3.5). In V2.0 the FB is called inside the FB “LPallPatt_HmiMain”. The FB creates the pattern point list named “productPositions”...
  • Page 12 2 Engineering Identifier Data type Description 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 status Word status of the FB diagnostics typeDiagnosticsFBTemplate diagnostics information of FB In/Out parameter Table 2-3: In/Out parameter of LPallPatt_PatternGenerator...
  • Page 13: Fb Lpallpatt_Hmimain

    2 Engineering 2.1.2 FB LPallPatt_HmiMain The FB „LPallPatt_HmiMain“ handles the communication between the HMI and the SIMATIC CPU. This FB is calls the “LPallPatt_Generator” as a multi instance. Figure 2-2: LPallPatt_HmiMain LPallPatt_HmiMain (FB) vali Bool enable Bool lengthU UDInt busy Bool angleUn erro...
  • Page 14 2 Engineering Output parameter Table 2-5: Output parameter of LPallPatt_HmiMain Identifier Data type Description 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...
  • Page 15: Fb Lpallpatt_Palletizingcontrol

    2 Engineering 2.1.3 FB LPallPatt_PalletizingControl The FB manages the data transfer between LPallPatt and other applications. It sets the next required point type and additional data. Figure 2-3: LPallPatt_PalletizingControl LPallPatt_PalletizingControl (FB) Array[1 Bool enable palletizingPoint ..6] of LReal UDInt palletIndex pointType LReal numberOfProducts...
  • Page 16 2 Engineering Default Identifier Data type Description value getPreviousPoint Bool FALSE Rising edge trigges previous point from LPallPatt. initializeProductCo Bool FALSE Rising edge sets unter product counter to initial product counter. initialProductCount LReal Product counter for initialization. approachRetractR Array[1..LPALLPATT_MAX_NUMBER_PALLE Approach/Retract outines routines from 1..LPALLPATT_MAX_NUMBER_OF_APPROA...
  • Page 17: Fb Lpallpatt_Datamanager

    2 Engineering 2.1.4 FB LPallPatt_DataManager This FB supports the data exchange of pattern data between hmi files and plc. Figure 2-4: LPallPatt_DataManager LPallPatt_DataManager (FB) Bool enable busy Bool monitori Bool valid Bool ngMode actUserG loadin USInt Bool roup gDone error Bool status Word...
  • Page 18: Plc Types

    2 Engineering In/Out parameter Table 2-11: In/Out parameter of LPallPatt_DataManager Identifier Data type Description HMIInterface LPallPatt_typeHMIInterface Exchange data between HMI and PLC generatorConfigura LPallPatt_typePatternGeneratorConfiguration tion generatorResults LPallPatt_typePatternGeneratorResults approachRetractR Array[1..LPALLPATT_MAX_NUMBER_OF_APPROA outines CH_ROUTINES] of LPallPatt_typeApproachRetractRoutine 2.1.5 PLC types Table 2-12: Parameter of LPallPatt_typeApproachRetractPoint Identifier Data type Default value...
  • Page 19 2 Engineering Defau Identifier Data type Description value retractPoints Array[1..LPALLPATT_MAX_NR_POINTS_APPROACH Distances/Offsets of _ROUTINE] of LPallPatt_typeApproachRetractPoint the retract points from the place point (productPosition) Table 2-14: Parameter of LPallPatt_typeArticles Defaul Identifier Data type Description t value pallets Array[1..LPALLPATT_MAX_NUMBER_PALLET_TYPES ] of LPallPatt_typePalletData products Array[1..LPALLPATT_MAX_NUMBER_PRODUCT_TYP ES] of LPallPatt_typeProductData...
  • Page 20 2 Engineering Default Identifier Data type Description value palletizePatternMode USInt 0 =most products pattern, 1= one-block, 2=two-block, 3=three-block, 4=four-block, 5=five-block layerStackMode UInt 0: tower stacking (no mirroring or rotating), 1: mirror the pattern in the layers alternating in x- direction, 2: rotate the pattern in the layers alternating in y-direction, 3: mirror the patterns alternating in x- and y-direction allowProductOrientatio...
  • Page 21 2 Engineering Default Identifier Data type Description value rotatedProductNumber DInt products with rotation of 90° distributionDistance LReal Distance of the products including gaps along the pallet side Table 2-20: Parameter of LPallPatt_typeFrame Identifier Data type Default value Description LReal x coordinate LReal y coordinate LReal...
  • Page 22 2 Engineering Default Identifier Data type Description value actualIndexProductPalletSele UInt Actual index of ction selection table upperBoundProductPalletSel UInt Upper bound array for ection selection table actProductIndexPointTable UInt Product place number in the selected layer auxProductIndexPointTable UInt auxiliary variable to identify the actual point table number layerIndexPointTable UInt...
  • Page 23 2 Engineering Default Identifier Data type Description value shownNumberPointsInPointT SInt Number of not able overlayed points (shown points) in point table layerLayoutIndexInTable Array[0..7] of DInt Layer layout index in the layer builder table layerLayoutNamesInTable Array[0..7] of String Layer layout names in table and visualization approachRetractPointIndex UDInt...
  • Page 24 2 Engineering Default Identifier Data type Description value updatePrgManager Bool FALSE Trigger for HMI to update files and usb flash detection Table 2-22: Parameter of LPallPatt_typeInterlayerConfiguration Identifier Data type Default value Description name String Name of the interlayer interlayerHeight LReal Height / Thickness of the interlayer approachRoutin UInt...
  • Page 25 2 Engineering Default Identifier Data type Description value startIndexInPointTabl DInt Point index in productPositions-Array, where the layer starts. 0: layer does not exist lastIndexInPointTable DInt Point index in productPositions-Array, where the layer ends. layerLayoutIndex DInt Layer Layor index, defines which layer layout is configured the specific layer, 0: layer does not exist layerHeight...
  • Page 26 2 Engineering Table 2-29: Parameter of LPallPatt_typePalletOffsets Default Identifier Data type Description value palletOffsetFram LPallPatt_typeFram Pallet frame placeHeightOffse LReal Offset for place position in z-direction, release product without contact to pallet or lower layer, distance to avoid contact to pallet or lower layer Table 2-30: Parameter of LPallPatt_typePatternGeneratorConfiguration Defau Identifier...
  • Page 27 2 Engineering Table 2-33: Parameter of LPallPatt_typeProductData Default Identifier Data type Description value productName String '- -' Name of the product productDimensio LPallPatt_typeDimensionProdu Product dimensions productGaps LPallPatt_typeProductGaps Gaps between products on pallet productWeight Real Mass of the product, unit (eg. kg) must match to maximum allowed mass of the pallet Table 2-34: Parameter of LPallPatt_typeProductGaps...
  • Page 28: Plc Tags

    2 Engineering 2.1.6 PLC tags Table following table shows the library internal PLC tag table “LPallPatt_UserTags”. As there are no tags included, the table shows library constants only. Table 2-36: PLC tags Identifier & Value Value Description LPALLPATT_DISTRIBUTION_MODE_ENLARGE_GAPS_ Enlarge gaps to the pallet edges TO_PALLET_EDGES LPALLPATT_DISTRIBUTION_MODE_ENLARGE_GAPS_...
  • Page 29: Hmi Screen And Faceplate

    2 Engineering Identifier & Value Value Description LPALLPATT_SHOW_BLENDING_FOR_APPROACH_RETR FALS TRUE = The user has the option to configure the blending radius for the approach and retract points, FALSE = blending is not shown on HMI (for SKI/SCP) LPALLPATT_STACKING_MODE_MIRROR_X Mirror product positions on the length side of the pallet LPALLPATT_STACKING_MODE_MIRROR_X_AND_Y Mirror product positions on the...
  • Page 30: Hmi Vb Scripts

    2 Engineering 2.1.8 HMI VB scripts LPallPatt_vbs_ChangeAlignmentLine This script displays an alignment line for the alignment of products. 3.4.2 LPallPatt_vbs_ChangeProductOrPallet This script displays the pallet and the products on the HMI. The script moves and sizes the rectangles for the pallet and the products depending on the generated palletizing product positions.
  • Page 31: Error Handling

    2 Engineering Error handling The FB “LPallPatt_PatternGenerator” displays errors with the Boolean output “error”, like other PLC Open blocks. The error number is displayed at the output “status” when “error” is true. Errors in the pattern generation occur because of misconfigurations (e.g.
  • Page 32: Project Integration

    2 Engineering Project integration 2.3.1 Import of application in PLC The table below lists the steps for integrating the blocks of the LPallPatt library folder “PLC” into your STEP 7 program. The PLC implementation is equal for WinCC Advanced and WinCC Unified. NOTE Figure 2-6: Integrating the library blocks into TIA Portal NOTE...
  • Page 33: Import Of Application In Hmi - Wincc Unified

    2 Engineering 2.3.2 Import of application in HMI - WinCC Unified 1. Copy the “LPallPatt_Tags” tags from the folder “Master copies…HMI…WinCCUnified...HMI Tags” to the HMI tags of the HMI. Connect the “HMIInterface” to the corresponding data block in the PLC. 2.
  • Page 34 2 Engineering Faceplate LPallPatt_Generator and screen PallPattScreen 1. Update the Types to the project library from the global library “LPallPatt” library Types → Update Library → Update project library Figure 2-9: Update project library 2. Copy the “LPallPatt_Tags” tags from the folder “Master copies…HMI…WinCCAdvanced”...
  • Page 35 2 Engineering Figure 2-10: Activate screen and enable HMI interface 8. Reset the bit “LPallPattScreenLoaded” in the cleared event. Figure 2-11: Reset bit “LPallPattScreenLoaded” in cleared event 9. Reset the bit “HMIInterface.enable” when another screen is activated by the user. You could also set the this variable always to TRUE to enable the HMI LPallPatt Entry-ID: 109800960, V3.1,...
  • Page 36 2 Engineering Figure 2-12: Load other screen and disable HMI interface 10. Navigate to the HMI tags and select the corresponding PLC variable with the correct type and connect it to the HMI tag “HMIInterface”. Figure 2-13: Connect HMI Interface to PLC 11.
  • Page 37: Call Lpallpatt_Hmimain

    2 Engineering 2.3.4 Call LPallPatt_HmiMain The FB LPallPatt_HmiMain manages the interface to the HMI and calls the LPallPatt_PatternGenerator as multi instance. It is the only block that needs to called in a OB to realize the pattern generation with HMI. FB call The FB “LPallPatt_HmiMain”...
  • Page 38: Restore Points After Power-Off/On Of Cpu

    2 Engineering 2.3.6 Restore points after POWER-OFF/ON of CPU There are two options to restore the product and interlayer positions after a Power Off/On of the CPU. 1. Set “interlayerPositions” and “productPositions” to Retain in DB “LPallPatt_Data”. 2. Call code in OB1 to restore the data after Power On. 2.3.7 Coupling of palletizing data for motion applications The FB ‘LPallPatt_PalletizingControl’...
  • Page 39 2 Engineering Figure 2-16 Overview interface Motion Control Palletize Pattern application Generator MotionProgr Palletize Pattern Generator MotionProgram Data LPallPatt_ Data palletizingPoint. position[..] pointType [..] enable productPositions[..] reset interlayerPositions[..] palletIndex LPallPatt_ generatorResults[..] PalletizingCon getNextPoint approachRetractRoutines[..] trol The control FB has the following functions. •...
  • Page 40: Pattern Generation

    3 Pattern generation Pattern generation Generator 3.1.1 Set pallet data Pallet data overview The pallet data consist of the following data. Table 3-1: Pallet data Data Data in type Explanation „LPallPatt_typePalletData“ Name palletName Name of the pallet Width palletDimension.width Dimension of the pallet in x-direction of the pallet coordinate system Length palletDimension.length...
  • Page 41 3 Pattern generation Figure 3-1: Pallet dimensions configuration Pallet edge distance The pallet edge distance enlarges or reduces the usable area of the pallet. Figure 3-2: Pallet gaps configuration LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 42: Set Product Data

    3 Pattern generation Figure 3-3: Pallet edge distance Edge distance length > 0 Edge distance length > 0 Edge distance width = 0 Edge distance width < 0 Other patterns can be generated if the pallet edge distance is configured. The number of products per layer depends on the size of the pallet edge distance.
  • Page 43 3 Pattern generation Set product data on HMI The product dimensions and gaps can be easily configured via HMI. Figure 3-4: Product dimensions configuration Figure 3-5: Product gaps configuration LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 44: Article Data Sets

    3 Pattern generation 3.1.3 Article data sets Pallet data sets It is possible to load other saved pallet data sets into the actual pallet data set. The pallet data sets can be defined in DB “LPallPattData.standardArticles” in TIA Portal. The example project contains four common pallet data sets. The following steps must be executed to load a pallet data set.
  • Page 45: Generator Settings

    3 Pattern generation Example 1: • No interlayers • Product height: 100mm • MaxStackingHeight: 1000mm ➔ Result: 10 layers = 1000mm/100mm Example 2: • Interlayer height: 30mm (no bottom layer is used) • Product height: 100mm • MaxStackingHeight: 500mm ➔ Result: 4 layers = (500mm + 30mm) / (100mm + 30mm) are palletized User-defined product number If the max.
  • Page 46 3 Pattern generation One-block pattern A one block-pattern is a simple product pattern. All products have the same orientation and are aligned in rows and columns. The product orientation is determined by the better utilization of the pallet area (higher number of products). Figure 3-7: One-block pattern 6 block columns Two-block pattern...
  • Page 47 3 Pattern generation Three-block pattern The three-block pattern is based on the two-block pattern. The three-block algorithm tries to fill gaps which could not be filled by the two-block algorithm. The third block is aligned in a pattern corner. Figure 3-9: Three-block pattern Block 3 Block 1 Block 2...
  • Page 48 3 Pattern generation Four-block pattern The four-block algorithm aligns 4 blocks in the corners of the pattern. The products in block 1 and block 4 have an orientation of 90°. The products in block 2 and block 3 have an orientation of 0°. Figure 3-10: Four-block pattern Block 4 Block 3...
  • Page 49: Stacking Mode

    3 Pattern generation Five-block pattern The five-block pattern is based on the four-block pattern. The five-block algorithm tries to fill gap in the center of the four-block algorithm. Block five contains one or two products. Figure 3-11: Five-block pattern Block 3 Block 4 Block Block 2...
  • Page 50 3 Pattern generation Figure 3-12: Stacking mode – Tower stacking Odd layer Even layer with tower stacking Figure 3-13: Stacking mode – Mirroring x Odd layer Even layer with mirroring x Mirroring x Mirroring x and y Figure 3-14: Stacking mode – Mirroring y Odd layer Even layer with mirroring y Mirroring x...
  • Page 51: Pattern Alignment

    3 Pattern generation Figure 3-15: Stacking mode – Mirroring x and y Odd layer Even layer with mirroring x and y Mirroring x Mirroring x and y 3.2.3 Pattern alignment Center of pallet This configuration centers the generated pattern on the pallet and is recommended.
  • Page 52 3 Pattern generation Example alignments The following figures show the possible four configurations for the same pallet and product and pattern mode data. Figure 3-16 Center and rectangle Figure 3-17 Center and keep gaps LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 53: Place Order

    3 Pattern generation 3.2.4 Place order The place order can be configured with the first three bits in the byte “configuration.productPlaceOrder”. The place order depends on the product place positions, which are being generated. Table 3-3: Product place order configuration. x or y priority x ascending or y ascending or...
  • Page 54 3 Pattern generation Example product place order The following example shows a product place order with the following configuration (2#0000_0101). The number on the top left corner of all products shows the palletizing order. • X first • X descending •...
  • Page 55: Generate The Pattern

    3 Pattern generation Generate the pattern 3.3.1 Execute pattern generation When all data is configured, the pattern generation can be started by pressing the button “Generate pattern”. This button triggers the FB “LPallPatt_PatternGenerator” in the SIMATIC CPU, which calculates the pallet pattern depending on the configuration data.
  • Page 56 3 Pattern generation Figure 3-20: Product position array in data block Layer stacking data The layer stacking data are generated in addition to the product positions. The array contains the start and the last index of the products in the array “productPositions”...
  • Page 57: Edit Layers

    3 Pattern generation The pattern always starts with the first layer layerStackingData[1]. Empty layers without products have a start index and a last index of 0. The layer layout index defines which layer layout is configured the specific layer. ‘layerLayoutIndex =0 means, that the layer does not exist. The layer stacking data contains also the layer height ‘layerHeight’...
  • Page 58 3 Pattern generation 3. Change the product positions X, Y or the orientation A. Figure 3-22: Change product positions manually Result: The pattern visualization will update the pattern automatically and the product positions of all products in the layers which use this layout will be updated, e.g., product positions in layer 1 and 3.
  • Page 59 3 Pattern generation Change product place order The product place order can be changed by pressing the arrows up and down. The product will move in the table and the index in the visualization changes. Figure 3-24: Change product place order Add or delete products Products can be added or deleted to a layer layout.
  • Page 60: Stack Layers

    3 Pattern generation Stack layers The number of layers and the stacking order is calculated automatically by the pattern generator (3.1.4). The layer builder offers the possibility to change the number of layers or the order. Stacking of layer layouts The automatic pattern generation creates alternating mirrored patterns.
  • Page 61: Approach And Retract Routines

    3 Pattern generation Approach and retract routines 3.6.1 Description Approach routine Describes up to five points which can be used to define the path to the place position on the pallet. Retract routine Describes up to five points for the path from the place position back to the pick position.
  • Page 62 3 Pattern generation Absolute coordinate If the configuration absolute is configured, the coordinate will be set directly into the point. Offset to place position All offsets refer to the place point and not to other approach or retract points. If an offset is used, the absolute coordinate of the approach point is calculated depending on the place point and the offset value.
  • Page 63: Assignment Of Routine

    3 Pattern generation 3.6.3 Assignment of routine Every point in the layer pattern can have an individual approach or retract routine. In many use cases the routines can be similar for different points. The default setting for all points is the “default routine” with the index 1. If more than one routine is required, these other routines have to be assigned by the routine index (“routine id”) to the points in the pack list.
  • Page 64: Add Offsets

    3 Pattern generation Add offsets The following figure shows the offsets settings on the HMI. The configuration values are explained in the next chapters. Figure 3-30 Offsets settings 3.7.1 Interlayer and bottom layer definition Interlayers Interlayers can be placed between the product layers. The interlayer height is considered for the calculation of the z-positions (place height) of the next product layer.
  • Page 65 3 Pattern generation Figure 3-31: Interlayer heights – 3 examples for the same product size Interlayer height: 0 Interlayer height: >0 Interlayer height: <0 Bottom layers A bottom layer is an interlayer between the pallet and the first product layer. The bottom height has the same height as the interlayers.
  • Page 66: Offset Height (Product Dropping Height)

    3 Pattern generation 3.7.2 Offset height (product dropping height) The offset describes an offset of all product positions in z-direction. This offset describes the distance of the product bottom to the top of the lower layer. The offset is needed to prevent products on higher layers from squashing the products of the lower layers.
  • Page 67: Interlayer Frame

    3 Pattern generation Figure 3-34: Pallet frame OCS frame Pallet offset frame • • No pallet offset frame used Pallet offset frame used • • OCS used OCS not used • • Frame calculation by TO Frame calculation by Kinematics pattern generator The displayed product positions on the HMI in the pack list is always displayed inside the pallet coordinate system without the frame transformation.
  • Page 68: Save And Load Palletizing Data

    3 Pattern generation Save and load palletizing data 3.8.1 Overview Concept You can use the program manager to save and load the palletizing data into or from a csv-file. The faceplate works with visual basic scripts and saves these data as csv-files. A csv-file contains the data for one pattern.
  • Page 69: Operation

    3 Pattern generation Save and load function is not supported for WinCC Unified with LPallPatt V3.1. Note Memory locations The memory locations of the csv-files are predefined and not changeable. The folder ‘PalletizingData‘ will be created automatically after the first save or copy program command.
  • Page 70 3 Pattern generation Figure 3-37: Save and load palletizing data The palletizing data can be changed in external editors. After loading of the changed csv-file, the palletizing data could be corrupted. CAUTION External changed programs should be tested carefully. LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 71: Application Example

    4 Application example Application example Example project Structure The TIA example project consists of two different PLC and HMI projects. Both solutions manage the control of the kinematics and the communication between the motion program and the palletize pattern generator. 1.
  • Page 72 4 Application example Figure 4-1: Example overview Scenario 1 Point definition and kinematic movements The point definitions for the movement pick and place cycle of the products are shown in the next figure. Table 4-1 Pick and place points Point Description PickProduct Product pick position, which can be calculated by the product dimension...
  • Page 73 4 Application example The ‘Palletizing’ point is always updated by triggering the input ‘GetNextPoint’ of ‘LPallPatt_PalletizingControl’ FB. The movement between the ‘Palletizing’ points are executed with linear movements. Blending is defined as well. Figure 4-2: Points and kinematics movements in the example project Palletizing Palletizing Palletizing...
  • Page 74: Coordinate System Definition

    4 Application example Coordinate system definition The pallet coordinates is defined in an object coordinate system. The object coordinate system configuration for the pallet is mandatory because all product positions are calculated in the pallet coordinate system. The object coordinate system frame is configured in the TO_Kinematics as OCS1. A pallet offset frame configuration on HMI is not required (3.7.3).
  • Page 75: Solution 1: Palletizing With Lkinctrl

    4 Application example Solution 1: Palletizing with LKinCtrl This solution describes the programming of the kinematics movement via the FB “PalletizingProgram” in TIA Portal. The use case scenario is stored in the corresponding folder “Scenario 1: Palletizing”. The scenario consists of a separate OB which calls the scenarios FB implementing the functionality.
  • Page 76 4 Application example Table 4-3: Path data commands Command Command Description number name Moves the TCP to the static point “abovePickPointProduct” from Above pick DB “PickPlacePoints” via sPTP-movement. Pick Moves the TCP to a static point, which can be teached. Activates the gripper (vacuum).
  • Page 77: Control Of Example Project Via Hmi

    4 Application example Table 4-4: Set flags for PathData Flag definition in DB Flag constant „Controls“.setFlags[1] FLAG_GRIPPER_CONTROL TRUE: Gripper vacuum is activated FALSE: Gripper vacuum is deactivated „Controls“.setFlags[2] FLAG_PALLET_COMPLETELY_PACKED FALSE: The last product has been placed on the pallet. The pallet can be moved by the belt.
  • Page 78 4 Application example The example project has HMI controls which are separated into three parts: 1. Pattern generation: This button loads the pattern generation HMI of “LPallPatt”. The product point lists can be created like described in chapter 2. The axis can be enabled, reset and homed. 3.
  • Page 79 4 Application example Figure 4-8: Set pallet and product data 3. Optionally: Set the interlayer height. Figure 4-9: Set interlayer height 4. Configure all pattern generator settings regarding the desired pattern. 5. Generate the pattern by pressing the button “Generate pattern”. Result: The SIMATIC PLC creates the pattern and sends the positions and result data to the HMI.
  • Page 80 4 Application example Figure 4-10: Set generator gap settings Figure 4-11: Set generator pattern settings and generate pattern Check the pattern results in the “edit layer” tab. 6. Press the arrows to display the pattern for the other layers in the pattern visualization.
  • Page 81 4 Application example Figure 4-12: Check results 7. Optionally: Change product positions manually or with the help of the align functionality. The edited product positions are displayed in the pattern visualization. Figure 4-13: Post-edit positions manually Result: The product position list is now defined, and the positions can be used in the FB “PalletizingProgram”.
  • Page 82 4 Application example Enable and home the axes 1. Press the button “Enable axes”. Result: All kinematics axes are enabled. The LED “Enabled” is green. 2. Home the kinematics axis. In the example project all kinematics axes are homed with homing mode 0. All actual positions of the simulated axes are set to DB “Control.HomePos”.
  • Page 83: Solution 2: Palletizing With Simatic Kinematics Integrator (Ski - "Ready-To-Use")

    This solution describes the programming of the kinematics via HMI. The programming can be directly executed on a mobile panel. The palletizing data are provided via the ‘LPallPatt_PalletizingControl’ FB. SKI information can be found under the following link. https://support.industry.siemens.com/cs/cy/en/view/109802248 Table 4-5: Solution 2 – Supported HMIs HMI Type Support...
  • Page 84: Function Of 'Lpallpatt_Palletizingcontrol' Fb Overview

    4 Application example Function of ‘LPallPatt_PalletizingControl’ FB Overview 4.5.1 The FB ‘LPallPatt_PalletizingControl’ provides the next palletizing point position at the output ‘palletizingPoint’. The point can be a position on the approach or retract routines or a place position on the pallet. The type of point is defined by the output ‘pointType’: •...
  • Page 85: Configuring The Conditions, Variables And The Palletizing Point In Ski

    4 Application example • Return additional data • Number of products on pallet • Product Counter • Total number of layers • Layer counter • Remaining number of products on layer • Process progress 4.5.2 Configuring the conditions, variables and the palletizing point in SKI Conditions and variables The user has to define the following conditions in the SKI configuration: •...
  • Page 86 4 Application example Figure 4-17 Conditions and Variables in SKI V2.0 (TIA V17) Check in which array indices the conditions and variables are saved in the ‘conditionNames’ / ‘variableNames’ array in the ‘LSKI_GlobalProjectData. configuration’. Connect the SKI conditions and variables to the ‘LPallPatt_PalletizingControl’ FB. An example is shown in the following figure.
  • Page 87 4 Application example Figure 4-18 LPallPatt_PalletizingControl interface connected to SKI conditions and variables Palletizing point The user has to define the palletizing point, e.g. ‘Palletizing’, in the point table. Set the coordinate system to the OCS of the pallet and if applicable set the link constellation.
  • Page 88: Programming Of Palletizing Sequence With Ski Program Editor

    4 Application example 4.5.3 Programming of palletizing sequence with SKI program editor In the example project there is an SKI program provided which handles the palletizing. The program consists of 3 main parts: 1. Picking a product 2. Picking an interlayer 3.
  • Page 89 4 Application example Figure 4-21: SKI program structure Start Get next Palletizing Point DECIDE NEXT PICK 11 | 12 PointType? PALLET IS PACKED 1 | 2 PICK LAYER SHEET PICK PRODUCT Get next Palletizing Point PointType? PointType? APPROACH TO PALLET Get next Palletizing Point 2 | 12 PointType?
  • Page 90 4 Application example The final program in the SKI program editor can be seen in the following figures: Figure 4-22: Program slot 1 - Decide between picking a product or a layer sheet Figure 4-23: Program slot 2 - Pick product sequence LPallPatt Entry-ID: 109800960, V3.1,...
  • Page 91 4 Application example Figure 4-24: Program slot 3 – Pick layer sheet sequence LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 92 4 Application example Figure 4-25: Program slot 4 – Palletizing: Approach, place and retract sequence (Commands 0-21) LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 93: Start Palletizing Program

    4 Application example Figure 4-26: Program slot 4 – Palletizing: Approach, place and retract sequence (Commands 22-33) Figure 4-27: Program slot 5 – Pallet is fully packed 4.5.4 Start palletizing program 1. Home all axes via manual control. 2. Set the condition ‘EnablePalletizingControl’ to TRUE in the configuration. 3.
  • Page 94 4 Application example Figure 4-28: Manual Control Figure 4-29: Configuration - Conditions LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 95 4 Application example Figure 4-30: Configuration - Variables Figure 4-31: Home Screen SKI While the program is stopped, the pattern can be changed like described in chapter 3. The pattern generator faceplate can be found on the second page of the navigation by clicking in the arrow at the bottom right corner of the screen.
  • Page 96 4 Application example Figure 4-32: Pattern Generator screen in SKI LPallPatt Entry-ID: 109800960, V3.1, 01/2024...
  • Page 97: Appendix

    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.
  • Page 98: Industry Mall

    5 Appendix Industry Mall The Siemens Industry Mall is the platform on which the entire siemens Industry product portfolio is accessible. From the selection of products to the order and the delivery tracking, the Industry Mall enables the complete purchasing processing –...
  • Page 99: Change Documentation

    5 Appendix Change documentation Table 5-2 Version Date Modifications V1.0 09/2021 First version V1.0.1 01/2022 Error ID 16#8040 added Update to V2.0 – Description of new features V2.0.0 12/2022 V2.0.1 01/2023 Added interface content for SKI/SKO V3.0.0 06/2023 Update to V3.0 Update to V3.1 –...

Table of Contents