Galil DMC-1400 User Manual

Page 1
DMC-1400 Series
Command Reference
Manual Rev. 2.8
DMC-1400 Series
Galil Motion Control, Inc.
3750 Atherton Road
Rocklin, California 95765
Phone: (916) 626 0101
Fax: (916) 626-0102
Internet Address: support@galilmc.com
URL: www.galilmc.com
Rev 8/06
Page 2
ARRAYS CONTROL FEEDBACK MATH PROGRAM STEPPER
DA deallocate DV dual loop AF analog feedback @ABS[n] | | BK breakpoint KS smoothing n _DA arrays le FA accel feedfw AL arm latch @ACOS[n] arccos DL downlo DM defin FV speed feedf _AL latch occurred? arcsin _DL labels l AV wait for arc length e wd @ASIN[n] eft _DM space le IL integrator li configure arctan ED edit _AVS arc length ft mit CE @ATAN[n] LA li derivative g OC output compare n] bit not ELSE if else CA 2nd vector st KD ain @COM[ QD downloa KI integral gain _OC first pulse? ] cosine EN end CR circle d @COS[n QU print/uploa KP proportional gain RL read latch @FRAC[n] fraction ENDIF if en CS clear sequence d dif RA reco MO motor _RL latch position @INT[n] integer HX halt thread _CS segment rd off RC begi _MO motor o TD tell dual @RND[n] round IF conditio elliptical scale n ff? nal ES _RC recording NB notch wid TP tell position @SIN[n] sine JP for/while loop LE linear end ? th RD dat NF notch frequen TV tell veloc @SQR[n] x^0. JS jump subrou e _LE total arc length a cy ity 5 tin _RD addres NZ notch ze [ ] index F offs GA ax + add LS list LM linear axes O et es
COMMUNICAT
CC aux seri SH servo he GR ratio * multiply NO (') comment TN tangent scale al re CF unsolicite TE tell er CI interrup TK peak torqu DE define dual ( ) parenthesis REM fast comment VA acceleration t e CW unsolicited b TL torque limit DP define position & an RI return interrupt VD deceleration it d DR data recor TM sample time FE find home o | SL single step VE vector end d nly or EO ech TT tell torq FI find index on $ hexadecimal TB tell status b VM vector axes o ue ly yte HS handle swit IA IP addre master ax _HM home inp > greater than UL upload VP vector point ss EA is ut _IA Ethernet in EB enable IH open hand count _BN serial number <= less or equal XQ execute VR VS multiplier le EC er _IH handle in EG engage slav _BV axes >= greater or equal _XQ current li # VS speed fo e ne IN user inpu modul ^R^V firmware rev <> not equ ZS zero stack VT s curve t EM us al LZ leading zero master positions MG messag EQ disengage slave @AN[x] analog in C acceleratio #AUTO; EN e A n P2CD port 2 cod ET table @IN[x] digital in begi #AUTOERR; EN e BG n P2CH characte P2NM numbe ^R^S master reset AI wait for input DC deceleratio # subrouti r n ne P2ST string BN burn AO set analog output IP increment position PF position forma BP burn program CB clear digital out IT s curv AT wait refere t e nce QR query record BV burn variables CN configure JG jo TIME clock g QZ record info RS reset CO extended I/O PA position absolut WT wait e SA send command _SA response AB abo MB Modbus TCP PR position relativ BA ax rt e es TH tell handles _AB abort input MW Modbus w _PR relative targe _BA 2nd DAC axis ait t VF variable forma BL reverse soft limit OB output bit PT position trackin BB hall off t g set WH which handle _ED program line OP output port RP desired positio BC calibration n _WH numeric _ED1 thread SB set digital out SP speed _BC hall state #COMINT; N1,1 ER maximum TE TI tell input b ST stop BD degre yte es #TCPERR; RE FL forward soft limit TS tell switch ~a axis variabl BI hall inputs es e
CONTOUR
CD data _LR reverse limit #ININT; RI1 AD distance (RP) BO DAC offset CM axes OE off on e AM complete (RP) BS setup rror _CM buffer ful SC stop code AP position (TP) BZ find zero l DT delta tim TC tell code AR distance (RP) _BZ distance to zero e WC wait for buffe #CMDERR; EN1 AS at speed (SP) r IMSWI; RE1 MC complete (TP) #L OSERR; RE1 MF forward (TP) #P MR reverse (TP) TW MC timeout #MCTIME; EN1
ft d ad
GEAR
E
PL low pas GM gantry mode - subtract LV list variables _LM buffer space
s
HOME
ECAM
HM hom < less than TR debug trace _VM velocity ch e
INFO
I/O MOTION
EEPROM
ERRORS
_LF forward limit TZ tell Ethernet I/O
@OUT[x] digital out tion? ; command delimr _BG in mo iter
II input interr A last targe
@TAN[n] tangent LL list labels LI linear point s ro
/ divide RE return e r _TN 1st position d ror rro
= assign / equ _UL variables left _VP last point fo al
_ZS stack level s EP
TIME
SINE DRIVE
MOTION WAIT
BM magnetic cy
cle
VECTOR
upt _P t
Page 3

Contents

CONTENTS ......................................................................................................................................................................... I
OVERVIEW.........................................................................................................................................................................1
CONTROLLER NOTATION ................................................................................................................... 1
ERVO AND STEPPER MOTOR NOTATION:.......................................................................................... 1
S C
OMMAND DESCRIPTIONS ................................................................................................................. 1
Arguments..................................................................................................................................... 2
Operand Usage............................................................................................................................. 2
Usage Description ........................................................................................................................ 2
Default Description....................................................................................................................... 2
Controller Usage .......................................................................................................................... 3
SERVO UPDATE RATES ...................................................................................................................... 3
#..................................................................................................................................................... 4
$..................................................................................................................................................... 5
& | ................................................................................................................................................. 6
( )................................................................................................................................................... 7
;..................................................................................................................................................... 8
[ ] .................................................................................................................................................. 9
+ - * / .......................................................................................................................................... 10
<, >, =, <=, >=, <>.................................................................................................................. 11
=.................................................................................................................................................. 12
AB................................................................................................................................................ 13
@ABS[n]..................................................................................................................................... 14
AC ............................................................................................................................................... 15
@ACOS[n].................................................................................................................................. 16
AD............................................................................................................................................... 17
AF................................................................................................................................................ 18
AI................................................................................................................................................. 19
AL................................................................................................................................................ 20
AM............................................................................................................................................... 21
@AN[n]....................................................................................................................................... 22
AO............................................................................................................................................... 23
AP................................................................................................................................................ 24
AR................................................................................................................................................ 25
AS................................................................................................................................................ 26
@ASIN[n] ................................................................................................................................... 27
AT................................................................................................................................................ 28
@ATAN[n].................................................................................................................................. 29
#AUTO........................................................................................................................................ 30
#AUTOERR................................................................................................................................. 31
AV................................................................................................................................................ 32
BA................................................................................................................................................ 33
BB................................................................................................................................................ 34
BC ............................................................................................................................................... 35
BD............................................................................................................................................... 36
BG............................................................................................................................................... 37
DMC-1400 Series Command Reference Contents i
Page 4
BI................................................................................................................................................. 38
BK ............................................................................................................................................... 39
BL................................................................................................................................................ 40
BM............................................................................................................................................... 41
BN ............................................................................................................................................... 42
BO............................................................................................................................................... 43
BP................................................................................................................................................ 44
BS................................................................................................................................................ 45
BV................................................................................................................................................ 46
BZ................................................................................................................................................ 47
CB ............................................................................................................................................... 48
CC............................................................................................................................................... 49
CD............................................................................................................................................... 50
CE ............................................................................................................................................... 51
CF ............................................................................................................................................... 52
CI................................................................................................................................................. 53
CM............................................................................................................................................... 54
#CMDERR .................................................................................................................................. 55
CN............................................................................................................................................... 56
CO............................................................................................................................................... 57
@COM[n]................................................................................................................................... 58
#COMINT ................................................................................................................................... 59
@COS[n].................................................................................................................................... 60
CR ............................................................................................................................................... 61
CS................................................................................................................................................ 62
CW............................................................................................................................................... 63
DA............................................................................................................................................... 64
DC............................................................................................................................................... 65
DE............................................................................................................................................... 66
DL ............................................................................................................................................... 67
DM .............................................................................................................................................. 68
DP............................................................................................................................................... 69
DT ............................................................................................................................................... 70
DV............................................................................................................................................... 71
EA................................................................................................................................................ 72
EB................................................................................................................................................ 73
EC ............................................................................................................................................... 74
ED............................................................................................................................................... 75
EG............................................................................................................................................... 76
EI................................................................................................................................................. 77
ELSE ........................................................................................................................................... 78
EM............................................................................................................................................... 79
EN ............................................................................................................................................... 80
ENDIF......................................................................................................................................... 82
EO............................................................................................................................................... 83
EP................................................................................................................................................ 84
EQ............................................................................................................................................... 85
ii • Contents DMC-1400 Series Command Reference
Page 5
ER................................................................................................................................................ 86
ES................................................................................................................................................ 87
ET................................................................................................................................................ 88
FA................................................................................................................................................ 89
FE................................................................................................................................................ 90
FI................................................................................................................................................. 91
FL................................................................................................................................................ 92
@FRAC[n].................................................................................................................................. 93
FV................................................................................................................................................ 94
GA............................................................................................................................................... 95
GN............................................................................................................................................... 96
GM .............................................................................................................................................. 97
GR............................................................................................................................................... 98
HM .............................................................................................................................................. 99
HX............................................................................................................................................. 100
IA............................................................................................................................................... 101
IF............................................................................................................................................... 102
IH .............................................................................................................................................. 103
II................................................................................................................................................ 105
IL............................................................................................................................................... 107
IN............................................................................................................................................... 108
@IN[n]...................................................................................................................................... 110
#ININT ...................................................................................................................................... 111
@INT[n] ................................................................................................................................... 112
IP............................................................................................................................................... 113
IT............................................................................................................................................... 114
IV............................................................................................................................................... 115
JG.............................................................................................................................................. 116
JP .............................................................................................................................................. 117
JS............................................................................................................................................... 118
KD............................................................................................................................................. 119
KI............................................................................................................................................... 120
KP ............................................................................................................................................. 121
KS.............................................................................................................................................. 122
LA.............................................................................................................................................. 123
LE.............................................................................................................................................. 124
_LF*.......................................................................................................................................... 125
LI............................................................................................................................................... 126
#LIMSWI................................................................................................................................... 128
LL.............................................................................................................................................. 129
LM............................................................................................................................................. 130
_LR*.......................................................................................................................................... 131
LS .............................................................................................................................................. 132
LV.............................................................................................................................................. 133
LZ.............................................................................................................................................. 134
MB............................................................................................................................................. 135
MC............................................................................................................................................. 137
#MCTIME................................................................................................................................. 138
DMC-1400 Series Command Reference Contents iii
Page 6
MF............................................................................................................................................. 139
MG ............................................................................................................................................ 140
MO ............................................................................................................................................ 141
MR............................................................................................................................................. 142
MT............................................................................................................................................. 143
NB ............................................................................................................................................. 144
NF ............................................................................................................................................. 145
NO............................................................................................................................................. 146
NZ.............................................................................................................................................. 147
OB............................................................................................................................................. 148
OC............................................................................................................................................. 149
OE............................................................................................................................................. 150
OF............................................................................................................................................. 151
OP............................................................................................................................................. 152
@OUT[n].................................................................................................................................. 154
P1CD P2CD............................................................................................................................. 155
P1CH P2CH............................................................................................................................. 156
P1NM P2NM............................................................................................................................ 157
P1ST P2ST............................................................................................................................... 158
#POSERR.................................................................................................................................. 159
PA.............................................................................................................................................. 160
PF.............................................................................................................................................. 161
PR.............................................................................................................................................. 162
QD............................................................................................................................................. 163
QR............................................................................................................................................. 164
QU............................................................................................................................................. 165
QZ ............................................................................................................................................. 166
RA.............................................................................................................................................. 167
RC ............................................................................................................................................. 168
RD............................................................................................................................................. 169
RE.............................................................................................................................................. 170
REM .......................................................................................................................................... 171
RI............................................................................................................................................... 172
RL.............................................................................................................................................. 173
@RND[n].................................................................................................................................. 174
RP.............................................................................................................................................. 175
RS.............................................................................................................................................. 176
<control>R<control>S............................................................................................................ 177
<control>R<control>V............................................................................................................ 178
SA.............................................................................................................................................. 179
SA n........................................................................................................................................... 180
SB.............................................................................................................................................. 181
SC.............................................................................................................................................. 182
SH.............................................................................................................................................. 183
@SIN[n].................................................................................................................................... 184
SL .............................................................................................................................................. 185
SP.............................................................................................................................................. 186
iv • Contents DMC-1400 Series Command Reference
Page 7
@SQR[n] .................................................................................................................................. 187
ST .............................................................................................................................................. 188
@TAN[n] .................................................................................................................................. 189
TB.............................................................................................................................................. 190
TC.............................................................................................................................................. 191
#TCPERR.................................................................................................................................. 193
TD ............................................................................................................................................. 194
TE.............................................................................................................................................. 195
TH ............................................................................................................................................. 196
TI............................................................................................................................................... 197
TIME*....................................................................................................................................... 198
TL.............................................................................................................................................. 199
TM............................................................................................................................................. 200
TP.............................................................................................................................................. 201
TR.............................................................................................................................................. 202
TS .............................................................................................................................................. 203
TT.............................................................................................................................................. 204
TV.............................................................................................................................................. 205
TW............................................................................................................................................. 206
UI .............................................................................................................................................. 207
UL ............................................................................................................................................. 208
VA.............................................................................................................................................. 209
VD............................................................................................................................................. 210
VE.............................................................................................................................................. 211
VF.............................................................................................................................................. 212
VM............................................................................................................................................. 213
VP.............................................................................................................................................. 214
VR.............................................................................................................................................. 215
VS.............................................................................................................................................. 216
VT.............................................................................................................................................. 217
WC............................................................................................................................................. 218
WH ............................................................................................................................................ 219
WT............................................................................................................................................. 220
XQ............................................................................................................................................. 221
ZR.............................................................................................................................................. 222
ZS .............................................................................................................................................. 223
INDEX..............................................................................................................................................................................225
DMC-1400 Series Command Reference v
Page 8
Page 9

Overview

Controller Notation

This command reference is a supplement to the Galil Motion Control User Manual. For proper controller operation, consult the Users Manual. This manual describes commands to be used with the Galil Econo Series Motion Controllers: DMC-1410, DMC-1411, DMC-1412, DMC-1414, DMC­1415, DMC-1416, DMC-1417, and DMC-1425. Commands are listed in alphabetical order.
This command summary includes all executable commands, which can be used with the DMC-1400
series motion controller. These commands are common to all the controllers in that series with certain exceptions. These exceptions are noted on each corresponding command as “Controller Usage”. An example is Ethernet commands for the DMC-1415, DMC-1416, and DMC-1425.

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.
Attention: Pertains to servo motor use.
Attention: Pertains to stepper motor use.

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.
DMC-1400 Series Command Reference 1
Page 10

Arguments

As arguments, some commands require actual values to be specified following the instruction. These commands are followed by lower case n where n is replaced by an actual value.
A “?” returns the specified value for that axis. For example, AC? returns the acceleration of the axis.
Other commands require action on the axis to be specified. These commands do not have an operand action for the axis or are specified by writing the command only, such as BG or ST. When downloading commands to the DMC-141X, do not insert a space prior to any command. For example, ST; AM is invalid because there is a space after the semicolon.
The DMC-1425 is the only controller in the DMC-1400 Econo Series that supports two axes. For this controller, arguments are specified for the X and Y axis.

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 motor can be assigned to the variable ‘V’ with the command:
V=_TP

Usage Description

The Usage description specifies the restrictions on proper command usage. The following provides an explanation of the command information provided:
"While Moving" states whether or not the command is valid while the controller is performing a previously defined motion.
"In a program" states whether the command may be used as part of a user-defined program.
"Command Line" states whether the command may be used other than in a user-defined program.
"Can be Interrogated" states whether or not the command can be interrogated by using the “?” as a command argument.
"Used as an Operand" states whether the command has an associated operand.

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 non­volatile 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.
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 jumper or dip switch on.
by powering up or resetting the controller with the MRST
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 non-volatile memory, the default value of 64 will be used if the controller is reset or upon
2 Overview DMC-1400 Series Command Reference
Page 11
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.

Controller Usage

The controller usage indicates which models within the DMC-1400 Econo Series line support the current command. Controllers referenced in this manual are the DMC-1410, DMC-1411, DMC-1412, DMC-1414, DMC-1415, DMC-1416, DMC-1417 and DMC-1425. ALL indicates that all Econo controllers support the specific command.

Servo Update Rates

The standard servo update period on all E-Series Motion Controllers is 1msec. To change the servo update, use the command, TM. The controller firmware will allow operation down to 250 usec per sample.
Fast Firmware (DMC-1415/1416/1425)
The DMC-1415, DMC-1416 and DMC-1425 motion controllers can operate in ‘fast mode’ that allows operation down to 125 usec per sample.
In order to run the motion controller in fast mode, the fast firmware must be uploaded. This can be done through the Galil terminal software such as DMCTERM and WSDK. Use the menu option, "Update Flash EEPROM" to change the controller firmware. The fast firmware is included with the controller utilities.
When operating in fast mode, there are functions that are disabled and/or altered.

Commands which are not Allowed when Operating in Fast Mode:

Command
Gearing Mode
Ecam Mode
Analog Feedback (AF)
Stepper Motor Operation (MT 2, -2, 2.5, -2.5)
Trippoints allowed only in thread 0
Tell Velocity Interrogation Command (TV)
Commands which are Altered when Operating in Fast Mode:
Command Modification
MT Command argument 2, 2.5, -2, -2.5 not valid
AD, AI, AM, AP, AR, AS, AT, AV, MC, MF, MR, WC
Commands not allowed in thread 1
DMC-1400 Series Command Reference Overview ● 3
Page 12
#
FUNCTION: Label (subroutine)
DESCRIPTION:
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.
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
_
UL 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
4 # DMC-1400 Series Command Reference
Page 13
$
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 ;’store lower 16 bits of x in y
z = x & $ffff0000.0000 / $10000 ;’store upper 16 bits of x in z
ALL
DMC-1400 Series Command Reference $ 5
Page 14
& |
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)
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@COM[n] Bitwise complement
IF If statement
JP Jump statement
JS Jump subroutine
ALL
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
6 & | DMC-1400 Series Command Reference
Page 15
( )
FUNCTION: Parentheses (order of operations)
DESCRIPTION:
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-1400 Series Command Reference ( ) 7
Page 16
;
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 or ‘ 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
8 ; DMC-1400 Series Command Reference
Page 17
[ ]
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.
ARGUMENTS: mmmmmmmm[n] where
mmmmmmmm is the array name
n is the array index and is an integer between 0 and 7999
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 ;’set first element to 3
MG A[0] ;’print element 0
QU A[] ;’print entire array
ALL
DMC-1400 Series Command Reference [ ] 9
Page 18

+ - * /

FUNCTION: Math Operators
DESCRIPTION:
The addition, subtraction, multiplication, and division 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) 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
ALL
10 + - * / DMC-1400 Series Command Reference
Page 19

