Anda di halaman 1dari 48

Department of Electrical Engineering

& Information Technology

Master’s Project
Winter Semester 2015/2016

KUKA robot

Aditya Deshmukh
Florian Schnitzer
Puneeth Sridhar
Supervisor:
Prof. Dr.-Michael Wagner
Master project KUKA robot

Table of Contents
1 Introduction....................................................................................................... 4
2 Communication PC – KUKA Robot via Ethernet ............................................ 5
2.1 Settings ............................................................................................................................ 5
1.2.1 Settings in PC ............................................................................................................. 5
1.2.1 Settings in KUKA Robot .......................................................................................... 5
1.3 Interface description..................................................................................................... 5
1.3.1 Signals from robot to PC ......................................................................................... 5
1.3.2 Signals from PC to robot ......................................................................................... 6
1.4 KUKA-Program............................................................................................................... 7
1.4.1 Data file ........................................................................................................................ 7
1.4.2 Way of working .......................................................................................................... 7
1.4.2.1 Initialization ............................................................................................................. 8
1.4.2.2 Communication...................................................................................................... 9
1.4.2.3 Robot movement ................................................................................................. 12
1.5 C#-Program ................................................................................................................... 13
1.5.1 Way of working ........................................................................................................ 13
1.5.1.1 Non-cyclic program ............................................................................................ 13
1.5.1.2 Cyclic program ..................................................................................................... 16
1.5.1.3 Conversion functions ......................................................................................... 17
1.5.2 Using of Robot-Class ............................................................................................. 19
1.5.3 Using User-Interface ............................................................................................... 20
3 Control Cabinet for Lighting .......................................................................... 21
3.1 Operational Sequence................................................................................................ 21
3.2 Control Cabinet Details.............................................................................................. 22
3.2.1 Optimum surface protection ................................................................................ 23
3.2.2 PU foam seal ............................................................................................................. 23
3.2.3 Earthing...................................................................................................................... 24
3.2.4 Lock ............................................................................................................................ 24
3.2.5 Dimensional Details........................................................................................ 25
3.3 Interconnecting the Component.............................................................................. 26
3.3.1 Mounting the Components ................................................................................... 26

2
Master project KUKA robot

3.3.2 Introduction to the components .......................................................................... 27


3.3.2.1 Siemens SITOP POWER 5 ................................................................................. 27
3.3.2.2 Fuse Case .............................................................................................................. 28
3.3.2.3 Double-through terminal 5.2mm...................................................................... 29
3.3.2.4 SIEMENS SIRUS Contactor ............................................................................... 30
3.3.2.5 QUANCOM OPTOCOUPLER DETAILS ........................................................... 31
3.3.3 Wiring Diagram ........................................................................................................ 32
4 Safety............................................................................................................... 35
4.1 Safety fence .................................................................................................................. 35
4.2 Cabinet for safety switches ...................................................................................... 35
4.3 Emergency-Stop .......................................................................................................... 42
4.4 Door switch ................................................................................................................... 43
List of Figures ............................................................................................................... 46
List of Tables................................................................................................................. 47
Bibliography .................................................................................................................. 48

3
Master project KUKA robot

1 Introduction

The objective of Control Cabinet is to actuate the operational sequence governed


by IcoNet in PC. It is basically an electrical cabinet, which is in compliance with the
International Protection 66 (the first digit ‘6’ indicates that it is totally dust tight and
the second digit ‘6’ indicates the Protection against string water jets and waves).
The Control Cabinet interconnects the components such as USB Opto-Coupler,
power supply, relays, and fuses which was designed in TinyCad and implemented.

4
Master project KUKA robot

2 Communication PC – KUKA Robot via


Ethernet
2.1 Settings
1.2.1 Settings in PC
On the PC only the IP address and the subnetmask must be set:
IP-Address: 172.31.1.145
Subnetmask: 255.255.0.0

1.2.1 Settings in KUKA Robot


All necessary settings can be found in the following file at the KUKA-Robot:
C:\KRC\ROBOTER\Config\User\Common\EthernetKRL\BinaryFixed.xml
1 <ETHERNETKRL>
2 <CONFIGURATION>
3 <EXTERNAL>
4 <IP>172.31.1.145</IP>
5 <PORT>1000</PORT>
6 </EXTERNAL>
7 </CONFIGURATION>
8 <RECEIVE>
9 <RAW>
10 <ELEMENT Tag="Buffer" Type="BYTE" Set_Flag="1" Size="200"/>
11 </RAW>
12 </RECEIVE>
13 ; <SEND/>
14 </ETHERNETKRL>

The IP address of the PC must be entered in line 4. In our case this is 172.31.1.145. In
line 5 the port number, here 1000, must be entered. In line 10, the size of the data range
that is transferred to the PC, be can be configured. 200 Bytes are here enough.

1.3 Interface description


1.3.1 Signals from robot to PC
The following signals are sent from the KUKA robot to the PC:
Type Name
BOOL lifebit
BOOL robot_at_home
BOOL reserve
BOOL reserve
FLOAT actual_position.x
FLOAT actual_position.y
FLOAT actual_position.z
FLOAT actual_position.a

5
Master project KUKA robot

FLOAT actual_position.b
FLOAT actual_position.c
INT reserve
INT reserve
INT reserve
INT reserve
Table 1: Signals from robot to PC

Description of the signals:


lifebit: This Boolean variable changes every cycle its value. The variable is
used for monitoring the communication between the robot controller
and PC
robot_at_home: This Boolean variable has the value 1, if the robot stays in its home
position
actual_position.x: This float value gives the current x-coordinate of the robot
actual_position.y: This float value gives the current y-coordinate of the robot
actual_position.z: This float value gives the current z-coordinate of the robot
actual_position.a: This float value gives the current a-coordinate of the robot
actual_position.b: This float value gives the current b-coordinate of the robot
actual_position.c: This float value gives the current c-coordinate of the robot
reserve: These variables are currently not used.

1.3.2 Signals from PC to robot


The following signals are sent from the PC to the KUKA robot:
Type Name
BOOL lifebit
BOOL move_to_position
BOOL move_to_home
BOOL reserve
FLOAT new_pos.x
FLOAT new_pos.y
FLOAT new_pos.z
FLOAT new_pos.a
FLOAT new_pos.b
FLOAT new_pos.c
INT new_pos.type
INT reserve
INT reserve
INT reserve
Table 2: Signals from PC to robot

Description of the signals:

6
Master project KUKA robot

lifebit: This Boolean variable changes every cycle its value. The variable is
used for monitoring the communication between the robot controller
and PC
move_to_position: This Boolean variable is set to 1, if the robot should move to a new
position, given in the variable new_pos.
move_to_home: This Boolean variable is set to 1, if the robot should move to its
home position
new_pos.x: This float variable sets the x-coordinate of the new position.
new_pos.y: This float variable sets the y-coordinate of the new position.
new_pos.z: This float variable sets the z-coordinate of the new position.
new_pos.a: This float variable sets the a-coordinate of the new position.
new_pos.b: This float variable sets the b-coordinate of the new position.
new_pos.c: This float variable sets the c-coordinate of the new position.
new_pos.type: This integer variable sets the type of the new position. The values of
new_pos.type can be 1 (new pick position), 2 (new home position)
or 3 (new place position). At the values 2 and 3 is no movement of
the robot is performed. Only the new coordinates are stored
reserve: These variables are currently not used.

