46 / 79
Issued: 19.12.2012 Version: KST EthernetKRL 2.2 V1 en (PDF)
XML file
Program
7.2.3
XmlTransmit configuration example
The EKI is configured as a client. Robot data are sent and the received sensor
data read out of the memory after a waiting time of 1 second.
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>x.x.x.x</IP>
<PORT>59152</PORT>
</EXTERNAL>
</CONFIGURATION>
<RECEIVE>
<RAW>
<ELEMENT Tag="Buffer" Type="STREAM" Set_Flag="1"
Size="64" EOS="13,10" />
</RAW>
</RECEIVE>
<SEND />
</ETHERNETKRL>
1 DEF BinaryStream( )
2 Declaration
3 INI
4 Initialize sample data
5
6 RET=EKI_Init("BinaryStream")
7 RET=EKI_Open("BinaryStream")
8
9 Bytes[]="Stream ends with CR,LF"
10
11 RET = EKI_Send("BinaryStream",Bytes[])
12
13 WAIT FOR $FLAG[1]
14 RET=EKI_GetString("BinaryStream","Buffer",Bytes[])
15 $FLAG[1]=FALSE
16
17 RET=EKI_Close("BinaryStream")
18 RET=EKI_Clear("BinaryStream")
19
20 END
Line
Description
4
Initialization of KRL variables by the assignment of values
6
EKI_Init() initializes the channel used by the interface to con-
nect to the external system.
7
EKI_Open() opens the channel and connects to the server.
9
The Bytes[] CHAR array is assigned data.
11
EKI_Send() sends the Bytes[] CHAR array to the external sys-
tem.
13 … 15
$FLAG[1] indicates the reception of the configured data ele-
ment.
EKI_GetString reads the string in the Bytes[] CHAR array out
of the memory.
$FLAG[1] is reset again.
17
EKI_Close() closes the channel.
18
EKI_Clear() clears the channel.
For communication with the robot controller, the appropriate example
data have to be set in the server program; in this case
Xml
.
Содержание KUKA.EthernetKRL 2.2
Страница 8: ...8 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 16: ...16 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 20: ...20 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 40: ...40 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 52: ...52 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 58: ...58 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 76: ...76 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...
Страница 79: ...79 79 Issued 19 12 2012 Version KST EthernetKRL 2 2 V1 en PDF KUKA EthernetKRL 2 2 ...