Nothing Special   »   [go: up one dir, main page]

Simatic GettingStartedSRIYaskawa DOC V11 en

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

SIMATIC Robot Integrator

for YASKAWA –
Getting Started

SIMATIC S7-1500 / TIA Portal V15.1


Siemens
YASKAWA MotoLogix Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109772216 Support
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
© Siemens AG 2020 All rights reserved

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.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 5
1.1 Overview............................................................................................... 5
1.2 Principle of operation............................................................................ 5
1.3 Aim of this application example ............................................................ 7
1.4 Components used ................................................................................ 7
2 Basics ................................................................................................................. 9
2.1 Structure of an industrial robot ............................................................. 9
2.2 YASKAWA MotoLogix ........................................................................ 10
2.2.1 Overview............................................................................................. 10
2.2.2 YASKAWA MotoLogix block library .................................................... 11
2.2.3 Interpreter on the YASKAWA robot controller .................................... 11
2.3 Configuration of the block library ........................................................ 12
2.3.1 MLX data block structure.................................................................... 12
2.3.2 Calling the blocks ............................................................................... 15
3 Creating a program .......................................................................................... 16
3.1 Hardware configuration ...................................................................... 16
3.1.1 Robot as PROFINET device .............................................................. 16
3.1.2 GSDML file ......................................................................................... 16
3.1.3 Connecting the SIMATIC S7 and the robot ........................................ 25
© Siemens AG 2020 All rights reserved

3.1.4 Controlling multiple robots using a SIMATIC S7 ................................ 26


3.2 Importing function blocks.................................................................... 27
3.3 Basic program structure ..................................................................... 29
3.4 "SiemensYaskawa" block ................................................................... 30
3.4.1 MLxCommunicationRead ................................................................... 31
3.4.2 MLxCommunicationWrite ................................................................... 32
3.4.3 Function blocks for robot movements ................................................ 34
3.5 "YaskawaControl" block ..................................................................... 35
3.5.1 RobotEnable ....................................................................................... 36
3.5.2 MLxStop ............................................................................................. 37
3.5.3 MLxReset ........................................................................................... 37
3.5.4 Override .............................................................................................. 37
3.5.5 Current Cartesian position.................................................................. 39
3.5.6 MLxCopyAxisDataToReal .................................................................. 39
3.5.7 MLxRobotJogAxes ............................................................................. 40
3.5.8 MLxRobotJogTCP .............................................................................. 41
3.5.9 TeachPosition ..................................................................................... 44
3.6 Block "PickPlace" ............................................................................... 45
3.6.1 MLxHold ............................................................................................. 46
3.6.2 MLxRestart ......................................................................................... 47
3.6.3 Define blend behavior ........................................................................ 47
3.6.4 MLxRobotMoveAxisAbsolute ............................................................. 50
3.6.5 MLxRobotMoveLinearAbsolute .......................................................... 51
3.7 Operation ............................................................................................ 54
3.7.1 Status bar and Override ..................................................................... 54
3.7.2 Control functions ................................................................................ 55
3.7.3 Jogging the robot ................................................................................ 56
3.8 Error handling ..................................................................................... 58
3.8.1 HMI only shows rhombuses ............................................................... 58
3.8.2 MotoLogix interface is not initialized .................................................. 59
4 Advanced fundamentals and additional functions ...................................... 60
4.1 Selection of the correct CPU .............................................................. 60

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 3
Table of contents

4.2 Safety Integrated ................................................................................ 60


4.3 Diagnostic messages ......................................................................... 60
5 Appendix .......................................................................................................... 61
5.1 SIMATIC Robot Integrator .................................................................. 61
5.2 Service and support ........................................................................... 62
5.3 Contact partners ................................................................................. 63
5.3.1 YASKAWA .......................................................................................... 63
5.4 Links and literature ............................................................................. 64
5.5 Change documentation ...................................................................... 65
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 4
1 Introduction

1 Introduction
The use of industrial robots continues to grow. They are increasingly being used in
machines and plants. Their standardized mechanics are well-developed and highly
flexible in terms of their movement; as a result, robots are increasingly replacing
expensive specialist mechanics. This also enables production from the first
production batch without expensive modifications to machines and plants.
Unfortunately, plant controllers and robot controllers usually constitute two different
systems. Communication between the two controllers usually occurs solely on the
bit level and the movement programs of the robot are stored on the robot controller
and may only be called up by the plant controller. It is therefore difficult to trigger
flexible robot reactions to specific plant events.
Also, the plant controller and the robot are usually very different in terms of their
programming, which means that it is not possible for one person to control both
systems. Interface and coordination problems are therefore pre-programmed.

1.1 Overview
A complete integration of the actuation and the movement control of the robot into
the machine and plant controller should make the use of the industrial robot in a
production plant easier and more flexible.
The following requirements are imposed on the automation task:
• The robot should be fully programmable via the machine and plant controller
© Siemens AG 2020 All rights reserved

(PLC).
• The robot can be operated via the same HMI of the PLC/machine (Single Point
of Operation).
• Robot diagnostics should be fully possible via the PLC.
• Further functions, such as Safety Integrated, should be integrable and
controllable via the PLC.

1.2 Principle of operation


A YASKAWA industrial robot is to be fully programmed and operated using a
SIMATIC S7-1500 controller. For this purpose, the YASKAWA MotoLogix block
library will be used in the TIA Portal, which provides all the necessary function
blocks. Additional programming of the robot controller is therefore not required.
Communication between the SIMATIC S7-1500 controller and the YASKAWA
industrial robot takes place via a PROFINET connection. All commands and status
information between the SIMATIC controller and the robot are exchanged via this
connection.

Note Via a SIMATIC S7-1500 controller, multiple Yaskawa industrial robots can be
controlled simultaneously in the TIA portal using the YASKAWA MotoLogix block
library.
However, the application example presented here is limited to the coupling of a
robot to a SIMATIC S7-1500.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 5
1 Introduction

Diagram
The following diagram provides a schematic representation of the most important
components of the application example:

Figure 1-1: Schematic overview of the application example

SIMATIC CPU
S7-1500

MotoMINI

YRC1000micro

PROFINET IE

The movement control of the YASKAWA industrial robot is fully programmed in the
SIMATIC controller using the YASKAWA MotoLogix block library. The robot is
assigned to the SIMATIC controller as an I/O device via a PROFINET connection.
© Siemens AG 2020 All rights reserved

The YASKAWA industrial robot consists of the YASKAWA robot controller


YRC1000micro and the robot arm. The Interpreter for the YASKAWA MotoLogix
block library commands is installed on the robot controller. The Interpreter receives
the SIMATIC controller commands and executes them, including the kinematics
transformation, via the robot mechanics.

Benefits
Programming a YASKAWA industrial robot using a SIMATIC S7-1500 controller
with the YASKAWA MotoLogix block library in the TIA Portal offers the following
advantages:
• All of the programming for the robot and the plant is performed in the TIA
Portal. Training in a robot manufacturer-specific development environment is
not necessary.
• The movement program of the robot is fully integrated into the plant control
program and can be archived together with this program.
• The robot cell can be fully integrated into the SIMATIC plant controller.
• The operation of the robot can be integrated into the HMI user interface of the
plant.
• Diagnostic messages of the robot are sent to the SIMATIC controller where
they can be further processed and displayed on the HMI user interface of the
plant.
• Remote access to the SIMATIC controller for service and maintenance is
possible via standard functions and can be extended to the robot.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 6
1 Introduction

1.3 Aim of this application example


The application example provided here is an example of how to use the YASKAWA
MotoLogix block library in the TIA portal; it shows which functions are required to
program and operate a YASKAWA robot using a SIMATIC controller.
The application example is intended to familiarize you with the basic functions of
the YASKAWA MotoLogix block library in the TIA Portal and to serve as a guide for
decision-making and planning your own projects and user programs with a
YASKAWA industrial robot.
The functionality of the blocks from the YASKAWA MotoLogix block library is
demonstrated in the creation of three function blocks in which the following
functions of the robot are programmed:
• Switching on the robot (YaskawaControl)
• Implementation of a simple pick & place movement (PickPlace)
• Moving the robot on a circular path (Circle)

