Hi,
Currently starting in robotics field. I'm reading "KRC - Expert Programming" (one of the manuals suggested in the forum) and in page 46 there is an example of geometric operator and coordinates systems. I write the code to the program (OL 4.1 and Sim 1.1) and OL gives me this error: "Software limit -A3 out of range".
Could you help me? After the error I moved the robot manually 100mm and worked fine...
Code:
DEF GEOM_OP ( )
;--------- Declaration section ---------
EXT BAS (BAS_COMMAND :IN,REAL :IN )
DECL AXIS HOME ;Variable HOME of type AXIS
DECL FRAME MYBASE[2] ;Array of type FRAME
;---------- Initialization ---------
BAS (#INITMOV,0 )
HOME={AXIS: A1 0,A2 -90,A3 90,A4 0,A5 30,A6 0}
$BASE={X 500,Y 0,Z 1000,A 0,B 0,C 0}
REF_POS_X={X 100,Y 0,Z 0,A 0,B 0,C 0}
REF_POS_Y={X 100,Y 100,Z 0,A 0,B 0,C 0}
REF_POS_Z={X 100,Y 100,Z 100,A 0,B 0,C 0}
MYBASE[1]={X 200,Y 100,Z 0,A 0,B 0,C 180}
MYBASE[2]={X 0,Y 200,Z 250,A 0,B 90,C 0}
;------------- Main section ------------
PTP HOME
PTP $BASE
WAIT SEC 2
PTP REF_POS_X
PTP REF_POS_Y
PTP REF_POS_Z
; Motion in relation to $BASE-CS offset by MYBASE[1]
PTP MYBASE[1]
WAIT SEC 2
PTP MYBASE[1]:REF_POS_X
PTP MYBASE[1]:REF_POS_Y
PTP MYBASE[1]:REF_POS_Z
; Motion in relation to $BASE-CS offset by MYBASE[2]
PTP MYBASE[2]
WAIT SEC 2
PTP MYBASE[2]:REF_POS_X
PTP MYBASE[2]:REF_POS_Y
PTP MYBASE[2]:REF_POS_Z
; Motion in relation to $BASE-CS offset by MYBASE[1]:MYBASE[2]
PTP MYBASE[1]:MYBASE[2]
WAIT SEC 2
PTP MYBASE[1]:MYBASE[2]:REF_POS_X
PTP MYBASE[1]:MYBASE[2]:REF_POS_Y
PTP MYBASE[1]:MYBASE[2]:REF_POS_Z
; Motion in relation to $BASE-CS offset by MYBASE[2]:MYBASE[1]
PTP MYBASE[2]:MYBASE[1]
WAIT SEC 2
PTP MYBASE[2]:MYBASE[1]:REF_POS_X
PTP MYBASE[2]:MYBASE[1]:REF_POS_Y
PTP MYBASE[2]:MYBASE[1]:REF_POS_Z
PTP HOME
END
PD: I'm using the KR 150 model. If modify $BASE={X 1000,Y 0,Z 1000,A 0,B 0,C 0} gives me the error in the A5.
Thanks!