38 / 79
Issued: 19.12.2012 Version: KST EthernetKRL 2.2 V1 en (PDF)
Example
6.2.10
Processing incomplete data records
Under certain circumstances an external system may send incomplete data
records. Individual XML elements are either empty or missing entirely, with the
result that data from various data packets are present in one memory layer.
If it is necessary for the data records to be of contiguous structure in KRL, the
Counter structure element of the EKI_STATUS variable can be used. When
EKI_Get…Array functions are used, temporally non-contiguous data are rec-
ognized by the return of Counter = 0.
6.2.11
EKI_CHECK() – Checking functions for errors
Description
For each error, EthernetKRL displays a message on the smartHMI. The auto-
matic generation of messages can be deactivated.
(
9.3 "Deactivating message output and message logging" Page 60)
If automatic message generation has been deactivated, it is recommended to
use the EKI_CHECK() function to check whether an error has occurred during
execution of an EthernetKRL function.
The error number is read out and the corresponding message is displayed
on the smartHMI.
If a channel name is specified in EKI_CHECK(), it is checked during data
reception whether errors have occurred.
(
9.4.5 "Checking a function for errors" Page 67)
The program KRC:\R1\TP\EthernetKRL\EthernetKRL_USER.SRC is called
up each time EKI_CHECK() is called up. User-specific error responses can be
programmed in this program.
Example
A connection is closed whenever a reception error occurs. An interrupt can be
programmed as a fault service function if the Ethernet connection is terminat-
ed.
It is defined in the XmlTransmit.XML configuration file that FLAG[1] is set
in the event of a successful connection. FLAG[1] is reset if the connection
is lost.
The interrupt is declared and switched on in the KRL program. The inter-
rupt program is run if FLAG[1] is reset.
EKI_CHECK() is used in the interrupt program to query what sort of error
occurred and then re-open the connection.
...
RET=EKI_Lock("MyChannel")
RET=EKI_Get...()
RET=EKI_Get...()
...
RET=EKI_Get...()
RET=EKI_Unlock("MyChannel")
...
<ALIVE Set_Flag="1"/>
;FOLD Define callback
INTERRUPT DECL 89 WHEN $FLAG[1]==FALSE DO CON_ERR()
INTERRUPT ON 89
;ENDFOLD
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 ...