Siemens SIMATIC S7-1500T Getting Started

Kinematics
Hide thumbs Also See for SIMATIC S7-1500T:

Advertisement

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S7-1500T

  • Page 3: Warranty And Liability

    Warranty and liability ___________________ Preface ___________________ SIMATIC Description ___________________ ___________________ Preparing the project S7-1500 S7-1500T Getting Started with Adding and configuring Kinematics technology objects Adding PLC tags and data types Getting Started Add a global data block for HMI tags Create program for manual mode ___________________...
  • Page 4 Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
  • Page 5: Table Of Contents

    Table of contents Warranty and liability ..........................5 Security information ........................6 Preface ..............................7 Description .............................. 8 Requirements ..........................8 Function scope .......................... 8 Task ............................9 User program .......................... 10 Coordinate systems and positions ..................14 Program blocks ........................15 PLC tags ..........................
  • Page 6 Table of contents Main organization block Main [OB1] ...................... 54 Testing the user program ........................59 11.1 Preparing the watch table and the kinematics trace .............. 59 11.2 Perform test ..........................61 S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 7: Warranty And Liability

    We reserve the right to make changes to this Application Example at any time without prior notice. If there are any deviations between the recommendations provided in this Application Example and other Siemens publications – e.g. catalogs – the contents of the other documents have priority.
  • Page 8: Security Information

    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 customers' exposure to cyber threats.
  • Page 9: Preface

    This documentation is valid for the S7-1500 product range. Additional support information ● The range of technical documentation for the individual SIMATIC products and systems is available on the Internet (http://support.industry.siemens.com/cs/ww/en/view/109742705). ● The online catalog and online ordering system are available on the Internet (http://mall.industry.siemens.com/).
  • Page 10: Description

    As an alternative to simulation via the SIMATIC S7 PLCSIM, you can perform the Getting Started using a real controller SIMATIC S7-1500T (as of firmware version 2.5). It may be necessary to adjust the application cycle of the "MC_Servo" organization block.
  • Page 11: Task

    Description 3.3 Task Task Different products are transported on a conveyor belt and are to be distributed onto two different product pallets by a cylindrical robot. The products first reach the pickup position over a chute at the end of the conveyor belt. At the pickup position, the products are picked up by the robot and transported to the respective pallet.
  • Page 12: User Program

    Description 3.4 User program User program Overview A user program with the following operating modes is implemented for the described task: ● No-load operation (machine in idle state) ● Manual mode ● Automatic mode ● Fault The user program executes all sequences of the task in automatic mode. The products are picked up individually in automatic mode and transported to the parking position.
  • Page 13 Description 3.4 User program Manual mode Before you start automatic mode, make all the necessary settings in manual mode. ● Enable connected axes ● Define home position and home interconnected axes ● Define the coordinates of the defined positions ● Move the kinematics to the waiting position (= start position for automatic mode). In manual mode, you can also move the kinematics to the defined positions using individual motion instructions or change the coordinates.
  • Page 14 Description 3.4 User program The product is parked when the parking position is reached. The kinematics then executes a motion to the waiting position. S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 15 Description 3.4 User program Motion instructions used The following instructions are used for the respective moves: Motion Instructions Start Destination Waiting position Pickup position prod- "MC_MoveLinearAbsolute" to pickup uct type 1 / product type 2 position Product type 1 / Product type 2 Pickup position with offset Parking position on pallet 1 1.
  • Page 16: Coordinate Systems And Positions

    Description 3.5 Coordinate systems and positions Coordinate systems and positions Kinematics and object coordinates The values for the kinematics and object coordinates are entered in the Configuration of the kinematics technology object (Page 23). OCS1 OCS2 OCS3 (Kinematics) (Pallet 1) (Pallet 2) (Pickup position at the chute)
  • Page 17: Program Blocks

    Description 3.6 Program blocks Program blocks Function blocks Function block Function Instance data block "CtrlSingleAxis" Control of axes (ena- "InstAxisA1" ble/disable, reset, homing) "InstAxisA2" "InstAxisA3" "ModeManual" Manual mode "InstModeManual" "ModeAutomatic" Automatic mode "InstModeAutomatic" "CtrlGripper" Gripper control (opening, "InstGripper" closing) Functions Function block Function Application...
  • Page 18: Plc Tags

    Description 3.7 PLC tags PLC tags User constants Define the following global user constants under PLC tags: Name Data type Description OPERATING_MODE_AUTO UInt Automatic mode OPERATING_MODE_MANU UInt Manual mode OPERATING_MODE_IDLE UInt No-load operating mode OPERATING_MODE_ERRO UInt Fault operating mode DInt Specification of the respective reference system of the specified target position and target orienta- OCS1...
  • Page 19 Description 3.8 PLC data types typeExecute Name Data type Description waitingPos Bool Move to waiting position pickupPos Bool Move to pickup position destination1Pos Bool Move to the parking position for product type 1 destination2Pos Bool Move to the parking position for product type 2 transition1Pos Bool Move to the transition position 1...
  • Page 20 Description 3.8 PLC data types typeUserInterface Name Data type Description waitingPosOffset "typePosition" Offset for the waiting position product1Offset "typePosition" Offset for products of product type 1 product2Offset "typePosition" Offset for products of product type 2 transitionPos1 "typePosition" Transition position 1 between conveyor belt and parking position 1 transitionPos2 "typePosition"...
  • Page 21 Description 3.8 PLC data types S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 22: Preparing The Project

    Preparing the project Adding a controller To edit the example from the Getting Started, create a SIMATIC S7-1500T controller (as of firmware version 2.5) in the project. S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 23: Adding And Configuring Technology Objects

    Adding and configuring technology objects Adding a kinematics technology object Requirement To connect the kinematics, create the following positioning axes: Name Axis type Modulo AxisA1 Virtual axis, Enable modulo • Rotary Modulo start value: -180° • Modulo length: 360° • AxisA2 Virtual axis, –...
  • Page 24 Adding and configuring technology objects 5.1 Adding a kinematics technology object Procedure To add a kinematics technology object, follow these steps: 1. Open the CPU's folder in the project navigator. 2. Open the "Technology Objects" folder. 3. Double-click "Add new object". The "Add new object"...
  • Page 25: Configuring The Kinematics Technology Object

    Adding and configuring technology objects 5.2 Configuring the kinematics technology object Configuring the kinematics technology object Basic parameters Configure the basic properties of the kinematics technology object in the "Basic Parameters" configuration window. 1. Select the Kinematics type "Cylindrical robot 3D" from the drop-down list. 2.
  • Page 26 Adding and configuring technology objects 5.2 Configuring the kinematics technology object Kinematics coordinate system In the "Kinematics coordinate system" configuration window, configure the KCS frame and therefore the position of the kinematics coordinate system (KCS) in the world coordinate system (WCS). Enter the values for the position of the kinematic coordinate system (Page 14).
  • Page 27: Adding Plc Tags And Data Types

    Adding PLC tags and data types Add user constants Insert all required user constants in the default tag table. A list can be found in the section PLC tags (Page 16). Adding data types 1. Add all required data types: –...
  • Page 28: Add A Global Data Block For Hmi Tags

    Add a global data block for HMI tags For the user interface parameters, add a new data block with the name "HMI" of the type "typeUserInterface". The data block "HMI" is created based on the PLC data type "typeUserInterface" (Page 16). S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 29: Create Program For Manual Mode

    Create program for manual mode Prepare function block Prepare program block 1. Add the function block "ModeManual" (LAD). 2. Add the instance data block "InstManual". Parameters in the function block "ModeManual" Create the following parameters in the "ModeManual" function block. Name Data type Default value...
  • Page 30: Move Kinematics To Defined Position

    Create program for manual mode 8.2 Move kinematics to defined position Move kinematics to defined position Requirements The following requirements apply to executing the program in manual mode: ● All interconnected axes are switched on and homed. ● At the time of calling a motion instruction in manual mode: –...
  • Page 31 Create program for manual mode 8.2 Move kinematics to defined position Start motion instruction 1. The motion instructions are started individually in manual mode. For each component of "hmi.executeMoveTo", insert a normally open contact in parallel. 2. The respective target coordinate ("tempTargetPos.position") and the respective reference system ("tempCoordSystem") are transferred to the motion instruction via the instruction "Move value"...
  • Page 32 Create program for manual mode 8.2 Move kinematics to defined position 3. In manual mode, the kinematics is positioned exclusively with a linear motion. Insert a motion control instruction "MC_MoveLinearAbsolute". 4. To use the completed job signal to display the reached position, assign the tag "tempDone"...
  • Page 33 Create program for manual mode 8.2 Move kinematics to defined position Display of the position reached 1. Insert a new network. 2. Insert an NO contact for the tag "tempDone". 3. Insert all components of the parameter "hmi.executeMoveTo" in parallel. 4.
  • Page 34 Create program for manual mode 8.2 Move kinematics to defined position Interrupt / continue motion execution 1. Insert a new network. 2. To interrupt a motion execution, insert the motion control instruction "MC_GroupInterrupt". 3. To continue a motion execution, insert the motion control instruction "MC_GroupContinue".
  • Page 35 Create program for manual mode 8.2 Move kinematics to defined position Evaluating errors 1. Insert a new network. 2. Insert NO contacts for all "Error" parameters of the motion control instructions from the function block "ModeManual" in parallel. 3. As long as the signal state of all "Error" parameters is "0" (no error), manual mode is active and the parameter "hmi.operatingMode"...
  • Page 36: Controlling The Axes

    Create program for manual mode 8.3 Controlling the axes Controlling the axes Creating blocks 1. Add a new function block with the name "CtrlSingleAxis" (SCL). 2. Add the following instance data blocks: – "InstAxisA1" – "InstAxisA2" – "InstAxisA3" Parameters in the CtrlSingleAxis function block Create the following parameters in the "CtrlSingleAxis"...
  • Page 37 Create program for manual mode 8.3 Controlling the axes Procedure 1. Add the parameters for controlling the axes. 2. Summarize all parameters for error output of the axis control instructions in the "summaryError" parameter. 3. Assign the corresponding tags from the technology data block to the following output parameters: –...
  • Page 38: Control Of Gripper

    Create program for manual mode 8.4 Control of gripper Control of gripper Creating blocks 1. Add the function block "CtrlGripper" (LAD). 2. Add the instance data block "InstGripper". Parameters in the function block "CtrlGripper" Create the following parameters in the "CtrlGripper" function block. Name Data type Default...
  • Page 39 Create program for manual mode 8.4 Control of gripper Procedure 1. For edge detection of the signal at the "close" input, add the following instructions in network 1: – Query positive signal edge with edge bit memory "statClosePos" – Query negative signal edge with edge bit memory "statCloseNeg" 2.
  • Page 40: Create A Program For Automatic Mode

    Create a program for automatic mode Prepare function block Adding blocks 1. Add a new function block with the name "ModeAutomatic" (SCL). 2. Add a new instance data block with the name "InstAutomatic". Parameters in the function block "ModeAutomatic" Create the following parameters in the "ModeAutomatic" function block. Name Data type Default...
  • Page 41 Create a program for automatic mode 9.1 Prepare function block Name Data type Default Comment value statWatchdog TON_TIME – Monitoring of automatic mode statWatchExpired Bool False Output signal change after wait time elapses statHoldTime TON_TIME – Wait time at the waiting position Temp tempErrorSummary Bool...
  • Page 42: Querying Preconditions

    Create a program for automatic mode 9.2 Querying preconditions Querying preconditions After calling the automatic mode, the program first checks all preconditions for further processing. System status To query the status of the axis and the drive, use the structure components of the formal parameter "hmi.systemChecks".
  • Page 43 Create a program for automatic mode 9.2 Querying preconditions Kinematics starting position The kinematics starting position at the beginning of the automatic mode is the defined waiting position ("hmi.waitingPosOffset"). Therefore, the program must check at the start of automatic mode whether the position of the kinematics corresponds to the default waiting position.
  • Page 44 Create a program for automatic mode 9.2 Querying preconditions Status of the job sequence To ensure that there is sufficient space in the job sequence for the subsequent motion instructions, add the following queries to the job sequence: ● Is the job sequence designed for the required number of jobs? ●...
  • Page 45: Product Type Query

    Create a program for automatic mode 9.3 Product type query Product type query When all preconditions are met and all Execute parameters are reset, the program queries the required product information. To do this, use a CASE instruction (multiple branches) in which you query whether a new product exists and what type of product it is.
  • Page 46 Create a program for automatic mode 9.4 Program section product type 1 Pick up the product and transport it to the pallet 1. The kinematics moves to the pickup position to pick up the product. Insert the linear motion instruction ("statInstMoveToPickupPos") and enter the following parameters: –...
  • Page 47 Create a program for automatic mode 9.4 Program section product type 1 5. Insert the calculation for the coordinates (x, y, z) of the auxiliary point of the circular path: 6. Insert the circular motion instruction ("statInstMoveToTransitionCirc") and enter the following parameters: –...
  • Page 48 Create a program for automatic mode 9.4 Program section product type 1 8. The kinematics moves with a circular motion to the parking position on pallet 1. To calculate the auxiliary point of the circular path, add the function "DistanceXYHalf" and assign the actual parameters for the length calculation.
  • Page 49 Create a program for automatic mode 9.4 Program section product type 1 Return to the waiting position 1. To pick up a new product, the kinematics first moves back to the waiting position. For this purpose, add the same three motion instructions but in reverse order. –...
  • Page 50 Create a program for automatic mode 9.4 Program section product type 1 – Circular motion to the waiting position 2. To observe the status of the tag "hmi.posState.waitingPos", use the instruction "Start time as ON time" ("statHoldTime"). 3. At the end of the program section, assign the value "#STATE_CHECK" to the tag "statStateAuto".
  • Page 51: Program Section Product Type 2

    Create a program for automatic mode 9.5 Program section product type 2 Program section product type 2 Preconditions To run the program section for product type 2, the result of the product type query must be "2" and the tag "#statStateAuto" must have the value "#STATE_PRODUCT_2_DELIVER". Insert the query of the tag "#statStateAuto".
  • Page 52 Create a program for automatic mode 9.5 Program section product type 2 Pick up the product and transport it to the pallet 1. The kinematics moves to the pickup position to pick up the product. Insert the linear motion instruction ("statInstMoveToPickupPos") and enter the following parameters: –...
  • Page 53 Create a program for automatic mode 9.5 Program section product type 2 5. Insert the circular motion instruction ("statInstMoveToTransitionCirc") and enter the following parameters: – To start the motion job, assign the tag "statMovDest2". – Assign the previously calculated circular path auxiliary position using the tag "tempAuxPosition.auxPosition".
  • Page 54 Create a program for automatic mode 9.5 Program section product type 2 Return to the waiting position 1. The kinematics returns to the pickup position to pick up a new product. To calculate the auxiliary point of the circular path, add the function "DistanceXYHalf" and assign the actual parameters for the length calculation.
  • Page 55: Error Handling In Automatic Mode

    Create a program for automatic mode 9.6 Error handling in automatic mode The program continues with the check of the preconditions for the automatic mode. 5. To observe the status of the tag "hmi.posState.waitingPos", use the instruction "Start time as ON time" ("statHoldTime"). 6.
  • Page 56: Main Organization Block Main [Ob1]

    Main organization block Main [OB1] Overview Integrate the previously created part programs and create the main program in the cycle OB "Main". Structure of main program ● Control of kinematics in manual mode using the function block "CtrlSingleAxis" ● Query of the status for encoder adjustment, communication and drive using the parameters from the data block "HMI"...
  • Page 57 Main organization block Main [OB1] Controlling the axes 1. Insert the function block "CtrlSingleAxis" for controlling the axes. Use a block instance of the function block "CtrlSingleAxis" for each axis to do this. 2. Assign the parameters for controlling enabling, homing and restarting to the respective axis.
  • Page 58 Main organization block Main [OB1] Status of encoder adjustment, communication and drive 1. Create a new network for each status query. 2. The status feedback is output together for all interconnected axes. Therefore, insert the parameters of the axes one after the other on a path. 3.
  • Page 59 Main organization block Main [OB1] Control of kinematics in manual mode 1. Insert the function block "ModeManual". 2. To call the block, set the parameter for selecting manual mode. 3. Assign the parameters for the user interface from the data block "HMI". Controlling the kinematics in automatic mode 1.
  • Page 60 Main organization block Main [OB1] Gripper control (simulation) 1. Insert the function block "CtrlGripper" for controlling the gripper. 2. Assign the parameters for controlling the gripper. S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 61: Testing The User Program

    Testing the user program 11.1 Preparing the watch table and the kinematics trace Overview To test the user program, use the following functionalities in the TIA Portal: ● Kinematics trace ● Watch table Kinematics trace In the kinematics trace, you track the current kinematics motion, record it and then play it back.
  • Page 62 Testing the user program 11.1 Preparing the watch table and the kinematics trace 6. You can use comment lines to better structure the watch table. S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...
  • Page 63: Perform Test

    Testing the user program 11.2 Perform test 11.2 Perform test Preparing the simulation To carry out the test, prepare the simulation as follows: ● Compile the project data and make sure that the compilation process was completed without errors. ● Start the simulation and load the configuration into the CPU. ●...
  • Page 64 Testing the user program 11.2 Perform test Prepare kinematics in manual mode 1. Select manual mode by controlling the tag "HMI.operatingMode" with the value "2". 2. Enable the axes using the tag "HMI.enableAxes". 3. Enter the home position (Page 14) for the interconnected axes. 4.
  • Page 65 Testing the user program 11.2 Perform test Move kinematics in automatic mode 1. You have already performed the described steps 1 to 6 to prepare the kinematics in manual mode. 2. Select automatic mode by modifying the tag "HMI.operatingMode" with the value "3". 3.
  • Page 66 Testing the user program 11.2 Perform test Troubleshooting 1. To acknowledge pending errors to the user program, select the manual mode by modifying the tag "HMI.operatingMode" with the value "2". 2. Acknowledge the error with the tag "HMI.acknowledge". S7-1500T Getting Started with Kinematics Getting Started, 12/2018, A5E46089528-AA...

This manual is also suitable for:

Simatic s7-1500

Table of Contents