Galil Motion Control DMC-4040 User Manual

Galil Motion Control DMC-4040 User Manual

Motion controller
Hide thumbs Also See for DMC-4040:
Table of Contents

Advertisement

Quick Links

USER MANUAL
DMC-40x0
Manual Rev. 1.0w
Galil Motion Control, Inc.
270 Technology Way
Rocklin, California
916.626.0101
support@galil.com
galil.com
01/2017

Advertisement

Table of Contents
loading

Summary of Contents for Galil Motion Control DMC-4040

  • Page 1 USER MANUAL DMC-40x0 Manual Rev. 1.0w Galil Motion Control, Inc. 270 Technology Way Rocklin, California 916.626.0101 support@galil.com galil.com 01/2017...
  • Page 2 Attention: Pertains to controllers with more than 4 axes. 4080 Please note that many examples are written for the DMC-4040 four-axes controller or the DMC-4080 eight axes controller. Users of the DMC-4030 3-axis controller, DMC-4020 2-axes controller or DMC-4010 1-axis controller should note that the DMC-4030 uses the axes denoted as ABC, the DMC-4020 uses the axes denoted as AB, and the DMC-4010 uses the A-axis only.
  • Page 3: Table Of Contents

    Contents Contents Chapter 1 Overview Introduction ........................1 Part Numbers ........................ 2 Overview of Motor Types ..................... 5 Overview of External Amplifiers .................. 6 Galil Internal Amplifiers and Drivers ................6 Functional Elements ...................... 7 Chapter 2 Getting Started Layout ........................... 10 Power Connections .......................
  • Page 4 Virtual Axis ........................104 Stepper Motor Operation ....................105 Stepper Position Maintenance Mode (SPM) ..............107 Dual Loop (Auxiliary Encoder) ..................110 Motion Smoothing ....................... 112 Homing ......................... 114 High Speed Position Capture (The Latch Function) ............ 116 Chapter 7 Application Programming Overview ........................
  • Page 5 A2 – AMP-43140 (-D3140) Description ........................219 Electrical Specifications ....................220 Operation ........................221 A3 – AMP-43240 (-D3240) Description ........................222 Electrical Specifications ....................223 Operation ........................224 Error Monitoring and Protection ................... 225 A4 – AMP-435x0 (-D3540,-D3520) Description ........................228 Electrical Specifications ....................
  • Page 6: Chapter 1 Overview

    Chapter 1 Overview Introduction The DMC-40x0 Series are Galil’s highest performance stand-alone controller. The controller series offers many enhanced features including high speed communications, non-volatile program memory, faster encoder speeds, and improved cabling for EMI reduction. Each DMC-40x0 provides two communication channels: high speed RS-232 (2 channels up to 115K Baud) and 100 BaseT Ethernet.
  • Page 7: Part Numbers

    Part Numbers The DMC-40x0 is modular by nature, meaning that a customer must specify several components in order to create a full part number. The user must specify the main control board (DMC), the communication board (CMB), and the interconnect module (ICM) to have a complete unit. The user can also specify an optional internal amplifier (AMP or SDM).
  • Page 8 Figure 1.3: Layout of a complete DMC-40x0 part number The placement of ICM and AMP/SDM options is extremely important for 5-8 axis models. Reading left to right, the first ICM (Axis 1-4) will be placed in the ICM (1) spot in Figure 1.2 and the second ICM (Axis 5-8) will be placed in the ICM (2) spot.
  • Page 9 CMB, “-CXXX(Y)” Options Option Type Options Brief Description Documentation Default communication board A9 – CMB-41012 (-C012), pg 255 Dual-Ethernet communication board A10 – CMB-41022 (-C022), pg 259 SSI Feedback 5V – Configure Extended I/O for 5V logic, pg P422 RS-422 on Main and Aux serial port RS-422 –...
  • Page 10: Overview Of Motor Types

    Overview of Motor Types The DMC-40x0 can provide the following types of motor control: 1. Standard servo motors with ± 10 volt command signals 2. Brushless servo motors with sinusoidal commutation 3. Step motors with step and direction signals 4. Other actuators such as hydraulics and ceramic motors - For more information, contact Galil. The user can configure each axis for any combination of motor types, providing maximum flexibility.
  • Page 11: Overview Of External Amplifiers

    Overview of External Amplifiers The amplifiers should be suitable for the motor and may be linear or pulse-width-modulated. An amplifier may have current feedback, voltage feedback or velocity feedback. Amplifiers in Current Mode Amplifiers in current mode should accept an analog command signal in the ±10 volt range. The amplifier gain should be set such that a +10V command will generate the maximum required current.
  • Page 12: Functional Elements

    Functional Elements The DMC-40x0 circuitry can be divided into the following functional groups as shown in Figure 1.4 and discussed below. WATCHDOG TIMER ISOLATED LIMITS AND HOME INPUTS MAIN ENCODERS RISC BASED HIGH-SPEED ETHERNET MICROCOMPUTER AUXILIARY ENCODERS MOTOR/ENCODER INTERFACE +/- 10 VOLT OUTPUT FOR RS-232 / SERVO MOTORS A,B,C,D...
  • Page 13 logic) and unused auxiliary encoder inputs may also be used as additional inputs (2 inputs / each axis). The general inputs as well as the index pulse can also be used as high speed latches for each axis. A high speed encoder compare output is also provided.
  • Page 14 Encoder An encoder translates motion into electrical pulses which are fed back into the controller. The DMC-40x0 accepts feedback from either a rotary or linear encoder. Typical encoders provide two channels in quadrature, known as MA and MB. This type of encoder is known as a quadrature encoder. Quadrature encoders may be either single- ended (MA+ and MB+) or differential (MA+, MA-, MB+, and MB-).
  • Page 15: Chapter 2 Getting Started

    For layouts of systems with ICM-42200’s(I200) installed please contact Galil. Overall dimensions and footprint are identical, the only differences are in connector type and location. DMC-4040 Figure 2.1: Outline of the of the DMC-40x0 1-4 axes model Chapter 2 Getting Started ▫ 10...
  • Page 16 DMC-4080 Figure 2.2: Outline of the of the DMC-40x0, 5-8 axes model Chapter 2 Getting Started ▫ 11 DMC-40x0 User Manual...
  • Page 17: Power Connections

    Power Connections SDM/AMP Power SDM/AMP Power Axis E-H Axis A-D 2-pin Molex controller power connector. Figure 2.3: Power Connector locations for the DMC-40x0 Figure 2.4: Power Connector used when controller is ordered without Galil Amplifiers For more information on powering your controller see Step 4. Power the Controller, pg 17. For more information regarding connector type and part numbers see Power Connector Part Numbers, pg 192.
  • Page 18: Dimensions

    Dimensions DMC-4040 Figure 2.5: Dimensions (in inches) of DMC-40x0 (where x= 1, 2, 3, or 4 axis) Chapter 2 Getting Started ▫ 13 DMC-40x0 User Manual...
  • Page 19 DMC-4080 Figure 2.6: Dimensions (in inches) of DMC-40x0 (where x= 5, 6, 7, or 8 axis) Chapter 2 Getting Started ▫ 14 DMC-40x0 User Manual...
  • Page 20: Elements You Need

    Elements You Need For a complete system, Galil recommends the following elements: DMC-40x0, motion controller where the x designates number of axis, 1-8. Motor Amplifiers (Integrated when using Galil amplifiers and drivers) Power Supply for Amplifiers and controller Brush or Brushless Servo motors with Optical Encoders or stepper motors. Cables for connecting to the DMC-40x0’s integrated ICM’s.
  • Page 21: Installing The Dmc, Amplifiers, And Motors

    Installing the DMC, Amplifiers, and Motors Installation of a complete, operational motion control system consists of the following steps: Step 1. Determine Overall System Configuration, pg 16 Step 2. Install Jumpers on the DMC-40x0, pg 17 Step 3. Install the Communications Software, pg 17 Step 4.
  • Page 22: Step 2. Install Jumpers On The Dmc-40X0

    Step 2. Install Jumpers on the DMC-40x0 The following jumpers are located in a rectangular cut-out near the power and error lights on the communication board. See A9 – CMB-41012 (-C012), pg 255 or A10 – CMB-41022 (-C022), pg 259 for clarification, depending on the communication board ordered.
  • Page 23: Step 5. Establish Communications With Galil Software

    Options Ordered Power Connector Locations AMP/SDM AMP/SDM Controller Power AMP/SDM Power, AMP/SDM Power, Axis A-D Axis E-H ISCNTL ISAMP Axis A-D Axis E-H (2-pin Molex on side) (6- or 4-pin Molex) (6- or 4-pin Molex) Table 2.5: Available power connectors based upon option ordered In this configuration the amplifiers are sharing power.
  • Page 24: Step 6. Connecting Encoder Feedback

    See the GalilSuite manual for using the software to communicate: http://www.galilmc.com/support/manuals/galilsuite/index.html Step 6. Connecting Encoder Feedback The type of feedback the unit is capable of depends on the ICM (Interconnect module) chosen and additional options ordered. Table 2.6 shows the different Encoder feedback types available for the DMC-40x0 including which ICM and additional part numbers are required.
  • Page 25: Step 7. Setting Safety Features Before Wiring Motors

    ICM-42200 ICM-42200 Encoder 26 pin HD D-Sub Connector (Female), pg 277 Step B. Issue the appropriate configuration commands Find the appropriate configuration commands for your feedback type as shown in Table 2.6, pg 19. Step C. Verify proper encoder operation 1.
  • Page 26 TL will limit the output voltage of the ±10V motor command line. This output voltage is either translated into torque or velocity by the amplifier (Galil's internal amplifiers are in torque mode). This command should be used to avoid excessive torque or speed when initially setting up a servo system. The user is responsible for determining the relationship between the motor command line and the amplifier torque/velocity using the documentation of the motor and/or amplifier.
  • Page 27: Step 8. Wiring Motors To Galil's Internal Amps

    6. If TP has increased, than the motor command line and encoder are in correct polarity. If TP has decreased than the motor command line is in opposite polarity with the encoder. If the system has reverse polarity, take the following steps to correct for it: Brushed Motor Choose one of the following: 1.
  • Page 28 Step A. Connect the encoder feedback (optional for steppers) See Step 6. Connecting Encoder Feedback, pg 19. Step B. Connect the motor power leads and halls (if required) to the internal amplifiers Table 2.9 lists each of Galil's internal amplifiers and where to find documentation for pin-outs of the amplifier connections and electrical specifications.
  • Page 29: Step 8A. Commutation Of 3-Phased Brushless Motors

    Command Description Configures an axis for use with either a stepper or servo motor Amplifier gain (A/V for servos or A/Phase for steppers) Will configure an internal servo amplifier for brushed mode (Also used to ignore halls when the use of external amplifiers is required in lieu of an internal) Configures the current loop update rate (Can also be used to switch capable amplifiers between chopper and inverter mode)
  • Page 30 KDA= 0 KIA= 0 BRA= 0 OE 0 SH A 3. Place a small offset voltage on the motor command line using the OF command (ex OFA= 0.5). The smallest OF possible to see motion is recommended. If no motion presents itself, increase in small increments until you see motion.
  • Page 31 Trial # Phase A Phase B Phase C + Velocity - Velocity Table 2.12: Table provided for use with swapping motor phases to achieve trapezoidal communication Trial # Hall A Hall B Hall C + Velocity - Velocity Table 2.13: Table provided for use with swapping hall leads to achieve trapezoidal communication 9.
  • Page 32 BZ Method - The BZ method forces the motor to zero electrical degrees by exciting phases A and B in a two step initialization process . The location of the motor within it's magnetic cycle is known and sinusoidal commutation is initialized. Commands required: BA, BM, BZ BX Method - The BX method uses a limited motion algorithm to determine the proper location of the motor within the magnetic cycle.
  • Page 33 1. Check encoder position with the TP command. Ensure the motor is in an MO state and move the motor manually in the desired positive direction while monitoring TP. If TP reports a smaller, or more negative number, reverse encoder direction, see Step 6. Connecting Encoder Feedback, pg 19. 2.
  • Page 34 and C, and hall C aligns with the excitement of motor phases C and A. Setting up the motor for BI/BC initialization may require wiring changes to both the motor leads and the hall inputs. The following steps will ensure that the correct configuration is reached: 1.
  • Page 35 Motor Type Connection Requirements Servo motors • Power to controller and amplifier (Brushed and Brushless) • Amplifier enable • Encoder feedback • Motor command line • See amplifier documentation for motor connections Stepper motor • Power to controller and amplifier •...
  • Page 36 ICM-42000 External Driver (A-D) 44 pin HD D-Sub Connector (Male), pg 266 ICM-42000 External Driver (E-H) 44 pin HD D-Sub Connector (Male), pg 266 ICM-42100 ICM-42100 External Driver (A-D) 44 pin HD D-Sub Connector (Male), pg 270 ICM-42100 External Driver (E-H) 44 pin HD D-Sub Connector (Male), pg 270 ICM-42200 ICM-42200 Encoder 26 pin HD D-Sub Connector (Female), pg 277 For full electrical specifications and wiring diagrams refer to:...
  • Page 37 Command Description The motor type command configures what type of control method to use (switches axis between motor command or step/dir options) Servo only. Limits the motor command line's continuous output in Volts Servo only. Limits the motor command line's peak output in Volts Table 2.16: Brief listing of most commonly used configuration commands for the motor command and step/dir lines Step F.
  • Page 38: Chapter 3 Connecting Hardware

    Chapter 3 Connecting Hardware Overview The DMC-40x0 provides optoisolated digital inputs for forward limit, reverse limit, home, and abort signals. The controller also has 8 optoisolated, uncommitted inputs (for general use) as well as 8 high power optoisolated outputs and 8 analog inputs configured for voltages between ±10 volts. Controllers with 5 or more axes have an additional 8 optoisolated inputs and an additional 8 high 4080 power optoisolated outputs.
  • Page 39 Home Switch Input Homing inputs are designed to provide mechanical reference points for a motion control application. A transition in the state of a Home input alerts the controller that a particular reference point has been reached by a moving part in the motion control system.
  • Page 40 All motion programs that are currently running are terminated when a transition in the Abort input is detected. This can be configured with the CN command. For information see the Command Reference, OE and CN. ELO (Electronic Lock-Out) Input Used in conjunction with Galil amplifiers, this input allows the user the shutdown the amplifier at a hardware level. For more detailed information on how specific Galil amplifiers behave when the ELO is triggered, see Integrated in the Appendices.
  • Page 41: Optoisolated Input Electrical Information

    Optoisolated Input Electrical Information Electrical Specifications INCOM/LSCOM Max Voltage 24 V INCOM/LSCOM Min Voltage Minimum current to turn on Inputs 1.2 mA Minimum current to turn off Inputs once activated (hysteresis) 0.5 mA 11 mA Maximum current per input Internal resistance of inputs 2.2 kΩ...
  • Page 42 Wiring the Optoisolated Digital Inputs To take full advantage of optoisolation, an isolated power supply should be used to provide the voltage at the input common connection. Connecting the ground of the isolated power to the ground of the controller will bypass optoisolation and is not recommended if true optoisolation is desired.
  • Page 43 Figure 3.3: Limit Switch Inputs for Axes A-D Figure 3.4: Limit Switch Inputs for Axes E-H Figure 3.5: ELO, Abort and Reset Inputs Chapter 3 Connecting Hardware ▫ 38 DMC-40x0 User Manual...
  • Page 44: High Power Optoisolated Outputs

    High Power Optoisolated Outputs The DMC-40x0 has different interconnect module options, this section will describe the 500mA optically isolated outputs that are used on the ICM-42x00. The amount of uncommitted, optoisolated outputs the DMC-40x0 has depends on the number of axis. For instance, 1-4 axis models come with a single bank of 8 outputs, Bank 0 (DO[8:1]).
  • Page 45: Ttl Inputs And Outputs

    Figure 3.7: 500mA Sourcing wiring diagram for Bank 1, DO[16:9] TTL Inputs and Outputs Main Encoder Inputs The main encoder inputs can be configured for quadrature (default) or pulse and direction inputs. This configuration is set through the CE command. The encoder connections are found on the HD D-sub Encoder connectors and are labeled MA+, MA-, MB+, MB-.
  • Page 46 signal to the + input and leave the - input disconnected. For other signal levels, the - input should be connected to a voltage that is ½ of the full voltage range (for example, connect the - input to 6 volts if the signal is a 0 - 12 volt logic).
  • Page 47: Analog Inputs

    For controllers with 5-8 axes, the ERR signal is duplicated on the I/O (E-H) D-Sub connector. 4080 For additional information see Error Light (Red LED) in Chapter 9 Troubleshooting. Electrical Specifications Output Voltage 0 – 5 VDC Current Output 20 mA Sink/Source Analog Inputs The DMC-40x0 has eight analog inputs configured for the range between -10V and 10V.
  • Page 48: External Amplifier Interface

    Outputs Sink/Source 4mA per output Electrical Specifications (5V – Option) Inputs Max Input Voltage 5.25 VDC Guarantee High Voltage 2.0 VDC Guarantee Low Voltage 0.8 VDC  Inputs are internally pulled up to 5V through a 4.7kΩ resistor Outputs Sink/Source 20mA External Amplifier Interface External Stepper Control...
  • Page 49 For all versions of the ICM-42x00, the default configuration of the amplifier enable signal is 5V active high amp enable (HAEN) sinking. In other words, the AEN signal will be high when the controller expects the amplifier to be enabled. The polarity and the amplitude can be changed by configuring the Amplifier Enable Circuit on the ICM- 42xx0.
  • Page 50 Sinking Configuration (pin1 of LTV8441 chip in pin2 of socket U4) Logic State RP2 (square pin next to RP2 label is 5V) 5V, HAEN (Default configuration) 5V - AECOM1 GND – AECOM2 Dot on R-pack next to RP2 label 5V, LAEN 5V –...
  • Page 51 ICM-42200 Amplifier Enable Circuit This section describes how to configure the ICM-42200 for different Amplifier Enable outputs. The ICM-42200 is designed to be used with external amplifiers. As a result, the amplifier enable circuit for each axis is individually configurable through jumper settings. The user can choose between High-Amp-Enable (HAEN), Low-Amp-Enable (LAEN), 5V logic, 12V logic, external voltage supplies up to 24V, sinking, or sourcing.
  • Page 52 Chapter 3 Connecting Hardware ▫ 47 DMC-40x0 User Manual...
  • Page 53 Chapter 3 Connecting Hardware ▫ 48 DMC-40x0 User Manual...
  • Page 54 Chapter 3 Connecting Hardware ▫ 49 DMC-40x0 User Manual...
  • Page 55: Chapter 4 Software Tools And Communication

    Chapter 4 Software Tools and Communication Introduction The default configuration DMC-40x0, with the default CMB-41012 communication board, has two RS232 ports and 1 Ethernet port. An additional Ethernet port is available with the CMB-41022. The main RS-232 port is the data set and can be configured through the jumpers on the top of the controller.
  • Page 56: Unsolicited Messages Generated By Controller

    question mark (?) if the instruction was not valid. For example, the controller will respond to commands which are sent via the main RS-232 port back through the RS-232 port, and to commands which are sent via the Ethernet port back through the Ethernet port.
  • Page 57 Configure your PC for 8-bit data, one start-bit, one stop-bit, full duplex and no parity. The baud rate for the RS232 communication can be selected by setting the proper switch configuration on the front panel according to the table below. Baud Rate Selection JP1 JUMPER SETTINGS BAUD RATE...
  • Page 58: Ethernet Configuration

    Ethernet Configuration Communication Protocols The Ethernet is a local area network through which information is transferred in units known as packets. Communication protocols are necessary to dictate how these packets are sent and received. The DMC-40x0 supports two industry standard protocols, TCP/IP and UDP/IP. The controller will automatically respond in the format in which it is contacted.
  • Page 59 NOTE: if multiple boards are on the network – use the serial numbers to differentiate them. Be sure that there is only one BOOT-P or DHCP server running. If your network has DHCP or BOOT-P running, it may automatically assign an IP address to the DMC-40x0 controller upon linking it to the network.
  • Page 60: Modbus

    Multicasting A multicast may only be used in UDP/IP and is similar to a broadcast (where everyone on the network gets the information) but specific to a group. In other words, all devices within a specified group will receive the information that is sent in a multicast.
  • Page 61 Modbus Examples Example #1 DMC-4040 connected as a Modbus master to a RIO-47120 via Modbus. The DMC-4040 will set or clear all 16 of the RIO’s digital outputs 1. Begin by opening a connection to the RIO which in our example has IP address 192.168.1.120 (Issued to DMC-4040) IHB=192,168,1,120<502>2...
  • Page 62 Example #2 DMC-4040 connected as a Modbus master to a 3rd party PLC. The DMC-4040 will read the value of analog inputs 3 and 4 on the PLC located at addresses 40006 and 40008 respectively. The PLC stores values as 32-bit floating point numbers which is common.
  • Page 63: Data Record

    3. Send the appropriate MB command. Use function code 16. Start at address 30000 and write to 2 registers using the data in the array pump[] MBB=,16,30000,2,pump[] Results: Analog output will be set to 0x40933333 which is 4.6V Data Record The DMC-40x0 can provide a binary block of status information with the use of the QR and DR commands.
  • Page 64 general output block 7 (outputs 57-64) 70-71 UW Buffer space remaining – S Plane general output block 8 (outputs 65-72) 72-73 UW segment count of coordinated move for T plane general output block 9 (outputs 73-80) 74-75 UW Coordinated move status for T plane – see bit field map below 26-27 Reserved...
  • Page 65 Axis Information ADDR TYPE ITEM ADDR TYPE ITEM 82-83 A axis status – see bit field map below 226-227 E axis status – see bit field map below A axis switches – see bit field map below E axis switches – see bit field map below A axis stop code E axis stop code 86-89...
  • Page 66 Reserved Reserved 222-225 D User defined variable (ZD) 366-369 H User defined variable (ZH) Will be either a Signed Word or Unsigned Word depending upon AQ setting. See AQ in the Command Reference for more information. Chapter 4 Software Tools and Communication ▫ 61 DMC-40x0 User Manual...
  • Page 67 Data Record Bit Field Maps Header Information - Byte 0, 1 of Header: BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 I Block Present T Block Present S Block Present in Data Record in Data Record in Data Record BIT 7...
  • Page 68 Amplifier Status (4 Bytes) BIT 31 BIT 30 BIT 29 BIT 28 BIT 27 BIT 26 BIT 25 BIT 24 ELO Active ELO Active (Axis E-H) (Axis A-D) BIT 23 BIT 22 BIT 21 BIT 20 BIT 19 BIT 18 BIT 17 BIT 16 Peak Current...
  • Page 69: Galilsuite (Windows And Linux)

    GalilSuite (Windows and Linux) GalilSuite is Galil's latest set of development tools for the latest generation of Galil controllers. It is highly recommended for all first-time purchases of Galil controllers as it provides easy set-up, tuning and analysis. GalilSuite replaces GalilToolS with an improved user-interface, real-time scopes, advanced tuning methods, and communications utilities.
  • Page 70: Creating Custom Software Interfaces

    Creating Custom Software Interfaces Galil provides programming tools so that users can develop their own custom software interfaces to a Galil controller. For new applications, Galil recommends the GalilTools Communication Libraries. HelloGalil – Quick Start to PC programming For programmers developing Windows applications that communicate with a Galil controller, the HelloGalil library of quick start projects immediately gets you communicating with the controller from the programming language of your choice.
  • Page 71 C++ Library (Windows and Linux) Both Full and Lite versions of GalilTools ship with a native C++ communication library. The Linux version (libGalil.so) is compatible with g++ and the Windows version (Galil1.dll) with Visual C++ 2008. Contact Galil if another version of the C++ library is required.
  • Page 72: Chapter 5 Command Basics

    Chapter 5 Command Basics Introduction The DMC-40x0 provides over 100 commands for specifying motion and machine parameters. Commands are included to initiate action, interrogate status and configure the digital filter. These commands are sent in ASCII. The DMC-40x0 instruction set is BASIC-like and easy to use. Instructions consist of two uppercase letters that correspond phonetically with the appropriate function.
  • Page 73: Controller Response To Data

    For specifying data for the A,B,C and D axes, commas are used to separate the axes. If no data is specified for an axis, a comma is still needed as shown in the examples below. If no data is specified for an axis, the previous value is maintained.
  • Page 74: Interrogating The Controller

    ?TC1 Tell Code command 1 Unrecognized command Returned response There are many reasons for receiving an invalid command response. The most common reasons are: unrecognized command (such as typographical entry or lower case), command given at improper time (such as during motion), or a command out of range (such as exceeding maximum speed).
  • Page 75 Operands Most DMC-40x0 commands have corresponding operands that can be used for interrogation. Operands must be used inside of valid DMC expressions. For example, to display the value of an operand, the user could use the command: MG ‘operand’ where ‘operand’ is a valid DMC operand All of the command operands begin with the underscore character (_).
  • Page 76: Chapter 6 Programming Motion

    The DMC-4010 are single axis controllers and use X-axis motion only. Likewise, the DMC-4020 use X and Y, the DMC-4030 use X,Y, and Z, and the DMC-4040 use X,Y,Z, and W. The DMC-4050 use A,B,C,D, and E. The DMC-4060 use A,B,C,D,E, and F. The DMC-4070 use A,B,C,D,E,F, and G. The DMC-4080 use the axes A,B,C,D,E,F,G, and H.
  • Page 77: Independent Axis Positioning

    Moving along arbitrary profiles or Contour Mode CM, CD, DT mathematically prescribed profiles such as sine or cosine trajectories. Teaching or Record and Play Back Contour Mode with Teach (Record and Play- CM, CD, DT, RA, RD, Back) Backlash Correction Dual Loop (Auxiliary Encoder) Following a trajectory based on a master Electronic Cam...
  • Page 78 The lower case specifiers (x,y,z,w) represent position values for each axis. The DMC-40x0 also allows use of single axis specifiers such as PRY=2000 Operand Summary - Independent Axis OPERAND DESCRIPTION _ACx Return acceleration rate for the axis specified by ‘x’ _DCx Return deceleration rate for the axis specified by ‘x’...
  • Page 79: Independent Jogging

    VELOCITY (COUNTS/SEC) X axis velocity profile 20000 Y axis velocity profile 15000 Z axis velocity profile 10000 5000 TIME (ms) Figure 6.1: Velocity Profiles of XYZ Notes on Figure 6.1: The X and Y axis have a ‘trapezoidal’ velocity profile, while the Z axis has a ‘triangular’ velocity profile.
  • Page 80: Position Tracking

    Operand Summary - Independent Axis OPERAND DESCRIPTION _ACx Return acceleration rate for the axis specified by ‘x’ _DCx Return deceleration rate for the axis specified by ‘x’ _SPx Returns the jog speed for the axis specified by ‘x’ _TVx Returns the actual velocity of the axis specified by ‘x’ (averaged over 0.25 sec) Example - Jog in X only Jog X motor at 50000 count/s.
  • Page 81 The position tracking mode shouldn’t be confused with the contour mode. The contour mode allows the user to generate custom profiles by updating the reference position at a specific time rate. In this mode, the position can be updated randomly or at a fixed time rate, but the velocity profile will always be trapezoidal with the parameters specified by AC, DC, and SP.
  • Page 82 commanded, the controller decelerates at the rate specified by the DC command. The controller then ramps the velocity in up to the value set with SP in the opposite direction traveling to the new specified absolute position. Figure 6.3 the velocity profile is triangular because the controller doesn’t have sufficient time to reach the set speed of 50000 counts/sec before it is commanded to change direction.
  • Page 83 Figure 6.4: Position and Velocity vs Time (msec) for Motion 3 Figure 6.5: Position and Velocity vs Time (msec) for Motion 3 with IT 0.1 Note the controller treats the point where the velocity passes through zero as the end of one move, and the beginning of another move.
  • Page 84: Linear Interpolation Mode

    Linear Interpolation Mode The DMC-40x0 provides a linear interpolation mode for 2 or more axes. In linear interpolation mode, motion between the axes is coordinated to maintain the prescribed vector speed, acceleration, and deceleration along the specified path. The motion path is described in terms of incremental distances for each axis. An unlimited number of incremental segments may be given in a continuous move sequence, making the linear interpolation mode ideal for following a piece-wise linear path.
  • Page 85 An Example of Linear Interpolation Motion: #LMOVE label DP 0,0 Define position of X and Y axes to be 0 LMXY Define linear mode between X and Y axes. LI 5000,0 Specify first linear segment LI 0,5000 Specify second linear segment End linear segments VS 4000 Specify vector speed...
  • Page 86 Command Summary - Linear Interpolation COMMAND DESCRIPTION LM xyzw Specify axes for linear interpolation LM abcdefgh (same) controllers with 5 or more axes Returns number of available spaces for linear segments in DMC-40x0 sequence buffer. Zero means buffer full. 511 means buffer empty. LI x,y,z,w <...
  • Page 87: Vector Mode: Linear And Circular Interpolation Motion

    The result is shown in Figure 6.6: Linear Interpolation. 30000 27000 POSITION W 3000 4000 36000 40000 POSITION Z FEEDRATE TIME (sec) VELOCITY Z-AXIS TIME (sec) VELOCITY W-AXIS TIME (sec) Figure 6.6: Linear Interpolation Example - Multiple Moves This example makes a coordinated linear move in the XY plane. The Arrays VX and VY are used to store 750 incremental distances which are filled by the program #LOAD.
  • Page 88 DMC-40x0 performs all the complex computations of linear and circular interpolation, freeing the host PC from this time intensive task. The coordinated motion mode is similar to the linear interpolation mode. Any pair of two axes may be selected for coordinated motion consisting of linear and circular segments.
  • Page 89 Additional commands The commands VS n, VA n and VD n are used for specifying the vector speed, acceleration, and deceleration. IT is the s curve smoothing constant used with coordinated motion. Specifying Vector Speed for Each Segment: The vector speed may be specified by the immediate command VS. It can also be attached to a motion segment with the instructions VP x,y <...
  • Page 90 Example: Assume an XY table with the Z-axis controlling a knife. The Z-axis has a 2000 quad counts/rev encoder and has been initialized after power-up to point the knife in the +Y direction. A 180° circular cut is desired, with a radius of 3000, center at the origin and a starting point at (3000,0).
  • Page 91 When AV is used as an operand, _AV returns the distance traveled along the sequence. The operands _VPX and _VPY can be used to return the coordinates of the last point specified along the path. Example: Traverse the path shown in Figure 6.7. Feed rate is 20000 counts/sec. Plane of motion is XY VM XY Specify motion plane VS 20000...
  • Page 92 expressed in units of resolution, and each circular arc is defined by the arc radius, the starting angle, and the angular width of the arc. The zero angle corresponds to the positive direction of the X-axis and the CCW direction of rotation is positive.
  • Page 93 Velocity 10000 time (s) 0.05 0.357 0.407 Figure A.9: Vector Velocity Profile The acceleration time, Ta, is given by 100000    0 05 2000000 The slew time, Ts, is given by 35708      0 307 100000 The total motion time, Tt, is given by: ...
  • Page 94: Electronic Gearing

    Electronic Gearing This mode allows up to 8 axes to be electronically geared to some master axes. The masters may rotate in both directions and the geared axes will follow at the specified gear ratio. The gear ratio may be different for each axis and changed during motion.
  • Page 95 Figure 6.11: Velocity counts/sec vs. Time (msec) Instantaneous Gearing Engagement Figure 6.12: Velocity (counts/sec) vs. Time (msec) Ramped Gearing The slave axis for each figure is shown on the bottom portion of the figure; the master axis is shown on the top portion.
  • Page 96 Question: What is the effect of the ramped gearing? Answer: Below, in the example titled Electronic Gearing, gearing would take effect immediately. From the start of gearing if the master traveled 6000 counts, the slaves would travel 6792 counts and 270 counts. Using the ramped gearing, the slave will engage gearing gradually.
  • Page 97: Electronic Cam

    For example, assume that a gantry is driven by two axes, X,Y, on both sides. This requires the gantry mode for strong coupling between the motors. The X-axis is the master and the Y-axis is the follower. To synchronize Y with the commanded position of X, use the instructions: GA, CX Specify the commanded position of X as master for Y.
  • Page 98 the positions of both x and y are redefined as zero. To specify the master cycle and the slave cycle change, we use the instruction EM. EM x,y,z,w where x,y,z,w specify the cycle of the master and the total change of the slaves over one cycle. The cycle of the master is limited to 8,388,607 whereas the slave change per cycle is limited to 2,147,483,647.
  • Page 99 Step 7. Disengage the slave motion To disengage the cam, use the command EQ x,y,z,w where x,y,z,w are the master positions at which the corresponding slave axes are disengaged. 3000 2250 1500 2000 4000 6000 Master X Figure 6.13: Electronic Cam Example This disengages the slave axis at a specified master position.
  • Page 100 This is done with the program: INSTRUCTION INTERPRETATION #RUN Label Enable cam PA,500 starting position SP,5000 Y speed Move Y motor After Y moved Wait for start signal EG,1000 Engage slave AI - 1 Wait for stop signal EQ,1000 Disengage slave Command Summary - Electronic CAM Command Description...
  • Page 101 INSTRUCTION INTERPRETATION #A;V1=0 Label; Initialize variable PA 0,0;BGXY;AMXY Go to position 0,0 on X and Y axes EA Z Z axis as the Master for ECAM EM 0,0,4000 Change for Z is 4000, zero for X, Y EP400,0 ECAM interval is 400 counts with zero start ET[0]=0,0 When master is at 0 position;...
  • Page 102: Pvt Mode

    PVT Mode The DMC-40x0 controllers now supports a mode of motion referred to as “PVT.” This mode allows arbitrary motion profiles to be defined by position, velocity and time individually on all 8 axes. This motion is designed for systems where the load must traverse a series of coordinates with no discontinuities in velocity.
  • Page 103 The “t” value is entered in samples, which will depend on the TM setting. With the default TM of 1000, one sample is 976us. This means that a “t” value of 1024 will yield one second of motion. The velocity value, “v” will always be in units of counts per second, regardless of the TM setting.
  • Page 104 The DMC program is shown below and the results can be seen in Figure 6.16. INSTRUCTION INTERPRETATION #PVT Label PVX = 57,437,256 Incremental move of 57 counts in 256 samples with a final velocity of 437 counts/sec PVX = 151,750,256 Incremental move of 151 counts in 256 samples with a final velocity of 750 counts/sec PVX = 214,937,256 Incremental move of 214 counts in 256 samples with a final velocity of 937 counts/sec...
  • Page 105: Contour Mode

    INSTRUCTION INTERPRETATION #PVT Label PVA = 500,2000,500 point in Figure 6.17 - A axis PVB = 500,5000,500 point in Figure 6.17 - B axis PVA = 1000,4000,1200 point in Figure 6.17 - A axis PVB = 4500,0,1200 point in Figure 6.17 - B axis PVA = 1000,4000,750 point in Figure 6.17 - A axis PVB = -1000,1000,750...
  • Page 106 A contour is described by position increments which are described with the command, CD x,y,z,w over a time interval, DT n. The parameter, n, specifies the time interval. The time interval is defined as 2 sample period (1 ms for TM1000), where n is a number between 1 and 8. The controller performs linear interpolation between the specified increments, where one point is generated for each sample.
  • Page 107 Command Summary - Contour Mode COMMAND DESCRIPTION CM XYZW Specifies which axes for contouring mode. Any non-contouring axes may be operated in other modes. Contour axes for DMC-4080 CM ABCDEFGH CD x,y,z,w ± Specifies position increment over time interval. Range is 32,000.
  • Page 108 The following array commands are used: DM C[n] Dimension array RA C[] Specify array for automatic record (up to 4 for DMC-4040) RD _TPX Specify data for capturing (such as _TPX or _TPZ) RC n,m Specify capture time interval where n is 2...
  • Page 109: Virtual Axis

    Record and Playback Example: #RECORD Begin Program DM XPOS[501] Dimension array with 501 elements RA XPOS[] Specify automatic record RD _TPX Specify X position to be captured Turn X motor off Begin recording; 4 msec interval (at TM1000) #A;JP#A,_RC=1 Continue until done recording #COMPUTE Compute DX DM DX[500]...
  • Page 110: Stepper Motor Operation

    This can be performed by commanding the X and N axes to perform circular motion. Note that the value of VS must be VS=2π * R * F where R is the radius, or amplitude and F is the frequency in Hz. Set VA and VD to maximum values for the fastest acceleration.
  • Page 111 First, the controller generates a motion profile in accordance with the motion commands. Second, the profiler generates pulses as prescribed by the motion profile. The pulses that are generated by the motion profiler can be monitored by the command, RP (Reference Position). RP gives the absolute value of the position as determined by the motion profiler.
  • Page 112: Stepper Position Maintenance Mode (Spm)

    Operand Summary - Stepper Motor Operation OPERAND DESCRIPTION _DEx Contains the value of the step count register for the ‘x’ axis _DPx Contains the value of the main encoder for the ‘x’ axis _ITx Contains the value of the Independent Time constant for the ‘x’ axis _KSx Contains the value of the Stepper Motor Smoothing Constant for the ‘x’...
  • Page 113 Error Limit The value of QS is internally monitored to determine if it exceeds a preset limit of three full motor steps. Once the value of QS exceeds this limit, the controller then performs the following actions: 1. The motion is maintained or is stopped, depending on the setting of the OE command. If OE=0 the axis stays in motion, if OE=1 the axis is stopped.
  • Page 114 Example: Error Correction The following code demonstrates what is necessary to set up SPM mode for the X axis, detect error, stop the motor, correct the error, and return to the main code. The drive is a full step drive, with a 1.8 step motor and 4000 count/rev encoder.
  • Page 115: Dual Loop (Auxiliary Encoder)

    Example: Friction Correction The following example illustrates how the SPM mode can be useful in correcting for X axis friction after each move when conducting a reciprocating motion. The drive is a 1/64th microstepping drive with a 1.8 step motor and 4000 count/rev encoder.
  • Page 116 Using the CE Command Main Encoder Second Encoder Normal quadrature Normal quadrature Pulse & direction Pulse & direction Reverse quadrature Reversed quadrature Reverse pulse & direction Reversed pulse & direction For example, to configure the main encoder for reversed quadrature, m=2, and a second encoder of pulse and direction, n=4, the total is 6, and the command for the X axis is: CE 6 Additional Commands for the Auxiliary Encoder...
  • Page 117: Motion Smoothing

    activates the dual loop for the four axes and 0,0,0,0 disables the dual loop. Note: that the dual loop compensation depends on the backlash magnitude, and in extreme cases will not stabilize the loop. The proposed compensation procedure is to start with KP=0, KI=0 and to maximize the value of KD under the condition DV1.
  • Page 118 IT x,y,z,w Independent time constant The command, IT, is used for smoothing independent moves of the type JG, PR, PA and to smooth vector moves of the type VM and LM. The smoothing parameters, x,y,z,w and n are numbers between 0 and 1 and determine the degree of filtering. The maximum value of 1 implies no filtering, resulting in trapezoidal velocity profiles.
  • Page 119: Homing

    Homing The Find Edge (FE) and Home (HM) instructions may be used to home the motor to a mechanical reference. This reference is connected to the Home input line. The HM command initializes the motor to the encoder index pulse in addition to the Home input.
  • Page 120 Example: Homing Instruction Interpretation #HOME Label CN,-1 Configure the polarity of the home input AC 1000000 Acceleration Rate DC 1000000 Deceleration Rate SP 5000 Speed for Home Search Home Begin Motion After Complete MG “AT HOME” Send Message Figure 6.21 shows the velocity profile from the homing sequence of the example program above. For this profile, the switch is normally closed and CN,-1.
  • Page 121: High Speed Position Capture (The Latch Function)

    Command Summary - Homing Operation Command Description FE XYZW Find Edge Routine. This routine monitors the Home Input FI XYZW Find Index Routine - This routine monitors the Index Input HM XYZW Home Routine - This routine combines FE and FI as Described Above SC XYZW Stop Code TS XYZW...
  • Page 122: Chapter 7 Application Programming

    Chapter 7 Application Programming Overview The DMC-40x0 provides a powerful programming language that allows users to customize the controller for their particular application. Programs can be downloaded into the DMC-40x0 memory freeing the host computer for other tasks. However, the host computer can send commands to the controller at any time, even while a program is being executed.
  • Page 123 #BEGIN1 Invalid labels #1Square #123 A Simple Example Program: #START Beginning of the Program PR 10000,20000 Specify relative distances on X and Y axes BG XY Begin Motion Wait for motion complete WT 2000 Wait 2 sec JP #START Jump to label START End of Program The above program moves X and Y 10000 and 20000 units.
  • Page 124: Executing Programs - Multitasking

    Note: The NO command is an actual controller command. Therefore, inclusion of the NO commands will require process time by the controller. Difference between NO and ' using the GalilTools software The GalilTools software will treat an apostrophe (') commend different from an NO when the compression algorithm is activated upon a program download (line >...
  • Page 125: Debugging Programs

    Debugging Programs The DMC-40x0 provides commands and operands which are useful in debugging application programs. These commands include interrogation commands to monitor program execution, determine the state of the controller and the contents of the controllers program, array, and variable space. Operands also contain important status information which can help to debug a program.
  • Page 126: Program Flow Commands

    Operands In general, all operands provide information which may be useful in debugging an application program. Below is a list of operands which are particularly valuable for program debugging. To display the value of an operand, the message command may be used. For example, since the operand, _ED contains the last line of program execution, the command MG _ED will display this line number.
  • Page 127 DMC-40x0 Event Triggers Command Function AM X Y Z W or S Halts program execution until motion is complete on the (A B C D E F G H) specified axes or motion sequence(s). AM with no parameter tests for motion complete on all axes. This command is useful for separating motion sequences in a program.
  • Page 128 Event Trigger - Set Output after Distance Set output bit 1 after a distance of 1000 counts from the start of the move. The accuracy of the trippoint is the speed multiplied by the sample period. #SETBIT;' Label SP 10000;' Speed is 10000 PA 20000;' Specify Absolute position...
  • Page 129 Event Trigger - Multiple Move with Wait This example makes multiple relative distance moves by waiting for each to be complete before executing new moves. #MOVES;' Label PR 12000;' Distance SP 20000;' Speed AC 100000;' Acceleration BGX;' Start Motion AD 10000;' Wait a distance of 10,000 counts SP 5000;' New Speed...
  • Page 130 Conditional Jumps The DMC-40x0 provides Conditional Jump (JP) and Conditional Jump to Subroutine (JS) instructions for branching to a new program location based on a specified condition. The conditional jump determines if a condition is satisfied and then branches to a new location or subroutine. Unlike event triggers, the conditional jump instruction does not halt the program sequence.
  • Page 131 In this example, this statement will cause the program to jump to the label #TEST if v1 is less than v2 and v3 is less than v4. To illustrate this further, consider this same example with an additional condition: JP #TEST, ((v1<v2) & (v3<v4)) | (v5<v6) This statement will cause the program to jump to the label #TEST under two conditions;...
  • Page 132 and has no arguments. If the argument of the IF command evaluates false, the controller will skip commands until the ELSE command. If the argument for the IF command evaluates true, the controller will execute the commands between the IF and ELSE command. Nesting IF Conditional Statements The DMC-40x0 allows for IF conditional statements to be included within other IF conditional statements.
  • Page 133 Begin Main Program Clear Output Bit 1 (pick up pen) VP 1000,1000;LE;BGS Define vector position; move pen Wait for after motion trippoint Set Output Bit 1 (put down pen) JS #Square;CB1 Jump to square subroutine End Main Program #Square Square subroutine v1=500;JS #L Define length of side v1=-v1;JS #L...
  • Page 134 For example, the #POSERR subroutine will automatically be executed when any axis exceeds its position error limit. The commands in the #POSERR subroutine could decode which axis is in error and take the appropriate action. In another example, the #ININT label could be used to designate an input interrupt subroutine. When the specified input occurs, the program will be executed automatically.
  • Page 135 Example - Motion Complete Timeout #BEGIN Begin main program TW 1000 Set the time out to 1000 ms PA 10000 Position Absolute command Begin motion Motion Complete trippoint End main program #MCTIME Motion Complete Subroutine MG “X fell short” Send out a message End subroutine This simple program will issue the message “X fell short”...
  • Page 136 Example - Command Error w/Multitasking Begin thread 0 (continuous loop) JP#A End of thread 0 Begin thread 1 N=-1 Create new variable KP N Set KP to value of N, an invalid value Issue invalid command End of thread 1 #CMDERR Begin command error subroutine IF _TC=6...
  • Page 137 #LOOP Simple program loop JP#LOOP #TCPERR Ethernet communication error auto routine MG {P1}_IA4 Send message to serial port indicating which handle did not receive proper acknowledgment. Example – Amplifier Error The program below will execute upon the detection of an error from an internal Galil Amplifier. The bits in TA1 will be set for all axes that have an invalid hall state even if BR1 is set for those axes, this is handled with the mask variable shown in the code below.
  • Page 138 Example: Variable, and an Important Note about Creating Global Variables #Var value=5 ;'a value to be passed by reference global=8 ;'a global variable JS#SUM(&value,1,2,3,4,5,6,7) ;'note first arg passed by reference value ;'message out value after subroutine. ;'message out returned value #SUM ;NO(* ^a,^b,^c,^d,^e,^f,^g) ^a=^b+^c+^d+^e+^f+^g+^h+global...
  • Page 139 Example: Local Scope #Local JS#POWER(2,2) MG_JS JS#POWER(2,16) MG_JS JS#POWER(2,-8) MG_JS ± #POWER ;NO(base ^a,exponent^b) Returns base^exponent power. integer only ^c=1 ;'unpassed variable space (^c-^h) can be used as local scope variables ^b=0 ;'special case, exponent = 0 EN,,1 ENDIF ^b<0 ;'special case, exponent <...
  • Page 140 General Program Flow and Timing information This section will discuss general programming flow and timing information for Galil programming. REM vs. NO or ' comments There are 2 ways to add comments to a .dmc program. REM statements or NO/ ' comments. The main difference between the 2 is that REM statements are stripped from the program upon download to the controller and NO or ' comments are left in the program.
  • Page 141: Mathematical And Functional Expressions

    AT0;'set initial AT time reference WT 1000,1;'wait 1000 samples t1=TIME AT 4000,1;'wait 4000 samples from last time reference t2=TIME-t1 REM in the above scenario, t2 will be ~3000 because AT 4000,1 will have REM paused program execution from the time reference of AT0 REM since the WT 1000,1 took 1000 samples, there was only 3000 samples left REM of the “4000”...
  • Page 142 Mathematical operations are executed from left to right. Calculations within parentheses have precedence. Examples: speed = 7.5*V1/2 The variable, speed, is equal to 7.5 multiplied by V1 and divided by 2 count = count+2 The variable, count, is equal to the current value plus 2. result =_TPX-(@COS[45]*40) Puts the position of X - 28.28 in result.
  • Page 143 #TEST Begin main program IN “ENTER”,len{S6} Input character string of up to 6 characters into variable ‘len’ Flen=@FRAC[len] Define variable ‘Flen’ as fractional part of variable ‘len’ Flen=$10000*Flen Shift Flen by 32 bits (IE - convert fraction, Flen, to integer) len1=(Flen&$00FF) Mask top byte of Flen and set this value to variable ‘len1’...
  • Page 144: Variables

    Variables For applications that require a parameter that is variable, the DMC-40x0 provides 510 variables. These variables can be numbers or strings. A program can be written in which certain parameters, such as position or speed, are defined as variables. The variables can later be assigned by the operator or determined by program calculations. For example, a cut-to-length application may require that a cut length be variable.
  • Page 145: Operands

    SP vS*2000 Assign vS*2000 to SP command Displaying the value of variables at the terminal Variables may be sent to the screen using the format, variable=. For example, v1= , returns the value of the variable v1. Example - Using Variables for Joystick The example below reads the voltage of an X-Y joystick and assigns it to variables vX and vY to drive the motors at proportional velocities, where: 10 Volts = 3000 rpm = 200000 c/sec...
  • Page 146: Arrays

    Keyword Function _BGn *Returns a 1 if motion on axis ‘n’ is complete, otherwise returns 0. *Returns serial # of the board. *Returns the number of arrays available *Returns the number of available labels for programming *Returns the available array memory _HMn *Returns status of Home Switch (equals 0 or 1) _LFn...
  • Page 147 Examples: DM speed[10] Dimension speed Array speed[0]=7650.2 Assigns the first element of the array, 'speed' the value 7650.2 speed[0]= Returns array element value posx[10]=_TPX Assigns the 10 element of the array 'posx' the returned value from the tell position command. con[1]=@COS[pos]*2 Assigns the second element of the array 'con' the cosine of the variable POS multiplied by 2.
  • Page 148 Command Summary - Automatic Data Capture Command Description n[ ],m[ ],o[ ],p[ ] Selects up to eight arrays for data capture. The arrays must be defined with the DM command. RD type1,type2,type3,type4 Selects the type of data to be recorded, where type1, type2, type3, and type 4 represent the various types of data (see table below).
  • Page 149: Input Of Data (Numeric And String)

    De-allocating Array Space Array space may be de-allocated using the DA command followed by the array name. DA*[0] deallocates all the arrays. Input of Data (Numeric and String) Sending Data from a Host The DMC unit can accept ASCII strings from a host. This is the most common way to send data to the controller such as setting variables to numbers or strings.
  • Page 150 Example Instruction Interpretation JP #LOOP,P2CD< >3 Checks to see if status code is 3 (number received) JP #P,P2CH="V" Checks if last character received was a V PR P2NM Assigns received number to position JS #XAXIS,P2ST="X" Checks to see if received string is X Using Communication Interrupt The DMC-40x0 provides a special interrupt for communication allowing the application program to be interrupted by input from the user.
  • Page 151: Output Of Data (Numeric And String)

    #NMLP Routine to check input from terminal JP #NMLP,P2CD<2 Jump to error if string JP #ERROR,P2CD=2 Read value val=P2NM End subroutine #ERROR;CI-1 Error Routine MG "INVALID-TRY AGAIN" Error message JP #NMLP Inputting String Variables String variables with up to six characters may be input using the specifier, {Sn} where n represents the number of string characters to be input.
  • Page 152 Numeric data may be formatted using the {Fn.m} expression following the completed MG statement. {$n.m} formats data in HEX instead of decimal. The actual numerical value will be formatted with n characters to the left of the decimal and m characters to the right of the decimal. Leading zeros will be used to display specified format. For example: MG "The Final Value is", result {F5.2} If the value of the variable result is equal to 4.1, this statement returns the following:...
  • Page 153 Example - Printing a Variable and an Array element Instruction Interpretation #DISPLAY Label DM posA[7] Define Array posA with 7 entries PR 1000 Position Command Begin After Motion v1=_TPA Assign Variable v1 posA[1]=_TPA Assign the first entry Print v1 Interrogation Commands The DMC-40x0 has a set of commands that directly interrogate the controller.
  • Page 154 Adding Leading Zeros from Response to Interrogation Commands The leading zeros on data returned as a response to interrogation commands can be added by the use of the command, LZ. The LZ command is set to a default of 1. Disables the LZ function Tell Position Interrogation Command -0000000009, 0000000005...
  • Page 155: Hardware I/O

    Instruction Interpretation v1=10 Assign v1 Return v1 :0000000010.0000 Default Format v1={F4.2} Specify local format :0010.00 New format v1={$4.2} Specify hex format :$000A.00 Hex value v1="ALPHA" Assign string "ALPHA" to v1 v1={S4} Specify string format first 4 characters :ALPH The local format is also used with the MG command. Converting to User Units Variables and arithmetic operations make it easy to input data in desired user units such as inches or RPM.
  • Page 156 Example- Output Bit The Output Bit (OB) instruction is useful for setting or clearing outputs depending on the value of a variable, array, input or expression. Any non-zero value results in a set bit. Instruction Interpretation Set Output 1 if the variable POS is non-zero. Clear Output 1 if POS equals 0. OB1, POS OB 2, @IN [1] Set Output 2 if Input 1 is high.
  • Page 157 Instruction Interpretation #S;JG 4000 Set speed AI 1;BGA Begin after input 1 goes high AI -1;STA Stop after input 1 goes low AMA;JP #S After motion, repeat The Auxiliary Encoder Inputs The auxiliary encoder inputs can be used for general use. For each axis, the controller has one auxiliary encoder and each auxiliary encoder consists of two inputs, channel A and channel B.
  • Page 158 Example - Input Interrupt Instruction Interpretation Label #A II 1 Enable input 1 for interrupt function JG 30000,-20000 Set speeds on A and B axes BG AB Begin motion on A and B axes Label #B TP AB Report A and B axes positions WT 1000 Wait 1000 milliseconds JP #B...
  • Page 159: Extended I/O Of The Dmc-40X0 Controller

    Instruction Interpretation #CONT Label AC 80000;DC 80000 Acceleration rate JG 0 Start job mode Start motion #LOOP vp=@AN[1]*1000 Compute desired position ve=vp-_TPA Find position error vel=ve*20 Compute velocity JG vel Change velocity JP #LOOP Change velocity Example – Low Pass Digital Filter for the Analog inputs Because the analog inputs on the Galil controller can be used to close a position loop, they have a very high bandwidth and will therefor read noise that comes in on the analog input.
  • Page 160 8-Bit I/O Block Block Binary Representation Decimal Value for Block 17-24 25-32 33-40 41-48 The simplest method for determining n: Step 1. Determine which 8-bit I/O blocks to be configured as outputs. Step 2. From the table, determine the decimal value for each I/O block to be set as an output. Step 3.
  • Page 161: Example Applications

    MG @IN[17] the controller will return the state of the least significant bit of block 2 (assuming block 2 is configured as an input). Example Applications Wire Cutter An operator activates a start switch. This causes a motor to advance the wire a distance of 10”. When the motion stops, the controller generates an output signal which activates the cutter.
  • Page 162 X-Y Table Controller An X-Y-Z system must cut the pattern shown in Figure 7.2. The X-Y table moves the plate while the Z-axis raises and lowers the cutting tool. The solid curves in Figure 7.2 indicate sections where cutting takes place. Those must be performed at a feed rate of 1 inch per second.
  • Page 163 VS 40000 PR,,80000 Raise Z VP -37600,-16000 Return XY to start VS 200000 Figure 7.2: Motor Velocity and the Associated Input/Output signals Speed Control by Joystick The speed of a motor is controlled by a joystick. The joystick produces a signal in the range between -10V and +10V.
  • Page 164 Position Control by Joystick This system requires the position of the motor to be proportional to the joystick angle. Furthermore, the ratio between the two positions must be programmable. For example, if the control ratio is 5:1, it implies that when the joystick voltage is 5 Volts, corresponding to 1028 counts, the required motor position must be 5120 counts.
  • Page 165: Using The Dmc Editor To Enter Programs

    is only 995, implying that X has a position error of 5 counts, which will be eliminated once the motor settles. This implies that the correction needs to be only 15 counts, since 5 counts out of the 20 would be corrected by the X- axis.
  • Page 166 Typing the return key causes the current line of entered instructions to be saved. The editor will automatically advance to the next line. Thus, hitting a series of <RETURN> will cause the editor to advance a series of lines. Note, changes on a program line will not be saved unless a <return> is given. <cntrl>P The <cntrl>P command moves the editor to the previous line.
  • Page 167: Chapter 8 Hardware & Software Protection

    Chapter 8 Hardware & Software Protection Introduction The DMC-40x0 provides several hardware and software features to check for error conditions and to inhibit the motor on error. These features help protect the various system components from damage. WARNING: Machinery in motion can be dangerous! It is the responsibility of the user to design effective error handling and safety protection as part of the machine.
  • Page 168: Software Protection

    Input Protection Lines General Abort A low input stops commanded motion instantly without a controlled deceleration. For any axis in which the Off- On-Error function is enabled, the amplifiers will be disabled. This could cause the motor to ‘coast’ to a stop. If the Off-On-Error function is not enabled, the motor will instantaneously stop and servo at the current position.
  • Page 169 The units of the error limit are quadrature counts. The error is the difference between the command position and actual encoder position. If the absolute value of the error exceeds the value specified by ER, the controller will generate several signals to warn the host system of the error condition. These signals include: Signal or Function State if Error Occurs # POSERR...
  • Page 170 Example: DP0,0,0 Define Position BL -2000,-4000,-8000 Set Reverse position limit FL 2000,4000,8000 Set Forward position limit JG 2000,2000,2000 BG XYZ Begin (motion stops at forward limits) Off-On-Error The DMC-40x0 controller has a built in function which can turn off the motors under certain error conditions. This function is known as ‘Off-On-Error”.
  • Page 171 Limit Switch Example: #A;JP #A;EN Dummy Program #LIMSWI Limit Switch Utility V1=_LFX Check if forward limit V2=_LRX Check if reverse limit JP#LF,V1=0 Jump to #LF if forward JP#LR,V2=0 Jump to #LR if reverse JP#END Jump to end MG “FORWARD LIMIT” Send message STX;AMX Stop motion...
  • Page 172: Chapter 9 Troubleshooting

    Chapter 9 Troubleshooting Overview The following discussion may help you get your system to work. Potential problems have been divided into groups as follows: 1. Installation 2. Stability and Compensation 3. Operation 4. Error Light (Red LED) The various symptoms along with the cause and the remedy are described in the following tables. Installation SYMPTOM DIAGNOSIS...
  • Page 173 Encoder Position Drifts Significant noise can be seen 1. Noise Shield encoder cables on MA+ and / or MB+ encoder Avoid placing power cables near signals encoder cables Avoid Ground Loops Use differential encoders Use ±12V encoders Stability SYMPTOM DIAGNOSIS CAUSE REMEDY Servo motor runs away when...
  • Page 174 the controller back to factory default conditions so it is recommended that all motor and I/O cables be removed for safety while performing the Master Reset. Cables can be plugged back in after the correct settings have been loaded back to the controller (when necessary). To perform a Master Reset - find the jumper location labeled MR or MRST on the controller and put a jumper across the two pins.
  • Page 175: Chapter 10 Theory Of Operation

    Chapter 10 Theory of Operation Overview The following discussion covers the operation of motion control systems. A typical motion control system consists of the elements shown in Figure 10.1. COMPUTER CONTROLLER DRIVER ENCODER MOTOR Figure 10.1: Elements of Servo Systems The operation of such a system can be divided into three levels, as illustrated in Figure 10.2.
  • Page 176 LEVEL MOTION PROGRAMMING MOTION PROFILING CLOSED-LOOP CONTROL Figure 10.2: Levels of Control Funtions The three levels of control may be viewed as different levels of management. The top manager, the motion program, may specify the following instruction, for example. PR 6000,4000 SP 20000,20000 AC 200000,00000 BG X...
  • Page 177: Operation Of Closed-Loop Systems

    Operation of Closed-Loop Systems To understand the operation of a servo system, we may compare it to a familiar closed-loop operation, adjusting the water temperature in the shower. One control objective is to keep the temperature at a comfortable level, say 90 degrees F.
  • Page 178: System Modeling

    The following section describes the operation in a detailed mathematical form, including modeling, analysis and design. System Modeling The elements of a servo system include the motor, driver, encoder and the controller. These elements are shown in Figure 10.4. The mathematical model of the various components is given below. CONTROLLER DIGITAL ...
  • Page 179 J = 0.0283 oz-in-s = 2 * 10 kg . m L = 0.004H Then the corresponding time constants are = 0.04 sec = 0.002 sec Assuming that the amplifier gain is K = 4, the resulting transfer function is P/V = 40/[s(0.04s+1)(0.002s+1)] Current Drive The current drive generates a current I, which is proportional to the input voltage, V, with a gain of K...
  • Page 180 The resulting functions derived above are illustrated by the block diagram of Figure 10.6. VOLTAGE SOURCE +1)(ST CURRENT SOURCE VELOCITY LOOP Figure 10.6: Mathematical model of the motor and amplifier in three operational modes Encoder The encoder generates N pulses per revolution. It outputs two signals, Channel A and B, which are in quadrature. Due to the quadrature relationship between the encoder channels, the position resolution is increased to 4N quadrature counts/rev.
  • Page 181 1  Low-pass L(z) =    Notch N(z) =   The filter parameters, K, A, C and B are selected by the instructions KP, KD, KI and PL, respectively. The relationship between the filter coefficients and the instructions are: K = (KP + KD) A = KD/(KP + KD) C = KI...
  • Page 182: System Analysis

    The ZOH, or zero-order-hold, represents the effect of the sampling process, where the motor command is updated once per sampling period. The effect of the ZOH can be modeled by the transfer function H(s) = 1/(1+sT/2) If the sampling period is T = 0.001, for example, H(s) becomes: H(s) = 2000/(s+2000) However, in most applications, H(s) may be approximated as one.
  • Page 183 G(s) = 50 + 0.98s = .098 (s+51) The system elements are shown in Figure 10.7. FILTER MOTOR 2000  50+0.980s 0.0003 S+2000 ENCODER Figure 10.7: Mathematical model of the control system The open loop transfer function, A(s), is the product of all the elements in the loop. A(s) = 390,000 (s+51)/[s (s+2000)] To analyze the system stability, determine the crossover frequency, ω...
  • Page 184: System Design And Compensation

    System Design and Compensation The closed-loop control system can be stabilized by a digital filter, which is pre-programmed in the DMC-40x0 controller. The filter parameters can be selected by the user for the best compensation. The following discussion presents an analytical design method. The Analytical Method The analytical design method is aimed at closing the loop at a crossover frequency, ω...
  • Page 185 Arg[L(j500)] = -180° - tan-1(500/2000) = -194° G(s) is selected so that A(s) has a crossover frequency of 500 rad/s and a phase margin of 45°. This requires that |A(j500)| = 1 Arg [A(j500)] = -135° However, since A(s) = L(s) G(s) then it follows that G(s) must have magnitude of |G(j500)| = |A(j500)/L(j500)| = 160 and a phase...
  • Page 186 In a similar manner, other filters can be programmed. The procedure is simplified by the following table, which summarizes the relationship between the various filters. Equivalent Filter Form - DMC-40x0 Digital D(z) =[K(z-A/z) + Cz/(z-1)]∙(1-B)/(Z-B) KP, KD, KI, PL K = (KP + KD) A = KD/(KP+KD) C = KI B = PL...
  • Page 187: Appendices

    Appendices Electrical Specifications NOTE Electrical specifications are only valid once controller is out of reset. Servo Control Motor command line ± 10 V analog signal Resolution: 16-bit DAC or 0.0003 volts 3 mA maximum. Output impedance – 500 Ω Main and auxiliary encoder inputs ±...
  • Page 188 Analog Inputs: AI[8:1] ± 10 volts 12-Bit Analog-to-Digital converter 16-bit optional Optoisolated Digital Outputs: DO[16:1]* 500mA Sourcing *[8:1] for 1-4 axes models, [16:1] for 5-8 axes models Extended I/O: IO[80:17] Configurable 0-5V TTL as Inputs or Outputs Configured by the CO command in banks of 8 Auxiliary Inputs as Uncommitted Inputs: The auxiliary pins can be used as uncommitted inputs and are DI[96:81]*...
  • Page 189: Performance Specifications

    Performance Specifications Minimum Servo Loop Update Time/Memory: Normal Minimum Servo Loop Update Time DMC-4010 62.5 µsec DMC-4020 62.5 µsec DMC-4030 125 µsec DMC-4040 125 µsec DMC-4050 156.25 µsec DMC-4060 156.25 µsec DMC-4070 187.5 µsec DMC-4080 187.5 µsec Position Accuracy ±...
  • Page 190: Ordering Options

    Ordering Options Overview The DMC-40x0 can be ordered in many different internal boards, the DMC, ICM, and CMB are required, and the AMP/SMD are optional. See Part Numbers, pg 2 for a full explanation of the internal layout and the Integrated Components, pg 211 for a description of the different board options.
  • Page 191 Figure A.1: Encoder Inputs with -TRES option Part number ordering example: DMC-4010(TRES)-C012-I000 -16 bit – 16 bit Analog Inputs The -16 bit option provides 16 bit analog inputs on the DMC-40x0 motion controller. The standard resolution of the analog inputs is 12 bits. Part number ordering example: DMC-4010(-16bit)-C012-I000 4-20mA –...
  • Page 192 Part number ordering example: DMC-4010(ETL)-C012-I000 MO – Motor Off Jumpers Installed When a jumper is installed on the “MO” pins, the controller will be powered up in the “motor off” state. This option will cause jumper to be installed at the factory. Part number ordering example: DMC-4010(MO)-C012-I000 CMB, “-CXXX(Y)”...
  • Page 193 RS-232/422 Configuration Jumpers Location Label Function (If jumpered) JP2 (-C012, default) ARXD Connects a 120 Ω Termination resistor between the differential “Receive” JP3 (-C022) inputs on the Aux Serial port. Pins 2 and 7 on RS-422 Auxiliary Port. ACTS Connects a 120 Ω Termination resistor between the differential “Clear To Send”...
  • Page 194 Clock - (Cn- or MA-) HALA A Channel Hall Sensor Clock + (Cn+ or MA+) Data - (Dn- or SLO-) HALB B Channel Hall Sensor HALC C Channel Hall Sensor ICM-42200 Encoder 26 pin HD D-Sub Connector (BiSS or SSI Option) Pin # Label Description...
  • Page 195 However, with an -ISAMP (ISAMP – Isolation of power between each AMP amplifier) option, the -SRn option will only protect the first four axis with internal amplifiers. Part number ordering example: DMC-4040-C022-I200-I200-D3040-SR90 Appendices ▫ 190 DMC-40x0 User Manual...
  • Page 196 100mA. This option is only valid with the AMP-43140. Part number ordering example: DMC-4040-C012-I000-D3140(100mA) SSR – Solid State Relay Option for AMP-43140 The SSR option configures the AMP-43140 (-D3140) with Solid State Relays on the motor power leads that are engaged and disengaged when the amplifier is enabled and disabled.
  • Page 197: Power Connector Part Numbers

    Power Connector Part Numbers Overview The DMC-40x0 uses Molex Mini-Fit, Jr.™ Receptacle Housing connectors for connecting DC Power to the Amplifiers, Controller, and Motors. This section gives the specifications of these connectors. For information specific to your Galil amplifier or driver, refer to the specific amplifier/driver in the Integrated Components section. Molex Part Numbers There are 3 different Molex connectors used with the DMC-40x0.
  • Page 198: Input Current Limitations

    Input Current Limitations The current for an optoisolated input shall not exceed 11mA. Some applications may require the use of an external resistor (R) to limit the amount of current for an input. These external resistors can be placed in series between the inputs and their power supply (Vs).
  • Page 199: Serial Cable Connections

    Serial Cable Connections The DMC-40x0 requires the transmit, receive, and ground for slow communication rates. (i.e. 9600 baud) For faster rates the handshake lines are required. The connection tables below contain the handshake lines. Standard RS-232 Specifications 25 pin Serial Connector (Male, D-type) This table describes the pinout for standard serial ports found on most computers.
  • Page 200 9 Pin Serial Connector (Male, D-type) Standard serial port connections found on most computers. Pin # Function DMC-40x0 Serial Cable Specifications Cable to Connect Computer 25 pin to Main Serial Port 25 Pin (Male - computer) 9 Pin (female - controller) 5 CTS 8 RTS 3 RXD...
  • Page 201: Configuring The Amplifier Enable Circuit

    Remove Jack Screws (20 Places) Remove #6-32x3/16” Button Head Cover Screws (4 Places) Lift Cover Straight Up and Away from Unit. Step 2: Remove ICM For DMC-4040 – Proceed to Step 3: Configure Circuit Appendices ▫ 196 DMC-40x0 User Manual...
  • Page 202 Remove #6-32x3/16” Button Head Cover Screws (4 Places) Lift Cover Straight Up and Away from Unit. Step 2: Remove ICM(s) DMC-4040 and DMC-4080 (Step 3) Step 3: Configure Circuit Reference the instructions below for the desired configuration, and then proceed to Step 4.
  • Page 203: High Amp Enable Sinking Configuration (Default)

    Isolated Power High Amp Enable Sourcing Configuration pg 203  Isolated Power Low Amp Enable Sourcing Configuration pg 203  +5V High Amp Enable Sinking Configuration (Default) Default Configuration Shipped with controller when no specific setup is ordered. +5V Low Amp Enable Sinking Configuration From Default Configuration: Reverse RP2 Appendices ▫...
  • Page 204: +5V High Amp Enable Sourcing Configuration

    +5V High Amp Enable Sourcing Configuration From Default Configuration: Move U4 up one pin location on socket Reverse RP2 Change JP1 to GND Change JP2 to +5V +5V Low Amp Enable Sourcing Configuration From Default Configuration: Move U4 up one pin location on socket Change JP1 to GND Change JP2 to +5V Appendices ▫...
  • Page 205: +12V High Amp Enable Sinking Configuration

    +12V High Amp Enable Sinking Configuration (Does not require the removal of Metal) From Default Configuration: Change JP1 to +12V +12V Low Amp Enable Sinking Configuration From Default Configuration: Reverse RP2 Change JP1 to +12V Appendices ▫ 200 DMC-40x0 User Manual...
  • Page 206: +12V High Amp Enable Sourcing Configuration

    +12V High Amp Enable Sourcing Configuration From Default Configuration: Move U4 up one pin location on socket Reverse RP2 Change JP1 to GND Change JP2 to +12V +12V Low Amp Enable Sourcing Configuration From Default Configuration: Move U4 up one pin location on socket Change JP1 to GND Change JP2 to +12V Appendices ▫...
  • Page 207: Isolated Power High Amp Enable Sinking Configuration

    Isolated Power High Amp Enable Sinking Configuration AEC1 = V+ AEC2 = V- For +5V to +12V, RP6 = 820 Ω For +13V to +24V, RP6 = 4.7 kΩ From Default Configuration: Change JP1 to AEC1 Change JP2 to AEC2 If AEC1 is +13V to +24V, Replace RP6 with 4.7K Resistor Pack Isolated Power Low Amp Enable Sinking Configuration...
  • Page 208 Isolated Power High Amp Enable Sourcing Configuration AEC1 = V- AEC2 = V+ For +5V to +12V, RP6 = 820 Ω For +13V to +24V, RP6 = 4.7 kΩ From Default Configuration: Move U4 up one pin location on socket Reverse RP2 Change JP1 to AEC1 Change JP2 to AEC2...
  • Page 209 DMC-4040 (Steps 4 and 5) Step 4: Replace ICM Step 5: Replace Cover Notes: Cover Installation: Install Jack Screws (20 Places) Install #6-32x3/16” Button Head Cover Screws(4 Places) DMC-4080 (Steps 4 and 5) Step 4: Replace ICM(s) Appendices ▫ 204...
  • Page 210 Step 5: Replace Cover Notes: Cover Installation: Install Jack Screws (34 Places) Install #6-32x3/16” Button Head Cover Screws(4 Places) Appendices ▫ 205 DMC-40x0 User Manual...
  • Page 211: Signal Descriptions

    Signal Descriptions Outputs Motor Command ± 10 Volt range signal for driving amplifier. In servo mode, motor command output is updated at the controller sample rate. In the motor off mode, this output is held at the OF command level. Amplifier Enable Signal to disable and enable an amplifier.
  • Page 212 Forward Limit Switch When active, inhibits motion in forward direction. Also causes execution of limit switch subroutine, #LIMSWI. The polarity of the limit switch may be set with the CN command. Reverse Limit Switch When active, inhibits motion in reverse direction. Also causes execution of limit switch subroutine, #LIMSWI.
  • Page 213: List Of Other Publications

    List of Other Publications "Step by Step Design of Motion Control Systems" by Dr. Jacob Tal "Motion Control Applications" by Dr. Jacob Tal "Motion Control by Microprocessors" by Dr. Jacob Tal Training Seminars Galil, a leader in motion control with over 500,000 controllers working worldwide, has a proud reputation for anticipating and setting the trends in motion control.
  • Page 214: Contacting Us

    Contacting Us Galil Motion Control 270 Technology Way Rocklin, CA 95765 Phone: 916-626-0101 Fax: 916-626-0102 E-Mail Address: support@galilmc.com Web: 370H http:// www. galilmc.com/ Appendices ▫ 209 DMC-40x0 User Manual...
  • Page 215: Warranty

    18 months after shipment. Motors, and Power supplies are warranted for 1 year. Extended warranties are available. In the event of any defects in materials or workmanship, Galil Motion Control will, at its sole option, repair or replace the defective product covered by this warranty without charge. To obtain warranty service, the defective product must be returned within 30 days of the expiration of the applicable warranty period to Galil Motion Control, properly packaged and with transportation and insurance prepaid.
  • Page 216: Integrated Components

    Integrated Components Overview When ordered, the following components will reside inside the box of the DMC-40x0 motion controller. The amplifiers and stepper drivers provide power to the motors in the system, and the interconnect modules and communication boards provide the connections for the signals and communications. For a complete understanding of where the internal components reside in the DMC-40x0 controller, please see Part Numbers, pg 2.
  • Page 217 A7 – SDM-440x0 (-D4040,-D4020) 4-axis Stepper Drives The SDM-44040 is a stepper driver module capable of driving up to four bipolar two-phase stepper motors. The current is selectable with options of 0.5, 0.75, 1.0, and 1.4 Amps/Phase. The step resolution is selectable with options of full, half, 1/4 and 1/16.
  • Page 218: A1 - Amp-430X0 (-D3040,-D3020)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A1.1: DMC-4040-C012-I000-D3040(DMC-4040 with AMP-43040) A1 – AMP-430x0 (-D3040,-D3020) ▫ 213 DMC-40x0 User Manual...
  • Page 219: Electrical Specifications

    Electrical Specifications The amplifier is a brush/brushless trans-conductance PWM amplifier. The amplifier operates in torque mode, and will output a motor current proportional to the command signal input. Supply Voltage: 20-80 V Continuous Current: Peak Current 10 A Nominal Amplifier Gain 0.7 A/V Switching Frequency 60 kHz (up to 140 kHz available-contact Galil)
  • Page 220: Operation

    Operation Brushless Motor Setup NOTE: If you purchased a Galil motor with the amplifier, it is ready for use. No additional setup is necessary. To begin the setup of the brushless motor and amplifier, it is first necessary to have communications with the motion controller.
  • Page 221 NOTE:For most applications, unless the motor has more than 5 mH of inductance with a 24V supply, or 10 mH of inductance with a 48 volts supply, the normal current loop bandwidth option should be chosen. AW will return the current loop bandwidth in Hertz.
  • Page 222: Error Monitoring And Protection

    Error Monitoring and Protection The amplifier is protected against over-voltage, under-voltage, over-temperature, and over-current for brush and brushless operation. The controller will also monitor for illegal Hall states (000 or 111 with 120° phasing). The controller will monitor the error conditions and respond as programmed in the application. The errors are monitored via the TA command.
  • Page 223 Over-Temperature Protection The amplifier is also equipped with over-temperature protection. Rev A and Rev B amplifiers: If the average heat sink temperature rises above 100°C, then the amplifier will be disabled. The over-temperature condition will trigger the #AMPERR routine if included in the program on the controller. The amplifier will re-enable when the temperature drops below 100 °C.
  • Page 224: A2 - Amp-43140 (-D3140)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A2.1: DMC-4040-C012-I000-D3140 (DMC-4040 with AMP-43140) A2 – AMP-43140 (-D3140) ▫ 219...
  • Page 225: Electrical Specifications

    Electrical Specifications The amplifier is a brush type trans-conductance linear amplifier. The amplifier operates in torque mode, and will output a motor current proportional to the command signal input. DC Supply Voltage: ±12-30 VDC (bipolar) In order to run the AMP-43140 in the range of ±12-20 VDC, the ISCNTL –...
  • Page 226: Operation

    Operation ELO Input If the ELO input on the controller is triggered, the amplifier will be shut down at a hardware level, the motors will be essentially in a Motor Off (MO) state. TA3 will change state and the #AMPERR routine will run when the ELO input is triggered.
  • Page 227: A3 - Amp-43240 (-D3240)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A3.1: DMC-4040-C012-I000-D3240(DMC-4040 with AMP-43240) A3 – AMP-43240 (-D3240) ▫ 222 DMC-40x0 User Manual...
  • Page 228: Electrical Specifications

    Electrical Specifications The amplifier is a brush/brushless trans-conductance PWM amplifier. The amplifier operates in torque mode, and will output a motor current proportional to the command signal input. Supply Voltage: 20-80 VDC Continuous Current: 10 Amps Peak Current 20 Amps Nominal Amplifier Gain 1.0 Amps/Volt Switching Frequency...
  • Page 229: Operation

    Operation Brushless Motor Setup NOTE: If you purchased a Galil motor with the amplifier, it is ready for use. No additional setup is necessary. To begin the setup of the brushless motor and amplifier, it is first necessary to have communications with the motion controller.
  • Page 230: Error Monitoring And Protection

    the bandwidth for the X axis, issue AWX=v,l,n where v represents the DC voltage input to the card, l represents the inductance of the motor in millihenries, and n represents 0 or 1 for the AU setting. NOTE:For most applications, unless the motor has more than 5 mH of inductance with a 24V supply, or 10 mH of inductance with a 48 volts supply, the normal current loop bandwidth option should be chosen.
  • Page 231 controller will monitor the error conditions and respond as programmed in the application. The errors are monitored via the TA command. TA n may be used to monitor the errors with n = 0, 1, 2, or 3. The command will return an eight bit number representing specific conditions.
  • Page 232 Over-Temperature Protection The amplifier is also equipped with over-temperature protection. If the average heat sink temperature rises above 80°C, then the amplifier will be disabled. The over-temperature condition will trigger the #AMPERR routine if included in the program on the controller. The amplifier will not be re-enabled until the temperature drops below 80°C and then either an SH command is sent to the controller, or the controller is reset (RS command or power cycle).
  • Page 233: A4 - Amp-435X0 (-D3540,-D3520)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A4.1: DMC-4040-C012-I000-D3540(DMC-4040 with AMP-43540) A4 – AMP-435x0 (-D3540,-D3520) ▫ 228 DMC-40x0 User Manual...
  • Page 234: Electrical Specifications

    Electrical Specifications The amplifier is a brush/brushless transconductance PWM amplifier. The amplifier operates in torque mode, and will output a motor current proportional to the command signal input. Supply Voltage: 20-80 VDC Continuous Current: 8 Amps Peak Current 15 Amps Nominal Amplifier Gain 0.8 Amps/Volt Switching Frequency...
  • Page 235: Operation

    Motor Connector ( Brushed or 3 phase Brushless ) Phase C Phase B (N/C for Brushed Motors) No Connect Phase A Motor Connector ( 2 Phase Brushless [2PB] ) Phase B- Phase B+ Phase A- Phase A+ Operation Commutation Related Velocity When using sinusoidal commutation and higher speed applications, it is a good idea to calculate the speed at which commutation can start to affect performance of the motor.
  • Page 236 http://www.galilmc.com/support/firmware-downloads.php The 6 commands used for set up are the BA, BM, BX, BZ, BC and BI commands. Please see the command reference for details. Further information on setting up commutation on the AMP-43540 can also be found here: http://www.galilmc.com/techtalk/drives/wiring-a-brushless-motor-for-galils-sine-amplifier/ Issue the BA command to specify which axis you want to use the sinusoidal amplifier on Calculate the number of encoder counts per magnetic cycle.
  • Page 237 Vsupply VDC Inductance L (mH) L < 1 1 < L < 2.3 2.3 < L < 4.2 4.2 < L L < 2.4 2.4 < L < 4.2 4.2 < L < 7 7 < L Table A4.24: Amplifier Current Loop Gain Settings Setting Peak and Continuous Current (TL and TK) To set TL and TK for a particular motor, find the continuous current and peak current ratings for that motor and divide that number by the amplifier gain.
  • Page 238: Error Monitoring And Protection

    Using External Amplifiers The BR command must be set to a -1 for any axis where an AMP-43540 is installed but the use of an external axis is required. This setting will disable the requirement to have the BA, BM and BX or BZ commands executed prior to being able to issue the SH command for that axis.
  • Page 239 Over-Current Protection The amplifier also has circuitry to protect against over-current. If the total current from a set of 2 axes (ie A and B or C and D) exceeds 30 A, the amplifier will be disabled. The amplifier will not be re-enabled until there is no longer an over-current draw and then either SH command has been sent or the controller is reset.
  • Page 240: A5 - Amp-43640 (-D3640)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A5.1: DMC-4040-C012-I000-D3640 (DMC-4040 with AMP-43640) A5 – AMP-43640 (-D3640) ▫ 235...
  • Page 241: Electrical Specifications

    Electrical Specifications The amplifier is a brushless type trans-conductance linear amplifier for sinusoidal commutation. The amplifier outputs a motor current proportional to the command signal input. DC Supply Voltage: 15-40 VDC In order to run the AMP-43640 in the range of 15-20 VDC, the ISCNTL –...
  • Page 242 Power Unlike a switching amplifier a linear amplifier does not have a straightforward relationship between the power delivered to the motor and the power lost in the amplifier. Therefore, determining the available power to the motor is dependent on the supply voltage, the characteristics of the load motor, and the required velocity and current.
  • Page 243: Operation

    Operation Commutation Related Velocity When using sinusoidal commutation and higher speed applications, it is a good idea to calculate the speed at which commutation can start to affect performance of the motor. In general, it is recommended that there be at least 8 servo samples for each magnetic cycle.
  • Page 244 Issue either the BZ or BX command. Either the BX or BZ command must be executed on every reset or power- up of the controller. BZ Command: • Issue the BZ command to lock the motor into a phase. Note that this will cause up to ½ a magnetic cycle of motion.
  • Page 245 Brushed Motor Operation The AMP-43640 must be configured for brushed motor operation at the factory. Contact Galil prior to placing the order. Once the amplifier is configured for a brushed motor, the controller needs to be set for brushed mode by setting the BR command to a value of 1.
  • Page 246: A6 - Amp-43740 (-D3740)

    AC side of the power supply connection in order to power down the amplifier. The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A6.1:DMC-4040-C022-I000-D3740 A6 – AMP-43740 (-D3740) ▫ 241 DMC-40x0 User Manual...
  • Page 247: Electrical Specifications

    Electrical Specifications The amplifier is a brush/brushless transconductance PWM amplifier. The amplifier operates in torque mode, and will output a motor current proportional to the command signal input. Supply Voltage: 20-80 VDC Continuous Current: 16 Amps Peak Current 30 Amps Nominal Amplifier Gain 1.6 Amps/Volt Switching Frequency...
  • Page 248: Operation

    Operation Commutation Related Velocity When using sinusoidal commutation and higher speed applications, it is a good idea to calculate the speed at which commutation can start to affect performance of the motor. In general, it is recommended that there be at least 8 servo samples for each magnetic cycle.
  • Page 249 BZ Command: • Issue the BZ command to lock the motor into a phase. Note that this will cause up to ½ a magnetic cycle of motion. Be sure to use a high enough value with BZ to ensure the motor is locked into phase properly. BX Command: •...
  • Page 250: Error Monitoring And Protection

    Setting Peak and Continuous Current (TL and TK) To set TL and TK for a particular motor, find the continuous current and peak current ratings for that motor and divide that number by the amplifier gain. For example, a particular motor has a continuous current rating of 14.0 A and peak current rating of 28.0 A.
  • Page 251 Under-Voltage Protection If the supply to the amplifier drops below 18 VDC, the amplifier will be disabled. The amplifier will return to normal operation once the supply is raised above the 18V threshold. NOTE: If there is an #AMPERR routine and the controller is powered before the amplifier, then the #AMPERR routine will automatically be triggered.
  • Page 252: A7 - Sdm-440X0 (-D4040,-D4020)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A6.1: DMC-4040-C012-I000-D4040 (DMC-4040 with SDM-44040) A7 – SDM-440x0 (-D4040,-D4020) ▫ 247...
  • Page 253: Electrical Specifications

    Electrical Specifications DC Supply Voltage: 12-30 VDC In order to run the SDM-44040 in the range of 12-20 VDC, the ISCNTL – Isolate Controller Power option must be ordered Max Current (per axis) 1.4 Amps/Phase (Selectable with AG command) Maximum Step Frequency: 6 MHz Motor Type: Bipolar 2 Phase...
  • Page 254: Operation

    Operation The SDM-44040 should be setup for Active High step pulses (MT-2 or MT-2.5). The AG command sets the current on each axis, the LC command configures each axis’s behavior when holding position and the YA command sets the step driver resolution. These commands are detailed below, see also the command reference for more information: Current Level Setup (AG Command) AG configures how much current the SDM-44040 delivers to each motor.
  • Page 255 Step Drive Resolution Setting (YA command) When using the SDM-44040, the step drive resolution can be set with the YA command Step Drive Resolution per Axis: YA n,n,n,n,n,n,n,n n = 1 Full n = 2 Half n = 4 n = 16 1/16 When running in full step mode –...
  • Page 256: A8 - Sdm-44140 (-D4140)

    The ELO input may be used to cut power to the motors in an Emergency Stop or Abort situation. Figure A7.1: DMC-4040-C012-I000-D4140 (DMC-4040 with SDM-44140) A8 – SDM-44140 (-D4140) ▫ 251...
  • Page 257: Electrical Specifications

    Electrical Specifications DC Supply Voltage: 20-60 VDC Max Current (per axis) 3.0 Amps/Phase (Selectable with AG command) Max Step Frequency: 6 MHz Motor Type: Bipolar 2 Phase Switching Frequency: 60 kHz Minimum Load Inductance: 0.5 mH Mating Connectors On Board Connector Terminal Pins Molex Mini-Fit, Jr.™...
  • Page 258: Operation

    Operation The SDM-44140 should be setup for Active High step pulses (MT-2 or MT-2.5). The AG command sets the current on each axis and the LC command configures each axis’s behavior when holding position. These commands are detailed below: Current Level Setup (AG Command) AG configures how much current the SDM-44140 delivers to each motor.
  • Page 259: Error Monitoring And Protection

    Using External Amplifiers Use the connectors on top of the controller to access necessary signals to run external amplifiers. For more information on connecting external amplifiers, see Step A in Chapter 2. Error Monitoring and Protection The amplifier is protected against under-voltage and over-current conditions. The controller will monitor the error conditions and respond as programmed in the application.
  • Page 260: A9 - Cmb-41012 (-C012)

    A9 – CMB-41012 (-C012) Description The CMB-41012 provides the connections for the Ethernet and Serial communication as well as the D-Sub connector for the Extended I/O. The CMB-41012 also contains the 8x2 character LCD. See Extended I/O, pg 42 for Electrical Specifications of Extended I/O. A9 –...
  • Page 261: Connectors For Cmb-41012 Interconnect Board

    Connectors for CMB-41012 Interconnect Board CMB-41012 Extended I/O 44 pin HD D-Sub Connector (Male) Pin # Label Description Pin # Label Description Pin # Label Description IO18 I/O bit 18 IO17 I/O bit 17 IO19 I/O bit 19 IO21 I/O bit 21 IO20 I/O bit 20 IO22...
  • Page 262 RS-232-Auxiliary Port (Female) Standard connector and cable, 9-Pin Pin # Signal NC (5V with APWR Jumper) Ethernet The Ethernet connection is Auto MDIX, 100bT/10bT. Signal Jumper Description for CMB-41012 Jumper Label Function (If jumpered) Option Jumper Reserved Motor Off Jumper When controller is powered on or reset, Amplifier Enable lines will be in a Motor Off state.
  • Page 263 RS-232 Configuration Jumpers Location Label Function (If jumpered) ARXD RS-422 Option Only: See RS-422 – Serial Port Serial Communication, pg 187 for details. ACTS MRXD MCTS APWR Connects 5V to pin 9 of the RS-232 Auxiliary Port LCD Description In the default state, the LCD provides the status information for the number of axes available on the controller. This automatic LCD status update can also be disabled and text can be written directly to the display with the MG command.
  • Page 264: A10 - Cmb-41022 (-C022)

    A10 – CMB-41022 (-C022) Description The CMB-41022 differs from the CMB-41012 (default) in that it has second Ethernet port, as shown in the figure above. The CMB provides the connections for both Ethernet and Serial communication as well as the 44-pin HD D- Sub connector for the Extended I/O.
  • Page 265: Connectors For Cmb-41022 Interconnect Board

    Connectors for CMB-41022 Interconnect Board CMB-41022 Extended I/O 44 pin HD D-Sub Connector (Male) Label Description Label Description Label Description IO18 I/O bit 18 IO17 I/O bit 17 IO19 I/O bit 19 IO21 I/O bit 21 IO20 I/O bit 20 IO22 I/O bit 22 IO24...
  • Page 266 JP3 - RS-232-Auxiliary Port Standard 9-pin female D-sub connector. Signal 5V with APWR Jumper J1/J6 - Ethernet The Ethernet connection is Auto MDIX, 100bT/10bT. Signal On the each Ethernet port there are two LEDs that indicate the status of the port's Ethernet connection. Green Link LED (LNK): The green LED indicates there is a valid Ethernet connection.
  • Page 267 Jumper Description for CMB-41022 Jumper Label Function (If jumpered) Option Jumper Reserved Motor Off Jumper When controller is powered on or reset, Amplifier Enable lines will be in a Motor Off state. A SH will be required to re-enable the motors. Baud Rate Jumper 38.4K Baud Rate setting –...
  • Page 268 The following table describes the information shown when the LCD update is enabled (LU 1): Axis Status Description Idle Lower power idle Motor Off Axis Moving in independent mode Position Error exceeded TE > ER Stopped from ST command Decelerating or stopped by Limit switch Stopped by Abort Running in Vector or Lienar Interpolation Mode Running in Contour Mode...
  • Page 269: A11 - Icm-42000 (-I000)

    A11 – ICM-42000 (-I000) Description The ICM-42000 resides inside the DMC-40x0 enclosure and breaks out the internal CPU board connector into convenient D-sub connectors for interface to external amplifiers and I/O devices. The ICM-42000 provides a 15-pin HD D-sub connector for the encoders on each axis, a 15-pin D-sub for analog inputs, a 44-pin HD D-sub for I/O, and a 44-pin D-sub for the motor command signals.
  • Page 270: Connectors For Icm-42000 Interconnect Board

    Connectors for ICM-42000 Interconnect Board ICM-42000 I/O (A-D) 44 pin HD D-Sub Connector (Female) Label Description Label Description Label Description Error Output Reset Input Digital Ground Digital Input 1/ A latch INCOM Input Common Digital Input 2 / B latch Digital Input 4 / D latch Digital Input 3 / C latch Digital Input 5...
  • Page 271 ICM-42000 External Driver (A-D) 44 pin HD D-Sub Connector (Male) Label Description Label Description Label Description STPA PWM / Step A STPB PWM / Step B Reserved / Step A_N STPC PWM / Step C Reserved / Step B_N Reserved / Step C_N STPD PWM / Step D Digital Ground...
  • Page 272 ICM-42000 Encoder 15 pin HD D-Sub Connector (Female) Label Description I+ Index Pulse Input B+ Main Encoder Input A+ Main Encoder Input B+ Aux Encoder Input Digital Ground I- Index Pulse Input B- Main Encoder Input A- Main Encoder Input A- Aux Encoder Input HALA A Channel Hall Sensor...
  • Page 273: A12 - Icm-42100 (-I100)

    A12 – ICM-42100 (-I100) Description The ICM-42100 (-I100) option resides inside the DMC-40x0 enclosure and accepts sinusoidal encoder signals in addition to standard, differential quadrature encoder signals . The -I100 board can provide interpolation for up to four 1 V differential sinusoidal encoders resulting in a higher position resolution.
  • Page 274: Connectors For Icm-42100 Interconnect Board

    The DMC-40x0 requires specific firmware for the implementation of Sin/Cos encoders. Any DMC-40x0 ordered with the -I100 board will automatically be loaded with this firmware at the factory. With this firmware, the maximum speed settings will be increased from 22,000,000 [cts/s] to 50,000,000 [cts/s]. See Theory of Operation, pg 272 and Calculating Equivalent Counts, pg 273 for learning how the DMC-40x0 interpolates Sin/Cos signals.
  • Page 275 ICM-42100 External Driver (A-D) 44 pin HD D-Sub Connector (Male) Label Description Label Description Label Description Reserved / Step A_N STPA PWM / Step A STPB PWM / Step B Reserved / Step B_N Reserved / Step C_N STPC PWM / Step C Reserved / Step D_N STPD PWM / Step D...
  • Page 276 ICM-42100 Encoder 15 pin HD D-Sub Connector (Female) Label Sin/Cos Feedback Standard Quadrature + Index Pulse Input I+ Index Pulse Input + Main Encoder Input B+ Main Encoder Input + Main Encoder Input A+ Main Encoder Input B+ Aux Encoder Input Digital Ground - Index Pulse Input Index Pulse Input...
  • Page 277: Theory Of Operation

    Theory of Operation Traditional quadrature rotary encoders work by having two sets of lines inscribed radially around the circumference of an optical disk. A light is passed through each of these two sets of lines. On the other side of the gratings, photo sensors detect the presence (or absence) of these lines.
  • Page 278 by the user in the range of 2 through 2 points per sinusoidal cycle via AF command. See the AF command in the command reference for more information. The unique position within one cycle can be read using the following equation: ...
  • Page 279 Latching with Sinusoidal Encoders: The function of the hardware latch feature for the ICM-42100 interconnect module is illustrated with an example below. Figure A11.3 shows a sinusoidal encoder signal and its equivalent quadrature representation. Position latching is reported using the RL command and latching can be triggered based on the index or digital input via the AL command.
  • Page 280: A13 - Icm-42200 (-I200)

    A13 – ICM-42200 (-I200) Description The ICM-42200 interconnect option resides inside the DMC-40x0 enclosure and provides a pin-out that is optimized for easy connection to external drives. The ICM-42200 uses 26-pin HD D-sub connectors for each axis that includes encoder, limit, home, and motor command signals. Other connectors include a 44-pin HD D-sub for digital I/O, and a 15-pin LD D-sub for analog I/O.
  • Page 281: Connectors For Icm-42200 Interconnect Board

    Connectors for ICM-42200 Interconnect Board ICM-42200 I/O (A-D) 44 pin HD D-Sub Connector (Female) Label Description Label Description Label Description Error Output Reset Input Digital Ground Digital Input 1/ A latch INCOM Input Common Digital Input 2 / B latch Digital Input 4 / D latch Digital Input 3 / C latch Digital Input 5...
  • Page 282 ICM-42200 Encoder 26 pin HD D-Sub Connector (Female) Label Description Label Description Reserved / Hall 2 / MCMD_N Forward Limit Switch Input Amplifier Enable B+ Aux Encoder Input Direction I- Index Pulse Input HOM Home B+ Main Encoder Input LSCOM Limit Switch Common Digital Ground A- Aux Encoder Input MCMD...
  • Page 283 Jumper Description for ICM-42200 Jumper Label Function (If jumpered) Q and P Sink/Source Selection Sink/Source Selection Sink/Source Selection HAEN/LAEN Selection 5V/12V/External Power Selection 5V/12V/External Power Selection See ICM-42200 Amplifier Enable Circuit in Chapter 3 for detailed information regarding the PQ jumpers. A13 –...

This manual is also suitable for:

Dmc-4080

Table of Contents