<, >, =, <=, >=, <>

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
DMC-1400 Series Command Reference <, >, =, <=, >=, <> ● 11
Page 20
=
FUNCTION: Equals (Assignment Operator)
DESCRIPTION:
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
EXAMPLES:
:x=5 :x=
5.0000
:MG x
5.0000 :
ALL
;’define and initialize x to 5 ;’print x two different ways
12 = DMC-1400 Series Command Reference
Page 21
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").
ARGUMENTS: AB n where
n = no argument or 1
1 aborts motion without aborting program, 0 aborts motion and program
AB aborts motion on all axes in motion and cannot stop individual axes.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_AB gives the state of the Abort Input
RELATED COMMANDS:
SH Turns servos back on if they were shut-off by Abort and OE1.
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.
DMC-1400 Series Command Reference AB ● 13
Page 22

@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 Square Root
EXAMPLES:
:MG @ABS[-2147483647]
2147483647.0000 :
ALL
14 @ABS[n] DMC-1400 Series Command Reference
Page 23
AC
FUNCTION: Acceleration
DESCRIPTION:
The Acceleration (AC) command sets the linear acceleration rate for independent moves, such
as PR, PA and JG moves. The parameters input will be rounded down to the nearest factor of 1024. The units of the parameters are counts per second squared. The acceleration rate may be changed during motion. The DC command is used to specify the deceleration rate.
ARGUMENTS: AC n where
n is an unsigned number in the range in the range 1024 to 67107840
“?” returns the acceleration value
USAGE:
While Moving Yes Default Value 256000
In a Program Yes Default Format 8.0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_ACx contains the value of acceleration.
ALL
RELATED COMMANDS:
DC Specifies deceleration rate.
FA Feedforward Acceleration.
IT Smoothing constant
EXAMPLES:
AC 150000 Set acceleration to 150000
AC ? Request the current Acceleration setting
0149504 Return Acceleration
(resolution, 1024)
V=_AC Assigns the current acceleration setting to the variable V
HINTS: 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.
DMC-1400 Series Command Reference AC ● 15
Page 24

