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.