
APPLYING THE MODULE
5-7
5.5 Moving
The following example illustrates the software required to
move the axis. The move could be either an incremental or
absolute move depending on the state of register 65, bit 5.
5990 !
5991 ! Move Sequence
5992 !
5993 ! FDBK_SCALING = encoder counts/engineering unit
5994 ! FDBK_POS = position (in engineering units)
5995 ! SPD = velocity (in engineering units)
5996 ! ACCEL = acceleration (in engineering units)
5997 ! DECEL = deceleration (in engineering units)
5998 ! FAULT@ = fault status
5999 !
6000 CMD_ POS!=FDBK_POS*FDBK_SCALING
6005 CMD_VEL!=SPD*FDBK_SCALING*65.536
6010 CMD_ACC!=ACCEL*FDBK_SCALING*.065536
6015 CMD_DEC!=DECEL*FDBK _SCALING*.065536
6020 CMD66%= 1 \GOSUB 25000 \IF FAULT@THEN RETURN
6047 REM
6D48 REM Loop until MOVE complete or a fault occurs
6049 REM
6050 DELAY 20 TICKS \IF AXIS_BUSY@ THEN GOTO 6050
6055 FAULT@=(FAULTS% AND 037FH)<>0
6060 RETURN
Comentarios a estos manuales