KST Ethernet KRL 32 en
KST Ethernet KRL 32 en
KST Ethernet KRL 32 en
Issued: 24.10.2019
KST Ethernet KRL 3.2 V1
KUKA Deutschland GmbH
KUKA.Ethernet KRL 3.2
© Copyright 2019
KUKA Deutschland GmbH
Zugspitzstraße 140
D-86165 Augsburg
Germany
This documentation or excerpts therefrom may not be reproduced or disclosed to third parties
without the express permission of KUKA Deutschland GmbH.
Other functions not described in this documentation may be operable in the controller. The user
has no claims to these functions, however, in the case of a replacement or service work.
We have checked the content of this documentation for conformity with the hardware and soft-
ware described. Nevertheless, discrepancies cannot be precluded, for which reason we are not
able to guarantee total conformity. The information in this documentation is checked on a regu-
lar basis, however, and necessary corrections will be incorporated in the subsequent edition.
Subject to technical alterations without an effect on the function.
KIM-PS5-DOC
Translation of the original documentation
Contents
1 Introduction.............................................................................................. 7
1.1 Target group.......................................................................................................... 7
1.2 Industrial robot documentation.............................................................................. 7
1.3 Representation of warnings and notes................................................................. 7
1.4 Terms used............................................................................................................ 8
1.5 Trademarks............................................................................................................ 9
1.6 Licenses................................................................................................................. 9
2 Product description................................................................................. 11
2.1 Product description................................................................................................ 11
2.2 Connection configuration....................................................................................... 11
2.2.1 Transmission protocol............................................................................................ 11
2.2.2 Behavior in the event of a lost connection.......................................................... 11
2.2.3 Monitoring a connection........................................................................................ 12
2.3 Data exchange...................................................................................................... 12
2.4 Saving data............................................................................................................ 13
2.5 Client-server mode................................................................................................ 14
2.6 Protocol types........................................................................................................ 14
2.7 Event messages.................................................................................................... 15
2.8 Error treatment...................................................................................................... 15
2.9 Intended use and misuse...................................................................................... 15
3 Safety......................................................................................................... 17
4 Installation................................................................................................ 19
4.1 System requirements............................................................................................. 19
4.2 Installation via WorkVisual.................................................................................... 19
4.2.1 Installing or updating KUKA.Ethernet KRL 3.2.................................................... 19
4.2.2 Uninstalling KUKA.Ethernet KRL 3.2.................................................................... 20
4.3 Installation via smartHMI....................................................................................... 20
4.3.1 Installing or updating KUKA.Ethernet KRL 3.2.................................................... 20
4.3.2 Uninstalling KUKA.Ethernet KRL 3.2.................................................................... 21
5 Configuration............................................................................................ 23
5.1 Network connection via the KLI of the robot controller....................................... 23
6 Programming............................................................................................ 25
6.1 Configuring an Ethernet connection..................................................................... 25
6.1.1 XML structure for connection properties.............................................................. 25
6.1.2 XML structure for data reception.......................................................................... 29
6.1.3 XML structure for data transmission..................................................................... 31
6.1.4 Configuration according to the XPath schema..................................................... 32
6.2 Functions for data exchange................................................................................ 33
6.2.1 Programming tips.................................................................................................. 34
6.2.2 Initializing and clearing a connection.................................................................... 35
6.2.3 Opening and closing a connection....................................................................... 36
6.2.4 Sending data......................................................................................................... 37
6.2.5 Reading out data................................................................................................... 40
8 Diagnosis.................................................................................................. 61
8.1 Displaying diagnostic data.................................................................................... 61
9 Messages.................................................................................................. 63
9.1 Error protocol (EKI logbook)................................................................................. 63
9.2 Information about the messages.......................................................................... 63
9.3 System messages from module: EthernetKRL (EKI)........................................... 63
9.3.1 EKI00002............................................................................................................... 63
9.3.2 EKI00003............................................................................................................... 65
9.3.3 EKI00006............................................................................................................... 67
9.3.4 EKI00007............................................................................................................... 68
9.3.5 EKI00009............................................................................................................... 69
9.3.6 EKI00010............................................................................................................... 71
9.3.7 EKI00011............................................................................................................... 72
9.3.8 EKI00012............................................................................................................... 74
9.3.9 EKI00013............................................................................................................... 75
9.3.10 EKI00014............................................................................................................... 76
9.3.11 EKI00015............................................................................................................... 80
9.3.12 EKI00016............................................................................................................... 81
9.3.13 EKI00017............................................................................................................... 84
9.3.14 EKI00018............................................................................................................... 88
9.3.15 EKI00019............................................................................................................... 90
9.3.16 EKI00020............................................................................................................... 92
9.3.17 EKI00021............................................................................................................... 96
9.3.18 EKI00022............................................................................................................... 97
9.3.19 EKI00023............................................................................................................... 99
9.3.20 EKI00024............................................................................................................... 100
9.3.21 EKI00027............................................................................................................... 101
9.3.22 EKI00512............................................................................................................... 102
9.3.23 EKI00768............................................................................................................... 104
9.3.24 EKI01024............................................................................................................... 105
9.3.25 EKI01280............................................................................................................... 105
9.3.26 EKI01536............................................................................................................... 109
10 Appendix................................................................................................... 113
10.1 Extended XML structure for connection properties.............................................. 113
10.2 Increasing the memory.......................................................................................... 113
10.3 Deactivating message output and message logging........................................... 114
10.4 Command reference.............................................................................................. 115
10.4.1 Initializing, opening, closing and clearing a connection....................................... 115
10.4.2 Sending data......................................................................................................... 116
10.4.3 Writing data........................................................................................................... 117
10.4.4 Reading data......................................................................................................... 118
10.4.5 Checking a function for errors.............................................................................. 122
10.4.6 Clearing, locking, unlocking and checking a data memory................................. 122
Index 133
Introduction
1 Introduction
Safety
These warnings are provided for safety purposes and must be observed.
DANGER
These warnings mean that it is certain or highly probable that death or
severe injuries will occur, if no precautions are taken.
WARNING
These warnings mean that death or severe injuries may occur, if no
precautions are taken.
CAUTION
These warnings mean that minor injuries may occur, if no precautions
are taken.
NOTICE
These warnings mean that damage to property may occur, if no precau-
tions are taken.
Notices
Term Description
Data stream Continuous sequences of data records of which the end cannot be
foreseen in advance:
IP Internet Protocol
The Internet Protocol is used to define subnetworks by means of
physical MAC addresses.
Introduction
LIFO Last In First Out
Procedure for processing a data memory
the elements saved last are taken first from the memory.
• smartPAD
• smartPAD-2
In turn, for each model there are variants, e.g. with different lengths
of connecting cables.
The designation “KUKA smartPAD” or “smartPAD” refers to both
models unless an explicit distinction is made.
1.5 Trademarks
1.6 Licenses
The KUKA license conditions and the license conditions of the open-
source software used can be found in the following folders:
• Under .\LICENSE on the data storage medium with the installation
files of the KUKA software
• Under D:\KUKA_OPT\Option package name\LICENSE after installation
on the robot controller
• In the license folder under the name of the option package in the Op-
tions catalog after installation in WorkVisual
Product description
2 Product description
Description
Functions
The Ethernet connection for data exchange is configured via an xml file. A
configuration file must be defined for each connection in the directory
C:\KRC\ROBOTER\Config\User\Common\EthernetKRL of the robot control-
ler. The configuration is read in when initializing a connection.
Ethernet connections can be created and operated by the robot interpreter
or by submit interpreters. The channels can be used crosswise, e.g. a
channel opened in a submit interpreter can also be operated by the robot
interpreter.
The deletion of a connection can be linked to robot interpreter and submit
interpreter actions or system actions.
If used crosswise, certain guidelines must be observed to avoid an unex-
pected program response.
(>>> 6.2.1 "Programming tips" Page 34)
The following properties and functions of the EKI ensure the received data
can be processed reliably:
• A connection is automatically closed when reaching the limit of a data
memory.
• A connection is automatically closed if a data reception error occurs.
• The data memories continue to be read out with the connection
closed.
• If a connection is lost, it can be restored without any influence on the
saved data.
• A lost connection can be indicated, for example, by a flag.
• The error message for the error which caused a lost connection can
be displayed on the smartHMI.
Overview
The robot controller can receive data from an external system as well as
send data to an external system via EKI.
Data reception
1. The external system sends data which are transmitted via a protocol
and received by the EKI.
2. The data are stored in a structured manner in a data memory.
3. The data are accessed from a KRL program in a structured manner.
KRL instructions are used to read the data and copy them into KRL
variables.
Data transmission
Product description
It is possible to send data directly without first storing the data in a
memory.
Description
All data received are automatically saved and, in this way, are available to
KRL. XML and binary data are treated differently when saving them.
Each data memory is implemented as a memory stack. The individual
memories are read out in FIFO or LIFO mode.
XML data
Binary data
The received data are not extracted or interpreted. Only one memory ex-
ists for a connection in binary mode.
Read-out methods
Data elements are taken out of the memory in the order in which they
were stored there (FIFO). The reverse method, in which the data element
stored last in the memory is taken out first, can be configured (LIFO).
Each memory is assigned a common maximum limit for the data which
can be saved. If the limit is exceeded, the Ethernet connection is immedi-
ately closed to prevent the reception of further data. The data currently re-
ceived are still saved and the memory is increased by "1". The memories
can still be further processed. The connection can be re-opened via the
EKI_OPEN() function.
The robot controller and external system are connected as a client and
server. The external system may be the client or server. The number of
active connections is limited to 16.
Product description
Fig. 2-6: Protocol types
KUKA.Ethernet KRL 3.2 provides functions for data exchange between the
robot controller and an external system.
Each of these functions returns values. These return values can be quer-
ied and evaluated in the KRL program.
The following values are returned, depending on the function:
• Error number
• Number of elements still in the memory after the access.
• Number of elements read out of the memory
• Information on whether a connection exists
• Time stamp of the data element taken from the memory
(>>> 6.2.7 "EKI_STATUS: Structure for function-specific return values"
Page 43)
A message is generated for each error on the smartHMI and in the EKI
logbook. The automatic generation of messages can be deactivated.
Use
The KUKA.Ethernet KRL 3.2 option package is intended for data ex-
change between the robot controller and an external system via Ethernet
during the program runtime of the submit interpreter or robot interpreter.
Misuse
Safety
3 Safety
This documentation contains safety instructions which refer specifically to
the option package described here.
The fundamental safety information for the industrial robot can be found in
the “Safety” chapter of the Operating and Programming Instructions for
System Integrators or the Operating and Programming Instructions for End
Users.
Comply with safety-relevant information
The safe use of this product requires knowledge of and compliance with
fundamental safety measures. Death, severe injuries or damage to prop-
erty may otherwise result.
• The “Safety” chapter in the operating and programming instructions
of the system software must be observed.
Installation
4 Installation
The option package can either be installed on the robot controller via the
smartHMI or via WorkVisual.
Hardware
• KR C5 robot controller
Software
Description
Precondition
Procedure
LOG file
Description
Precondition
Procedure
LOG file
Precondition
Installation
• USB stick with the option package (KOP file)
NOTICE
Data loss due to USB sticks from third-party manufacturers
Data may be lost if USB sticks from manufacturers other than KUKA
are used for activities on the robot controller.
• For activities on the robot controller requiring a USB stick, use a
KUKA stick.
The KUKA sticks are validated for use with the robot controller.
Procedure
LOG file
Precondition
• T1 or T2 mode
• No program is selected.
Procedure
LOG file
Configuration
5 Configuration
A network connection must be established via the KLI of the robot control-
ler in order to exchange data via Ethernet.
Further information about KLI network configuration can be found in the
Operating and Programming Instructions for System Integrators for the
system software.
Programming
6 Programming
The name of the xml file is also the access key in KRL.
Example: …\EXT.xml —> EKI_INIT("EXT")
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL></EXTERNAL>
<INTERNAL></INTERNAL>
</CONFIGURATION>
<RECEIVE>
<ELEMENTS></ELEMENTS>
</RECEIVE>
<SEND>
<ELEMENTS></ELEMENTS>
</SEND>
</ETHERNETKRL>
Section Description
<CONFIGURATION> Configuration of the connection parame-
ters between the external system and the
…
EKI
</CONFIGURATION>
(>>> 6.1.1 "XML structure for connection
properties" Page 25)
<RECEIVE> Configuration of the reception structure re-
ceived by the robot controller
…
(>>> 6.1.2 "XML structure for data recep-
</RECEIVE>
tion" Page 29)
<SEND> Configuration of the transmission structure
sent by the robot controller
…
(>>> 6.1.3 "XML structure for data trans-
</SEND>
mission" Page 31)
Description
The settings for the external system are defined in the section <EXTER-
NAL> … </EXTERNAL>:
Element Description
TYPE Defines whether the external system is to communi-
cate as a server or client with the robot controller
(optional)
• 1 … 65534
Note: When selecting the port, it must be ensured
that it is not being used by other services, e.g. by the
operating system. Otherwise, no connection can be
established via this port.
The port number is ignored if TYPE = client.
The settings for the EKI are defined in the section <INTERNAL> … </
INTERNAL>:
Programming
Element Attribute Description
ENVIRONMENT ——— Link the deletion of the connection to actions
(optional)
• 1 … 512
Default value: 16
BUFFSIZE Limit Maximum number of bytes which can be re-
ceived without being interpreted (optional)
• 1 … 65,534 bytes
Default value: 16,384 bytes
TIMEOUT Connect Time until the attempt to establish a connec-
tion is aborted (optional)
Unit: ms
• 0 … 65,534 ms
Default value: 2,000 ms
• 1 … 4096
Number of the flag:
• 1 … 1024
The output or flag is set as long as a connec-
tion to the external system is active. The out-
put or flag is deleted if the connection to the
external system is aborted.
Ping Interval for sending a ping in order to monitor
the connection to the external system (option-
al)
• 1 … 65,534 s
IP ——— IP address of the EKI if it is defined as a
server (EXTERNAL/TYPE = client)
The IP address is ignored if EXTERNAL/
TYPE = server.
PORT ——— Port number of the EKI if it is defined as a
server (EXTERNAL/TYPE = client)
• 54600 … 54615
The port number is ignored if EXTERNAL/
TYPE = server.
PROTOCOL ——— Transmission protocol (optional)
• TCP
• UPD
Default value: TCP
It is recommended to always use the TCP/IP
protocol.
MESSAGES Logging Deactivates the writing of messages in the
EKI logbook (optional).
Programming
Example
<CONFIGURATION>
<EXTERNAL>
<IP>172.1.10.5</IP>
<PORT>60000</PORT>
<TYPE>Server</TYPE>
</EXTERNAL>
<INTERNAL>
<ENVIRONMENT>Program</ENVIRONMENT>
<BUFFERING Mode="FIFO" Limit="10"/>
<BUFFSIZE Limit="16384"/>
<TIMEOUT Connect="60000"/>
<ALIVE Set_Out="666" Ping="200"/>
<IP>192.1.10.20</IP>
<PORT>54600</PORT>
<PROTOCOL>TCP</PROTOCOL>
<MESSAGES Logging="error" Display="disabled"/>
</INTERNAL>
</CONFIGURATION>
Description
The configuration depends on whether XML data or binary data are re-
ceived.
• An XML structure has to be defined for the reception of XML data:
<XML> … </XML>
• Raw data have to be defined for the reception of binary data: <RAW>
… </RAW>
Attributes in the elements of the XML structure <XML> … </XML>:
Element Attribute Description
ELEMENT Tag Name of the element
The XML structure for data reception is de-
fined here (XPath).
(>>> 6.1.4 "Configuration according to the
XPath schema" Page 32)
ELEMENT Type Data type of the element
• STRING
• REAL
• INT
• BOOL
• FRAME
Note: Optional if the tag is used only for
event messages. In this case no memory ca-
pacity is reserved for the element.
Event flag example: <ELEMENT Tag="Ext"
Set_Flag="56"/>
• 1 … 4096
Number of the flag:
• 1 … 1024
Note: If an output or flag is set by Set_Out/
Set_Flag, the associated system variable
$OUT[]/$FLAG[] must be reset again in the
program code.
ELEMENT Mode Method used to process a data record in the
data memory
• 1 … 4096
Number of the flag:
• 1 … 1024
Note: If an output or flag is set by Set_Out/
Set_Flag, the associated system variable
$OUT[]/$FLAG[] must be reset again in the
program code.
ELEMENT EOS End string of an elementary piece of informa-
tion (only relevant if Type = "STREAM")
• <ELEMENT … EOS="123,134,21"/>
• <ELEMENT … EOS="123,134,21Ι13,10"/>
Programming
Element Attribute Description
ELEMENT Size Fixed size of information if Type = "BYTE"
• 1 … 3600 bytes
Examples
<RECEIVE>
<XML>
<ELEMENT Tag="Ext/Str" Type="STRING"/>
<ELEMENT Tag="Ext/Pos/XPos" Type="REAL" Mode="LIFO"/>
<ELEMENT Tag="Ext/Pos/YPos" Type="REAL"/>
<ELEMENT Tag="Ext/Pos/ZPos" Type="REAL"/>
<ELEMENT Tag="Ext/Temp/Cpu" Type="REAL" Set_Out="1"/>
<ELEMENT Tag="Ext/Temp/Fan" Type="REAL" Set_Flag="14"/>
<ELEMENT Tag="Ext/Integer/AState" Type="INT"/>
<ELEMENT Tag="Ext/Integer/BState" Type="INT"/>
<ELEMENT Tag="Ext/Boolean/CState" Type="BOOL"/>
<ELEMENT Tag="Ext/Frames/Frame1" Type="FRAME"/>
<ELEMENT Tag="Ext/Attributes/@A1" Type="STRING"/>
<ELEMENT Tag="Ext/Attributes/@A2" Type="INT"/>
<ELEMENT Tag="Ext" Set_Flag="56"/>
</XML>
</RECEIVE>
<RECEIVE>
<RAW>
<ELEMENT Tag="RawData" Type="BYTE" Size="1408"
Set_Flag="14"/>
</RAW>
</RECEIVE>
<RECEIVE>
<RAW>
<ELEMENT Tag="MyStream" Type="STREAM" EOS="123,134,21"
Size="836" Set_Flag="14"/>
</RAW>
</RECEIVE>
Description
The configuration depends on whether XML data or binary data are sent.
• An XML structure has to be defined for the transmission of XML data:
<XML> … </XML>
For transmission, the XML structure is created in the sequence in
which it is configured.
Attribute Description
Tag Name of the element
The XML structure for data transmission is defined
here (XPath).
Example
<SEND>
<XML
<ELEMENT Tag="Robot/Data/ActPos/@X"/>
<ELEMENT Tag="Robot/Data/ActPos/@Y"/>
<ELEMENT Tag="Robot/Data/ActPos/@Z"/>
<ELEMENT Tag="Robot/Data/ActPos/@A"/>
<ELEMENT Tag="Robot/Data/ActPos/@B"/>
<ELEMENT Tag="Robot/Data/ActPos/@C"/>
<ELEMENT Tag="Robot/Status"/>
<ELEMENT Tag="Robot/Mode"/>
<ELEMENT Tag="Robot/Complex/Tickcount"/>
<ELEMENT Tag="Robot/RobotType/Robot/Type"/>
</XML>
</SEND>
Description
Element notation
<Robot>
<Mode>...</Mode>
<RobotLamp>
<GrenLamp>
<LightOn>...</LightOn>
</GrenLamp>
</RobotLamp>
</Robot>
<SEND>
<XML>
<ELEMENT Tag="Robot/Mode" />
<ELEMENT Tag="Robot/RobotLamp/GrenLamp/LightOn" />
</XML>
<SEND />
Programming
Attribute notation
<Robot>
<Data>
<ActPos X="...">
</ActPos>
<LastPos A="..." B="..." C="..." X="..." Y="..." Z="...">
</LastPos>
</Data>
</Robot>
<SEND>
<XML>
<ELEMENT Tag="Robot/Data/LastPos/@X" />
<ELEMENT Tag="Robot/Data/LastPos/@Y" />
...
<ELEMENT Tag="Robot/Data/ActPos/@X" />
</XML>
<SEND />
EKI provides functions for data exchange between the robot controller and
an external system.
Exact descriptions of the functions can be found in the appendix.
(>>> 10.4 "Command reference" Page 115)
Initializing, opening, closing and clearing a connection
EKI_STATUS = EKI_Init(CHAR[])
EKI_STATUS = EKI_Open(CHAR[])
EKI_STATUS = EKI_Close(CHAR[])
EKI_STATUS = EKI_Clear(CHAR[])
Sending data
EKI_STATUS = EKI_Send(CHAR[], CHAR[], INT)
Writing data
EKI_STATUS = EKI_SetReal(CHAR[], CHAR[], REAL)
EKI_STATUS = EKI_SetInt(CHAR[], CHAR[], INT)
EKI_STATUS = EKI_SetBool(CHAR[], CHAR[], BOOL)
EKI_STATUS = EKI_SetFrame(CHAR[], CHAR[], FRAME)
EKI_STATUS = EKI_SetString(CHAR[], CHAR[], CHAR[])
Reading data
EKI_STATUS = EKI_GetBool(CHAR[], CHAR[], BOOL)
EKI_STATUS = EKI_GetBoolArray(CHAR[], CHAR[], BOOL[])
EKI_STATUS = EKI_GetInt(CHAR[], CHAR[], INT)
EKI_STATUS = EKI_GetIntArray(CHAR[], CHAR[], INT[])
EKI_STATUS = EKI_GetReal(CHAR[], CHAR[], REAL)
Reading data
EKI_STATUS = EKI_GetRealArray(CHAR[], CHAR[], REAL[])
EKI_STATUS = EKI_GetString(CHAR[], CHAR[], CHAR[])
EKI_STATUS = EKI_GetFrame(CHAR[], CHAR[], FRAME)
EKI_STATUS = EKI_GetFrameArray(CHAR[], CHAR[], FRAME[])
Programming
• There are various possibilities of waiting for data:
‒ By setting a flag or an output, it can be indicated that a certain da-
ta element or a complete data record has been received (Set_Flag
or Set_Out element in the XML structure for data reception).
Example: Interrupt of the KRL program by WAIT FOR $FLAG[x]
(>>> 7.6 "“XmlCallback” example" Page 58)
‒ The EKI_CheckBuffer() function can be used to check cyclically
whether the memory contains new data elements.
Description
“Program” ENVIRONMENT
When reconfiguring the I/Os, the driver is reloaded and all initializations
are deleted.
When reconfiguring the I/Os, the driver is reloaded and all initializations
are deleted.
“System” ENVIRONMENT
When reconfiguring the I/Os, the driver is reloaded and all initializations
are deleted.
Description
1 DEF Connection()
2 ...
Programming
3 RET=EKI_Init("Connection")
4 RET=EKI_Open("Connection")
5 ...
6 Write data, send data or get received data
7 ...
8 RET=EKI_Close("Connection")
9 RET=EKI_Clear("Connection")
10 ...
11 END
Line Description
3 EKI_Init() initializes the channel used by the EKI to connect
to the external system.
4 EKI_Open() opens the channel.
6 KRL instructions used to write data in the memory, send
data or access received data
8 EKI_Close() closes the channel.
9 EKI_Clear() clears the channel.
It should be taken into account during programming whether the EKI is
configured as a server or client.
Server mode
EKI_Open() sets the EKI (= server) to a listening state if the external sys-
tem is configured as a client. The server waits for the connection request
of a client without interruption of the program run. If the <TIMEOUT Con-
nect="…"/> element is not assigned data in the configuration file, the serv-
er waits until a client requests a connection.
A connection request by a client is indicated by access to the EKI or by
an event message, e.g. via the <ALIVE SET_OUT="..."/> element.
An event flag or output has to be programmed, e.g. WAIT FOR $OUT[...],
if the program run is to be interrupted as long as the server waits for the
connection request.
It is recommended not to use EKI_Close() in server mode. In server
mode, the channel is closed from the external client.
Client mode
EKI_Open() interrupts the program run until the connection to the external
system is active if the external system is configured as a server.
EKI_Close() closes the connection to the external server.
Description
• For binary data sets of fixed length (attribute Type = "BYTE"): Ran-
dom character string of fixed length
‒ The size of the character string (in bytes) must correspond exactly
to the configured attribute Size. If it is exceeded, an error mes-
sage is generated. If it is not reached, a warning message is gen-
erated.
‒ Binary data sets of fixed length must be read into the KRL pro-
gram with CAST_TO(). Only data of REAL type (4 bytes) are legi-
ble, not Double.
• For binary data sets with variable end strings (attribute Type =
"STREAM"): Random character string of variable length
The end string is sent automatically.
Examples
<Robot>
<ActPos X="1000.12"></ActPos>
<Status>12345678</Status>
</Robot>
• Programming:
<Robot>
<ActPos X="1000.12"></ActPos>
<Status>12345678</Status>
</Robot>
<Robot>
<ActPos X="1000.12"></ActPos>
<Status>12345678</Status>
</Robot>
• Programming:
<Robot>
<ActPos X="1000.12"></ActPos>
Programming
</Robot>
<Robot>
<ActPos X="1000.12"></ActPos>
<Status>12345678</Status>
</Robot>
• Programming:
• Sent string:
<POS><XPOS>1</XPOS></POS>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Size="10" />
</RAW>
• Programming:
• Sent data:
"r?{ ? _I X"
Sending a binary data record with variable end strings and variable
length:
• Configured raw data:
<RAW>
<ELEMENT Tag="Buffer" Type="STREAM" EOS="65,66" />
</RAW>
• Programming:
• Sent data:
<RAW>
<ELEMENT Tag="Buffer" Type="STREAM" EOS="65,66" />
</RAW>
• Programming:
• Sent data:
"StreamAB"
Description
XML and binary data are treated differently when saved and read out:
• XML data are extracted by the EKI and stored type-specifically in dif-
ferent memories. It is possible to access each saved value individually.
All EKI_Get...() access functions can be used to read out XML data.
• Binary data records are not interpreted by the EKI and stored together
in a memory.
The EKI_GetString() access function must be used to read a binary
data record out of a memory. Binary data records are read out of the
memory as strings.
Binary data records of fixed length must be divided into individual var-
iables again in the KRL program with CAST_FROM().
Detailed information on the CAST_FROM() command can be found
in the CREAD/CWRITE documentation.
Examples
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Status/IsActive" Type="BOOL" />
</XML>
</RECEIVE>
Programming:
; Declaration
INT i
DECL EKI_STATUS RET
CHAR valueChar[256]
BOOL valueBOOL
Programming
; Initialization
FOR i=(1) TO (256)
valueChar[i]=0
ENDFOR
valueBOOL=FALSE
<Sensor>
<Message>Example message</Message>
<Status>
<IsActive>1</IsActive>
</Status>
</Sensor>
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Size="10" />
</RAW>
</RECEIVE>
• Programming:
; Declaration
INT i
INT OFFSET
DECL EKI_STATUS RET
CHAR Bytes[10]
INT valueInt
REAL valueReal
BOOL valueBool
CHAR valueChar[1]
; Initialization
FOR i=(1) TO (10)
Bytes[i]=0
ENDFOR
OFFSET=0
valueInt=0
valueBool=FALSE
valueReal=0
valueChar[1]=0
OFFSET=0
CAST_FROM(Bytes[],OFFSET,valueReal,valueInt,valueChar[],value
Bool)
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="STREAM" EOS="13,10" />
</RAW>
</RECEIVE>
• Programming:
; Declaration
INT i
DECL EKI_STATUS RET
CHAR Bytes[64]
; Initialization
FOR i=(1) TO (64)
Bytes[i]=0
ENDFOR
Description
EKI_ClearBuffer()
The data memory that can be deleted with the command EKI_ClearBuff-
er() depends on whether communication occurs by means of raw data or
an XML structure.
For communication by means of raw data:
• The data memory can be selectively deleted by entering the XPath ex-
pression of the element from the configured XML structure. This ap-
plies for both received and sent data.
XML data are extracted by the EKI and stored type-specifically in differ-
ent memories. When deleting individual memories, it must be ensured
that no data that belong together are lost.
Examples
<RECEIVE>
<RAW>
<ELEMENT Tag="RawData" Type="BYTE" Size="1408"
Set_Flag="14"/>
Programming
</RAW>
</RECEIVE>
• Programming:
<RECEIVE>
<XML>
<ELEMENT Tag="Ext/Activ/Value" Type="REAL"/>
<ELEMENT Tag="Ext/Activ/Flag" Type="BOOL"/>
<ELEMENT Tag="Ext/Activ/Flag/Message" Type="STRING"/>
</XML>
</RECEIVE>
The data memory for the tag <Message> is also deleted since this tag
is subordinate to the tag <Flag>.
• Programming:
Description
Syntax
Element Description
Buff Number of elements still in the memory after access.
Read Number of elements read out of the memory
Msg_No Error number of the error that occurred during a func-
tion call or data reception.
If automatic message output has been deactivated,
EKI_CHECK() can be used to read out the error
number and display the error message on the
smartHMI.
Connected Indicates whether a connection exists
Element Description
Counter Time stamp for received data packets
Data packets arriving in the memory are numbered
consecutively in the order in which they are stored in
the memory.
If individual data are read, the Counter structure ele-
ment is assigned the time stamp of the data packet
from which the data element originates.
(>>> 6.2.10 "Processing incomplete data records"
Page 46)
Return values
EKI_Open()
EKI_Close()
EKI_Clear()
EKI_Send()
EKI_Set…()
EKI_Get…()
EKI_ClearBuffer()
EKI_Lock()
EKI_UnLock()
EKI_CheckBuffer()
Event output
Programming
tive. $OUT[23] is reset when the connection is no longer active.
The connection can be restored only with the EKI_OPEN() function.
Event flag
The XML structure <XY /> contains the “XY/@x” and “XY/@z” data ele-
ments. $FLAG[1] is set since the complete XML structure has arrived.
$FLAG[2] is set since the “x” element is contained in “XY”. $FLAG[3] is
not set since the “y” element has not been transferred.
Example
Description
The EKI_Get...() access functions are disabled until all data of an XML
data record are in the memory.
If LIFO is configured and two or more XML data records arrive directly in
succession, it is no longer ensured that a data record can be fetched in a
non-fragmented condition from the memory. It may, for example, be the
case that the data of the second data record are already stored in the
memory although the first data record has not yet been completely pro-
cessed. The data record available in the KRL is inconsistent since, in LI-
FO mode, the data saved last are always accessed first.
To prevent the fragmentation of data records in LIFO mode, the process-
ing of newly received data must be disabled until all data belonging to-
gether have been fetched from the memory.
Example
...
RET=EKI_Lock("MyChannel")
RET=EKI_Get...()
RET=EKI_Get...()
...
RET=EKI_Get...()
RET=EKI_Unlock("MyChannel")
...
Description
Example
<ALIVE Set_Flag="1"/>
• The interrupt is declared and switched on in the KRL program. The in-
terrupt program is run if FLAG[1] is reset.
DEF CON_ERR()
DECL EKI_STATUS RET
RET={Buff 0,Read 0, Msg_no 0, Connected false}
EKI_CHECK(RET,#Quit,"XmlTransmit")
RET=EKI_OPEN("XmlTransmit")
Programming
END
Description
• EthernetKRL_Server.exe
Example program in KRL DOC\Example\Program
• BinaryFixed.src
• BinaryStream.src
• XmlCallback.src
• XmlServer.src
• XmlTransmit.src
Example configurations in XML DOC\Example\Config
• BinaryFixed.xml
• BinaryStream.xml
• XmlCallBack.xml
• XmlServer.xml
• XmlTransmit.xml
• XmlFullConfig.xml
Precondition
External system:
Procedure
Page 52)
7. Close the Communication Properties window and select the Start
button in the server program. The port used for communication is dis-
played in the message window.
8. Set the IP address of the external system in the desired XML file.
Description
• P: Port number
• E: Example data
‒ Xml: XML data
‒ BinaryFixed: Binary data of fixed length
‒ BinaryStream: Variable binary data stream with end
string
• A: Communication mode
‒ Autoreply: The server automatically responds to each
data package received.
‒ Manual: only manual data reception or data transmis-
sion
3 Stop button
Communication with the robot controller is terminated and the
server is reset.
4 Start button
Data exchange between the server program and robot controller
is evaluated. The first incoming connection request is linked and
used as a communication adapter.
5 Menu button for setting the communication parameters
(>>> 7.1.2 "Communication parameters in the server program"
Page 52)
6 Display options
Description
Parameters Description
Example Select example data.
The EKI is configured as a client. Only binary data records with a fixed
length of 10 bytes and the element name "Buffer" can be received via this
XML file
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>x.x.x.x</IP>
<PORT>59152</PORT>
</EXTERNAL>
</CONFIGURATION>
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Set_Flag="1"
Size="10" />
</RAW>
</RECEIVE>
<SEND/>
</ETHERNETKRL>
Binary data records of fixed length must be read into and out of the KRL
program with CAST_TO() and CAST_FROM(). Only data of REAL type
(4 bytes) are legible, not Double.
Detailed information on the CAST_TO() and CAST_FROM() commands
can be found in the CREAD/CWRITE documentation.
Program
1 DEF BinaryFixed( )
2 Declaration
3 INI
4 Initialize sample data
5
6 RET=EKI_Init("BinaryFixed")
7 RET=EKI_Open("BinaryFixed")
8
9 OFFSET=0
10 CAST_TO(Bytes[],OFFSET,34.425,674345,"R",TRUE)
11
12 RET=EKI_Send("BinaryFixed",Bytes[])
13
14 WAIT FOR $FLAG[1]
15 RET=EKI_GetString("BinaryFixed","Buffer",Bytes[])
16 $FLAG[1]=FALSE
17
18 OFFSET=0
19 CAST_FROM(Bytes[], OFFSET, valueReal, valueInt,
valueChar[], valueBool)
20
21 RET=EKI_Close("BinaryFixed")
22 RET=EKI_Clear("BinaryFixed")
23 END
Line Description
4 Initialization of KRL variables by the assignment of values
6 EKI_Init() initializes the channel used by the EKI to connect
to the external system.
Line Description
7 EKI_Open() opens the channel and connects to the server.
9, 10 CAST_TO writes the values in the Bytes[] CHAR array.
12 EKI_Send() sends the Bytes[] CHAR array to the external
system.
14 … 16 $FLAG[1] indicates the reception of the configured data ele-
ment.
EKI_GetString accesses the memory and copies the data
into the Bytes[] CHAR array.
$FLAG[1] is reset again.
18, 19 CAST_FROM reads the values out of the Bytes[] CHAR ar-
ray and copies them type-specifically into the specified vari-
ables.
21 EKI_Close() closes the channel.
22 EKI_Clear() clears the channel.
The EKI is configured as a client. Only binary data records with a maxi-
mum length of 64 bytes and the element name "Buffer" can be received
via this connection. The end of the binary data record must be indicated
with the end string CR, LF. FLAG[1] is set when the EKI has received this
element.
XML file
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>x.x.x.x</IP>
<PORT>59152</PORT>
</EXTERNAL>
</CONFIGURATION>
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="STREAM" Set_Flag="1"
Size="64" EOS="13,10" />
</RAW>
</RECEIVE>
<SEND/>
</ETHERNETKRL>
Program
1 DEF BinaryStream( )
2 Declaration
3 INI
4 Initialize sample data
5
6 RET=EKI_Init("BinaryStream")
Line Description
4 Initialization of KRL variables by the assignment of values
6 EKI_Init() initializes the channel used by the EKI to connect
to the external system.
7 EKI_Open() opens the channel and connects to the server.
9 The Bytes[] CHAR array is assigned data.
11 EKI_Send() sends the Bytes[] CHAR array to the external
system.
13 … 15 $FLAG[1] indicates the reception of the configured data ele-
ment.
EKI_GetString reads the string in the Bytes[] CHAR array
out of the memory.
$FLAG[1] is reset again.
17 EKI_Close() closes the channel.
18 EKI_Clear() clears the channel.
The EKI is configured as a client. Robot data are sent and the received
sensor data read out of the memory after a waiting time of 1 second.
XML file
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>x.x.x.x</IP>
<PORT>59152</PORT>
</EXTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Positions/Current/@X"
Type="REAL" />
<ELEMENT Tag="Sensor/Positions/Before/X" Type="REAL" />
<ELEMENT Tag="Sensor/Nmb" Type="INT" />
Program
1 DEF XmlTransmit( )
2 Declaration
3 Communicated data
4 INI
5 Initialize sample data
6
7 RET=EKI_Init("XmlTransmit")
8 RET=EKI_Open("XmlTransmit")
9
10 Write data to connection
11 Send data to external program
12 Get received sensor data
13
14 RET=EKI_Close("XmlTransmit")
15 RET=EKI_Clear("XmlTransmit")
16
17 END
Line Description
5 Initialization of KRL variables by the assignment of values
7 EKI_Init() initializes the channel used by the EKI to connect
to the external system.
8 EKI_Open() opens the channel and connects to the
external system.
10 Writes data in the saved XML document for data transmis-
sion.
11 Sends the written XML document to the external system.
12 Reads the received sensor data out of the memory.
14 EKI_Close() closes the channel.
15 EKI_Clear() clears the channel.
XML file
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<TYPE>Client</TYPE>
</EXTERNAL>
<INTERNAL>
<IP>x.x.x.x</IP>
<PORT>54600</PORT>
<ALIVE Set_Flag="1" />
</INTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/A" Type="BOOL" />
</XML>
</RECEIVE>
<SEND>
<XML>
<ELEMENT Tag="Robot/B" />
</XML>
</SEND>
</ETHERNETKRL>
Program
1 DEF XmlServer( )
2 Declaration
3 INI
4
5 RET=EKI_Init("XmlServer")
6 RET=EKI_Open("XmlServer")
7
8 ; wait until server is conntected
9 wait for $FLAG[1
10 ; wait until server is deconnected
11 wait for $FLAG[1]==FALSE
12
13 RET=EKI_Clear("XmlServer")
14 END
Line Description
5 EKI_Init() initializes the channel used by the external sys-
tem to connect to the EKI.
6 EKI_Open() opens the channel.
9 $FLAG[1] is set when the external client has connected
successfully to the server.
Line Description
11 Since the EKI is configured as a server, the robot controller
expects the channel to be closed by the external client. In
this case, $FLAG[1] is deleted.
13 EKI_Clear() clears the channel.
The EKI is configured as a client. Robot data are sent, sensor data re-
ceived and then $FLAG[1] awaited. $FLAG[1] indicates that the sensor
data have been read out.
It is configured in the XML file that $FLAG[998] is set when the EKI has
received all sensor data. This flag triggers an interrupt in the program.
The configuration of the "Sensor" tag as event tag ensures that the
sensor data are fetched only when all data are in the memories.
$FLAG[998] is reset and $FLAG[1] set when the sensor data have been
read out.
XML file
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>x.x.x.x</IP>
<PORT>59152</PORT>
</EXTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Positions/Current/@X"
Type="REAL" />
<ELEMENT Tag="Sensor/Positions/Before/X" Type="REAL" />
<ELEMENT Tag="Sensor/Nmb" Type="INT" />
<ELEMENT Tag="Sensor/Status/IsActive" Type="BOOL" />
<ELEMENT Tag="Sensor/Read/xyzabc" Type="FRAME" />
<ELEMENT Tag="Sensor/Show/@error" Type="BOOL" />
<ELEMENT Tag="Sensor/Show/@temp" Type="INT" />
<ELEMENT Tag="Sensor/Show" Type="STRING" />
<ELEMENT Tag="Sensor/Free" Type="INT" Set_Out="998" />
<ELEMENT Tag="Sensor" Set_Flag="998" />
</XML>
</RECEIVE>
<SEND>
<XML>
<ELEMENT Tag="Robot/Data/LastPos/@X" />
<ELEMENT Tag="Robot/Data/LastPos/@Y" />
<ELEMENT Tag="Robot/Data/LastPos/@Z" />
<ELEMENT Tag="Robot/Data/LastPos/@A" />
<ELEMENT Tag="Robot/Data/LastPos/@B" />
<ELEMENT Tag="Robot/Data/LastPos/@C" />
<ELEMENT Tag="Robot/Data/ActPos/@X" />
<ELEMENT Tag="Robot/Status" />
<ELEMENT Tag="Robot/Mode" />
Program
1 DEF XmlCallBack( )
2 Declaration
3 Communicated data
4 INI
5 Define callback
6
7 RET=EKI_Init("XmlCallBack")
8 RET=EKI_Open("XmlCallBack")
9
10 Write data to connection
11 RET=EKI_Send("XmlCallBack","Robot")
12
13 ;wait until data read
14 WAIT FOR $FLAG[1]
15
16 RET=EKI_Close("XmlCallBack")
17 RET=EKI_Clear("XmlCallBack")
18 END
19
20 DEF GET_DATA()
21 Declaration
22 Initialize sample data
23 Get received sensor data
24 Signal read
Line Description
5 Declaring and switching on the interrupt
7 EKI_Init() initializes the channel used by the EKI to connect
to the external system.
8 EKI_Open() opens the channel.
10 Writes data in the saved XML document for data transmis-
sion.
11 Sends the data.
14 Waits for $FLAG[1].
The event flag signals that all data have been read.
16 EKI_Close() closes the channel.
17 EKI_Clear() clears the channel.
20 … 24 initialization of KRL variables by assigning values and read-
ing out data
$FLAG[1] is set when all data have been read.
Data transmission
The XML document is assigned robot data by the KRL program and sent
to the external system via the EKI.
<Robot>
<Data>
<LastPos X="..." Y="..." Z="..." A="..." B="..." C="...">
</LastPos>
<ActPos X="1000.12">
</ActPos>
</Data>
<Status>12345678</Status>
<Mode>ConnectSensor</Mode>
<RobotLamp>
<GrenLamp>
<LightOn>1</LightOn>
</GrenLamp
</RobotLamp>
</Robot>
Data reception
The XML document is assigned sensor data by the server program and
received by the EKI.
<Sensor>
<Message>Example message</Message>
<Positions>
<Current X="4645.2" />
<Before>
<X>0.9842</X>
</Before>
</Positions>
<Nmb>8</Nmb>
<Status>
<IsActive>1</IsActive>
</Status>
<Read>
<xyzabc X="210.3" Y="825.3" Z="234.3" A="84.2" B="12.3"
C="43.5" />
</Read>
<Show error="0" temp="9929">Taginfo in attributes</Show>
<Free>2912</Free>
</Sensor>
Diagnosis
8 Diagnosis
Precondition
Procedure
Description
Name Description
Total memory Total available memory (bytes)
Allocated memory Used memory (bytes)
Robot program con- Number of connections initialized by the robot
nections interpreter
Submit program con- Number of connections initialized by submit in-
nections terpreters
System connections Number of connections initialized by the system
Ethernet connections Number of open connections
Processing time Maximum time required to process received da-
ta (refreshed every 5 seconds)
Warning messages Number of warning messages
Error messages Number of error messages
The warning and error messages are also counted if the automatic mes-
sage output and message logging have been deactivated.
Messages
9 Messages
All error messages of the EKI are logged in a LOG file under C:\KRC\RO-
BOTER\LOG\EthernetKRL.
9.3.1 EKI00002
Description
Checking instructions
Precondition
• User rights:
‒ User group “Expert”
Procedure
<EthernetKRL>
<Interface>
<MemSize>1048576</MemSize>
...
</EthernetKRL>
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
4. Reboot the robot controller with the settings Cold start and Reload
files.
Description
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• Check the xml file(s) to see if the Ethernet connection can be config-
ured so that less memory is used.
Messages
Description
Precondition
Procedure
Description
Checking instructions
Description
9.3.2 EKI00003
Possible cause(s) Cause: xml file containing the connection configuration not present
(>>> Page 66)
Solution: Restore xml file containing the connection configuration
(>>> Page 66)
Description
The Ethernet connection was not initialized because no xml file is saved
under the name specified in the function EKI_Init().
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The procedure for checking whether the xml file is present is as fol-
lows:
Precondition
Checking instructions
Description
The xml file with the connection configuration must be restored and
copied to the directory C:\KRC\ROBOTER\Config\User\Common\Ether-
netKRL.
Precondition
Procedure
• Copy the xml file with the connection configuration into the designated
directory.
Messages
Description
The Ethernet connection was not initialized since the xml file named in the
function EKI_Init() is not readable. The xml file is damaged and cannot be
opened.
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The procedure for checking whether the xml file is damaged is as
follows:
Precondition
Checking instructions
Description
The xml file with the connection configuration must be restored and
copied to the directory C:\KRC\ROBOTER\Config\User\Common\Ether-
netKRL.
Precondition
Procedure
• Copy the xml file with the connection configuration into the designated
directory.
9.3.3 EKI00006
Possible cause(s) Cause: Schema error in the xml file with the connection configura-
tion (>>> Page 68)
Solution: Eliminating errors in the xml file (>>> Page 68)
Cause: Schema error in the xml file with the connection configuration
Description
The xml file with the connection configuration cannot be read due to a
schema error.
KUKA.Ethernet KRL uses the XPath schema. The syntax specified by the
schema must be followed exactly. For example, no punctuation marks or
structure elements may be missing.
The manner in which the elements and attributes in the xml file are
written – including uppercase and lowercase letters – is specified and
must be followed exactly.
Further information about the XPath schema can be found in the KU-
KA.Ethernet KRL documentation.
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Description
Precondition
Procedure
9.3.4 EKI00007
Messages
Message type Error message
Possible cause(s) Cause: XML structure for data transmission designed incorrectly
(>>> Page 69)
Solution: Designing the XML structure according to the XML docu-
ments to be sent (>>> Page 69)
Description
The XML structure for data transmission cannot be described because the
XML structure is designed according to a schema other than that of the
XML document to be sent. KUKA.Ethernet KRL uses the XPath schema.
Further information about the XPath schema can be found in the KU-
KA.Ethernet KRL documentation.
Description
The XML structure for sending data must be designed following the XPath
schema in accordance with the XML documents to be sent.
9.3.5 EKI00009
Description
The Ethernet connection was not initialized because the function EKI_Init()
is programmed incorrectly or not at all.
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The procedure for checking whether the function is correctly pro-
grammed is as follows:
Precondition
Checking instructions
Description
Precondition
• User rights:
‒ User group “Expert”
Messages
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.6 EKI00010
Description
The Ethernet connection is initialized but not open because the function
EKI_Open() is programmed incorrectly or not at all.
RET = EKI_Open(CHAR[])
Function Opens an initialized channel
If the EKI is configured as a client, the EKI connects
to the external system (= Server).
If the EKI has been configured as a server, the EKI
waits for the connection request from the external
system (= Client).
Parameters Type: CHAR
Name of the channel
RET Type: EKI_STATUS
Name of the channel (= name of the xml file with
the connection configuration)
Example RET = EKI_Open("Channel_1")
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
grammed is as follows:
Precondition
Checking instructions
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.7 EKI00011
Possible cause(s) Cause: The Ethernet connection is already open with EKI_Open()
(>>> Page 73)
Solution: Delete overprogrammed function (>>> Page 73)
Messages
Description
The Ethernet connection has already been opened with the function
EKI_Open().
RET = EKI_Open(CHAR[])
Function Opens an initialized channel
If the EKI is configured as a client, the EKI connects
to the external system (= Server).
If the EKI has been configured as a server, the EKI
waits for the connection request from the external
system (= Client).
Parameters Type: CHAR
Name of the channel
RET Type: EKI_STATUS
Name of the channel (= name of the xml file with
the connection configuration)
Example RET = EKI_Open("Channel_1")
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The procedure for checking whether the connection is already open:
Precondition
Checking instructions
• Check if the following line between the initialization and the closing of
the connection is programmed multiple times:
RET = EKI_Open("file name")
‒ File name: Name of the xml file with the connection configuration
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.8 EKI00012
Possible cause(s) Cause: IP address and/or port number for the EKI entered incorrect-
ly or not at all (>>> Page 74)
Solution: Entering the correct IP address and port number in the
xml file (>>> Page 75)
Cause: IP address and/or port number for the EKI entered incorrectly or not at all
Description
Examples
<INTERNAL>
<IP>192.168.23.1</IP>
<PORT>54600</PORT>
</INTERNAL>
<INTERNAL>
<IP>0.0.0.0</IP>
<PORT>54600</PORT>
</INTERNAL>
Messages
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• In the xml file with the connection configuration, check if the IP ad-
dress and port number have been entered correctly.
Solution: Entering the correct IP address and port number in the xml file
Precondition
Procedure
9.3.9 EKI00013
Possible cause(s) Cause: IP address and/or port number for the external system not
entered or entered incorrectly (>>> Page 75)
Solution: Entering the correct IP address and port number in the
xml file (>>> Page 76)
Cause: IP address and/or port number for the external system not entered or en-
tered incorrectly
Description
• <PORT>Port number</PORT>
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• In the xml file with the connection configuration, check if the IP ad-
dress and port number have been entered correctly.
Solution: Entering the correct IP address and port number in the xml file
Precondition
Procedure
9.3.10 EKI00014
Messages
Cause: No Ethernet connection due to software error, external sys-
tem (>>> Page 79)
Solution: Eliminating errors in the software of the external system
(>>> Page 79)
Description
In the xml file with the connection configuration, the incorrect IP address
and/or port number are entered. They do not match the external system
or the EKI.
Depending on whether the external system is configured as a server or
client, the IP address and port number must be entered as follows:
• section <EXTERNAL> … </EXTERNAL>
‒ <TYPE>Server</TYPE> or <TYPE> not specified: The external
system is configured as a server.
‒ <TYPE>Client</TYPE>: The external system is configured as a
client.
‒ If TYPE = Server, the IP address and port number of the external
system must here be specified as:
‒ <IP>IP address</IP>
‒ <PORT>Port number</PORT>
If TYPE = Client, the specified connection parameters are ignored
here.
• Section <INTERNAL> … </INTERNAL>
‒ If TYPE = Client, the IP address and port number of the EKI must
here be specified as:
‒ <IP>IP address</IP>
‒ <PORT>Port number</PORT>
If TYPE = Server, the specified connection parameters are ignored
here.
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• In the xml file with the connection configuration, check if the IP ad-
dress and port number have been entered correctly.
Solution: Entering the correct IP address and port number in the xml file
Messages
Precondition
Procedure
Description
Configuration file
Directory C:\KRC\Roboter\Config\User\Common\EthernetKRL
File VisionTechConfig.xml
The procedure for checking whether the IP addresses are in the
same subnetwork is as follows:
Checking instructions
1. In the main menu, select Start-up > Network configuration. The Net-
work configuration window opens.
2. Click on Advanced. The window for advanced network configuration
opens.
3. Select the Internal subnets tab. The number range is displayed in the
Shared memory network box.
4. Open file.
5. Search for <External>.
The IP address can be found under <IP>.
6. Check whether the number ranges on the KUKA.HMI and in the file
match.
Description
Procedure
Messages
Description
Checking instructions
1. Check that the network cables are correctly connected and fitted se-
curely.
2. Interchange the network cables.
Procedure
Description
Due to an error in the software of the external system, there is not Ether-
net connection.
Checking instructions
Description
Description
Due to an error in the hardware of the external system (i.e. loose socket
connection, defective network card, etc.) there is not Ethernet connection.
Checking instructions
Description
9.3.11 EKI00015
Possible cause(s) Cause: Empty data memory when accessed using EKI_Get…()
(>>> Page 80)
Solution: Alter the program. (>>> Page 80)
Description
Syntax
Example
...
REPEAT
ret = EKI_GetInt("MyChannel", "Root/Number", value)
DoSomething(value)
UNTIL (ret.Buff < 1)
...
Precondition
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
Messages
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.12 EKI00016
Possible cause(s) Cause: Element in XML structure for data reception configured in-
correctly or not at all (>>> Page 81)
Solution: Eliminating errors in the xml file (>>> Page 82)
Cause: Element in XML structure for data reception configured incorrectly or not
at all
Description
Access functions
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The reception structure is configured in the <RECEIVE> … </RECEIVE>
section of the xml file. The attribute Tag defines the elements that can be
accessed.
Checking instructions
Examples
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Status/IsActive" Type="BOOL" />
</XML>
</RECEIVE>
Programming:
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Size="10" />
</RAW>
</RECEIVE>
• Programming:
Description
Precondition
Procedure
Messages
Description
The element name specified in an access function does not match the el-
ement name configured in the XML structure for data reception.
Access functions
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The reception structure is configured in the <RECEIVE> … </RECEIVE>
section of the xml file. The attribute Tag defines the elements that can be
accessed.
Checking instructions
Examples
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Status/IsActive" Type="BOOL" />
</XML>
</RECEIVE>
Programming:
• Raw data:
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Size="10" />
</RAW>
</RECEIVE>
• Programming:
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.13 EKI00017
Possible cause(s) Cause: XML structure for data transmission configured incorrectly
(>>> Page 85)
Solution: Eliminating errors in the xml file (>>> Page 86)
Messages
Description
The XML structure for data transmission does not match the XML docu-
ment to which the XML data are to be written. It also potentially does not
match the programming of the EKI_Send() function.
RET = EKI_Send(CHAR[], CHAR[], INT)
Function Sends data via a channel.
(>>> 6.2.4 "Sending data" Page 37)
Parameter 1 Type: CHAR
Name of the channel to be used for sending
Parameter 2 Type: CHAR
Defines the quantity of data to be sent.
For communication by means of XML structure:
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The transmission structure is configured in the <SEND> … </SEND> sec-
tion of the xml file.
Checking instructions
Description
Precondition
Procedure
Description
Messages
RET = EKI_Send(CHAR[], CHAR[], INT)
Parameter 2 Type: CHAR
Defines the quantity of data to be sent.
For communication by means of XML structure:
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The transmission structure is configured in the <SEND> … </SEND> sec-
tion of the xml file.
Checking instructions
2. Check whether the programming of the data sent matches the config-
uration.
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.14 EKI00018
Messages
Description
Checking instructions
1. Check that the network cables are correctly connected and fitted se-
curely.
2. Interchange the network cables.
Procedure
Description
Due to an error in the software of the external system, there is not Ether-
net connection.
Checking instructions
Description
Description
Due to an error in the hardware of the external system (i.e. loose socket
connection, defective network card, etc.) there is not Ethernet connection.
Checking instructions
Description
9.3.15 EKI00019
Possible cause(s) Cause: EKI_Send() contains no data to be sent (>>> Page 90)
Solution: Program the function correctly (>>> Page 91)
Description
Messages
RET = EKI_Send(CHAR[], CHAR[], INT)
Parameter 2 Type: CHAR
Defines the quantity of data to be sent.
For communication by means of XML structure:
Checking instructions
• In the KRL program, check whether the data to be sent are specified.
Description
Precondition
• User rights:
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.16 EKI00020
Possible cause(s) Cause: Data type in XML structure for data reception configured in-
correctly (>>> Page 92)
Solution: Eliminating errors in the xml file (>>> Page 94)
Cause: Data type in XML structure for data reception configured incorrectly
Description
The data type specified for an element in an access function does not
match the data type configured in the XML structure for data reception.
Access functions
Messages
Access functions
EKI_STATUS = EKI_GetString(CHAR[], CHAR[], CHAR[])
EKI_STATUS = EKI_GetFrame(CHAR[], CHAR[], FRAME)
EKI_STATUS = EKI_GetFrameArray(CHAR[], CHAR[], FRAME[])
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The reception structure is configured in the <RECEIVE> … </RECEIVE>
section of the xml file. The attribute Type defines the data type of an ele-
ment.
Checking instructions
• Check whether the programmed data type matches the data type of
the element configured in the reception structure.
Examples
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Status/IsActive" Type="BOOL" />
</XML>
</RECEIVE>
Programming:
...
CHAR valueChar[256]
BOOL valueBOOL
...
RET=EKI_GetString("Channel_1", "Sensor/Message", valueChar[])
RET=EKI_GetBool("Channel_1", "Sensor/Status/IsActive",
valueBOOL)
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Size="10" />
</RAW>
</RECEIVE>
• Programming:
...
CHAR Bytes[10]
...
RET=EKI_GetString("Channel_1", "Buffer", Bytes[])
Description
Precondition
Procedure
Description
The data type specified for an element in an access function does not
match the data type configured in the XML structure for data reception.
Access functions
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
The reception structure is configured in the <RECEIVE> … </RECEIVE>
section of the xml file. The attribute Type defines the data type of an ele-
ment.
Checking instructions
• Check whether the programmed data type matches the data type of
the element configured in the reception structure.
Messages
Examples
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Message" Type="STRING" />
<ELEMENT Tag="Sensor/Status/IsActive" Type="BOOL" />
</XML>
</RECEIVE>
Programming:
...
CHAR valueChar[256]
BOOL valueBOOL
...
RET=EKI_GetString("Channel_1", "Sensor/Message", valueChar[])
RET=EKI_GetBool("Channel_1", "Sensor/Status/IsActive",
valueBOOL)
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="BYTE" Size="10" />
</RAW>
</RECEIVE>
• Programming:
...
CHAR Bytes[10]
...
RET=EKI_GetString("Channel_1", "Buffer", Bytes[])
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.17 EKI00021
Description
Checking instructions
Precondition
• User rights:
‒ User group “Expert”
Procedure
Messages
2. Enter the desired memory capacity in bytes in the <MemSize> ele-
ment in the <EthernetKRL> section.
<EthernetKRL>
<Interface>
<MemSize>1048576</MemSize>
...
</EthernetKRL>
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
4. Reboot the robot controller with the settings Cold start and Reload
files.
Description
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• Check the xml file(s) to see if the Ethernet connection can be config-
ured so that less memory is used.
Description
Precondition
Procedure
9.3.18 EKI00022
Possible cause(s) Cause: Schema error in the xml file with the connection configura-
tion (>>> Page 98)
Solution: Eliminating errors in the xml file (>>> Page 98)
Cause: Schema error in the xml file with the connection configuration
Description
The xml file with the connection configuration cannot be read due to a
schema error.
KUKA.Ethernet KRL uses the XPath schema. The syntax specified by the
schema must be followed exactly. For example, no punctuation marks or
structure elements may be missing.
The manner in which the elements and attributes in the xml file are
written – including uppercase and lowercase letters – is specified and
must be followed exactly.
Further information about the XPath schema can be found in the KU-
KA.Ethernet KRL documentation.
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Description
Precondition
Procedure
Messages
9.3.19 EKI00023
Description
The Ethernet connection has already been initialized with the function
EKI_Init().
RET = EKI_Init(CHAR[])
Function Initializes a channel for Ethernet communication
The following actions are performed:
Precondition
Checking instructions
• Check if the following line between the first initialization and the clos-
ing of the connection is programmed multiple times:
RET = EKI_Init("file name")
‒ File name: Name of the xml file with the connection configuration
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.20 EKI00024
Possible cause(s) Cause: IP address and/or port number for the EKI entered incorrect-
ly or not at all (>>> Page 100)
Solution: Entering the correct IP address and port number in the
xml file (>>> Page 101)
Cause: IP address and/or port number for the EKI entered incorrectly or not at all
Description
Examples
<INTERNAL>
Messages
<IP>192.168.23.1</IP>
<PORT>54600</PORT>
</INTERNAL>
<INTERNAL>
<IP>0.0.0.0</IP>
<PORT>54600</PORT>
</INTERNAL>
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• In the xml file with the connection configuration, check if the IP ad-
dress and port number have been entered correctly.
Solution: Entering the correct IP address and port number in the xml file
Precondition
Procedure
9.3.21 EKI00027
Possible cause(s) Cause: CHAR array too small for received data (>>> Page 102)
Solution: Increasing the memory size for the CHAR array
(>>> Page 102)
Description
The CHAR array defined in the KRL program is too small for the received
data.
Checking instructions
• Check the maximum acceptable lengths for the data sets sent by the
external system.
Description
Precondition
• User rights:
‒ User group “Expert”
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.22 EKI00512
Messages
Cause: No Ethernet connection due to hardware error, external sys-
tem (>>> Page 103)
Solution: Eliminating the hardware error of the external system
(>>> Page 104)
Description
Checking instructions
1. Check that the network cables are correctly connected and fitted se-
curely.
2. Interchange the network cables.
Procedure
Description
Due to an error in the software of the external system, there is not Ether-
net connection.
Checking instructions
Description
Description
Due to an error in the hardware of the external system (i.e. loose socket
connection, defective network card, etc.) there is not Ethernet connection.
Checking instructions
Description
9.3.23 EKI00768
Description
Checking instructions
1. Check that the network cables are correctly connected and fitted se-
curely.
2. Interchange the network cables.
Procedure
Description
Due to an error in the hardware of the external system (i.e. loose socket
connection, defective network card, etc.) there is not Ethernet connection.
Messages
Checking instructions
Description
9.3.24 EKI01024
Possible cause(s) Cause: Sent XML document does not correspond to the XPath
schema (>>> Page 105)
Solution: Designing the sent XML document according to the XPath
schema (>>> Page 105)
Cause: Sent XML document does not correspond to the XPath schema
Description
The XML document sent by the external system does not correspond to
the XPath schema.
Further information about the XPath schema can be found in the KU-
KA.Ethernet KRL documentation.
Solution: Designing the sent XML document according to the XPath schema
Description
The XML document sent by the external system must be designed ac-
cording to the XPath schema.
9.3.25 EKI01280
Possible cause(s) Cause: Memory limit reached (number of data elements per memo-
ry) (>>> Page 106)
Solution: Increase the memory limit in the xml file (>>> Page 106)
Description
The number of data elements that can be saved in the memory is limited.
This memory limit has been reached. The Ethernet connection has been
closed to prevent the reception of further data.
The maximum number of elements that can be saved in the memory is
defined in the xml file with the connection configuration:
• Section <INTERNAL> … </INTERNAL>
• Element <BUFFERING … Limit="…"/>
‒ Maximum possible number: 512
• If the BUFFERING element is not configured, the default value ap-
plies:
‒ <BUFFERING Mode="FIFO" Limit="16"/>
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• In the xml file with the connection configuration, check which value is
set as the limit number of elements that can be saved.
Description
Precondition
Messages
Procedure
Description
The number of data elements that can be saved in the memory is limited.
This memory limit has been reached. The Ethernet connection has been
closed to prevent the reception of further data.
The maximum number of elements that can be saved in the memory is
defined in the xml file with the connection configuration:
• Section <INTERNAL> … </INTERNAL>
• Element <BUFFERING … Limit="…"/>
‒ Maximum possible number: 512
• If the BUFFERING element is not configured, the default value ap-
plies:
‒ <BUFFERING Mode="FIFO" Limit="16"/>
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• In the xml file with the connection configuration, check which value is
set as the limit number of elements that can be saved.
Solution: Cyclically checking the data memory and disabling before reaching the
limit
Description
Programming can be used to prevent the memory limit being reached. For
this, cyclically check how many data elements are currently in the data
memory and temporarily disable the memory before reaching the limit.
The following functions are required:
• EKI_STATUS = EKI_CheckBuffer(CHAR[], CHAR[])
Checks how much data is still in the memory. The memory is not
changed.
• EKI_STATUS = EKI_Lock(CHAR[])
Disables the processing of received data. The data can no longer be
stored in the memory.
• EKI_STATUS = EKI_Unlock(CHAR[])
Enables the processing of received data. The data are stored in the
memory again.
EKI_STATUS is the global structure variable into which the return values
Messages
of the function are written. The element Buff from the EKI_STATUS is
relevant for the evaluation.
Buff contains the following value:
• Number of elements still in the memory after access.
Syntax
Example
...
DECL INT limit
DECL EKI_STATUS ret
...
limit = 16
Description
The external system writes data to the EKI memory. If these data are not
called, the EKI memory fills up. To prevent loss of data, the connection is
closed when the EKI memory is full. The TCP protocol detects the closed
connection and interrupts data exchange. The maximum number of data
elements has been written to the EKI memory without them being read.
The procedure for checking whether the EKI memory in the KRL pro-
gram is read is as follows:
Precondition
Checking instructions
Precondition
Procedure
1. Select the program in the Navigator and press Open. The program is
displayed in the editor.
2. Search for the corresponding position in the program and edit it.
Messages
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
9.3.26 EKI01536
Possible cause(s) Cause: Character string sent by the external system too long
(>>> Page 109)
Solution: Adjusting the programming of the external system
(>>> Page 109)
Description
A character string sent by the external system exceeds the maximum per-
missible length. Up to 3600 characters are permitted.
Checking instructions
Description
9.3.27 EKI01792
Possible cause(s) Cause: Memory limit reached (number of bytes for total memory)
(>>> Page 110)
Solution: Increase the memory limit in the xml file (>>> Page 110)
Description
The number of bytes that can be saved in the memory is limited. This
memory limit has been reached. The Ethernet connection has been closed
to prevent the reception of further data.
The maximum number of bytes that can be saved in the memory is de-
fined in the xml file with the connection configuration:
• Section <INTERNAL> … </INTERNAL>
• Element <BUFFSIZE Limit="…"/>
‒ Maximum possible number: 65,534
• If the BUFFSIZE element is not configured, the default value applies:
‒ <BUFFSIZE Limit="16384"/>
Configuration file
An xml file must be configured for every Ethernet connection. The name
of the xml file is also the access key in KRL.
Directory C:\KRC\ROBOTER\Config\User\Common\EthernetKRL
File Example: …\EXT.xml —> EKI_INIT("EXT")
Checking instructions
• Check in the xml file with the connection configuration to see which
byte number is the limit.
Description
Precondition
Procedure
9.3.28 EKI02048
Messages
Possible cause(s) Cause: Software error on the external system leads to timeout
(>>> Page 111)
Solution: Eliminating errors in the software of the external system
(>>> Page 111)
Description
The EKI is configured as a server and is waiting for the connection re-
quest from the external system.
A value for <TIMEOUT Connect="…"/> is entered in the xml file with the
connection configuration. This time has elapsed without the external sys-
tem establishing a connection to the server. The cause is a fault in the
software of the external system.
Checking instructions
Description
Appendix
10 Appendix
Description
Further properties for the EKI can be configured in the section <INTER-
NAL> … </INTERNAL> of the configuration file:
Element Attribute Description
TIMEOUT Receive Time until the attempt to receive data is abor-
ted (optional)
• 0 … 65,534 ms
Default value: 0 ms
Send Time until the attempt to send data is aborted
(optional)
• 0 … 65,534 ms
Default value: 0 ms
BUFFSIZE Receive Size of the socket used to receive data (op-
tional)
• 1 … 65,534 bytes
Default value: Predefined by the system
Send Size of the socket used to send data (option-
al)
• 1 … 65,534 bytes
Default value: Predefined by the system
Description
Precondition
Procedure
<EthernetKRL>
<Interface>
<MemSize>1048576</MemSize>
...
</EthernetKRL>
3. Close the file and respond to the request for confirmation asking
whether the changes should be saved by pressing Yes.
4. Reboot the robot controller with the settings Cold start and Reload
files.
Description
Precondition
Procedure
Appendix
10.4 Command reference
RET = EKI_Init(CHAR[])
Function Initializes a channel for Ethernet communication
The following actions are performed:
RET = EKI_Open(CHAR[])
Function Opens an initialized channel
If the EKI is configured as a client, the EKI connects
to the external system (= Server).
If the EKI has been configured as a server, the EKI
waits for the connection request from the external
system (= Client).
Parameters Type: CHAR
Name of the channel
RET Type: EKI_STATUS
Name of the channel (= name of the xml file with
the connection configuration)
Example RET = EKI_Open("Channel_1")
RET = EKI_Close(CHAR[])
Function Closes an open channel
Parameters Type: CHAR
Name of the channel (= name of the xml file with
the connection configuration)
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_Close("Channel_1")
RET = EKI_Clear(CHAR[])
Function Deletes a channel as well as all associated data
memory and terminates the Ethernet connection.
Parameters Type: CHAR
Name of the channel (= name of the xml file with
the connection configuration)
RET = EKI_Clear(CHAR[])
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_Clear("Channel_1")
Information about the return values of the relevant function can be found
here: (>>> "Return values" Page 44)
Appendix
RET = EKI_Send(CHAR[], CHAR[], INT)
Example 2 RET = EKI_Send("Channel_1", "Root/Test")
Example 3 RET = EKI_Send("Channel_1", MyBytes[])
Example 4 RET = EKI_Send("Channel_1", MyBytes[], 6)
Information about the return values of the relevant function can be found
here: (>>> "Return values" Page 44)
• 3,600
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_SetString("Channel_1", "Root/Message",
"Hello")
Information about the return values of the relevant function can be found
here: (>>> "Return values" Page 44)
Appendix
RET = EKI_GetBool(CHAR[], CHAR[], BOOL)
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_GetBool("Channel_1", "Root/Activ", My-
Bool)
• 512
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_GetBoolArray("Channel_1", "Root/Activ",
MyBool[])
• 512
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_GetIntArray("Channel_1", "Root/
Numbers/One", MyInteger[])
• 512
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_GetRealArray("Channel_1", "Root/Posi-
tion", MyReal[])
Appendix
RET = EKI_GetString(CHAR[], CHAR[], CHAR[])
Function Reads a string out of a memory
Parameter 1 Type: CHAR
Name of the open channel
Parameter 2 Type: CHAR
Name of the position in the XML structure or name
of the element in the raw data
Parameter 3 Type: CHAR
String read out of the memory
Maximum number of characters:
• 3,600
RET Type: EKI_STATUS
Return values of the function
XML example RET = EKI_GetString("Channel_1", "Root/Message",
MyChars[])
Binary example RET = EKI_GetString("Channel_1", "Streams", My-
Stream[])
• 512
• The error number is read out and the corresponding message is dis-
played on the smartHMI. (see parameter 1)
• Optional: If the channel name is specified, it is checked during data re-
ception whether errors have occurred (see parameter 3)
Parameter 1 EKI_STATUS
Return values of the checked function
Parameter 2 Type: ENUM
Type of message displayed on the smartHMI:
RET = EKI_Clear(CHAR[])
Function Deletes a channel as well as all associated data
memory and terminates the Ethernet connection.
Parameters Type: CHAR
Name of the channel (= name of the xml file with
the connection configuration)
RET Type: EKI_STATUS
Return values of the function
Example RET = EKI_Clear("Channel_1")
Appendix
RET = EKI_ClearBuffer(CHAR[], CHAR[])
Function Clears the defined data memory without terminating
the Ethernet connection
(>>> 6.2.6 "Deleting data memories" Page 42)
Parameter 1 Type: CHAR
Name of the channel
Parameter 2 Type: CHAR
Defines the data memory to be deleted
For communication by means of raw data:
RET = EKI_Lock(CHAR[])
Function Disables the processing of received data. The data
can no longer be stored in the memory.
Parameter Type: CHAR
Name of the channel
RET Type: EKI_STATUS
Return values of the function
RET = EKI_Unlock(CHAR[])
Function Enables the processing of received data. The data
are stored in the memory again.
Parameter Type: CHAR
Name of the channel
RET Type: EKI_STATUS
Return values of the function
KUKA Service
11 KUKA Service
Introduction
Information
Availability
Argentina
Ruben Costantini S.A. (Agentur)
Luis Angel Huergo 13 20
Parque Industrial
2400 San Francisco (CBA)
Argentina
Tel. +54 3564 421033
Fax +54 3564 428877
[email protected]
Australia
KUKA Robotics Australia Pty Ltd
45 Fennell Street
Port Melbourne VIC 3207
Australia
Tel. +61 3 9939 9656
[email protected]
www.kuka-robotics.com.au
Belgium
KUKA Automatisering + Robots N.V.
Centrum Zuid 1031
3530 Houthalen
Belgium
Tel. +32 11 516160
[email protected]
www.kuka.be
Brazil
KUKA Roboter do Brasil Ltda.
Travessa Claudio Armando, nº 171
Bloco 5 - Galpões 51/52
Bairro Assunção
CEP 09861-7630 São Bernardo do Campo - SP
Brazil
Tel. +55 11 4942-8299
Fax +55 11 2201-7883
[email protected]
www.kuka-roboter.com.br
Chile
Robotec S.A. (Agency)
Santiago de Chile
Chile
Tel. +56 2 331-5951
Fax +56 2 331-5952
[email protected]
www.robotec.cl
China
KUKA Robotics China Co., Ltd.
No. 889 Kungang Road
Xiaokunshan Town
Songjiang District
201614 Shanghai
P. R. China
Tel. +86 400 820 8865
Fax +86 21 5707 2607
[email protected] oder [email protected]
www.kuka.com
KUKA Service
Germany
KUKA Deutschland GmbH
Zugspitzstr. 140
86165 Augsburg
Germany
Tel. +49 821 797-1926
Fax +49 821 797-41 1926
[email protected]
www.kuka.com
France
KUKA Automatisme + Robotique SAS
Techvallée
6, Avenue du Parc
91140 Villebon S/Yvette
France
Tel. +33 1 6931660-0
Fax +33 1 6931660-1
[email protected]
www.kuka.fr
India
KUKA India Pvt. Ltd.
Office Number-7, German Centre,
Level 12, Building No. - 9B
DLF Cyber City Phase III
122 002 Gurgaon
Haryana
India
Tel. +91 124 4635774
Fax +91 124 4635773
[email protected]
www.kuka.in
Italy
KUKA Roboter Italia S.p.A.
Via Pavia 9/a - int.6
10098 Rivoli (TO)
Italy
Tel. +39 011 959-5013
Fax +39 011 959-5141
[email protected]
www.kuka.it
Japan
KUKA Japan K.K.
YBP Technical Center
134 Godo-cho, Hodogaya-ku
Yokohama, Kanagawa
240 0005
Japan
Tel. +81 45 744 7531
Fax +81 45 744 7541
[email protected]
Canada
KUKA Robotics Canada Ltd.
2865 Argentia Road, Unit 4-5
Mississauga
Ontario L5N 8G6
Canada
Tel. +1 905 858‑5852
Fax +1 905 858-8581
[email protected]
www.kukarobotics.ca
Korea
KUKA Robotics Korea Co. Ltd.
RIT Center 306, Gyeonggi Technopark
1271-11 Sa 3-dong, Sangnok-gu
Ansan City, Gyeonggi Do
426-901
Korea
Tel. +82 31 501-1451
Fax +82 31 501-1461
[email protected]
Malaysia
KUKA Robot Automation (M) Sdn Bhd
South East Asia Regional Office
No. 7, Jalan TPP 6/6
Taman Perindustrian Puchong
47100 Puchong
Selangor
Malaysia
Tel. +60 (03) 8063-1792
Fax +60 (03) 8060-7386
[email protected]
KUKA Service
Mexico
KUKA de México S. de R.L. de C.V.
Progreso #8
Col. Centro Industrial Puente de Vigas
Tlalnepantla de Baz
54020 Estado de México
Mexico
Tel. +52 55 5203-8407
Fax +52 55 5203-8148
[email protected]
www.kuka-robotics.com/mexico
Norway
KUKA Sveiseanlegg + Roboter
Sentrumsvegen 5
2867 Hov
Norway
Tel. +47 61 18 91 30
Fax +47 61 18 62 00
[email protected]
Austria
KUKA CEE GmbH
Gruberstraße 2-4
4020 Linz
Austria
Tel. +43 732 784 752 0
Fax +43 732 793 880
[email protected]
www.kuka.at
Poland
KUKA CEE GmbH Poland
Spółka z ograniczoną odpowiedzialnością
Oddział w Polsce
Ul. Porcelanowa 10
40-246 Katowice
Poland
Tel. +48 327 30 32 13 or -14
Fax +48 327 30 32 26
[email protected]
Portugal
KUKA Robots IBÉRICA, S.A.
Rua do Alto da Guerra n° 50
Armazém 04
2910 011 Setúbal
Portugal
Tel. +351 265 729 780
Fax +351 265 729 782
[email protected]
www.kuka.com
Russia
KUKA Russia OOO
1-y Nagatinskiy pr-d, 2
117105 Moskau
Russia
Tel. +7 495 665-6241
[email protected]
Sweden
KUKA Svetsanläggningar + Robotar AB
A. Odhners gata 15
421 30 Västra Frölunda
Sweden
Tel. +46 31 7266-200
Fax +46 31 7266-201
[email protected]
Switzerland
KUKA Roboter CEE GmbH
Steyregg, Zweigniederlassung Buchs
Heinrich Wehrli-Strasse 27
5033 Buchs
Switzerland
Tel. +41 62 837 43 20
[email protected]
Slovakia
KUKA CEE GmbH
organizačná zložka
Bojnická 3
831 04 Bratislava
Slovakia
Tel. +420 226 212 273
[email protected]
Spain
KUKA Iberia, S.A.U.
Pol. Industrial
Torrent de la Pastera
Carrer del Bages s/n
08800 Vilanova i la Geltrú (Barcelona)
Spain
Tel. +34 93 8142-353
[email protected]
KUKA Service
South Africa
Jendamark Automation LTD (Agentur)
76a York Road
North End
6000 Port Elizabeth
South Africa
Tel. +27 41 391 4700
Fax +27 41 373 3869
www.jendamark.co.za
Taiwan
KUKA Automation Taiwan Co. Ltd.
1F, No. 298 Yangguang ST.,
Nei Hu Dist., Taipei City, Taiwan 114
Taiwan
Tel. +886 2 8978 1188
Fax +886 2 8797 5118
[email protected]
Thailand
KUKA (Thailand) Co. Ltd.
No 22/11-12 H-Cape Biz Sector Onnut
Sukhaphiban 2 road, Prawet
Bangkok 10250
Thailand
Tel. +66 (0) 90-940-8950
[email protected]
Czech Republic
KUKA Roboter CEE GmbH
organizační složka
Pražská 239
25066 Zdiby
Czech Republic
Tel. +420 226 212 273
[email protected]
Turkey
KUKA CEE GmbH
Şerifali Mah.
Bayraktar Bulv. Beyit Sok. No:9-11
34775 Ümraniye/Istanbul
Turkey
Tel. +90 216 508 14 04
[email protected]; [email protected]
www.kuka.com
Hungary
KUKA HUNGÁRIA Kft.
Fö út 140
2335 Taksony
Hungary
Tel. +36 24 501609
Fax +36 24 477031
[email protected]
USA
KUKA Robotics Corporation
51870 Shelby Parkway
Shelby Township
48315-1787
Michigan
USA
Tel. +1 866 873-5852
Fax +1 866 329-5852
[email protected]
www.kuka.com
United Kingdom
KUKA Robotics UK Ltd
Great Western Street
Wednesbury West Midlands
WS10 7LL
United Kingdom
Tel. +44 121 505 9970
Fax +44 121 505 6589
[email protected]
www.kuka-robotics.co.uk
P
Ping.................................................................12
Product description......................................... 11
Program examples......................................... 49
Programming.................................................. 25
Programming tips........................................... 34
Protocol types.................................................14
S
Safety..............................................................17
Safety instructions............................................ 7
Saving data.....................................................13
Server mode.............................................14, 37
Server program...............................................49
Server program, communication parameters 52
Server program, user interface......................50
smartHMI.......................................................... 9
smartPAD..........................................................9
Socket............................................................... 9
Support request............................................ 125
System requirements
Hardware................................................... 19
Software.....................................................19
T
Target group..................................................... 7
TCP...................................................................9
Terms used....................................................... 8
Time stamp..................................................... 44
Trademarks....................................................... 9
Training............................................................. 7
Transmission protocol.....................................11
U
UDP.................................................................. 9
Uninstalling
via smartHMI............................................. 21
via WorkVisual...........................................20
Updating via smartHMI...................................20
Updating via WorkVisual................................ 19
W
Warnings........................................................... 7
X
XML...................................................................9
XPath................................................... 9, 29, 32