KUKA Robot Ethernet Communication
KUKA Robot Ethernet Communication
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
Master project KUKA robot
1 Introduction
4
Master project KUKA robot
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.
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
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
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]
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
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
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.
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
After the definition of the structures all necessary variables are declared:
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:
The function startCommunication starts the communication with the robot controller. The
cyclic function “communication” is called in a separate thread.
15
Master project KUKA robot
151 }
152 //return true;
153 }
154
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
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
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 }
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
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
21
Master project KUKA robot
22
Master project KUKA robot
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
23
Master project KUKA robot
3.2.3 Earthing
Figure 6: Earthing
3.2.4 Lock
Figure 7: Lock
24
Master project KUKA robot
25
Master project KUKA robot
26
Master project KUKA robot
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
Specifications:
Uses:
Acts as a housing for fuses of various ratings.
28
Master project KUKA robot
Figure 11: Schematic of Double-through terminal Figure 12: Double-through terminal in real
Specifications:
Uses:
29
Master project KUKA robot
Specifications:
Uses:
Used to switch the power supply to the LED lights for illumination
30
Master project KUKA robot
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
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.
For ordering the protective fence offers from three manufacturers were collected:
KTH-Aluminiumtechnik: 911,66 €
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
37
Master project KUKA robot
38
Master project KUKA robot
39
Master project KUKA robot
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.
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
41
Master project KUKA robot
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
43
Master project KUKA robot
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.
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.
http://www.siemens.fi/pool/lithuania/pramone/documents/pdf/maitinimo-saltiniai-
sitop_kt10-1.pdf
48