Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

; the operation of setting up the 6k to get 1 revolution
; of motion for a servo and stepper axis.
; It is the responsibility of the user to 
; insure the program is not misused
;
; This program assumes that HARD LIMITS ARE NOT BEING USED. 
; This program assumes that tuning for the servo axis has been done,
; If not use the default values for SGP,SGV, SGI AND SGILIM

SCLD4000,25000

;set the distance to 1 rev for axis 1&2

SCLV4000,25000

;set the velocity to 1 rev/sec for axis 1&2

SCLA4000,25000

;set the acceleration to 1 rev/sec^2 for axis 1&2

SCALE1

;enable scaling

DEL MOTION

;delete motion program

DEF MOTION

;define motion program

DRIVE00

;disable axis 1&2

AXSDEF10

;define axis 1 as servo axis and axis 2 as a stepper axis

DRES,25000

;set the drive resolution of axis 2 to be 25000 steps/rev

ERES4000

;set the encoder resolution of axis 1 to be 4000 counts/rev

LH0,0

;disable hardware limits for axis 1&2

COMEXS1

;save command buffer on stop

COMEXC0

;disable continuous execution mode

MC00

;disable mode continuous

MA00

;set axis 1&2 to incremental distance mode

A10,10

;set the acceleration on axis 1&2 to be 10 rev/sec^2

V1,1

;set the velocity on axis 1&2 to be 1 rev/sec

D1,1

;set the distance on axis 1&2 to be 1 rev

DRIVE11

;enable drives on axis 1&2

GO11

;initiate motion on axis 1&2

END