DA deallocateDV dual loop AF analog feedback@ABS[n] |n|BK breakpointKS smoothing
DA arrays leftFA accel feedfwdAL arm latch@ACOS[n] arccosDL downloadLC low current
DM defineFV speed feedfwd
AL latch occurred?@ASIN[n] arcsin
DL labels leftMT motor type
DM space leftIL integrator limitCE configure@ATAN[n] arctanED editQS query error
LA listKD derivative gainOA off on failure@COM[n] bit notELSE if else YA drive pulses/step
QD downloadKI integral gain OC output compare@COS[n] cosineEN endYB motor steps/rev
QU print/upload KP proportional gain
RA recordMO motor off
RC begin
RC recordin
?NB notch widthRL read latch
MO motor off?OV failure voltage@RND[n] roundIF conditionalYS maintenance
#CMDERR; EN1 MR reverse (TP)#LIMSWI; RE1 TW MC timeout
#POSERR; RE1
#MCTIME; EN1
#AMPERR;RE1
Table of Contents
Table of Contents........................................................................................................................................................................ i
Servo and Stepper Motor Notation:.........................................................................................................................................1
Direct Command Arguments............................................................................................................................................... 3
Resetting the Controller to Factory Default......................................................................................................................... 4
AB .....................................................................................................................................................................................16
AC .....................................................................................................................................................................................18
AD .....................................................................................................................................................................................20
AG .....................................................................................................................................................................................22
AO .....................................................................................................................................................................................28
AQ .....................................................................................................................................................................................30
AR .....................................................................................................................................................................................31
AU .....................................................................................................................................................................................36
AV .....................................................................................................................................................................................39
AW ....................................................................................................................................................................................40
BA .....................................................................................................................................................................................41
BI .......................................................................................................................................................................................46
BK .....................................................................................................................................................................................47
BO .....................................................................................................................................................................................51
BP ...................................................................................................................................................................................... 52
CA .....................................................................................................................................................................................58
CD .....................................................................................................................................................................................61
CI .......................................................................................................................................................................................65
CO .....................................................................................................................................................................................69
DA .....................................................................................................................................................................................76
DC .....................................................................................................................................................................................77
DR .....................................................................................................................................................................................83
DV .....................................................................................................................................................................................86
EI .......................................................................................................................................................................................92
EM ..................................................................................................................................................................................... 95
EP ......................................................................................................................................................................................99
ES ....................................................................................................................................................................................102
ET .................................................................................................................................................................................... 103
FE ....................................................................................................................................................................................107
FI .....................................................................................................................................................................................108
GA ...................................................................................................................................................................................112
GR ...................................................................................................................................................................................116
IF .....................................................................................................................................................................................123
II ......................................................................................................................................................................................126
IL ..................................................................................................................................................................................... 129
IP .....................................................................................................................................................................................134
IT ..................................................................................................................................................................................... 135
LE .................................................................................................................................................................................... 148
LI .....................................................................................................................................................................................150
LS ....................................................................................................................................................................................156
NB ...................................................................................................................................................................................170
NO (‘ apostrophe also accepted).....................................................................................................................................172
OA ...................................................................................................................................................................................174
OB ...................................................................................................................................................................................175
OV ...................................................................................................................................................................................182
QR ...................................................................................................................................................................................196
RA ...................................................................................................................................................................................200
REM ................................................................................................................................................................................204
RI .....................................................................................................................................................................................205
RP .................................................................................................................................................................................... 208
SM ...................................................................................................................................................................................219
ST ....................................................................................................................................................................................222
TE .................................................................................................................................................................................... 230
TI .....................................................................................................................................................................................232
TIME ...............................................................................................................................................................................233
VA ...................................................................................................................................................................................248
YA ...................................................................................................................................................................................260
YR ...................................................................................................................................................................................263
Index ....................................................................................................................................................................................... 267
DMC-40x0 Command Reference Table of Contentsi v
This Page is Left Blank Intentionally
vi i Table of Contents DMC-40x0 Command Reference
Overview
Controller Notation
This command reference is a supplement to the Galil User Manual. For proper controller operation, consult
the Users Manual. This command reference describes commands for Galil Accelera Series Motion
Controller: DMC-40x0. Commands are listed in alphabetical order.
Please note that all commands may not be valid for every controller. To identify the controllers for which
the command is applicable, please review the Usage Section of the command description.
Servo and Stepper Motor Notation:
Your motion controller has been designed to work with both servo and stepper type motors. Installation
and system setup will vary depending upon whether the controller will be used with stepper motors, or
servo motors. To make finding the appropriate instructions faster and easier, icons will be next to any
information that applies exclusively to one type of system. Otherwise, assume that the instructions apply to
all types of systems. The icon legend is shown below.
Trippoints
The controller provides several commands that can be used to make logical decisions, or “trippoints,” based
on events during a running program. Such events include: the completion of a specific motion, waiting for
a certain position to be reached, or simply waiting for a certain amount of time to elapse.
When a program is executing on the controller, each program line is executed sequentially. However,
when a trippoint command is executed, the program halts execution of the next line of code until the status
of the trippoint is cleared. Note that the trippoint only halts execution of the thread from which it is
commanded while all other independent threads are unaffected. Additionally, if the trippoint is
commanded from a subroutine, execution of the subroutine, as well as the main thread, is halted.
Since trippoint commands are used as program flow instructions during a running program, they should not
be implemented directly from the command line of the terminal. Sending a trippoint command directly
from the command line might cause an interruption in communications between the host PC and the
controller until the trippoint is cleared.
As a brief introduction, the following table lists the available commands and their basic usages:
AD after distance
AI after input
AM after move
AP after absolute position
AR after relative position
AS at speed
AT at time relative to a reference time
AV after vector distance
MC motion complete and “in position”
MF after motion forward
MR after motion reverse
WT wait for time
Command Descriptions
Each executable instruction is listed in the following section in alphabetical order. Below is a description
of the information which is provided for each command.
The two-letter Opcode for each instruction is placed in the upper left corner. Below the opcode is a
description of the command and required arguments.
Axes Arguments
Some commands require the user to identify the specific axes to be affected. These commands are
followed by uppercase X,Y,Z, W or A,B,C,D,E,F,G and H. No commas are needed and the order of axes is
not important. Do not insert any spaces prior to any command. For example, STX; AMX is invalid
because there is a space after the semicolon. The proper syntax for commands requires that the command
argument be separated from the command by a single space. When an argument is not required and is not
given, the command is executed for all axes.
Valid syntax
SH A Servo Here, A only
SH ABD Servo Here, A,B and D axes
SH ACD Servo Here, A,C and D axes
SH ABCD Servo Here, A,B, C and D axes
SH BCAD Servo Here, A,B,C and D axes
SH ADEG Servo Here, A,D,E and G axes
SH H Servo Here, H axis only
SH Servo Here, all axes
Parameter Arguments
Some commands require numerical arguments to be specified following the instruction. In the argument
description, these commands are followed by lower case n,n,n,n,n,n,n,n, where the letter, n, represents the
value. Values may be specified for any axis separately or any combination of axes. The argument for each
axis is separated by commas. Examples of valid syntax are listed below.
Valid syntax
AC n Specify argument for A axis only
AC n,n Specify argument for A and B only
AC n,,n Specify argument for A and C only
AC n,n,n,n Specify arguments for A,B,C,D axes
AC n,n,n,n Specify arguments for A,B,C,D
AC ,n,,,n Specify arguments for B and E axis only
AC ,,,n,n Specify arguments for E and F
Where n is replaced by actual values.
Direct Command Arguments
An alternative method for specifying data is to set data for individual axes using an axis designator
followed by an equals sign. The * symbol can be used in place of the axis designator. The * defines data
for all axes to be the same. For example:
PRB=1000 Sets B axis data at 1000
PR*=1000 Sets all axes to 1000
Interrogation
Most commands accept a question mark (?) as an argument. This argument causes the controller to return
parameter information listed in the command description. Type the command followed by a ? for each axis
requested. The syntax format is the same as the parameter arguments described above except '?' replaces
the values.
PR ? The controller will return the PR value for the A axis
PR ,,,? The controller will return the PR value for the D axis
PR ?,?,?,? The controller will return the PR value for the A,B,C and D axes
PR ,,,,,,,? The controller will return the PR value for the H axis
PR*=? The controller will return the PR value for all axes
Operand Usage
Most commands have a corresponding operand that can be used for interrogation. The Operand Usage
description provides proper syntax and the value returned by the operand. Operands must be used inside of
valid DMC expressions. For example, to display the value of an operand, the user could use the command:
MG ‘operand’
All of the command operands begin with the underscore character (_). For example, the value of the
current position on the A axis can be assigned to the variable ‘V’ with the command:
V=_TPA
Usage Description
The Usage description specifies the restrictions on proper command usage. The following provides an
explanation of the command information provided:
"While Moving":
DMC-40x0 Command Reference Direct Command Arguments • 3
Describes whether the command is valid while the controller is performing a motion.
"In a program":
Describes whether the command may be used as part of a user-defined program.
"Command Line":
Describes whether the command may be used as a direct command.
“Controller Usage”:
Identifies the controller models that can accept the command.
Default Description
In the command description, the DEFAULT section provides the default values for controller setup
parameters. These parameters can be changed and the new values can be saved in the controller's nonvolatile memory by using the command, BN. If the setup parameters are not saved in non-volatile
memory, the default values will automatically reset when the system is reset. A reset occurs when the
power is turned off and on, when the reset button is pushed, or the command, RS, is given.
Resetting the Controller to Factory Default
When a master reset occurs, the controller will always reset all setup parameters to their default values and
the non-volatile memory is cleared to the factory state. A master reset is executed by the command, <ctrl
R> <ctrl S> <Return> OR
by powering up or resetting the controller with the MRST jumper on.
For example, the command KD is used to set the Derivative Constant for each axis. The default value for
the derivative constant is 64. If this parameter is not set by using the command, KD, the controller will
automatically set this value to 64 for each axis. If the Derivative Constant is changed but not saved in nonvolatile memory, the default value of 64 will be used if the controller is reset or upon power up of the
controller. If this value is set and saved in non-volatile memory, it will be restored upon reset until a
master reset is given to the controller.
The default format describes the format for numerical values which are returned when the command is
interrogated. The format value represents the number of digits before and after the decimal point.
The # operator denotes the name of a program label (for example #Move). Labels can be up to
seven characters long and are often used to implement subroutines or loops. Labels are
divided into (a) user defined and (b) automatic subroutines. User defined labels can be
printed with LL and the number of labels left available can be queried with MG _DL. The
automatic subroutines include #CMDERR, #LIMSWI, #POSERR, #ININT, #AUTO, and
#MCTIME. A label can only be defined at the beginning of a new line.
ARGUMENTS: #nnnnnnn where
nnnnnnn is a label name up to seven characters
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Controller Usage
RELATED COMMANDS:
LL List labels
DL Labels left
JP Jump statement
JS Jump subroutine
ALL
EXAMPLES:
#Loop; JP#Loop, x=10 ;'wait until x becomes 10
#Move
PRX=1000
BGX
AMX
EN
;'define a subroutine to move the x axis
DMC-40x0 Command Reference # • 5
$
FUNCTION: Hexadecimal
DESCRIPTION:
The $ operator denotes that the following string is in hexadecimal notation
ARGUMENTS: $nnnnnnnn.mmmm
n is up to eight hexadecimal digits (denoting 32 bits of integer)
m is up to four hexadecimal digits (denoting 16 bits of fraction)
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
+ - * / % Multiply (shift left)
+ - * / % Divide (shift right)
MG {$8.4} Print in hexadecimal
EXAMPLES:
x = $7fffffff.0000 ;'store 2147483647 in x
y = x & $0000ffff.0000
z = x & $ffff0000.0000 / $10000
ALL
;'store lower 16 bits of x in y
;'store upper 16 bits of x in z
6 ● $ DMC-40x0 Command Reference
& |
FUNCTION: Bitwise Logical Operators AND and OR
DESCRIPTION:
The operators & and | are typically used with IF, JP, and JS to perform conditional jumps;
however, they can also be used to perform bitwise logical operations.
ARGUMENTS: n & m or n | m where
n and m are signed numbers in the range -2147483648 to 2147483647.
For IF, JP, and JS, n and m are typically the results of logical expressions such as (x > 2)
“&” is also used to pass a variable by reference in a JS call. See
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL
RELATED COMMANDS:
@COM[n] Bitwise complement
IF If statement
JP Jump statement
JS Jump subroutine
EXAMPLES:
IF (x > 2) & (y = 4)
MG"true"
ENDIF
:MG 1 | 2
3.0000
:
;'x must be greater than 2 and y equal to 4
;'for the message to print
;'Bitwise operation: 01 OR 10 is 11 = 3
Pass By Reference Example:
value=5 ;'a value to be passed by reference
global=8 ;'a global variable
JS#SUM(&value,1,2,3,4,5,6,7) ;'note first arg passed by reference
MG value ;'message out value after subroutine.
MG_JS;'message out returned value
EN
'
#SUM;NO(* ^a,^b,^c,^d,^e,^f,^g)
^a=^b+^c+^d+^e+^f+^g+^h+global
EN,,^a
'notes:
'do not use spaces when working with ^
'If using global variables, they MUST be created before the subroutine is run
Executed program from program2.dmc
36.0000
36.0000
JS.
DMC-40x0 Command Reference & | • 7
^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h
FUNCTION: JS subroutine stack variable
DESCRIPTION:
Provides local subroutine access for up to 8 variables passed on the subroutine stack when using
the JS (jump to subroutine) command.
Passing values on the stack is advanced DMC programming, and is recommended for
experienced DMC programmers familiar with the concept of passing arguments by value and
by reference.
See the
JS command for a full explanation of passing stack variables.
Notes:
1. Passing parameters has no type checking, so it is important to exercise good programming
style when passing parameters. See examples below for recommended syntax.
2. Do not use spaces in expressions containing ^.
3. Global variables MUST be assigned prior to any use in subroutines where variables are
passed by reference.
USAGE: Defaults:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage DMC-4000
RELATED COMMANDS:
MG Message
& | Pass by reference
JS Jump to subroutine
EXAMPLE:
#Add
JS#SUM(1,2,3,4,5,6,7,8);' call subroutine, pass values
MG_JS;' printreturn value
EN
'
#SUM;NO(^a,^b,^c,^d,^e,^f,^g,^h) syntax note for use
EN,,(^a+^b+^c+^d+^e+^f+^g+^h);' return sum
:Executed program from program1.dmc
36.0000
Note: For additional examples, see the “JS Subroutine Stack Variables (^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h)”
The parentheses denote the order of math and logical operations. Note that the controller DOES
NOT OBEY STANDARD OPERATOR PRECEDENCE. For example, multiplication is
NOT evaluated before addition. Instead, the controller follows left-to-right precedence.
Therefore, it is recommended to use parenthesis as much as possible.
ARGUMENTS: (n) where
n is a math (+ - * /) or logical (& |) expression
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
+ - * / % Math Operators
& | Logical Operators
EXAMPLES:
:MG 1 + 2 * 3
9.0000
:MG 1 + (2 * 3)
7.0000
:
ALL
DMC-40x0 Command Reference ( ) • 9
;
FUNCTION: Semicolon (Command Delimiter)
DESCRIPTION:
The semicolon operator allows multiple Galil commands to exist on a single line. It is used for the
following three reasons:
(1) To put comments on the same line as the command (BGX ;’begin motion)
(2) To compress DMC programs to fit within the program line limit (Note: use a compression
utility to do this. Do not program this way because it is hard to read.)
(3) To give higher priority to a thread. All commands on a line are executed before the thread
scheduler switches to the next thread.
ARGUMENTS: n; n; n; … where
n is a Galil command
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
NO (‘ apostrophe also accepted) comment
ALL
EXAMPLES:
BGX; 'comment
PRX=1000;BGX;AMX ;'Save program line space
#High
a = a + 1; b = b + 1
JP#High
#Low
c = c + 1
d = d + 1
JP#Low
;'#High priority thread executes twice as fast as
;'#Low when run in parallel
10 ● ; DMC-40x0 Command Reference
[ ]
FUNCTION: Square Brackets (Array Index Operator)
DESCRIPTION:
The square brackets are used to denote the array index for an array, or to denote an array name.
(They are also used to designate the argument to a function, such as @ABS[n].)
ARGUMENTS: mmmmmmmm[n] where
mmmmmmmm is the array name
n is the array index and is an integer between 0 and 15999
When used in an array, n=-1 returns the array length.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
DM Dimension Array
QU Print/Upload Array
EXAMPLES:
DM A[100] ;'define a 100 element array
A[0] = 3
MG A[0]
QU A[]
len= A[-1]
MG len
:100
ALL
;'set first element to 3
;'print element 0
;'print entire array
;'variable len now contains the length of array A[]
;'Display Variable len
;'Response from MG len
DMC-40x0 Command Reference [ ] • 11
+ - * / %
FUNCTION: Math Operators
DESCRIPTION:
The addition, subtraction, multiplication, division, and modulus operators are binary operators
(they take two arguments and return one value) used to perform mathematical operations on
variables, constants, and operands.
ARGUMENTS: (n + m) or (n – m) or (n * m) or (n / m) or (n % m) where
n and m are signed numbers in the range -2147483648 to 2147483647
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
( ) Parenthesis
EXAMPLES:
:x =((1+(2*3))/7)-2 ;'assign -1 to x
:MG 40 % 6
4.0000
:
ALL
;'integer remainder of 40 divided by 6
12 ● + - * / % DMC-40x0 Command Reference
<, >, =, <=, >=, <>
FUNCTION: Comparison Operators
DESCRIPTION:
The comparison operators are as follows:
< less than
> greater than
= equals
<= less than or equal
>= greater than or equal
<> not equals
These are used in conjunction with IF, JP, JS, ( ), &, and | to perform conditional jumps. The
result of a comparison expression can also be printed with MG or assigned to a variable.
ARGUMENTS: (n < m) or (n > m) or (n = m) or (n <= m) or (n >= m) or (n <> m) where
n and m are signed numbers in the range -2147483648 to 2147483647
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL
RELATED COMMANDS:
( ) Parentheses
IF If statement
JP Jump
JS Jump subroutine
EXAMPLES:
IF(x > 2) & (y = 4)
MG"true"
ENDIF
;'x must be greater than 2 and y equal to 4 for
;'the message to print
The assignment operator is used for three reasons:
(1) to define and initialize a variable (x = 0) before it is used
(2) to assign a new value to a variable (x = 5)
(3) to print a variable or array element (x= which is equivalent to MG x). MG is the preferred
method of printing.
ARGUMENTS: mmmmmmmm = n where
mmmmmmmm is a variable name and n is a signed number in the range -2147483648 to
2147483647
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
MG Print Message
ALL
EXAMPLES:
:x=5
:x=
5.0000
:MG x
5.0000
:
;'define and initialize x to 5
;'print x two different ways
14 ● = DMC-40x0 Command Reference
~
FUNCTION: Variable Axis Designator
DESCRIPTION:
The ~ signifies a variable axis designator
ARGUMENTS: ~n=m
n is a lowercase letter a through h
m is a positive integer 0 through 11, where
0 or “A” (quotes required) = X axis
1 or “B” = Y axis
2 or “C” = Z axis
3 or “D” = W axis
4 or “E” = E Axis
5 or “F” = F axis
6 or “G” = G axis
7 or “H” = H axis
8 or “S” = S coordinate system
9 or “T” = T coordinate system
10 or “N” = Virtual N axis
11 or “M” = Virtual M axis
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format 1.0
Command Line Yes
Controller Usage ALL CONTROLLERS
OPERAND USAGE:
~n contains the axis number 0-11
EXAMPLES:
~a=2;~b=6 ;'Sets ~s to 2 (Z axis). Sets ~b to 6 (G axis)
PR~a=1000
JG~b=9000
BG~a~b
;'Relative position move 1000 counts on ~a axis (set as Z axis)
;'Set jog speed of ~b axis (set as G axis) to 9000 cts/sec
;'Begin Motion on ~a and ~b axis
DMC-40x0 Command Reference ~ • 15
AB
FUNCTION: Abort
DESCRIPTION:
AB (Abort) stops a motion instantly without a controlled deceleration. If there is a program
operating, AB also aborts the program unless a 1 argument is specified. The command, AB,
will shut off the motors for any axis in which the off on error function is enabled (see
command OE).
AB aborts motion on all axes in motion and cannot stop individual axes.
ARGUMENTS: AB n where
n = 0 The controller aborts motion and program
n = 1 The controller aborts motion only
No argument will cause the controller to abort the motion and program
USAGE: DEFAULTS:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Controller Usage
OPERAND USAGE:
_AB gives state of Abort Input, 1 inactive and 0 active.
ALL CONTROLLERS
RELATED COMMANDS:
SH Re-enables motor
OE Specifies Off On Error
EXAMPLES:
AB ;'Stops motion
OE 1,1,1,1 ;'Enable off on error
AB ;'Shuts off motor command and stops motion
#A;'Label - Start of program
JG 20000 ;'Specify jog speed on X-axis
BGX;'Begin jog on X-axis
WT 5000 ;'Wait 5000 msec
AB1 ;'Stop motion without aborting program
WT 5000 ;'Wait 5000 milliseconds
SH;'Servo Here
JP#A;'Jump to Label A
EN;'End of the routine
Hint: Remember to use the parameter 1 following AB if you only want the motion to be aborted.
Otherwise, your application program will also be aborted.
16 ● AB DMC-40x0 Command Reference
@ABS[n]
FUNCTION: Absolute value
DESCRIPTION:
Takes the absolute value of the given number. Returns the value if positive, and returns -1 times
the value if negative.
ARGUMENTS: @ABS[n] where
n is a signed number in the range -2147483647 to 2147483647
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@SQR[n] Square Root
EXAMPLES:
:MG @ABS[-2147483647]
2147483647.0000
:
ALL
DMC-40x0 Command Reference @ABS[n] • 17
AC
FUNCTION: Acceleration
DESCRIPTION:
The Acceleration (AC) command sets the linear acceleration rate of the motors for independent
moves, such as PR, PA and JG moves. The acceleration rate may be changed during motion.
The DC command is used to specify the deceleration rate.
ARGUMENTS: AC n,n,n,n,n,n,n,n or ACA=n where
n is an unsigned number in the range 1024 to 1073740800. The parameters input will be rounded
down to the nearest factor of 1024. The units of the parameters are counts per second squared.
n = ? Returns the acceleration value for the specified axes.
USAGE: DEFAULTS:
While Moving Yes Default Value 256000
In a Program Yes Default Format 10.0
Command Line Yes
Controller Usage
OPERAND USAGE:
_ACx contains the value of acceleration for the specified axis.
RELATED COMMANDS:
DC Specifies deceleration rate.
FA Feedforward Acceleration
IT Smoothing constant - S-curve
ALL CONTROLLERS
EXAMPLES:
AC 150000,200000,300000,400000 Set A-axis acceleration to 150000, B-axis to
AC ?,?,?,? Request the Acceleration
149504, 199680, 299008, 399360 Return Acceleration
V=_ACB Assigns the B acceleration to the variable V
200000 counts/sec2, the C axis to 300000
counts/sec2, and the D-axis to 400000
count/sec2.
(resolution, 1024)
Hint: Specify realistic acceleration rates based on your physical system such as motor torque rating,
loads, and amplifier current rating. Specifying an excessive acceleration will cause large following error
during acceleration and the motor will not follow the commanded profile. The acceleration feedforward
command FA will help minimize the error.
18 ● AC DMC-40x0 Command Reference
@ACOS[n]
FUNCTION: Inverse cosine
DESCRIPTION:
Returns in degrees the arc cosine of the given number.
ARGUMENTS: @ACOS[n] where
n is a signed number in the range -1 to 1.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@ASIN[n] Arc sine
@SIN[n] sine
@ATAN[n] Arc tangent
@COS[n] Cosine
@TAN[n] Tangent
EXAMPLES:
:MG @ACOS[-1]
180.0000
:MG @ACOS[0]
90.0000
:MG @ACOS[1]
0.0001
:
ALL
DMC-40x0 Command Reference @ACOS[n] • 19
AD
FUNCTION: After Distance
DESCRIPTION:
The After Distance (AD) command is a trippoint used to control the timing of events. This
command will hold up the execution of the following command until one of the following
conditions have been met:
1. The commanded motor position crosses the specified relative distance from the start of the
move.
2. The motion profiling on the axis is complete.
3. If in jog (JG) mode, the commanded motion is in the direction which moves away from the
specified position.
The units of the command are quadrature counts. Only one axis may be specified at a time. AD
can only be used when there’s command motion on the axis.
If the direction of motion is reversed when in PT mode, the starting position for AD is reinitialized
to the position at which the motor is reversed.
Note: AD command will be affected when the motion smoothing time constant, IT, is not 1. See
IT command for further information.
ARGUMENTS: AD n,n,n,n,n,n,n,n or ADA=n where
n is an unsigned integers in the range 0 to 2147483647 decimal.
Note: The AD command cannot have more than 1argument.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
AV After distance for vector moves
AP After position trip point
AR After relative distance trip point
MF Motion Forward trip point
MR Motion Reverse trip point
EXAMPLES:
#A;DP0,0 ;'Begin Program
PR 10000,20000 ;'Specify positions
BG;'Begin motion
AD 5000 ;'After A reaches 5000
MG"Halfway to A";TPA;'Send message
AD ,10000 ;'After B reaches 10000
MG"Halfway to B";TPB;'Send message
EN;'End Program
Hint: The AD command is accurate to the number of counts that occur in 2*TM μsec. Multiply your speed
μ
by 2*TM
sec to obtain the maximum position error in counts. Remember AD measures incremental
distance from start of move on one axis.
20 ● AD DMC-40x0 Command Reference
AF
FUNCTION: Analog Feedback
DESCRIPTION:
The Analog Feedback (AF) command is used to set an axis with analog feedback instead of digital
feedback (quadrature/pulse + dir). The analog feedback is decoded by a 12-bit A/D converter.
An option is available for 16-bits. The position and analog range is set using the AQ
command.
Note: AQ must be set prior to setting AF
ARGUMENTS: AF n,n,n,n,n,n,n,n or AFA=n where
n = 1 Enables analog feedback
n = 0 Disables analog feedback and switches to digital feedback
n = ? Returns the state of analog feedback for the specified axes. 0 disabled, 1 enabled
USAGE: DEFAULTS:
While Moving No Default Value 0,0,0,0
In a Program Yes Default Format -
Command Line Yes
Controller Usage
OPERAND USAGE:
_AFx contains a “1” if analog feedback is enabled and “0” if not enabled for the specified axis.
ALL CONTROLLERS
RELATED COMMANDS:
AQ Analog Configuration
CE Configure Encoder
MT Motor Type
EXAMPLES:
AF 1,0,0,1 Analog feedback on A and D axis
V1 = _AFA Assign feedback type to variable
AF ?,?,? Interrogate feedback type
DMC-40x0 Command Reference AF • 21
AG
FUNCTION: Amplifier Gain
DESCRIPTION:
The AG command sets the amplifier current/voltage gain for the AMP-430x0. 0 sets the lowest
ratio or value while 2 sets the highest ratio. AG is stored in EEPROM by the BN command.
The MT command must be issued prior to the AG command to set the proper range. The axis
must be in the motor off state (MO) before new AG settings will take effect.
ARGUMENTS: AG n,n,n,n,n,n,n,n where
AMP-430x0: SDM-44140 SDM-44040
n = 0 0.4 A/V n = 0 0.5 A n = 0 0.5 A
n = 1 0.7 A/V n = 1 1.0 A n = 1 0.75 A
n = 2 1.0 A/V n = 2 2.0 A n = 2 1.0 A
n = 3 3.0 A n = 3 1.4 A
n = ? Returns the value of the amplifier gain
USAGE: DEFAULTS:
While Moving No Default Value 1, 1, 1, 1, 1, 1, 1, 1
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
5TA Tell Amplifier
AW Amplifier Bandwidth
BS Brushless Setup
EXAMPLE:
MO Set motor off
AG2,1 Sets the highest amplifier gain for A axis and medium
SH Turn motor on
BN Save AG setting to EEPROM
DMC-40x0-D430x0; DMC-40x0-D4140; DMC-40x0-D4040
gain for B axis on 430x0.
22 ● AG DMC-40x0 Command Reference
AI
FUNCTION: After Input
DESCRIPTION:
The AI command is a trippoint used in motion programs to wait until after a specified input has
changed state. This command can be configured such that the controller will wait until the
input goes high or the input goes low.
ARGUMENTS: AI +/-n where
n is an integer between 1 and 96 and represents the input number. If n is positive, the controller
will wait for the input to go high. If n is negative, it waits for n to go low.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@IN[n] Function to read input 1 through 96
II Input interrupt
#ININT Label for input interrupt
EXAMPLES:
#A ;'Begin Program
AI 8 ;'Wait until input 8 is high
SP 10000 ;'Speed is 10000 counts/sec
AC 20000 ;'Acceleration is 20000 counts/sec2
PR 400 ;'Specify position
BGA;'Begin motion
EN;'End Program
ALL CONTROLLERS
Hint: The AI command actually halts execution until specified input is at desired logic level. Use the
conditional Jump command (JP) or input interrupt (II) if you do not want the program sequence to halt.
DMC-40x0 Command Reference AI • 23
AL
FUNCTION: Arm Latch
DESCRIPTION:
The AL command enables the latching function (high speed main or auxiliary position capture) of
the controller. When the position latch is armed, the main or auxiliary encoder position will
be captured upon a low going signal. Each axis has a position latch and can be activated
through the general inputs:
A axis latch Input 1
B axis latch Input 2
C axis latch Input 3
D axis latch Input 4
E axis latch Input 9
F axis latch Input 10
G axis latch Input 11
H axis latch Input 12
The command RL returns the captured position for the specified axes. When interrogated the AL
command will return a 1 if the latch for that axis is armed or a zero after the latch has
occurred. The CN command can be used to change the polarity of the latch function.
ARGUMENTS: AL nnnnnnnn or AL n,n,n,n,n,n,n,n where
n can be A,B,C,D,E,F,G or H, specifying the main encoder for the axis to be latched
n can be SA,SB,SC,SD,SE,SF,SG or SH, specifying the auxiliary encoder.
n can be TA,TB,TC,TD,TE,TF,TG or TH, specifying the main encoder is latched from the index
pulse instead of a digital input.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_ALn contains the state of the specified latch. 0 = not armed, 1 = armed.
RELATED COMMANDS:
RL Report Latch
EXAMPLES:
#A;'Program Label
ALB;'Arm B-axis latch
JG,50000 ;'Set up jog at 50000 counts/sec
BGB;'Begin the move
#LOOP;'Loop until latch has occurred
JP#LOOP,_ALB=1
RLB;'Transmit the latched position
EN;'End of program
24 ● AL DMC-40x0 Command Reference
AM
FUNCTION: After Move
DESCRIPTION:
The AM command is a trippoint used to control the timing of events. This command will hold up
execution of the following commands until the current move on the specified axis or axes is
completed. Any combination of axes or a motion sequence may be specified with the AM
command. For example, AM AB waits for motion on both the A and B axis to be complete.
AM with no parameter specifies that motion on all axes is complete.
ARGUMENTS: AM nnnnnnnnnn where
n is A,B,C,D,E,F,G,H,S or T or any combination to specify the axis or sequence
No argument specifies to wait for after motion on all axes and / or sequences
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line No
Controller Usage
RELATED COMMANDS:
BG _BGn contains a 0 if motion complete
MC Motion Complete
EXAMPLES:
#MOVE;'Program MOVE
PR 5000,5000,5000,5000 ;'Position relative moves
BG A ;'Start the A-axis
AM A ;'After the move is complete on A,
BG B ;'Start the B-axis
AM B ;'After the move is complete on B,
BG C ;'Start the C-axis
AM C ;'After the move is complete on C
BG D ;'Start the D-axis
AM D ;'After the move is complete on D
EN;'End of Program
ALL CONTROLLERS
Hint: AM is a very important command for controlling the timing between multiple move sequences. For
example, if the A-axis is in the middle of a position relative move (PR) you cannot make a position absolute
move (PAA, BGA) until the first move is complete. Use AMA to halt the program sequences until the first
profiled motion is complete. AM tests for profile completion. The actual motor may still be moving. To
halt program sequence until the actual physical motion has completed, use the MC command. Anothe r
method for testing motion complete is to check for the internal variable _BGn, being equal to zero (see
BG
command).
DMC-40x0 Command Reference AM • 25
#AMPERR
FUNCTION: Amplifier error automatic subroutine
DESCRIPTION:
#AMPERR is used to run code when a fault occurs on a Galil amplifier. See the
and individual amplifier information in the DMC-40x0 User Manual.
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
ALL
RELATED COMMANDS:
TA Tell amplifier status
CN Configure I/O
OE Off on error
EXAMPLES:
#AMPERR;' Amplifier error routine
MG"AMPERR"
RE1
;' Send Message
;' Return to main Program
NOTE: Unlike previous controllers, thread 0 does not have to be running in order for the #AMPERR
routine to trigger.
NOTE: Use RE to end the routine
TA command
26 ● #AMPERR DMC-40x0 Command Reference
@AN[n]
FUNCTION: Read analog input
DESCRIPTION:
Returns the value of the given analog input in volts
ARGUMENTS: @AN[n] where
n is an unsigned integer in the range 1 to 8
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
AQ Analog Range
@IN[n] Read digital input
@OUT[n] Read digital output
SB Set digital output bit
CB Clear digital output bit
OF Set analog output offset
ALL
EXAMPLES:
:MG @AN[1] ;'print analog input 1
1.7883
:x = @AN[1] ;'assign analog input 1 to a variable
DMC-40x0 Command Reference @AN[n] • 27
AO
FUNCTION: Analog Out
DESCRIPTION:
The AO command sets the analog output voltage of Modbus Devices connected via Ethernet.
ARGUMENTS: AO m, n where
m is the I/O number calculated using the following equations:
m = (SlaveAddress*10000) + (HandleNum*1000) + ((Module-1)*4) + (Bitnum-1)
Slave Address is used when the ModBus device has slave devices connected to it and
specified as Addresses 0 to 255. Please note that the use of slave devices
for modbus are very rare and this number will usually be 0.
HandleNum is the handle specifier from A to F.
Module is the position of the module in the rack from 1 to 16.
BitNum is the I/O point in the module from 1 to 4.
n = the voltage which ranges from 9.99 to –9.99
USAGE: DEFAULTS:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
SB Set Bit
CB Clear Bit
MB Modbus
28 ● AO DMC-40x0 Command Reference
AP
FUNCTION: After Absolute Position
DESCRIPTION:
The After Position (AP) command is a trippoint used to control the timing of events. This
command will hold up the execution of the following command until one of the following
conditions have been met:
1. The actual motor position crosses the specified absolute position. When using a stepper
motor, this condition is satisfied when the stepper position (as determined by the output
buffer) has crossed the specified position. For further information see Chapter 6 of the
User Manual “Stepper Motor Operation”.
2. The motion profiling on the axis is complete.
3. The commanded motion is in the direction which moves away from the specified
position.
The units of the command are quadrature counts. Only one axis may be specified at a time. AP
can only be used when there’s commanded motion on the axis.
ARGUMENTS: AP n,n,n,n,n,n,n,n or APA=n where
n is a signed integer in the range -2147483648 to 2147483647 decimal
USAGE: DEFAULTS:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line No
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
AR Trippoint for relative distances
MF Trippoint for forward motion
EXAMPLES:
#TEST;'Program B
DP0 ;'Define zero
JG 1000 ;'Jog mode (speed of 1000 counts/sec)
BGA;'Begin move
AP 2000 ;'After passing the position 2000
V1=_TPA;'Assign V1 A position
MG"Position is", V1 ;'Print Message
ST;'Stop
EN;'End of Program
Hint: The accuracy of the AP command is the number of counts that occur in 2*TM μsec. Multiply the
μ
speed by 2*TM
sec to obtain the maximum error. AP tests for absolute position. Use the AD command to
measure incremental distances.
DMC-40x0 Command Reference AP • 29
AQ
FUNCTION: Analog Configuration
DESCRIPTION:
The Analog Configuration (AQ) command is used to set the range of the analog inputs. There are
4 different ranges that each analog input may be assigned.
Setting a negative range for inputs 1,3,5 or 7, configures those inputs as the differential input
relative to input 2,4,6 and 8 respectively.
ARGUMENTS: AQn,m where
n is an integer from 1-8 that represents the analog input channel
m is an integer from 1-4 that designates the analog range
m Analog Range Position Range
12 bit 16 bit
1 +/- 5V
2 +/-10V
3 0-5V
4 0-10V
USAGE: DEFAULTS:
While Moving Yes Default Value n,2
In a Program Yes Default Format 1.0000
Command Line Yes
Controller Usage
-2048 to 2047 -32,768 to 32767
-2048 to 2047 -32,768 to 32767
0 to 4095 0 to 65535
0 to 4095 0 to 65535
ALL CONTROLLERS
OPERAND USAGE:
_AQn holds the range setting for that axis where n=1-8
RELATED COMMANDS:
@AN[n]
AF
Read Analog Input
Analog Feedback
EXAMPLES:
AQ2,3 Specify analog input 2 as 0-5V
AQ1,-3 Specify analog input 1 as 0-5V and the
MG_AQ2
:3.0000
differential input to analog input 2
30 ● AQ DMC-40x0 Command Reference
AR
FUNCTION: After Relative Distance
DESCRIPTION:
The After Relative (AR) command is a trippoint used to control the timing of events. This
command will hold up the execution of the following command until one of the following
conditions have been met:
1. The commanded motor position crosses the specified relative distance from either the
start of the move or the last AR or AD command. When using a stepper motor, this
condition is satisfied when the stepper position (as determined by the output buffer) has
crossed the specified Relative Position. For further information see Chapter 6 of the User
Manual “Stepper Motor Operation”.
2. The motion profiling on the axis is complete.
3. If in jog (JG) mode, the commanded motion is in the direction which moves away from
the specified position.
If the direction of the motion is reversed when in position tracking mode (see PT command), the
starting point for the trippoint is reinitialized to the point at which the motion reversed.
The units of the command are quadrature counts. Only one axis may be specified at a time. AR
can only be used when there’s commanded motion on the axis.
Note: AR will be affected when the motion smoothing time constant, IT, is not 1. See IT
command for further information.
ARGUMENTS: AR n,n,n,n,n,n,n,n or ARA=n where
n is an unsigned integer in the range 0 to 2147483647 decimal.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
AV Trippoint for after vector position for coordinated moves
AP Trippoint for after absolute position
EXAMPLES:
#A;DP 0,0,0,0 ;'Begin Program
JG 50000,,,7000 ;'Specify speeds
BGAD;'Begin motion
#B;'Label
AR 25000 ;'After passing 25000 counts of relative distance on A-axis
MG"Passed _A",_TPA ;'Send message on A-axis
JP#B;'Jump to Label #B
EN;'End Program
Hint: AR is used to specify incremental distance from last AR or AD command. Use AR if multiple position
trippoints are needed in a single motion sequence.
DMC-40x0 Command Reference AR • 31
AS
FUNCTION: At Speed
DESCRIPTION:
The AS command is a trippoint that occurs when the generated motion profile has reached the
specified speed. This command will hold up execution of the following command until the
commanded speed has been reached. The AS command will operate after either accelerating
or decelerating. If the speed is not reached, the trippoint will be triggered after the speed
begins diverging from the AS value.
ARGUMENTS: AS nnnnnnnnnn where
n is A,B,C,D,E,F,G,H,S or T or any combination to specify the axis or sequence
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Controller Usage
EXAMPLES:
#SPEED;'Program A
PR 100000 ;'Specify position
SP 10000 ;'Specify speed
BGA;'Begin A
ASA;'After speed is reached
MG"At Speed";'Print Message
EN;'End of Program
ALL CONTROLLERS
WARNING:
The AS command applies to a trapezoidal velocity profile only with linear acceleration. AS used with
smoothing profiling will be inaccurate.
32 ● AS DMC-40x0 Command Reference
@ASIN[n]
FUNCTION: Inverse sine
DESCRIPTION:
Returns in degrees the arc sine of the given number.
ARGUMENTS: @ASIN[n] where
n is a signed number in the range -1 to 1.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@ACOS[n] Arc cosine
@SIN[n] sine
@ATAN[n] Arc tangent
@COS[n] Cosine
@TAN[n] Tangent
EXAMPLES:
:MG @ASIN[-1]
-90.0000
:MG @ASIN[0]
0.0000
:MG @ASIN[1]
90.0000
:
ALL
DMC-40x0 Command Reference @ASIN[n] • 33
AT
FUNCTION: At Time
DESCRIPTION:
The AT command is a trippoint which is used to hold up execution of the next command until
after the specified time has elapsed. The time is measured with respect to a defined reference
time. AT 0 establishes the initial reference. AT n specifies n msec from the reference. AT -n
specifies n msec from the reference and establishes a new reference after the elapsed time
period.
ARGUMENTS: AT n where
n is a signed, even integer in the range 0 to 2 Billion
n = 0 defines a reference time at current time
n > 0 specifies a wait time of n msec from the reference time
n < 0 specifies a wait time of n msec from the reference time and re-sets the reference time
when the trippoint is satisfied.
(AT -n is equivalent to AT n; AT <old reference +n>
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format -
Command Line No
Controller Usage
ALL CONTROLLERS
EXAMPLES:
The following commands are sent sequentially
AT 0 Establishes reference time 0 as current time
AT 50 Waits 50 msec from reference 0
AT 100 Waits 100 msec from reference 0
AT -150 Waits 150 msec from reference 0 and sets new reference at 150
AT 80 Waits 80 msec from new reference (total elapsed time is 230 msec)
34 ● AT DMC-40x0 Command Reference
@ATAN[n]
FUNCTION: Inverse tangent
DESCRIPTION:
Returns in degrees the arc tangent of the given number.
ARGUMENTS: @ATAN[n]
n is a signed number in the range -2147483647 to 2147483647
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@ASIN[n] Arc sine
@SIN[n] sine
@ACOS[n] Arc cosine
@COS[n] Cosine
@TAN[n] Tangent
EXAMPLES:
:MG @ATAN[-10]
-84.2894
:MG @ATAN[0]
0.0000
:MG @ATAN[10]
84.2894
:
ALL
DMC-40x0 Command Reference @ATAN[n] • 35
AU
FUNCTION: Set amplifier current loop
DESCRIPTION:
The AU command sets the amplifier current loop gain for the AMP-430x0. Current loop is
available in one of two settings (0 is normal while 1 sets a higher current loop) Values stored
in EEPROM by the BN command.
ARGUMENTS: AU n where
n = 0 for normal current loop gain
= 0.5 for chopper mode and normal loop gain
= 1 for higher current loop gain
= 1.5 for chopper mode and higher current loop gain
USAGE: DEFAULTS:
While Moving No Default Value 0
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
TA Tell Amplifier
AG Amplifier Gain
BS Brushless Setup
AW Amplifier Bandwidth
EXAMPLE:
AU1,0 Sets X-axis to higher loop gain and Y-axis to normal loop gain
AUY=? Query Y-axis current loop gain
:0 Y-axis normal current loop gain
DMC-40x0-D430x0
36 ● AU DMC-40x0 Command Reference
#AUTO
FUNCTION: Subroutine to run automatically upon power up
DESCRIPTION:
#AUTO denotes code to run automatically when power is applied to the controller, or after the
controller is reset. When no host software is used with the controller, #AUTO and the BP
command are required to run an application program on the controller.
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
RELATED COMMANDS:
BP Burn program
EN End program
EXAMPLES:
#AUTO;' Move the x axis upon power up
PRX=1000 ;' Move 1000 counts
BGX;' Begin Motion
AMX;' Wait until motion is complete
EN;' End program
NOTE: Use EN to end the routine
ALL
DMC-40x0 Command Reference #AUTO • 37
#AUTOERR
FUNCTION: Automatic subroutine for notification of EEPROM checksum errors
DESCRIPTION:
#AUTOERR will run code upon power up if data in the EEPROM has been corrupted. The
EEPROM is considered corrupt if the checksum calculated on the bytes in the EEPROM do
not match the checksum written to the EEPROM. The type of checksum error can be queried
with _RS
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
RELATED COMMANDS:
_RS Checksum error code
EN End program
ALL
EXAMPLES:
#AUTO
WT 2000
MG"AUTO"JP#AUTO
EN
#AUTOERR
WT500
MG"AUTOERR ", _RS
EN
NOTE: Use EN to end the routine
38 ● #AUTOERR DMC-40x0 Command Reference
AV
FUNCTION: After Vector Distance
DESCRIPTION:
The AV command is a trippoint, which is used to hold up execution of the next command during
coordinated moves such as VP,CR or LI. This trippoint occurs when the path distance of a
sequence reaches the specified value. The distance is measured from the start of a
coordinated move sequence or from the last AV command. The units of the command are
quadrature counts.
ARGUMENTS: AV s,t where
s and t are unsigned integers in the range 0 to 2147483647 decimal. 's' represents the vector
distance to be executed in the S coordinate system and 't' represents the vector distance to be
executed in the T coordinate system.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format -
Command Line No
Controller Usage
OPERAND USAGE:
_AVS contains the vector distance from the start of the sequence in the S coordinate system and
_AVT contains the vector distance from the start of the sequence in the T coordinate system.
ALL CONTROLLERS
EXAMPLES:
#MOVE;DP 0,0 ;'Label
CAT;'Specify the T coordinate system
LMAB;'Linear move for A,B
LI 1000,2000 ;'Specify distance
LI 2000,3000 ;'Specify distance
LE
BGT;'Begin motion in the T coordinate system
AV ,500 ;'After path distance = 500,
MG"Path>500";TPAB ;'Print Message
EN;'End Program
Hint: Vector Distance is calculated as the square root of the sum of the squared distance for each axis in
the linear or vector mode.
DMC-40x0 Command Reference AV • 39
AW
FUNCTION: Amplifier Bandwidth
DESCRIPTION:
The AW command accepts the drive voltage (volts) and motor inductance (millihenries) and uses
the current loop gain setting (AU) as the default and then reports the calculated bandwidth.
The user can check how the amplifier bandwidth is affected by changing the n parameter.
The AU command uses the transfer function for the AMP-430x0 for the calculation of the
bandwidth.
ARGUMENTS: AWx = v, l, n where
x = Axis designator
v = Drive voltage in Volts
l = Motor inductance in millihenries
n = optional current loop gain setting (1 or 0)
USAGE: DEFAULTS:
While Moving No Default Value 0, 0, 0
In a Program Yes Default Format --
Command Line Yes
Controller Usage
RELATED COMMANDS:
TA Tell Amplifier
AG Amplifier Gain
BS Brushless Setup
EXAMPLE:
AWY=60,5,0 Sets a 60 volt drive, motor with 5 millihenries
: 4525.732 Is the bandwidth in hertz
DMC-40x0-D430x0
inductance and normal current loop gain
40 ● AW DMC-40x0 Command Reference
BA
FUNCTION: Brushless Axis
DESCRIPTION:
The BA command configures the controller axes for sinusoidal commutation and reconfigures the
controller to reflect the actual number of motors that can be controlled. Each sinusoidal
commutation axis requires 2 motor command signals. The second motor command signals
will always be associated with the highest axes on the controller. For example a 3 axis
controller with A and C configured for sinusoidal commutation will require 5 command
outputs (5 axes controller), where the second outputs for A and C will be the D and E axes
respectively.
ARGUMENTS: BA xxxxxxxxxx where
n is A,B,C,D,E,F,G or any combination to specify the axis (axes) for sinusoidal commutation
brushless axes.
No argument removes all axes configured for sinusoidal commutation.
USAGE: DEFAULTS:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
OPERAND USAGE:
ALL CONTROLLERS
_BAn indicates the axis number of the auxiliary DAC used for the second phase of the selected
sinusoidal axis. The axis numbers start with zero for the A axis DAC. If the motor is
configured as standard servo or stepper motor, _BAn contains 0.
RELATED COMMANDS:
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
BI Brushless Inputs
BM Brushless Modulo
BO Brushless Offset
BS Brushless Setup
BZ Brushless Zero
DMC-40x0 Command Reference BA • 41
BB
FUNCTION: Brushless Phase Begins
DESCRIPTION:
The BB function describes the position offset between the Hall transition point and θ = 0, for a
sinusoidally commutated motor. This command must be saved in non-volatile memory to be
effective upon reset.
ARGUMENTS: BB n,n,n,n,n,n,n or BBA=n where
n is a signed integer which represent the phase offset of the selected axes, expressed in multiples
of 30°.
n = ? returns the hall offset for the specified axis.
USAGE: DEFAULTS:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
EXAMPLES:
BB, 30,,60
OPERAND USAGE:
_BBn contains the position offset between the Hall transition and θ = 0 for the specified axis.
ALL CONTROLLERS
The offsets for the Y and W axes are 30° and 60° respectively
RELATED COMMANDS:
BA Brushless Axis
BC Brushless Commutation
BD Brushless Degrees
BI Brushless Inputs
BM Brushless Modulo
BO Brushless Offset
BS Brushless Setup
BZ Brushless Zero
Note: BB is only effective as part of the BC command or upon reset.
42 ● BB DMC-40x0 Command Reference
BC
FUNCTION: Brushless Calibration
DESCRIPTION:
The function BC monitors the status of the Hall sensors of a sinusoidally commutated motor, and
resets the commutation phase upon detecting the first hall sensor. This procedure replaces
the estimated commutation phase value with a more precise value determined by the hall
sensors.
ARGUMENTS: BC nnnnnnn where
n is A,B,C,D,E,F,G or any combination to specify the axis
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
OPERAND USAGE:
_BCn contains the state of the Hall sensor inputs. This value should be between 1 and 6.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BD Brushless Degrees
BI Brushless Inputs
BM Brushless Modulo
BO Brushless Offset
BS Brushless Setup
BZ Brushless Zero
ALL CONTROLLERS
DMC-40x0 Command Reference BC • 43
BD
FUNCTION: Brushless Degrees
DESCRIPTION:
This command sets the commutation phase of a sinusoidally commutated motor. When using hall
effect sensors, a more accurate value for this parameter can be set by using the command, BC.
This command should not be used except when the user is creating a specialized phase
initialization procedure.
ARGUMENTS: BD n,n,n,n,n,n,n,n or BDA=n where
n is an integer between 0 - 360°.
n = ? Returns the current brushless motor angle (between 0-360°)
USAGE: DEFAULTS:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
OPERAND USAGE:
_BDn contains the commutation phase of the specified axis.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BI Brushless Inputs
BM Brushless Modulo
BO Brushless Offset
BS Brushless Setup
BZ Brushless Zero
ALL CONTROLLERS
44 ● BD DMC-40x0 Command Reference
BG
FUNCTION: Begin
DESCRIPTION:
The BG command starts a motion on the specified axis or sequence.
ARGUMENTS: BG nnnnnnnnnn where
n is A,B,C,D,E,F,G,H,S,T, M or N, or any combination to specify the axis or sequence
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format -
Command Line Yes
Controller Usage
OPERAND USAGE:
_BGn contains a ‘0’ if motion complete on the specified axis or coordinate system, otherwise
contains a ‘1’.
RELATED COMMANDS:
AM After Move
ST Stop motion
EXAMPLES:
PR 2000,3000,,5000 Set up for a relative move
BG ABD
HM
BGA
JG 1000,4000
BGY
BSTATE=_BGB
VP 1000,2000
VS 20000
BGS
VMAB
VP 4000,-1000
VE
PR ,,8000,5000
BGSCD
MG _BGS
ALL CONTROLLERS
Start the A,B and D motors moving
Set up for the homing
Start only the A-axis moving
Set up for jog
Start only the B-axis moving
Assign a 1 to BSTATE if the B-axis is performing a move
Specify vector position
Specify vector velocity
Begin coordinated sequen0ce
Vector Mode
Specify vector position
Vector End
Specify C and D position
Begin sequence and C,D motion
Displays a 1 if motion occurring on coordinated system "S"
Hint: A BG command cannot be executed for any axis in which motion has not completed. Use the AM
trippoint to wait for motion complete between moves. Determining when motion is comp lete can also be
accomplished by testing for the value of the operand _BGn.
DMC-40x0 Command Reference BG • 45
BI
FUNCTION: Brushless Inputs
DESCRIPTION:
The command BI is used to define the inputs which are used when Hall sensors have been wired
for sinusoidally commutated motors. These inputs can be the general use inputs (bits 1-8), the
auxiliary encoder inputs (bits 81-96), or the extended I/O inputs (bits 17-48). The Hall
sensors of each axis must be connected to consecutive input lines, for example: BI 3 indicates
that inputs 3,4 and 5 are used for halls sensors.
The brushless setup command, BS, can be used to determine the proper wiring of the hall sensors.
ARGUMENTS: BI n,n,n,n,n,n,n,n or BIA=n where
n is an unsigned integer which represent the first digital input to be used for hall sensor input
n = 0 Clear the hall sensor configuration for the axis.
n = ? Returns the starting input used for Hall sensors for the specified axis.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
OPERAND USAGE:
ALL CONTROLLERS
_BIn contains the starting input used for Hall sensors for the specified axis.
EXAMPLE:
BI, 5 The Hall sensor of the Y axis are on inputs 5, 6 and 7.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
BM Brushless Modulo
BO Brushless Offset
BS Brushless Setup
BZ Brushless Zero
46 ● BI DMC-40x0 Command Reference
BK
FUNCTION: Breakpoint
DESCRIPTION:
For debugging. Causes the controller to pause execution of the given thread at the given program
line number (which is not executed). All other threads continue running. Only one
breakpoint may be armed at any time. After a breakpoint is encountered, a new breakpoint
can be armed (to continue execution to the new breakpoint) or BK will resume program
execution. The SL command can be used to single step from the breakpoint. The breakpoint
can be armed before or during thread execution.
ARGUMENTS: BK n,m where
n is an integer in the range 0 to 1999 which is the line number to stop at. n must be a valid line
number in the chosen thread.
m is an integer in the range 0 to 7. The thread.
USAGE: DEFAULTS:
While Moving Yes Default Value of m 0
In a Program No
Command Line Yes
Controller Usage
OPERAND USAGE:
_BK will tell whether a breakpoint has been armed, whether it has been encountered, and the
program line number of the breakpoint:
ALL CONTROLLERS
= -LineNumber: breakpoint armed
= LineNumber: breakpoint encountered
= -2147483648: breakpoint not armed
RELATED COMMANDS:
SL Single Step
TR Trace
EXAMPLES:
BK 3 Pause at line 3 (the 4th line) in thread 0
BK 5 Continue to line 5
SL Execute the next line
SL 3 Execute the next 3 lines
BK Resume normal execution
DMC-40x0 Command Reference BK • 47
BL
FUNCTION: Reverse Software Limit
DESCRIPTION:
The BL command sets the reverse software limit. If this limit is exceeded during motion, motion
on that axis will decelerate to a stop. Reverse motion beyond this limit is not permitted.
When the reverse software limit is activated, the automatic subroutine #LIMSWI will be executed
if it is included in the program.
ARGUMENTS: BL n,n,n,n,n,n,n,n or BLA=n where
n is a signed integer in the range -2147483648 to 2147483647. The reverse limit is activated at
the position n-1. The units are in quadrature counts.
n = -2147483648 Turns off the reverse limit.
n = ? Returns the reverse software limit for the specified axes.
USAGE: DEFAULTS:
While Moving Yes Default Value -214783648
In a Program Yes Default Format Position format
Command Line Yes
Controller Usage
OPERAND USAGE:
_BLn contains the value of the reverse software limit for the specified axis.
ALL CONTROLLERS
RELATED COMMANDS:
FL Forward Limit
PF Position Formatting
EXAMPLES:
#TEST;'Test Program
AC 1000000 ;'Acceleration Rate
DC 1000000 ;'Deceleration Rate
BL -15000 ;'Set Reverse Limit
JG -5000 ;'Jog Reverse
BGA;'Begin Motion
AMA;'After Motion (limit occurred)
TPA;'Tell Position
EN;'End Program
Hint: Galil Controllers also provide hardware limits. Both hardware or software limits will trigger the
#LIMSWI automatic subroutine.
48 ● BL DMC-40x0 Command Reference
BM
FUNCTION: Brushless Modulo
DESCRIPTION:
The BM command defines the length of the magnetic cycle in encoder counts.
ARGUMENTS: BM n,n,n,n,n,n,n,n or BMA=n where
n is a decimal value between 1 and 1000000 with a resolution of 1/10. This value can also be
specified as a fraction with a resolution of 1/16.
n = ? Returns the brushless module for the specified axis.
USAGE: DEFAULTS:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
OPERAND USAGE:
_BMn indicates the cycle length in counts for the specified axis.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
BI Brushless Inputs
BO Brushless Offset
BS Brushless Setup
BZ
BZ Brushless Zero
ALL CONTROLLERS
EXAMPLES:
BM ,60000 Set brushless modulo for B axis to be 60000
BMC=100000/3 Set brushless modulo for C axis to be 100000/3 (33333.333)
BM ,,,? Interrogate the Brushless Module for the D axis
Note: Changing the BM parameter causes an instant change in the commutation phase.
DMC-40x0 Command Reference BM • 49
BN
FUNCTION: Burn
DESCRIPTION:
The BN command saves controller parameters shown below in Flash EEPROM memory. This
command typically takes 1 second to execute and must not be interrupted. The controller
returns a : when the Burn is complete.
PARAMETERS SAVED DURING BURN:
AC CE GR MT SM
AF CN HV NB SP
AG CO IA NF TK
AQ CW IK NZ TL
AU DC IL OA TM
BA DH IT OE TR
BB DV KD OF VA
BI EO KI OP VD
BL ER KP OT VF
BM FA KS OV VS
BO FL LC PF YA
BR FV LD PL YB
BW GA LZ PW YC
CB GM MO SB
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_BN contains the serial number of the controller.
RELATED COMMANDS:
BP Burn Program
BV Burn Variables
EXAMPLES:
KD 100 Set damping term for A axis
KP 10 Set proportional gain term for A axis
KI 1 Set integral gain term for A axis
AC 200000 Set acceleration
DC 150000 Set deceleration rate
SP 10000 Set speed
MT –1 Set motor type for A axis to be type ‘-1’, reversed
MO Turn motor off
BN Burn parameters; may take up to 5 seconds
polarity servo motor
50 ● BN DMC-40x0 Command Reference
BO
FUNCTION: Brushless Offset
DESCRIPTION:
The BO command sets a fixed offset on command signal outputs for sinusoidally commutated
motors. This may be used to offset any bias in the amplifier, or can be used for phase
initialization.
ARGUMENTS: BO n,n,n,n,n,n,n or BOA=n where
n specifies the voltage n is a signed number in the range -9.998 to +9.998 with a resolution of
0.0003.
n = ? Return the brushless offset for the specified axis.
USAGE: DEFAULTS:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
OPERAND USAGE:
_BOn contains the offset voltage on the DAC for the specified axis.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
BI Brushless Inputs
BM Brushless Modulo
BS Brushless Setup
BZ Brushless Zero
ALL CONTROLLERS
EXAMPLES:
BO -2,,1 Generates the voltages -2 and 1 on the first DAC A, and
the second DAC C of a sinusoidally commutated motor.
HINT: To assure that the output voltage equals the BO parameters, set the PID and OF parameters to
zero.
DMC-40x0 Command Reference BO • 51
BP
FUNCTION: Burn Program
DESCRIPTION:
The BP command saves the application program in non-volatile EEPROM memory. This
command typically takes up to 10 seconds to execute and must not be interrupted. The
controller returns a : when the Burn is complete.
ARGUMENTS: None
USAGE: DEFAULTS:
While Moving No Default Value ---
In a Program Yes
Not in a Program Yes
Controller Usage
RELATED COMMANDS:
BN Burn Parameters
BV Burn Variable
ALL CONTROLLERS
52 ● BP DMC-40x0 Command Reference
BR
FUNCTION: Brush Axis
DESCRIPTION:
The BR command is used in conjunction with an AMP-430x0 to enable which axis will be set as
brush-type servo. The hall error bits are not set in the TA value when an axis is configured as
brush-type. The hall inputs are available for general use via the QH command.
ARGUMENTS: BR n,n,n,n,n,n,n,n,n where
n = 0 Brushless servo axis
n = 1 Brush-type servo axis
n = ? Returns the value of the axis
USAGE: DEFAULTS:
While Moving Yes Default Value 0, 0, 0, 0, 0, 0, 0, 0
In a Program Yes Default Format --
Command Line Yes
Controller Usage
RELATED COMMANDS:
OE Off-On Error
TA Tell Amplifier
QH Hall State
EXAMPLE:
BR 1,0,0 Sets X-axis to brush-type, Y and Z to brushless
Note: If an axis has Off-On-Error(OE) set to 1, an amplifier error will occur if there are no halls and BR is
set to 0. With all axes that do not have halls sensors going to the controller and the D430x0 is installed, set
BR to 1 to avoid an amplifier error state. This includes running brushed motors with the D430x0, and
using external drives when a D430x0 is installed.
DMC-40x0-D430x0
DMC-40x0 Command Reference BR • 53
BS
FUNCTION: Brushless Setup
DESCRIPTION:
The command BS tests the wiring of a sinusoidally commutated brushless motor. If Hall sensors
are connected, this command also tests the wiring of the Hall sensors. This function can only
be performed with one axis at a time.
This command returns status information regarding the setup of brushless motors. The following
information will be returned by the controller:
1. Correct wiring of the brushless motor phases.
2. An approximate value of the motor's magnetic cycle.
3. The value of the BB command (If hall sensors are used).
4. The results of the hall sensor wiring test (If hall sensors are used).
This command will turn the motor off when done and may be given when the motor is off.
Once the brushless motor is properly setup and the motor configuration has been saved in non-
volatile memory, the BS command does not have to be re-issued. The configuration is saved
by using the burn command, BN.
Note: In order to properly conduct the brushless setup, the motor must be allowed to move a
minimum of one magnetic cycle in both directions.
ARGUMENTS: BSA= v, n where
v is a real number between 0 and 10. v represents the voltage level to be applied to each phase.
n is a positive integer between 100 or 1000. n represents the duration in milliseconds that voltage
should be applied to the motor phases.
USAGE: DEFAULTS:
While Moving No Default Value of V 0
In a Program Yes Default Value of n 200
Command Line Yes
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
BI Brushless Inputs
BM Brushless Modulo
BO Brushless Offset
BZ Brushless Zero
EXAMPLES:
BSC = 2,900 Apply set up test to C axis with 2 volts for 900
millisecond on each step.
Note: When using Galil Windows software, the timeout must be set to a minimum of 10 second s (timeout =
10000) when executing the BS command. This allows the software to retrieve all messages returned from
the controller.
54 ● BS DMC-40x0 Command Reference
BV
FUNCTION: Burn Variables & Arrays
DESCRIPTION::
The BV command saves the controller variables and arrays in non-volatile EEPROM memory.
This command typically takes up to 2 seconds to execute and must not be interrupted. The
controller returns a : when the Burn is complete.
ARGUMENTS: None
USAGE: DEFAULTS:
While Moving Yes Default Value ---
In a Program Yes
Not in a Program Yes
Controller Usage
OPERAND USAGE:
_BV returns the number of controller axes.
RELATED COMMANDS:
BN Burn Parameters
BP Burn Program
Note 1: This command will store the ECAM table values in non-volatile EEPROM memory.
Note 2: This command may cause the Galil software to issue the following warning "A time-out occurred
while waiting for a response from the controller". This warning is normal and is designed to warn the user
when the controller does not respond to a command within the timeout period. This occurs because this
command takes more time than the default timeout of 5 sec. The timeout can be changed in the Galil
software but this warning does not affect the operation of the controller or software.
ALL CONTROLLERS
DMC-40x0 Command Reference BV • 55
BW
FUNCTION: Brake Wait
DESCRIPTION:
The BW command sets the delay between when the brake is turned on and when the amp is turned
off. When the controller goes into a motor-off (MO) state, this is the time (in samples)
between when the brake digital output changes state and when the amp enable digital output
changes state. The brake is actuated immediately upon MO and the delay is to account for the
time it takes for the brake to engage mechanically once it is energized electrically. The brake
is released immediately upon SH.
Outputs 1-8 are used for Axes A-H, where output 1 is the brake for axis A and output 2 is the
brake for axis B and so on.
Note: The Brake Wait does not apply when the motor is shut off due to OE1 (Off on Error). In
this case (position error exceeded or Abort triggered) the motor off and brake output will be
applied simultaneously.
ARGUMENTS: BW n,n,n,n,n,n,n,n or BWA=n where
n specifies the brake wait time in samples. n ranges from 1 to 32000
n = 0 Turns Brake Wait off
n = ? Returns the brake wait time in msec for the specified axis.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format
Command Line Yes
OPERAND USAGE:
_BWn contains the brake wait time in samples for the specified axis.
RELATED COMMANDS:
MO Motor Off
SH Servo Here
EXAMPLES:
BW100 Set brake delay to 100 ms (TM1000) for the X axis
56 ● BW DMC-40x0 Command Reference
BZ
FUNCTION: Brushless Zero
DESCRIPTION:
The BZ command is used for axes which are configured for sinusoidal commutation. This
command drives the motor to zero magnetic phase and then sets the commutation phase to
zero.
This command may be given when the motor is off.
ARGUMENTS: BZ n,n,n,n,n,n,n or BZA =n or BZ <t where
n is a real number between -4.998 and 4.998. The parameter n will set the voltage to be applied to
the amplifier during the initialization. In order to be accurate, the BZ command voltage must
be large enough to move the motor. If the argument is positive, when the BZ operation is
complete, the motor will be left in the off state, MO. A negative value causes the motor to
end up in the on state, SH.
<t is an integer between 1 and 32767 and represents the settling time of the BZ function. The
controller will wait ‘t’ μsec to update sufficient samples (sampling rate = 1000 μsec by
default) to settle the motor at the zero magnetic phase. The t parameter should be specified
prior to issuing the BZ command.
Note: The BZ command causes instantaneous movement of the motor. It is recommended to start
with small voltages and increase as needed
Note: Always use the Off On Error function (OE command) to avoid motor runaway whenever
testing sinusoidal commutation.
USAGE: DEFAULTS:
While Moving No Default Value n = 0, t= 1000
In a Program Yes Default Format 0
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_BZn contains the distance in encoder counts from the motor's current position and the position of
commutation zero for the specified axis. This can useful to command a motor to move to the
commutation zero position for phase initialization.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
BI Brushless Inputs
BM Brushless Modulo
BO Brushless Offset
BS Brushless Setup
EXAMPLES:
BZ, -3 Drive C axis to zero phase with 3 volt signal, and end
with motor enabled.
DMC-40x0 Command Reference BZ • 57
CA
FUNCTION: Coordinate Axes
DESCRIPTION:
The CA command specifies the coordinate system to apply proceeding vector commands. The
following commands apply to the active coordinate system as set by the CA command:
CR ES LE LI LM
TN VE VM VP
ARGUMENTS: CAS or CAT where
CAS specifies that proceeding vector commands shall apply to the S coordinate system
CAT specifies that proceeding vector commands shall apply to the T coordinate system
CA ? returns a 0 if the S coordinate system is active and a 1 if the T coordinate system is active.
OPERAND USAGE:
_CA contains a 0 if the S coordinate system is active and a 1 if the T coordinate system is active.
USAGE: DEFAULTS:
While Moving Yes Default Value CAS
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
VP Vector Position
VS Vector Speed
VD Vector Deceleration
VA Vector Acceleration
VM Vector Mode
VE End Vector
BG BGS - Begin Sequence
EXAMPLES:
CAT Specify T coordinate system
VMAB Specify vector motion in the A and B plane
VS 10000 Specify vector speed
CR 1000,0,360 Generate circle with radius of 1000 counts, start at 0
VE End Sequence
BGT Start motion of T coordinate system
degrees and complete one circle in counterclockwise
direction.
58 ● CA DMC-40x0 Command Reference
CB
FUNCTION: Clear Bit
DESCRIPTION:
The CB command sets the specified output bit low. CB can be used to clear the outputs of
extended I/O which have been configured as outputs.
ARGUMENTS: CB n where
n is an integer corresponding to a specific output on the controller to be cleared (set to 0). The
first output on the controller is denoted as output 1.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
SB Set Bit
OB Output Bit
OP Define output port (byte-wise).
EXAMPLES:
CB 7 Clear output bit 7
CB 16 Clear output bit 16 (8 axis controllers only)
ALL CONTROLLERS
DMC-40x0 Command Reference CB • 59
CC
FUNCTION: Configure Communications Port 2
DESCRIPTION:
The CC command configures baud rate, handshake, mode, and echo for the AUX SERIAL PORT,
referred to as Port 2. This command must be given before using the MG, IN, or CI commands
with Port 2.
ARGUMENTS: CC m,n,r,p
m - Baud rate 9600,19200, 38400, or 115200
n - Handshake 0 for handshake off, 1 for handshake on
r - Mode 0 disabled, 1enabled
p - Echo 0 for echo off, 1 for echo on
Note: echo only active when daisy chain feature is off
USAGE: DEFAULTS:
While Moving Yes Default Value 115200,0,1,0
In a Program Yes Default Format -
Command Line Yes
Controller Usage
DMC-40x0
RELATED COMMANDS:
CI Configure Communication Interrupt
EXAMPLES:
CC 9600,0,0,0 9600 baud, no handshake, echo off.
Typical setting with TERM-P or TERM-H.
CC 19200,1,1,0 19,200 baud, handshake on, echo off.
60 ● CC DMC-40x0 Command Reference
CD
FUNCTION: Contour Data
DESCRIPTION:
The CD command specifies the incremental position on contour axes. The units of the command
are in encoder counts. This command is used only in the Contour Mode (CM). The
incremental position will be executed over the time period specified by the command DT
(ranging from 2 to 256 servo updates) or by the = operand.
ARGUMENTS: CD n,n,n,n,n,n,n,n = m or CDA=n where
n is an integer in the range of +/-32762.
m (optional) is an integer in the range 0 to 8.
n = m = 0 terminates the Contour Mode.
m = 1 through 8 specifies the time interval (DT) of 2m samples.
n = 0 and m = -1 pauses the contour buffer.
By default the sample period is 1 msec (set by the TM command); with m = 1, the time interval
would be 2 msec.
Note1: The command CD 0,0 . . .=0 would follow the last CD command in a sequence. CD 0,0 . . .=0 is
similar to VE and LE. Once executed by the controller, CD 0,0 . . .=0 will terminate the contour mode.
Note2: The command CD0=0 will assign a variable CD0 the value of 0. In this case the user must have a
space after CD in order to terminate the Contour Mode correctly. Example: CD 0=0 will terminate the
contour mode for the X axis.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
CM Contour Mode
DT Time Increment
EXAMPLES:
#Cont0;'Define label #Cont0
CMABCD;'Specify Contour Mode
DT 4 ;'Specify time increment for contour
CD 200,350,-150,500 ;'Specify incremental positions on A,B,C and C axes
CD 100,200,300,400 ;'New position data
CD 0,0,0,0=0
#Wait;JP#Wait,_CM<>511
EN;'End program
#Cont1;'Define label #Cont1
CMABC;'Specify Contour Mode
DT 8;'Specify time increment for contour
CD 100,100,100;'New position data
;'End of Contour Buffer/Sequence
;'Wait until path is done
DMC-40x0 Command Reference CD • 61
CD 100,100,100;'New position data
CD 0,0,0 =-1;'Pause countour buffer set DT to resume
CD 100,100,100;'New position data
CD 100,100,100;'New position data
CD 0,0,0,0=0
#Wait;JP#Wait,_CM<>511
EN
;'End of Contour Buffer/Sequence
;'Wait until path is done
62 ● CD DMC-40x0 Command Reference
CE
FUNCTION: Configure Encoder
DESCRIPTION:
The CE command configures the encoder to the quadrature type or the pulse and direction type.
It also allows inverting the polarity of the encoders which reverses the direction of the
feedback. Note: when using a servo motor, the motor will run away. The configuration
applies independently to the main axes encoders and the auxiliary encoders.
When the MT command is configured for a stepper motor, the auxiliary encoder (used to count
stepper pulses) will be forced to pulse and direction.
ARGUMENTS: CE n,n,n,n,n,n,n,n or CEA=n where
n is an integer in the range of 0 to 15. Each integer is the sum of two integers M and N which
configure the main and the auxiliary encoders. The values of M and N are
M Main encoder type N Auxiliary encoder type
0 Normal quadrature 0 Normal quadrature
1 Normal pulse and direction 4 Normal pulse and direction
2 Reversed quadrature 8 Reversed quadrature
3 Reversed pulse and direction 12 Reversed pulse and direction
For example: n = 10 implies M = 2 and N = 8, thus both encoders are reversed quadrature.
n = ? Returns the value of the encoder configuration for the specified axes.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 2.0
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_CEn contains the value of encoder type for the axis specified by ‘n’.
RELATED COMMANDS:
MT Specify motor type
EXAMPLES:
CE 0, 3, 6, 2 Configure encoders
CE ?,?,?,?
:0,3,6,2
V = _CEB
V = ?
:3
Interrogate configuration
Assign configuration to a variable
Note: When using pulse and direction encoders, the pulse signal is connected to CHA and the direction
signal is connected to CHB.
DMC-40x0 Command Reference CE • 63
CF
FUNCTION: Configure
DESCRIPTION:
Sets the default port for unsolicited messages. By default, the DMC-40x0 will send unsolicited
responses to the main RS-232 serial port. The CF command allows the user to send
unsolicited responses to the Main or Aux Serial Port, or Handles A-H.
ARGUMENTS: CF n where
n is A thru H for Ethernet handles 1 thru 8, S for Main serial port, T for Aux serial port or I is to
set to the port that issues the CF command.
USAGE:
While Moving Yes Default Value S
In a Program Yes Default Format -----
Command Line Yes
Controller Usage
OPERAND USAGE:
_CF contains the decimal value of the ASCII letter.
RELATED COMMANDS:
CW Configures MSB of unsolicited messages
WH What Handle
TH Tell Handles
ALL CONTROLLERS
64 ● CF DMC-40x0 Command Reference
CI
FUNCTION: Configure Communication Interrupt
DESCRIPTION:
The CI command configures a program interrupt based on characters received on communications
port 2, the AUX serial port. An interrupt causes program flow to jump to the #COMINT
subroutine. If multiple program threads are used, the #COMINT subroutine runs in thread 0
and the remaining threads continue to run without interruption. The characters received can
be accessed via the internal variables P2CH, P2ST, P2NM, P2CD. For more, see Operator
Data Entry Mode in chapter 7 of the user manual.
ARGUMENTS: CI n, m
PARAMETER EXPLANATION
n = 0 Do not interrupt
n = 1 Interrupt on carriage return
n = 2 Interrupt on any character
n = -1 Clear interrupt data buffer
USAGE: DEFAULTS:
While Moving Yes Default Value n = 0, m = 0
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
CC Configure communications
IN Communication input
MG Message output
EXAMPLES:
CI 1 Interrupt when the <enter> key is received on port 2
CI 2 Interrupt on a single character received on Port 2
DMC-40x0 Command Reference CI • 65
CM
FUNCTION: Contour Mode
DESCRIPTION:
The Contour Mode is initiated by the instruction CM. This mode allows the generation of an
arbitrary motion trajectory with any of the axes. The CD command specified the position
increment, and the DT command specifies the time interval.
The command, CM?, can be used to check the number of available contour segments. A value of
0 returned from the command CM? indicates that the Contour Buffer is full. A value of 511
indicates that the Contour Buffer is empty.
ARGUMENTS: CM nnnnnnnnnn where
n is A,B,C,D,E,F,G,H or any combination to specify the axis (axes) for contour mode
n = ? Returns a 0 if the contour buffer is full and 511 if the contour buffer is empty.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 3.0
Command Line Yes
Controller Usage
OPERAND USAGE:
_CM contains a ‘0’ if the contour buffer is full; otherwise it contains the number of available
contour segments.
ALL CONTROLLERS
RELATED COMMANDS:
CD Contour Data
DT Time Increment
EXAMPLES:
V=_CM;V= Return contour buffer status
CM? Return contour buffer status
CM AC Specify A,C axes for Contour Mode
66 ● CM DMC-40x0 Command Reference
#CMDERR
FUNCTION: Command error automatic subroutine
DESCRIPTION:
Without #CMDERR defined, if an error (see TC command) occurs in an application program
running on the Galil controller, the program (all threads) will stop. #CMDERR allows the
programmer to handle the error by running code instead of stopping the program.
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
RELATED COMMANDS:
TC Tell Error Code
_ED Last program line with an error
EN End program
ALL
EXAMPLES:
#BEGIN ;'Begin main program
IN"ENTER SPEED",Speed ;'Prompt for speedJG Speed
BGX ;'Begin motion
EN ;'End main program
#CMDERR ;'Command error utility
JP#DONE,_ED<>2 ;'Check if error on line 2 JP#DONE,_TC<>6 ;'Check if out of range MG"SPEED TOO HIGH" ;'Send message MG"TRY AGAIN" ;'Send message ZS1 ;'Adjust stack JP#BEGIN ;'Return to main program #DONE ;'End program if other error ZS0 ;'Zero stack
EN1 ;'End program
NOTE: An application program must be executing for #CMDERR to execute, which runs in thread 0.
NOTE: Use EN to end the routine
DMC-40x0 Command Reference #CMDERR • 67
CN
FUNCTION: Configure
DESCRIPTION:
The CN command configures the polarity of the limit switches, home switches, latch inputs and
the selective abort function.
ARGUMENTS: CN m,n,o,p,q where
m,n,o are integers with values 1 or -1.
p is an integer, 0 or 1.
m = 1 Limit switches active high
-1 Limit switches active low
n = 1
-1
o = 1 Latch input is active high
-1 Latch input is active low
p = 1
0
q= 1
0 Abort input will terminate program execution
Home switch configured to drive motor in
forward direction when input is high. See HM
and FE commands.
Home switch configured to drive motor in
reverse direction when input is high. See HM
and FE commands
Configures inputs 5,6,7,8,13,14,15,16 as
selective abort inputs for axes
A,B,C,D,E,F,G,and H respectively. Will also
trigger #POSERR automatic subroutine if
program is running.
Inputs 5,6,7,8,13,14,15,16 are configured as
general use inputs
Abort input will not terminate program
execution
USAGE: DEFAULTS:
While Moving Yes Default Value -1,-1,-1,0,0
In a Program Yes Default Format 2.0
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_CN0 Contains the limit switch configuration
_CN1 Contains the home switch configuration
_CN2 Contains the latch input configuration
_CN3 Contains the state of the selective abort function (1 enabled, 0 disabled)
_CN4 Contains whether the abort input will terminate the program
RELATED COMMANDS:
AL Arm latch
EXAMPLES:
CN 1,1 Sets limit and home switches to active high
CN,, -1 Sets input latch active low
68 ● CN DMC-40x0 Command Reference
CO
FUNCTION: Configure Extended I/O
DESCRIPTION:
The CO command configures which points are inputs and which are outputs on the extended I/O.
The 32 extended I/O points of the controller can be configured in banks of 8. The extended I/O is
denoted as bits 17-48 and banks 2-5.
ARGUMENTS: CO n where
n is a decimal value which represents a binary number. Each bit of the binary number represents
one bank of extended I/O. When set to 1, the corresponding bank is configured as an output.
The least significant bit represents bank 2 and the most significant bit represents bank 5. The
decimal value can be calculated by the following formula.
+ 2*n3 + 4*n4 + 8*n5
n = n
2
where n
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
represents the bank. To configure a bank as outputs, substitute a one into that nx in the
x
formula. If the n
value is a zero, then the bank of 8 I/O points will be configured as inputs.
x
For example, if banks 3 and 4 are to be configured as outputs, CO 6 is issued.
ALL
OPERAND USAGE:
_CO returns extended I/O configuration value
RELATED COMMANDS:
CB Clear Output Bit
SB Set Output Bit
OP Set Output Port
777TI Tell Inputs
EXAMPLES:
CO 15 Configure all points as outputs
CO 0 Configure all points as inputs
CO 1 Configures bank 2 as outputs on extended I/O
Hint: See user manual appendix for more information on the extended I/O board.
DMC-40x0 Command Reference CO • 69
@COM[n]
FUNCTION: Bitwise complement
DESCRIPTION:
Performs the bitwise complement (NOT) operation to the given number
ARGUMENTS: @COM[n] where
n is a signed integer in the range -2147483647 to 2147483647.
FUNCTION: Communication Interrupt automatic subroutine
DESCRIPTION:
#COMINT can be configured by the CI command to run either when any character or a carriage
return is received on the auxiliary serial port.
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
RELATED COMMANDS:
P2CD Serial port 2 code
P2CH Serial port 2 character
P2NM Serial port 2 number
P2ST Serial port 2 string
CI Configure #COMINT
CC Configure serial port 2
EN End subroutine
EXAMPLES:
#A ;'Program Label
CC9600,0,1,0
CI2 ;'interrupt on any character
#Loop
MG "Loop" ;'print a message every secondWT 1000
JP#Loop
#COMINT
MG "COMINT" ;'print a message when a character is received
EN1,1
NOTE: An application program must be executing for the automatic subroutine to func tion, which runs in
thread 0.
NOTE: Use EN to end the routine
ALL
DMC-40x0 Command Reference #COMINT • 71
@COS[n]
FUNCTION: Cosine
DESCRIPTION:
Returns the cosine of the given angle in degrees
ARGUMENTS: @COS[n] where
n is a signed number in degrees in the range of -32768 to 32767, with a fractional resolution of 16-
bit..
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@ASIN[n] Arc sine
@SIN[n] sine
@ATAN[n] Arc tangent
@ACOS[n] Arc cosine
@TAN[n] Tangent
EXAMPLES:
:MG @COS[0]
1.0000
:MG @COS[90]
0.0000
:MG @COS[180]
-1.0000
:MG @COS[270]
0.0000
:MG @COS[360]
1.0000
:
ALL
72 ● @COS[n] DMC-40x0 Command Reference
CR
d
FUNCTION: Circle
DESCRIPTION:
The CR command specifies a 2-dimensional arc segment of radius, r, starting at angle, θ, and
traversing over angle Δθ. A positive Δθ denotes counterclockwise traverse, negative Δθ
denotes clockwise. The VE command must be used to denote the end of the motion sequence
after all CR and VP segments are specified. The BG (Begin Sequence) command is used to
start the motion sequence. All parameters, r, θ, Δθ, must be specified. Radius units are in
quadrature counts. θ and Δθ have units of degrees. The parameter n is optional and
describes the vector speed that is attached to the motion segment.
ARGUMENTS: CR r,θ,Δθ < n > o where
r is an unsigned real number in the range 10 to 6000000 decimal (radius)
θ a signed number in the range 0 to +/-32000 decimal (starting angle in degrees)
Δθ is a signed real number in the range 0.0001 to +/-32000 decimal (angle in degrees)
n specifies a vector speed to be taken into effect at the execution of the vector segment. n is an
unsigned even integer between 0 and 22,000,000 for servo motor operation and between 0 and
6,000,000 for stepper motors.
o specifies a vector speed to be achieved at the end of the vector segment. o is an unsigned even
integer between 0 and 8,000,000.
Note: The product r * Δθ must be limited to +/-4.5 108
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
VP Vector Position
VS Vector Speed
VD Vector Deceleration
VA Vector Acceleration
VM Vector Mode
VE End Vector
BG BGS - Begin Sequence
EXAMPLES:
VMAB Specify vector motion in the A and B plane
VS 10000 Specify vector speed
CR 1000,0,360 Generate circle with radius of 1000 counts, start at 0
CR 1000,0,360<40000 Generate circle with radius of 1000 counts, start at 0
VE End Sequence
BGS Start motion
degrees and complete one circle in counterclockwise
direction.
egrees and complete one circle in counterclockwise
DMC-40x0 Command Reference CR • 73
CS
FUNCTION: Clear Sequence
DESCRIPTION:
The CS command will remove VP, CR or LI commands stored in a motion sequence for the S or T
coordinate systems. After a sequence has been executed, the CS command is not necessary to
put in a new sequence. This command is useful when you have incorrectly specified VP, CR
or LI commands.
ARGUMENTS: CSS or CST where
S and/or T can be used to clear the sequence buffer for the "S" or "T" coordinate system.
USAGE: DEFAULTS:
While Moving No Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Controller Usage
OPERAND USAGE:
_CSn contains the segment number in the sequence specified by n, S or T. This operand is valid
in the Linear mode, LM, Vector mode, VM
RELATED COMMANDS:
CR Circular Interpolation Segment
LI Linear Interpolation Segment
LM Linear Interpolation Mode
VM Vector Mode
VP Vector Position
ALL CONTROLLERS
EXAMPLES:
#CLEAR;'Label
CAT;'Specify the T coordinate system vector points
VP 1000,2000 ;'Vector position
VP 4000,8000 ;'Vector position
CST;'Clear vectors specified in T coordinate system
CAS;'Specify the T coordinate system vector points
VP 1000,5000 ;'New vector
VP 8000,9000 ;'New vector
CSS;'Clear vectors specified in S coordinate system
EN;'End program
74 ● CS DMC-40x0 Command Reference
CW
FUNCTION: Copyright information / Data Adjustment bit on/off
DESCRIPTION:
The CW command has a dual usage. The CW command will return the copyright information
when the argument, n is 0. Otherwise, the CW command is used as a communications
enhancement for use by the Galil PC software. When turned on, the communication
enhancement sets the MSB of unsolicited, returned ASCII characters to 1. Unsolicited ASCII
characters are those characters which are returned from the controller without being directly
queried from the terminal. This is the case when a program has a command that requires the
controller to return a value or string. Because of the dual function, only one field can be set at
a time. Instead of “CW2,1,” use “CW2;CW,1”.
ARGUMENTS: CW n,m where
n = 0 Causes the controller to return the copyright information
n = 1 Causes the controller to set the MSB of unsolicited returned characters
to 1
n = 2 Causes the controller to not set the MSB of unsolicited characters.
n = ? Returns the copyright information for the controller.
m is optional
m = 0 Causes the controller to pause program execution when output FIFO is
full, and to resume execution when FIFO is no longer full.
m = 1 Causes the controller to continue program execution when output FIFO
is full. Characters output after FIFO is full will be lost.
USAGE: DEFAULTS:
While Moving Yes Default Value 2, 0
In a Program Yes Default Format -----
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_CW contains the value of the data adjustment bit. 2 = off, 1 = on
Note: The CW command can cause garbled characters to be returned by the controller. The default state
of the controller is to disable the CW command, however, the Galil Servo Design Kit software and terminal
software may sometimes enable the CW command for internal usage. If the controller is reset while the
Galil software is running, the CW command could be reset to the default value which would create
difficulty for the software. It may be necessary to re-enable the CW command. The CW command status
can be stored in EEPROM
DMC-40x0 Command Reference CW • 75
DA
FUNCTION: Deallocate the Variables & Arrays
DESCRIPTION:
The DA command frees the array and/or variable memory space. In this command, more than one
array or variable can be specified for memory de-allocation. Different arrays and variables
are separated by comma when specified in one command. The argument * deallocates all the
variables, and *[0] deallocates all the arrays.
ARGUMENTS: DA c[0],variable-name where
c[0] = Defined array name
variable-name = Defined variable name
* - Deallocates all the variables
*[0] - Deallocates all the arrays
DA? Returns the number of arrays available on the controller.
USAGE: DEFAULTS:
While Moving Yes Default Value ------
In a Program Yes Default Format ------
Command Line Yes
Controller Usage
OPERAND USAGE:
ALL CONTROLLERS
_DA contains the total number of arrays available. For example, before any arrays have been
defined, the operand _DA is 30. If one array is defined, the operand _DA will return 29.
RELATED COMMANDS:
DM Dimension Array
EXAMPLES: ‘Cars’ and ‘Sales’ are arrays and ‘Total’ is a variable.
DM Cars[400],Sales[50] Dimension 2 arrays
Total=70 Assign 70 to the variable Total
DA Cars[0],Sales[0],Total Deallocate the 2 arrays & variables
DA*[] Deallocate all arrays
DA *,*[] Deallocate all variables and all arrays
Note: Since this command deallocates the spaces and compacts the array spa ces in the memory, it is
possible that execution of this command may take longer time than 2 ms.
76 ● DA DMC-40x0 Command Reference
DC
FUNCTION: Deceleration
DESCRIPTION:
The Deceleration command (DC) sets the linear deceleration rate of the motors for independent
moves such as PR, PA and JG moves. The parameters will be rounded down to the nearest
factor of 1024 and have units of counts per second squared.
ARGUMENTS: DC n,n,n,n,n,n,n,n or DCA=n where
n is an unsigned numbers in the range 1024 to 1073740800
n = ? Returns the deceleration value for the specified axes.
USAGE: DEFAULTS:
While Moving Yes* Default Value 256000
In a Program Yes Default Format 10.0
Command Line Yes
Controller Usage
*
When moving, the DC command can only be specified while in the jog mode.
OPERAND USAGE:
_DCn contains the deceleration rate for the specified axis.
RELATED COMMANDS:
AC Acceleration
PR Position Relative
PA Position Absolute
SP Speed
JG Jog
SD Limit Switch Deceleration
ALL CONTROLLERS
EXAMPLES:
PR 10000 Specify position
AC 2000000 Specify acceleration rate
DC 1000000 Specify deceleration rate
SP 5000 Specify slew speed
BG Begin motion
Note: The DC command may be changed during the move in JG move, but not in PR or PA move.
DMC-40x0 Command Reference DC • 77
DE
FUNCTION: Dual (Auxiliary) Encoder Position
DESCRIPTION:
The DE command defines the position of the auxiliary encoders.
The DE command defines the encoder position when used with stepper motors.
Note: The auxiliary encoders are not available for the stepper axis or for any axis where
output compare is active.
ARGUMENTS: DE n,n,n,n,n,n,n,n or DEA=n where
n is a signed integers in the range -2147483648 to 2147483647 decimal
n = ? Returns the position of the auxiliary encoders for the specified axes.
n = ? returns the commanded reference position of the motor (in step pulses) when used with
a stepper motor. Example: DE 0 This will define the TP or encoder position to 0. This
will not effect the DE ? value. (To set the DE value when in stepper mode use the DP
command.)
USAGE: DEFAULTS:
While Moving Yes Default Value 0,0,0,0
In a Program Yes Default Format Position Format
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_DEn contains the current position of the specified auxiliary encoder.
RELATED COMMANDS:
DP Define main encoder position
777TD Tell Dual Encoder position
EXAMPLES:
DE 0,100,200,400 Set the current auxiliary encoder position to 0,100,200,400
DE?,?,?,? Return auxiliary encoder positions
DualA=_DEA Assign auxiliary encoder position of A-axis to the variable
on A,B,C and D axes
DualA
Hint: Dual encoders are useful when you need an encoder on the motor and on the load. The encoder on
the load is typically the auxiliary encoder and is used to verify the true load pos ition. Any error in load
position is used to correct the motor position.
78 ● DE DMC-40x0 Command Reference
DH
FUNCTION: DHCP Enable
DESCRIPTION:
The DH command configures the DHCP or BOOT-P functionality on the controller for Server IP
addressing.
ARGUMENTS: DH n where
n = 0 disables DHCP and enables BOOT-P
n = 1 disables BOOT-P and enables DHCP
n = ? returns the current state of the setting
USAGE: DEFAULTS:
While Moving Yes Default Value 1.0
In a Program Yes Default Format -
Command Line Yes
Controller Usage
DMC-4000
RELATED COMMANDS:
IA IP Address
EXAMPLES:
DH 1 Sets the DHCP function on. IA assignment will no
DH 0 Sets the DHCP function off, and the Boot-P
Note 1: Galil Tools software can assign an IP address to a controller with DH1 enabled in the absence of
a DHCP server.
Note 2: Up to date versions of a smart terminal, WSDK, Set up 32, or DMC OCX32 are required to set an
IP address in the absence of a DHCP server when DH1 is enabled.
longer work. IP address cannot be burned.
Controller will receive its IP address from the
DHCP server on the network.
function on.
DMC-40x0 Command Reference DH • 79
DL
FUNCTION: Download
DESCRIPTION:
The DL command transfers a data file from the host computer to the controller. Instructions in the
file will be accepted as a data stream without line numbers. The file is terminated using
<control> Z, <control> Q, <control> D, or \. DO NOT insert spaces before each command.
If no parameter is specified, downloading a data file will clear all programs in the controllers
RAM. The data is entered beginning at line 0. If there are too many lines or too many
characters per line, the controller will return a ?. To download a program after a label, specify
the label name following DL. The argument # may be used with DL to append a file at the
end of the program in RAM.
Using Galil DOS Terminal Software: The ED command puts the controller into the Edit
subsystem. In the Edit subsystem, programs can be created, changed, or destroyed. The
commands in the Edit subsystem are:
<cntrl>D Deletes a line
<cntrl>I Inserts a line before the current one
<cntrl>P Displays the previous line
<cntrl>Q Exits the Edit subsystem
<return> Saves a line
ARGUMENTS: DL n where
n = no argument Downloads program beginning at line 0. Erases programs in RAM.
n = #Label Begins download at line following #Label
n = # Begins download at end of program in RAM.
USAGE: DEFAULTS:
While Moving Yes Default Value ---
In a Program No Default Format ---
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
When used as an operand, _DL gives the number of available labels (510 maximum)
RELATED COMMANDS:
UL Upload
EXAMPLES:
DL; Begin download
#A;PR 4000;BGA Data
AMA;MG DONE Data
EN Data
<control> Z End download
80 ● DL DMC-40x0 Command Reference
DM
FUNCTION: Dimension
DESCRIPTION:
The DM command defines a single dimensional array with a name and the number of elements in
the array. The first element of the defined array starts with element number 0 and the last
element is at n-1.
ARGUMENTS: DM c[n] where
c is a name of up to eight characters, starting with an alphabetic character. n specifies the size of
the array (number of array elements).
n = ? Returns the number of array elements available.
USAGE: DEFAULTS:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Controller Usage
OPERAND USAGE:
_DM contains the available array space. For example, before any arrays have been defined, the
operand _DM will return 16000. If an array of 100 elements is defined, the operand _DM
will return 15900.
RELATED COMMANDS:
DA Deallocate Array
ALL CONTROLLERS
EXAMPLES:
DM Pets[5],Dogs[2],Cats[3] Define dimension of arrays, pets with 5 elements;
DM Tests[1600] Define dimension of array Tests with 1600
Dogs with 2 elements; Cats with 3 elements
elements
DMC-40x0 Command Reference DM • 81
DP
FUNCTION: Define Position
DESCRIPTION:
The DP command sets the current motor position and current command positions to a user
specified value. The units are in quadrature counts. This command will set both the TP and
RP values.
The DP command sets the commanded reference position for axes configured as steppers.
The units are in steps. Example: DP 0 this will set the registers for TD and RP to zero,
but will not effect the TP register value.
ARGUMENTS: DP n,n,n,n,n,n,n,n or DPA=n where
n is a signed integer in the range -2147483648 to 2147483647 decimal.
n = ? Returns the current position of the motor for the specified axes.
USAGE: DEFAULTS:
While Moving No Default Value 0,0,0,0
In a Program Yes Default Format Position Format
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_DPn contains the current position of the specified axis.
RELATED COMMANDS:
PF Position Formatting
EXAMPLES:
DP 0,100,200,400 Sets the current position of the A-axis to 0, the B-
DP ,-50000 Sets the current position of B-axis to -50000. The
DP ?,?,?,? Interrogate the position of A,B,C and D axis.
:0, -0050000, 200, 400 Returns all the motor positions
DP ? Interrogate the position of A axis
:0 Returns the A-axis motor position
axis to 100, the C-axis to 200, and the D-axis to 400
B,C and D axes remain unchanged.
Hint: The DP command is useful to redefine the absolute position. For example, you can manually
position the motor by hand using the Motor Off command, MO. Turn the servo motors back on with SH
and then use DP0 to redefine the new position as your absolute zero.
82 ● DP DMC-40x0 Command Reference
DR
FUNCTION: Configures Axes and I/O Data Record Update Rate
DESCRIPTION:
The controller creates a QR record and sends it periodically to a UDP Ethernet Handle
ARGUMENTS: DR n, m
n specifies the data update rate in samples between updates. When TM is set to the default of
1000, n specifies the data update rate in milliseconds. n=0 to turn it off, or n must be an
integer in the range of 2 to 30,000.
m specifies the Ethernet handle on which to periodically send the Data Record. 0 is handle A, 1 is
B… 7 is H. The handle must be UDP (not TCP).
USAGE: DEFAULTS:
While Moving Yes Default Value DR0 (off)
In a Program Yes Default Format --
Command Line Yes
Controller Usage
OPERAND USAGE:
_DR contains the data record update rate.
RELATED COMMANDS:
QZ Sets format of data
QR Query a single data record
DMC-40x0
EXAMPLES:
:DR1000,0
:Gx~P
_`@~P
_H`~P
_0~P
DR0
Note: The data record is in a binary, non-printable format (the output above is normal)
DMC-40x0 Command Reference DR • 83
DT
FUNCTION: Delta Time
DESCRIPTION:
The DT command sets the time interval for Contour Mode. Sending the DT command once will
set the time interval for all contour data until a new DT command (or CDm=n) is sent.
ARGUMENTS: DT n where
n is an integer in the range 0 to 8.
n = 1 through 8 specifies the time interval of 2n samples.
n = -1 allows a pre-load of the contour buffer or to asynchrounsly pause the contour buffer. DT-1
during countor mode will pause the contour buffer (and commanded movement). A positive
DT will resume contour mode from paused position of buffer.
By default the sample period is 1 msec (set by the TM command); with n=1, the time interval
would be 2 msec
n = ? Returns the value for the time interval for contour mode.
USAGE: DEFAULTS:
While Moving Yes Default Value 1
In a Program Yes Default Format 1.0
Command Line Yes
Controller Usage
OPERAND USAGE:
_DT contains the value for the time interval for Contour Mode
ALL CONTROLLERS
RELATED COMMANDS:
CM Contour Mode
CD Contour Data
EXAMPLES:
DT 4 Specifies time interval to be 16 msec
DT 7 Specifies time interval to be 128 msec
#Cont0;'Define label #Cont0
CMABCD;'Specify Contour Mode
DT 4 ;'Specify time increment for contour
CD 200,350,-150,500 ;'Specify incremental positions on A,B,C and C axes
CD 100,200,300,400 ;'New position data
CD 0,0,0,0=0
#Wait;JP#Wait,_CM<>511
EN;'End program
#Cont1;'Define label #Cont1
CMAB;'Specify Contour Mode
DT -1;'Pause Contour Mode to allow pre-load of buffer
CD 100,200;'Countour Data pre-loaded in buffer
CD 400,200;'Countour Data pre-loaded in buffer
CD 200,100;'Countour Data pre-loaded in buffer
CD 300,50;'Countour Data pre-loaded in buffer
AI -1;'Wait for Analog input 1 to go low
DT 8;'Set positive DT to start contour mode
CD 0,0,0,0=0
#Wait;JP#Wait,_CM<>511
EN;'End program
;'End of Contour Buffer/Sequence
;'Wait until path is done
DMC-40x0 Command Reference DT • 85
DV
FUNCTION: Dual Velocity (Dual Loop)
DESCRIPTION:
The DV function changes the operation of the filter. It causes the KD (derivative) term to operate
on the dual encoder instead of the main encoder. This results in improved stability in the
cases where there is a backlash between the motor and the main encoder, and where the dual
encoder is mounted on the motor.
ARGUMENTS: DV n,n,n,n,n,n,n,n or DVX=n where
n = 0 Disables the dual loop mode.
n = 1 Enables the dual loop mode.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format -----
Command Line Yes
Controller Usage
OPERAND USAGE:
_DVn contains the state of dual velocity mode for specified axis. 0 = disabled, 1 = enabled.
RELATED COMMANDS:
KD Damping constant
FV Velocity feedforward
EXAMPLES:
DV 1,1,1,1 Enables dual loop on all axes
DV 0 Disables DV on A axis
DV,,1,1 Enables dual loop on C axis and D axis. Other axes
DV 1,0,1,0 Enables dual loop on A and C axis. Disables dual loop
MG_DVA Returns state of dual velocity mode for A axis
ALL CONTROLLERS
remain unchanged.
on B and D axis.
Hint: The DV command is useful in backlash and resonance compensation.
86 ● DV DMC-40x0 Command Reference
EA
FUNCTION: Choose ECAM master
DESCRIPTION:
The EA command selects the master axis for the electronic cam mode. Any axis may be chosen.
ARGUMENTS: EA n where
n is one of the axis specified as A,B,C,D,E,F,G, H, M or N
USAGE: DEFAULTS:
While Moving Yes Default Value -----
In a Program Yes Default Format -----
Command Line Yes
Controller Usage
RELATED COMMANDS:
EB Enable ECAM
EC Set ECAM table index
EG Engage ECAM
EM Specify ECAM cycle
EP Specify ECAM table intervals & staring point
EQ Disengage ECAM
ET ECAM table
ALL CONTROLLERS
EXAMPLES:
EAB Select B as a master for ECAM
DMC-40x0 Command Reference EA • 87
EB
FUNCTION: Enable ECAM
DESCRIPTION:
The EB function enables or disables the cam mode. In this mode, the starting position of the
master axis is specified within the cycle. When the EB command is given, the master axis is
modularized.
ARGUMENTS: EB n where
n = 1 Starts ECAM mode
n = 0 Stops ECAM mode.
n = ? Returns 0 if ECAM is disabled and a 1 if enabled.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line Yes
Controller Usage
OPERAND USAGE:
_EB contains the state of Ecam mode. 0 = disabled, 1 = enabled
RELATED COMMANDS:
EA Choose ECAM master
EC Set ECAM table index
EG Engage ECAM
EM Specify ECAM cycle
EP Specify ECAM table intervals & staring point
EQ Disengage ECAM
ET ECAM table
ALL CONTROLLERS
EXAMPLES:
EB1 Starts ECAM mode
EB0 Stops ECAM mode
B = _EB Return status of cam mode
88 ● EB DMC-40x0 Command Reference
EC
FUNCTION: ECAM Counter
DESCRIPTION:
The EC function sets the index into the ECAM table. This command is only useful when entering
ECAM table values without index values and is most useful when sending commands in
binary. See the command, ET.
ARGUMENTS: EC n where
n is an integer between 0 and 256.
n = ? Returns the current value of the index into the ECAM table.
USAGE: DEFAULTS:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line Yes
Controller Usage
OPERAND USAGE:
_EC contains the current value of the index into the ECAM table.
RELATED COMMANDS:
EA Choose ECAM master
EB Enable ECAM
EG Engage ECAM
EM Specify ECAM cycle
EP Specify ECAM table intervals & staring point
EQ Disengage ECAM
ET ECAM table
ALL CONTROLLERS
EXAMPLES:
EC0 Set ECAM index to 0
ET 200,400 Set first ECAM table entries to 200,400
ET 400,800 Set second ECAM table entries to 400,800
DMC-40x0 Command Reference EC • 89
ED
FUNCTION: Edit
DESCRIPTION:
Using Galil DOS Terminal Software: The ED command puts the controller into the Edit
subsystem. In the Edit subsystem, programs can be created, changed, or destroyed. The
commands in the Edit subsystem are:
<cntrl>D Deletes a line
<cntrl>I Inserts a line before the current one
<cntrl>P Displays the previous line
<cntrl>Q Exits the Edit subsystem
<return> Saves a line
Using Galil Windows Terminal Software: The ED command causes the Windows terminal
software to open the terminal editor.
OPERAND USAGE:
_ED contains the line number of the last line to have an error.
_ED1 contains the number of the thread where the error occurred (for multitasking).
EXAMPLES:
ED
0 #START
1 PR 2000
2 BGA
3 SLKJ Bad line
4 EN
5 #CMDERR Routine which occurs upon a command error
6 V=_ED
7 MG "An error has occurred" {n}
8 MG "In line", V{F3.0}
9 ST
10 ZS0
11 EN
Hint: Remember to quit the Edit Mode prior to executing or listing a program.
90 ● ED DMC-40x0 Command Reference
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.