1.4 KUKA-Program
The KUKA-Program can be found at: KRC:\R1\Program\binaryfixed.src.
The corresponding data file can be found at: KRC:\R1\Program\binaryfixed.dat.
1.4.1 Data file
In the data file all main variables are stored. They are declared global to allow a
monitoring in the KUKA teach panel:
1 DEFDAT binaryfixed PUBLIC
2 DECL GLOBAL REAL x
3 DECL GLOBAL REAL y
4 DECL GLOBAL REAL z
5 DECL GLOBAL REAL a
6 DECL GLOBAL REAL b
7 DECL GLOBAL REAL c
8 DECL GLOBAL POS pickpos
9 DECL GLOBAL POS homepos
10 DECL GLOBAL POS dispos
11 DECL GLOBAL BOOL lifebit
12 DECL GLOBAL BOOL athome
13 DECL GLOBAL BOOL movetopos
14 DECL GLOBAL BOOL movetohome
15 DECL GLOBAL REAL offsetwithproduct
16 DECL GLOBAL REAL offsetwithoutproduct
17 DECL GLOBAL INT type
18 ENDDAT

1.4.2 Way of working


7
Master project KUKA robot

The program can be divided in three parts. The first part is the initialization of the
communication and of variables. This part is only executed at the start of execution. In
the second section the communication with the PC is handled. The last section
executes the movement of the robot. The second and the third part of the program are
executed cyclic.

1.4.2.1 Initialization
This part can be found in the lines 1 to 53. First the declaration of auxiliary variables
like loop counters and buffers is done:

1 DEF binaryfixed( )
2 ;FOLD Declaration
3 INT i
4 INT OFFSET
5 DECL EKI_STATUS RET
6 CHAR Bytes[200]
7 BOOL spare
8 ;ENDFOLD

After the declaration of the variables the initialization of the robot and the default setting of
variables takes place. The x, y and z-coordinates and offsetwithproduct and
offsetwithoutproduct are measured in mm. The a, b and c-coordinates are measured in
degrees.

