Advertisement

DMC-40x0
COMMAND
REFERENCE
Manual Rev. 1.0e
By Galil Motion Control, Inc.
Galil Motion Control, Inc.
270 Technology Way
Rocklin, California 95765
Phone: (916) 626-0101
Fax: (916) 626-0102
Internet Address: support@galilmc.com
URL: www.galilmc.com
Rev 2/08

Advertisement

Table of Contents
loading

Summary of Contents for Galil Motion Control DMC-40x0 Series

  • Page 1 DMC-40x0 COMMAND REFERENCE Manual Rev. 1.0e By Galil Motion Control, Inc. Galil Motion Control, Inc. 270 Technology Way Rocklin, California 95765 Phone: (916) 626-0101 Fax: (916) 626-0102 Internet Address: support@galilmc.com URL: www.galilmc.com Rev 2/08...
  • Page 3 ARRAYS CONTROL FEEDBACK MATH PROGRAM STEPPER @ABS[n] deallocate dual loop analog feedback breakpoint smoothing @ACOS[n] arrays left accel feedfwd arm latch arccos download low current @ASIN[n] define speed feedfwd latch occurred? arcsin labels left motor type @ATAN[n] space left integrator limit configure arctan edit...
  • Page 5: Table Of Contents

    Table of Contents Table of Contents..................................i Overview.....................................1 Controller Notation .................................1 Servo and Stepper Motor Notation:............................1 Trippoints ....................................1 Command Descriptions ................................2 Parameter Arguments ................................2 Direct Command Arguments ...............................3 Interrogation ..................................3 Operand Usage ..................................3 Usage Description................................3 Default Description................................4 Resetting the Controller to Factory Default.........................4 # ......................................5 $ ......................................6 &...
  • Page 6 AU .....................................36 #AUTO ....................................37 #AUTOERR ..................................38 AV .....................................39 AW ....................................40 BA .....................................41 BB......................................42 BC......................................43 BD .....................................44 BG .....................................45 BI .......................................46 BK .....................................47 BL ......................................48 BM.....................................49 BN .....................................50 BO .....................................51 BP ......................................52 BR......................................53 BS ......................................54 BV .....................................55 BW.....................................56 BZ ......................................57 CA .....................................58 CB......................................59 CC......................................60 CD .....................................61...
  • Page 7 EM .....................................95 EN......................................96 ENDIF ....................................97 EO......................................98 EP ......................................99 EQ....................................100 ER ....................................101 ES ....................................102 ET ....................................103 EW....................................104 EY....................................105 FA ....................................106 FE ....................................107 FI ..................................... 108 FL ....................................109 @FRAC[n] ..................................110 FV ....................................111 GA ....................................
  • Page 8 LM ....................................154 _LR ....................................155 LS ....................................156 LU....................................157 LV....................................158 LZ ....................................159 MB....................................160 MC....................................162 #MCTIME ..................................163 MF ....................................164 MG....................................165 MO....................................166 MR....................................167 MT ....................................168 MW....................................169 NB ....................................170 NF ....................................
  • Page 9 <control>R<control>V ..............................211 SA ....................................212 SB ....................................213 SC ....................................214 SD ....................................215 SH ....................................216 @SIN[n] ..................................217 SL ....................................218 SM ....................................219 SP..................................... 220 @SQR[n] ..................................221 ST ....................................222 TA....................................223 @TAN[n]..................................224 TB ....................................225 TC ....................................
  • Page 10 This Page is Left Blank Intentionally Table of Contents DMC-40x0 Command Reference...
  • Page 11: Overview

    Overview Controller Notation This command reference is a supplement to the Galil User Manual. For proper controller operation, consult the Users Manual. This command reference describes commands for Galil Accelera Series Motion Controller: DMC-40x0. Commands are listed in alphabetical order. Please note that all commands may not be valid for every controller.
  • Page 12: Command Descriptions

    As a brief introduction, the following table lists the available commands and their basic usages: after distance after input after move after absolute position after relative position at speed at time relative to a reference time after vector distance motion complete and “in position” after motion forward after motion reverse wait for time...
  • Page 13: Direct Command Arguments

    value. Values may be specified for any axis separately or any combination of axes. The argument for each axis is separated by commas. Examples of valid syntax are listed below. Valid syntax AC n Specify argument for A axis only AC n,n Specify argument for A and B only AC n,,n...
  • Page 14: Default Description

    Describes whether the command is valid while the controller is performing a motion. "In a program": Describes whether the command may be used as part of a user-defined program. "Command Line": Describes whether the command may be used as a direct command. “Controller Usage”: Identifies the controller models that can accept the command.
  • Page 15 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.
  • Page 16 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...
  • Page 17 & | 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.
  • Page 18: A, ^B, ^C, ^D, ^E, ^F, ^G, ^H

    ^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h FUNCTION: JS subroutine stack variable DESCRIPTION: Provides local subroutine access for up to 8 variables passed on the subroutine stack when using the JS (jump to subroutine) command. Passing values on the stack is advanced DMC programming, and is recommended for experienced DMC programmers familiar with the concept of passing arguments by value and by reference.
  • Page 19 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.
  • Page 20 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.
  • Page 21 FUNCTION: Square Brackets (Array Index Operator) DESCRIPTION: The square brackets are used to denote the array index for an array, or to denote an array name. (They are also used to designate the argument to a function, such as @ABS[n].) ARGUMENTS: mmmmmmmm[n] where mmmmmmmm is the array name n is the array index and is an integer between 0 and 15999...
  • Page 22 + - * / % FUNCTION: Math Operators DESCRIPTION: The addition, subtraction, multiplication, division, and modulus operators are binary operators (they take two arguments and return one value) used to perform mathematical operations on variables, constants, and operands. ARGUMENTS: (n + m) or (n – m) or (n * m) or (n / m) or (n % m) where n and m are signed numbers in the range -2147483648 to 2147483647 USAGE: DEFAULTS:...
  • Page 23 <, >, =, <=, >=, <> 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.
  • Page 24 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.
  • Page 25 FUNCTION: Variable Axis Designator DESCRIPTION: The ~ signifies a variable axis designator ARGUMENTS: ~n=m n is a lowercase letter a through h m is a positive integer 0 through 11, where 0 or “A” (quotes required) = X axis 1 or “B” = Y axis 2 or “C”...
  • Page 26 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).
  • Page 27: Abs[N]

    @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...
  • Page 28 FUNCTION: Acceleration DESCRIPTION: The Acceleration (AC) command sets the linear acceleration rate of the motors for independent moves, such as PR, PA and JG moves. The acceleration rate may be changed during motion. The DC command is used to specify the deceleration rate. ARGUMENTS: AC n,n,n,n,n,n,n,n or ACA=n where...
  • Page 29: Acos[N]

    @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 Default Value In a Program Default Format Command Line Controller Usage RELATED COMMANDS:...
  • Page 30 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.
  • Page 31 FUNCTION: Analog Feedback DESCRIPTION: The Analog Feedback (AF) command is used to set an axis with analog feedback instead of digital feedback (quadrature/pulse + dir). The analog feedback is decoded by a 12-bit A/D converter. An option is available for 16-bits. The position and analog range is set using the AQ command.
  • Page 32 FUNCTION: Amplifier Gain DESCRIPTION: The AG command sets the amplifier current/voltage gain for the AMP-430x0. 0 sets the lowest ratio or value while 2 sets the highest ratio. AG is stored in EEPROM by the BN command. The MT command must be issued prior to the AG command to set the proper range. The axis must be in the motor off state (MO) before new AG settings will take effect.
  • Page 33 FUNCTION: After Input DESCRIPTION: The AI command is a trippoint used in motion programs to wait until after a specified input has changed state. This command can be configured such that the controller will wait until the input goes high or the input goes low. ARGUMENTS: AI +/-n where n is an integer between 1 and 96 and represents the input number.
  • Page 34 FUNCTION: Arm Latch DESCRIPTION: The AL command enables the latching function (high speed main or auxiliary position capture) of the controller. When the position latch is armed, the main or auxiliary encoder position will be captured upon a low going signal. Each axis has a position latch and can be activated through the general inputs: A axis latch Input 1...
  • Page 35 FUNCTION: After Move DESCRIPTION: The AM command is a trippoint used to control the timing of events. This command will hold up execution of the following commands until the current move on the specified axis or axes is completed. Any combination of axes or a motion sequence may be specified with the AM command.
  • Page 36: Amperr

    #AMPERR FUNCTION: Amplifier error automatic subroutine DESCRIPTION: #AMPERR is used to run code when a fault occurs on a Galil amplifier. See the TA command and individual amplifier information in the DMC-40x0 User Manual. USAGE: While Moving In a Program Command Line Controller Usage RELATED COMMANDS:...
  • Page 37: An[N]

    @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 Default Value In a Program Default Format Command Line Controller Usage RELATED COMMANDS:...
  • Page 38 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.
  • Page 39 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.
  • Page 40 FUNCTION: Analog Configuration DESCRIPTION: The Analog Configuration (AQ) command is used to set the range of the analog inputs. There are 4 different ranges that each analog input may be assigned. Setting a negative range for inputs 1,3,5 or 7, configures those inputs as the differential input relative to input 2,4,6 and 8 respectively.
  • Page 41 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.
  • Page 42 FUNCTION: At Speed DESCRIPTION: The AS command is a trippoint that occurs when the generated motion profile has reached the specified speed. This command will hold up execution of the following command until the commanded speed has been reached. The AS command will operate after either accelerating or decelerating.
  • Page 43: Asin[N]

    @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 Default Value In a Program Default Format Command Line Controller Usage RELATED COMMANDS:...
  • Page 44 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.
  • Page 45: Atan[N]

    @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 Default Value In a Program Default Format Command Line Controller Usage RELATED COMMANDS: @ASIN[n]...
  • Page 46 FUNCTION: Set amplifier current loop DESCRIPTION: The AU command sets the amplifier current loop gain for the AMP-430x0. Current loop is available in one of two settings (0 is normal while 1 sets a higher current loop) Values stored in EEPROM by the BN command. ARGUMENTS: AU n where for normal current loop gain = 0.5...
  • Page 47: Auto

    #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.
  • Page 48: Autoerr

    #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.
  • Page 49 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.
  • Page 50 FUNCTION: Amplifier Bandwidth DESCRIPTION: The AW command accepts the drive voltage (volts) and motor inductance (millihenries) and uses the current loop gain setting (AU) as the default and then reports the calculated bandwidth. The user can check how the amplifier bandwidth is affected by changing the n parameter. The AU command uses the transfer function for the AMP-430x0 for the calculation of the bandwidth.
  • Page 51 FUNCTION: Brushless Axis DESCRIPTION: The BA command configures the controller axes for sinusoidal commutation and reconfigures the controller to reflect the actual number of motors that can be controlled. Each sinusoidal commutation axis requires 2 motor command signals. The second motor command signals will always be associated with the highest axes on the controller.
  • Page 52 FUNCTION: Brushless Phase Begins DESCRIPTION: The BB function describes the position offset between the Hall transition point and θ = 0, for a sinusoidally commutated motor. This command must be saved in non-volatile memory to be effective upon reset. ARGUMENTS: BB n,n,n,n,n,n,n BBA=n where n is a signed integer which represent the phase offset of the selected axes, expressed in multiples...
  • Page 53 FUNCTION: Brushless Calibration DESCRIPTION: The function BC monitors the status of the Hall sensors of a sinusoidally commutated motor, and resets the commutation phase upon detecting the first hall sensor. This procedure replaces the estimated commutation phase value with a more precise value determined by the hall sensors.
  • Page 54 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.
  • Page 55 FUNCTION: Begin DESCRIPTION: The BG command starts a motion on the specified axis or sequence. ARGUMENTS: BG nnnnnnnnnn where n is A,B,C,D,E,F,G,H,S,T, M or N, or any combination to specify the axis or sequence USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line...
  • Page 56 FUNCTION: Brushless Inputs DESCRIPTION: The command BI is used to define the inputs which are used when Hall sensors have been wired for sinusoidally commutated motors. These inputs can be the general use inputs (bits 1-8), the auxiliary encoder inputs (bits 81-96), or the extended I/O inputs (bits 17-48). The Hall sensors of each axis must be connected to consecutive input lines, for example: BI 3 indicates that inputs 3,4 and 5 are used for halls sensors.
  • Page 57 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.
  • Page 58 FUNCTION: Reverse Software Limit DESCRIPTION: The BL command sets the reverse software limit. If this limit is exceeded during motion, motion on that axis will decelerate to a stop. Reverse motion beyond this limit is not permitted. When the reverse software limit is activated, the automatic subroutine #LIMSWI will be executed if it is included in the program.
  • Page 59 FUNCTION: Brushless Modulo DESCRIPTION: The BM command defines the length of the magnetic cycle in encoder counts. ARGUMENTS: BM n,n,n,n,n,n,n,n BMA=n where n is a decimal value between 1 and 1000000 with a resolution of 1/10. This value can also be specified as a fraction with a resolution of 1/16.
  • Page 60 FUNCTION: Burn DESCRIPTION: The BN command saves controller parameters shown below in Flash EEPROM memory. This command typically takes 1 second to execute and must not be interrupted. The controller returns a : when the Burn is complete. PARAMETERS SAVED DURING BURN: USAGE: DEFAULTS: While Moving...
  • Page 61 FUNCTION: Brushless Offset DESCRIPTION: The BO command sets a fixed offset on command signal outputs for sinusoidally commutated motors. This may be used to offset any bias in the amplifier, or can be used for phase initialization. ARGUMENTS: BO n,n,n,n,n,n,n BOA=n where n specifies the voltage n is a signed number in the range -9.998 to +9.998 with a resolution of...
  • Page 62 FUNCTION: Burn Program DESCRIPTION: The BP command saves the application program in non-volatile EEPROM memory. This command typically takes up to 10 seconds to execute and must not be interrupted. The controller returns a : when the Burn is complete. ARGUMENTS: None USAGE: DEFAULTS:...
  • Page 63 FUNCTION: Brush Axis DESCRIPTION: The BR command is used in conjunction with an AMP-430x0 to enable which axis will be set as brush-type servo. The hall error bits are not set in the TA value when an axis is configured as brush-type.
  • Page 64 FUNCTION: Brushless Setup DESCRIPTION: The command BS tests the wiring of a sinusoidally commutated brushless motor. If Hall sensors are connected, this command also tests the wiring of the Hall sensors. This function can only be performed with one axis at a time. This command returns status information regarding the setup of brushless motors.
  • Page 65 FUNCTION: Burn Variables & Arrays DESCRIPTION:: The BV command saves the controller variables and arrays in non-volatile EEPROM memory. This command typically takes up to 2 seconds to execute and must not be interrupted. The controller returns a : when the Burn is complete. ARGUMENTS: None USAGE: DEFAULTS:...
  • Page 66 FUNCTION: Brake Wait DESCRIPTION: The BW command sets the delay between when the brake is turned on and when the amp is turned off. When the controller goes into a motor-off (MO) state, this is the time (in samples) between when the brake digital output changes state and when the amp enable digital output changes state.
  • Page 67 FUNCTION: Brushless Zero DESCRIPTION: The BZ command is used for axes which are configured for sinusoidal commutation. This command drives the motor to zero magnetic phase and then sets the commutation phase to zero. This command may be given when the motor is off. ARGUMENTS: BZ n,n,n,n,n,n,n or BZA =n BZ <t...
  • Page 68 FUNCTION: Coordinate Axes DESCRIPTION: The CA command specifies the coordinate system to apply proceeding vector commands. The following commands apply to the active coordinate system as set by the CA command: ARGUMENTS: CAS where CAS specifies that proceeding vector commands shall apply to the S coordinate system CAT specifies that proceeding vector commands shall apply to the T coordinate system CA ? returns a 0 if the S coordinate system is active and a 1 if the T coordinate system is active.
  • Page 69 FUNCTION: Clear Bit DESCRIPTION: The CB command sets the specified output bit low. CB can be used to clear the outputs of extended I/O which have been configured as outputs. ARGUMENTS: CB n where n is an integer corresponding to a specific output on the controller to be cleared (set to 0). The first output on the controller is denoted as output 1.
  • Page 70 FUNCTION: Configure Communications Port 2 DESCRIPTION: The CC command configures baud rate, handshake, mode, and echo for the AUX SERIAL PORT, referred to as Port 2. This command must be given before using the MG, IN, or CI commands with Port 2. ARGUMENTS: CC m,n,r,p m - Baud rate 9600,19200, 38400, or 115200...
  • Page 71 FUNCTION: Contour Data DESCRIPTION: The CD command specifies the incremental position on contour axes. The units of the command are in encoder counts. This command is used only in the Contour Mode (CM). The incremental position will be executed over the time period specified by the command DT (ranging from 2 to 256 servo updates) or by the = operand.
  • Page 72 100,100,100 ;'New position data 0,0,0 =-1 ;'Pause countour buffer set DT to resume 100,100,100 ;'New position data 100,100,100 ;'New position data 0,0,0,0=0 ;'End of Contour Buffer/Sequence #Wait;JP#Wait,_CM<>511 ;'Wait until path is done 62 ● CD DMC-40x0 Command Reference...
  • Page 73 FUNCTION: Configure Encoder DESCRIPTION: The CE command configures the encoder to the quadrature type or the pulse and direction type. It also allows inverting the polarity of the encoders which reverses the direction of the feedback. Note: when using a servo motor, the motor will run away. The configuration applies independently to the main axes encoders and the auxiliary encoders.
  • Page 74 FUNCTION: Configure DESCRIPTION: Sets the default port for unsolicited messages. By default, the DMC-40x0 will send unsolicited responses to the main RS-232 serial port. The CF command allows the user to send unsolicited responses to the Main or Aux Serial Port, or Handles A-H. ARGUMENTS: CF n where n is A thru H for Ethernet handles 1 thru 8, S for Main serial port, T for Aux serial port or I is to...
  • Page 75 FUNCTION: Configure Communication Interrupt DESCRIPTION: The CI command configures a program interrupt based on characters received on communications port 2, the AUX serial port. An interrupt causes program flow to jump to the #COMINT subroutine. If multiple program threads are used, the #COMINT subroutine runs in thread 0 and the remaining threads continue to run without interruption.
  • Page 76 FUNCTION: Contour Mode DESCRIPTION: The Contour Mode is initiated by the instruction CM. This mode allows the generation of an arbitrary motion trajectory with any of the axes. The CD command specified the position increment, and the DT command specifies the time interval. The command, CM?, can be used to check the number of available contour segments.
  • Page 77: Cmderr

    #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 In a Program...
  • Page 78 FUNCTION: Configure DESCRIPTION: The CN command configures the polarity of the limit switches, home switches, latch inputs and the selective abort function. ARGUMENTS: CN m,n,o,p,q where m,n,o are integers with values 1 or -1. p is an integer, 0 or 1. Limit switches active high Limit switches active low Home switch configured to drive motor in...
  • Page 79 FUNCTION: Configure Extended I/O DESCRIPTION: The CO command configures which points are inputs and which are outputs on the extended I/O. The 32 extended I/O points of the controller can be configured in banks of 8. The extended I/O is denoted as bits 17-48 and banks 2-5.
  • Page 80: Com[N]

    @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 Default Value In a Program Default Format...
  • Page 81: Comint

    #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. USAGE: While Moving In a Program Command Line Controller Usage RELATED COMMANDS: P2CD...
  • Page 82: Cos[N]

    @COS[n] FUNCTION: Cosine DESCRIPTION: Returns the cosine of the given angle in degrees ARGUMENTS: @COS[n] where n is a signed number in degrees in the range of -32768 to 32767, with a fractional resolution of 16- bit.. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format...
  • Page 83 FUNCTION: Circle DESCRIPTION: The CR command specifies a 2-dimensional arc segment of radius, r, starting at angle, θ, and traversing over angle Δθ. A positive Δθ denotes counterclockwise traverse, negative Δθ denotes clockwise. The VE command must be used to denote the end of the motion sequence after all CR and VP segments are specified.
  • Page 84 FUNCTION: Clear Sequence DESCRIPTION: The CS command will remove VP, CR or LI commands stored in a motion sequence for the S or T coordinate systems. After a sequence has been executed, the CS command is not necessary to put in a new sequence. This command is useful when you have incorrectly specified VP, CR or LI commands.
  • Page 85 FUNCTION: Copyright information / Data Adjustment bit on/off DESCRIPTION: The CW command has a dual usage. The CW command will return the copyright information when the argument, n is 0. Otherwise, the CW command is used as a communications enhancement for use by the Galil PC software. When turned on, the communication enhancement sets the MSB of unsolicited, returned ASCII characters to 1.
  • Page 86 FUNCTION: Deallocate the Variables & Arrays DESCRIPTION: The DA command frees the array and/or variable memory space. In this command, more than one array or variable can be specified for memory de-allocation. Different arrays and variables are separated by comma when specified in one command. The argument * deallocates all the variables, and *[0] deallocates all the arrays.
  • Page 87 FUNCTION: Deceleration DESCRIPTION: The Deceleration command (DC) sets the linear deceleration rate of the motors for independent moves such as PR, PA and JG moves. The parameters will be rounded down to the nearest factor of 1024 and have units of counts per second squared. ARGUMENTS: DC n,n,n,n,n,n,n,n DCA=n where...
  • Page 88 FUNCTION: Dual (Auxiliary) Encoder Position DESCRIPTION: The DE command defines the position of the auxiliary encoders. The DE command defines the encoder position when used with stepper motors. Note: The auxiliary encoders are not available for the stepper axis or for any axis where output compare is active.
  • Page 89 FUNCTION: DHCP Enable DESCRIPTION: The DH command configures the DHCP or BOOT-P functionality on the controller for Server IP addressing. ARGUMENTS: DH n where n = 0 disables DHCP and enables BOOT-P n = 1 disables BOOT-P and enables DHCP n = ? returns the current state of the setting USAGE: DEFAULTS:...
  • Page 90 FUNCTION: Download DESCRIPTION: The DL command transfers a data file from the host computer to the controller. Instructions in the file will be accepted as a data stream without line numbers. The file is terminated using <control> Z, <control> Q, <control> D, or \. DO NOT insert spaces before each command. If no parameter is specified, downloading a data file will clear all programs in the controllers RAM.
  • Page 91 FUNCTION: Dimension DESCRIPTION: The DM command defines a single dimensional array with a name and the number of elements in the array. The first element of the defined array starts with element number 0 and the last element is at n-1. ARGUMENTS: DM c[n] where c is a name of up to eight characters, starting with an alphabetic character.
  • Page 92 FUNCTION: Define Position DESCRIPTION: The DP command sets the current motor position and current command positions to a user specified value. The units are in quadrature counts. This command will set both the TP and RP values. The DP command sets the commanded reference position for axes configured as steppers. The units are in steps.
  • Page 93 FUNCTION: Configures Axes and I/O Data Record Update Rate DESCRIPTION: The controller creates a QR record and sends it periodically to a UDP Ethernet Handle ARGUMENTS: DR n, m n specifies the data update rate in samples between updates. When TM is set to the default of 1000, n specifies the data update rate in milliseconds.
  • Page 94 FUNCTION: Delta Time DESCRIPTION: The DT command sets the time interval for Contour Mode. Sending the DT command once will set the time interval for all contour data until a new DT command (or CDm=n) is sent. ARGUMENTS: DT n where n is an integer in the range 0 to 8.
  • Page 95 400,200 ;'Countour Data pre-loaded in buffer 200,100 ;'Countour Data pre-loaded in buffer 300,50 ;'Countour Data pre-loaded in buffer ;'Wait for Analog input 1 to go low ;'Set positive DT to start contour mode 0,0,0,0=0 ;'End of Contour Buffer/Sequence #Wait;JP#Wait,_CM<>511 ;'Wait until path is done ;'End program DMC-40x0 Command Reference DT •...
  • Page 96 FUNCTION: Dual Velocity (Dual Loop) DESCRIPTION: The DV function changes the operation of the filter. It causes the KD (derivative) term to operate on the dual encoder instead of the main encoder. This results in improved stability in the cases where there is a backlash between the motor and the main encoder, and where the dual encoder is mounted on the motor.
  • Page 97 FUNCTION: Choose ECAM master DESCRIPTION: The EA command selects the master axis for the electronic cam mode. Any axis may be chosen. ARGUMENTS: EA n where n is one of the axis specified as A,B,C,D,E,F,G, H, M or N USAGE: DEFAULTS: While Moving Default Value...
  • Page 98 FUNCTION: Enable ECAM DESCRIPTION: The EB function enables or disables the cam mode. In this mode, the starting position of the master axis is specified within the cycle. When the EB command is given, the master axis is modularized. ARGUMENTS: EB n where n = 1 Starts ECAM mode...
  • Page 99 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.
  • Page 100 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...
  • Page 101 FUNCTION: ECAM go (engage) DESCRIPTION: The EG command engages an ECAM slave axis at a specified position of the master. 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,n,n,n,n,n,n,n EGA=n where...
  • Page 102 FUNCTION: UDP Event “Interrupts” DESCRIPTION: EI enables UDP interrupts for the predefined event conditions in the table below. When a condition (e.g. Axis A profiled motion complete) occurs after EI is armed, a status byte value (e.g. $D0 or 208) is delivered to the host PC inside a UDP packet. GalilTools version 1.2.1.0 or newer required for software support.
  • Page 103 n is an 8-bit integer mask between 0 and 255 and is used to select the specific digital input(s) if bit 15 of m is set (indicating that digital inputs are to be used for interrupting). n = 2^bit status byte Condition $01 (1) $E1 (225)
  • Page 104: Else

    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.
  • Page 105 FUNCTION: Cam cycles (modulus) 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 slaves, the field defines the net change in one cycle.
  • Page 106 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. A return parameter can be specified to EN from a subroutine to return a value from the subroutine to the calling stack.
  • Page 107: Endif

    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.
  • Page 108 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 0 turns echo off n = 1 1 turns echo on.
  • Page 109 FUNCTION: Cam table intervals and starting point DESCRIPTION: The EP command defines the ECAM table intervals and offset. The offset is the master position of the first ECAM table entry. The interval is the difference of the master position between 2 consecutive table entries.
  • Page 110 FUNCTION: ECAM quit (disengage) DESCRIPTION: The EQ command disengages an electronic cam slave axis at the specified master position. Separate points can be specified for each axis. If a value is specified outside of the master’s range, the slave will disengage immediately. ARGUMENTS: EQ n,n,n,n,n,n,n,n EQA=n where...
  • Page 111 FUNCTION: Error Limit DESCRIPTION: The ER command sets the magnitude of the position errors for each axis that will trigger an error condition. When the limit is exceeded, the Error output will go low (true) and the controller’s red light will be turned on. If the Off On Error (OE1) command is active, the motors will be disabled.
  • Page 112 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.
  • Page 113 FUNCTION: Electronic cam table DESCRIPTION: The ET command sets the ECAM table entries for the slave axes. The values of the master axes are not required. The slave entry (n) is the position of the slave axes when the master is at the point (m ∗...
  • Page 114 FUNCTION: ECAM Widen Segment DESCRIPTION: The EW command allows widening the length of one or two ECAM segments beyond the width specified by EP. For ECAM tables with one or two long linear sections, this allows placing more points in the curved sections of the table. There are only two widened segments, and if used they are common for all ECAM axes.
  • Page 115 FUNCTION: ECAM Cycle Count DESCRIPTION: Sets or gets the ECAM cycle count. This is the number of times that the ECAM axes have exceeded their modulus as defined by the EM command. EY will increment by one each time the master exceeds its modulus in the positive direction, and EY will decrement by one each time the master exceeds its modulus in the negative direction.
  • Page 116 FUNCTION: Acceleration Feedforward DESCRIPTION: The FA command sets the acceleration feedforward coefficient. 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 ⋅...
  • Page 117 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).
  • Page 118 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. There are 2 stages to the FI command. The first stage jogs the motor at the speed and direction of the JG command until a transition is detected on the index line.
  • Page 119 FUNCTION: Forward Software Limit DESCRIPTION: The FL command sets the forward software position limit. If this limit is exceeded during motion, motion on that axis will decelerate to a stop. Forward motion beyond this limit is not permitted. The forward limit is activated at A+1, B+1, C+1, D+1. The forward limit is disabled at 2147483647.
  • Page 120: Frac[N]

    @FRAC[n] FUNCTION: Fractional part DESCRIPTION: Returns the fractional part of the given number ARGUMENTS: @FRAC[n] n is a signed number in the range -2147483648 to 2147483647. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage RELATED COMMANDS: @INT[n] Integer part...
  • Page 121 FUNCTION: Velocity Feedforward DESCRIPTION: The FV command sets the velocity feedforward coefficient, or returns the previously set value. This coefficient generates an output bias signal in proportions to the commanded velocity. Velocity feedforward bias = 1.22 ⋅ 10 -6 ⋅ FV ⋅ Velocity [in cts/s]. FV operates when commanding motion with PA, PR, JG, VM, LM, and CM.
  • Page 122 FUNCTION: Master Axis for Gearing DESCRIPTION: The GA command specifies the master axes for electronic gearing. Multiple masters for gearing may be specified. The masters may be the main encoder input, auxiliary encoder input, or the commanded position of any axis. The master may also be the commanded vector move in a coordinated motion of LM or VM type.
  • Page 123 FUNCTION: Gear Distance DESCRIPTION: The GD command sets the distance of the master axis over which the specified slave will be engaged, disengaged or changed to a new gear setting. The distance is entered as an absolute value, the motion of the master may be in either direction. If the distance is set to 0, then the gearing will engage instantly.
  • Page 124 FUNCTION: Gantry mode DESCRIPTION: The GM command specifies the axes in which the gearing function is performed in the Gantry mode. In this mode, the gearing will not be stopped by the ST command or by limit switches. Only GR0 will stop the gearing in this mode. ARGUMENTS: GM n,n,n,n,n,n,n,n GMA=n where...
  • Page 125 FUNCTION: Gearing Phase Differential Operand DESCRIPTION: The _GP operand contains the value of the “phase differential” accumulated on the most current change in the gearing ratio between the master and the slave axes. The value does not update if the distance over which the slave will engage is set to 0 with the GD command. The operand is specified as: _GPn where n is the specified slave axis Phase Differential is a term that is used to describe the lead or lag between the master axis and the slave axis due to gradual gear shift.
  • Page 126 FUNCTION: Gear Ratio DESCRIPTION: GR specifies the Gear Ratios for the geared axes in the electronic gearing mode. The master axis is defined by the GA command. The gear ratio may be different for each geared axis. The master can go in both directions. A gear ratio of 0 disables gearing for each axis. A limit switch also disables the gearing unless gantry mode has been enabled (see GM command).
  • Page 127 FUNCTION: Home DESCRIPTION: The HM command performs a three-stage homing sequence for servo systems and two stage sequence for stepper motor operation. For servo motor operation: During first stage of the homing sequence, the motor moves at the user programmed speed until detecting a transition on the homing input for that axis. The direction for this first stage is determined by the initial state of the homing input.
  • Page 128 FUNCTION: Handle Assignment Switch DESCRIPTION: The HS command is used to switch the handle assignments between two handles. The controller assigns handles when the handles are opened with the HC command, or are assigned explicitly with the IH command. Should those assignments need modifications, the HS command allows the handles to be reassigned.
  • Page 129 FUNCTION: Homing Velocity DESCRIPTION: Sets the slew speed for the FI final move to the index and all but the first stage of HM. ARGUMENTS: HV n,n,n,n,n,n,n,n HVA=n where n is an unsigned even number in the range 2 to 22,000,000 for servo motors. The units are encoder counts per second.
  • Page 130 FUNCTION: Halt Execution DESCRIPTION: The HX command halts the execution of any program that is running. ARGUMENTS: HXn where n is an integer in the range of 0 to 7 and indicates the thread number. USAGE: DEFAULTS: While Moving Default Value n = 0 In a Program Default Format...
  • Page 131 FUNCTION: IP Address DESCRIPTION: The IA command assigns the controller with an IP address. The IA command may also be used to specify the time out value. This is only applicable when using the TCP/IP protocol. The IA command can only be used via RS-232. Since it assigns an IP address to the controller, communication with the controller via internet cannot be accomplished until after the address has been assigned.
  • Page 132 FUNCTION: Identify DESCRIPTION: The ID command is used to query the controller for the accessories that are attached. It will respond with the type of communications board followed by the amplifier for axes 1-4 and then axes 5-8 if any are attached. ARGUMENTS: None USAGE: DEFAULTS:...
  • Page 133 FUNCTION: IF conditional statement DESCRIPTION: The IF command is used in conjunction with an ENDIF command to form an IF conditional statement. The arguments consist of one or more conditional statements and each condition must be enclosed with parenthesis (). If the conditional statement(s) evaluates true, the command interpreter will continue executing commands which follow the IF command.
  • Page 134 FUNCTION: Open Internet Handle DESCRIPTION: The IH command is used when the controller is operated as a master (also known as a client). This command opens a handle and connects to a slave. Each controller may have 8 handles open at any given time. They are designated by the letters A through H.
  • Page 135 _IHh3 contains a 0 if the ARP was successful contains a 1 if it has failed or is still in progress _IHh4 contains a 1 if the master controller is waiting for acknowledgment from the slave after issuing a command. contains a 2 if the master controller received a colon from the slave after issuing a command.
  • Page 136 FUNCTION: Input Interrupt DESCRIPTION: The II command enables the interrupt function for the specified inputs. By default, input interrupts are configured for activation with a logic “0” but can be configured for activation with a logic “1” signal. If any of the specified inputs are activated during program execution, the program will jump to the subroutine with label #ININT.
  • Page 137 STA;MG "INTERRUPT";AMA ;'Stop A, print message, wait for motion to ;'complete #CLEAR;JP#CLEAR,@IN[1]=0 ;'Check for interrupt clear ;'Begin motion ;'Return to main program, don't re-enable ;'trippoints DMC-40x0 Command Reference II • 127...
  • Page 138 FUNCTION: Block Ethernet ports DESCRIPTION: The IK command blocks the controller from receiving packets on Ethernet ports lower than 1000 except for ports 0, 23, 68, and 502. ARGUMENTS: IKn where n = 0 allows controller to receive Ethernet packets on any port n = 1 blocks controller from receiving Ethernet packets on all ports lower than 1000 except for 0, 23, 68, and 502.
  • Page 139 FUNCTION: Integrator Limit DESCRIPTION: The IL command limits the effect of the integrator function in the filter to a certain voltage. For example, IL 2 limits the output of the integrator of the A-axis to the +/-2 Volt range. A negative parameter also freezes the effect of the integrator during the move. For example, IL -3 limits the integrator output to +/-3V.
  • Page 140 FUNCTION: Input Variable DESCRIPTION: The IN command allows a variable to be input from a keyboard. When the IN command is executed in a program, the prompt message is displayed. The operator then enters the variable value followed by a carriage return. The entered value is assigned to the specified variable name.
  • Page 141: In[N]

    @IN[n] FUNCTION: Read digital input DESCRIPTION: Returns the value of the given digital input (either 0 or 1) ARGUMENTS: @IN[n] where n is an unsigned integer in the range 1 to 96 USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage...
  • Page 142: Inint

    #ININT FUNCTION: Input interrupt automatic subroutine DESCRIPTION: #ININT runs upon a state transition of digital inputs 1 to 8 and is configured with II. #ININT runs in thread 0. USAGE: While Moving In a Program Command Line Controller Usage RELATED COMMANDS: Input interrupt @IN[n] Read digital input...
  • Page 143: Int[N]

    @INT[n] FUNCTION: Integer part DESCRIPTION: Returns the integer part of the given number. Note that the modulus operator can be implemented with @INT (see example below). ARGUMENTS: @INT[n] n is a signed number in the range -2147483648 to 2147483647. USAGE: DEFAULTS: While Moving Default Value...
  • Page 144 FUNCTION: Increment Position DESCRIPTION: The IP command allows for a change in the command position while the motor is moving. This command does not require a BG. The command has three effects depending on the motion being executed. The units of this are quadrature. Case 1: Motor is standing still An IP a,b,c,d command is equivalent to a PR a,b,c,d and BG command.
  • Page 145 FUNCTION: Independent Time Constant - Smoothing Function DESCRIPTION: The IT command filters the acceleration and deceleration functions of independent moves such as JG, PR, PA to produce a smooth velocity profile. The resulting profile, known as smoothing, has continuous acceleration and results in reduced mechanical vibrations. IT sets the bandwidth of the filter where 1 means no filtering and 0.004 means maximum filtering.
  • Page 146 FUNCTION: Jog DESCRIPTION: The JG command sets the jog mode and the jog slew speed of the axes. ARGUMENTS: JG n,n,n,n,n,n,n,n JGA=n where n is a signed numbers in the range 0 to +/-22,000,000 decimal. The units of this are counts/second.
  • Page 147 FUNCTION: Jump to Program Location DESCRIPTION: The JP command causes a jump to a program location on a specified condition. The program location may be any program line number or label. The condition is a conditional statement which uses a logical operator such as equal to or less than. A jump is taken if the specified condition is true.
  • Page 148 FUNCTION: Jump to Subroutine, push onto stack DESCRIPTION: The JS command will change the sequential order of execution of commands in a program. If the jump is taken, program execution will continue at the line specified by the destination parameter, which can be either a line number or label. The line number of the JS command is saved and after the next EN command is encountered (End of subroutine), program execution will continue with the instruction following the JS command.
  • Page 149 Variables may be passed by value or by reference. If passed by value, a copy is made in the subroutine stack, leaving the original variable unchangeable. If passed by reference, the original variable’s value will be changed when the subroutine writes to its local variable. This is similar, but not exactly analogous, to a C pointer.
  • Page 150 FUNCTION: Derivative Constant DESCRIPTION: KD designates the derivative constant in the control filter. The filter transfer function is D(z) = KP + KD(z-1)/z + KIz/2 (z-1) For further details on the filter see the section Theory of Operation. ARGUMENTS: KD n,n,n,n,n,n,n,n KDX=n where n is an unsigned numbers in the range 0 to 4095.875 with a resolution of 1/8.
  • Page 151 FUNCTION: Integrator DESCRIPTION: The KI command sets the integral gain of the control loop. It fits in the control equation as follows: D(z) = KP + KD(z-1)/z + KI z/2(z-1) The integrator term will reduce the position error at rest to zero. ARGUMENTS: KI n,n,n,n,n,n,n,n KIA=n where...
  • Page 152 FUNCTION: Proportional Constant DESCRIPTION: KP designates the proportional constant in the controller filter. The filter transfer function is D(z) = KP + KD(z-1)/z + KI z/2(z-1) For further details see the section Theory of Operation in the User’s Manual. ARGUMENTS: KP n,n,n,n,n,n,n,n KPA=n where n is an unsigned numbers in the range 0 to 1023.875 with a resolution of 1/8.
  • Page 153 FUNCTION: Step Motor Smoothing DESCRIPTION: The KS parameter sets the amount of smoothing of stepper motor pulses. This is most useful when operating in full or half step mode. Larger values of KS provide greater smoothness. This parameter will also increase the motion time by 3KS sampling periods.
  • Page 154 FUNCTION: List Arrays DESCRIPTION: The LA command returns a list of all arrays in memory. The listing will be in alphabetical order. The size of each array will be included next to each array name in square brackets. ARGUMENTS: None USAGE: DEFAULTS: While Moving...
  • Page 155 FUNCTION: LCD Bias Contrast DESCRIPTION: Sets the Bias contrast on the LCD. ARGUMENTS: LBn where n is an integer between 0 and 15 where 0 is least contrast and 15 is greatest contrast. A negative value turns the optional backlight on. USAGE: DEFAULTS: While Moving...
  • Page 156 FUNCTION: Low Current Stepper Mode DESCRIPTION: Causes the amp enable line for the specified axes to toggle (disabling the stepper drives) a programmable amount of time after the respective axes stop (profiler holding position). Each axis is handled individually. This will reduce current consumption, but there will be no holding torque.
  • Page 157 FUNCTION: Limit Disable DESCRIPTION: Disables limit switches. Soft limits BL and FL are still in effect. This feature should be used to gain additional digital inputs if limit switches are not used, or if there is a noise problem which causes limit switch conditions even though no limit switches are connected. ARGUMENTS: LD n,n,n,n,n,n,n,n LDA=n where...
  • Page 158 FUNCTION: Linear Interpolation End DESCRIPTION: LE Signifies the end of a linear interpolation sequence. It follows the last LI specification in a linear sequence. After the LE specification, the controller issues commands to decelerate the motors to a stop. The VE command is interchangeable with the LE command. The LE command will apply to the selected coordinate system, S or T.
  • Page 159 FUNCTION: Forward Limit Switch Operand DESCRIPTION: The _LF operand contains the state of the forward limit switch for the specified axis. The operand is specified as: _LFn where n is the specified axis. Note: This operand is affected by the configuration of the limit switches set by the command CN: For CN -1: _LFn = 1 when the limit switch input is inactive* _LFn = 0 when the limit switch input is active*...
  • Page 160 FUNCTION: Linear Interpolation Distance DESCRIPTION: The LI a,b,c,d command specifies the incremental distance of travel for each axis in the Linear Interpolation (LM) mode. LI parameters are relative distances given with respect to the current axis positions. Up to 511 LI specifications may be given ahead of the Begin Sequence (BGS) command.
  • Page 161: Limswi

    #LIMSWI FUNCTION: Limit switch automatic subroutine DESCRIPTION: Without #LIMSWI defined, the controller will effectively issue the STn on the axis when it’s limit switch is tripped. With #LIMSWI defined, the axis is still stopped, and in addition, code is executed. #LIMSWI is most commonly used to turn the motor off when a limit switch is tripped (see example below).
  • Page 162: Control>LK

    <control>L<control>K FUNCTION: Lock program DESCRIPTION: <control>L<control>K locks user access to the application program. When locked, the ED, UL, LS, and TR commands will give privilege error #106. The application program will still run when locked. The locked or unlocked state can be saved with a BN command. Upon master reset, the controller is unlocked.
  • Page 163 FUNCTION: List Labels DESCRIPTION: The LL command returns a listing of all of the program labels in memory and their associated line numbers. The listing will be in alphabetical order. ARGUMENTS: None USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage...
  • Page 164 FUNCTION: Linear Interpolation Mode DESCRIPTION: The LM command specifies the linear interpolation mode and specifies the axes for linear interpolation. Any set of 1 thru 8 axes may be used for linear interpolation. LI commands are used to specify the travel distances for linear interpolation. The LE command specifies the end of the linear interpolation sequence.
  • Page 165 FUNCTION: Reverse Limit Switch Operand DESCRIPTION: The _LR operand contains the state of the reverse limit switch for the specified axis. The operand is specified as: _LRn where n is the specified axis. Note: This operand is affected by the configuration of the limit switches set by the command CN: For CN -1: _LRn = 1 when the limit switch input is inactive* _LRn = 0 when the limit switch input is active*...
  • Page 166 FUNCTION: List Program DESCRIPTION: The LS command returns a listing of the programs in memory. ARGUMENTS: LS n,m where n and m are valid numbers from 0 to 1999, or labels. n is the first line to be listed, m is the last. n is an integer in the range of 0 to 1999 or a label in the program memory.
  • Page 167 FUNCTION: LCD Update DESCRIPTION: Turns the automatic axes status update on the LCD on or off. ARGUMENTS: LUn where n = 0 Turns off the automatic update of the LCD with the axis status. n = 1 Sets the LCD in an automatic update mode with the axes status shown below. where m is the axis status for axes ABCDEFGH and is Idle Low power Idle...
  • Page 168 FUNCTION: List Variables DESCRIPTION: The LV command returns a listing of all of the program variables in memory. The listing will be in alphabetical order. ARGUMENTS: None USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage ALL CONTROLLERS RELATED COMMANDS:...
  • Page 169 FUNCTION: Leading Zeros DESCRIPTION: The LZ command is used for formatting the values returned from interrogation commands or interrogation of variables and arrays. By enabling the LZ function, all leading zeros of returned values will be removed. ARGUMENTS: LZ n where n = 1 Removes leading zeros...
  • Page 170 FUNCTION: Modbus DESCRIPTION: The MB command is used to communicate with I/O devices using the first two levels of the Modbus protocol. The format of the command varies depending on each function code. The function code, -1, designates that the first level of Modbus is used (creates raw packets and receives raw data). The other codes are the 10 major function codes of the second level that the controller supports.
  • Page 171 MBh = addr, 3, m, n, array[] where m is the starting register number n is the number of registers array[] will hold the response MBh = addr, 4, m, n, array[] where m is the starting register number n is the number of registers array[] will hold the response MBh = addr, 5, m, n where...
  • Page 172 FUNCTION: Motion Complete - "In Position" DESCRIPTION: The MC 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 and the encoder reaches or passes the specified position.
  • Page 173: Mctime

    #MCTIME FUNCTION: MC command timeout automatic subroutine DESCRIPTION: #MCTIME runs when the MC command is used to wait for motion to be complete, and the actual position TP does not reach or pass the target _PA + _PR within the specified timeout TW. USAGE: While Moving In a Program...
  • Page 174 FUNCTION: Forward Motion to Position DESCRIPTION: The MF command is a trippoint used to control the timing of events. This command will hold up the execution of the following command until the specified motor moves forward and crosses the position specified*. The units of the command are in quadrature counts. Only one axis may be specified at a time.
  • Page 175 FUNCTION: Message DESCRIPTION: The MG command sends data out the bus. This can be used to alert an operator, send instructions or return a variable value. ARGUMENTS: MG "m", {^n}, V {Fm.n or $m,n} {N} {Ex} {Pn} {Lx} where "m" is a text message including letters, numbers, symbols or <ctrl>G (up to 72 characters). {^n} is an ASCII character specified by the value n V is a variable name or array element where the following formats can be used: {Fm.n} Display variable in decimal format with m digits to left of decimal, and n to the right.
  • Page 176 FUNCTION: Motor Off DESCRIPTION: The MO command shuts off the control algorithm. The controller will continue to monitor the motor position. To turn the motor back on use the Servo Here command (SH). ARGUMENTS: MO nnnnnnnnnn where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes. No argument specifies all axes.
  • Page 177 FUNCTION: Reverse Motion to Position DESCRIPTION: The MR command is a trippoint used to control the timing of events. This command will hold up the execution of the following command until the specified motor moves backward and crosses the position specified*. The units of the command are in quadrature counts. Only one axis may be specified at a time.
  • Page 178 FUNCTION: Motor Type DESCRIPTION: The MT command selects the type of the motor and the polarity of the drive signal. Motor types include standard servomotors, which require a voltage in the range of +/- 10 Volts, and step motors, which require pulse and direction signals. The polarity reversal inverts the analog signals for servomotors, and inverts logic level of the pulse train, for step motors.
  • Page 179 FUNCTION: Modbus Wait DESCRIPTION: Enabling the MW command causes the controller to hold up execution of the program after sending a Modbus command until a response from the Modbus device has been received. If the response is never received, then the #TCPERR subroutine will be triggered and an error code of 123 will occur on _TC.
  • Page 180 FUNCTION: Notch Bandwidth DESCRIPTION: The NB command sets real part of the notch poles ARGUMENTS: NB n,n,n,n,n,n,n,n NBA=n where n is ranges from 0 Hz to ⋅ TM USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage ALL CONTROLLERS OPERAND USAGE:...
  • Page 181 FUNCTION: Notch Frequency DESCRIPTION: The NF command sets the frequency of the notch filter, which is placed in series with the PID compensation. ARGUMENTS: NF n,n,n,n,n,n,n,n NFA=n where n ranges from 1 Hz to 1 / (4 TM) Hz, where TM is the update rate (default TM is 1000). n = ? Returns the value of the Notch filter for the specified axis.
  • Page 182: No (' Apostrophe Also Accepted)

    NO (‘ apostrophe also accepted) FUNCTION: No Operation DESCRIPTION: The NO or an apostrophe (‘) command performs no action in a sequence, but can be used as a comment in a program. This helps to document a program. ARGUMENTS: NO m where m is any group of letters and numbers up to 77 characters can follow the NO command USAGE:...
  • Page 183 FUNCTION: Notch Zero DESCRIPTION: The NZ command sets the real part of the notch zero. ARGUMENTS: NZ n,n,n,n,n,n,n,n NZA=n where n is ranges from 1 Hz to ⋅ TM n = ? Returns the value of the Notch filter zero for the specified axis. USAGE: DEFAULTS: While Moving...
  • Page 184 FUNCTION: Off on encoder failure DESCRIPTION: Turns on or off encoder failure detection. The controller can detect a failure on either or both channels of the encoder. This is accomplished by checking on whether motion of at least 4 counts is detected whenever the torque exceeds a preset level (OV) for a specified time (OT). Note that for this function to work properly it is necessary to have a non-zero value for KI.
  • Page 185 FUNCTION: Output Bit DESCRIPTION: The OB n, logical expression command defines output bit n as either 0 or 1 depending on the result from the logical expression. Any non-zero value of the expression results in a one on the output. ARGUMENTS: OB n, expression where n denotes the output bit...
  • Page 186 FUNCTION: Output Compare DESCRIPTION: The OC command allows the generation of output pulses based on one (or two for a 5-8 axis controller) of the main encoder positions. For circular compare, the output is a low-going pulse with a duration of approximately 300 nanoseconds and is available at the output compare signal (labeled CMP on the ICM-1900 and ICM-2900).
  • Page 187 FUNCTION: Off On Error DESCRIPTION: The OE command causes the controller to shut off the motor command if a position error TE exceeds the limit specified by the ER command, an abort occurs from either the abort input or on AB command, or a limit switch is tripped, or an amplifier error exists. If a position error is detected on an axis, and the motion was executing an independent move, only that axis will be shut off.
  • Page 188 FUNCTION: Offset DESCRIPTION: The OF command sets a bias voltage in the motor command output or returns a previously set value. This can be used to counteract gravity or an offset in an amplifier. ARGUMENTS: OF n,n,n,n,n,n,n,n OFA=n where n is a signed number in the range -9.998 to 9.998 volts with resolution of 0.0003. n = ? Returns the offset for the specified axis.
  • Page 189 FUNCTION: Output Port DESCRIPTION: The OP command sends data to the output ports of the controller. You can use the output port to control external switches and relays. ARGUMENTS: OP m,a,b where m is an integer in the range 0 to 65535 decimal, or $0000 to $FFFF hexadecimal. m is the decimal representation of the general output bits Output 1 through Output 8 for controllers with 4 axes or less.
  • Page 190 FUNCTION: Off on encoder failure time DESCRIPTION: Sets the time in samples (milliseconds for TM1000) that the controller will wait for motion after the OV threshold has been exceeded. The controller can detect a failure on either or both channels of the encoder. This is accomplished by checking on whether motion of at least 4 counts is detected whenever the torque exceeds a preset level (OV) for a specified time (OT).
  • Page 191: Out[N]

    @OUT[n] FUNCTION: Read digital output DESCRIPTION: Returns the value of the given digital output (either 0 or 1) ARGUMENTS: @OUT[n] where n is an unsigned integer in the range 1 to 80 USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage...
  • Page 192 FUNCTION: Off on encoder failure voltage DESCRIPTION: Sets the threshold voltage for detecting an encoder failure. The controller can detect a failure on either or both channels of the encoder. This is accomplished by checking on whether motion of at least 4 counts is detected whenever the torque exceeds a preset level (OV) for a specified time (OT).
  • Page 193 FUNCTION: Position Absolute DESCRIPTION: The PA command will set the final destination of each axis. The position is referenced to the absolute zero. ARGUMENTS: PA n,n,n,n,n,n,n,n PAA=n where n is a signed integers in the range -2147483648 to 2147483647 decimal. Units are in encoder counts.
  • Page 194 FUNCTION: Position Format DESCRIPTION: The PF command allows the user to format the position numbers such as those returned by TP. The number of digits of integers and the number of digits of fractions can be selected with this command. An extra digit for sign and a digit for decimal point will be added to the total number of digits.
  • Page 195: P2Cd

    P2CD FUNCTION: Serial port 2 code DESCRIPTION: P2CD returns the status of the auxiliary serial port (port 2) USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage ALL CONTROLLERS RELATED COMMANDS: P2CH Serial port 2 character P2NM Serial port 2 number P2ST...
  • Page 196: P2Ch

    P2CH FUNCTION: Serial port 2 character DESCRIPTION: P2CH returns the last character sent to the auxiliary serial port (port 2) USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage ALL CONTROLLERS RELATED COMMANDS: P2CD Serial port 2 code P2NM Serial port 2 number...
  • Page 197: P2Nm

    P2NM FUNCTION: Serial port 2 number DESCRIPTION: P2NM converts from ASCII (e.g. “1234”) to binary so that a number can be stored into a variable and math can be performed on it. Numbers from -2147483648 to 2147483647 can be processed. P2NM returns the last number (followed by carriage return) sent to auxiliary serial port (port 2) USAGE: DEFAULTS:...
  • Page 198: P2St

    P2ST FUNCTION: Serial port 2 string DESCRIPTION: P2ST returns the last string (followed by carriage return) sent to auxiliary serial port (port 2) NO MORE THAN SIX CHARACTERS CAN BE ACCESSED. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage...
  • Page 199 FUNCTION: Pole DESCRIPTION: The PL command adds a low-pass filter in series with the PID compensation. The digital transfer function of the filter is (1 - n) / (Z - n) and the equivalent continuous filter is A/(S+A) where A is the filter cutoff frequency: A=(1/T) ln (1 / n) rad/sec and T is the sample time. To convert from the desired crossover (-3 dB) frequency in Hertz to the value given to PL, use the following formula: π...
  • Page 200: Poserr

    #POSERR FUNCTION: Position error automatic subroutine DESCRIPTION: The factory default behavior of the Galil controller upon a position error (TE > ER) is to do nothing more than turn on the red error LED. If OE is set to 1, the motor whose position error ER was exceeded will be turned off MO.
  • Page 201 FUNCTION: Position Relative DESCRIPTION: The PR command sets the incremental distance and direction of the next move. The move is referenced with respect to the current position. . ARGUMENTS: PR n,n,n,n,n,n,n,n PRA=n where n is a signed integer in the range -2147483648 to 2147483647 decimal. Units are in encoder counts n = ? Returns the current incremental distance for the specified axis.
  • Page 202 FUNCTION: Position Tracking DESCRIPTION: The PT command will place the controller in the position tracking mode. In this mode, the controller will allow the user to issue absolute position commands on the fly. The motion profile is trapezoidal with the parameters controlled by acceleration, deceleration, and speed (AD, DC, SP).
  • Page 203 FUNCTION: Password DESCRIPTION: The password can be set with the command PW password,password where the password can be up to 8 alphanumeric characters. The default value after master reset is a null string. The password can only be changed when the controller is in the unlocked state (^L^K). The password is burnable but cannot be interrogated.
  • Page 204 FUNCTION: Download Array DESCRIPTION: The QD command transfers array data from the host computer to the controller. QD array[], start, end requires that the array name be specified along with the index of the first element of the array and the index of the last element of the array. The array elements can be separated by a comma ( , ) or by <CR>...
  • Page 205 FUNCTION: Hall State DESCRIPTION: The QH command transmits the state of the Hall sensor inputs. The value is decimal and represents an 8 bit value. Status Undefined (set to 0) Undefined (set to 0) Undefined (set to 0) Undefined (set to 0) Undefined (set to 0) Hall C State Hall B State...
  • Page 206 FUNCTION: Data Record DESCRIPTION: The QR command causes the controller to return a record of information regarding controller status. This status information includes 4 bytes of header information and specific blocks of information as specified by the command arguments. The details of the status information is described in Chapter 4 of the user’s manual.
  • Page 207 FUNCTION: Error Magnitude DESCRIPTION: The QS command reports the magnitude of error, in step counts, for axes in Stepper Position Maintenance mode. A step count is directly proportional to the resolution of the step drive. ARGUMENTS: QS nnnnnnnn or QSn = ? where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes USAGE:...
  • Page 208 FUNCTION: Upload Array DESCRIPTION: The QU command transfers array data from the controller to a host computer. The QU requires that the array name be specified along with the first element of the array and last element of the array. The uploaded array will be followed by a <control>Z as an end of text marker. ARGUMENTS: QU array[],start,end,delim where “array[]”...
  • Page 209 FUNCTION: Return DPRAM / Data Record information DESCRIPTION: The QZ command is an interrogation command that returns information regarding data record transfers. The controller’s response to this command will be the return of 4 integers separated by commas. The four fields represent the following: First field returns the number of axes.
  • Page 210 FUNCTION: Record Array DESCRIPTION: The RA command selects one through eight arrays for automatic data capture. The selected arrays must be dimensioned by the DM command. The data to be captured is specified by the RD command and time interval by the RC command. ARGUMENTS: RA n [],m [],o [],p [] RA n[],m[],o[],p[],q[],r[],s[],t[] where...
  • Page 211 FUNCTION: Record DESCRIPTION: The RC command begins recording for the Automatic Record Array Mode (RA). RC 0 stops recording . ARGUMENTS: RC n,m where n is an integer 1 thru 8 and specifies 2 samples between records. RC 0 stops recording. m is optional and specifies the number of records to be recorded.
  • Page 212 FUNCTION: Record Data DESCRIPTION: The RD command specifies the data type to be captured for the Record Array (RA) mode. The command type includes: Analog Input Value (+32767 to -32768). The analog inputs are limited _AFn to those which correspond to an axis on the controller. _DEn 2nd encoder Outputs...
  • Page 213 FUNCTION: Return from Error Routine DESCRIPTION: The RE command is used to end a position error handling subroutine or limit switch handling subroutine. The error handling subroutine begins with the #POSERR label. The limit switch handling subroutine begins with the #LIMSWI. An RE at the end of these routines causes a return to the main program.
  • Page 214: Rem

    FUNCTION: Remark DESCRIPTION: REM is used for comments. The REM statement is NOT a controller command. Rather, it is recognized by Galil PC software, which strips away the REM lines before downloading the DMC file to the controller. REM differs from NO (or ‘) in the following ways: (1) NO comments are downloaded to the controller and REM comments aren’t (2) NO comments take up execution time and REM comments don’t;...
  • Page 215 FUNCTION: Return from Interrupt Routine DESCRIPTION: The RI command is used to end the interrupt subroutine beginning with the label #ININT. An RI at the end of this routine causes a return to the main program. The RI command also re- enables input interrupts.
  • Page 216 FUNCTION: Report Latched Position DESCRIPTION: The RL command will return the last position captured by the latch. The latch must first be armed by the AL command and then a 0 must occur on the appropriate input. Each axis uses a specific general input for the latch input: X (A) axis latch...
  • Page 217: Rnd[N]

    @RND[n] FUNCTION: Round DESCRIPTION: Rounds the given number to the nearest integer ARGUMENTS: @RND[n] n is a signed number in the range -2147483648 to 2147483647. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage RELATED COMMANDS: @INT[n] Truncates to the nearest integer...
  • Page 218 FUNCTION: Reference Position DESCRIPTION: This command returns the commanded reference position of the motor(s). ARGUMENTS: RP nnnnnnnnnn where n is A,B,C,D,E,F,G,H,M or N, or any combination to specify the axis or axes` USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Position Format Command Line...
  • Page 219 FUNCTION: Reset DESCRIPTION: The RS command resets the state of the processor to its power-on condition. The previously saved state of the controller, along with parameter values, and saved sequences are restored. RS-1 Soft master reset. Restores factory defaults without changing EEPROM. To restore EEPROM settings use RS with no arguments.
  • Page 220: Control>RS

    <control>R<control>S FUNCTION: Master Reset DESCRIPTION: This command resets the controller to factory default settings and erases EEPROM. A master reset can also be performed by installing a jumper on the controller at the location labeled MRST and resetting the controller (power cycle or pressing the reset button). Remove the jumper after this procedure.
  • Page 221: Control>RV

    <control>R<control>V FUNCTION: Revision Information DESCRIPTION: The Revision Information command causes the controller to return firmware revision information. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line Controller Usage ALL CONTROLLERS DMC-40x0 Command Reference <control>R<control>V • 211...
  • Page 222 FUNCTION: Send command DESCRIPTION: SA sends a command form one controller to another via Ethernet. NOTE: A wait statement (e.g. WT5) must be inserted between successive calls to SA. ARGUMENTS: SAh=arg SAh=arg, arg, arg, arg, arg, arg, arg, arg, where h is the handle being used to send commands to the slave controller.
  • Page 223 FUNCTION: Set Bit DESCRIPTION: The SB command sets one of the output bits. ARGUMENTS: SB n where n is an integer which represents a specific controller output bit to be set high (output = 1). USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Command Line...
  • Page 224 FUNCTION: Stop Code DESCRIPTION: The SC command allows the user to determine why a motor stops. The controller responds with the stop code as follows: CODE MEANING CODE MEANING Motors are running, independent Stopped after homing (HM) mode Motors stopped at commanded Stopped by Selective Abort independent position Input...
  • Page 225 FUNCTION: Switch Deceleration DESCRIPTION: The Limit Switch Deceleration command (SD) sets the linear deceleration rate of the motors when a limit switch has been reached. The parameters will be rounded down to the nearest factor of 1024 and have units of counts per second squared. ARGUMENTS: SD n,n,n,n,n,n,n,n SDA=n where...
  • Page 226 FUNCTION: Servo Here DESCRIPTION: The SH commands tells the controller to use the current motor position as the command position and to enable servo control here. This command can be useful when the position of a motor has been manually adjusted following a motor off (MO) command.
  • Page 227: Sin[N]

    @SIN[n] FUNCTION: Sine DESCRIPTION: Returns the sine of the given angle in degrees ARGUMENTS: @SIN[n] where n is a signed number in degrees in the range of -32768 to 32767, with a fractional resolution of 16- bit.. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format...
  • Page 228 FUNCTION: Single Step DESCRIPTION: For debugging purposes. Single Step through the program after execution has paused at a breakpoint (BK). Optional argument allows user to specify the number of lines to execute before pausing again. The BK command resumes normal program execution. ARGUMENTS: SL n where n is an integer representing the number of lines to execute before pausing again...
  • Page 229 FUNCTION: Subnet Mask DESCRIPTION: The SM command assigns a subnet mask to the controller. All packets sent to the controller whose source IP address is not on the subnet will be ignored by the controller. For example, for SM 255, 255, 0, 0 and IA 10, 0, 51, 1, only packets from IP addresses of the form 10.0.xxx.xxx will be accepted.
  • Page 230 FUNCTION: Speed DESCRIPTION: This command sets the slew speed of any or all axes for independent moves. Note: Negative values will be interpreted as the absolute value. ARGUMENTS: SP n,n,n,n,n,n,n,n SPA=n where n is an unsigned even number in the range 0 to 22,000,000 for servo motors. The units are encoder counts per second.
  • Page 231: Sqr[N]

    @SQR[n] FUNCTION: Square Root DESCRIPTION: Takes the square root of the given number. If the number is negative, the absolute value is taken first. ARGUMENTS: @SQR[n] where n is a signed number in the range -2147483648 to 2147483647. USAGE: DEFAULTS: While Moving Default Value In a Program...
  • Page 232 FUNCTION: Stop DESCRIPTION: The ST command stops motion on the specified axis. Motors will come to a decelerated stop. If ST is sent from the host without an axis specification, program execution will stop in addition to motion. ARGUMENTS: ST nnnnnnnnnn where n is A,B,C,D,E,F,G,H,M,N,S or T or any combination to specify the axis or sequence.
  • Page 233 FUNCTION: Tell Amplifier error status DESCRIPTION: The command transmits the amplifier error status. The value is decimal and represents an 8 bit value. Bit # STATUS Bit # STATUS Bit # STATUS Bit # STATUS Bit 7 Under Voltage Bit 7 Hall Error H Axis Bit 7 Peak Current H-Axis...
  • Page 234: Tan[N]

    @TAN[n] FUNCTION: Tangent DESCRIPTION: Returns the tangent of the given angle in degrees ARGUMENTS: @TAN[n] where n is a signed number in degrees in the range of -32768 to 32767, with a fractional resolution of 16- bit. USAGE: DEFAULTS: While Moving Default Value In a Program Default Format...
  • Page 235 FUNCTION: Tell Status Byte DESCRIPTION: The TB command returns status information from the controller as a decimal number. Each bit of the status byte denotes the following condition when the bit is set (high): STATUS Bit 7 Executing application program Bit 6 Bit 5 Contouring...
  • Page 236 FUNCTION: Tell Error Code DESCRIPTION: The TC command returns a number between 1 and 255. This number is a code that reflects why a command was not accepted by the controller. This command is useful when the controller halts execution of a program at a command or when the response to a command is a question mark.
  • Page 237 Begin not valid because no sequence No master axis defined for ECAM defined Variable not given in IN command Master axis modulus greater than 256∗EP value S operand not valid Not valid when axis performing ECAM Not valid during coordinated move EB1 command must be given first Sequence segment too short Privilege violation...
  • Page 238: Tcperr

    #TCPERR FUNCTION: Ethernet communication error automatic subroutine DESCRIPTION: The following error (see TC) occurs when a command such as MG “hello” {EA} is sent to a failed Ethernet connection: 123 TCP lost sync or timeout This error means that the client on handle A did not respond with a TCP acknowledgement (for example because the Ethernet cable was disconnected).
  • Page 239 FUNCTION: Tell Dual Encoder DESCRIPTION: This command returns the current position of the dual (auxiliary) encoder(s). Auxiliary encoders are not available for stepper axes or for the axis where output compare is used. When operating with stepper motors, the TD command returns the number of counts that have been output by the controller.
  • Page 240 FUNCTION: Tell Error DESCRIPTION:: This command returns the current position error of the motor(s). The range of possible error is 2147483647. The Tell Error command is not valid for step motors since they operate open- loop. ARGUMENTS: TE nnnnnnnnnn where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes No argument will provide the position error for all axes USAGE:...
  • Page 241 FUNCTION: Tell Handle Status DESCRIPTION: The TH command is used to request the controllers’ handle status. Data returned from this command indicates the IP address and Ethernet address of the current controller. This data is followed by the status of each handle indicating connection type and IP address. ARGUMENTS: None USAGE: DEFAULTS:...
  • Page 242 FUNCTION: Tell Inputs DESCRIPTION: This command returns the state of the inputs including the extended I/O configured as inputs. The value returned by this command is decimal and represents an 8 bit value (decimal value ranges from 0 to 255). Each bit represents one input where the LSB is the lowest input number and the MSB is the highest input bit.
  • Page 243: Time

    TIME FUNCTION: Time Operand (Keyword) DESCRIPTION: The TIME operand returns the value of the internal free running, real time clock. The returned value represents the number of servo loop updates and is based on the TM command. The default value for the TM command is 1000. With this update rate, the operand TIME will increase by 1 count every update of approximately 1000usec.
  • Page 244 FUNCTION: Peak Torque Limit DESCRIPTION: The TK command sets the peak torque limit on the motor command output and TL sets the continuous torque limit. When the average torque is below TL, the motor command signal can go up to the TK (Peak Torque) for a short amount of time. If TK is set lower than TL, then TL is the maximum command output under all circumstances.
  • Page 245 FUNCTION: Torque Limit DESCRIPTION: The TL command sets the limit on the motor command output. For example, TL of 5 limits the motor command output to 5 volts. Maximum output of the motor command is 9.998 volts. ARGUMENTS: TL n,n,n,n,n,n,n,n TLA=n where n is an unsigned numbers in the range 0 to 9.998 volts with resolution of 0.0003 volts...
  • Page 246 FUNCTION: Update Time DESCRIPTION: The TM command sets the sampling period of the control loop. A zero or negative number turns off the servo loop. The units of this command are μsec. ARGUMENTS: TM n where With the fast firmware: n is an number in the range 31.25 to 20000 decimal with resolution of 31.25 microseconds.
  • Page 247 FUNCTION: Tangent DESCRIPTION: The TN m,n command describes the tangent axis to the coordinated motion path. m is the scale factor in counts/degree of the tangent axis. n is the absolute position of the tangent axis where the tangent axis is aligned with zero degrees in the coordinated motion plane. The tangent axis is specified with the VM n,m,p command where p is the tangent axis.
  • Page 248 FUNCTION: Tell Position DESCRIPTION: This command returns the current position of the motor(s). ARGUMENTS: TP nnnnnnnnnn where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes USAGE: DEFAULTS: While Moving Default Value In a Program Default Format Position Format Command Line...
  • Page 249 FUNCTION: Trace DESCRIPTION: The TR command causes each instruction in a program to be sent out the communications port prior to execution. TR1 enables this function and TR0 disables it. The trace command is useful in debugging programs. ARGUMENTS: TR n, m where n = 0 Disables the trace function...
  • Page 250 FUNCTION: Tell Switches DESCRIPTION: TS returns status information of the Home switch, Forward Limit switch Reverse Limit switch, error conditions, motion condition and motor state. The value returned by this command is decimal and represents an 8 bit value (decimal value ranges from 0 to 255). Each bit represents the following status information: Status Bit 7...
  • Page 251 FUNCTION: Tell Torque DESCRIPTION: The TT command reports the value of the analog output signal, which is a number between -9.998 and 9.998 volts. ARGUMENTS: TT nnnnnnnnnn where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes No argument will provide the torque for all axes USAGE: DEFAULTS:...
  • Page 252 FUNCTION: Tell Velocity DESCRIPTION: The TV command returns the actual velocity of the axes in units of encoder count/s. The value returned includes the sign. ARGUMENTS: TV nnnnnnnnnn where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes No argument will provide the velocity for all axes.
  • Page 253 FUNCTION: Timeout for IN-Position (MC) DESCRIPTION: The TW command sets the timeout in samples (msec for TM1000) to declare an error if the MC command is active and the motor is not at or beyond the actual position within n msec after the completion of the motion profile.
  • Page 254 FUNCTION: Tell I/O Status DESCRIPTION: The TZ command is used to request the I/O status. This is returned to the user as a text string. ARGUMENTS: TZ where USAGE: DEFAULTS: While Moving Default Value ----- In a Program Default Format ----- Command Line Controller Usage...
  • Page 255 FUNCTION: User UDP “Interrupt” DESCRIPTION: UI pushes a user-defined status byte into the EI queue. UI can generate 16 different status bytes, $F0 to $FF (240-255), corresponding to UI0 to UI15. When the UI command (e.g. UI5) is executed, the status byte value (e.g. $F5 or 245) is queued up for transmission to the host, along with any other interrupts.
  • Page 256 RELATED COMMANDS: Event interrupts Message EXAMPLES: JG 5000 Jog at 5000 counts/s Begin motion Wait for at speed UI 1 Cause an interrupt with status byte $F1 (241) 246 ● UI DMC-40x0 Command Reference...
  • Page 257 FUNCTION: Upload DESCRIPTION: The UL command transfers data from the controller to a host computer. Programs are sent without line numbers. The Uploaded program will be followed by a <control>Z as an end of text marker. ARGUMENTS: None USAGE: DEFAULTS: While Moving Default Value In a Program...
  • Page 258 FUNCTION: Vector Acceleration DESCRIPTION: This command sets the acceleration rate of the vector in a coordinated motion sequence. ARGUMENTS: VA s,t where s and t are unsigned integers in the range 1024 to 1073740800. s represents the vector acceleration for the S coordinate system and t represents the vector acceleration for the T coordinate system.
  • Page 259 FUNCTION: Vector Deceleration DESCRIPTION: This command sets the deceleration rate of the vector in a coordinated motion sequence. ARGUMENTS: VD s,t where s and t are unsigned integers in the range 1024 to 1073740800. s represents the vector deceleration for the S coordinate system and t represents the vector acceleration for the T coordinate system.
  • Page 260 FUNCTION: Vector Sequence End DESCRIPTION: VE is required to specify the end segment of a coordinated move sequence. VE would follow the final VP or CR command in a sequence. VE is equivalent to the LE command. The VE command will apply to the selected coordinate system, S or T. To select the coordinate system, use the command CAS or CAT.
  • Page 261 FUNCTION: Variable Format DESCRIPTION: The VF command formats the number of digits to be displayed when interrogating the controller. If a number exceeds the format, the number will be displayed as the maximum possible positive or negative number (i.e. 999.99, -999, $8000 or $7FF). ARGUMENTS: VF m.n where m and n are unsigned numbers in the range 0<m<10 and 0<n<4.
  • Page 262 FUNCTION: Coordinated Motion Mode DESCRIPTION: The VM command specifies the coordinated motion mode and the plane of motion. This mode may be specified for motion on any set of two axes. The motion is specified by the instructions VP and CR, which specify linear and circular segments.
  • Page 263 FUNCTION Vector Position DESCRIPTION: The VP command defines the target coordinates of a straight line segment in a 2 axis motion sequence which have been selected by the VM command. The units are in quadrature counts, and are a function of the elliptical scale factor set using the command ES. For three or more axes linear interpolation, use the LI command.
  • Page 264 FUNCTION: Vector Speed Ratio DESCRIPTION: The VR sets a ratio to be used as a multiplier of the current vector speed. The vector speed can be set by the command VS or the operators < and > used with CR, VP and LI commands. VR takes effect immediately and will ratio all the following vector speed commands.
  • Page 265 FUNCTION: Vector Speed DESCRIPTION: The VS command specifies the speed of the vector in a coordinated motion sequence in either the LM or VM modes. VS may be changed during motion. Vector Speed can be calculated by taking the square root of the sum of the squared values of speed for each axis specified for vector or linear interpolated motion.
  • Page 266 FUNCTION: Vector Speed Variable DESCRIPTION: The VV command sets the speed of the vector variable in a coordinated motion sequence in either the LM or VM modes. VV may be changed during motion. The VV command is used to set the “<” vector speed variable argument for segments that exist in the vector buffer.
  • Page 267 FUNCTION: Which Handle DESCRIPTION: The WH command is used to identify the handle in which the command is executed. The command returns IHA through IHH to indicate on which handle the command was executed. The command returns RS232 if communicating serially. ARGUMENTS: None USAGE: DEFAULTS:...
  • Page 268 FUNCTION: Wait DESCRIPTION: The WT command is a trippoint used to time events. When this command is executed, the controller will wait for the number of ms specified before executing the next command. ARGUMENTS: WT n where n is an unsigned even number in the range 0 to 2,000,000,000 USAGE: DEFAULTS: While Moving...
  • Page 269 FUNCTION: Execute Program DESCRIPTION: The XQ command begins execution of a program residing in the program memory of the controller. Execution will start at the label or line number specified. Up to 8 programs may be executed with the controller. ARGUMENTS: XQ #A,n XQm,n where...
  • Page 270 FUNCTION: Step Drive Resolution DESCRIPTION: The YA command specifies the resolution of the step drive, in step counts per full motor step, for Stepper Position Maintenance mode, and to configure the stepper amplifier. ARGUMENTS: YA m,m,m,m,m,m,m,m or YAn = m where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes.
  • Page 271 FUNCTION: Step Motor Resolution DESCRIPTION: The YB command specifies the resolution of the step motor, in full steps per full revolution, for Stepper Position Maintenance mode. ARGUMENTS: YB m,m,m,m,m,m,m,m or YBn = m where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes. m is 0 to 9999 which represents the motor resolution in full steps per revolution.
  • Page 272 FUNCTION: Encoder Resolution DESCRIPTION: The YC command specifies the resolution of the encoder, in counts per revolution, for Stepper Position Maintenance mode. ARGUMENTS: YC m,m,m,m,m,m,m,m or YCn = m where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes. m is 0 to 32766 which represents the encoder resolution in counts per revolution.
  • Page 273 FUNCTION: Error Correction DESCRIPTION: The YR command allows the user to correct for position error in Stepper Position Maintenance mode. This correction acts like an IP command, moving the axis or axes the specified quantity of step counts. YR will typically be used in conjunction with QS. ARGUMENTS: YR m,m,m,m,m,m,m,m or YRn = m where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes.
  • Page 274 FUNCTION: Stepper Position Maintenance Mode Enable, Status DESCRIPTION: The YS command enables and disables the Stepper Position Maintenance Mode function. YS also reacts to excessive position error condition as defined by the QS command. ARGUMENTS: YS m,m,m,m,m,m,m,m or YSn = m where n is A,B,C,D,E,F,G or H or any combination to specify the axis or axes.
  • Page 275 FUNCTION: User Data Record Variables DESCRIPTION: ZA sets the user variables in the data record. The eight user variables (one per axis) are automatically sent as part of the status record from the controller to the host computer. These variables provide a method for specific controller information to be passed to the host automatically.
  • Page 276 FUNCTION: Zero Subroutine Stack DESCRIPTION: The ZS command is only valid in an application program and is used to avoid returning from an interrupt (either input or error). ZS alone returns the stack to its original condition. ZS1 adjusts the stack to eliminate one return. This turns the jump to subroutine into a jump. Do not use RI (Return from Interrupt) when using ZS.
  • Page 277: Index

    Index Abort, 16 Configure Off On Error, 16 Communication, 75 Stop Motion, 222 Master Reset, 210 Absolute Position, 29–31, 82 Motor Type, 168 Acceleration, 18 Configure Encoders Amplifier error, 26 CE Command, 63 Analog Feedback, 21 Configure System Analog Output, 28 CN Command, 68 Array, 194 Contour Mode, 61, 66...
  • Page 278 Specify Table, 99 Find Index, 108 ECAM, 95 Choose Master, 87 Clear Bit, 59 Counter, 89 Set Bit, 213 Enable, 88 IF conditional, 123 Engage, 91 IF Conditional Statements Specify Cycles, 95 ELSE, 94 Specify Table, 103 IF Statement ECAM Widen, 104 ENDIF, 97 Echo, 98, 225 Independent Motion...
  • Page 279 Burn, 50, 52, 55 Zeroing, 266 Status, 76, 120, 177, 225 Off On Error, 16 Stop Code, 214 Off On Error, 16 Tell Inputs, 232 Off On Error Error, 177 Tell Status, 240 Operand Step Drive Resolution, 260 Internal Variable, 265 Step Motor Resolution, 261 Output of Data Stepper Position Maintenance, 264...
  • Page 280 Vector Motion, 252 Circle, 73 Execute Program, 259 Vector Position, 253 Zero Stack, 266 Vector Speed Ratio, 254 270 ● Index DMC-40x0 Command Reference...

Table of Contents