background image

 

a terminal control for sending commands and editing programs 

 

a polling window for displaying responses from the controller such as position and speed 

 

a storage scope control for plotting real time trajectories such as position versus time or X versus Y 

 

a send file control for sending contour data or vector DMC files 

 

a continuous array capture control for data collection, and for teach and playback 

 

a graphical display control for monitoring a 2-D motion path 

 

a diagnostics control for capturing current configurations 

 

a display control for input and output status 

 

a vector motion control for tool offsets and corner speed control 

For more detailed information on the ActiveX Toolkit, please refer to the user manual at 

http://www.galilmc.com/support/manuals/activex.pdf

 

 

DMCWin Programmers Toolkit 

 

DMCWin is a programmer's toolkit for C/C++ and Visual Basic users. The toolkit includes header files for the Galil 
communications API, as well as source code and examples for developing Windows

®

 programs that communicate to 

Galil Controllers. The Galil communications API includes functions to send commands, download programs, 
download/upload arrays, access the data record, etc. For a complete list of all the functions, refer to the DMCWin 
user manual at

 

http://www.galilmc.com/support/manuals/dmcwin.pdf

.  

 
This software package is free for download and is available at 

http://www.galilmc.com/support/download.html

 

Galil Communications API with C/C++ 

When programming in C/C++, the communications API can be used as included functions or 
through a class library.  All Galil communications programs written in C must include the 
DMCCOM.H file and access the API functions through the declared routine calls. C++ programs 
can use the DMCCOM.H routines or use the class library defined in DMCWIN.H.   

After installing DMCWin into the default directory, the DMCCOM.H header file is located in  
C:\Program Files\Galil\DMCWIN\INCLUDE. C++ programs that use the class library need the 
files DMCWIN.H and DMCWIN.CPP, which contain the class definitions and implementations 
respectively. These can be found in the C:\ProgramFiles\Galil\DMCWIN\CPP directory. 

To link the application with the DLL’s, the DMC32.lib file must be included in the project and is 
located at C:\Program Files\Galil\DMCWIN\LIB 

 

Example: A simple console application that sends commands to the controller 

