Hi all.
I have problem with commucation between SICK Camera and KUKA robot.
XML file works correct, trigger works, camera make photo, but I don't receive anything.
Error: EKI00015 "Access to empty element memory".
What I should do?
Please help...
Hi all.
I have problem with commucation between SICK Camera and KUKA robot.
XML file works correct, trigger works, camera make photo, but I don't receive anything.
Error: EKI00015 "Access to empty element memory".
What I should do?
Please help...
This suggests that the robot has not received any data from the Sick camera. Have you monitored the network traffic using WireShark or a similar tool?
Hi again. Thanks for your answer.
I check everything and in XML file was wrong port number.
At first step I want receive one information from camera, but I don't know how prepare this message.
XML File "data":
Program to communication:
And SICK Camera setting output string:
So camera send: Image_number: 212
And I have error EKI00016: "Element not found"
"Image_Number:212" -- is that all the camera sends?
As I said before, have you performed a packet-capture test on the traffic between the robot and the camera?
What is the technical specification of the data that the camera is supposed to send?
Is the camera sending that data in XML format? Or is it sending raw strings? Because if the camera data is not XML-formatted, with proper tags, you will not be able to use any of the EKI_GET functions for data. You will have to capture the data as raw strings, then parse it programmatically. What you've shown looks like raw strings, not XML data. But I would need to see the raw packet capture or the full technical specification for the camera's communication protocol to be certain.
Also, you are trying to access Image Number as a Real, but it is an Integer.
Hi again.
I used Wireshark to check what sending camera.
And he send only RAW strings...
I call to SICK service-guy and he will check the possibilities to sending the tag name.
Next I will try change for RAW in configuration file, but today I had changes something and I have again error EKI00006 "Interpretation of configuration failed".
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>192.168.1.10</IP>
<PORT>2114</PORT>
<TYPE>SERVER</TYPE>
</EXTERNAL>
<INTERNAL>
<IP>192.168.1.5</IP>
<PORT>2114</PORT>
<PROTOCOL>UDP</PROTOCOL>
</INTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="Image_number" Type="INT" />
</XML>
</RECEIVE>
<SEND>
<XML>
<ELEMENT Tag="send/number" Type="INT"/>
</XML>
</SEND>
</ETHERNETKRL>
Display More
Then when I added the "RECEIVE" part, I got an EKI00006 error.
I do not know what's wrong. I will try again tomorrow.
first of all, that is not correct tag begin.
tags have begin and end, for example
<my_tag> something in here </my_tag>
note that:
a) tag elements should be surrounded by pointy brackets like [size=1.45em]<[/size][size=1.35em]Image_number[/size][size=1.45em]>[/size]
b) begin and end of the tag are almost the same (end of tag just has "/")
[size=1em]Next, there is supposed to be some numeric value embedded inside the tag but you are showing <SPACE> instead of something like[/size]
[size=1em]<SPACE> is not a numeric value and there is nothing for EKI function Get_EkiReal() to extract.... [/size]
[size=1em]it cannot pull the numbers out of nowhere, which is why you get the error message:[/size]
[size=1em]EKI00016: "Element not found"[/size]
Thanks, I understand the XML language rules.
I talk again with service-guy from SICK, and is impossible to send value with tag name <my_tag>something</my_tag>
If I wrote in camera software this string "<my_tag>something</my_tag>" , I recevied "something".
So I need change configuration file to receive RAW...
UPDATE
I talked third time with SICK and he find the solution. In editor on camera output string must be wrote
<ASCII value="60"/>my_tag<ASCII value="62"/>something<ASCII value="60"/>/my_tag<ASCII value="62"/>
, then I get in robot string <my_tag>something</my_tag>.
I tried this solution and works correct.
But I had still error EKI00015. So then I put to the program timer with 130ms and I changed the protocol on TCP. Now I receive correct information.
But sometimes I have error EKI000512 "Ethernet connection disrupted".
Main program for communiacation:
&ACCESS RVP
&REL 46
&PARAM SensorITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM DISKPATH = KRC:\R1\Program
DEF communicat( )
;FOLD Declaration
DECL EKI_STATUS RET
;ENDFOLD (Declaration)
;FOLD Communicated data
;ENDFOLD (Communicated data)
;FOLD INI
;FOLD BASISTECH INI
;BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
;FOLD Open connections
RET=EKI_Init("trigger")
RET=EKI_Open("trigger")
RET=EKI_Init("dane")
RET=EKI_Open("dane")
;ENDFOLD Open connections
;FOLD Send trigger
RET = EKI_Send("trigger", "TRIG")
;ENDFOLD Send trigger
;FOLD Receive data
$TIMER[15]=0
$TIMER_STOP[15]=FALSE
com_start:
IF $TIMER[15] >= 120 THEN
$TIMER_STOP[15]=TRUE
$TIMER[15]=0
RET=EKI_GetInt("dane","Sensor/Image",odbior)
numer=odbior
ELSE
GOTO com_start
ENDIF
;ENDFOLD Receive data
;FOLD Close connections
RET=EKI_Close("trigger")
RET=EKI_Clear("trigger")
RET=EKI_Close("dane")
RET=EKI_Clear("dane")
;ENDFOLD Close connections
END
Display More
First configuration file "trigger":
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>192.168.1.10</IP>
<PORT>2116</PORT>
<TYPE>SERVER</TYPE>
</EXTERNAL>
<INTERNAL>
<PROTOCOL>TCP</PROTOCOL>
</INTERNAL>
</CONFIGURATION>
<SEND>
<XML>
<ELEMENT Tag="send/number" Type="INT"/>
</XML>
</SEND>
</ETHERNETKRL>
Display More
Second configuration file "dane":
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<IP>192.168.1.10</IP>
<PORT>2114</PORT>
<TYPE>SERVER</TYPE>
</EXTERNAL>
<INTERNAL>
<IP>192.168.1.5</IP>
<PORT>2114</PORT>
<PROTOCOL>TCP</PROTOCOL>
</INTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="Sensor/Image" Type="INT"/>
</XML>
</RECEIVE>
<SEND>
<XML>
<ELEMENT Tag="send/number" Type="INT"/>
</XML>
</SEND>
</ETHERNETKRL>
Display More
Please help...
Tomorrow I must give back this camera...
ok, some progress is made...
are you using ALIVE option? does camera keep connection open?
did you try changing that delay of 130ms to see if it makes a difference?
did you check manual troubleshooting section?
Quoteare you using ALIVE option?
No, I don't use ALIVE function... yet.
Quotedoes camera keep connection open?
How check this? Using ALIVE option?
Quotedid you try changing that delay of 130ms to see if it makes a difference?
I checked between 120ms and 170ms. From camera interface i have information "Minimum delay time: 140.1ms"
Tomorrow I will check up to 200ms, mayby camera has delay...
Quotedid you check manual troubleshooting section?
What do you mean? I will check ALIVE option and connection with camera...
What do you mean? I will check ALIVE option and connection with camera...
screenshot with message 512 was from EKI manual (there is a chapter on troubleshooting)
Dear all,
little update.
Today I have a full communication. I receive cordinates from camera, but I have next problem.
In AUTO mode camera make something about 50 photos. Sometimes 47, sometimes 56... and camera break.
Error EKI000018....
After reboot camera everything works correct until next 50 photos.
In my opinion mayby some buffer or sameting like that, but I don't have any idea ow solve this problem...
yes... maybe something like that...
or just read the manual and see what causes message 18
How quickly are you cycling your EKI commands? I've found that EKI doesn't do well when there is insufficient time delay between EKI_SEND commands, or between an EKI-Close and an EKI-Open.
Hello all after long time!
SICK Inspector works with KUKA.
But I have still one big problem - after 50-51 photos the connection is disrupted.
I observed on Diagnostic Monitor - Eki Function, and normal Allocation Memory is 840. But sometimes (above 50 photos) robot receive ~8360.
And then connection is lost. I clear buffer and check many options, but not have good result.
On this moment I restart camera every 45 photos. Is'n not gentle solution, but works. Problem is with time, becasue camera need 19-20second to made restart.
I talk with KUKA specialist and he said that will be better to use RAW data. But I dont know how programming this.
Could you help me, please?
Camera send something like this:
Communication program:
&ACCESS RVP2
&REL 120
&PARAM SensorITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM DISKPATH = KRC:\R1\Program
DEF communicat( )
;FOLD Declaration
DECL EKI_STATUS RET
;ENDFOLD (Declaration)
;FOLD Communicated data
;ENDFOLD (Communicated data)
;FOLD INI
;FOLD BASISTECH INI
;BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
$advance = 1
test:
$TIMER_STOP[4]=TRUE
;FOLD Open connection DANE
RET=EKI_Init("dane")
RET=EKI_Open("dane")
WAIT SEC 0
;ENDFOLD
;FOLD PULSE 17 'camera trigger' State=TRUE CONT Time=0.3 sec;%{PE}%R 8.3.43,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:17, 3:camera trigger, 5:TRUE, 6:CONTINUE, 8:0.3
CONTINUE
PULSE($OUT[3], TRUE,0.3)
;ENDFOLD
$TIMER[4]=0
$TIMER_STOP[4]=FALSE
WAIT FOR $FLAG[1] OR ($TIMER[4]>250); communictaion alive
IF $TIMER[4]>250 THEN
RET=EKI_Clear("dane")
goto test
ENDIF
$TIMER_STOP[4]=TRUE
RET=EKI_CheckBuffer("dane","Sensor/Image")
IF RET.Buff <> 0 THEN
RET=EKI_ClearBuffer("dane","Sensor")
ENDIF
$TIMER[3]=0
$TIMER_STOP[3]=FALSE
WAIT FOR $FLAG[3] OR ($TIMER[3]>250)
$TIMER_STOP[3]=TRUE
IF $TIMER[3]>250 THEN
RET=EKI_Clear("dane")
goto test
ENDIF
;FOLD Receive data
RET=EKI_GetInt("dane","Sensor/Image",odbior)
wait sec 0
numer=odbior
WAIT FOR $FLAG[2] ; data from Camera
RET=EKI_GetReal("dane","Sensor/XPOS",X_pos)
xposition=X_pos
RET=EKI_GetReal("dane","Sensor/YPOS",Y_pos)
yposition=Y_pos
RET=EKI_GetReal("dane","Sensor/ANGLE",ANGLE)
obrot=ANGLE
camera_counter=camera_counter+1
camera_reset=camera_reset+1
;ENDFOLD Receive data
;FOLD Close connection DANE
RET=EKI_Close("dane")
RET=EKI_Clear("dane")
;ENDFOLD Close connections
if (numer >= reset_number) then
restart=true
camera_reset=0
;FOLD PULSE 10 'camera trigger' State=TRUE CONT Time=0.3 sec;%{PE}%R 8.3.43,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:17, 3:camera trigger, 5:TRUE, 6:CONTINUE, 8:0.3
CONTINUE
PULSE($OUT[10], TRUE,0.3)
;ENDFOLD
endif
END
Display More
How change code, to solve variables X_POS, Y_POS, ANGLE.
I am working on a similar project and having the same "Error: EKI00015 "Access to empty element memory"
Can you help me out on how did you get past this error?
do not send something that will not be read.
do not try to read something that was not sent.