@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 Arc sine
@SIN sine
@ATAN Arc tangent
@COS Cosine
@TAN Tangent
EXAMPLES:
:MG @ACOS[-1]
180.0000
:MG @ACOS[0]
90.0000
:MG @ACOS[1]
0.0001 :
ALL
16 @ACOS[n] DMC-1400 Series Command Reference
Page 25
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. The commanded motion is in the direction which moves away from the specified position.
The units of the command are quadrature counts. The motion profiler must be on or the
trippoint will automatically be satisfied.
Note: AD will be affected when the motion smoothing time constant, IT, is not 1. See IT
command for further information.
ARGUMENTS: ADn where
n is an unsigned integer in the range 0 to 2147483647, with no commas.
USAGE:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
RELATED COMMANDS:
AR After distance for repetitive triggering
EXAMPLES:
#A;DP0,0,0,0 Begin Program
PR 10000 Specify positions
BG Begin motion
AD 5000 After motor travels 5000 units
MG "Halfway" ;TP Send message
EN End Program
Hint: The AD command is accurate to the number of counts that occur in 2 servo samples (2 msec for TM 1000). Multiply your speed by 2 msec to obtain the maximum position error in counts. Remember AD measures incremental distance from start of move on one axis.
DMC-1400 Series Command Reference AD ● 17
Page 26
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). As the analog feedback is decoded by a 12-bit A/D converter, an input voltage of 10 volts is decoded as a position of 2047 counts and a voltage of -10 volts corresponds to a position of -2048 counts. When using Analog Feedback mode, X axis feedback must be wired to analog input 1 and Y axis feedback must be wired to analog input 2.
ARGUMENTS: AF x,y AFX=x AF a,b where
x,y are integers
1 = Enables analog feedback
0 = Disables analog feedback and switches to digital feedback
"?" returns a 0 or 1 which states whether analog feedback is enabled for the specified axes.
USAGE:
While Moving No Default Value 0,0,0,0
In a Program Yes Default Format -
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
DMC-1415/1416/1425 only
OPERAND USAGE:
_AFx contains the value of acceleration for the specified axis.
RELATED COMMANDS:
CE Configure Encoder
EXAMPLES:
AF 1,0 Analog feedback on X axis
V1 = _AFX Assign feedback type to variable
AF ? Interrogate feedback type
18 AF DMC-1400 Series Command Reference
Page 27
AI
FUNCTION: After Input
DESCRIPTION:
The AI command is used in motion programs to wait until after the specified input has
occurred. If n is positive, it waits for the input to go high. If n is negative, it waits for n to go low.
ARGUMENTS: AI +/-n where
n is an integer in the range 1 to 7 decimal for DMC-1410/1411/1417/1415/1416 and 0 to 3 decimal for the DMC-1425.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
@IN[n] Function to read input 1 through 7 or 1 through 3 for DMC-1425
II Input interrupt
#ININT Label for input interrupt
ALL
EXAMPLES:
#A Begin Program
AI 7 Wait until input 7 is high
SP 10000 Speed is 10000 counts/sec
AC 20000 Acceleration is 20000 counts/sec2
PR 400 Specify position
BG Begin motion
EN End Program
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-1400 Series Command Reference AI ● 19
Page 28
AL
FUNCTION: Arm Latch
DESCRIPTION:
The AL command enables the latching function (high speed position capture) of the
controller. When the AL command is used to arm the position latch, the encoder position of the main encoder input will be captured upon a low going signal on Input 1. The command RL returns the captured position value. When interrogated or used in an operand the AL command will return a 1 if the latch is armed or a zero after the latch has occurred. The CN command will change the polarity of the latch.
ARGUMENTS: ALn where
n is X (or Y for the DMC-1425) or
n is SX for the aux encoder on DMC-1415/16
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_ALx contains the state of the latch. 0 = not armed, 1 = armed.
RELATED COMMANDS:
RL Report Latch
EXAMPLES:
#START Start program
AL Arm latch
JG 50000 Set up jog at 50000 counts/sec
BG Begin the move
#LOOP Loop until latch has occurred
JP #LOOP,_AL=1
RL Transmit the latched position
EN End of program
20 AL DMC-1400 Series Command Reference
Page 29
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. AM occurs when the profiler is finished generating the last position command. However, the servo motor may not be in the final position. Use TE to verify position error for servos, or use the MC trippoint to wait until final actual position is recorded.
ARGUMENTS: AM
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
BG (_BG returns a 0 if motion complete)
MC Actual Motion Complete (In-Position)
ALL
EXAMPLES:
#MOVE Program MOVE
PR 5000 Position relative moves
BG Start
AM After the move is complete
EN End of Program
#F;DP 0 Program F
PR 5000 Position relative moves
BG Start
AM After motion complete on all axes
MG "DONE";TP Print message
EN End of Program
HINT: AM is a very important command for controlling the timing between multiple move sequences. For example, if the motor is in the middle of a position relative move (PR) you cannot make a position absolute move (PA, BG) until the first move is complete. Use AM to halt the program sequences until the first motion is complete. AM tests for profile completion. The actual motor may still be moving. Another method for testing motion complete is to query the operand, _BG. This is equal to 1 du ring motion, and 0 when motion profiling is complete.
DMC-1400 Series Command Reference AM ● 21
Page 30

@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:
@IN Read digital input
@OUT 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
22 @AN[n] DMC-1400 Series Command Reference
Page 31
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 (1 to 6).
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:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Controller Usage
DMC-1415/1416/1425
RELATED COMMANDS:
SB Set Bit
CB Clear Bit
EXAMPLES:
DMC-1400 Series Command Reference AO ● 23
Page 32
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 commanded motor position crosses the specified absolute position.
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. The motion profiler must be on or the
trippoint will automatically be satisfied.
ARGUMENTS: APn where
n is a signed integer in the range -2147483648 to 2147483647 decimal
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
RELATED COMMANDS:
AD Trippoint for relative distances
EXAMPLES:
#TEST Program B
DP0 Define zero
JG 1000 Jog mode (speed of 1000 counts/sec)
BG Begin move
AP 2000 After passing the position 2000
V1=_TP Assign V1 X 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 samples (2 msec for TM 1000). Multiply the speed by the time period of 2 samples to obtain the maximum error. AP tests for absolute position. Use the AD command to measure incremental distances.
24 AP DMC-1400 Series Command Reference
Page 33
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.
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. The motion profiler must be on or the
trippoint will automatically be satisfied.
ARGUMENTS: ARn where
n is unsigned integer in the range 0 to 2147483647 decimal.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
RELATED COMMANDS:
AP Trippoint for after absolute position
EXAMPLES:
#A;DP 0 Begin Program
JG 50000 Specify speed
BG Begin motion
#B Label
AR 25000 After passing 25000 counts of relative distance on X-axis
MG "Passed_X";TP Send message
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-1400 Series Command Reference AR ● 25
Page 34
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 speed is 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
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
EXAMPLES:
#SPEED Program A
PR 100000 Specify position
SP 10000 Specify speed
BG Begin
AS After speed is reached
MG "At Speed" Print Message
EN End of Program
ALL
WARNING: The AS command applies to a trapezoidal velocity profile only with linear acceleration. AS used with smoothing profile will be inaccurate.
26 AS DMC-1400 Series Command Reference
Page 35

@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 Arc cosine
@SIN sine
@ATAN Arc tangent
@COS Cosine
@TAN Tangent
EXAMPLES:
:MG @ASIN[-1]
-90.0000 :MG @ASIN[0]
0.0000 :MG @ASIN[1]
90.0000 :
ALL
DMC-1400 Series Command Reference @ASIN[n] ● 27
Page 36
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 integer in the range 0 to 2 Billion
n = 0 defines a reference time at current time
positive n waits n msec from reference
negative n waits n msec from reference and sets new reference after elapsed time period
(AT -n is equivalent to AT n; AT 0)
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
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)
28 AT DMC-1400 Series Command Reference
Page 37

@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 Arc sine
@SIN sine
@ACOS Arc cosine
@COS Cosine
@TAN Tangent
EXAMPLES:
:MG @ATAN[-10]
-84.2894
:MG @ATAN[0]
0.0000
:MG @ATAN[10]
84.2894 :
ALL
DMC-1400 Series Command Reference @ATAN[n] ● 29
Page 38