To initiate communication, declare a variable of type HANDLEDMC (a long integer) and pass the address of that 
variable in the DMCOpen() function. If the DMCOpen() function is successful, the variable will contain the handle 
to the Galil controller, which is required for all subsequent function calls. The following simple example program 
written as a Visual C console application tells the controller to move the X axis 1000 encoder counts. Remember to 
add DMC32.LIB to your project prior to compiling.  

 

 #include <windows.h>  
 #include <dmccom.h>  
 long rc;  
 HANDLEDMC hDmc;  
 HWND hWnd;  
 int main(void)  
 {  

 // Connect to controller number 1  

50  

  Chapter 4 - Software Tools and Communications 

DMC-1600 

Summary of Contents for DMC-1600 Series

Page 1: ...0 Manual Rev 1 0h By Galil Motion Control Inc Galil Motion Control Inc 270 Technology Way Rocklin California 95765 Phone 916 626 0101 Fax 916 626 0102 Internet Address support galilmc com URL www gali...

Page 2: ...below Attention Pertains to servo motor use Attention Pertains to stepper motor use Please note that many examples are written for the DMC 1640 four axes controller or the DMC 1680 eight axes controll...

Page 3: ...Controller 7 Elements You Need 8 Installing the DMC 1600 9 Step 1 Determine Overall Motor Configuration 9 Step 2 Install Jumpers on the DMC 1600 10 Step 3 Install the Communications Software 11 Step...

Page 4: ...g an Isolated Power Supply 35 Bypassing the Opto Isolation 36 Analog Inputs 36 Amplifier Interface 36 TTL Outputs 37 Chapter 4 Software Tools and Communications 38 Introduction 38 Galil SmartTERM 39 C...

Page 5: ...6 Electronic Gearing 88 Command Summary Electronic Gearing 88 Electronic Cam 90 Command Summary Electronic CAM 93 Contour Mode 95 Specifying Contour Segments 95 Additional Commands 97 Command Summary...

Page 6: ...rrays 142 Deallocating Array Space 143 Input of Data Numeric and String 143 Input of Data 143 Output of Data Numeric and String 144 Sending Messages 144 Displaying Variables and Arrays 146 Interrogati...

Page 7: ...t 178 Power Requirement 179 Performance Specifications 179 Connectors for DMC 1600 Main Board 180 Pin Out Description for DMC 1600 181 Extended I O of the DMC 1600 Controller 183 Configuring the I O o...

Page 8: ......

Page 9: ...tures velocity and acceleration feedforward an extra pole filter and integration limits Designed to solve complex motion problems the DMC 1600 can be used for applications involving jogging point to p...

Page 10: ...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 11: ...l Elements Microcomputer Section The main processing unit of the DMC 1600 is a specialized 32 bit Motorola 68331 Series Microcomputer with 256K RAM and 256K Flash EEPROM The RAM provides memory for va...

Page 12: ...ike this product The motor may be a step or servo motor and can be brush type or brushless rotary or linear For step motors the controller can be configured to control full step half step or microstep...

Page 13: ...o 12 Volts are acceptable If using differential signals 12 Volts can be input directly to the DMC 1600 Single ended 12 Volt signals require a bias voltage input to the complementary inputs The DMC 160...

Page 14: ...THIS PAGE LEFT BLANK INTENTIONALLY 6 Chapter 1 Overview DMC 1600...

Page 15: ...Chapter 2 Getting Started The DMC 1600 Motion Controller Figure 2 1 Outline of the DMC 1600 DMC 1600 Chapter 2 Getting Started 7...

Page 16: ...d Play drivers and communication utilities 7 WSDK 16 or WSDK 32 is optional but recommend for first time users The motors may be servo brush type or brushless or steppers The amplifiers should be suit...

Page 17: ...Sinusoidal Commutation Sinusoidal commutation is configured through a single software command BA This configuration causes the controller to reconfigure the number of available control axes Each sinu...

Page 18: ...he UPGRD Jumper and use the update firmware function on the Galil Terminal to re load the system firmware Opto Isolation Jumpers The inputs and limit switches are optoisolated If you are not using an...

Page 19: ...ng the expansion bus slot where the DMC 1600 will be inserted 4 Insert DMC 1600 card in the expansion bus and secure with screw 5 Attach 100 pin cable to your controller card If you are using a Galil...

Page 20: ...inal commands can be sent to the controller Command syntax is described in the Command Reference and later sections If you are not properly communicating with the controller the program will pause for...

Page 21: ...otor to the amplifier with no connection to the controller Consult the amplifier documentation for instructions regarding proper connections Connect and turn on the amplifier power supply If the ampli...

Page 22: ...individual signal leads For a 10 pin ribbon cable encoder connect the cable to the protected header connector labeled X ENCODER repeat for each axis necessary For individual wires simply match the le...

Page 23: ...e mode the amplifier gain should be such that a 10 Volt signal generates the maximum required current In the velocity mode a command signal of 10 Volts should run the motor at the maximum required spe...

Page 24: ...ition enable the Off On Error function using the command OE 1 If the motor runs away due to positive feedback or another systematic problem the controller will disable the amplifier when the position...

Page 25: ...This can be alleviated by reducing system friction on the motors The instruction TTX CR Tell torque on X reports the level of the output signal It will show a non zero value that is below the frictio...

Page 26: ...M A DE IN USA DC Power Supply M1W M2W M1Z M2Z M1Y M2Y M1X M2X X Y Filter Chokes Z W Reset Switch Error LED VAMP VAMP G ND EARTH G ND AUX encoder input connector 26 pin header Figure 2 2 System Connec...

Page 27: ...NX MBX MAX ICM A MP 1900 REV D GA LIL M OTION CONTROL M ADE IN USA LSCOM INCOM VCC VCC AUX encoder input connector DB25 female 100 pin high density connector AMP part 2 178238 9 Error LED Reset Switch...

Page 28: ...th cross wiring the 1st and 2nd signals If this wiring is incorrect the setup procedure will alert the user Step D Example Sinusoidal Commutation Configuration using a DMC 1640 BAXY This command cause...

Page 29: ...figuration in non volatile memory After the motor wiring and setup parameters have been properly configured the burn command BN should be given If Hall Sensors are Not Available Without hall sensors t...

Page 30: ...ting the BZ command The controller makes an estimate for the number of encoder counts between the current position and the position of zero commutation phase This value is stored in the operand _BZx U...

Page 31: ...d direction signals from controller to motor amplifier from the controller to respective signals on your step motor amplifier These signals are labeled PULSX and DIRX for the x axis on the ICM 1900 Co...

Page 32: ...uce KI Repeat tuning for the Y Z and W axes For a more detailed description of the operation of the PID filter and or servo system theory see Chapter 10 Theory of Operation Design Examples Here are a...

Page 33: ...cceleration of Y SP 40000 Slew speed of Z AC 100000 Acceleration of Z DC 150000 Deceleration of Z BG Z Start Z motion BG Y Start Y motion Example 5 Position Interrogation The position of the four axes...

Page 34: ...Returns X speed and then JG 20000 New Y speed TV Y Returns Y speed These cause velocity changes including direction reversal The motion can be stopped with the instruction ST Stop Example 8 Operation...

Page 35: ...Galil DOS terminal such as DMCTERM the controller s editor will be started The instruction ED Edit mode moves the operation to the editor mode where the program may be written and edited The editor p...

Page 36: ...hown below Instruction Interpretation B Label DP 0 0 Define initial positions PR 30000 60000 Set targets SP 5000 5000 Set speeds BGX Start X motion AD 4000 Wait until X moved 4000 BGY Start Y motion A...

Page 37: ...rs start and stop together Instruction Interpretation LM XYZ Specify linear interpolation axes LI 7000 3000 6000 Relative distances for linear interpolation LE Linear End VS 6000 Vector speed VA 20000...

Page 38: ...0 0 local zero 0 4000 4000 4000 4000 0 X Y R 2000 Figure 2 4 Motion Path for Example 16 30 Chapter 2 Getting Started DMC 1600...

Page 39: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 1600 Chapter 2 Getting Started 31...

Page 40: ...celerated stop using the deceleration rate previously set with the DC command The motor will remain on in a servo state after the limit switch has been activated and will hold motor position When a fo...

Page 41: ...until the controller senses a change in the index pulse signal from low to high The motor then decelerates to a stop at the rate previously specified by the user with the DC command Although Find Ind...

Page 42: ...igh IN9 IN16 INCOM 2 FLE RLE HOMEE FLF RLF HOMEF FLG RLG HOMEG FLH RLH HOMEH LSCOM 2 Note When using the ICM 1100 the INCOM is different for IN9 IN16 from IN1 IN8 A logic zero is generated when at lea...

Page 43: ...3 IN4 IN5 IN6 IN7 IN8 ABORT Figure 3 1 The Optoisolated Inputs Using an Isolated Power Supply To take full advantage of opto isolation an isolated power supply should be used to provide the voltage at...

Page 44: ...s can also be done by connecting wires between the 5V supply and common signals using the screw terminals on the ICM 1900 or AMP 19X0 To close the circuit wire the desired input to any ground GND term...

Page 45: ...8 These outputs can be turned On and Off with the commands SB Set Bit CB Clear Bit OB Output Bit and OP Output Port For more information about these commands see the Command Summary The value of the o...

Page 46: ...in this chapter describing the communication registers This chapter is an introduction to the software tools and communication techniques used by Galil Figure 1 illustrates the software hierarchy tha...

Page 47: ...l SmartTERM SmartTERM is Galil s basic communications utility that allows the user to perform basic tasks such as sending commands directly to the controller editing downloading and executing DMC prog...

Page 48: ...the file clearing all programs in the controller s RAM Upload File Opens a file save as dialog that creates a file for saving the DMC program that is in the controller s RAM This command uses the UL...

Page 49: ...ert File Binary to ASCII Opens a dialog box that allows converting a file containing Galil binary language commands to Galil ASCII commands and saves the result to the specified file name Send Binary...

Page 50: ...uses the controller s output FIFO to be cleared of data Device Driver The Device Driver menu selection is available to operating systems and or controllers that have device drivers that can be stopped...

Page 51: ...editor window File menu allows an application program to be downloaded with compression 80 characters wide This allows the user to write an application program in the editor window that is longer tha...

Page 52: ...s of the Galil DMC SmartTERM including the Data Record please consult Help Topics under the Help menu Communication Settings The Galil SmartTERM application installation as well as WSDK ActiveX and DM...

Page 53: ...trol is used to create maintain and modify the critical communication parameters which are discussed next Figure 4 3 Galil Registry Editor Setting Communications Parameters and Methods To access the C...

Page 54: ...s Method tab to allow different methods of communications to be utilized shown in Fig 4 5 The version 7 and higher drivers and DLL s allow for three different methods of communications Interrupt Stall...

Page 55: ...dest data record in the cache is discarded If multiple handles to a controller are open the first handle to retrieve the data record s will possess the only copy available When an application needs on...

Page 56: ...provides a real time display of the actual position velocity error and torque WSDK also includes impulse step and frequency response tests which are useful for analyzing system stability bandwidth an...

Page 57: ...C Delphi LabVIEW and other ActiveX compatible programming tools The most common environment is Visual Basic 6 but Visual Basic NET Visual C Wonderware LabVIEW and HPVEE have all been tested by Galil t...

Page 58: ...html Galil Communications API with C C When programming in C C the communications API can be used as included functions or through a class library All Galil communications programs written in C must i...

Page 59: ...string Before sending any commands the DMCCOpen function must be called This function establishes communication with the controller and is called only once This example code illustrates the use of DMC...

Page 60: ...e code for BASIC and C programs Download DMCDOS at http www galilmc com support download html dos Linux Galil has developed code examples for the Linux operating system The installation includes sampl...

Page 61: ...mmand EO 1 to the controller Binary Command Mode Some commands have an equivalent binary value for the controllers These values are listed in the Command Reference next to the command in parentheses i...

Page 62: ...r for PR 02 specifies 2 bytes for each data field 00 coordinated motion is not active for PR 05 specifies bit 0 is active for A axis and bit 2 is active for C axis 20 22 5 03 E8 represents 1000 xx xx...

Page 63: ...ere the first field m represents a 16 bit value of conditions described in the table below For example to enable interrupts on X and Y motion complete and position error set EI515 i e 515 20 21 29 Onc...

Page 64: ...omplete D4 E axis motion complete D3 W axis motion complete D2 Z axis motion complete D1 Y axis motion complete D0 X axis motion complete The recommended method to utilize the interrupts in a host app...

Page 65: ...BSYSTEM ID SUBSYSTEM VENDOR ID 9050H 10B5H 1640H 1079H Read Write and Control Registers The DMC 1600 provides four registers used for communication The main communications FIFO register for sending co...

Page 66: ...an write at least 255 bytes If 1 buffer is more than half full 0 Read Only If 1 PC to DMC Buffer full Do not write data Half Full Flag The Half Full flag Bit 1 of the control register can be used to i...

Page 67: ...e DMC to PC FIFO To reset the input FIFO write data to address N 8 where bit 1 is high and all other bits are low Resetting the Controller Clearing the FIFO is useful for emergency resets or Abort For...

Page 68: ...axis reference position 48 51 SL x a axis motor position 52 55 SL x a axis position error 56 59 SL x a axis auxiliary position 60 63 SL x a axis velocity 64 65 SW x a axis torque 66 67 SW x a axis an...

Page 69: ...status 182 UB f axis switches 183 UB f axis stopcode 184 187 SL f axis reference position 188 191 SL f axis motor position 192 195 SL f axis position error 196 199 SL f axis auxiliary position 200 20...

Page 70: ...IT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 1st Phase of HM complete 2nd Phase of HM complete or FI command issued Mode of Motion Coord Motion Move in Progress Mode of Motion PA or PR Mode of...

Page 71: ...and reference for more information about TV The torque information is represented as a number in the range of 32544 Maximum negative torque of 9 9982 V is represented by 32544 Maximum positive torque...

Page 72: ...syntax A summary of commands as well as a complete listing of all DMC 1600 instructions is included in the Command Reference chapter Command Syntax ASCII DMC 1600 instructions are represented by two...

Page 73: ...ion relative movement for the X axis of 1000 ACY 200000 Specify acceleration for the Y axis as 200000 Instead of data some commands request action to occur on an axis or group of axes For example ST X...

Page 74: ...raction Byte 3 specifies whether the command applies to a coordinated move as follows 00 No coordinated motion movement 01 Coordinated motion movement For example the command STS designates motion to...

Page 75: ...reserved d7 KI 82 reserved ad RP d8 KD 83 reserved ae TP d9 DV 84 reserved af TE da AF 85 LM b0 TD db KF 86 LI b1 TV dc PL 87 VP b2 RL dd ER 88 CR a3 TT de IL 89 TN b4 TS df TL 8a LE VE b5 TI e0 MT 8...

Page 76: ...ror code The error code will specify the reason for the inval1d command response To request the error code type the command TC1 For example TC1 enter Tell Code command 1 Unrecognized command Returned...

Page 77: ...0000000 Controllers Response Interrogating Current Commanded Values Most commands can be interrogated by using a question mark as the axis specifier Type the command followed by a for each axis reques...

Page 78: ...axis can be assigned to the variable V with the command V _TPX The Command Reference denotes all commands which have an equivalent operand as Used as an Operand Also see description of operands in Ch...

Page 79: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 1600 Chapter 5 Command Basics 71...

Page 80: ...le applications described below will help guide you to the appropriate mode of motion EXAMPLE APPLICATION MODE OF MOTION COMMANDS Absolute or relative positioning where each axis is independent and fo...

Page 81: ...Smooth motion while operating in vector or linear interpolation positioning Vector Smoothing VT Smooth motion while operating with stepper motors Stepper Motor Smoothing KS Gantry two axes are coupled...

Page 82: ...increment n The new target is equal to the old target plus the increment n Upon receiving the IP command a revised profile will be generated for motion towards the new end position The IP command doe...

Page 83: ...eed 500000 counts sec2 Acceleration Y Axis 1000 counts Position 15000 count sec Speed 500000 counts sec2 Acceleration Z Axis 100 counts Position 5000 counts sec Speed 500000 counts sec Acceleration Th...

Page 84: ...leration DC rate for each axis The direction of motion is specified by the sign of the JG parameters When the begin command is given BG the motor accelerates up to speed and continues to jog at that s...

Page 85: ...jogging Z in reverse direction at 25000 count s A AC 20000 20000 Specify X Z acceleration of 20000 cts sec DC 20000 20000 Specify X Z deceleration of 20000 cts sec JG 50000 25000 Specify jog speed an...

Page 86: ...he user to keep enough LI segments in the DMC 1600 sequence buffer to ensure continuous motion If the controller receives no additional LI segments and no LE command the controller will stop motion in...

Page 87: ...ring previous segments as needed to meet the final speed requirement under the given values of VA and VD Note however that the controller works with one m command at a time As a consequence one functi...

Page 88: ...the segment in the sequence starting at zero _LE Returns length of vector resets after 2147483647 _LM Returns number of available spaces for linear segments in DMC 1600 sequence buffer Zero means buf...

Page 89: ...vector deceleration BGS Begin sequence Note that the above program specifies the vector speed VS and not the actual axis speeds VZ and VW The axis speeds are determined by the DMC 1600 from VS VZ VW 2...

Page 90: ...sec Figure 6 2 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 fille...

Page 91: ...t 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...

Page 92: ...ify the end of the coordinated motion This command requires the controller to decelerate to a stop following the last motion requirement If a VE command is not given an Abort AB1 must be used to abort...

Page 93: ...the next command in a program Tangent Motion Several applications such as cutting require a third axis i e a knife blade to remain tangent to the coordinated motion path To handle these applications...

Page 94: ...eration along the sequence VR s t Specify vector speed ratio BGST Begin motion sequence S or T CSST Clear sequence S or T AV s t Trippoint for After Relative Vector distance AMST Holds execution of ne...

Page 95: ...3000 Segment CD CR 1500 90 180 Segment DA VE End of sequence BGS Begin Sequence The resulting motion starts at the point A and moves toward points B C D A Suppose that we interrogate the controller wh...

Page 96: ...ed vector motion of several axes performed by GAS For example if the X and Y motor form a circular motion the Z axis may move in proportion to the vector move Similarly if X Y and Z perform a linear i...

Page 97: ...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...

Page 98: ...mode the position of the master is always expressed modulo one cycle In this example the position of x is always expressed in the range between 0 and 6000 Similarly the slave position is also redefin...

Page 99: ...y z w where n indicates the order of the point The value n starts at zero and may go up to 256 The parameters x y z w indicate the corresponding slave position For this example the table may be specif...

Page 100: ...corresponding slave axes are disengaged Master X 4000 2250 2000 6000 3000 1500 0 Figure 6 4 Electronic Cam Example This disengages the slave axis at a specified master position If the parameter is ou...

Page 101: ...le from equation P N 3 6 Note 3 6 0 18 20 S SIN P 100 Define sine position Y N 10 S Define slave position ET N Y Define table N N 1 JP LOOP N 100 Repeat the process EN Command Summary Electronic CAM C...

Page 102: ...n master is at 0 position 1st point ET 1 40 20 2nd point in the ECAM table ET 2 120 60 3rd point in the ECAM table ET 3 240 120 4th point in the ECAM table ET 4 280 140 5th point in the ECAM table ET...

Page 103: ...er defined profiles The path is not limited to straight line and arc segments and the path length may be infinite Specifying Contour Segments The Contour Mode is specified with the command CM For exam...

Page 104: ...position 12 at 1 msec position 24 at 2 msec etc The programmed commands to specify the above example are A CMX Specifies X axis for contour mode DT 2 Specifies first time interval 22 ms CD 48 WC Spec...

Page 105: ...mode If n does not change it does not need to be specified with each CD WC Waits for previous time interval to be complete before next data record is processed General Velocity Profiles The Contour Mo...

Page 106: ...s This is stored at the array POS Then the difference between the positions is computed and is stored in the array DIF Finally the motors are run in the contour mode Contour Mode Example Instruction I...

Page 107: ...commands are used DM C n Dimension array RA C Specify array for automatic record up to 4 for DMC 1640 RD _TPX Specify data for capturing such as _TPX or _TPZ RC n m Specify capture time interval wher...

Page 108: ...ained along a path that can be described by an electronic cam table Further assume that the ecam master is not an external encoder but has to be a controlled variable This can be achieved by defining...

Page 109: ...motors you will always have some amount of stepper motor smoothing KS Since this filtering effect occurs after the profiler the profiler may be ready for additional moves before all of the step pulse...

Page 110: ...Motion Profiler Stepper Smoothing Filter Adds a Delay Output Buffer Step Count Register TD Reference Position RP Output To Stepper Driver Note Although steps can be missed by over lapping moves when t...

Page 111: ...er motor position error The mode looks at position feedback from the main encoder and compares it to the commanded step pulses The position information is used to determine if there is any significant...

Page 112: ...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 s...

Page 113: ...solution of the microstepping drive YB200 Motor resolution full steps per revolution YC4000 Encoder resolution counts per revolution SHX Enable axis WT50 Allow slight settle time YS1 Enable SPM mode E...

Page 114: ...rection MCX Wait for motion to complete MG CORRECTED ERROR NOW _QSX WT100 Wait helps user see the correction RETURN SPX spsave Return the speed to previous setting REO Return from POSERR Example Frict...

Page 115: ...eration and axis used in circular compare When used the second encoder is typically mounted on the motor or the load but may be mounted in any position The most common use for the second encoder is ba...

Page 116: ...sation using the auxiliary encoders 1 7Continuous dual loop 2 Sampled dual loop To illustrate the problem consider a situation in which the coupling between the motor and the load has a backlash To co...

Page 117: ...y to use a linear encoder to monitor the position of the slide For stability reasons it is best to use a rotary encoder on the motor Connect the rotary encoder to the X axis and connect the linear enc...

Page 118: ...lts in reduced mechanical vibrations The smoothing function is specified by the following commands IT x y z w Independent time constant VT n Vector time constant The command IT is used for smoothing i...

Page 119: ...the motor to a home switch The home switch is connected to the Homing Input When the Find Edge command and Begin is used the motor will accelerate up to the slew speed and slew until a transition is d...

Page 120: ...until the home switch toggles again 4 The motor then traverses forward until the encoder index pulse is detected 5 The DMC 1600 defines the home position 0 as the position at which the index was detec...

Page 121: ...ION POSITION HOME SWITCH INDEX PULSES MOTION REVERSE TOWARD HOME DIRECTION MOTION TOWARD INDEX DIRECTION MOTION BEGINS TOWARD HOME DIRECTION Figure 6 9 Motion intervals in the Home sequence DMC 1600 C...

Page 122: ...e the AL XYZW command or ABCDEFGH for DMC 1680 to arm the latch for the main encoder and ALSXSYSZSW for the auxiliary encoders 2 Test to see if the latch has occurred Input goes low by using the _AL X...

Page 123: ...order to set the desired update rates use the command TM When operating the controller with the fast firmware some functionality is limited The following functions are disabled Gearing Mode Ecam Mode...

Page 124: ...a program which the operator can change as necessary The following sections in this chapter discuss all aspects of creating applications programs The program memory size is 80 characters x 1000 lines...

Page 125: ...ll be inserted between lines 1 and 2 This new line will be labeled line 2 The old line number 2 is renumbered as line 3 cntrl D The cntrl D command deletes the line currently being edited For example...

Page 126: ...RE X1 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 AM Wait for motion complete...

Page 127: ...BOTTOM LINE CR 1500 270 180 NO HALF CIRCLE MOTION VP 0 3000 NO TOP LINE CR 1500 90 180 NO HALF CIRCLE MOTION VE NO END VECTOR SEQUENCE BGS NO BEGIN SEQUENCE MOTION EN NO END OF PROGRAM Note The NO co...

Page 128: ...the following ways 1 Only the main thread thread 0 may use the input command IN 2 When input interrupts are implemented for limit switches position errors or command errors the subroutines are execute...

Page 129: ...s of information In normal operation the controller places output into the FIFO buffer The software on the host computer monitors this buffer and reads information as needed When the trace mode is ena...

Page 130: ...general all of the 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...

Page 131: ...motion to be complete waiting for a specified amount of time to elapse or waiting for an input to change logic levels The DMC 1600 provides several event triggers that cause the program sequencer to h...

Page 132: ...r G or H Halt program execution until after reverse motion reached absolute position Only one axis may be specified If position is already past the point then MR will trip immediately Will function on...

Page 133: ...t 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 BGX Begin motion AD 1000 Wait until 100...

Page 134: ...output when at speed ATSPEED Program Label JG 50000 Specify jog speed AC 10000 Acceleration rate BGX Begin motion ASX Wait for at slew speed 50000 SB1 Set output 1 EN End program Event Trigger Change...

Page 135: ...ference SB1 Set Output 1 LOOP Loop AT 10 After 10 msec from reference CB1 Clear Output 1 AT 40 Wait 40 msec from reference and reset reference SB1 Set Output 1 JP LOOP Loop EN Conditional Jumps The DM...

Page 136: ...numeric values functions keywords and arithmetic expressions If no conditional statement is given the jump will always occur Examples Number V1 6 Numeric Expression V1 V7 6 ABS V1 10 Array Element V1...

Page 137: ...if input 1 is logic level high After the subroutine MOVE2 is executed the program sequencer returns to the main program location where the subroutine was called JP BLUE ABS V2 2 Jump to BLUE if the ab...

Page 138: ...d evaluates False The ELSE command must occur after an IF command and has no arguments If the argument of the IF command evaluates false the controller will skip commands until the ELSE command If the...

Page 139: ...1 and input 2 are not active RI0 End Input Interrupt Routine without restoring trippoints Subroutines A subroutine is a group of instructions beginning with a label and ending with an end command EN...

Page 140: ...ons continuously without tying up the host or DMC 1600 program sequences The DMC 1600 can monitor several important conditions in the background These conditions include checking for the occurrence of...

Page 141: ...ine is only executed when the motor is being commanded to move Example Position Error ED Edit Mode 000 LOOP Dummy Program 001 JP LOOP EN Loop 002 POSERR Position Error Routine 003 V1 _TEX Read Positio...

Page 142: ...D Prompt for speed JG SPEED BGX Begin motion JP BEGIN Repeat EN End main program CMDERR Command error utility JP DONE _ED 2 Check if error on line 2 JP DONE _TC 6 Check if out of range MG SPEED TOO HI...

Page 143: ...Multitasking A Begin thread 0 continuous loop JP A EN End of thread 0 B Begin thread 1 N 1 Create new variable KP N Set KP to value of N an invalid value TY Issue invalid command EN End of thread 1 C...

Page 144: ...esented as 32 bits of integer and 16 bits of fraction Each ASCII character is represented as one byte 8 bits therefore the input variable can hold up to six characters The first character of the strin...

Page 145: ...ne of n between 0 and 180 Angle resolution in 1 64000 degrees ATAN n Arc Tangent of n between 90 and 90 Angle resolution in 1 64000 degrees COM n 1 s Complement of n ABS n Absolute value of n FRAC n F...

Page 146: ...f valid and invalid variable names are Valid Variable Names POSX POS1 SPEEDZ Invalid Variable Names REALLONGNAME Cannot have more than 8 characters 123 Cannot begin variable name with a number SPEED Z...

Page 147: ...EN End Operands Operands allow motion or status parameters of the DMC 1600 to be incorporated into programmable variables and expressions Most DMC 1600 commands have an equivalent operand which are de...

Page 148: ...FX Assign V1 the logical state of the Forward Limit Switch on the X axis V3 TIME Assign V3 the current value of the time clock V4 _HMW Assign V4 the logical state of the Home input on the W axis Array...

Page 149: ...gns the second element of the array timer the returned value of the TIME keyword Using a Variable to Address Array Elements An array element number can also be a variable This allows array entries to...

Page 150: ...p arrays in the RA command RC n m The RC command begins data collection Sets data capture time interval where n is an integer between 1 and 8 and designates 2n msec between data m is optional and spec...

Page 151: ...nter X POS N Print X position Y POS N Print Y position XERR N Print X error YERR N Print Y error N N 1 Increment Counter DONE Done EN Deallocating Array Space Array space may be deallocated using the...

Page 152: ...Specify position in counts BGX Begin motion to move material AMX Wait for motion done SB1 Set output to cut WT100 CB1 Wait 100 msec then turn off cutter JP CUT Repeat process EN End program Inputting...

Page 153: ...e RESULT is equal to 4 1 this statement returns the following The Final Value is 00004 10 If the value of the variable RESULT is equal to 999999 999 the above message statement returns the following T...

Page 154: ...riable V1 POSX 0 _TPX Assign the first entry V1 Print V1 Interrogation Commands The DMC 1600 has a set of commands that directly interrogate the controller When these command are entered the requested...

Page 155: ...o interrogation commands can be removed by the use of the command LZ Example Using the LZ command LZ0 Disables the LZ function TP Tell Position Interrogation Command 0000000009 0000000005 0000000000 0...

Page 156: ...PF and VF commands are global format commands that effect the format of all relevant returned values and variables Variables may also be formatted locally To format locally use the command Fn m or n m...

Page 157: ...additional 8 outputs The DMC 1600 has an additional 64 I O configured as inputs or outputs with CO command Each bit on the output port may be set and cleared with the software instructions SB Set Bit...

Page 158: ...t AI instruction waits until the specified input has occurred Example JP A IN 1 0 Jump to A if input 1 is low JP B IN 2 1 Jump to B if input 2 is high AI 7 Wait until input 7 is high AI 6 Wait until i...

Page 159: ...to B EN End of program ININT Interrupt subroutine MG Interrupt has occurred Displays the message ST XY Stops motion on X and Y axes LOOP JP LOOP IN 1 0 Loop until Interrupt cleared JG 15000 10000 Spec...

Page 160: ...cutter Allowing 100 ms for the cutting completes the cycle Suppose that the motor drives the wire by a roller with a 2 diameter Also assume that the encoder resolution is 1000 lines per revolution Sin...

Page 161: ...2 indicate sections where cutting takes place Those must be performed at a feed rate of 1 inch per second The dashed line corresponds to non cutting moves and should be performed at 5 inch per second...

Page 162: ...truction Function A Label VM XY Circular interpolation for XY VP 160000 160000 Positions VE End Vector Motion VS 200000 Vector Speed VA 1544000 Vector Acceleration BGS Start Motion AMS When motion is...

Page 163: ...ontrolled by a joystick The joystick produces a signal in the range between 10V and 10V The objective is to drive the motor at a speed proportional to the input voltage Assume that a full voltage of 1...

Page 164: ...tarting position JG0 Set motor in jog mode as zero BGX Start B V1 AN 1 Read analog input V2 V1 V3 Compute the desired position V4 V2 _TPX _TEX Find the following error V5 V4 20 Compute a proportional...

Page 165: ...strate the control method assume that the rotary encoder is used as a feedback for the X axis and that the linear sensor is read and stored in the variable LINPOS Further assume that at the start both...

Page 166: ...he Error Limit ER command or when off on error condition is enabled OE1 and the abort command is given Each axis amplifier has separate amplifier enable lines This signal also goes low when the watch...

Page 167: ...ovides a programmable error limit The error limit can be set for any number between 1 and 32767 using the ER n command The default value for ER is 16384 Example ER 200 300 400 500 Set X axis error lim...

Page 168: ...y axis exceeds the error limit specified by ER The error routine must be closed with the RE command The RE command returns from the error subroutine to the main program NOTE The Error Subroutine will...

Page 169: ...eck 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 LF LF MG FORWARD LIMIT Send message STX AMX Stop motion PR 1000 BGX AMX Move in reverse JP END...

Page 170: ...no additional inputs Amplifier offset too large Adjust amplifier offset Same as above but offset adjustment does not stop the motor Damaged amplifier Replace amplifier Same as above but offset adjust...

Page 171: ...llates Too high gain or too little damping Decrease KI and KP Increase KD Operation SYMPTOM CAUSE REMEDY Controller rejects command Responded with a Anything Interrogate the cause with TC or TC1 Motor...

Page 172: ...hat the motor follows the commanded position This is done by closing the position loop using a sensor The operation at the basic level of closing the loop involves the subjects of modeling analysis an...

Page 173: ...may specify the following instruction for example PR 6000 4000 SP 20000 20000 AC 200000 00000 BG X AD 2000 BG Y EN This program corresponds to the velocity profiles shown in Fig 10 3 Note that the pro...

Page 174: ...ow the error is positive and it triggers an action which raises the water temperature until the temperature error is reduced sufficiently The closing of the servo loop is very similar Suppose that we...

Page 175: ...tability and accuracy Typically such a filter produces in addition to the proportional gain damping and integrator The combination of the three functions is referred to as a PID filter The filter para...

Page 176: ...V V The transfer function relating the input voltage V to the motor position P is P V K K S ST ST V t m e 1 1 where T RJ K m t 2 s and T L R e s and the motor parameters and units are Kt Torque consta...

Page 177: ...an amplifier that performs the commutation The combined transfer function of motor amplifier combination is the same as that of a similar brush motor as described by the previous equations Velocity L...

Page 178: ...e 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 in...

Page 179: ...K Z A Z CZ Z 1 Low pass L z 1 B Z B Notch N z Z z Z z Z p Z p The filter parameters K A C and B are selected by the instructions KP KD KI and PL respectively The relationship between the filter coeffi...

Page 180: ...fect 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 fo...

Page 181: ...8s 098 s 51 The system elements are shown in Fig 10 7 50 0 980s 318 V ENCODER 500 S2 FILTER 2000 S 2000 0 0003 4 ZOH DAC AMP MOTOR Figure 10 7 Mathematical model of the control system The open loop tr...

Page 182: ...of 70 degrees given above indicated overdamped response Next we discuss the design of control systems System Design and Compensation The closed loop control system can be stabilized by a digital filte...

Page 183: ...s2 Amp Ka 2 Amp V DAC Kd 10 32768 0003 Encoder Kf 4N 2 636 ZOH H s 2000 s 2000 Compensation Filter G s P sD The next step is to combine all the system elements with the exception of G s into one funct...

Page 184: ...D P 59 The solution of these equations leads to P 160cos 59 82 4 500D 160sin 59 137 Therefore D 0 274 and G 82 4 0 2744s The function G is equivalent to a digital filter of the form D z 4KP 4KD 1 z 1...

Page 185: ...l D z K z A z Cz z 1 1 B Z B Digital D z 4 KP 4 KD 1 z 1 KI 2 1 z 1 1 B Z B KP KD KI PL K KP KD 4 A KD KP KD C KI 2 B PL Continuous G s P Ds I s a s a PID T P 4 KP D 4 T KD I KI 2T a 1 T ln 1 PL DMC 1...

Page 186: ...se width 80 nsec Stepper Control Pulse TTL 0 5 Volts level at 50 duty cycle 3 000 000 pulses sec maximum frequency Direction TTL 0 5 Volts Input Output Uncommitted Inputs Limits Home Abort Inputs 2 2K...

Page 187: ...1 quadrature count Velocity Accuracy Long Term Phase locked better than 005 Short Term System dependent Position Range 2147483647 counts per move Velocity Range Up to 12 000 000 counts sec servo 3 00...

Page 188: ...1 NC 14 PWM Z Step Z 64 Home X 14 B Aux Z 32 NC 15 Motor command Y 65 Reverse limit X 15 A Aux W 33 NC 16 Sign Y Dir Y 66 Forward limit X 16 A Aux W 34 NC 17 PWM Y Step Y 67 Ground 17 B Aux W 35 NC 18...

Page 189: ...ode the PWM signal is 2 duty cycle for full negative voltage 50 for 0 Voltage and 99 8 for full positive voltage In the Sign Magnitude Mode Jumper SM the PWM signal is 0 for 0 Voltage 99 6 for full vo...

Page 190: ...r to its power on condition The previously saved state of the controller along with parameter values and saved sequences are restored Forward Limit Switch When active inhibits motion in forward direct...

Page 191: ...decimal value can be calculated by the following formula n n2 2 n3 4 n4 8 n5 16 n6 32 n7 64 n8 128 n9 where nx represents the block If the nx value is a one then the block of 8 I O points is to be con...

Page 192: ...n consecutive groups of 16 bits values from 0 to 65535 Arguments which are given for I O points which are configured as inputs will be ignored The following table describes the arguments used to set t...

Page 193: ...2 22 5 39 I O 2 21 4 41 I O 2 20 3 43 I O 2 19 2 45 I O 2 18 1 47 I O 2 17 0 49 5V 2 I O 5 48 0 4 I O 5 47 1 6 I O 5 46 2 8 I O 5 45 3 10 I O 5 44 4 12 I O 5 43 5 14 I O 5 42 6 16 I O 5 41 7 18 GND 20...

Page 194: ...7 58 1 81 I O 7 57 0 83 I O 6 56 7 85 I O 6 55 6 87 I O 6 54 5 89 I O 6 53 4 91 I O 6 52 3 93 I O 6 51 2 95 I O 6 50 1 97 I O 6 49 0 99 5V 52 I O 9 80 7 54 I O 9 79 6 56 I O 9 78 5 58 I O 9 77 4 60 I...

Page 195: ...nd a 80 pin high density cable By connecting the CB 50 80 the user will be provided with 2 50pin IDC connectors which are directly compatible with specific I O mounting racks When using the OPTO 22 G4...

Page 196: ...otors or selects SMZ stepper motors If you are using stepper SMW motors SM must always be jumpered The Analog motor command is not valid with SM jumpered SM E SM F SM G SM H OPT Reserved JP21 MRST Mas...

Page 197: ...tation for brushless motors ICM 1900 Interconnect module ICM 1900 Opto Optoisolated digital outputs AMP 1910 Interconnect module with 1 axis power amplifier AMP 1920 Interconnect module with 2 axes po...

Page 198: ...provides easy connections between the DMC 1600 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 aux...

Page 199: ...tepper motor amp 26 MOCMDZ O Z axis motor command to amp input w respect to ground 27 SIGNZ O Z axis sign output for input to stepper motor amp 28 PWMZ O Z axis pulse output for input to stepper motor...

Page 200: ...ut 4 Used for W axis latch input 61 IN5 I Input 5 62 IN6 I Input 6 63 IN7 I Input 7 64 IN8 I Input 8 65 ABORT I Abort Input 66 OUT1 O Output 1 67 OUT2 O Output 2 68 OUT3 O Output 3 69 OUT4 O Output 4...

Page 201: ...coder B 100 MBZ I Z Main encoder B 101 INZ I Z Main encoder Index 102 INZ I Z Main encoder Index 103 GND Signal Ground 104 VCC 5 Volts 105 MAW I W Main encoder A 106 MAW I W Main encoder A 107 MBW I W...

Page 202: ...1 amp V The AMP 19X0 requires an external DC supply The AMP 19X0 connects directly to the DMC 1600 and screw terminals are provided for connection to motors encoders and external switches Features 7...

Page 203: ...ontinuous motion The path is specified as a collection of segments For the purpose of specifying the path define a special X Y coordinate system whose origin is the starting point of the sequence Each...

Page 204: ...linear segment is L Xk Yk k 2 2 Where Xk and Yk are the changes in X and Y positions along the linear segment The length of the circular arc is L R k k k 2 360 The total travel distance is given by D...

Page 205: ...d and acceleration requirements For example the velocities along the X and Y axes for the path shown in Fig A 2 are given in Fig A 4 Fig A 4a shows the vector velocity It also indicates the position p...

Page 206: ...vos 8 MHz Faster stepper operation 3 MHz stepper rate 2 MHz Higher servo bandwidth 62 sec axis sample time 125 sec axis Expanded memory lets you store more programs 1000 lines X 80 character program m...

Page 207: ...beginner to the most advanced MOTION CONTROL MADE EASY WHO SHOULD ATTEND Those who need a basic introduction or refresher on how to successfully implement servo motion control systems TIME 4 hours 8...

Page 208: ...ting Us Galil Motion Control 270 Technology Way Rocklin California 95765 Phone 916 626 0101 Fax 916 626 0102 Internet address support galilmc com URL www galilmc com FTP galilmc com 200 Appendices DMC...

Page 209: ...ol properly packaged and with transportation and insurance prepaid We will reship at our expense only to destinations in the United States Any defect in materials or workmanship determined by Galil Mo...

Page 210: ...thmetic Functions 117 129 137 139 149 Communication 3 Arm Latch 115 Almost Full Flag 59 Array 3 74 83 98 100 117 123 129 137 141 49 150 180 FIFO 3 Compare Function 4 Automatic Subroutine 133 Compensat...

Page 211: ...90 Backlash 74 108 10 157 58 Gearing 73 74 89 91 E H Ecam 91 92 95 Halt 79 121 25 127 28 151 Electronic Cam 73 74 91 93 Abort 33 34 60 79 85 159 161 179 182 83 Echo 54 Off On Error 15 35 38 159 161 E...

Page 212: ...133 35 137 144 46 152 161 62 Internal Variable 129 139 140 Interrogation 69 70 81 88 145 147 Modelling 165 168 69 173 Interrupt 119 21 127 133 34 151 52 Motion Complete Invert 108 164 MCTIME 120 125...

Page 213: ...per Position Maintenance 104 Programming Stop Halt 79 121 25 127 28 151 Abort 33 34 60 79 85 159 161 179 182 83 Proportional Gain 168 Stop Code 54 70 133 140 143 45 143 153 54 156 58 164 Protection Er...

Page 214: ...it 17 Circular Interpolation 84 87 89 143 154 55 Trigger 117 124 126 28 167 Clear Sequence 79 81 85 87 Trippoint 75 79 81 86 87 98 125 26 132 Ellipse Scale 87 Troubleshooting 163 Feedrate 80 86 87 127...

Reviews: