Galil Motion Control DMC-42 0 Series User Manual

Hide thumbs Also See for DMC-42 0 Series:
Table of Contents

Advertisement

Quick Links

USER MANUAL
DMC-42x0
Manual Rev. 1.0
Galil Motion Control, Inc.
270 Technology Way
Rocklin, California
916.626.0101
support@galilmc.com
galil.com
8/2015

Advertisement

Table of Contents
loading

Summary of Contents for Galil Motion Control DMC-42 0 Series

  • Page 1 USER MANUAL DMC-42x0 Manual Rev. 1.0 Galil Motion Control, Inc. 270 Technology Way Rocklin, California 916.626.0101 support@galilmc.com galil.com 8/2015...
  • Page 2 Using This Manual This user manual provides information for proper operation of the DMC-42x0 controller. A separate supplemental manual, the Command Reference, contains a description of the commands available for use with this controller. It is recommended that the user download the latest version of the Command Reference and User Manual from the Galil Website.
  • Page 3: Table Of Contents

    Contents Contents Chapter 1 Overview Introduction..........................1 Part Numbers ..............................2 Electrical Specifications......................... 2 Mechanical Specifications......................3 Environmental Specifications......................3 Equipment Maintenance....................... 3 Overview of Motor Types......................3 Overview of External Amplifiers....................4 Functional Elements........................5 Chapter 2 Getting Started Layout............................
  • Page 4 Stepper Motor Operation......................94 Stepper Position Maintenance Mode (SPM)................. 96 Dual Loop (Auxiliary Encoder)....................... 99 Motion Smoothing ........................101 Homing............................103 High Speed Position Capture (The Latch Function) ...............105 Chapter 7 Application Programming Overview............................106 Program Format..........................106 Executing Programs - Multitasking....................108 Debugging Programs........................
  • Page 5: Chapter 1 Overview

    Chapter 1 Overview Introduction The DMC-42x0 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-42x0 provides two communication channels: high speed RS-232 (2 channels up to 115K Baud) and 100 BaseT Ethernet.
  • Page 6: Part Numbers

    Part Numbers Figure 1.1: Layout of a complete DMC-42x0 part number DMC, “DMC-42X0(Y)” Options Option Type Options Brief Description Documentation 1,2,3,4,5,6,7, and 8 Number of control axes -16bit 16-bit analog inputs DMC, “DMC-42x0(Y)” Controller Board Options , starting on pg 170. 4-20mA 4-20mA analog inputs TRES...
  • Page 7: Mechanical Specifications

    Mechanical Specifications Description Specification Weight 5.2 lb Length 12.25 in. Width 5.49 in. Height 2.37 in. Environmental Specifications Description Specification Storage Temperature -25° to +70 ° C Operating Temperature 0° to +70 ° C Operating Altitude 10,000 feet Equipment Maintenance The DMC-42x0 does not require maintenance.
  • Page 8: Overview Of External Amplifiers

    Note: The task of generating sinusoidal commutation may be accomplished in the brushless motor amplifier. If the amplifier generates the sinusoidal commutation signals, only a single command signal is required and the controller should be configured for a standard servo motor (described above). Sinusoidal commutation in the controller can be used with linear and rotary BLMs.
  • Page 9: Functional Elements

    Functional Elements The DMC-42x0 circuitry can be divided into the following functional groups as shown in Figure 1.2 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 10 General I/O The DMC-42x0 provides interface circuitry for 8 bi-directional, optoisolated inputs, 8 high power optoisolated outputs and 8 analog inputs with 12-Bit ADC (16-Bit optional). The DMC-42x0 also has an additional 32 I/O (3.3V 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.
  • Page 11 Amplifier (Driver) For each axis, the power amplifier converts a ±10 volt signal from the controller into current to drive the motor. For stepper motors, the amplifier converts step and direction signals into current. The amplifier should be sized properly to meet the power requirements of the motor. For brushless motors, an amplifier that provides electronic commutation is required or the controller must be configured to provide sinusoidal commutation.
  • Page 12: Chapter 2 Getting Started

    Chapter 2 Getting Started Layout DMC-42x0 Figure 2.1: Outline of the of the DMC-4280 1-8 axes model Chapter 2 Getting Started ▫ 8 DMC-42x0 User Manual...
  • Page 13: Dimensions

    Dimensions DMC-4240 Figure 2.3: Dimensions (in inches) of the DMC-42x0 (Where x= 1-8 ) Chapter 2 Getting Started ▫ 9 DMC-42x0 User Manual...
  • Page 14: Elements You Need

    Elements You Need For a complete system, Galil recommends the following elements: DMC-42x0, motion controller where the x designates number of axis, 1-8. Interconnect. a. (1) ICM-2900 and (1) CABLE-100 for a 1-4 axis DMC-42x0. b. (2) ICM-2900s and (2) CABLE-100s for a 5-8 axis DMC-42x0. c.
  • Page 15: 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 11 Step 2. Install Jumpers, pg 12 Step 3. Configure Dip Switches ,pg 12 Step 4.
  • Page 16: Step 2. Install Jumpers

    Step 2. Install Jumpers Master Reset and Upgrade Jumpers Jumpers labeled MRST and UPGD are the Master Reset and Upgrade jumpers, respectively. JP1 on the main board contains two jumpers, MRST and UPGRD. The MRST jumper is the Master Reset jumper. When MRST is connected, the controller will perform a master reset upon PC power up or upon the reset input going low.
  • Page 17: Step 4. Install The Communications Software

    Step 4. Install the Communications Software After applying power to the controller, a PC is used for programming. Galil's development software enables communication between the controller and the host device. The most recent copy of Galil's development software can be found here: http://www.galilmc.com/support/software-downloads.php Step 5.
  • Page 18 Different feedback types can be used on the same controller. For instance, one axis could be using Standard quadrature and the next could be using SSI. By default, all axis are configured for Standard quadrature. Configuration Feedback Type Connection Location Command Standard quadrature Standard on all units...
  • Page 19: Step 8. Setting Safety Features Before Wiring Motors

    3. Move the motor by hand and re-issue TP. The returned value should have been incremented or decremented from the first TP. If there is no change, check the encoder wiring and settings and retest starting at Step 1. 4. Using the encoder specification sheet, translate a physical distance of the motor into counts read by the controller.
  • Page 20 This is another way to limit the amount of current but can also maintain the resolution of the ±10V motor command line. Step B. Set the Error Limit When ER (error limit) and OE (off-on-error) is set, the controller will automatically shut down the motors when excess error (|TE| >...
  • Page 21: Step 9. Wiring Motors To Galil's Amp-19540

    2. Reverse the direction of the encoder, see Step 7. Connecting Encoder Feedback, pg 13 Brushless Motor Choose one of the following: 1. Reverse direction of the encoder, see Step 7. Connecting Encoder Feedback, pg 13 2. Reverse direction of the motor by swapping any two motor phases (or two hall sensors if using a trapezoidal amplifier).
  • Page 22 Amplifier Commutation Halls Required AMP-19540 Trapezoidal Halls required for brushless motors AMP-19520 Brushed Table 2.4: Amplifier documentation location, commutation, and hall requirements for each internal amplifier. Pin-outs for the hall signals is found under the ICM being used, refer to Step 7. Connecting Encoder Feedback, pg.
  • Page 23 Trapezoidal commutation is a time-tested way for determining the motor location within a magnetic cycle; However, interpretation of hall sensor feedback varies between motor manufactures requiring the user to find the correct wiring combination. Before wiring the motor the user should determine which is easier: Wiring the hall sensors or wiring the motor phases.
  • Page 24 Trial # Phase A Phase B Phase C + Velocity - Velocity White Black 153700 -160000 Black White No motion No motion White Black No motion No motion White Black -141000 139000 Black White No motion No motion Black White -70000 92000 Table 2.6: Example table showing realistic test results using this commutation method...
  • Page 25: Step 10. Connecting External Amplifiers And Motors

    Step 10. Connecting External Amplifiers and Motors DMC-42x0 controllers with more than 4 axes require a second ICM-2900 and 100-pin cable. 4280 System connection procedures will depend on system components and motor types. Any combination of motor types can be used with the DMC-42x0. For connecting There can also be a combination of axes running from Galil's AMP-19540/19520 and external amplifiers or drivers.
  • Page 26 The amplifier enable signal is defaulted to 5V, high amp enable. (the amplifier enable signal will be high when the controller expects the amplifier to be enabled). It is recommended that if an amplifier requires a different configuration, the controller should be be ordered with the desired configuration. Pin-outs for the amplifier enable signal is found under the ICM being used: ICM-2900: A1.
  • Page 27: Step 11. Tune The Servo System

    Step 11. Tune the Servo System Adjusting the tuning parameters is required when using servo motors. A given set of default PID's is provided, but are not optimized and should not be used in practice. For the theory of operation and a full explanation of all the PID and other filter parameters, see Chapter 10 Theory of Operation, pg 155.
  • Page 28: Chapter 3 Connecting Hardware

    Chapter 3 Connecting Hardware Overview The DMC-42x0 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 4280 power optoisolated outputs.
  • Page 29 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 30 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 in the Appendices.
  • Page 31: 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 32 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 33 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 ▫ 29 DMC-42x0 User Manual...
  • Page 34 Wiring the Optoisolated Outputs The output power supply will be connected to Output PWR (labeled OPWR) and the power supply return will be connected to Output GND (labeled ORET). Note that the load is wired between DO and Output GND. The wiring diagram for Bank 0 is shown in Figure 3.6 and Bank 1 in Figure 3.7.
  • Page 35: Ttl Inputs And Outputs

    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 36 Electrical Specifications Maximum Voltage 12 VDC Minimum Voltage -12 VDC '+' inputs are internally pulled-up to 5V through a 4.7kΩ resistor '-' inputs are internally biased to ~1.3V pulled up to 5V through a 7.1kΩ resistor pulled down to GND through a 2.5kΩ resistor Output Compare The output compare signal is a TTL ouput signal and is available on the I/O (A-D) D-Sub connector labeled as CMP.
  • Page 37: Analog Inputs

    Analog Inputs The DMC-42x0 has eight analog inputs configured for the range between -10V and 10V. The inputs are decoded by a 12-bit A/D decoder giving a voltage resolution of approximately .005V. A 16-bit ADC is available as an option (Ex. DMC-4220(-16bit)-C012-I000).
  • Page 38 PWM/Step and Sign/Direction Electrical Specifications Output Voltage 0 – 5 VDC Current Output 20 mA Sink/Source External Servo Control The DMC-42x0 command voltage ranges between ±10V and is output on the motor command line - MCMn (where n is A-H). This signal, along with GND, provides the input to the motor amplifiers. The amplifiers must be sized to drive the motors and load.
  • Page 39 -LAEN Option: The standard configuration of the AEN signal is TTL active high. In other words, the AEN signal will be high when the controller expects the amplifier to be enabled. The polarity can be changed when using a Galil Interconnect Module.
  • Page 40: Chapter 4 Software Tools And Communication

    Chapter 4 Software Tools and Communication Introduction The default configuration DMC-42x0, 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 41: Unsolicited Messages Generated By Controller

    It is good practice to check for : after each command is sent to prevent errors. An echo function is provided to enable associating the DMC-42x0 response with the data sent. The echo is enabled by sending the command EO 1 to the controller.
  • Page 42 Baud Rate Selection JP1 JUMPER SETTINGS BAUD RATE 19.2 38.4 19200 38400 115200 Handshaking The RS232 main port is set for hardware handshaking. Hardware Handshaking uses the RTS and CTS lines. The CTS line will go high whenever the DMC-42x0 is not ready to receive additional characters. The RTS line will inhibit the DMC-42x0 from sending additional characters.
  • Page 43: 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-42x0 supports two industry standard protocols, TCP/IP and UDP/IP. The controller will automatically respond in the format in which it is contacted.
  • Page 44 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-42x0 controller upon linking it to the network.
  • Page 45: 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 46 The third level of Modbus communication uses standard Galil commands. Once the slave has been configured, the commands that may be used are @IN[], @AN[], SB, CB, OB, and AO. For example, AO 2020,8.2 would tell I/O number 2020 to output 8.2 volts. If a specific slave address is not necessary, the I/O number to be used can be calculated with the following: I/O Number = (HandleNum*1000) + ((Module-1)*4) + (BitNum-1) Where HandleNum is the handle number from 1 (A) to 8 (H).
  • Page 47 Example #2 DMC-4240 connected as a Modbus master to a 3rd party PLC. The DMC-4240 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 48: Data Record

    Data Record The DMC-42x0 can provide a binary block of status information with the use of the QR and DR commands. These commands, along with the QZ command can be very useful for accessing complete controller status. The QR command will return 4 bytes of header information and specific blocks of information as specified by the command arguments: QR ABCDEFGHST Each argument corresponds to a block of information according to the Data Record Map below.
  • Page 49 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 50 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 51 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 52: 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 53: 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 54 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 55: Chapter 5 Command Basics

    Chapter 5 Command Basics Introduction The DMC-42x0 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-42x0 instruction set is BASIC-like and easy to use. Instructions consist of two uppercase letters that correspond phonetically with the appropriate function.
  • Page 56: 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 57: 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 58 Operands Most DMC-42x0 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 59: Chapter 6 Programming Motion

    Chapter 6 Programming Motion Overview The DMC-42x0 provides several modes of motion, including independent positioning and jogging, coordinated motion, electronic cam motion, and electronic gearing. Each one of these modes is discussed in the following sections. The DMC-4210 are single axis controllers and use X-axis motion only. Likewise, the DMC-4220 use X and Y, the DMC-4230 use X,Y, and Z, and the DMC-4240 use X,Y,Z, and W.
  • Page 60: 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 61 The lower case specifiers (x,y,z,w) represent position values for each axis. The DMC-42x0 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 62: 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 63: 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 64 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 65 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 66 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 67: Linear Interpolation Mode

    Linear Interpolation Mode The DMC-42x0 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 68 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 69 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-42x0 sequence buffer. Zero means buffer full. 511 means buffer empty. LI x,y,z,w <...
  • Page 70: 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 71 DMC-42x0 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 72 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 73 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 74 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 75 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 76 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: Chapter 6 Programming Motion ▫...
  • Page 77: Electronic Gearing

       0 407 The velocities along the X and Y axes are such that the direction of motion follows the specified path, yet the vector velocity fits the vector speed and acceleration requirements. For example, the velocities along the X and Y axes for the path shown in Figure A.8 are given in Figure A.10. Figure A.10 shows the vector velocity.
  • Page 78 Electronic gearing allows the geared motor to perform a second independent or coordinated move in addition to the gearing. For example, when a geared motor follows a master at a ratio of 1:1, it may be advanced an additional distance with PR, or JG, commands, or VP, or LI. Ramped Gearing In some applications, especially when the master is traveling at high speeds, it is desirable to have the gear ratio ramp gradually to minimize large changes in velocity on the slave axis when the gearing is engaged.
  • Page 79 keeps track of this position phase lag with the _GP operand. The following example will demonstrate how the command is used. Example – Electronic Gearing Over a Specified Interval Objective Run two geared motors at speeds of 1.132 and -.045 times the speed of an external master. Because the master is traveling at high speeds, it is desirable for the speeds to change slowly.
  • Page 80: Electronic Cam

    Example - Electronic Gearing Objective: Run two geared motors at speeds of 1.132 and -0.045 times the speed of an external master. The master is driven at speeds between 0 and 1800 RPM (2000 counts/rev encoder). Solution: Use a DMC-4230 controller, where the Z-axis is the master and X and Y are the geared axes. MO Z Turn Z off, for external master GA Z, Z...
  • Page 81 To illustrate the procedure of setting the cam mode, consider the cam relationship for the slave axis Y, when the master is X. Such a graphic relationship is shown in Figure 6.13. Step 1. Selecting the master axis The first step in the electronic cam mode is to select the master axis. This is done with the instruction EAp where p = X,Y,Z,W,E,F,G,H p is the selected master axis For the given example, since the master is x, we specify EAX...
  • Page 82 Step 5. Enable the ECAM To enable the ECAM mode, use the command EB n where n=1 enables ECAM mode and n=0 disables ECAM mode. Step 6. Engage the slave motion To engage the slave motion, use the instruction EG x,y,z,w where x,y,z,w are the master positions at which the corresponding slaves must be engaged.
  • Page 83 To illustrate the complete process, consider the cam relationship described by the equation: Y = 0.5 * X + 100 sin (0.18 * X) where X is the master, with a cycle of 2000 counts. The cam table can be constructed manually, point by point, or automatically by a program. The following program includes the set-up.
  • Page 84 EC n ECAM counter - sets the index into the ECAM table EG x,y,z,w Engages ECAM EM x,y,z,w Specifies the change in position for each axis of the CAM cycle EP m,n Defines CAM table entry size and offset EQ m,n Disengages ECAM at specified position ET[n] Defines the ECAM table entries...
  • Page 85 Figure 6.14: ECAM cycle with Z axis as master Chapter 6 Programming Motion ▫ 81 DMC-42x0 User Manual...
  • Page 86: Pvt Mode

    PVT Mode The DMC-42x0 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 87 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 88 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 89: 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 90 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 91 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-4280 CM ABCDEFGH CD x,y,z,w ± Specifies position increment over time interval. Range is 32,000.
  • Page 92 X = 50T - 955 sin 3T A complete program to generate the contour movement in this example is given below. To generate an array, we compute the position value at intervals of 8 ms. This is stored at the array POS. Then, the difference between the positions is computed and is stored in the array DIF.
  • Page 93: 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 94: 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 95 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 96: 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 97 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 98 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 99: 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 100 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 101: 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 102 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 103: 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 104 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.22 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 105: 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 106: Chapter 7 Application Programming

    Chapter 7 Application Programming Overview The DMC-42x0 provides a powerful programming language that allows users to customize the controller for their particular application. Programs can be downloaded into the DMC-42x0 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 107 #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 108: 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 109: Debugging Programs

    Debugging Programs The DMC-42x0 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 110: 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 111 DMC-42x0 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 112 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 113 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 114 Conditional Jumps The DMC-42x0 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 115 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 116 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-42x0 allows for IF conditional statements to be included within other IF conditional statements.
  • Page 117 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 118 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 119 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 120 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 121 #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 122 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 123 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 124 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 125: 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 126 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 127 #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 128: Variables

    Variables For applications that require a parameter that is variable, the DMC-42x0 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 129: 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 130: 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 131 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 132 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 133: 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 134 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-42x0 provides a special interrupt for communication allowing the application program to be interrupted by input from the user.
  • Page 135: 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 136 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 137 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-42x0 has a set of commands that directly interrogate the controller.
  • Page 138 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 139: 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 140 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 141 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 142 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 143: Extended I/O Of The Dmc-42X0 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 144 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 145: 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 146 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 147 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 148 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 149: 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 150 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 151: Chapter 8 Hardware & Software Protection

    Chapter 8 Hardware & Software Protection Introduction The DMC-42x0 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 152: 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 153 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 154 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-42x0 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 155 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 156: 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 157 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 158 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 159: 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 160 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 161: 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 162: 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 163 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 164 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 165 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 166: 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 167 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 168: 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-42x0 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 169 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 170 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-42x0 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 171: 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 172 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 173: Performance Specifications

    Performance Specifications Minimum Servo Loop Update Time/Memory: Normal Minimum Servo Loop Update Time DMC-4210 62.5 µsec DMC-4220 62.5 µsec DMC-4230 125 µsec DMC-4240 125 µsec DMC-4250 156.25 µsec DMC-4260 156.25 µsec DMC-4270 187.5 µsec DMC-4280 187.5 µsec Position Accuracy ± 1 quadrature count Velocity Accuracy Long Term...
  • Page 174: Ordering Options

    Ordering Options Overview The DMC-42x0 can be ordered in many different internal boards, the DMC, ICM, and CMB are required, and the AMP/SMD are optional. These individual boards have their own set of options that can modify them. This section provides information regarding the different options available for these different boards.
  • Page 175 RS-422-Main Port Standard connector and cable when DMC-42x0 is ordered with RS-422 Option. Pin # Signal RTS- TXD- RXD- CTS- RTS+ TXD+ RXD+ CTS+ RS-422-Auxiliary Port Standard connector and cable when DMC-42x0 is ordered with RS-422 Option. Pin # Signal CTS- RXD- TXD-...
  • Page 176 SSI and BiSS – SSI and BiSS Absolute encoder Option The BiSS and SSI options configures the DMC-42x0 for BiSS or SSI absolute encoder inputs. See the SS and SI commands in the DMC-42x0 Command Reference. Pin-out information is shown below for the DMC-42x0 with the CB-50-80, and the regular 80 Pin High Density cable.
  • Page 177 TRES – Encoder Termination Resistors The TRES option provides termination resistors on all of the main and auxiliary encoder inputs on the DMC-42x0 motion controller. The termination resistors are 120 Ω, and are placed between the positive and negative differential inputs on the Main A, B, Index channels as well as the Auxiliary A and B channels as in Figure A.2. Note: Single ended encoders will not operate correctly with the termination resistors installed.
  • Page 178: Accessories

    Accessories CABLE-100-1M 100-pin high density cable, 1 meter CABLE-100-4M 100-pin high density cable, 4 meter CABLE-80-1M 80-pin high density cable, 1 meter CABLE-80-4M 80-pin high density cable, 4 meter CABLE-36-1M 36-pin high density cable, 1 meter CABLE-36-4M 36-pin high density cable, 4 meter CB-50-100 50-pin to 100-pin converter board, includes two 50-pin ribbon cables CB-50-80...
  • Page 179: 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 180: Serial Cable Connections

    Serial Cable Connections The DMC-42x0 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 181 9 Pin Serial Connector (Male, D-type) Standard serial port connections found on most computers. Pin # Function DMC-42x0 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 182: Opto-Isolated Outputs For Icm-2900/Icm-1900/Amp-19520/40

    Opto-Isolated Outputs for ICM-2900/ICM-1900/AMP-19520/40 The ICM/AMP 1900 and ICM-2900 modules from Galil have an option for opto-isolated outputs. Standard Opto-Isolation and High Current Opto-isolation: The Opto-isolation option on the ICM-1900 has 2 forms: -opto (standard) and -optohc (high current). The standard version provides outputs with 4ma drive current / output with approximately 2 usec response time.
  • Page 183: 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 184: Connectors For Dmc-42X0 Main Board

    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 185 Amp Enable W Latch Y / Digital Input 2 Amp Enable Z Latch Z / Digital Input 3 Amp Enable Y Latch W/ Digital Input 4 Amp Enable X Digital Input 5 A+ X Digital Input 6 A- X Digital Input 7 B+ X Digital Input 8 B- X...
  • Page 186 Encoder-Compare Output Reverse Limit H Forward Limit H Home G Motor Command H Reverse Limit G Sign H/ Dir H Forward Limit G PWM H / Step H Home F Motor Command G Reverse Limit F Sign G/ Dir G Forward Limit F PWM G / Step G Home E...
  • Page 187 B+ H B- H I+ H I- H +12V -12V +12V -12V DMC-42x0 Auxiliary Encoder 36 Pin High Density Connector Signal Signal +AAX +AAE -AAX -AAE +ABX +ABE -ABX -ABE +AAY +AAF -AAY -AAF +ABY +ABF -ABY -ABF +AAZ +AAG -AAZ -AAG +ABZ...
  • Page 188 Appendices ▫ 184 DMC-42x0 User Manual...
  • Page 189 RS-422-Main Port Standard connector and cable when DMC-42x0 is ordered with RS-422 Option. Pin # Signal RTS- Appendices ▫ 185 DMC-42x0 User Manual...
  • Page 190 TXD- RXD- CTS- RTS+ TXD+ RXD+ CTS+ RS-422-Auxiliary Port Standard connector and cable when DMC-42x0 is ordered with RS-422 Option. Pin # Signal CTS- RXD- TXD- RTS- CTS+ RXD+ TXD+ RTS+ 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.
  • Page 191: A1. Icm-2900 Interconnect Module

    A1. ICM-2900 Interconnect Module Description The ICM-2900 interconnect module provides easy connections between the Optima series controllers and other system elements, such as amplifiers, encoders, and external switches. The ICM- 2900 accepts the 100-pin main cable and provides terminal blocks for connections. Each terminal is labeled for quick connection of system elements.
  • Page 192 Signal Ground MOCMDY Y axis motor command to amp input (w / respect to ground) SIGNY Y axis sign output for input to stepper motor amp PWMY Y axis pulse output for input to stepper motor amp Signal Ground OUT PWR Isolated Power In for Opto-Isolation Option ERROR Error output...
  • Page 193 ZLATCH Input 3 (Used for Z axis latch input) WLATCH Input 4 (Used for W axis latch input) + 5 volts +12V +12 volts -12V -12 volts ANA GND Isolated Analog Ground for Use with Analog Inputs INCOM Input Common For General Use Inputs ABORT Abort Input RESET...
  • Page 194 +INW W Main encoder Index + -INW W Main encoder Index - Signal Ground +MAW W Main encoder A+ -MAW W Main encoder A- +MBW W Main encoder B+ -MBW W Main encoder B ICM-2900 Drawing Appendices ▫ 190 DMC-42x0 User Manual...
  • Page 195 ICM-2900 PCB Layout Appendices ▫ 191 DMC-42x0 User Manual...
  • Page 196: A2. Icm-2908 Interconnect Module

    A2. ICM-2908 Interconnect Module Description The ICM-2908 interconnect module provides easy connections between the auxiliary encoder connections of the DMC-42x0 series controller and other system elements. The ICM-2908 accepts the 36 pin high density cable (CABLE-36) from the controller and provides terminal blocks for easy access. Each terminal is labeled for quick connection.
  • Page 197: A3. Icm-1900 Interconnect Module

    A3. ICM-1900 Interconnect Module Description The ICM-1900 interconnect module provides easy connections between the DMC-42x0 series controllers and other system elements, such as amplifiers, encoders, and external switches. The ICM- 1900 accepts the 100-pin main cable and 25-pin auxiliary cable and breaks them into screw-type terminals. Each screw terminal is labeled for quick connection of system elements.
  • Page 198 +ABW W Auxiliary encoder B+ -ABW W Auxiliary encoder B- Signal Ground +VCC + 5 volts ISO OUT Isolated Output Power(for use with the opto-isolated output option) POWER ERROR Error signal RESET Reset Circular Compare output MOCMDW W axis motor command to amp input (w / respect to ground) SIGNW W axis sign output for input to stepper motor amp PWMW...
  • Page 199 XLATCH Input 1 (Used for X axis latch input) YLATCH Input 2 (Used for Y axis latch input) ZLATCH Input 3 (Used for Z axis latch input) WLATCH Input 4 (Used for W axis latch input) Input 5 Input 6 Input 7 Input 8 ABORT...
  • Page 200 -MBZ Z Main encoder B- +INZ Z Main encoder Index + -INZ Z Main encoder Index - Signal Ground +VCC + 5 volts +MAW W Main encoder A+ -MAW W Main encoder A- +MBW W Main encoder B+ -MBW W Main encoder B- +INW W Main encoder Index + -INW...
  • Page 201: A4. Amp-19520/40

    A4. AMP-19520/40 Description The AMP-19540 (four-axis) and AMP-19520 (two-axis) are multi-axis brush/brushless amplifiers that are capable of handling 500 watts of continuous power per axis. Each amplifier is rated for 7 Amps continuous, 10 Amps peak and accepts 18-80 VDC for input power. Each AMP-195x0 includes a breakout for all controller I/O, including encoders, Hall-effect switches, digital inputs, digital outputs, and analog inputs.
  • Page 202: A5. Cb-50-100 Adapter Board

    A5. CB-50-100 Adapter Board Description The CB-50-100 adapter board can be used to convert the CABLE-100 to (2) 50 Pin Ribbon Cables. The 50 Pin Ribbon Cables provide a versatile method of accessing the controller signals without the use of a Galil Interconnect Module.
  • Page 203 JC6 50 PIN IDC J9 100 PIN HIGH DENSITY CONNECTOR Appendices ▫ 199 DMC-42x0 User Manual...
  • Page 204 Appendices ▫ 200 DMC-42x0 User Manual...
  • Page 205 CB-50-100 Drawings Appendices ▫ 201 DMC-42x0 User Manual...
  • Page 206 Appendices ▫ 202 DMC-42x0 User Manual...
  • Page 207 Appendices ▫ 203 DMC-42x0 User Manual...
  • Page 208 Appendices ▫ 204 DMC-42x0 User Manual...
  • Page 209 Appendices ▫ 205 DMC-42x0 User Manual...
  • Page 210 Appendices ▫ 206 DMC-42x0 User Manual...
  • Page 211 Appendices ▫ 207 DMC-42x0 User Manual...
  • Page 212: A6. Cb-50-80 Adapter Board

    A6. CB-50-80 Adapter Board Description The CB-50-80 adapter board can be used to convert the CABLE-80 to (2) 50 Pin Ribbon Cables. The 50 Pin Ribbon Cables provide a versatile method of accessing the extended I/O signals. Connectors JC8 and JC6: 50 Pin Male IDC J9: 80 Pin High Density Connector, AMP PART #3-178238-0 JC8 Pin J9 Pin...
  • Page 213 JC6 Pin J9 Pin JC6 Pin J9 Pin Appendices ▫ 209 DMC-42x0 User Manual...
  • Page 214 CB-50-80 Drawing Appendices ▫ 210 DMC-42x0 User Manual...
  • Page 215 Appendices ▫ 211 DMC-42x0 User Manual...
  • Page 216: 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 217: 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 ▫ 213 DMC-42x0 User Manual...
  • Page 218: 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.

This manual is also suitable for:

Dmc-4210Dmc-4250

Table of Contents