The application example is suitable for programming a basic control of the robot in
the SIMATIC controller.
Based on this application example, a further example can be requested from
Siemens Support, in which the use of a YASKAWA industrial robot with extended
functionality, including the HMI user interface required for this, is shown. For more
information on this topic, refer to chapter 5.1.
© Siemens AG 2020 All rights reserved

A detailed description of the function and application of the YASKAWA MotoLogix


block library can be found in the YASKAWA documentation for the YASKAWA
MotoLogix library, which is contained in chapter 5.4.

Required knowledge
Basic knowledge of the creation of a user program on the SIMATIC S7-1500 in the
TIA Portal or the hardware configuration is not taught in this application example,
but is assumed. In addition, this application example is not an introduction to
robotics. Basic knowledge of the application and the capabilities of an industrial
robot are also required.

1.4 Components used


The application example was created with the following hardware and software
components:

Table 1-1: SIEMENS components


Component Quantity Article number Note
SIMATIC CPU S7-1516F 1 6ES7 516-3FN01-0AB0 Firmware version 2.6
TIA Portal V15.1
STEP 7 Professional 1 6ES7822-1AA05-0YA5
WinCC Comfort 1 6AV2101-0AA05-0AA5

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 7
1 Introduction

Table 1-2: YASKAWA components


Component Quantity Article number Note
YRC1000micro with 1 - Robot controller
firmware 2.31.00
MotoMINI 1 - Robot arm
YASKAWA MotoLogix 1 - Version: 1.2.4
YASKAWA GSD file for 1 - Version: gsdml-v2.3-
YRC1000micro with hms_custom-absprt-
firmware 2.31.00 20170815.xml

This application example consists of the following components:

Table 1-3: Components SRI for YASKAWA – Getting Started


Component File name Note
Documentation 109772216_GettingStartedSRIYaskawa_ This document
DOC_V11_en.pdf
TIA V15.1 Project 109772216_GettingStartedSRIYaskawa_ Example program
PROJ_MLxV125_TIAV15.1.zap15_1
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 8
2 Basics

2 Basics
This chapter is intended to explain basic functions and background information for
the use of a YASKAWA industrial robot in connection with the YASKAWA
MotoLogix block library.

2.1 Structure of an industrial robot


A YASKAWA industrial robot generally consists of the following components.

Figure 2-1: Structure of a YASKAWA industrial robot

2
© Siemens AG 2020 All rights reserved

1 5

Table 2-1: Components of an industrial robot


No. Component Function
1 Manipulator The manipulator represents the actual
robot mechanics, i.e. the kinematics,
which executes the ordered
commands.
2 Teachbox programming handset Settings can be entered and checked
on the robot controller using the
3 Connecting cable Teachbox programming handset. The
robot can also be moved manually and
automatically using the programming
handset.
4 Robot controller The robot controller coordinates the
movements of the robot. The
5 Connection cable/data cable/motor cable calculation of the coordinate
transformation for the robot
movements and the control of the
robot axis motors occur in this
controller.
The robot controller may also contain
the power units for the robot axis
motors.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 9
2 Basics

2.2 YASKAWA MotoLogix


2.2.1 Overview

The graphic below provides an overview of how the YASKAWA MotoLogix block
library works.

Figure 2-2: Functional overview of YASKAWA MotoLogix

Reading the process image

Function blocks of the user program

Reading of robot data

MotoLogix library block

MotoLogix library block

Writing of robot data

Yaskawa MotoLogix (Library)


© Siemens AG 2020 All rights reserved

Function blocks of the user program

Writing of the process image

Fieldbus
SIMATIC Interface
PLC
PROFINET IE

Fieldbus
Interface

Reading of
Yaskawa MotoLogix
(Interpreter) Instructions

Write Path calculation


Command Actions
buffer

Execution of
Instructions

Yaskawa
YRC1000micro robot controller

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 10
2 Basics

YASKAWA MotoLogix options package


The options package for a YASKAWA MotoLogix YASKAWA industrial robot
consists of two parts:
• A block library for programming a YASKAWA industrial robot from a SIMATIC
controller.
• An Interpreter on the robot controller which interprets the commands of the
function blocks from the SIMATIC controller and passes them on to the path
planning of the robot controller.

Program sequence
In Figure 2-2, the robot program, based on the YASKAWA MotoLogix block library,
is embedded in the program sequence of the machine program in the SIMATIC
controller. The following functions of the robot program are executed with each
program cycle:
1. Reading of robot data.
2. Assignment of robot movement via the function blocks of the YASKAWA
MotoLogix block library.
3. Writing of robot data.
The received commands are read and executed in the robot controller.
Subsequently, the SIMATIC PLC is informed whether the command was
successfully completed or led to an error.
© Siemens AG 2020 All rights reserved

2.2.2 YASKAWA MotoLogix block library

The YASKAWA MotoLogix block library provides various blocks for controlling a
YASKAWA industrial robot. The desired functions of the YASKAWA robot can be
controlled by simply calling the corresponding block from the block library.
By calling a function block from the block library, the corresponding commands are
transferred to the YASKAWA robot controller and interpreted there.

2.2.3 Interpreter on the YASKAWA robot controller

The Interpreter on the YASKAWA robot controller accepts the commands of the
function blocks from the YASKAWA MotoLogix block library in the robot controller
and transmits the corresponding commands to the command buffer that is
integrated in the firmware. In this way, successive orders are buffered in the robot
controller. The Interpreter will therefore accept commands even when the previous
command has not yet been completed. Buffered commands are processed by the
robot controller according to the FIFO principle (First In First Out).
Once a motion command has been transmitted, it is stored until it has been
completely executed or the internal buffer has been cleared with the commands
"MLxStop" or “MLxReset” (see chapters 3.5.2 and 3.5.3).

Note Movement commands to the robot are not the only commands transmitted to the
command buffer. Other commands in the command buffer, for instance changing
the active user frame, are likewise executed in the order in which they were
transmitted.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 11
2 Basics

The YASKAWA robot moves in accordance with the motion commands given as
soon as it is switched on. The robot stops a movement in the following cases.

• Emergency stop signal

• Changing the operating mode

• Call of the command "MLxHold" (see chapter 3.6.1)

• Call of the command "MLxStop" (see chapter 3.5.2)

• Call of the command "MLxReset" (see chapter 3.5.3)

• Call of the command "MLxAbort" (see Yaskawa manual – chapter 5.4)

• Hardware fault

Note In the event that the operating mode is changed from Remote to Play during an
active movement, the robot controller switches to the status "Held". After a
change to Remote, movement can be resumed with the block "MLxRestart".

2.3 Configuration of the block library


© Siemens AG 2020 All rights reserved

2.3.1 MLX data block structure

The YASKAWA MotoLogix block library is configured so that the user


himself/herself creates the data block necessary for the communication. The user
can also retrieve it from the YASKAWA TIA project and modify it if necessary. A
suitable PLC data type "MLxData" is available for this. This structure is to be
created once for each robot that is controlled via the SIMATIC controller (also see
chapter 3.1.4). In the following you will find a description of the structure of
"MLxData" PLC data types.

Table 2-2: "MLxData" structure


Name Type Comment
SystemState DInt Actual system status:
0: Initializing
1: EnablingToIdle
2: EnablingToHeld
3: Idle
4: Running
5: Holding
6: Held, 7=Aborting
8: ServosOffAborted
9: StoppingToIdle
10: StoppingToServosOff
11: StoppingToServosOffHeld
12: ServosOffReady
13: ServosOffHeld
14: FatalFault
SystemErrorCode DInt Current error number
The assignment to the
corresponding error message can

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 12
2 Basics

Name Type Comment