#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
EXAMPLES:
#AUTO ;'move the x axis upon power up
PRX=1000 ;'move 1000 counts BGX ;'begin motion AMX ;'wait until motion is complete
EN
NOTE: Use EN to end the routine
ALL
30 #AUTO DMC-1400 Series Command Reference
Page 39

#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
EXAMPLES:
#AUTO
WT 2000 MG "AUTO" JP#AUTO
EN
#AUTOERR
WT500 MG "AUTOERR ", _RS
EN
NOTE: An application program must be executing for the automatic subroutine to fun c tion, which runs in thread 0.
NOTE: Use EN to end the routine
DMC-14x5 / 6 ONLY
DMC-1400 Series Command Reference #AUTOERR ● 31
Page 40
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 Yes
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
EXAMPLES:
#MOVE;DP 0,0 Label
CAT Specify the T coordinate system
LMXY Linear move for X,Y
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";TPXY 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.
32 AV DMC-1400 Series Command Reference
Page 41
BA
FUNCTION: Brushless Axis
DESCRIPTION:
The BA command sets the controller up for sinusoidal commutation of the axis. This
command enables the second DAC for use as the second phase of commutation.
ARGUMENTS: BAX where
X specifies sinusoidal commutation for the axis.
No argument clears all axes configured for sinusoidal commutation.
USAGE:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_BA indicates whether the axis has been configured for sinusoidal commutation. If the motor
is configured as brush-type or stepper motor, _BA contains 0.
RELATED COMMANDS:
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
DMC-1412/1415/1410/1417
DMC-1400 Series Command Reference BA ● 33
Page 42
BB
FUNCTION: Brushless Phase Begins
DESCRIPTION:
The BB function describes the position offset between the Hall transition point and θ = 0, for
sinusoidally commutated motor. This command must be saved in non-volatile memory to be effective upon reset.
ARGUMENTS: BB x where
x represents the phase offset of the brushless motor, expressed in multiples of 30°.
USAGE:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
EXAMPLES:
BB30
RELATED COMMANDS:
BA Brushless Axis
BC Brushless Commutation
BD Brushless Degrees
DMC-1412/1415/1410/1417
The offsets sinusoidal motor is 30°
34 BB DMC-1400 Series Command Reference
Page 43
BC
FUNCTION: Brushless Calibration
DESCRIPTION:
The function BC monitors the status of the Hall sensors of a sinusoidally commutated motor,
and upon transition, replaces the estimated value of a commutated phase by an exact value.
ARGUMENTS: BC
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_BC 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
DMC-1412/1415/1410/1417
DMC-1400 Series Command Reference BC ● 35
Page 44
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: BDx where
x sets the commutation phase in degrees within 0-360°.
USAGE:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_BD contains the commutation phase of the brushless motor.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
DMC-1412/1415/1410/1417
36 BD DMC-1400 Series Command Reference
Page 45
BG
FUNCTION: Begin
DESCRIPTION:
The BG command starts a motion. When Used as an Operand, the BG command will return a
1 if there is a commanded motion in progress, a 0 otherwise.
ARGUMENTS: BG
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_BGx contains a ‘0’ if motion complete on the axis, otherwise contains a ‘1’.
RELATED COMMANDS:
AM After motion complete
ST Stop motion
EXAMPLES:
PR 2000 Set up for a relative move
BG Start motion
HM Set up for the homing
BG Start motion
JG 1000 Set up for jog
BG Start motion
STATE=_BG Assign a 1 to STATE if the axis is performing a move
ALL
HINT: You cannot give another BG command until current BG motion has been completed. Use the AM trippoint to wait for motion complete between moves. Another method for checking motion complete is to test for _BG being equal to 0.
DMC-1400 Series Command Reference BG ● 37
Page 46
BI
FUNCTION: Brushless Inputs
DESCRIPTION:
The BIx indicates the starting number for the input lines to which the Hall sensors have been
wired for sinusoidally commutated motors. These inputs must be the general use inputs (bits 1-7). The Hall sensors of the motor must be connected with consecutive numbers of input lines.
The brushless setup command, BS, can be used to determine the proper wiring of the hall
sensors.
ARGUMENTS: BIx where
x indicates the starting input line.
0 clears the hall sensor configuration for the axis.
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
EXAMPLE:
BI5 The Hall sensors of the brushless motor are connected to inputs 5, 6 and 7.
DMC-1412/1415/1410/1417
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
38 BI DMC-1400 Series Command Reference
Page 47
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 999 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-1400 Series Command Reference BK ● 39
Page 48
BL
FUNCTION: Reverse Software Limit
DESCRIPTION:
The BL command sets the reverse software limit. If this limit is exceeded during a
commanded motion, the motion will decelerate to a stop. Reverse motion beyond this limit is not permitted. The reverse limit is activated at position n-1. To disable the reverse limit, set n to -2147483648. The units are in quadrature counts.
When the reverse software limit is activated, the automatic subroutine #LIMSWI will be
executed if it is included in the program and the program is executing. See the section on Automatic Subroutines in the user manual.
ARGUMENTS: BL n where
n is a signed integer in the range -2147483648 to 2147483647.
-214783648 turns off the reverse limit.
USAGE:
While Moving Yes Default Value -214783648
In a Program Yes Default Format Position format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_BLx contains the value of the reverse software limit..
RELATED COMMANDS:
FL Forward Limit
_LR Reverse Limit Operand
PF Position Formatting
EXAMPLES:
#TEST Test Program
AC 1000000 Acceleration Rate
DC 1000000 Deceleration Rate
BL -15000 Set Reverse Limit
JG -5000 Jog Reverse
BG Begin Motion
AM After Motion (limit occurred)
TP Tell Position
EN End Program
HINT: The DMC-141X also provides hardware limits.
40 BL DMC-1400 Series Command Reference
Page 49
BM
FUNCTION: Brushless Modulo
DESCRIPTION:
The BM command defines the length of the magnetic cycle in encoder counts.
ARGUMENTS: BMx where
x is a decimal value between 1 and 1000000 with a resolution of 1/10 that represents the
magnetic cycles of the brushless motor. This value can also be specified as a fraction with a resolution of 1/16.
USAGE:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_BM indicates the cycle length in counts for the brushless motor.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
DMC-1412/1415/1410/1411
DMC-1400 Series Command Reference BM ● 41
Page 50
BN
FUNCTION: Burn
DESCRIPTION:
The BN command saves certain controller parameters in non-volatile 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 CW IA PF
AF DC IL
BA DV IT SB
BB EI KD SP
BI EO KI TL
BL ER KP TM
BM FA KS TR
BO FL LZ VA
CB FV MO VD
CE GA MT VF
CN CW OE VS
CO GR OF VT
ARGUMENTS: None
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
42 BN DMC-1400 Series Command Reference
Page 51
BO
FUNCTION: Brushless Offset
DESCRIPTION:
The BOx sets a fixed offset on the DAC's of a sinusoidally commutated motor. This may be
used to offset any bias in the amplifier, or can be used for phase initialization.
ARGUMENTS: BOx,x where
x specifies the voltage as a real value between -10 and 10.
x = ? Returns the brushless offset for the ‘x’ axis.
USAGE:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_BO contains the offset voltage on the DAC for the brushless motor.
EXAMPLES:
BO –2,1
DMC-1412/1415/1410/1417
Generates –2 volts on the first DAC and +1 volts on the second DAC of a sinusoidally commutated motor.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
DMC-1400 Series Command Reference BO ● 43
Page 52
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:
While Moving No Default Value ---
In a Program No
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
Note: 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.
DMC-1412/1414/1415/1416/1425
44 BP DMC-1400 Series Command Reference
Page 53
BS
FUNCTION: Brushless Setup
DESCRIPTION:
The command BS tests the wiring of a sinusoidally commutated brushless motor. If no Hall
sensors are connected, the function tests the wiring of the DAC's. If Hall sensors are connected, the function also tests the wiring of the Hall sensors. The first parameter indicates the voltage level to be applied to each phase, and the second parameter indicates the duration in milliseconds that the voltage will be applied.
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: BSX= V, n or BS V, n where
V is a real number between 0 and 10, and n is a positive integer between 100 or 1000.
USAGE:
While Moving No Default Value of V 0
In a Program Yes Default Value of n 200
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
DMC-1412/1415/1410/1417
EXAMPLES:
BS 2,900 Apply set up test to Z axis with 2 volts for 900 millisecond on each step.
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
DMC-1400 Series Command Reference BS ● 45
Page 54
BV
FUNCTION: Burn Variables and Array
DESCRIPTION:
The BV command saves the defined 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 variables is complete. Operand returns size of installed EEPROM.
ARGUMENTS: None
USAGE:
While Moving No Default Value ---
In a Program No
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
Note1: This command will store the ECAM table values in non-volatile EEPROM memory.
Note2: 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. Th is 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.
DMC-1412/1414/1415/1416/1425
46 BV DMC-1400 Series Command Reference
Page 55
BZ
FUNCTION: Brushless Zero
DESCRIPTION:
The BZ command is when the controller is 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 x where
x is a real number between -9.998 and 9.998.
The parameter x sets the voltage to be applied to the amplifier during the initialization. In
order to be accurate, the BZ command must be large enough to move the motor. When the argument is positive, the process ends up in MO state. A negative value causes the process to end up in the SH state.
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:
While Moving No Default Value 0
In a Program Yes Default Format 0
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
DMC-1412/1415/1410/1417
OPERAND USAGE:
_BZ contains the distance in encoder counts from the motor's current position and the position
of commutation zero. This can useful to command a motor to move to the commutation zero position for phase initialization.
EXAMPLES:
BZ -3
RELATED COMMANDS:
BA Brushless Axis
BB Brushless Phase Begins
BC Brushless Commutation
BD Brushless Degrees
Drive the motor to zero phase position with 3 volts signal, and end up in SH state.
DMC-1400 Series Command Reference BZ ● 47
Page 56
CB
FUNCTION: Clear Bit
DESCRIPTION:
The CB command clears one of three bits on the output port sets the output to logic 0. The CB and SB (Set Bit) instructions can be used to control the state of output lines.
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. A standard DMC-1400 controller has 3 TTL digital outputs.
Note: When using Modbus devices (DMC-1415/1416/1425 only), the I/O points of the Modbus devices are calculated using the following formula:
n = (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.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
RELATED COMMANDS:
SB Set Bit
OP Define all outputs
EXAMPLES:
CB 1 Clear output bit 1
CB 2 Clear output bit 2
CB 3 Clear output bit 3
48 CB DMC-1400 Series Command Reference
Page 57
CC
FUNCTION: Configure Communications Port 2
DESCRIPTION::
The CC command configures baud rate, handshake, echo, and daisy chain features 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 300,1200,4800,9600,19200,38400
n - Handshake 0 for handshake off, 1 for handshake on
r - Mode 0 for daisy chain off, 1 for daisy chain on
p - Echo 0 for echo off, 1 for echo on
Note: echo only active when daisy chain feature is off
USAGE:
While Moving Yes Default Value 0,0,0
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated Yes
Used as an Operand No
Controller Usage
DMC-1412/1414
RELATED COMMANDS:
CI Communications Interrupt
EXAMPLES:
CC 9600,0,0,1 9600 baud, no handshake, daisy chain off, echo on.
Typical setting with TERM-1500.
CC 19200,1,1,0 19,200 baud, handshake on, daisy chain on, echo off.
Typical setting in daisy chain mode.
DMC-1400 Series Command Reference CC ● 49
Page 58
CD
FUNCTION: Contour Data
DESCRIPTION:
The CD command specifies the incremental position. The units of the command are in
quadrature counts for servo mode, steps for stepper mode. This command is used only in the Contour Mode (CM).
ARGUMENTS: CD n where
n is an integer in the range of +/-32762
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
CM Contour Mode
WC Wait for Contour
DT Time Increment
ALL
EXAMPLES:
CM Specify Contour Mode
DT 4 Specify time increment for contour
CD 200 Specify incremental positions of 200 counts
WC Wait for complete
CD 100 New position data
WC Wait for complete
DT0 Stop Contour
CD 0 Exit Mode
50 CD DMC-1400 Series Command Reference
Page 59
CE
FUNCTION: Configure Encoder
DESCRIPTION:
The CE command configures the encoder inputs to the quadrature type or the pulse and
direction type. It also allows inverting the polarity of the encoders. The configuration applies independently to the main axis encoder and the auxiliary encoder inputs.
ARGUMENTS: CE n where
n is an integer in the range of 0 to 15. Each integer is the sum of two integers r and s which
configure the main and the auxiliary encoders. The values of r and s are
R = MAIN ENCODER TYPE S = 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 = 6 implies r = 2 and s = 4, both encoders are reversed quadrature.
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 2.0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_CE contains the value of encoder type for the main and auxiliary encoder.
RELATED COMMMANDS:
MT Specify motor type
EXAMPLES:
CE 0 Configure encoders
CE ? Interrogate configuration
V = _CE Assign configuration to a variable
Note 1: When using pulse and direction encoders, the pulse signal is connected to CHA and the direction signal is connected to CHB.
Note 2: when the controller is a DMC-1425, the y-axis encoder is still considered the x-axis auxiliary encoder for the sake of the CE command.
DMC-1400 Series Command Reference CE ● 51
Page 60
CF
FUNCTION: Configure
DESCRIPTION:
The CF command is used to specify the communication port to which unsolicited responses are sent. By default, the DMC-1415/1416/1425 will send unsolicited responses to the serial port.
ARGUMENTS: CF n where n is A thru F for Ethernet handles 1 thru 6, S for Main serial port.
USAGE:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Controller Usage
OPERAND USAGE:
_CF will return the current port selected for unsolicited responses from the controller. The _CF will return a decimal value.
EXAMPLES:
CFA Select Ethernet handle A to return unsolicited responses.
MG_CF Interrogate configuration
:65.000
DMC-1415/1416/1425
Response from CF showing handle A as default port. The number 65 is the decimal representation for the ASCII character “A”
52 CF DMC-1400 Series Command Reference
Page 61
CI
FUNCTION: Communication Interrupt
DESCRIPTION:
The CI command configures a program interrupt based on characters received on either Port
1, the MAIN serial port, or Port 2, the AUX serial port. An interrupt causes program flow to jump to the #COMINT subroutine label. If multiple program threads are used, the #COMINT subroutine runs in thread 0 and thread 1 continues to run in the background without interruption. The characters received on the serial port are stored in internal variables such as P2CH. See chapter 7 for more detailed information on the communications interrupt.
ARGUMENTS: CI m,n,o
PARAMETER EXPLANATION
m = 0 Do not interrupt Port 1
m = 1 Interrupt on carriage return character on Port 1
m = 2 Interrupt on any character Port 1
m = -1 Clear interrupt data buffer
n = 0 Do not interrupt Port 2
n = 1 Interrupt on carriage return character on Port 2
n = 2 Interrupt on any character Port 2
n = -1 Clear interrupt data buffer
o = 0 Disable live data mode for Port 1
o = 1 Enable live data mode for Port 1
USAGE:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Can be Interrogated No
Used as an Operand No
Controller Usage
EXAMPLES:
CI 0,1,0 Interrupt on <enter> received on Port 2
CI 0,2,0 Interrupt on a single character received on Port 2
CI 1,2,1
NOTE: The third field of the CI command enables or disables live data mode on Port 1. If live data mode
is enabled, then the controller will not respond to commands sent to the main serial port. This setting is necessary to use the communications interrupt on the main serial port.
DMC-1400 Series Command Reference CI ● 53
DMC-1412/1414
Interrupt on <enter> received on Port 1, interrupt on any character received on Port 2
Page 62
CM
FUNCTION: Contouring Mode
DESCRIPTION:
The Contour Mode is initiated by the instruction CM. This mode allows the generation of an arbitrary motion trajectory. The CD command specifies the position increment, and the DT command specifies the time interval.
The CM? or _CM commands can be used to check the status of the Contour Buffer. A value of 1 returned indicates that the Contour Buffer is full. A value of 0 indicates that the Contour Buffer is empty.
ARGUMENTS: CM
CM? Returns a 1 if the contour buffer is full and 0 if the contour buffer is empty.
USAGE:
While Moving No Default Value ---
In a Program No Default Format 1.0
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_CM contains a ‘0’ if the contour buffer is empty, otherwise contains a ‘1’
RELATED COMMANDS:
CD Contour Data
WC Wait for Contour
DT Time Increment
EXAMPLES:
V=_CM;V= Return Contour Buffer Status
1 Contour Buffer is full
CM Specify Contour Mode
54 CM DMC-1400 Series Command Reference
Page 63

#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 routine
EXAMPLES:
#BEGIN ;'Begin main program
IN “ENTER SPEED”,Speed ;'Prompt for speed
JG 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 routine
NOTE: An application program must be executing for the automatic subroutine to fun c tion, which runs in thread 0
.
NOTE: Use EN to end the routine.
ALL
DMC-1400 Series Command Reference #CMDERR ● 55
Page 64
CN
FUNCTION: Configure
DESCRIPTION:
The CN command configures the polarity of the limit switches, the home switch and the latch
input.
ARGUMENTS: CN m,n,o where
m,n,o are integers with values 1 or -1.
m = 1 Limit switches active high
-1 Limit switches active low
n = 1 Home switch configured to drive motor in
-1 Home switch configured to drive motor in
o = 1 Latch input is active high
-1 Latch input is active low
USAGE:
While Moving Yes Default Value -1.-1.-1
In a Program Yes Default Format 2.0
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
ALL
forward direction when input is high. See HM and FE commands
reverse direction when input is high. See HM and FE commands
RELATED COMMANDS:
MT Motor Type
EXAMPLES:
CN 1,1 Sets limit and home switches to active high
CN,, -1 Sets input latch active low
56 CN DMC-1400 Series Command Reference
Page 65
CO
FUNCTION: Configure Outputs
DESCRIPTION:
The CO command configures the extended I/O in blocks of 8.
ARGUMENTS: CO n where
n is a decimal value which represents a binary number. Each bit of the binary number
represents one block of extended I/O. When set to 1, the corresponding block is configured as an output.
The least significant bit represents block 2 and the most significant bit represents block 9.
The decimal value can be calculated by the following formula. n = n
+16* n6 +32* n7 +64* n8 +128* n9 where nx represents the block. To configure a
8*n
5
block as an output block, substitute a one into that n zero, then the block of 8 I/O points will be configured as an input. For example, if block 3 and 4 is to be configured as an output, CO 6 is issued.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
DMC-1415/1416/1425
in the formula. If the nx value is a
x
+ 2*n3 + 4*n4 +
2
OPERAND USAGE:
_CO returns output configuration value
RELATED COMMANDS:
CB Clear Output Bit
SB Set Output Bit
OP Set Output Port
TI Tell Inputs
EXAMPLES:
CO 0 Configure all points as inputs
CO 1 Configures block 1 to outputs on extended I/O
Hint: See appendix for more information on the extended I/O bo ar ds.
DMC-1400 Series Command Reference CO ● 57
Page 66

@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.
The integer is interpreted as a 32-bit field.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
& | Logical operators AND and OR
EXAMPLES:
:MG {$8.0} @COM[0] $FFFFFFFF :MG {$8.0} @COM[$FFFFFFFF] $00000000
:
ALL
58 @COM[n] DMC-1400 Series Command Reference
Page 67

#COMINT

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. CI,1 must be issued to use #COMINT.
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
RELATED COMMANDS:
P1CD P2CD Serial port 1/2 code
P1CH P2CH Serial port 1/2 character
P1NM P2NM Serial port 1/2 number
P1ST P2ST Serial port 1/2 string
CI Configure #COMINT (and set operator data entry mode)
CC Configure serial port 2
EN End subroutine
DMC-1412 / 4 ONLY
EXAMPLES:
CC9600,0,0,0
CI2 ;'interrupt on any character
#Loop
MG "Loop" ;'print a message every second
WT 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 fun c tion, which runs in thread 0.
NOTE: Use EN to end the routine
DMC-1400 Series Command Reference #COMINT ● 59
Page 68

@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 -2147483648 to 2147483647.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
RELATED COMMANDS:
@ASIN Arc sine
@SIN sine
@ATAN Arc tangent
@ACOS Arc cosine
@TAN 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
60 @COS[n] DMC-1400 Series Command Reference
Page 69
CR
FUNCTION: Circle
DESCRIPTION:
The CR command specifies a 2-dimensional arc segment of radius, r, starting at angle, θ, and traversing over angle 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, θ, quadrature counts. θ 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 12,000,000 for servo motor operation and between 0 and 3,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
θ. A positive θ denotes counterclockwise traverse, negative θ
θ have units of degrees. The parameter n is optional and
θ, must be specified. Radius units are in
USAGE:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL
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:
VMXY Specify vector motion in the X and Y plane
VS 10000 Specify vector speed
CR 1000,0,360
CR 1000,0,360 < 40000
VE End Sequence
BGS Start motion
Generate circle with radius of 1000 counts, start at 0 degrees and complete
Generate circle with radius of 1000 counts, start at 0 degrees and complete
DMC-1400 Series Command Reference CR ● 61
Page 70
CS
FUNCTION: Clear Sequence
DESCRIPTION:
The CS command will remove VP, CR or LI commands stored in a motion sequence for the
coordinate system. 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.
USAGE:
While Moving No Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Controller Usage
OPERAND USAGE:
_CSx contains the segment number in the sequence specified by x, 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
62 CS DMC-1400 Series Command Reference
Page 71
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 Servo Design Kit 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.
ARGUMENTS: CW n,m where
n is a number, either 0,1 or 2:
0 Causes the controller to return the copyright information
1 Causes the controller to set the MSB of unsolicited returned characters to 1
2 Causes the controller to not set the MSB of unsolicited characters.
“?” returns the copyright information for the controller
m is 0 or 1 (optional)
0 Causes the controller to pause program execution when output FIFO is full
until FIFO no longer full.
1 Causes the controller to continue program execution when output FIFO is
full - output characters after FIFO is full will be lost.
USAGE:
While Moving Yes* Default Value
In a Program Yes Default Format
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_CW contains the value of the data adjustment bit. 1 =on, 2 = off
*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.
*Note 2: The CW, 1 Command should not be used with the DMC-1415 or DMC-1425. These controllers have only a 1 byte UART and are subsequently always seen as full.
*Note 3: Specifying both fields of the CW command is not valid. If CW, 2,1 is issued, for instance, the controller will not recognize the second field. Instead, the user must issue CW2 & CW,1 individually.
DMC-1400 Series Command Reference CW ● 63
Page 72
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 commas when specified in one command. The * argument deallocates all the variables, and *[0] deallocates all the arrays.
ARGUMENTS: DA c[0],d,etc. where
c[0] - Defined array name
d - Defined variable name
* - Deallocates all the variables
*[0] - Deallocates all the arrays
DA? Returns the number of arrays available on the controller.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_DA contains the total number of arrays available. For example, on a DMC-1417, before any arrays have been defined, the operand _DA is 7. If one array is defined, the operand _DA will return 6.
RELATED COMMANDS:
DM Dimension Array
EXAMPLES:
‘Cars’ and ‘Salesmen’ are arrays and ‘Total’ is a variable.
DM Cars[400],Salesmen[50] Dimension 2 arrays
Total=70 Assign 70 to the variable Total
DA Cars[0],Salesmen[0],Total Deallocate the 2 arrays & variables
DA*[0] Deallocate all arrays
DA *,*[0] Deallocate all variables and all arrays
NOTE: Since this command deallocates the spaces and compacts the array spaces in the memory, it is possible that execution of this command may take longer time than 2 ms.
64 DA DMC-1400 Series Command Reference
Page 73
DC
FUNCTION: Deceleration
DESCRIPTION:
The Deceleration command (DC) sets the linear deceleration rate 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 where
n is an unsigned numbers in the range 1024 to 67107840
“?” returns the value
USAGE:
While Moving Yes* Default Value 256000
In a Program Yes Default Format 8.0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_DCx contains the deceleration rate
RELATED COMMANDS:
AC Acceleration
PR Position Relative
SP Speed
JG Jog
BG Begin
IT Smoothing constant - S-curve
ALL
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-1400 Series Command Reference DC ● 65
Page 74
DE
FUNCTION: Dual (Auxiliary) Encoder Position
DESCRIPTION:
The DE n command defines the position of the auxiliary encoder.
The DE n command defines the encoder position when used with stepper motors.
Note: The auxiliary encoder is not available for the stepper axis.
ARGUMENTS: DE n where
n is a signed integer in the range -2147483648 to 2147483647 decimal
“?” returns the position of the auxiliary encoder
“?” returns the commanded reference position of the motor (in step pulses) when used with a
stepper motor. Example: DE0. 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:
While Moving Yes Default Value 0
In a Program Yes Default Format Position Format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_DE contains the current position of the specified auxiliary encoder.
EXAMPLES:
:DE 0 Set the current auxiliary encoder position to 0
:DE? Return auxiliary encoder positions
:DUALX=_DE Assign auxiliary encoder position of X-axis to the variable DUALX
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 tru e load position. Any error in load position is used to correct the motor position.
66 DE DMC-1400 Series Command Reference
Page 75
DL
FUNCTION: Download
DESCRIPTION:
The DL command transfers a data file from the host computer to the DMC-14XX.
Instructions in the file will be accepted as a datastream 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 any programs in the DMC-
14XX RAM. The data is entered beginning at line 0. If there are too many lines or too many characters per line, the DMC-14XX 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 DMC-14XX program in RAM.
ARGUMENTS: DL n
n = no argument Downloads program beginning at line 0. Erases programs in RAM.
n = #Label Begins download at line following #Label where label may be any
valid program label.
n = # Begins download at end of program in RAM.
USAGE:
While Moving Yes Default Value ---
In a Program No Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
When used as an operand, _DL gives the number of available labels. The total number of
labels is 126.
RELATED COMMANDS:
UL Upload
EXAMPLES:
DL; Begin download
#A;PR 4000;BG Data
AM;MG DONE Data
EN Data
<control> Z End download
DMC-1400 Series Command Reference DL ● 67
Page 76
DM
FUNCTION: Dimension
DESCRIPTION:
The DM command defines a single dimensional array with a name and n total elements. 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 alphanumeric characters, starting with an uppercase alphabetic
character. n is the number of entries from 1 to 1000 (1 to 2000 for the DMC­1415/1416/1425).
DM? Returns the number of array elements available.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_DM contains the available array space. For example, on a DMC-1417, before any arrays
have been defined, the operand _DM will return 1000. If an array of 100 elements is defined, the operand _DM will return 900.
ALL
RELATED COMMANDS:
DA Deallocate Array
EXAMPLES:
DM Pets[5],Dogs[2],Cats[3]
DM Tests[1000] Define dimension of array Tests with 1000 elements
Define dimension of arrays, pets with 5 elements; Dogs with 2 elements; Cats with 3 elements
68 DM DMC-1400 Series Command Reference
Page 77
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 in stepper mode. The units are in
steps. Example: DP0. This will set the DE value to zero, but will not effect the TP value.
ARGUMENTS: DP n where
n is a signed integer in the range -2147483648 to 2147483647 decimal
“?” returns the current position of the motor
USAGE:
While Moving No Default Value 0
In a Program Yes Default Format Position Format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_DP contains the current position.
EXAMPLES:
:DP 0 Sets the current position of the X-axis to 0
:DP –50000 Sets the current position to -50000.
:DP ?
-0050000 Returns the motor position
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.
DMC-1400 Series Command Reference DP ● 69
Page 78
DT
FUNCTION: Delta Time
DESCRIPTION:
The DT command sets the time interval for Contouring Mode. Sending the DT command
once will set the time interval for all following contour data until a new DT command is
sent. 2n samples is the time interval. Sending DT0 followed by CD0 command terminates the Contour Mode.
ARGUMENTS: DT n where
n is an integer in the range 0 to 8. 0 terminates the Contour Mode. n=1 thru 8 specifies the
time interval of 2n samples. By default the sample period is 1 msec (set by TM command); with n=1, the time interval would be 2 msec.
DT? Returns the value for the time interval for contour mode.
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
ALL
_DT contains the value for the time interval for Contour Mode
RELATED COMMANDS:
CM Contour Mode
CD Contour Data
WC Wait for next data
TM Time
EXAMPLES:
DT 4 Specifies time interval to be 16 msec
DT 7 Specifies time interval to be 128 msec
#CONTOUR Begin
CM Enter Contour Mode
DT 4 Set time interval
CD 1000 Specify data
WC Wait for contour
CD 2000 New data
WC Wait
DT0 Stop contour
CD0 Exit Contour Mode
EN End
70 DT DMC-1400 Series Command Reference
Page 79
DV
FUNCTION: Dual Velocity (Dual Loop)
DESCRIPTION:
The DV function changes the operation of the PID servo filter. It causes the KD (derivative)
term to operate on the dual encoder instead of the main encoder. To take advantage of this mode, mount the main encoder to the load and the dual encoder to the motor.
ARGUMENTS: DVn where
n may be 0 or 1. 0 disables the function. 1 enables the dual loop.
“?” returns a 0 if dual velocity mode is disabled and 1 if enabled for the specified axis.
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 1.0
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_DV contains the state of dual velocity mode. 0 = disabled, 1 = enabled
RELATED COMMANDS:
KD Damping constant
FV Velocity feedforward
ALL
EXAMPLES:
DV 1 Enables dual loop
DV 0 Disables DV
HINT: The DV command is useful in backlash and resonance compensation.
DMC-1400 Series Command Reference DV ● 71
Page 80
EA
FUNCTION: Choose ECAM master
DESCRIPTION:
The EA command selects the master axis for the electronic cam mode. Any axis may be
chosen. Note: This command is only used with the DMC-1425. All other Econo series controllers use the auxiliary encoder as the master automatically.
ARGUMENTS: EA x where
x is one of the axis specified as X or Y.
USAGE:
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
DMC-1425
EXAMPLES:
EAY Select Y as a master for ECAM
72 EA DMC-1400 Series Command Reference
Page 81
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 cam mode and n = 0 stops cam mode.
EB? Returns a 0 if ECAM is disabled and 1 if enable.
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_EB contains the state of Ecam mode. 0 = disabled, 1 = enabled
ALL
RELATED COMMANDS:
EM Specify Ecam Cycle
EP CAM table intervals & starting point
EXAMPLES:
EB1 Starts ECAM mode
EB0 Stops ECAM mode
B = _EB Assigns status of cam mode to variable “B”
DMC-1400 Series Command Reference EB ● 73
Page 82
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:
While Moving Yes Default Value
In a Program Yes Default Format
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
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
74 EC DMC-1400 Series Command Reference
Page 83
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.
ARGUMENTS: ED n where
n specifies the line number to begin editing. The default line number is the last line of
program space with commands.
USAGE:
While Moving No Default Value
In a Program No Default Format
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_ED contains the line number of the last line to have an error
EXAMPLES:
000 #START
001 PR 2000
002 BG
003 SLKJ Bad line
004 EN
005 #CMDERR Routine which occurs upon a command error
006 V=_ED
007 MG "An error has occurred" {n}
008 MG "In line", V{F3.0}
009 ST
010 ZS0
011 EN
HINT: Remember to quit the Edit Mode prior to executing or listing a program.
DMC-1400 Series Command Reference ED ● 75
Page 84
EG
FUNCTION: ECAM go (engage)
DESCRIPTION:
The EG command engages an ECAM operation at a specified position of the master encoder.
If a value is specified outside of the master’s range, the slave will engage immediately. Once a slave motor is engaged, its position is redefined to fit within the cycle.
ARGUMENTS: EG n where
n is the master position at which the slave axis must be engaged.
“?” returns 1 if specified axis is engaged and 0 if disengaged
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_EG contains ECAM status . 0 = axis is not engaged, 1 = axis is engaged.
ALL
RELATED COMMANDS:
EB Enable Ecam
EQ Ecam quit
EXAMPLES:
EG 700 Engages axes at master position 700.
MG_EG Return the status of the axis, 1 if engaged
NOTE:
execution needs to be held until master position is reached, use MF or MR command
This command is not a trippoint. This command will not hold the execution of the program flow. If the
.
76 EG DMC-1400 Series Command Reference
Page 85
EI
FUNCTION: Enable Interrupts
DESCRIPTION:
The EI command enables an ISA, PC/104 or PCI bus interrupt on conditions such as motion
complete or excess positional error. The conditions are selected by the parameter m where m is the bit mask for the selected conditions as shown below. Prior to using the EI command, one IRQ line must be jumpered on the DMC-141X. An interrupt service routine must also be incorporated in your host program. See Chapter 4 in the product manual for details.
ARGUMENTS: EI n where
n is interrupt condition for bits set. n = ΣBit number (2m) Condition
Bit Number (m) Condition
15 Reserved
14 Reserved
13 Application Program stopped
12 Reserved
11 Watchdog Timer
10 Limit switch
9 Excess Position error*
8 Motion complete
7 reserved
6 Input 7*
5 Input 6*
4 Input 5*
3 Input 4*
2 Input 3*
1 Input 2*
0 Input 1*
The * conditions must be re-enabled after each occurrence.
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
DMC-1410/1411/1417
RELATED COMMANDS:
UI User interrupt
EXAMPLES:
1. Specify interrupts for motion complete and limit switch.
Enable bits 8 and 10. n = 210 + 28 = 1024 + 256 = 1280 EI 1280
2. Specify interrupts on Inputs 2 and 4.
1
Enable bits 1 and 3. n = 2
DMC-1400 Series Command Reference EI 77
+ 23 = 2 + 8 = 10 EI 10
Page 86
ELSE
FUNCTION: Else function for use with IF conditional statement
DESCRIPTION:
The ELSE command is an optional part of an IF conditional statement. The ELSE command
must occur after an IF command and it has no arguments. It allows for the execution of a command only when the argument of the IF command evaluates False. If the argument of the IF command evaluates false, the controller will skip commands until the ELSE command. If the argument for the IF command evaluates true, the controller will execute the commands between the IF and ELSE command.
ARGUMENTS: ELSE
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line No
Controller Usage
RELATED COMMANDS:
ENDIF End of IF conditional Statement
EXAMPLES:
IF (@IN[1]=0) IF conditional statement based on input 1
IF (@IN[2]=0)
MG "INPUT 1 AND INPUT 2 ARE ACTIVE"
ELSE
MG "ONLY INPUT 1 IS ACTIVE
ENDIF End of 2
ELSE ELSE command for 1
MG"ONLY INPUT 2 IS ACTIVE"
ENDIF End of 1
DMC-1415/1416/1425
nd
2
IF conditional statement executed if 1st IF
conditional true
Message to be executed if 2 true
ELSE command for 2 statement
Message to be executed if 2 false
nd
conditional statement
Message to be executed if 1 statement
st
conditional statement
nd
IF conditional is
nd
IF conditional
nd
IF conditional is
st
IF conditional statement
st
IF conditional
78 ELSE DMC-1400 Series Command Reference
Page 87
EM
FUNCTION: Cam cycles
DESCRIPTION:
The EM command is part of the ECAM mode. It is used to define the change in position over
one complete cycle of the master. The field for the master axis is the cycle of the master position. For the slave, the field defines the net change in one cycle. If a slave will return to its original position at the end of the cycle, the change is zero. If the change is negative, specify the absolute value.
ARGUMENTS: EM n,m where
n - change in slave axis, between 1 and 2147483647
m - change in master encoder, between 1 and 8388607.
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line Yes
Can be Interrogated No
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_EM contains the cam cycle modulus of the motor..
ALL
RELATED COMMANDS:
EP CAM table intervals & starting point
ET Electronic CAM table
EB Enable Ecam
EXAMPLES:
EM 0,2000 Define the changes in the motor to be 0. Define master cycle as 2000.
V = _EM Assigns motor cam cycle distance to variable “V”
DMC-1400 Series Command Reference EM ● 79
Page 88
EN
FUNCTION: End
DESCRIPTION:
The EN command is used to designate the end of a program or subroutine. If a subroutine
was called by the JS command, the EN command ends the subroutine and returns program flow to the point just after the JS command.
The EN command is also used to end the automatic subroutines #MCTIME, #CMDERR, and
#COMINT. When the EN command is used to terminate the #COMINT communications interrupt subroutine, there are two arguments; the first determines whether trippoints will be restored upon completion of the subroutine and the second determines whether the communication interrupt will be re-enabled.
ARGUMENTS: EN m, n
m=0 Return from subroutines without restoring trippoint
m=1 Return from #COMINT and restore trippoint
n=0 Return from #COMINT without restoring interrupt
n=1 Return from #COMINT and restore interrupt
Note 1: The default values for the arguments are 0. For example EN,1 and EN0,1 have the
same effect.
Note 2: Trippoints cause a program to wait for a particular event. The AM command, for
example, waits for motion on all axes to complete. If the #COMINT subroutine is executed due to a communication interrupt while the program is waiting for a trippoint, the #COMINT can end by continuing to wait for the trippoint as if nothing happened, or clear the trippoint and continue executing the program at the command just after the trippoint. The EN arguments will specify how the #COMINT routine handles trippoints.
Note 3: Use the RE command to return from the interrupt handling subroutines #LIMSWI
and #POSERR. Use the RI command to return from the #ININT subroutine.
USAGE:
While Moving Yes Default Value n=0, m=0
In a Program Yes Default Format
Command Line No
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
RE Return from error subroutine
RI Return from interrupt subroutine
ALL
80 EN DMC-1400 Series Command Reference
Page 89
EXAMPLES:
#A Program A
PR 500 Move X axis forward 500 counts
BGX Pause the program until the X axis completes the motion
AMX Move X axis forward 1000 counts
PR 1000 Set another Position Relative move
BGX Begin motion
EN End of Program
Note: Instead of EN, use the RE command to end the error subroutine and limit subroutine. Use the RI command to end the input interrupt (ININT) subroutine.
DMC-1400 Series Command Reference EN ● 81
Page 90
ENDIF
FUNCTION: End of IF conditional statement
DESCRIPTION:
The ENDIF command is used to designate the end of an IF conditional statement. An IF
conditional statement is formed by the combination of an IF and ENDIF command. An ENDIF command must always be executed for every IF command that has been executed. It is recommended that the user not include jump commands inside IF conditional statements since this causes re-direction of command execution. In this case, the command interpreter may not execute an ENDIF command.
ARGUMENTS: ENDIF
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line No
Controller Usage
RELATED COMMANDS:
ELSE Optional command to be used only after IF command
JP Jump command
JS Jump to subroutine command
EXAMPLES:
IF (@IN[1]=0) IF conditional statement based on input 1
MG " INPUT 1 IS ACTIVE” Message to be executed if “IF” conditional is false
ENDIF End of conditional statement
DMC-1415/1416/1425
82 ENDIF DMC-1400 Series Command Reference
Page 91
EO
FUNCTION: Echo
DESCRIPTION:
The EO command turns the echo on or off. If the echo is off, characters input over the bus
will not be echoed back.
ARGUMENTS: EO n where
n=0 or 1. 0 turns echo off, 1 turns echo on.
USAGE:
While Moving Yes Default Value (DMC-1410/1411/1417) 0
In a Program Yes Default Value (All others) 1.0
Command Line Yes Default Format 1.0
Can be Interrogated No
Used as an Operand No
Controller Usage
EXAMPLES:
EO 0 Turns echo off
EO 1 Turns echo on
ALL
DMC-1400 Series Command Reference EO ● 83
Page 92
EP
FUNCTION: Cam table master interval and phase shift
DESCRIPTION:
The EP command defines the ECAM table master interval and phase shift. The interval m is
the difference in master position between table entries. The phase shift n instantaneously moves the graph of slave position versus master position left (negative) or right (positive) and is used to make on-the-fly corrections to the slaves. Up to 257 points may be specified.
ARGUMENTS: EP m,n where
m is the master interval and is a positive integer in the range between 1 and 32,767 master
counts. m cannot be changed while ECAM is running.
M = ? Returns the value of the interval m.
n is the phase shift and is an integer between -2,147,483,648 and 2,147,483,647 master
counts. m can be changed while ECAM is running.
USAGE:
While Moving Yes Default Value 256,0
In a Program Yes Default Format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes (m only)
Controller Usage
ALL
OPERAND USAGE:
_EP contains the value of the interval m.
RELATED COMMANDS:
EB Enable Ecam
EG Engage Ecam
EM Specify Ecam Cycle
EQ Ecam quit
ET Electronic CAM table
EXAMPLES:
EP 20 Sets the cam master points to 0,20,40 . . .
D =_EP Set the variable D equal to the ECAM internal master interval
EP,100 Phase shift all slaves by 100 master counts
84 EP DMC-1400 Series Command Reference
Page 93
EQ
FUNCTION: ECAM quit (disengage)
DESCRIPTION:
The EQ command disengages an electronic cam slave axis at the specified master position. If
a value is specified outside of the master’s range, the slave will disengage immediately.
ARGUMENTS: EQ n where
n is the master position at which the axis is to be disengaged.
“?” contains a 1 if engage command issued and slave is waiting to engage, 2 if disengage
command issued and slave is waiting to disengage, and 0 if ECAM engaged or disengaged.
USAGE:
While Moving Yes Default Value --
In a Program Yes Default Format --
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
ALL
_EQ contains 1 if engage command issued and slave is waiting to engage, 2 if disengage
command issued and slave is waiting to disengage, and 0 if ECAM engaged or disengaged.
RELATED COMMANDS:
EB Enable Ecam
EG Engage Ecam
EM Specify Ecam Cycle
EP CAM table intervals & starting point
ET Electronic CAM table
EXAMPLES:
EQ 300 Disengages the motor at master position 300.
NOTE: This command is not a trippoint. This command will not hold the execution of the program flow. If the execution needs to be held until master position is reached, use MF or MR command.
DMC-1400 Series Command Reference EQ ● 85
Page 94
ER
FUNCTION: Error Limit
DESCRIPTION:
The ER command sets the magnitude of the position error that will trigger an error condition.
When the limit is exceeded, the Error output will go low (true). If the Off-On-Error (OE1) command is active, the motors will be disabled. The units of ER are quadrature counts.
ARGUMENTS: ER n where
n is an unsigned number in the range 1 to 32767.
“?” returns the value of the Error limit.
USAGE:
While Moving Yes Default Value 16384
In a Program Yes Default Format Position Format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
OPERAND USAGE:
_ER contains the value of the Error limit.
ALL
RELATED COMMANDS:
#POSERR Automatic Error Subroutine
EXAMPLES:
ER 200 Set the error limit to 200
ER ? Return value
00200
V1=_ER Assigns V1 value of ER
V1= Returns V1
00200
HINT: The error limit specified by ER should be high enough as not to be reached during normal operation. Examples of exceeding the error limit would be a mechanical jam, or a fault in a system component such as encoder or amplifier.
86 ER DMC-1400 Series Command Reference
Page 95
ES
FUNCTION: Ellipse Scale
DESCRIPTION:
The ES command divides the resolution of one of the axes in a vector mode (VM). This
function allows for the generation of circular motion when encoder resolutions differ. It also allows for the generation of an ellipse instead of a circle.
The command has two parameters, m and n. The arguments, m and n apply to the axes
designated by the command VM. When m>n, the resolution of the first axis, x, will be divided by the ratio m/n. When m<n, the resolution of the second axis, y, will be divided by n/m. The resolution change applies for the purpose of generating the VP and CR commands, effectively changing the axis with the higher resolution to match the coarser resolution.
ARGUMENTS: ES m,n where
m and n are positive integers in the range between 1 and 65,535.
USAGE:
While Moving Yes Default Value 1,1
In a Program Yes Default Format
Command Line Yes
Controller Usage
RELATED COMMANDS:
VM Vector Mode
CR Circle move
VP Vector position
ALL
EXAMPLES:
VMXY;ES3,4 Divide Y resolution by 4/3
NOTE: ES must be issued after VM command
DMC-1400 Series Command Reference ES ● 87
Page 96
ET
FUNCTION: Electronic cam table
DESCRIPTION:
The ET command sets the ECAM table entries for the slave axis. The values of the master are
not required. The slave entry (n) is the position of the slave when the master is at the point (n i) + o, where i is the interval and o is the offset as determined by the EP command.
ARGUMENTS: ET [n] = m where
n is an integer between 0 and 256
m is an integer in the range between -2,147,438,648, and 2,147,438,647
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
EB Enable Ecam
EG Engage Ecam
EM Specify Ecam Cycle
EP Specify Ecam intervals and starting point
EQ Ecam quit
ALL
EXAMPLES:
ET [7] = 1000
Specifies the position of the slave that must be synchronized with the eighth increment of the master.
88 ET DMC-1400 Series Command Reference
Page 97
FA
FUNCTION: Acceleration Feedforward
DESCRIPTION:
The FA command sets the acceleration feedforward coefficient, or returns the previously set
value. This coefficient, when scaled by the acceleration, adds a torque bias voltage during the acceleration phase and subtracts the bias during the deceleration phase of a motion.
Acceleration Feedforward Bias = FA AC 1.5 10-7
Deceleration Feedforward Bias = FA DC 1.5 10-7
The Feedforward Bias product is limited to 10 Volts. FA will only be operational during
independent moves.
ARGUMENTS: FA n where
n is an unsigned number in the range 0 to 8191 decimal
“?” returns the value of the feedforward acceleration coefficient.
FA has a resolution of .25
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 4.0
Command Line Yes
Can be Interrogated Yes FA ?
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_FA contains the value of the feedforward acceleration coefficient.
RELATED COMMANDS:
FV Velocity feedforward
EXAMPLES:
AC 500000 Set feedforward coefficient to 10.
FA 10 The effective bias will be 0.75V
FA ? Return value
010
NOTE: If the feedforward coefficient is changed during a move, then the change will not take effect until the next move.
DMC-1400 Series Command Reference FA ● 89
Page 98
FE
FUNCTION: Find Edge
DESCRIPTION:
The FE command moves a motor until a transition is seen on the homing input for that axis.
The direction of motion depends on the initial state of the homing input (use the CN command to configure the polarity of the home input). Once the transition is detected, the motor decelerates to a stop.
This command is useful for creating your own homing sequences.
ARGUMENTS: FE
USAGE:
While Moving No Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
FI Find Index
HM Home
BG Begin
AC Acceleration Rate
DC Deceleration Rate
SP Speed for search
ALL
EXAMPLES:
FE Set find edge mode
BG Begin
HINT: Find Edge only searches for a change in state on the Home Input. Use FI (Find Index) to search for the encoder index. Use HM (Home) to search for both the Home input and the Index. Remember to specify BG after each of these commands.
90 FE DMC-1400 Series Command Reference
Page 99
FI
FUNCTION: Find Index
DESCRIPTION:
The FI and BG commands move the motor until an encoder index pulse is detected. The
controller looks for a transition from low to high. When the transition is detected, motion stops and the position is defined as zero. To improve accuracy, the speed during the search should be specified as 500 counts/s or less. The FI command is useful in custom homing sequences. The direction of motion is specified by the sign of the JG command.
ARGUMENTS: FI
USAGE:
While Moving No Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated No
Used as an Operand No
Controller Usage
RELATED COMMANDS:
FE Find Edge
HM Home
BG Begin
AC Acceleration Rate
DC Deceleration Rate
SP Speed for search
ALL
EXAMPLES:
#HOME Home Routine
JG 500 Set speed and forward direction
FI Find index
BG Begin motion
AM After motion
MG "FOUND INDEX"
HINT: Find Index only searches for a change in state on the Index. Use FE to search for the Home. Use HM (Home) to search for both the Home input and the Index. Remember to specify BG after each of these commands.
DMC-1400 Series Command Reference FI ● 91
Page 100
FL
FUNCTION: Forward Software Limit
DESCRIPTION:
The FL command sets the forward software position limit. If this limit is exceeded during
motion, the motor will decelerate to a stop. Forward motion beyond this limit is not permitted. The forward limit is activated at position n + 1. The forward limit is disabled at position 2147483647. The units are in counts.
When the forward software limit is activated, the automatic subroutine #LIMSWI will be
executed if it is included in the program and the program is executing. See section on Automatic Subroutines in the user manual.
ARGUMENTS: FL n where
n is a signed integer in the range -2147483648 to 2147483647
2147483647 turns off the forward limit
“?” returns the value of the forward limit switch
USAGE:
While Moving Yes Default Value 2147483647
In a Program Yes Default Format Position Format
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage
ALL
OPERAND USAGE:
_FL contains the value of the forward software limit.
RELATED COMMANDS:
BL Reverse Limit
_LF Forward Limit Operand
PF Position Formatting
EXAMPLES:
FL 150000 Set forward limit to 150000 counts on the X-axis
#TEST Test Program
AC 1000000 Acceleration Rate
DC 1000000 Deceleration Rate
FL 15000 Forward Limit
JG 5000 Jog Forward
BGX Begin
AMX After Limit
TPX Tell Position
EN End
HINT: The DMC-141X also provides hardware limits.
92 FL DMC-1400 Series Command Reference
Loading...