Galil DMC-13X8 user manual Example 14 Control Variables, Example 15 Linear Interpolation

Models: DMC-13X8

1 210
Download 210 pages 31.17 Kb
Page 35
Image 35

Example 14 - Control Variables

Objective: To show how control variables may be utilized.

Instruction

Interpretation

#A;DP0

Label; Define current position as zero

PR 4000

Initial position

SP 2000

Set speed

BGX

Move X

AMX

Wait until move is complete

WT 500

Wait 500 ms

#B

 

V1 = _TPX

Determine distance to zero

PR -V1/2

Command X move 1/2 the distance

BGX

Start X motion

AMX

After X moved

WT 500

Wait 500 ms

V1=

Report the value of V1

JP #C, V1=0

Exit if position=0

JP #B

Repeat otherwise

#C

Label #C

EN

End of Program

To start the program, command

XQ #A

Execute Program #A

This program moves X to an initial position of 1000 and returns it to zero on increments of half the distance. Note, _TPX is an internal variable which returns the value of the X position. Internal variables may be created by preceding a DMC-13X8 instruction with an underscore, _.

Example 15 - Linear Interpolation

Objective: Move X,Y,Z motors distance of 7000,3000,6000, respectively, along linear trajectory. Namely, motors start and stop together.

Instruction

Interpretation

LM XYZ

Specify linear interpolation axes

LI 7000,3000,6000

Relative distances for linear interpolation

LE

Linear End

VS 6000

Vector speed

VA 20000

Vector acceleration

VD 20000

Vector deceleration

BGS

Start motion

Example 16 - Circular Interpolation

Objective: Move the XY axes in circular mode to form the path shown on Fig. 2-4. Note that the vector motion starts at a local position (0,0) which is defined at the beginning of any vector motion sequence. See application programming for further information.

USER MANUAL

Chapter 2 Getting Started • 35

Page 35
Image 35
Galil DMC-13X8 user manual Example 14 Control Variables, Example 15 Linear Interpolation, Example 16 Circular Interpolation