Robot - KR 240 R2900-2
KRC4 - 8.6.10
EthernetKRL - 3.1.3
I have currently written a code where I run a program with PTP commands in my robot interpreter. Simultaneously, I have an EKI script running on the EXT1 submit interpreter which runs in a loop to look for particular flags and send messages over EKI if a particular flag is set.
After each point is reached, I set a flag to TRUE. Which is read by the EKI script, which then sends a message over EKI to the external server and then sets this flag to FALSE again. This cycle continues till the motion program ends.
The EKI program also has a component which continuously sends messages without the need for flipping any flags (robot_states). The EKI program runs great and there are no disconnections when I am not running any program on the robot interpreter.
However, when I run the motion program on the robot interpreter, the EKI disconnects from the server (with error PING REPORTS NO CONTACT - EKI00768) after a random time interval, it works fine until that point. I can assure that this is not an issue with the ethernet connection or the external server. This does not happen when I only run the EKI program.
I am attaching the XML and bits of the KRL code (cannot put the whole code because of IP issues). If anyone could guide me on what the potential issues might be, I would be eternally grateful!
XML Config File:
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<TYPE>Server</TYPE>
<IP>192.168.1.200</IP>
<PORT>7445</PORT>
</EXTERNAL>
<INTERNAL>
<ENVIRONMENT>Submit</ENVIRONMENT>
<ALIVE Set_Flag="1" Ping="3"/>
<BUFFERING Mode="FIFO" LIMIT="512"/>
<BUFFSIZE Limit="65534"/>
<TIMEOUT Connect="65534"/>
<MESSAGES Logging="enabled" Display="enabled"/>
</INTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="peripherals/device/isActive" Type="BOOL" />
</XML>
</RECEIVE>
<SEND>
<XML>
<ELEMENT Tag="sensor/position_X"/>
<ELEMENT Tag="sensor/position_Y"/>
<ELEMENT Tag="sensor/position_Z"/>
<ELEMENT Tag="robot_states/tcpVelocity"
</XML>
</SEND>
</ETHERNETKRL>
Display More
EKI KRL file:
&ACCESS RVO
&REL 1
&PARAM EDITMASK = *
DEF SendEKIMessages()
SendRobotStatus()
SendSensorData()
END
DEF SendSensorData()
DECL EKI_STATUS RET
IF ($FLAG[2] == TRUE) THEN
RET = EKI_SetReal("RobotTwoWayInterface", "sensor/position_X", $POS_ACT_MES.X)
RET = EKI_SetReal("RobotTwoWayInterface", "sensor/position_Y", $POS_ACT_MES.Y)
RET = EKI_SetReal("RobotTwoWayInterface", "sensor/position_Z", $POS_ACT_MES.Z)
RET = EKI_Send("RobotTwoWayInterface", "sensor")
$FLAG[2] = FALSE
ENDIF
END
DEF SendRobotStatus()
; Declarations for storing robot information
DECL EKI_STATUS RET
DECL REAL tcpVelocity
tcpVelocity = $VEL_ACT
RET = EKI_SetReal("RobotTwoWayInterface", "robot_states/tcpVelocity", tcpVelocity)
RET = EKI_Send("RobotTwoWayInterface", "robot_states")
END
Display More
EXT1 Submit interpreter script:
&ACCESS RVO
&REL 1
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
DEF StartEKI()
DECL EKI_STATUS RET
RET = EKI_Init("RobotTwoWayInterface")
RET = EKI_Open("RobotTwoWayInterface")
LOOP
SendEKIMessages()
ENDLOOP
END
Display More
Robot Interpreter program (an example):