Salut tout le monde!
Hi all! I know that it's hard to start in Karel's code and i want to give a small code to move the fanuc robot in JOINT with coordinates POSITION.
this my code:
PROGRAM NAME OF PROJECT
%CMOSVARS
%SYSTEM
%NOBUSYLAMP
%NOPAUSESHFT
%ENVIRONMENT MOTN
%ENVIRONMENT sysdef
%ENVIRONMENT REGOPE
%ENVIRONMENT STRNG
%NOLOCKGROUP
%NOABORT=ERROR+COMMAND
%NOPAUSE=ERROR+COMMAND+TPENABLE
%ALPHABETIZE
%INCLUDE KLEVKEYS
%INCLUDE KLEVKMSK
%INCLUDE KLEVCCDF
%INCLUDE KLIOUOP
%INCLUDE KLIOTYPS
VAR
c: config
i: INTEGER
jnt0:JOINTPOS
rnt0:POSITION
rpos0:ARRAY[9] OF REAL
cur_current: JOINTPOS
status1: INTEGER
uframe: POSITION
utool: POSITION
BEGIN
$UFRAME = $MNUFRAME[1,1]
$UTOOL = $MNUTOOL[1,1]
uframe=$UFRAME
utool=$UTOOL
--***********************************************************************************************************POINT0 same process for other points
CNV_STR_CONF('NUT,0,0,0',c,0)
rnt0= POS(79,114,203, -179.169, -0.053, -52.294, c)
cur_current=CURJPOS(0,0)
POS2JOINT(cur_current,rnt0,uframe,utool,0,c,rpos0,jnt0,status1)
WITH $SPEED=100, $MOTYPE=JOINT, $TERMTYPE=NODECEL MOVE TO jnt0
END NAME OF PROJECT
Have fun.