9 ;FOLD INI
10 ;FOLD BASISTECH INI
11 BAS (#INITMOV, 0 )
12 ;ENDFOLD (BASISTECH INI)
13 ;FOLD USER INI
14 ;Make your modifications here
15 offsetwithproduct = 300
16 offsetwithoutproduct = 30
17 homepos.x = 497
18 homepos.y = 40
19 homepos.z = 380
20 homepos.a = -44
21 homepos.b = 87
22 homepos.c = -170
23 homepos.s = 6
24 homepos.t = 27
25 pickpos.s = 6
26 pickpos.t = 27
27 dispos.x = 1025
28 dispos.y = 600
29 dispos.z = 335
30 dispos.a = 56
31 dispos.b = 87
32 dispos.c = 180
33 dispos.s = 6
34 dispos.t = 27
35 athome = FALSE
36 lifebit = TRUE
37 type = 0
38 ;movetohome = FALSE
39 ;movetopos = FALSE
40 ;ENDFOLD (USER INI)
41 ;ENDFOLD (INI)
42 ;FOLD Initialize sample data
43
44 FOR i = 1 TO 200
45 Bytes[i] = 0
46 ENDFOR
47
48 OFFSET = 0
49 ;ENDFOLD
50

8
Master project KUKA robot

After that the initialization of the Ethernet connection is done. The function EKI_INIT()
Initializes a channel for Ethernet communication. The following actions are performed:
The configuration is read in, the data memories are created and the Ethernet connection
is prepared. [1]. The parameter of the function is name of the corresponding xml-file,
which is stored in: C:\KRC\ROBOTER\Config\User\Common\EthernetKRL\
The function EKI_Open() opens an initialized channel. If the Ethernet KRL interface is
configured as a client, the interface connects to the server. If the Ethernet KRL interface is
configured as a server, the interface waits for the connection. [1] The parameter of the
function is name of the corresponding xml-file, which is stored in:
C:\KRC\ROBOTER\Config\User\Common\EthernetKRL\

51 RET = EKI_Init("BinaryFixed")
52 RET = EKI_Open("BinaryFixed")
53

1.4.2.2 Communication
This part can be found in the lines 54 to 118.
Fist the data sending part is executed. Therefor the values of the variables must be
written to a Byte-buffer. This can be done with the function “CAST_TO”.
CAST_TO makes it possible to process up to 4 KB of data. CAST_TO groups individual
variables together as a single buffer. Maximum buffer size is 4 KB (= 4096 bytes). If the
quantity of data is so great that the maximum buffer size is insufficient, several statements
must be used.
CAST_TO does not trigger an advance run stop. If, however, variables are processed that
do trigger an advance run stop, then an advance run stop is triggered indirectly. The
parameters of CAST_TO are “Buffer”, “OFFSET” and “Var”. Buffer must be a char array to
which the Var variables are written. The parameter “OFFSET” gives the position within
the buffer (in bytes) after which data are to be written to the buffer. The offset starts with
0. If OFFSET = 0 writing commences at the first position.
If OFFSET = 2 writing commences at the third position, the positions 1 and 2 are ignored.
Var contains the variables that are written to the buffer. A maximum of 10 variables per
statement are possible.
In the case of non-initialized variables or array elements, random values are written to the
buffer. Since random values can cause problems for the buffer receiver, it is
recommended that all variables and array elements should be initialized. The number of
bytes written to the buffer by each variable is determined by the data type of the variable
and can be seen in Table 3. [2]

Permissible data type Size


INT 4 bytes
REAL 4 bytes
BOOL 1 bytes
CHAR 1 bytes
ENUM 4 bytes

9
Master project KUKA robot

SIGNAL 1 bytes
Table 3: Permissible data type in CAST statements [2]

In this case three CAST_TO calls are used. The first one converts all boolean variables.
The second one converts all real variables and the third one converts all integer variables.
After the first call the offset must be set to 4 because 4 boolean variables were converted:
OFFSET = 4 x 1 byte = 4
After the second call the offset must be set to 28 because 6 real variables were
converted:
OFFSET = 4 x 1 byte + 6 x 4 byte = 28
After converting the data they can be sent with the function EKI_Send. The two
parameters of this function are the name of the open channel and name of the data row.
[1]

54 LOOP
55
56 ;FOLD Datasending
57 OFFSET = 0
58
59 CAST_TO(Bytes[], OFFSET, lifebit, athome, FALSE, TRUE)
60 OFFSET = 4
61 CAST_TO(Bytes[], OFFSET, $POS_ACT.X, $POS_ACT.Y, $POS_ACT.Z, $POS_ACT.A,
$POS_ACT.B, $POS_ACT.C)
62 OFFSET = 28
63 CAST_TO(Bytes[], OFFSET, 1, 2, 3, 4)
64 RET = EKI_Send("BinaryFixed", Bytes[])
65 ;ENDFOLD
66

At data receiving the controller waits for FLAT[1]. This is set if new data are available.
Then the new values are written out with the function EKI_GetString(). The three
parameters of this function are the name of the open channel, the name of the element in
the raw data and the string, in which the data are written. [1]
After this the new values of the variables must be extracted from the string. This can be
done using the function “CAST_FROM”.
This function makes it possible to process up to 4 KB of data. If the quantity of data is so
great that the maximum buffer size is insufficient, several statements must be used.
CAST_FROM does not trigger an advance run stop If, however, variables are processed
that do trigger an advance run stop, then an advance run stop is triggered indirectly. This
function has the parameters “BUFFER”, “OFFSET” and “Var”. “BUFFER” is the string
whose data are used to fill the variables. “OFFSET” is the position within the buffer (in
bytes) after which the data are used to fill “VAR”. The offset starts with 0. If “OFFSET” = 0
the buffer is used from the first position. If “OFFSET” = 2 the buffer is used from the third
position. Positions 1 and 2 are ignored.
“VAR” contains the variables that are filled with the data from the buffer. A maximum of 10
variables per statement are possible. The number of bytes each variable receives from
the buffer is determined by its data type and can be seen in Table 3. [2]

In this case three CAST_FROM calls are used. The first one converts all boolean
variables. The second one converts all real variables and the third one converts all integer

10
Master project KUKA robot

variables. After the first call the offset must be set to 4 because 4 boolean variables were
converted:
OFFSET = 4 x 1 byte = 4
After the second call the offset must be set to 28 because 6 real variables were
converted:
OFFSET = 4 x 1 byte + 6 x 4 byte = 28

67 ;FOLD Data receive


68
69 WAIT FOR $FLAG[1]
70 RET = EKI_GetString("BinaryFixed", "Buffer", Bytes[])
71 $FLAG[1] = FALSE
72
73 OFFSET = 0
74 CAST_FROM(Bytes[], OFFSET, lifebit, movetopos, movetohome, spare)
75
76 OFFSET = 4
77 CAST_FROM(Bytes[], OFFSET, X, Y, Z, A, B, C)
78
79
80 OFFSET = 28
81 CAST_FROM(Bytes[], OFFSET, type)
82 ;ENDFOLD
83

After converting the data the new values are set to the corresponding variables.
Depending on the variable type the new values are stored to the variables pickpos,
homepos or dispos:

84 ;FOLD Setparameter
85 SWITCH type
86 CASE 1
87 pickpos.x = X
88 pickpos.y = Y
89 pickpos.z = Z
90 pickpos.a = A
91 pickpos.b = B
92 pickpos.c = C
93 pickpos.s = 6
94 pickpos.t = 27
95
96 CASE 2
97 homepos.x = X
98 homepos.y = Y
99 homepos.z = Z
100 homepos.a = A
101 homepos.b = B
102 homepos.c = C
103 homepos.s = 6
104 homepos.t = 27
105
106 CASE 3
107 dispos.x = X
108 dispos.y = Y
109 dispos.z = Z
110 dispos.a = A
111 dispos.b = B
112 dispos.c = C
113 dispos.s = 6
114 dispos.t = 27

11
Master project KUKA robot

115
116 DEFAULT
117 ENDSWITCH
118 ;ENDFOLD

1.4.2.3 Robot movement


This part can be found in the lines 119 to 161.
119
120 IF (movetopos == TRUE) THEN
121
122 BAS(#INITMOV, 0)
123 pickpos.z = pickpos.z + offsetwithoutproduct
124 PTP pickpos
125
126 pickpos.z=pickpos.z - offsetwithoutproduct
127 PTP pickpos
128
129 ;vacuum on
130 WAIT SEC 1
131
132 dispos.z=dispos.z+offsetwithproduct
133 PTP dispos
134
135 dispos.z=dispos.z-offsetwithproduct
136 PTP dispos
137
138 ;vacuum off
139 WAIT SEC 1
140
141 dispos.z=dispos.z+offsetwithoutproduct
142 PTP dispos
143
144 dispos.z=dispos.z-offsetwithoutproduct
145 athome = FALSE
146
147 ELSE
148 ENDIF
149 athome = FALSE
150 IF (movetohome) THEN
151 PTP homepos
152 athome = TRUE
153 ENDIF
154 WAIT SEC 1
155
156 ENDLOOP
157
158 RET = EKI_Close("BinaryFixed")
159 RET = EKI_Clear("BinaryFixed")
160
161 END

The movements of the robot are performed by point-to-point movements. The call of a
point to point movement is made by the command PTP. Then the coordinates of the
destination of the movement must be entered. Here, this is done by using the variables
pickpos, dispos or homepos.
Modifying the z-coordinates during movement is necessary because otherwise a collision
can occur with a neighbouring product. First the robot moves over the target point and
then moves down. After gripping the product the robot moves first vertically up and then
moves to the next position.
In the lines 130, 139 and 154 the robot waits for one second. This is necessary to grip the
object.
12
Master project KUKA robot

To close the connection to the PC the functions EKI_Close() and EKI_Clear(). The
function EKI_Close() closes an open channel. The parameter of this function is the name
of the channel. The function EKI_Clear() deletes a channel and terminates the
connection. The parameter of this function is also the name of the channel. [1]
In the lines 129 and 138 the commands for switching on or off of the vacuum have to be
inserted after installation of the gripper.

1.5 C#-Program
1.5.1 Way of working
Just like the KUKA program the C#-program can also divided into an non-cyclic
initialization part and a cyclic part. In addition, functions for converting the data which are
exchanged with the robot, are necessary.

1.5.1.1 Non-cyclic program


1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 using System.Net.Sockets;
7 using System.Net;
8 using System.Threading;
9 using System.IO;
10
11 using System.Windows.Forms;
12
13
14 namespace KUKA_Communication
15 {
16 class KUKA_Robot
17 {

The first important definitions are the definitions of the datasets which are sent to the
robot and received from the robot. In these six constants the number of variables must be
defined. The numbers must be the same as in the KUKA robot.
18 //Definition data sets, must be equal in KUKA-Robot
19 const int NUMBER_BOOL_VALUES_FROM_KUKA = 4;
20 const int NUMBER_FLOAT_VALUES_FROM_KUKA = 6;
21 const int NUMBER_INT_VALUES_FROM_KUKA = 4;
22 const int NUMBER_BOOL_VALUES_TO_KUKA = 4;
23 const int NUMBER_FLOAT_VALUES_TO_KUKA = 6;
24 const int NUMBER_INT_VALUES_TO_KUKA = 4;
25
The second main declaration is the declaration of the data structures. Two structures are
defined. “values_from_kuka_type” is used for the receiving data, “values_to_kuka_type” is
used for the sending data.
26 //Deklaration
27 public struct values_from_kuka_type
28 {
29 public bool[] boolvalues;
30 public float[] floatvalues;
31 public int[] intvalues;
32
33 public values_from_kuka_type(bool[] _boolvalues, float[] _floatvalues,
int[] _intvalues)
34 {
35 boolvalues = new bool[NUMBER_BOOL_VALUES_FROM_KUKA];

13
Master project KUKA robot

36 floatvalues = new float[NUMBER_FLOAT_VALUES_FROM_KUKA];


37 intvalues = new int[NUMBER_INT_VALUES_FROM_KUKA];
38
39 }
40 };
41
42 public struct values_to_kuka_type
43 {
44 public bool[] boolvalues;
45 public float[] floatvalues;
46 public int[] intvalues;
47
48 public values_to_kuka_type(bool[] _boolvalues, float[] _floatvalues, int[]
_intvalues)
49 {
50 boolvalues = new bool[NUMBER_BOOL_VALUES_TO_KUKA];
51 floatvalues = new float[NUMBER_FLOAT_VALUES_TO_KUKA];
52 intvalues = new int[NUMBER_INT_VALUES_TO_KUKA];
53 }
54 };
55
For new coordinates the structure “kuka_pos_Type” is used. In addition to the coordinates
the type of the new position is set in this structure.

56 public struct kuka_pos_Type


57 {
58 public float x;
59 public float y;
60 public float z;
61 public float a;
62 public float b;
63 public float c;
64 public int type;
65
66 public kuka_pos_Type(float _x, float _y, float _z, float _a, float _b,
float _c, int _type)
67 {
68 x = _x;
69 y = _y;
70 z = _z;
71 a = _a;
72 b = _b;
73 c = _c;
74 type = _type;
75 }
76 };
77

After the definition of the structures all necessary variables are declared:

78 private volatile IPAddress ipadress;


79 private Thread Connection_Thread = null;
80 private volatile TcpListener listener;
81 private volatile TcpClient c;
82 private volatile BinaryReader r;
83 private volatile BinaryWriter w;
84 private values_from_kuka_type data_from_kuka = new values_from_kuka_type(new
bool[NUMBER_BOOL_VALUES_FROM_KUKA], new float[NUMBER_FLOAT_VALUES_FROM_KUKA], new
int[NUMBER_INT_VALUES_FROM_KUKA]);
85 private values_to_kuka_type data_to_kuka = new values_to_kuka_type(new
bool[NUMBER_BOOL_VALUES_FROM_KUKA], new float[NUMBER_FLOAT_VALUES_TO_KUKA], new
int[NUMBER_INT_VALUES_TO_KUKA]);
86 private volatile bool kuka_connected = false;
87 private volatile bool move_to_home = true;
88 private volatile bool move_to_position = false;
89 private volatile bool robot_at_home = false;
90 private volatile bool lifebit = false;
91 public volatile bool enable_robot_to_home = false;
92 private kuka_pos_Type actual_position;
93 private volatile Queue<kuka_pos_Type> buffer = new Queue<kuka_pos_Type>();
94
95

14
Master project KUKA robot

The function “initCommunication” initialize the communication to the KUKA robot. In line
103 a ping command is executed. This checks if the connection to the robot controller is
available. If the connection is successful a TCP-listener is started. The listener waits until
the client is accepted. Finally in lines 114 and 115 a binary reader and a binary writer are
initialized.
96
97 public bool initCommunication(IPAddress _ipadress)
98 {
99 ipadress = _ipadress;
100
101 //check connection
102
103 System.Net.NetworkInformation.Ping ping = new
System.Net.NetworkInformation.Ping();
104 System.Net.NetworkInformation.PingReply reply = ping.Send(ipadress);
105 if (reply.Status == System.Net.NetworkInformation.IPStatus.Success)
106 {
107 // connect to port 1000
108 listener = new TcpListener(ipadress, 1000);
109 // start listener
110 listener.Start();
111 // wait for client request
112 c = listener.AcceptTcpClient();
113
114 r = new BinaryReader(c.GetStream(), Encoding.Unicode);
115 w = new BinaryWriter(c.GetStream(), Encoding.Unicode);
116 kuka_connected = true;
117 return true;
118 }
119 else
120 {
121 //kuka_connected = false;
122 return false;
123 }
124 }
125

The function “disconnectCommunication” can closes the connection to the KUKA robot.
The binary writer clears all buffers, the TCP-client is closed and the listener stops also:

126 public void disconnectCommunication()


127 {
128 w.Flush();
129 c.Close();
130 listener.Stop();
131 }
132

The function startCommunication starts the communication with the robot controller. The
cyclic function “communication” is called in a separate thread.

133 public bool startCommunication()


134 {
135 communication();
136 if (true)//(kuka_connected == false)
137 {
138 //Check ethernet-connection
139 Thread communicationThread = new Thread(communication);
140 this.Connection_Thread =
141 new Thread(new ThreadStart(this.communication));
142
143 this.Connection_Thread.Start();
144 // Start the connection thread.
145 communicationThread.Start();
146 return true;
147 }
148 else
149 {
150 return false;

15
Master project KUKA robot

151 }
152 //return true;
153 }
154

1.5.1.2 Cyclic program


The cyclic program is executed in an endless loop. First the buffer for the sending data
and the receiving data are initialized. Then .the binary reader reads the data from the
KUKA robot (line 168). The function parameters are the name of the buffer into which the
data of the robot are written, the start index for reading (0) and the number bytes which
are written to the buffer (200). In the next step the incoming data must be converted. The
conversion is done by the function “convert_value_from_kuka”. The detailed description of
this function can be seen in 1.5.1.3. The last step is to write the converted values to the
real variables of the C#-program. This is done in the lines 173 to 186.
155 private void communication()
156 {
157 byte[] recebuf;
158 byte[] sendbuf;
159
160 while (true)
161 {
162 if (kuka_connected == true)
163 {
164 recebuf = new byte[200];
165 sendbuf = new byte[200];
166
167 //Read data
168 r.Read(recebuf, 0, 200);
169
170 //Convert data
171 data_from_kuka = convert_values_from_kuka(recebuf);
172
173 lifebit = data_from_kuka.boolvalues[0];
174 robot_at_home = data_from_kuka.boolvalues[1];
175 // = data_from_kuka.boolvalues[2];
176 // = data_from_kuka.boolvalues[3];
177 actual_position.x = data_from_kuka.floatvalues[0];
178 actual_position.y = data_from_kuka.floatvalues[1];
179 actual_position.z = data_from_kuka.floatvalues[2];
180 actual_position.a = data_from_kuka.floatvalues[3];
181 actual_position.b = data_from_kuka.floatvalues[4];
182 actual_position.c = data_from_kuka.floatvalues[5];
183 // = data_from_kuka.intvalues[0];
184 // = data_from_kuka.intvalues[1];
185 // = data_from_kuka.intvalues[2];
186 // = data_from_kuka.intvalues[3];
187
188

If there are entries in the FIFO buffer, the next entry is read out and the coordinates of the
new point is written to the data structure for the data to the robot. If no entries are
available the variable move_to_home is set to 1, if the user enables this function.
189 //Create data for KUKA
190 if (buffer.Count() > 0)
191 {
192 try
193 {
194 move_to_position = true;
195 move_to_home = false;
196 kuka_pos_Type new_pos = buffer.First();
197 buffer.Dequeue();
198 data_to_kuka.floatvalues[0] = new_pos.x; //x
199 data_to_kuka.floatvalues[1] = new_pos.y; //y

16
Master project KUKA robot

200 data_to_kuka.floatvalues[2] = new_pos.z; //z


201 data_to_kuka.floatvalues[3] = new_pos.a; //a
202 data_to_kuka.floatvalues[4] = new_pos.b; //b
203 data_to_kuka.floatvalues[5] = new_pos.c; //c
204 data_to_kuka.intvalues[0] = new_pos.type;
//Position type 1: Normal, 2: Home-Position, 3: Discharge-Position
205 }
206 catch
207 {
208 //move_to_position = false;
209 }
210 }
211 else
212 {
213 move_to_position = false;
214 if ((robot_at_home == false) & (enable_robot_to_home == true))
215 {
216 move_to_home = true;
217 }
218 else
219 {
220 move_to_home = false;
221 }
222 }
223

In the next step all other necessary variables are written to the data structure. The 4th
boolean variable and the 2nd, 3rd and 4th integer variable are currently not used, but they
can be used in future.
224 data_to_kuka.boolvalues[0] = !lifebit;
//Lifebit
225 data_to_kuka.boolvalues[1] = move_to_position;
//Move to Position
226 data_to_kuka.boolvalues[2] = move_to_home;
//Move to Home if no Job available
227 data_to_kuka.boolvalues[3] = false;
//Spare
228
229
230
231 data_to_kuka.intvalues[1] = 10;
//Spare
232 data_to_kuka.intvalues[2] = 11;
//Spare
233 data_to_kuka.intvalues[3] = 12;
//Spare
234

Before sending the data to the robot the data must be converted again. This is done by
the function “convert_values_to_kuka”. The detailed description of this function can be
seen in 1.5.1.3. In the last step the binary writer writes the sending buffer to the KUKA
robot. After a waiting time of one second the cyclic program starts from the beginning.
235 ////Convert data
236 sendbuf = convert_values_to_kuka(data_to_kuka);
237
238 w.Write(sendbuf);
239 Thread.Sleep(1000);
240 }
241 }
242 }
243

1.5.1.3 Conversion functions


To add new coordinates to the FIFO-buffer the function “Enqueue” is used:

17
Master project KUKA robot

244
245 public void newDataSet(float x, float y, float z, float a, float b, float c,
int type)
246 {
247 buffer.Enqueue(new kuka_pos_Type(x, y, z, a, b, c, type));
248 }
249

For converting the data two functions are necessary, one for the data from the robot and
one for the data to the robot. The conversion of the file depends on the data type.
Therefore, the conversion of boolean values must, float values and integer values must
be performed separately.
Boolean values can be converted using the function “Convert.ToBoolean” (Line 260). The
conversion of float values and integer values is more complex, because these values
consist of four bytes. So in the first step the corresponding four byte must be stored in an
array. Then this array can be converted with the functions „BitConverter.ToSingle" or
"BitConverter.ToInt32" to the corresponding data types.
250 private values_from_kuka_type convert_values_from_kuka(byte[] recebuf)
251 {
252 byte[] bytenumber = new byte[4];
253 byte[] boolnumber = new byte[1];
254 values_from_kuka_type values = new values_from_kuka_type(new
bool[NUMBER_BOOL_VALUES_FROM_KUKA], new float[NUMBER_FLOAT_VALUES_FROM_KUKA], new
Int32[NUMBER_INT_VALUES_FROM_KUKA]);
255 int booloffset = 0, floatoffset = 0;
256
257 //Converting Bool-Values
258 for (int i = 0; i < NUMBER_BOOL_VALUES_FROM_KUKA; i++)
259 {
260 values.boolvalues[i] = Convert.ToBoolean(recebuf[i]);
261 booloffset = i + 1;
262 }
263
264 //Converting Float-Values
265 for (int i = 0; i < NUMBER_FLOAT_VALUES_FROM_KUKA; i++)
266 {
267 bytenumber[0] = recebuf[booloffset + i * 4];
268 bytenumber[1] = recebuf[booloffset + i * 4 + 1];
269 bytenumber[2] = recebuf[booloffset + i * 4 + 2];
270 bytenumber[3] = recebuf[booloffset + i * 4 + 3];
271 values.floatvalues[i] = BitConverter.ToSingle(bytenumber, 0);
272 floatoffset = (i + 1) * 4;
273 }
274
275 //Converting Int-Values
276 for (int i = 0; i < NUMBER_INT_VALUES_FROM_KUKA; i++)
277 {
278 bytenumber[0] = Convert.ToByte(recebuf[booloffset + floatoffset + i *
4]);
279 bytenumber[1] = Convert.ToByte(recebuf[booloffset + floatoffset + i * 4
+ 1]);
280 bytenumber[2] = Convert.ToByte(recebuf[booloffset + floatoffset + i * 4
+ 2]);
281 bytenumber[3] = Convert.ToByte(recebuf[booloffset + floatoffset + i * 4
+ 3]);
282 values.intvalues[i] = BitConverter.ToInt32(bytenumber, 0);
283 }
284
285 return values;
286 }
287

The conversion of the values which are sent to the robot is a little easier. The values can
be converted by using the function “BitConverter.GetBytes”. To convert float values or
integer values this function must be called 4 times (see lines 305 to 308)
288 private byte[] convert_values_to_kuka(values_to_kuka_type values)
289 {

18
Master project KUKA robot

290
291 byte[] sendbuf = new byte[200];
292 int booloffset = 0, floatoffset = 0;
293
294 //Convert Bool values:
295 for (int i = 0; i < NUMBER_BOOL_VALUES_TO_KUKA; i++)
296 {
297 sendbuf[i] = BitConverter.GetBytes(values.boolvalues[i])[0];
298
299 booloffset = i + 1;
300 }
301
302 //Convert Float values:
303 for (int i = 0; i < NUMBER_FLOAT_VALUES_TO_KUKA; i++)
304 {
305 sendbuf[booloffset + i * 4] =
BitConverter.GetBytes(values.floatvalues[i])[0];
306 sendbuf[booloffset + i * 4 + 1] =
BitConverter.GetBytes(values.floatvalues[i])[1];
307 sendbuf[booloffset + i * 4 + 2] =
BitConverter.GetBytes(values.floatvalues[i])[2];
308 sendbuf[booloffset + i * 4 + 3] =
BitConverter.GetBytes(values.floatvalues[i])[3];
309 floatoffset = (i + 1) * 4;
310 }
311
312 //Convert Int values:
313 for (int i = 0; i < NUMBER_INT_VALUES_TO_KUKA; i++)
314 {
315 sendbuf[booloffset + floatoffset + i * 4] =
BitConverter.GetBytes(values.intvalues[i])[0];
316 sendbuf[booloffset + floatoffset + i * 4 + 1] =
BitConverter.GetBytes(values.intvalues[i])[1];
317 sendbuf[booloffset + floatoffset + i * 4 + 2] =
BitConverter.GetBytes(values.intvalues[i])[2];
318 sendbuf[booloffset + floatoffset + i * 4 + 3] =
BitConverter.GetBytes(values.intvalues[i])[3];
319 }
320
321 return sendbuf;
322 }
323 }
324 }

1.5.2 Using of Robot-Class


The complete communication between robot controller and PC is included into a C#-
class. So the using of the communication is very simple to handle.
First step is to create a new object of this class:
KUKA_Robot robot = new KUKA_Robot();

Then the function “initCommunication” must be called to initialize the communication with
the robot controller. The argument of this function is the IP address of the PC. This
function return the value “TRUE” if the connection could be successfully set up. Otherwise
the value “FALSE” is returned.
robot.initCommunication(IPAddress.Parse("172.31.1.145"))

To start the cyclic communication with the robot controller the function
“startCommunication” must be called:

19
Master project KUKA robot

robot.startCommunication()

To enter net Points to the robot the function “newDataSet” must be called. Arguments of
this function are the coordinates of the new point and the type of the new point. The type
can be type can be 1 (new pick position), 2 (new home position) or 3 (new place position).
At the values 2 and 3 is no movement of the robot is performed. Only the new coordinates
are stored:
robot.newDataSet(x, y, z, a, b, c, type)

To move the robot to home position if the robot has no jobs the variable
enable_robot_to_home must be set to 1:
robot.enable_robot_to_home

1.5.3 Using User-Interface

The user interface allows the user to set up the connection to the robot controller and
enter new target coordinates of the robot. To start the connection the user has to press
the button “Init Robot”. If the connection has been successfully set up the button “Start
Robot” is enabled. With pressing this button the cyclic communication with the robot
controller will start. The robot starts with the movement after coordinates are entered. To
enter new coordinates the values of these coordinates has to be entered into the input
fields. Then the type of the new point must be set. This can be a normal pick-up point
(“Normal Position”), a new place-point (“Discharge Position”) or a new home position
(“Home Position”). A movement of the robot is only performed at pick-up points. To store
the new point the user has to press the button “Add Position”. Then the new positon is
inserted into the listbox. If the user selects the checkbox “Move robot to home” the robot
moves to its home positon, if the robot has no new jobs.

Figure 1: User-Interface

20
Master project KUKA robot

3 Control Cabinet for Lighting

3.1 Operational Sequence


The operational sequence is as follows:
1. The carton box is being carried on conveyor belt.
2. LED illumination sequence is triggered manually via IcoNet.
3. The image is snapped during each of the illumination sequence step by a camera.
4. These four captured images are then processed in IcoNet to extract the
coordinates.
5. KUKA robot uses these coordinates for Pick n Place operation.

Figure 2: Rittal Control Cabinet

21
Master project KUKA robot

3.2 Control Cabinet Details

Figure 3: Control Cabinet Description

1. Optimum corrosion protection due to triple treated housing surfaces.


2. Permanently high protection category due to seamlessly foamed-in PU seal.
3. Perfect protection from multi-folded enclosure protection channel preventing the
ingress of dirt and water when the door is opened.
4. Effortless wall-mounting thanks to rear panel with holes, prepared for wall
mounting bracket or direct wall mounting.
5. Maximum flexibility for cable entry with sheet steel gland plates for self-population
or option to exchange for prepuce plates.
6. Individual depth population with rails for interior installation.
7. Quick-swap door hinge with no need for machining in single-door enclosures.
8. Perforated mounting strips on the door enable quick and easy mounting of
accessories such as support strips or cable conduit holders.

22
Master project KUKA robot

3.2.1 Optimum surface protection

Figure 4: Optimum surface protection

Maximum quality of surface protection is achieved in three stages:


1st phase: Nanoceramic primer
2nd phase: Electrophoretic dipcoat-priming
3rd phase: Textured powder-coating

Advantages are:
1. Plate with triple surface treatment (Rittal Standard) after a 180-hour salt spray mist
test
2. Metal powder-coated only following a 180-hour salt spray mist test

3.2.2 PU foam seal

Figure 5: PU foam seal

1. Seamlessly foamed-in Temperature resistant from -20°C to +80°C.


2. May be over-painted and briefly stove-enamelled at up to 180°C.

23
Master project KUKA robot

3.2.3 Earthing

Figure 6: Earthing

1. Easily accessible earthing bolt on the body.


2. Door earthing via perforated door strip.
3. Earth straps in various cross-sections and lengths available as accessories.

3.2.4 Lock

Figure 7: Lock

1. Large range of different lock systems.

24
Master project KUKA robot

3.2.5 Dimensional Details

Dimensions:  Width: 600 mm


 Height: 800 mm
 Depth: 250 mm
Material thickness:  Enclosure: 1.5 mm
 Door: 2 mm
 Mounting plate: 3 mm
Mounting plate:  Width: 549 mm
 Height: 770 mm
Number of doors:  1
Door hinged on  yes
the right, may be
swapped to the
left:
Number of cam  2
locks:
Lock version:  Cam
Number of locks:  2
Lock insert:  3 mm double-bit
Gland plate, size:  5
Gland plates, qty.:  1
Weight/pack:  33.6 kg

25
Master project KUKA robot

3.3 Interconnecting the Component

3.3.1 Mounting the Components

Figure 8: Mounting the Components

1. Power Incomer 2. Main Switch


3. Fuse : 16 Amp 4. Distribution : 220 V
5. Siemens SITOP POWER 5 6. Fuse : 6 Amp
7. Distribution : 24 V 8. Quancom
USBOPTO16IO
9. CONTACTOR,AC-3, 10. Fuse : 6 Amp
3KW/400V
11. External Connection to LED 12. Ground Distribution
light

26
Master project KUKA robot

3.3.2 Introduction to the components

3.3.2.1 Siemens SITOP POWER 5

Figure 9: Siemens SITOP POWER 5

Specification:
 Input : Single-phase AC
 Rated voltage Vin rated : 120/230 V AC (Settable using wire jumper)
 Voltage range : 85 to 132 V/170 to 264 V AC
 Rated line frequency; range : 50/60 Hz; 47 to 63 Hz
 Rated current Iin rated : 2.1/1.3 A

Output
 Rated voltage Vout rated : 24 V DC
 Total tolerance : ± 3%
 Residual ripple : < 150 mVpp (typ. 40 mVpp)
 Rated current Iout rated : 5A

Uses:

• Used to convert AC power to DC power which further drives the USB OptoCoupler
Box & relays.

27
Master project KUKA robot

3.3.2.2 Fuse Case

Figure 10: Fuse Case

Specifications:

 Rated current : 16 Amp


Contacts :1

 Mounting : DIN rail


 Size : D01
 Rated voltage : 400 V

Uses:
Acts as a housing for fuses of various ratings.

28
Master project KUKA robot

3.3.2.3 Double-through terminal 5.2mm

Figure 11: Schematic of Double-through terminal Figure 12: Double-through terminal in real

Specifications:

Number of poles per row: 2


content : 1 St.
Max. Cross section solid: 4 sq. mm
Input Current: max 24 mA
No. of positions: 4

Uses:

Acts as a point of contact for the connection to external world.

29
Master project KUKA robot

3.3.2.4 SIEMENS SIRUS Contactor

Figure 13: SIEMENS SIRUS


Contactor

Specifications:

• maximum permissible voltage for safe isolation : 400 V


Insulation voltage: 690 V
• Operating voltage : 690 V
• Operating current : 0.6 A @ 220 V rated value
• Protection class IP : IP20
• Ambient temperature : -25 ... +60 °C during operation

Uses:

Used to switch the power supply to the LED lights for illumination

30
Master project KUKA robot

3.3.2.5 QUANCOM OPTOCOUPLER DETAILS

Figure 14: QUANCOM OPTOCOUPLER

Specifications :

• Dimensions: 254*105*57 mm
Power Supply: 5V USB or 12V-24V external.
• Input Quantity: 16 galvanically isolated Opto-coupler Inputs
Input Current: max. 20mA
Input Voltage: 12V-30V opt. 5V-12V
• Output Quantity: 16 galvanically isolated Opto-coupler Outputs
Switching Current: max 100mA
Switching Voltage: max 30V

Uses:

Used to trigger the outputs which further switches the LED lights for illumination
via IcoNet.

31
Master project KUKA robot

3.3.3 Wiring Diagram

Figure 15: Connection of SIEMENS SITOP to the Main input Supply & further Distribution of 24 V supply

32
Master project KUKA robot

Figure 16: Connection of Opto-Coupler box to power supply & Siemens Relays

33
Master project KUKA robot

Figure 17: Connection to the external LED Illuminating lamps through Siemens Relays

34
Master project KUKA robot

4 Safety
To be able to operate the robot in automatic mode, the workspace of the robot must be
separated. This is done by a safety fence. Additionally an emergency stop button and a
safety switch for the door in the safety fence are necessary. For the connection of these
elements to the robot controller control cabinet is required.

4.1 Safety fence


To separate the workspace of the robot a fence is constructed. The fence has a height of
2,0m. To get into the security area a door is included in the fence.

Figure 18: Safety fence

For ordering the protective fence offers from three manufacturers were collected:

 RK Rose+Krieger GmbH: 1.620,00 €

 Hans Georg Brühl GmbH: 1.235,50 €

 KTH-Aluminiumtechnik: 911,66 €

All prices are without sales tax.


The fence has been ordered from the company “KTH-Aluminiumtechnik”

4.2 Cabinet for safety switches


The robot controller has already a safety interface board (SIB) integrated. This SIB
contains 5 safe inputs and 3 safe outputs. The inputs and outputs can be used via the
interface X11 of the controller. The technical data of the SIB can be seen in Table 4. [3]

35
Master project KUKA robot

SIB outputs
Operating voltage, power contacts ≤ 30 V
Current via power contact min. 10 mA
< 750 mA
Cable lengths (connection of actuators) < 50 m cable lengths
< 100 m wire length (outgoing and
incoming lines)
Cable cross-section (connection of ≥ 1 mm2
actuators)
Switching cycles, Standard SIB Service life: 20 years
< 100,000 (corresponds to 13 switching
cycles per day)
Switching cycles, Extended SIB Service life: 20 years
< 780,000 (corresponds to 106 switching
cycles per day)
SIB inputs
Switching level of the inputs The inputs supply either the ON or OFF
state for the voltage range from 5 V to 11 V
(transition range). OFF state for the voltage
range from -3 V to 5 V (OFF range). ON
state for the voltage range from 11 V to 30
V (ON range).
Load current with 24 V supply voltage > 10 mA
Load current with 18 V supply voltage > 6.5 mA
Max. load current < 15 mA
Cable length, terminal - sensor < 50 m, or < 100 m wire length (out-going
and incoming lines)
Cable cross-section, test output - input > 0.5 mm2
connection
Capacitive load for the test outputs per < 200 nF
channel
Resistive load for the test outputs per < 33 Ω
channel
Table 4: Technical data of Safety Interface Board [3]

The pin allocation and the description of the signals can be seen in Figure 19 and Table 5

36
Master project KUKA robot

Figure 19: Interface X11, connector pin allocation [3]

37
Master project KUKA robot

Signal Pin Description Comments


Test output A (test 1 Makes the pulsed
signal) 3 voltage available for
5 the individual
7 interface inputs of
9 channel A.
Test output B (test 19 Makes the pulsed
signal) 21 voltage available for
23 the individual
25 interface inputs of
27 channel b.
Safe operational 8 Safe operational Activation of
stop, channel A stop input for all standstill monitoring
Safe operational 26 axes Stop 0 is initiated if
stop, channel B the activated
monitoring is
violated.
Safety stop (Stop 2), 10 Safety stop (Stop 2) Triggering of Stop 2
channel A input for all axes and activation of
Safety stop (Stop 2), 28 standstill monitoring
channel B at standstill of all
axes. Stop 0 is
initiated if the
activated monitoring
is violated.
Local E-STOP, 37/38 Output, floating The contacts are
channel A contacts from closed if the
Local E-STOP, 55/56 internal E-STOP following conditions
channel B are met:
- EMERGENCY
STOP on smartPAD
not actuated
- Controller switched
on and
operational
The contacts open if
any condition is not
met.
External E-STOP, 2 Dual-channel Triggering of the E-
channel A EMERGENCY STOP function in
External E-STOP, 20 STOP input the robot controller.
channel B
Acknowledge 6 For connection of a After closing the
operator safety, dual-channel input safety gate
channel A for acknowledging (operator safety),
Acknowledge 24 operator safety with manipulator motion
operator safety, floating contacts can be enabled in
channel B the automatic
modes using an
acknowledge button
outside the safety
fence. This function
is deactivated on
delivery.

38
Master project KUKA robot

Operator safety, 4 For 2-channel As long as the


channel A connection of a signal is active, the
Operator safety, 22 safety gate locking drives can be
channel B mechanism switched on. Only
effective in the
AUTO-MATIC
modes.
Enabling switch 41 Output, floating Contacts are closed
center position, 42 contact for enabling if the enabling
channel A switch in center switch on the smart-
position, connection PAD is in the center
1 position and the
Output, floating drives are thus
contact for enabling activated in the test
switch in center modes.
position, connection
2
Enabling switch 59 Output, floating
center position, contact for enabling
channel B switch in center
position, connection
1
60 Output, floating
contact for enabling
switch in center
position, connection
2
Acknowledge 39 Output, floating Relaying of the
operator safety, contact for operator acknowledge
channel A safety operator safety input
acknowledgement, signal to other robot
connection 1 controllers at the
40 Output, floating same safety fencing
contact for operator
safety
acknowledgement,
connection 2
Acknowledge 57 Output, floating
operator safety, contact for operator
channel B safety
acknowledgement,
connection 1
58 Output, floating
contact for operator
safety
acknowledgement,
connection 2
Table 5: Signal description SIB [3]

39
Master project KUKA robot

Figure 20: Load voltage [3]

To a 24V load voltage to the X11 interface the connector X301 and X6 from the CCU can
be used. In our case only the load voltage US1 is used.

Signal Pin Description Comments


Load voltage US1 91 27 V internal / 5 A The voltage is
non-switched switched on as long
92 0 V internal as the controller is
supplied with
voltage.
Load voltage US2 93 27 V internal / 7 A The voltage is
switched switched on as long
94 0 V internal as the drives are
active and the
brakes are released.
Table 6: Signal description load voltage [3]

To connect all switches to the X11-interface a switch cabinet is necessary because the
X11-interface can handle only one cable. So all switches are connected to the cabinet
and one big cable connects the cabinet and the X11-interface. For connecting the
switches to the cabinet the following cables are used:
Name Number of wires Length Comments
5W1 20 x 1 mm² 4m Connection Cabinet
X11-interface
5W2 5 x 1 mm² 5m Connection
Emergency stop
5W3 7 x 1 mm² 5m Connection door
switch
5W4 3 x 1 mm² 5m Connection push
button
Table 7: Used wires

The wiring diagram can be seen in Figure 21, the complete switch cabinet in Figure 22

40
Master project KUKA robot

Figure 21: Wiring diagram safety cabinet

41
Master project KUKA robot

Figure 22: Cabinet for safety

4.3 Emergency-Stop
For emergency stop an emergency stop button from EATON is used. This button has two
normally closed contacts. Both are connected to the cabinet.

42
Master project KUKA robot

Figure 23: Emergency Stop

4.4 Door switch


For locking the door on a safety fence the safety switch PILZ 570000 is used. This door
switch has two normally closed und two normally opened contacts. To unlock the switch,
a solenoid is available.
Electrical Data
Version PSEN me1
Rated isolation voltage Ui 250 V
Uimp 2,5 kV
Rated impulse withstand voltage
Conventional thermal current Ithe 5A
Max. making current (4 contacts) / 10 A
Utilization category АС-15, Ue /Ie 230 V / 2,5 А
Direct opening action acc. to IEC/EN 60947-5-1, Annex K
Rated conditional short-circuit current / 1000 A
Short circuit protection 4 A gl
Protection class II
Solenoid
Actuating cycles permanent 600 / h
ON period 100% ED (to E1, E2)
Operating voltage 24V AC/DC
Temperature class F (155°C)

43
Master project KUKA robot

Inrush power consumption 12 VA (0,2 s)


Permanent power consumption 4,4 VA
Mechanical Data
Enclosure Thermoplastic GV (UL94-V0)
Cover Thermoplastic GV (UL94-V0)
Actuator head Thermoplastic GV (UL94-V0) / Zn-GD
Separate actuator St/PA / Zn-GD
Ambient air temperature -25 °C bis +70 °C
Locking force FZh max. 1500 N acc. to GS-ET-19
Drawing force min. 27 N
Approach speed max. V = 0,5 m/s
Operating principle 4 slow-action contacts max.
Mechanical life max. 1 x 106 switching cycles at max.
600 cycles/h
Assembly 4 х М5
Tightening torque (max.) M= 2 Nm
Connection Spring-clamp connection
Conductor cross-sections 0,5 – 1,5 mm2 flexible
Cable entrance 3 х M20x1,5
Weight ≈ 0,34 kg (without actuator)
Installation position operator definable
Protection type IP67 acc. to IEC/EN 60529
Table 8: Technical data [4]

Figure 24: Safety switch

44
Master project KUKA robot

To unlock the door a push button from EATON is used. This button has one normally
opened and one normally closed contact. In our application, only the normally opened
contact is connected.

Figure 25: Button for unlocking the door

45
Master project KUKA robot

List of Figures
Figure 1: User-Interface................................................................................................................ 20
Figure 2: Rittal Control Cabinet .................................................................................................. 21
Figure 3: Control Cabinet Description ........................................................................................ 22
Figure 4: Optimum surface protection ........................................................................................ 23
Figure 5: PU foam seal ................................................................................................................. 23
Figure 6: Earthing .......................................................................................................................... 24
Figure 7: Lock ................................................................................................................................ 24
Figure 8: Mounting the Components .......................................................................................... 26
Figure 9: Siemens SITOP POWER 5 ......................................................................................... 27
Figure 10: Fuse Case ................................................................................................................... 28
Figure 11: Schematic of Double-through terminal .................................................................... 29
Figure 12: Double-through terminal in real ................................................................................ 29
Figure 13: SIEMENS SIRUS Contactor ..................................................................................... 30
Figure 14: QUANCOM OPTOCOUPLER .................................................................................. 31
Figure 15: Connection of SIEMENS SITOP to the Main input Supply & further Distribution
of 24 V supply ................................................................................................................................ 32
Figure 16: Connection of Opto-Coupler box to power supply & Siemens Relays ............... 33
Figure 17: Connection to the external LED Illuminating lamps through Siemens Relays .. 34
Figure 18: Safety fence ................................................................................................................ 35
Figure 19: Interface X11, connector pin allocation ................................................................... 37
Figure 20: Load voltage ................................................................................................................ 40
Figure 21: Wiring diagram safety cabinet .................................................................................. 41
Figure 22: Cabinet for safety ....................................................................................................... 42
Figure 23: Emergency Stop ......................................................................................................... 43
Figure 24: Safety switch ............................................................................................................... 44
Figure 25: Button for unlocking the door .................................................................................... 45

46
Master project KUKA robot

List of Tables
Table 1: Signals from robot to PC ................................................................................................. 6
Table 2: Signals from PC to robot ................................................................................................. 6
Table 3: Permissible data type in CAST statements [2] .......................................................... 10
Table 4: Technical data of Safety Interface Board ................................................................... 36
Table 5: Signal description SIB ................................................................................................... 39
Table 6: Signal description load voltage .................................................................................... 40
Table 7: Used wires ...................................................................................................................... 40
Table 9: Technical data [1] ........................................................................................................... 44

47
Master project KUKA robot

Bibliography
[1] K. S. Technology, “KUKA.Ethernet KRL 2.1,” 2011.

[2] K. R. Group, “CREAD/CWRITE: Programming CREAD/CWRITE and related statements,” 2007.

[3] K. R. GmbH, “KR C4 With Interface X11 Operating Instructions,” 2011.

[4] PILZ, “Installation and Operating Instructions,” [Online]. Available:


https://www.pilz.com/download/open/0800000624.pdf. [Accessed 30 December 2015].

[5] Siemens Power Supply . Details available on :

http://www.siemens.fi/pool/lithuania/pramone/documents/pdf/maitinimo-saltiniai-
sitop_kt10-1.pdf

[6] Quancom USB optpcoupler box :


http://www.quancom.de/quancom/quancom01.nsf/home_prod_deu.htm?OpenFrameSet&Fram
e=unten&Src=http://www.quancom.de/qprod01/deu/pb/usbopto16io.htm

[7] Siemens Contactor details available on :


https://mall.industry.siemens.com/tedservices/DatasheetService/DatasheetService?control=%3C
%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-
8%22%3F%3E%3Cpdf_generator_control%3E%3Cmode%3EPDF%3C%2Fmode%3E%3Cpdmsystem
%3EPMD%3C%2Fpdmsystem%3E%3Ctemplate_selection+mlfb%3D%223RT2015-
1BB42%22+system%3D%22PRODIS%22%2F%3E%3Clanguage%3Een%3C%2Flanguage%3E%3Ccall
er%3EMall%3C%2Fcaller%3E%3C%2Fpdf_generator_control%3E

48