Example 13 - Control Variables And Offset - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

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

Example 13 - Control Variables and Offset

Objective: Illustrate the use of variables in iterative loops and use of multiple instructions on one line.
Instruction
#A
KI0
DP0
V1=8; V2=0
#B
OF V1
WT 200
V2=_TP
JP#C,@ABS[V2]<2
MG V2
V1=V1-1
JP #B
#C;EN
This program starts with a large offset and gradually decreases its value, resulting in decreasing error.
32
Chapter 2 Getting Started
i
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Interpretation
Set initial values
Initializing variables to be used by program
Program label #B
Set offset value
Wait 200 msec
Set variable V2 to the current position
Exit if error small
Report value of V2
Decrease Offset
Return to top of program
End
DMC-14x5/6

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents