50 / 79
Issued: 19.12.2012 Version: KST EthernetKRL 2.2 V1 en (PDF)
Program
Data trans-
mission
The XML document is assigned robot data by the KRL program and sent to
the external system via the EKI.
Data reception
The XML document is assigned sensor data by the server program and re-
ceived by the EKI.
1 DEF XmlCallBack( )
2 Declaration
3 Communicated data
4 INI
5 Define callback
6
7 RET=EKI_Init("XmlCallBack")
8 RET=EKI_Open("XmlCallBack")
9
10 Write data to connection
11 RET = EKI_Send("XmlCallBack","Robot")
12
13 ;wait until data read
14 WAIT FOR $FLAG[1]
15
16 RET=EKI_Close("XmlCallBack")
17 RET=EKI_Clear("XmlCallBack")
18 END
19
20 DEF GET_DATA()
21 Declaration
22 Initialize sample data
23 Get received sensor data
24 Signal read
Line
Description
5
Declaring and switching on the interrupt
7
EKI_Init() initializes the channel used by the interface to con-
nect to the external system.
8
EKI_Open() opens the channel.
10
Writes data in the saved XML document for data transmission.
11
Sends the data.
14
Waits for $FLAG[1].
The event flag signals that all data have been read.
16
EKI_Close() closes the channel.
17
EKI_Clear() clears the channel.
20 … 24
initialization of KRL variables by assigning values and reading
out data
$FLAG[1] is set when all data have been read.
<Robot>
<Data>
<LastPos X="..." Y="..." Z="..." A="..." B="..." C="...">
</LastPos>
<ActPos X="1000.12">
</ActPos>
</Data>
<Status>12345678</Status>
<Mode>ConnectSensor</Mode>
<RobotLamp>
<GrenLamp>
<LightOn>1</LightOn>
</GrenLamp
</RobotLamp>
</Robot>
Summary of Contents for KUKA.EthernetKRL 2.2
Page 8: ...8 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 16: ...16 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 20: ...20 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 40: ...40 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 52: ...52 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 58: ...58 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 76: ...76 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Page 79: ...79 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...