The correction can be performed a few times until the error drops below ±2 counts. Often, this is performed in
one correction cycle.
Example:
INSTRUCTION FUNCTION
#A
Label
DP0
Define starting positions as zero
LINPOS=0
PR 1000
Required distance
BGX
Start motion
#B
AMX
Wait for completion
WT 50
Wait 50 msec
LINPOS = _DEX
Read linear position
ERR=1000-LINPOS-_TEX
Find the correction
JP #C,@ABS[ERR]<2
Exit if error is small
PR ERR
Command correction
BGX
JP #B
Repeat the process
#C
EN
Using the DMC Editor to Enter Programs (Advanced)
The GDK software package provides an editor and utilities that allow the upload and download of DMC programs
to the motion controller. In most instances the user will use Galil software or a host application to download
programs to the Galil controller rather than using the ED command.
Application programs for the DMC-41x3 may also be created and edited locally using the DMC-41x3 when using a
program such as hyper-terminal or telnet.
The DMC-41x3 provides a line Editor for entering and modifying programs. The Edit mode is entered with the ED
instruction. (Note: The ED command can only be given when the controller is in the non-edit mode, which is
signified by a colon prompt).
In the Edit Mode, each program line is automatically numbered sequentially starting with 000. If no parameter
follows the ED command, the editor prompter will default to the last line of the last program in memory. If
desired, the user can edit a specific line number or label by specifying a line number or label following ED.
ED
Puts Editor at end of last program
:ED 5
Puts Editor at line 5
:ED #BEGIN
Puts Editor at label #BEGIN
Line numbers appear as 000,001,002 and so on. Program commands are entered following the line numbers.
Multiple commands may be given on a single line as long as the total number of characters doesn’t exceed 80
characters per line.
While in the Edit Mode, the programmer has access to special instructions for saving, inserting and deleting
program lines. These special instructions are listed below:
Edit Mode Commands
<RETURN>
Typing the return key causes the current line of entered instructions to be saved. The editor will automatically
advance to the next line. Thus, hitting a series of <RETURN> will cause the editor to advance a series of lines.
Note, changes on a program line will not be saved unless a <return> is given.
<cntrl>P
Chapter 7 Application Programming ▫ 143 DMC-41x3 User Manual