be found in the YASKAWA
handbook (See chapter 5.4 \9\)
NumberOfQueuedErrors DInt Number of pending messages
when there are multiple active
error messages. Call the
MlxGetErrorDetail block multiple
times to query each previous error
message.
NumberOfAxes DInt Number of robot axes configured.
NumberOfRobots DInt Number of kinematics configured.
JoggingMode Bool Set in order to move the robot in
one of its jog modes.
MLxControllerInfo "MLxModuleInfo" Properties of the robot controller.
Signals "MLxSignals" Current status information of the
robot controller.
InternalData "MLxxInternalData" Used for internal communication.
Axis Array[0..15] of Axis configuration including
"MLxAxisData" related feedback from the robot
controller.
Robot Array[0..3] of Robot configuration including
"MLxRobotData" related feedback from the robot
controller.
© Siemens AG 2020 All rights reserved

HMIFeedbackConfiguration "MLxHMIFeedback Selection of robot configuration


Configuration" and user-defined or WORLD
JogFrame (see also chapter 3.5.8)
HMIFeedbackData "MLxHMIFeedback Current Selection of JogFrame
Data" and position of TCP.

The structure of the "MLxData" data type contains the configuration of multiple
robots and numerous axes. The following figure illustrates the procedure for using
these structures.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 13
2 Basics

Figure 2-3: Schematic representation of robot configuration assignment

Robot[0]

Robot A

Robot[1]
Linear axis

MLxData[0]
© Siemens AG 2020 All rights reserved

Robot[0]

Robot B

MLxData[1]

YaskawaRobotMLX (DB)

Figure 2-3 schematically represents the control of two robots via one SIMATIC
controller. In this case, the structure of the "MLxData" data type must be created as
an array with two elements in the interface data block.
In the example pictured, robot A moves on an additional linear axis which is itself
controlled by the robot's controller. The configuration of "Robot [1]" is assigned to
the linear axis.
At the "RobotNumber" input, blocks such as "MLxRobotJogAxes" expect the
selection of the axes which will be controlled. Thus, in order to move robot A in this
example, the value 0 must be given. In order to move the linear axis, the value 1
must be given. In order to move the robot and the linear axis together, blocks with

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 14
2 Basics

the additional term "Base" are called. This means that for a linear travel motion of
the whole kinematic sequence, for instance, the block
"MLxMoveLinAbsoWithBase" is called.
Blocks such as "MLxEnable" have no "RobotNumber" input. If this block is called,
all axes that are configured in "MLxData [n]" are started.
The configuration and its assignments cannot be edited by the user, but are
instead handled independently by the robot controller.

Note Using larger robot controllers like the YRC1000 it is possible to control several
robots via one robot controller. When using the function block library MotoLogix
in this case the second robot is being controlled from the same “MLxData[x]”
data structure as an additional robot. For more information please refer to the
YASKAWA technical support.

2.3.2 Calling the blocks

The blocks in the YASKAWA MotoLogix function block library are signal-controlled,
not edge-controlled. This means that the blocks in the library no not require a rising
edge in order to be called, but rather a constant signal.
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 15
3 Creating a program

3 Creating a program
This section explains how the Example Program for the application example was
set up.
This section explains the following:
• Integration of the robot in the hardware configuration of the TIA Portal project.
• Integration of the YASKAWA MotoLogix block library
• Programming of the robot's basic functions.
• Programming of selected movement sequences of the robot.

3.1 Hardware configuration


3.1.1 Robot as PROFINET device

The YASKAWA robot is integrated into the hardware configuration of the TIA Portal
project as a PROFINET IO device. The robot is integrated via a GSDML file which
contains the hardware description of the robot and the possible data telegrams for
data exchange between the SIMATIC controller and the robot.
When you download the YASKAWA MotoLogix function block library from the
YASKAWA website, you will receive a TIA Portal project in which the library is
already embedded. The necessary components for creating this application
© Siemens AG 2020 All rights reserved

example are taken from the YASKAWA project.

3.1.2 GSDML file

After unpacking the YASKAWA TIA project, the necessary GSDML files are
automatically installed and are available for future TIA projects in the hardware
catalog.
In this application example the YASKAWA robot controller YRC1000 micro is used.
The corresponding GSDML file can be found in the folder “INpact PIR” as shown in
Figure 3-1.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 16
3 Creating a program

Figure 3-1 Adding the GSDML file from the hardware catalog – YRC1000 micro
© Siemens AG 2020 All rights reserved

Depending on the hardware and software used for the DX200 and YRC1000 robot
controllers, the following instructions must also be considered when selecting the
correct GSDML.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 17
3 Creating a program

Figure 3-2: Overview GSDML files for specific configuration

Roboter YRC1000
DX200 YRC1000
controller micro

PROFINET
CP1616 (PCI) INPACT (PCIe)
Board

System YAS 2.x.x YAS 3.x.x


(CP1616 v2.6) (CP1616 v2.8)
Software

GSDML GSDML V2.31 GSDML V2.33 GSDML V2.3

Figure 3-3: Version overview

PROFIsafe/
Firmware GSDML
Standard
© Siemens AG 2020 All rights reserved

PROFIsafe
GSDML-V2.31-Yaskawa-
PROFIsafe-CP1616-20150514.xml

GSDML V2.31 Standard (DX200)

Standard GSDML-V2.31-Yaskawa-
(YRC1000) PROFIsafe-CP1616-20160530.xml

GSDML-V2.33-#YASKAWA-
Standard PreConf_YRC1000_CP1616_stan
dard_MLx-20191018-104846.xml

GSDML V2.33
GSDML-V2.33-#YASKAWA-
PROFIsafe PreConf_YRC1000_CP1616_PRO
FIsafe_MLx-20191018-104846.xml

GSDML-V2.3-HMS_CUSTOM-
GSDML V2.3 Standard ABSPRT-20170815.xml

Below you will find the necessary steps for a correct hardware configuration for
every robot controller separately.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 18
3 Creating a program

DX200
The robot controller DX200 can be projected with or without PROFsafe. After
successful installation, the corresponding file can be found in the hardware catalog
under the following path:
„Other field devices“ – „PROFINET IO” – “I/O” – “YASKAWA Electric Corperation” –
“SIMATIC – PC-CP” – “CP1616” – 6GK1 161-6AA02 (Migration)”

Figure 3-4: Add GSDML file from hardware catalog – DX200


© Siemens AG 2020 All rights reserved

Select for project engineering of a DX200 version „GSDML-V2.31-Yaskawa-


PROFIsafe-CP1616-20150514.xml“

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 19
3 Creating a program

Figure 3-5: Selection of DX200


© Siemens AG 2020 All rights reserved

For controlling the robot without PROIFsafe, configure the GSDML file mentioned
above once (Figure 3-6 - 1).
For fail-safe controlling the robot with PROFIsafe, configure the above-mentioned
GSDML file twice for one robot controller. Select the module intended for fail-safe
communication in the device view for one of the two devices (Figure 3-6 - 2). You
The necessary modules for DX200 robot controller can be found in the YASKAWA
PLC manual.
Figure 3-6: Standard and PROFIsafe configuration for DX200

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 20
3 Creating a program

YRC1000
The YRC1000 robot controller can be configured with different PROFINET boards
and, depending on the firmware, with or without PROFIsafe.

For configuration with an INPACT board, the GSDML file shown below is taken
from the hardware catalog.

Figure 3-7: Select GSDMLfile from hardware catalog – YRC1000 - INPACT


© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 21
3 Creating a program

When using a CP1616 Bboard, fail-safe communication via PROFIsafe is not


available for the firmware YAS2.xx

The corresponding file can be found after succesful installation in the hardware
catalogue under following path:
„Other field devices“ – „PROFINET IO” – “I/O” – “YASKAWA Electric Corperation” –
“SIMATIC – PC-CP” – “CP1616” – 6GK1 161-6AA02 (Migration)”

Figure 3-8: Select GSDMLfile from hardware catalog – YRC1000 – CP1616 – YAS 2.xx
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 22
3 Creating a program

To configure an YRC1000 robot controller, select „GSDML-V2.31-Yaskawa-


PROFIsafe-CP1616-20160530.xml

Figure 3-9: Auswahl der YRC1000 mit YAS 2.xx


© Siemens AG 2020 All rights reserved

When using a CP1616 board, fail-safe communication via PROFIsafe is optionally


available for the YAS 3.xx firmware.

The corresponding file can be found after successful installation in the hardware
catalogue under the following path:
„Other field devices“ – „PROFINET IO” – “PLCs & CPs” – “YASKAWA” – “SIMATIC
– PC-CP”.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 23
3 Creating a program

Figure 3-10: Select GSDMLfile from hardware catalog – YRC1000 – CP1616 – YAS 3.xx
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 24
3 Creating a program

For controlling the robot without PROFIsafe configure the file


GSDML „YRC1000_CP1616_standard_MLx“ (Figure 3-11 – 1).
For fail-safe control with PROFIsafe, configure both the GSDMLs mentioned above
for one robot controller „YRC1000_CP1616_ standard _MLx“ and
„YRC1000_CP1616_PROFIsafe_MLx“ (Figure 3-11 – 2).

Figure 3-11: Standard and PROFIsafe configuration for YRC1000 – CP1616 – YAS 3.xx

2
© Siemens AG 2020 All rights reserved

3.1.3 Connecting the SIMATIC S7 and the robot

Finally, the robot controller and the SIMATIC controller must be connected to each
other via a PROFINET connection and suitable address ranges defined. For this
purpose, suitable IP addresses must first be assigned to the individual devices or in
the hardware configuration.
Double-clicking on the robot controller in the hardware configuration allows further
configuration of the components for data exchange with the SIMATIC controller.
The necessary data exchange telegrams with the robot controller are configured in
the configuration so that the data required for controlling the robot by the SIMATIC
controller can be exchanged.
Add the input and output modules as shown in the following figure:

Figure 3-12: Data exchange between SIMATIC controller and YRC1000micro

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 25
3 Creating a program

Figure 3-13: Data telegram for the YRC1000micro

Assign the modules the desired address ranges. Ensure that there are no gaps.

Note Optionally, an HMI device, which can be used to control and monitor the robot
functions, can also be integrated into the hardware configuration.

Figure 3-14: Connection of robot, SIMATIC controller and HMI


© Siemens AG 2020 All rights reserved

Under PLC tags, create a pair of tags of type "MLxxReadPacket" and


"MLxxWritePacket" for each robot and assign them the address range defined in
the hardware configuration (here, 100).

Figure 3-15

3.1.4 Controlling multiple robots using a SIMATIC S7

Using a suitable SIMATIC controller and the YASKAWA MotoLogix block library, it
is possible in theory to control an arbitrary number of YASKAWA robot controllers
independently of one another. There is no limit set by the library.
When creating the interface data block, you can create the "MLxData" structure
once for each one of the robot controllers being controlled. Because the size of
data blocks is limited, however, and the addressing of the interface data blocks is
done in absolute terms, the "MLxData" structure can only be created twice per data
block. Additional robot controllers require additional data blocks to be created.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 26
3 Creating a program

The data are assigned to the corresponding robot controller via the defined
telegram addresses in the IO area of the SIMATIC controller, as defined in the
hardware configuration.
The assignment of the function blocks or the robot functions to the individual robot
controllers in the user program is made via the "MLX" input of the blocks, which
refers to the data array in the data block "YaskawaRobotMLX".

Figure 3-16: Data array for two robots in the YaskawaRobotMLX data block

The primary limiting factor of the SIMATIC controller is its retentive memory. The
greater the number of robot positions which have to be stored, the more retentive
memory is required. However, the retentive memory can be increased by a
corresponding power supply module, whereby even smaller controllers can store
more robot positions and thus control several robots.
Be aware, however, that due to the telegram size for communication between the
robot controller and SIMATIC controller, the input and output addresses can be
© Siemens AG 2020 All rights reserved

read and written by a maximum of four YASKAWA robots.

3.2 Importing function blocks


The YASKAWA MotoLogix block library can be transferred to your user program by
copying it from the YASKAWA TIA project. In order to do this, both the necessary
PLC data types as well as the function and data blocks from the YASKAWA TIA
project must be transferred to your own TIA Portal project.
• First copy all PLC data types with the "MLx" prefix into the "PLC data types"
folder in your project.
• Then copy the "YaskawaMLx" program block folder into the "Program blocks"
folder of your TIA Portal project.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 27
3 Creating a program

Figure 3-17: Function blocks and MotoLogix PLC data types


© Siemens AG 2020 All rights reserved

All the necessary data types and blocks from the YASKAWA MotoLogix block
library are now contained in your TIA Portal project. The functions of the block
library can now be used in your user program.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 28
3 Creating a program

3.3 Basic program structure


The graphic below shows the basic structure of the Example Program for the robot.

Figure 3-18: Schematic representation of the program sequence

MLx
Main Siemens
Communication
Cycle Yaskawa
Read

See
Yaskawa
detailed
Control
graphic

See
PickPlace detailed
graphic

MLx
Communication
Write
© Siemens AG 2020 All rights reserved

The complete robot program is summarized in a function (FC) for better structuring.
In this FC, the blocks necessary for the robot are then called from the YASKAWA
block library, as well as additional function blocks (FB) which contain special
motion programs of the robot.
The function "SiemensYaskawa" has the following structure:
• Reading the robot data via the block "MLxCommunicationRead".
• Execution of the basic functions of the robot via the "YaskawaControl" block.
• Calling a block to execute a simple pick & place movement. This movement is
summarized in the "PickPlace" block.
• Writing of robot data via the block "MLxCommunicationWrite".

Note The function "SiemensYaskawa" serves for better structuring and is to be


understood accordingly as call FC. This means that it contains accesses to
global DBs and therefore cannot be used as a library element.

Note The function block "YaskawaControl" also contains accesses to global DBs of
the YASKAWA MotoLogix library It can therefore only be used in conjunction
with the YASKAWA MotoLogix block library as a library element.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 29
3 Creating a program

3.4 "SiemensYaskawa" block


Create a new block in the program blocks area by right-clicking.

Figure 3-19: Adding a new block


© Siemens AG 2020 All rights reserved

Select "Function", assign a name and determine the desired programming


language.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 30
3 Creating a program

Figure 3-20: Creating a new function


© Siemens AG 2020 All rights reserved

Open the newly created function and add the blocks "MLxCommunicationRead"
(FB6059) and "MlxCommunicationWrite" (FB6060) from the YASKAWA MotoLogix
library.

3.4.1 MLxCommunicationRead

The YASKAWA MotoLogix block library block "MLxCommunicationRead" (FB6059)


enables reading of data from the robot controller into the internal data storage of
the YASKAWA MotoLogix block library in the SIMATIC controller.
This enables the provision of data from the robot or robot controller to the user
program in the SIMATIC controller for the other blocks from the YASKAWA
MotoLogix library.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 31
3 Creating a program

Figure 3-21: Reading data from the robot

The data are assigned to the corresponding robot connected to the SIMATIC
controller via the "MLX" input, which refers to the array entry belonging to the robot
in the interface data block, and via the "MLX_Input" input, at which the address
range of the configured telegram from the robot controller to the SIMATIC controller
is relayed to the block.
For the "MLX_Input" input, choose the PLC tag that you created during the robot
controller configuration in chapter 3.1.3. Type in the symbolic name.
© Siemens AG 2020 All rights reserved

Note The index of the "AxesGroup" input can then be used to assign the robot to the
program blocks of the robot program in the SIMATIC.

3.4.2 MLxCommunicationWrite

The "MLxCommunicationWrite" (FB6060) block from the YASKAWA MotoLogix


transfers the data from the "YaskawaRobotMLX" data block to the robot defined via
the hardware address once the robot program has been processed in the SIMATIC
controller.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 32
3 Creating a program

Figure 3-22: Writing data to the robot

The inputs of this block are connected according to the function block
“MLxCommunicationRead" from section 3.4.1.
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 33
3 Creating a program

3.4.3 Function blocks for robot movements

Now create the two function blocks "YaskawaControl" and "PickPlace" in the same
way as with "SiemensYaskawa".

