Galil DMC-1400 User Manual

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
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

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
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
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
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
@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

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

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
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
#
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
$
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
& |
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
( )
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
;
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
[ ]
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

+ - * /

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

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

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
=
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
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

@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
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

@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
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
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
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
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
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

@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
Loading...
+ 205 hidden pages