Figure 3-23: Adding the function blocks


© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 34
3 Creating a program

3.5 "YaskawaControl" block


The "YaskawaControl" function block contains basic functions of the robot.

Table 3-1: "YaskawaControl" function overview


Functionality Block
Switching on the robot drives RobotEnable (FB8506)
Abort active commands MLxStop (FB6052)
Acknowledge error MLxReset (FB6014)
Control/query override MLxSetGlobalParameters (FB6057)
Read current Cartesian position YaskawaRobotMLX (DB7003)
Read current axis position MLxCopyAxisDataToReal (FC6003)
Move the robot in jog mode by axes or MLxRobotJogAxes (FB6024)
Cartesian MLxRobotJogTCP (FB6026)
Teach position TeachPosition (FB8501)

The function blocks are called as shown below:

Figure 3-24: "YaskawaControl" function calls


© Siemens AG 2020 All rights reserved

Yaskawa
Control

Robot
Enable

MLxReset

MLxSet
Global
Parameters

MLxCopy
AxisData
ToReal

MLxRobot
JogAxes

MLxRobot
JogTCP

Teach
Position

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 35
3 Creating a program

3.5.1 RobotEnable

In the "RobotEnable" function block, the blocks for carrying out the startup and
shutdown sequence for clean activation/deactivation of the robot drives are called.
The following figure shows the sequence of function block calls for startup and
shutdown.

Figure 3-25: Startup and shutdown sequence

Command: Power On Command: Power Off

Set Reset Reset Set

MLxEnable MLxStop MLxEnable MLxStop


Set
Reset
Timer

MLxAbort MLxAbort
© Siemens AG 2020 All rights reserved

Status: Powered On Status: Powered Off

For switching on the drives the block "MLxEnable" is called.

Figure 3-26: Switching on robot drives

The calls of the "MLxStop" and "MLxAbort" blocks are simultaneously reset. The
calls of these blocks are necessary for the shutdown sequence.
For shutdown, the "MLxEnable" block call is first reset, and the function block
"MLxStop" is called at the same time. This stops active commands and empties the
command buffer (see also chapter 3.5.2). After this block has reported the
successful completion of its function at the output MlxStop.Sts_DN, the block
"MLxAbort" is called after a time delay. This switches off the drives.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 36
3 Creating a program

Figure 3-27: Switching off robot drives

The time delay is necessary because the robot controller is not immediately ready
to receive new commands after the "MLxStop" block is executed. Immediate call of
the "MLxAbort" block leads to undesired behavior during shutdown as well as
subsequent startup processes.

3.5.2 MLxStop

The "MLxStop" block (FB6052) stops the active axis movements of all configured
axes and clears all commands in the command buffer.

Figure 3-28: Stopping active axis movements and clearing command buffer
© Siemens AG 2020 All rights reserved

3.5.3 MLxReset

With the help of the function block "MLxReset" (FB6014), the current error status of
a robot can be acknowledged. When this function block is executed, the command
buffer is also emptied.

Figure 3-29: Acknowledging error messages of the robot

3.5.4 Override

The override can be used to change the nominal setpoint speed of a motion
command that is currently active.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 37
3 Creating a program

The following example is provided to explain this concept in more detail.


Figure 3-30 shows the maximum speed and programmed speed, as well as the
speed with override, represented in percent of the maximum speed.

Figure 3-30: 50% override at 50% programmed velocity

Max. velocity

Programmed velocity
Override: 50%
Resulting velocity

Velocity
25% 50% 100%

If a travel command is defined at half the maximum possible velocity, the override
refers to this value. An override of 50% would therefore set the velocity of the robot
to a quarter of the maximum possible velocity.
The function block "MLxSetGlobalParameters" is used to control the override.

Figure 3-31: Defining override


© Siemens AG 2020 All rights reserved

Give the desired value in percent at the "ParameterValue" input. The value can be
between 0 and 150%. A value of higher than 100% increases the speed that
results from the speed defined in the movement command. If the resultant speed is
higher than the maximum possible speed for the robot, it will move at the maximum
possible speed.

In order to ensure that the robot's axial and Cartesian movements in jog mode
have the same speed, for instance, jog speeds resulting from the override are
calculated and then passed when the corresponding jog block is called.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 38
3 Creating a program

Figure 3-32: Jog speeds for axial and and Cartesian movements

The local constants "MAX_JOG_VEL_AXIS" and "MAX_JOG_VEL_BASE" are


used to adjust speeds. If needed, define a new value in percent.

3.5.5 Current Cartesian position

The current Cartesian position can be found in the self-created data block
"YaskawaRobotMLX" under "HMIFeedbackData.CurrentRobotTCPPosition" (see
also chapter 2.3.1).
© Siemens AG 2020 All rights reserved

3.5.6 MLxCopyAxisDataToReal

The function "MLxCopyAxisDataToReal" (FC6003) reads out the axis positions of a


defined robot configuration.

Figure 3-33: Readout of the current axis position

The storage location of the robot configuration whose axis position is to be read
should be indicated at the "AxisData" input (see also chapter 2.3.1). The current
axis positions are given in an array[0..7] via the InOut "RealOut".

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 39
3 Creating a program

3.5.7 MLxRobotJogAxes

Using the function block "MLxRobotJogAxes" (FB6024), the individual axes of the
robot can be moved in jog mode.

Figure 3-34: Move robot axes individually in jog mode

Via the input "Directions" the robot axes can be rotated in the corresponding
direction. The direction of rotation for each axis is determined in an array[0..7] with
the following values:
• 0: No movement
© Siemens AG 2020 All rights reserved

• 1: Positive direction of rotation


• -1: Negative direction of rotation

The axis assignment can be seen in the following table (see also Figure 3-35).

Table 3-2: Axis assignment for axial movement in jog mode


Directions[n] Robot axis
[0] S
[1] L
[2] U
[3] R
[4] B
[5] T
[6] 7th axis if existing
[7] 8th axis if existing

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 40
3 Creating a program

Figure 3-35: Robot axes

3.5.8 MLxRobotJogTCP

The function block "MLxRobotJogTCP" (FB) can be used to move the Tool Center
© Siemens AG 2020 All rights reserved

Point (TCP), i.e. the tool tip in the Cartesian coordinate system.

Figure 3-36: Move robot with Cartesian jog mode

In the following you will find an overview of selected input signals for this block.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 41
3 Creating a program

Table 3-3
Input Data type Function
Directions Array[0..7] Direction of rotation of the respective
of DINT axis
• 0: No movement
• 1: Positive direction of
rotation
• -1: Negative direction of
rotation
Speed REAL TCP travel speed
UseRotationalSpeed BOOL Unit of the speed parameter
• 0: linear units/s
• 1: Degrees/s
SpeedUnits DINT Absolute or percentage value for
speed
• 0: In percent of maximum speed
• 1: Absolute indication in units/s
CoordFrame DINT Selection of reference frame
• 0: World Frame
• 1: Tool Frame
• 2: User Frame
© Siemens AG 2020 All rights reserved

Directions
Similar to the control of the function block "MLxRobotJogAxes", the respective axes
are controlled via an array[0..7] with the desired directions of rotation.

Table 3-4: Axis assignment for Cartesian movement in jog mode


Directions[n] Robot axis
[0] X
[1] Y
[2] Z
[3] Rx
[4] Ry
[5] Rz
[6] Re
[7] Ignored

When controlling a robot with seven axes, "Re" is used to unambiguously


determine axis positions for spatial positions which can be achieved with multiple
axis positions.
The assignment of further axis numbers is shown in the figure below.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 42
3 Creating a program

Figure 3-37: Cartesian robot position

Speed, UseRotationalSpeed and SpeedUnits


The value defined at the "Speed" input is interpreted differently depending on the
© Siemens AG 2020 All rights reserved

parameterization of the inputs "UseRotationalSpeed" and "SpeedUnits".


Using the "UseRotationalSpeed" input you can define whether the given speed is
to be interpreted as linear path speed (mm/s) or rotational speed of the axes
(degrees/s).
Using the "SpeedUnits" input you can define whether the given speed is to be
interpreted in absolute units or as a percentage.

CoordFrame
The input "CoordFrame" defines which coordinate system the robot will move in
reference to. The following options are available for selection.
• World coordinate system (world frame)
– The world coordinate system is located at the origin point of the robot arm
(see Figure 3-37) and cannot be edited. The active tool is moved,
independently of the active base coordinate system, in the direction of the
world coordinate system axes.
• Active tool coordinate system (tool frame)
– The active tool is moved in the direction of the axes of its own coordinate
system. Thus, for example, movements in the direction of action of the tool
are possible.
• Active, user-defined base coordinate system (user frame)
– The active tool is moved in the direction of the axes of the active, user-
defined base coordinate system. The position and orientation of this
coordinate system can differ from that of the world coordinate system,
depending on the user configuration.

If a jog function is called during an active movement, the active and buffered
commands are aborted, the robot is braked and the drives are switched off with an
error message. The error message must then be acknowledged. When

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 43
3 Creating a program

acknowledging via the "MLxReset" function block (see also chapter 3.5.3), the
drives are automatically restarted but the movement is not resumed.

3.5.9 TeachPosition

The function block "MC_TeachPosition" (FB407) is used to teach in the current


position of the robot.

Figure 3-38: Teaching positions

The position and the current coordinate system to which the Cartesian position
refers are stored in the data block "YaskawaRobotPositions" (DB7003).
© Siemens AG 2020 All rights reserved

Figure 3-39: Storage location of taught positions

The storage location of the data in the position array of the data block is defined in
the "Index".

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 44
3 Creating a program

3.6 Block "PickPlace"


The function block "PickPlace" contains an Example Program in the form of a
simple pick & place application. The robot goes through the following movement
profile with the corresponding intermediate positions:
• Initial position
• Pick position
• Place position
• Initial position

Figure 3-40: Movement sequence of the simple pick & place application

The following table contains the functionalities used for this.

Table 3-5: "PickPlace" function overview


© Siemens AG 2020 All rights reserved

Functionality Function block


Cancel active and buffered commands MLxStop (FB507)
Interrupt active and buffered commands MLxHold (FB504)
Resume active and buffered commands MLxRestart (FB503)
Move robot axes to a defined position MLxRobotMoveAxisAbsolute (FB508)
Move the robot in a linear path to a MLxRobotMoveLinearAbsolute (FB511)
Cartesian position

The positions to be approached are located in the data block


"YaskawaRobotPositions" in the following memory cells:
• YaskawaRobotPositions.Points[1]
• …
• YaskawaRobotPositions.Points[5]

The blocks are called as shown below.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 45
3 Creating a program

Figure 3-41: "PickPlace" program sequence

PickPlace MLxStop

MLxHold

MLxRestart

MLxRobot
Move
Axis
Absolute

MLxRobot
MoveLinear
Absolute
MLxRobot
MoveLinear
Absolute

MLxRobot MLxRobot
© Siemens AG 2020 All rights reserved

MoveLinear MoveLinear
Absolute Absolute

3.6.1 MLxHold

Active commands can be paused using the "MLxHold" function block (FB6010).
The robot controller switches to the "Held" state when this block is called (see also
chapter 2.3.1).

Figure 3-42: Pause active movement

Before new commands can be processed, the block "MLxRestart" must be called in
order to change into the "Running" state.

Note In the "Held" state, commands that are transmitted are not process and are
ignored by the robot controller.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 46
3 Creating a program

3.6.2 MLxRestart

Call the "MLxRestart" block (FB6016) in order to switch back into the "Running"
state and resume paused programs after the "MLxHold" block has been called.

Figure 3-43: Resuming paused movement

Danger for persons and machines


Is an active movement is paused, it will be resumed immediately once the
"MLxRestart" block is called. Therefore, before calling the block, check the
WARNING
robot's immediate area in order to prevent potential collisions with persons or
parts of the plant.
© Siemens AG 2020 All rights reserved

3.6.3 Define blend behavior

The following parameters are used to define how successive motion commands
are to be processed:
• BlendFactor
• BlendType

These parameters are specified at the inputs of each individual motion block. If the
behavior of a path is to be identical for all segments, tags can be created for this
purpose. These are assigned fixed values as shown below.

Figure 3-44: Define blend parameters

When a block is called, these tags are linked at the corresponding inputs.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 47
3 Creating a program

Table 3-6: Parameters for defining the blend operation (see also Figure 3-45)
Parameters Description
BlendFactor Defines the maximum allowable blend
radius
• -1:
Blend radius is calculated by the
robot controller for maximum
dynamics
• 0:
No blends; target point is
approached directly
• 1-8:
Selection of blend radii defined in
robot controller
BlendType Defines from which position the blend path
is calculated
• 0:
Calculation on the basis of the
computed current position
• 1:
Calculation on the basis of the real
current position
© Siemens AG 2020 All rights reserved

Example
Because all transmitted commands are buffered, the curve to be blended only
needs to be defined between the transmitted positions with the help of the
"BlendFactor" parameter. The following sketch shows the differing trajectories for
corresponding parameter definitions.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 48
3 Creating a program

Figure 3-45: Trajectory of the blended linear movements

P2 P3
BlendFactor 0

BlendFactor 1

BlendFactor 8

BlendFactor -1

P1
© Siemens AG 2020 All rights reserved

The blend distances of "BlendFactor" 1 to 8 are defined in the robot controller and
are merely assigned when the block is called. The blend distances are predefined
in the robot controller in millimeters and can be edited in the robot controller if
needed. To do this, please refer to the YASKAWA handbook (chapter 5.4 \9\) or
contact YASKAWA support.

When defining the blend behavior, the blend behavior is defined for the next
segment on the current segment. In Figure 3-45 the blend behavior shown is
defined once the movement command to P2 is called.
For a correct blend, there must be a minimum of three movement commands in the
command buffer. If fewer than three commands are transmitted, unexpected
behavior may result, for example the omission of the blend.

NOTICE Unexpected block behavior


If the last segment of a path is defined with active blending (BlendFactor ≠ 0), the
robot will end its movement when it reaches its target point (as with BlendFactor
0). However, the "Sts_PC" signal (process complete) is already set before the
robot has completed its active movement. When programming step enabling
conditions with the "Sts_PC" signal, be aware that blending for the final segment
of a path must not be activated.

The "BlendType" parameter determines which position data will be taken as the
basis for calculating the blending curve. Here, the robot controller makes a
distinction between a computed (mathematical) position and the real position that is
reported back. The computed position data are used by default. For applications
such as conveyor tracking, the real position data must be used. For more

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 49
3 Creating a program

information, please refer to the YASKAWA handbook (chapter 5.4 \9\) or contact
YASKAWA support.

3.6.4 MLxRobotMoveAxisAbsolute

For the motion sequence of the robot, the function block


"MLxRobotMoveAxisAbsolute (FB6028) is first called to bring the robot arm into a
base position. This movement block moves all axes of the robot to the axis values
defined by the user, or moves the axes as fast as possible into a Cartesian
position. The positions of each individual axis or the matching spatial coordinates
must be given to the block as a position. The "TargetPosition" structure contains
axis position values and spatial position values together.

Figure 3-46: MLxRobotMoveAxisAbsolute


MLxRobotMoveAxisAbsolute

Bool Enable Sts_EN Bool

DInt RobotNumber Sts_DN Bool

"MLxAppDataTeachPoint" TargetPosition Sts_IP Bool

Bool TargetType Sts_AC Bool


© Siemens AG 2020 All rights reserved

DInt BlendFactor Sts_PC Bool

Bool BlendType Sts_ER Bool


Percent
Real Speed Byte
Complete
Real Acceleration

Real Deceleration
MLX
"MLxData" "MLxData"

Table 3-7: Parameters of MLxRobotMoveAxisAbsolute


Name P type Data type Comment
Enable IN Bool Call function block
RobotNumber IN DInt Number of robot configurations to be
controlled (see also chapter 2.3.1).
Valid input values: 0 to
MLX[].NumberOfRobots-1.
TargetPosition IN "MLxAppData Target position.
TeachPoint"
TargetType IN Bool Selection of axis or Cartesian target
definition:
0= axis, 1= Cartesian
Defines which data are used at the
"TargetPosition" input in the
MLxAppDataTeachPoint structure.
BlendFactor IN DInt Defines blending behavior on
subsequent movement (see also
chapter 3.6.1).
Valid input values: 0-8.
BlendType IN Bool Defines blending behavior on

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 50
3 Creating a program

Name P type Data type Comment


subsequent movement (see also
chapter 3.6.1).
Valid input values: 0-1.
Speed IN Real Axis speed in % of maximum speed
Acceleration IN Real Axis acceleration in % of maximum
acceleration
Valid input values: 20 to 100%
Deceleration IN Real Axis braking in % of maximum braking
Valid input values: 20 to 100%
Sts_EN OUT Bool "Enable" bit
Is set as long as the Enable input is set.
Sts_DN OUT Bool "Done" bit
Is set as soon as a command from the
robot controller is accepted and has
been added to the command buffer.
The Enable input must remain set until
this bit is set.
Sts_IP OUT Bool "In process" bit
Is set as long as this command is being
processed. However, a different
command can still control the active
axis movement.
© Siemens AG 2020 All rights reserved

Sts_AC OUT Bool "Active" bit


Is set as long as the axes are in
movement due to this command.
Sts_PC OUT Bool "Process complete" bit
Is set when the movement has been
completed successfully.
Sts_ER OUT Bool "Error" bit
Is set if an error occurs during
execution of the command. For more
detailed information, call the
MLxGetErrorDetail block.
PercentComplete OUT Byte Proportion (in %) of the movement
which has been completed.
MLX IN_OUT "MLxData" Data structure of the robot to be
controlled (see also chapter 2.3.1).

3.6.5 MLxRobotMoveLinearAbsolute

The other positions of the robot are approached linearly using the function block
"MLxRobotMoveLinearAbsolute" (FB6034). The robot controller interpolates a
straight path between the current position and the target position. During such a
movement, the robot always moves its tool along the shortest (but not necessarily
the fastest) path to the target point.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 51
3 Creating a program

Figure 3-47: MLxRobotMoveLinearAbsolute


MLxRobotMoveLinearAbsolute

Bool Enable Sts_EN Bool

DInt RobotNumber Sts_DN Bool

"MLxAppDataTeachPoint" TargetPosition Sts_IP Bool

Bool TargetType Sts_AC Bool

DInt BlendFactor Sts_PC Bool

Bool BlendType Sts_ER Bool


Percent
Real Speed Byte
Complete
UseRotational
Bool
Speed
DInt SpeedUnits

Real Acceleration

Real Deceleration
MLX
"MLxData" "MLxData"

Table 3-8: Parameters of MLxRobotMoveLinearAbsolute


© Siemens AG 2020 All rights reserved

Name P type Data type Comment


Enable IN Bool Start function block.
RobotNumber IN DInt Number of robot configurations to
be controlled (see also chapter
2.3.1).
Valid input values: 0 to
MLX[].NumberOfRobots-1.
TargetPosition IN "MLxAppData Target position.
TeachPoint"
TargetType IN Bool Selection of axis or Cartesian target
definition:
0= axis, 1= Cartesian
Defines which data are used at the
"TargetPosition" input in the
MLxAppDataTeachPoint structure.
BlendFactor IN DInt Defines blending behavior on
subsequent movement (see also
chapter 3.6.1).
Valid input values: 0-8.
BlendType IN Bool Defines blending behavior on
subsequent movement (see also
chapter 3.6.1).
Valid input values: 0-1.
Speed IN Real TCP travel speed
UseRotationalSpeed IN Bool Unit of the speed parameter
• 0: linear units/s
1: Degrees/s
SpeedUnits IN DInt Absolute or percentage value for
speed
• 0: In percent of maximum

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 52
3 Creating a program

Name P type Data type Comment


speed
1: Absolute indication in units/s
Acceleration IN Real Axis acceleration in % of maximum
acceleration
Valid input values: 20 to 100%
Deceleration IN Real Axis braking in % of maximum
braking
Valid input values: 20 to 100%
Sts_EN OUT Bool "Enable" bit
Is set as long as the Enable input is
set.
Sts_DN OUT Bool "Done" bit
Is set as soon as a command from
the robot controller is accepted and
has been added to the command
buffer. The Enable input must
remain set until this bit is set.
Sts_IP OUT Bool "In process" bit
Is set as long as this command is
being processed. However, a
different command can still control
the active axis movement.
Sts_AC OUT Bool "Active" bit
© Siemens AG 2020 All rights reserved

Is set as long as the axes are in


movement due to this command.
Sts_PC OUT Bool Axis acceleration in % of maximum
acceleration
Sts_ER OUT Bool Axis braking in % of maximum
braking
PercentComplete OUT Byte Proportion (in %) of the movement
which has been completed.
MLX IN_OUT "MLxData" Data structure of the robot to be
controlled (see also chapter 2.3.1).

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 53
3 Creating a program

3.7 Operation
When the HMI is loaded or simulated via runtime, the interface shown below
opens.

Figure 3-48: Start screen of the user interface.


1

3 4
© Siemens AG 2020 All rights reserved

The numbered image sections are described individually below.

3.7.1 Status bar and Override

The status bar contains basic information about the status of the robot as well as
the control of the override.

Figure 3-49: Status bar

1 2 3 4

1. "State" collectively indicates whether there is an error at the robot or the


MotoLogix interface.
2. "Power" indicates whether the robot drives are switched on.
3. "Interpreter" displays the current state of the MotoLogix interface (see also
chapter 2.3.1)
4. "Override" shows the currently set value. The buttons on the left and right of
the display control the override.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 54
3 Creating a program

3.7.2 Control functions

The control functions can be used to control administrative functions of the robot.

Figure 3-50: Control functions

4
© Siemens AG 2020 All rights reserved

1. "Power On" switches on the robot.


2. "Power Off" switches off the robot.
3. "Reset" acknowledges all pending error messages. If an error message is
pending, the robot switches off and cannot be switched on again until the error
has been acknowledged.
4. "Abort" aborts all active and buffered commands, such as the example
programs.
5. Starts the offline program "PickPlace" described in chapter 3.6. When the
button is pressed, the entire Example Program is run.

Note After completion of a jog command the robot controller is not immediately ready
again to receive new commands, such as the offline "PickPlace" program. In
order to prevent undesired behavior, for a certain time interval the button will not
be clickable at the start of the offline program following completion of a jog
command. Figure 3-50 shows the button's appearance when it is deactivated.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 55
3 Creating a program

3.7.3 Jogging the robot

The robot can be moved in either an axial or Cartesian manner in jog mode. To do
this, the corresponding tab must be selected by pressing on it as shown below.

Figure 3-51: Axial robot jogging


1

3
© Siemens AG 2020 All rights reserved

1. Press one of the two buttons to switch to the corresponding jog mode. "Jog in
Axis" moves the robot axially. With "Jog in Base", the robot is moved along the
coordinate axes. The inactive mode is grayed out.
2. Use the Plus and Minus buttons to move the corresponding axis (here, L) in
the positive or negative direction.
3. The "TEACH" button saves the current position. The index is defined via "Point
No.". When the operation is completed successfully, "Done" lights up. In the
event of a fault, "Error" lights up.
4. "Axis Overview" shows the assignment of the axis numbers to the actual axes
of the robot arm.

The following illustration shows the view for Cartesian jogging.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 56
3 Creating a program

Figure 3-52: Cartesian robot jogging

The operation is identical to the jogging of the individual axes of the robot.
1. The plus and minus buttons are used to move in a positive or negative
© Siemens AG 2020 All rights reserved

direction along the corresponding Cartesian axis. The parameters RZ, RY and
RX control the rotation around the respective axes.
2. "Axis Overview" shows the coordinate systems of the robot. Movement occurs
in line with the World coordinate system, which is stored in the root of the robot
arm.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 57
3 Creating a program

3.8 Error handling


In the following section, you will find some typical error cases and solutions to
rectify them.

3.8.1 HMI only shows rhombuses

Problem
On the user interface, rhombuses are displayed instead of the robot data.

Solution
The rhombuses indicate that the HMI has no connection to the SIMATIC controller.
If you are using a real panel, check whether the PROFINET connection to the
panel exists. First check the cable connection to your SIMATIC controller. If there is
no error here, terminate the runtime on the panel and open the system settings.
Select "PROFINET" and make sure that the check mark "PROFINET IO enabled"
is set.
If you are using a runtime on your local machine, check that the PG/PC interface is
configured correctly. To do this, select the HMI in the project tree in the TIA portal
Portal and open "Connections".

Figure 3-53: HMI connection


© Siemens AG 2020 All rights reserved

Check the configured access point of the HMI. Now open the Windows Control
Panel and select "Configure PG/PC Interface". In the window that opens, select the
access point in the drop-down menu (here: S7ONLINE) and assign the interface
that is connected to the SIMATIC controller.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 58
3 Creating a program

Figure 3-54: Configuring the PG/PC interface


© Siemens AG 2020 All rights reserved

3.8.2 MotoLogix interface is not initialized

Problem
After a change of IP addresses, the telegram addresses of the GSDML file or the
tag addresses of "MLx_0_Input" and/or "MLx_0_Output", the PROFINET
connection to the robot is still established but the robot cannot be moved. The data
in the "YaskawaMLX" data block are no longer refreshed.

Solution
Carry out a Stop-Start of the PLC in order to re-read the address data to the
"MLxCommunicationRead" and "MLxCommunicationWrite" blocks.
Check whether the telegram address ranges of the in- and output modules
configured in the hardware configuration match the addresses of the PLC tags
"MLx_0_Input" and "MLx_0_Output".

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 59
4 Advanced fundamentals and additional functions

4 Advanced fundamentals and additional


functions
This chapter is intended to give you a brief overview of additional functions that go
beyond the basic control of a YASKAWA industrial robot using the YASKAWA
MotoLogix library. Additionally, you will find the information what needs to be
considered by the selection of the correct CPU.

4.1 Selection of the correct CPU


The SIMATIC Robot Integrator is basically designed for controllers of the SIMATIC
S7-1500 series. The required size of the controller depends above all on the
number of robots used, the respective robot positions and the trajectory paths to be
traversed, as these are stored remanently. Therefore, the retentive memory of the
controller must be large enough for the respective application. However, the
retentive memory can also be increased by a corresponding power supply module,
whereby even smaller controllers can theoretically store more robot positions and
thus control several robots. The number of robots and positions can be set in the
user constants of the PLC data types.
If an additional safety device is to be integrated in the control system, a SIMATIC
S7-1500F controller is required.
© Siemens AG 2020 All rights reserved

4.2 Safety Integrated


The robot controller's hardware configuration contains not only the telegrams for
standard communication but also a telegram for the PROFIsafe communication.
This can be used for controlling YASKAWA-specific safety functions. For further
information on this topic, please contact YASKAWA.

4.3 Diagnostic messages


Via the YASKAWA MotoLogix function block library, the robot controller transmits
alert numbers as well as "Sub codes" which provide more detail on the pending
error. The text messages of the "Sub codes" are transmitted directly as Strings with
their corresponding alarm number as DINT via the "MLxGetErrorDetail" block. To
show these alarms together with the system integrated PLC alarms the alert
numbers must be assigned to text messages using a text list. This text list is not
included in the library's scope of delivery.
In the more extensive application example (see 5.1), there is a corresponding text
list and all error messages are populated in the PLC alerts.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 60
5 Appendix

5 Appendix
5.1 SIMATIC Robot Integrator
In addition to the Getting Started example described here, there is also a more
extensive example, the SIMATIC Robot Integrator. This can be requested from a
local Siemens representative or via a service request with the specification of the
product “SIMATIC Robot Integrator”.
The SIMATIC Robot Integrator is designed so that it can be used directly on a real
machine because of its functionality. The visualization on the SIMATIC panel
accordingly offers significantly more operating options. The following functions, in
addition to others, are included in addition to the functions described in the basic
example:

Table 5-1: Additional functions of the SIMATIC Robot Integrator


Function Description
More detailed diagnostic data The status messages on the user interface
are more detailed.
Individual movements The robot can move to the desired position
via the user interface in either an axial or
Cartesian manner.
Online programming Robot programs can be programmed
© Siemens AG 2020 All rights reserved

directly via the user interface.


Configuration Tool or base coordinate systems can be
viewed and modified via the user interface.
Error messages Error codes are output as text messages on
the user interface using a text list.

Figure 5-1: Start screen of the SIMATIC Robot Integrator YASKAWA

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 61
5 Appendix

5.2 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:
https://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

SITRAIN – Training for Industry


© Siemens AG 2020 All rights reserved

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:
https://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:
https://support.industry.siemens.com/cs/ww/en/sc/2067

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 62
5 Appendix

5.3 Contact partners


Here you can find the contact information for further questions about YASKAWA
industrial robots and the YASKAWA MotoLogix block library, or to request the
necessary YASKAWA documentation.

5.3.1 YASKAWA

YASKAWA Europe GmbH


Robotics
Yaskawastrasse 1
85391 Allershausen, Germany

Sales:
Phone: +49 8166 90 2002
Fax: +49 8166 90 225
Email: tcs-sales@yaskawa.eu.com

Service & Support:


Phone: +49 1805 76 26 83
Fax: +49 8166 90 225
Email: tcs@yaskawa.eu.com

Web:
© Siemens AG 2020 All rights reserved

https://www.yaskawa.eu.com/en/products/robotics/
motoman-robots/

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 63
5 Appendix

5.4 Links and literature


Table 5-2
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to the entry page of the application example with YASKAWA robot
Getting Started YASKAWA
https://support.industry.siemens.com/cs/ww/en/view/109772216
\3\ Link to the article page of the application example with KUKA robot
Getting Started KUKA
https://support.industry.siemens.com/cs/document/109482123
\4\ Link to the article page of the application example with STÄUBLI robot
Getting Started STÄUBLI
https://support.industry.siemens.com/cs/document/109762450
\5\ Link to the article page of the application example with DENSO robot
Getting Started DENSO
https://support.industry.siemens.com/cs/ww/en/view/109761432
Siemens SIMATIC S7
\6\ SIMATIC STEP 7 Basic/Professional V15 and SIMATIC WinCC V15
System manual
© Siemens AG 2020 All rights reserved

Edition: 12/2017
Document ID: Printout of the online help
Order number: -
https://support.industry.siemens.com/cs/document/109755202/simatic-step-7-basic-
professional-v15-1-and-simatic-wincc-v15-1?dti=0&lc=en-WW
\7\ SIMATIC PROFINET system description
System manual
Edition: 03/2012
Document ID: A5E00298287-06
Order number: -
https://support.industry.siemens.com/cs/ww/en/view/19292127/
YASKAWA MotoLogix
\8\ YASKAWA Robotics
https://www.yaskawa.eu.com/en/products/robotics/motoman-robots/
\9\ YASKAWA ROBOTICS
MotoLogix
Common Section
Software and Operation Instructions
Edition: 11/2015
Revision: 02
Order number: -
This documentation comes with the MotoLogix library.
\10\ YASKAWA ROBOTICS
MotoLogix
Siemens TIA Portal s7-1500
PLC Manual
Edition: 05/2018
Revision: 02
Order number: -
This documentation comes with the MotoLogix library.

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 64
5 Appendix

5.5 Change documentation


Table 5-3
Version Date Change
V1.0 04/2020 First edition
V1.1 08/2020 Revision and Updating
© Siemens AG 2020 All rights reserved

S7-1500 / YASKAWA MotoLogix


Entry-ID: 109772216, V1.1, 08/2020 65

You might also like