background image

Command Summary - Linear Interpolation

COMMAND

DESCRIPTION

LM xyzw 
LM abcdefgh

Specify axes for linear interpolation
(same) controllers with 5 or more axes

LM?

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 < n
LI a,b,c,d,e,f,g,h < n

Specify incremental distances relative to current position, and assign vector speed n.

VS n

Specify vector speed

VA n

Specify vector acceleration

VD n

Specify vector deceleration

VR n

Specify the vector speed ratio

BGS

Begin Linear Sequence

CS

Clear sequence

LE

Linear End- Required at end of LI command sequence

LE?

Returns the length of the vector (resets after 2147483647)

AMS

Trippoint for After Sequence complete

AV n

Trippoint for After Relative Vector distance, n 

IT

S curve smoothing constant for vector moves

Operand Summary - Linear Interpolation 

OPERAND

DESCRIPTION

_AV

Return distance traveled

_CS

Segment counter - returns number of 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-42x0 sequence buffer.  
Zero means buffer full.  511 means buffer empty.

_VPm

Return the absolute coordinate of the last data point along the trajectory.  
(m=X,Y,Z or W or A,B,C,D,E,F,G or H)

To illustrate the ability to interrogate the motion status, consider the first motion segment of our example, 
#LMOVE, where the X axis moves toward the point X=5000.  Suppose that when X=3000, the controller is 
interrogated using the command ‘MG _AV’.  The returned value will be 3000.  The value of  _CS, _VPX and _VPY will
be zero.
Now suppose that the interrogation is repeated at the second segment when Y=2000.  The value of  _AV at this 
point is 7000, _CS equals 1, _VPX=5000 and _VPY=0.

Example - Linear Move

Make a coordinated linear move in the ZW plane.  Move to coordinates 40000,30000 counts at a vector speed of 
100000 counts/sec and vector acceleration of 1000000 counts/sec2.

LM ZW

Specify axes for linear interpolation

LI,,40000,30000

Specify ZW distances

LE

Specify end move

VS 100000

Specify vector speed

VA 1000000

Specify vector acceleration

VD 1000000

Specify 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 controller from: 

VS

VZ

VW

2

2

Chapter 6 Programming Motion ▫ 65

DMC-42x0 User Manual

Summary of Contents for 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: ...tor use Attention Pertains to stepper motor use 4280 Attention Pertains to controllers with more than 4 axes Please note that many examples are written for the DMC 4240 four axes controller or the DMC...

Page 3: ...ternal Amplifier Interface 33 Chapter 4 Software Tools and Communication 41 Introduction 41 Controller Response to Commands 41 Unsolicited Messages Generated by Controller 42 Serial Communication Port...

Page 4: ...51 Software Protection 152 Chapter 9 Troubleshooting 156 Overview 156 Chapter 10 Theory of Operation 159 Overview 159 Operation of Closed Loop Systems 161 System Modeling 162 System Analysis 166 Syste...

Page 5: ...applications involving jogging point to point positioning vector positioning electronic gearing multiple move sequences contouring and a PVT Mode The controller eliminates jerk by programmable accele...

Page 6: ...Y Controller Board Options starting on pg 170 4 20mA 4 20mA analog inputs TRES Encoder terminating resistors SSI SSI feedback BiSS BiSS feedback Electrical Specifications Description Specification AC...

Page 7: ...e each axis for any combination of motor types providing maximum flexibility Standard Servo Motor with 10 Volt Command Signal The DMC 42x0 achieves superior precision through use of a 16 Bit motor com...

Page 8: ...s motors Stepper Motor with Step and Direction Signals The DMC 42x0 can control stepper motors In this mode the controller provides two signals to connect to the stepper motor Step and Direction For s...

Page 9: ...enerates a 10 volt analog signal 16 bit DAC For sinusoidal commutation operation the controller uses two DACs to generate two 10 volt analog signals For stepper motor operation the controller generate...

Page 10: ...otion control system which includes amplifiers motors and encoders These elements are described below Figure 1 3 Elements of Servo systems Motor A motor converts current into torque which produces mot...

Page 11: ...nstalled on the encoder inputs See the Ordering Options in the Appendix for more information The DMC 42x0 can also interface to encoders with pulse and direction signals Refer to the CE command in the...

Page 12: ...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 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: ...er Supply for Motor Amplifiers 6 AC Power source for DMC 42x0 controller 7 Brush or Brushless Servo motors with Optical Encoders or stepper motors a Cables for connecting to the DMC 42x0 8 PC Personal...

Page 15: ...ted components Galil shall not be liable or responsible for any incidental or consequential damages All wiring procedures and suggestions mentioned in the following sections should be done with the co...

Page 16: ...es are read Switch 1 Master Reset When this switch is on the controller will perform a master reset upon PC power up Whenever the controller has a master reset all programs and motion control paramete...

Page 17: ...te display php video connecting to ethernet controller For connecting using serial see RS 232 Configuration pg 37 for proper configuration of the Main DMC 42x0 serial port See the GalilSuite manual fo...

Page 18: ...ternal connection If an encoder is used for position feedback connect the encoder to the main encoder input corresponding to that axis The commanded position of the stepper can be interrogated with TD...

Page 19: ...use a servo motor to runaway see Step 8 Setting Safety Features before Wiring Motors pg 15 regarding Runaway Motors Feedback Type Directions Standard Quadrature Differential Swap channels A and A Sing...

Page 20: ...ng to control it s movement See Step 10 Connecting External Amplifiers and Motors pg 21 for configuring the amplifier enable signal 2 The motor and encoder are in opposite polarity causing a positive...

Page 21: ...events such as limit switches toggling LIMSWI command errors POSERR and amplifier errors TA AMPERR and more For a full list of features and how to program each see Chapter 8 Hardware Software Protect...

Page 22: ...mand line output in Volts thus limiting the current in the amplifier LC Configures stepper motor current at holding or rest positions Table 2 5 Sample of motor and amplifier configuration commands Ste...

Page 23: ...d If no motion presents itself increase in small increments until you see motion If your OF is beyond what is expected to see motion record no motion using one of the tables below Table 2 7 for swappi...

Page 24: ...ommand and rotating the motor by hand in an MO state If the motor and encoder polarity are correct than TP A should report a smaller number when QH A reports 1 than when QH A reports 3 If TP A is larg...

Page 25: ...n the amplifier power supply If the amplifiers are operating properly the motor should stand still even when the amplifiers are powered up A Note Regarding Commutation This section applies to 3 phase...

Page 26: ...hould run the motor at the maximum required speed 2 Using step 0 5V PWM and direction 0 5V toggling line this is referred to as Step Dir for short Pin outs for the command signals are found under the...

Page 27: ...er parameters see Chapter 10 Theory of Operation pg 155 For additional tuning resources and step by step tuning guides see the following Application Notes Manual Tuning Methods http www galil com down...

Page 28: ...detail When a forward or reverse limit switch is activated the current application program that is running in thread zero will be interrupted and the controller will automatically jump to the LIMSWI s...

Page 29: ...initiated by the sequence of commands HM A BG A Standard Homing is a combination of Find Edge and Find Index homing Initiating the standard homing routine will cause the motor to slew until a transiti...

Page 30: ...ed during a controller reset Uncommitted Digital Inputs The DMC 42x0 has 8 optoisolated inputs These inputs can be read individually using the function IN x where x specifies the input number 1 thru 8...

Page 31: ...controllers Common Signal Common Signal Location Powers Inputs Labeled INCOM Bank 0 I O A D D Sub Connector DI 8 1 ABRT RST ELO LSCOM Bank 0 I O A D D Sub Connector FLSA RLSA HOMA FLSB RLSB HOMB FLSC...

Page 32: ...rical specifications Using the controller reference power completely bypasses optoisolation and is not recommended for most applications Banks of inputs can be used as either active high or low Connec...

Page 33: ...Chapter 3 Connecting Hardware 29 DMC 42x0 User Manual 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...

Page 34: ...hown in Figure 3 6 and Bank 1 in Figure 3 7 See the Opto Isolated Outputs for ICM 2900 ICM 1900 AMP 19520 40 section in the Appendix for details Complete pinouts can be found in the respective ICM sec...

Page 35: ...resistor 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...

Page 36: ...Output compare is not valid with sampled feedback types such as SSI BiSS Sin Cos and Analog Electrical Specifications Output Voltage 0 5 VDC Current Output 20 mA Sink Source Error Output The controll...

Page 37: ...31k Extended I O The DMC 42x0 controller offers 64 extended TTL I O points which can be configured as inputs or outputs in 8 bit increments Configuration is accomplished with command CO see Extended...

Page 38: ...Error is set and the position error exceeds the error limit set by ER A limit switch is reached see OE command in the Command Reference for more information The default configuration of the amplifier...

Page 39: ...2 on the ICM 2900 and can be accessed by removing the cover This option can be requested when ordering the unit by specifying the LAEN option Changing the Amplifier Enable Voltage Level To change the...

Page 40: ...to perform basic setup and to develop application code dmc programs that is downloaded to the controller At the Galil API level the GalilTools Communication Library is available for users who wish to...

Page 41: ...y cause characters to appear garbled to some terminals This function can be disabled by issuing the command CW2 For more information see the CW command in the Command Reference When handshaking is use...

Page 42: ...use a connector adapter which changes a dataset to a dataterm This cable is also known as a null modem cable CC Command The CC or Configure Communications command configures the auxiliary ports proper...

Page 43: ...ore sending the next packet Addressing There are three levels of addresses that define Ethernet devices The first is the MAC or hardware address This is a unique and permanent 6 byte number No other d...

Page 44: ...An Ethernet handle is a communication resource within a device The DMC 42x0 can have a maximum of 8 Ethernet handles open at any time When using TCP IP each master or slave uses an individual Ethernet...

Page 45: ...that can send TCP IP or UDP IP packets A good example of this is Telnet a utility that comes with most Windows systems Modbus An additional protocol layer is available for speaking to I O devices Mod...

Page 46: ...92 168 1 120 502 2 Issued to DMC 4240 2 Dimension an array to store the commanded values Set array element 0 equal to 170 and array element 1 equal to 85 array element 1 configures digital outputs 15...

Page 47: ...ombine for the value of analog input 4 myanalog 0 16412 0x401C myanalog 1 52429 0xCCCD myanalog 2 49347 0xC0C3 myanalog 3 13107 0x3333 Analog input 3 0x401CCCCD 2 45V Analog input 4 0xC0C33333 6 1V Ex...

Page 48: ...input block 4 inputs 33 40 45 UB Ethernet Handle D Status 11 UB general input block 5 inputs 41 48 46 UB Ethernet Handle E Status 12 UB general input block 6 inputs 49 56 47 UB Ethernet Handle F Stat...

Page 49: ...defined variable ZF 154 155 UW C axis status see bit field map below 298 299 UW G axis status see bit field map below 156 UB C axis switches see bit field map below 300 UB G axis switches see bit fie...

Page 50: ...ng Thread 2 Running Thread 1 Running Thread 0 Running Coordinated Motion Status for S or T Plane 2 Byte BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 Move in Progress N A N A N A N A N A N A N...

Page 51: ...Axis A D Over Voltage Axis A D Over Current Axis A D Notes Regarding Velocity and Torque Information The velocity information that is returned in the data record is 64 times larger than the value ret...

Page 52: ...and No Scope Watch or Viewer support Contact Galil for other OS options The GalilSuitecontains the following tools Tool Description Launcher Launcher Tool with the ability to create custom profiles to...

Page 53: ...erface which extends compatibility to Windows programming languages e g VB C etc A Galil object usually referred to in sample code as g represents a single connection to a Galil controller For Etherne...

Page 54: ...compatibility on Windows a COM Component Object Model class built on top of the C library is also provided with Windows releases This COM wrapper can be used in any language and IDE supporting COM Vis...

Page 55: ...set and syntax A summary of commands as well as a complete listing of all DMC 42x0 instructions is included in the Command Reference Command Syntax ASCII DMC 42x0 instructions are represented by two A...

Page 56: ...appropriate letter A B C or D If no parameters follow the instruction action will take place on all axes Here are some examples of syntax for requesting action BG A Begin A only BG B Begin B only BG A...

Page 57: ...ion Format PF Variable Format VF and Leading Zeros LZ command See Chapter 7 Application Programming and the Command Reference Summary of Interrogation Commands RP Report Command Position RL Report Lat...

Page 58: ...operands begin with the underscore character _ For example the value of the current position on the A axis can be assigned to the variable V with the command V _TPA The Command Reference denotes all c...

Page 59: ...control where no final endpoint is prescribed Motion stops on Stop command Independent Jogging JG AC DC ST Absolute positioning mode where absolute position targets may be sent to the controller whil...

Page 60: ...n command may be specified The Begin BG command can be issued for all axes either simultaneously or independently XYZ or W axis specifiers are required to select the axes for motion When no axes are s...

Page 61: ...red Motion Profiles X Axis 500 counts Position 20000 count sec Speed 500000 counts sec2 Acceleration Y Axis 1000 counts Position 10000 count sec Speed 500000 counts sec2 Acceleration Z Axis 100 counts...

Page 62: ...ntroller will make a accelerated or decelerated change to the new speed An instant change to the motor position can be made with the use of the IP command Upon receiving this command the controller co...

Page 63: ...this mode is trapezoidal There is not a set limit governing the rate at which the end point may be changed however at the standard TM rate the controller updates the position information at the rate o...

Page 64: ...required in this mode the SP AC and DC commands determine the shape of the trapezoidal velocity profile that the controller will use Example Motion 1 The host program determines that the first target...

Page 65: ...n to position 2000 EN Example Motion 3 In this motion the host program commands the controller to begin motion towards position 5000 changes the target to 2000 and then changes it again to 8000 Figure...

Page 66: ...at holds up program execution until an absolute position has been reached DC n n n n n n n n Deceleration settings for the specified axes MF n n n n n n n n Trippoint to hold up program execution unti...

Page 67: ...y the end of a linear move sequence This command tells the controller to decelerate to a stop following the last LI command If an LE command is not given an Abort AB1 must be used to abort the motion...

Page 68: ...gment Note that the function m may start the deceleration within the given segment or during previous segments as needed to meet the final speed requirement under the given values of VA and VD Note ho...

Page 69: ...ents in DMC 42x0 sequence buffer Zero means buffer full 511 means buffer empty _VPm Return the absolute coordinate of the last data point along the trajectory m X Y Z or W or A B C D E F G or H To ill...

Page 70: ...unter LOOP2 JP LOOP2 _LM 0 If sequence buffer full wait JS C COUNT 500 Begin motion on 500th segment LI VX COUNT VY COUNT Specify linear segment COUNT COUNT 1 Increment array counter JP LOOP2 COUNT 75...

Page 71: ...nated motion sequences The command VP x y specifies the coordinates of the end points of the vector movement with respect to the starting point Non sequential axis do not require comma delimitation Th...

Page 72: ...ure for feed rate override VR does not ratio the accelerations For example VR 0 5 results in the specification VS 2000 to be divided by two Compensating for Differences in Encoder Resolution By defaul...

Page 73: ...for the planar motion where m and n represent the planar axes and p is the tangent axis VP m n Return coordinate of last point where m X Y Z or W CR r n m Specifies arc segment where r is the radius...

Page 74: ...points C and D The value of _AV is 4000 1500 2000 10 712 The value of _CS is 2 _VPX _VPY contain the coordinates of the point C Figure 6 7 The Required Path Vector Mode Mathematical Analysis The term...

Page 75: ...line describes the linear segment between points C and D Note that the total length of the motion consists of the segments A B Linear 10000 units B C Circular R 2 360 15708 C D Linear 10000 Total 357...

Page 76: ...e Ta is given by T VS VA s a 100000 2000000 0 05 The slew time Ts is given by The total motion time Tt is given by Chapter 6 Programming Motion 72 DMC 42x0 User Manual T VS T s s 35708 0 0 307 D a 100...

Page 77: ...127 9999 with a fractional resolution of 0001 There are two modes standard gearing and gantry mode The gantry mode enabled with the command GM allows the gearing to stay enabled even if a limit is hi...

Page 78: ...will be engaged For example the same master X axis in this case travels at 500 000 counts sec and the gear ratio is 1 1 but the gearing is slowly engaged over 30 000 counts of the master axis greatly...

Page 79: ...n operand If exact position synchronization is required the IP command is used to adjust for the difference Command Summary Electronic Gearing COMMAND DESCRIPTION GA n Specifies master axes for gearin...

Page 80: ...o for Y as 1 1 GM 1 Set gantry mode PR 3000 Command X motion BG X Start motion on X axis You may also perform profiled position corrections in the electronic gearing mode Suppose for example that you...

Page 81: ...ver one cycle The cycle of the master is limited to 8 388 607 whereas the slave change per cycle is limited to 2 147 483 647 If the change is a negative number the absolute value is specified For the...

Page 82: ...f one cycle the cam engages immediately When the cam is engaged the slave position is redefined modulo one cycle Step 7 Disengage the slave motion To disengage the cam use the command EQ x y z w where...

Page 83: ...TRUCTION INTERPRETATION SETUP Label EAX Select X as master EM 2000 1000 Cam cycles EP 20 0 Master position increments N 0 Index LOOP Loop to construct table from equation P N 3 6 Note 3 6 0 18 20 S SI...

Page 84: ...t ET 0 0 0 When 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...

Page 85: ...Chapter 6 Programming Motion 81 DMC 42x0 User Manual Figure 6 14 ECAM cycle with Z axis as master...

Page 86: ...segments Exiting PVT Mode To exit PVT mode the user must send the segment command PVn 0 0 0 This will exit the mode once the segment is reached in the buffer To avoid an abrupt stop the user should sl...

Page 87: ...r wants to start from zero velocity accelerate to a maximum velocity of 1000 counts second in 1 second and then back down to 0 counts second within an additional second The velocity profile would be d...

Page 88: ...ications require moving two or more axes in a coordinated move yet still require smooth motion at the same time These applications are ideal candidates for PVT mode Figure 6 17 Required X Y points for...

Page 89: ...y The BT command could have been issued at the end of all the PVT points in this example The resultant X vs Y position graph is shown in Figure 6 18 with the specified PVT points enlarged Contour Mode...

Page 90: ...ints include the 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 CD 48 2 Specifies first position incre...

Page 91: ...or as a collection of points The design includes two parts Generating an array with data points and running the program Generating an Array An Example Consider the velocity and position profiles shown...

Page 92: ...POS C Compute the difference and store C C 1 JP C C 15 RUN Program to run motor CMX Contour Mode DT3 8 millisecond intervals C 0 E CD DIF C Contour Distance is in DIF C C 1 JP E C 15 CD 0 0 End conto...

Page 93: ...ed as the M and N axes These axes have no encoder and no DAC However they can be commanded by the commands AC DC JG SP PR PA BG IT GA VM VP CR ST DP RP The main use of the virtual axes is to serve as...

Page 94: ...when operating in full step or half step operation KS will cause the step pulses to be delayed in accordance with the time constant specified When operating with stepper motors you will always have s...

Page 95: ...ler Stepper Smoothing Filter Adds a Delay Output Buffer Step Count Register TD Reference Position RP Output To Stepper Driver Motion Complete Trippoint When used in stepper mode the MC command will ho...

Page 96: ...step drives SPM mode is configured executed and managed with seven commands This mode also utilizes the POSERR automatic subroutine allowing for automatic user defined handling of an error event Inte...

Page 97: ...step motor and 4000 count rev encoder Note the necessary difference is with the YA command Full Stepping Drive X axis SETUP OE1 Set the profiler to stop axis upon error KS16 Set step smoothing MT 2 Mo...

Page 98: ...otion SP 512 Set the speed PR 1000 Prepare mode of motion BG A Begin motion EN End of program subroutine REM When error occurs the axis will stop due to OE1 In REM POSERR query the status YS and the e...

Page 99: ...ze JP END ABS _QSX 10 End correction if error is within defined tolerance YRX _QSX Correction move MCX WT100 Stabilize JP LOOP Keep correcting until error is within tolerance END End CORRECT subroutin...

Page 100: ...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 compensate for the backlash position encoders are mounted...

Page 101: ...of the linear encoder and performs position corrections This is done by the following program INSTRUCTION INTERPRETATION DUALOOP Label CE 0 Configure encoder DE0 Set initial value PR 40000 Main move...

Page 102: ...othing BG X Begin Figure 6 21 Trapezoidal velocity and smooth velocity profiles Using the KS Command Step Motor Smoothing When operating with step motors motion smoothing can be accomplished with the...

Page 103: ...put With CN 1 the default value a normally open switch will make _HMX read 1 initially and a normally closed switch will make _HMX read zero Furthermore with CN 1 a normally open switch will make _HMX...

Page 104: ...tch is normally closed and CN 1 Figure 6 22 Homing Sequence for Normally Closed Switch and CN 1 Example Find Edge EDGE Label AC 2000000 Acceleration rate DC 2000000 Deceleration rate SP 8000 Speed FE...

Page 105: ...Table 6 13 or on the index pulse for that axis The position can be captured for either the main or auxiliary encoder within 25 microseconds of an high to low transition Input 1 A axis latch Input 9 E...

Page 106: ...l aspects of creating applications programs The program memory size is 80 characters x 4000 lines Program Format A DMC 42x0 program consists of DMC instructions combined to solve a machine control app...

Page 107: ...ere is an EEPROM error out of reset CMDERR Label for incorrect command subroutine COMINT Label for Communications Interrupt See CC Command ININT Label for Input Interrupt subroutine See II Command LIM...

Page 108: ...t interrupts are implemented for limit switches position errors or command errors the subroutines are executed as thread 0 To begin execution of the various programs use the following instruction XQ A...

Page 109: ...ot delay program execution Error Code Command When there is a program error the DMC 42x0 halts the program execution at the point where the error occurs To display the last line number of program exec...

Page 110: ...e 3 TC1 Tell Error Code 7 Command not valid while running Command not valid while running Change the BGX line to BGX AMX and re download the program XQ A Execute A Program Flow Commands The DMC 42x0 p...

Page 111: ...gram execution until after the motion profile has been completed and the encoder has entered or passed the specified position TW x y z w sets timeout to declare an error if not in position If timeout...

Page 112: ...s motion Note The AI command actually halts execution of the program until the input occurs If you do not want to halt the program sequences you can use the Input Interrupt function II or use a condit...

Page 113: ...or AT n The second field of both AT and WT can be used to have the program execution be held up for n number of samples rather than milliseconds For example WT 400 or WT 400 0 will hold up program ex...

Page 114: ...TION less than greater than equal to less than or equal to greater than or equal to not equal Conditional Statements The conditional statement is satisfied if it evaluates to any value other than zero...

Page 115: ...Begin loop PA 1000 Position absolute 1000 BGX Begin move AMX Wait for motion complete WT 100 Wait 100 msec PA 0 Position absolute 0 BGX Begin move AMX Wait for motion complete WT 100 Wait 100 msec cou...

Page 116: ...OOP Endless loop EN End of main program ININT Input Interrupt Subroutine IF IN 1 0 IF conditional statement based on input 1 IF IN 2 0 2nd IF conditional statement executed if 1st IF conditional true...

Page 117: ...MC 42x0 has a special label for automatic program execution A program which has been saved into the controller s non volatile memory can be automatically executed upon power up or reset by beginning t...

Page 118: ...RED Print Message RE Return to main program Download Program XQ LOOP Execute Dummy Program JG 5000 Jog BGX Begin Motion Now when a forward limit switch occurs on the X axis the LIMSWI subroutine will...

Page 119: ...N End program The above program prompts the operator to enter a jog speed If the operator enters a number out of range greater than 8 million the CMDERR routine will be executed prompting the operator...

Page 120: ...speed of A axis motion LOOP Label for Loop PAA 10000 Move to absolute position 10000 BGA Begin Motion on A axis AMA Wait for motion to be complete PAA 0 Move to absolute position 0 BGA Begin Motion o...

Page 121: ...TA0 mask _TA2 _TA3 JP AMPERR er0 REM Notify user amperr has cleared LU0 MG AMPERR L1 RESOLVED L2 WT3000 LU1 RE JS Subroutine Stack Variables a b c d e f g h There are 8 variables that may be passed on...

Page 122: ...am from program2 dmc 36 0000 36 0000 Example Working with Arrays Array DM speeds 8 DM other 256 JS zeroAry speeds 0 zero out all buckets in speeds JS zeroAry other 0 zero out all buckers in other EN z...

Page 123: ...Info NO axis a List info for axes h a b a 41 1000000 convert to Galil String MG b S1 Axis N MG F8 0 Position _TP h Error _TE h Torque _TT h F1 4 IF a 7 recursion exit condition EN 1 ENDIF JS AxsInfo a...

Page 124: ...rence loop NO this comment takes time to process this comment takes time to process i i 1 this comment takes time to process JP loop i 1000 MG TIME t display number of samples from initial time refere...

Page 125: ...ould be to run this code in a separate thread ex XQ plcscan 2 REM this code will set output 3 high if REM inputs 1 and 2 are high and input 3 is low REM else output 3 will be low REM if input 4 is low...

Page 126: ...rs first since they carry no error and then adding the decimal back in by dividing by a factor of 10 will allow the user to avoid any errors caused by the limitations of precision of the controller Co...

Page 127: ...G len3 S4 M Response from command MG len2 S4 E Response from command MG len1 S4 Functions FUNCTION DESCRIPTION SIN n Sine of n n in degrees with range of 32768 to 32767 and 16 bit fractional resolutio...

Page 128: ...e 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 Cannot have spaces in the...

Page 129: ...ost DMC commands have an equivalent operand which are designated by adding an underscore _ prior to the DMC 42x0 command The command reference indicates which commands have an associated operand Statu...

Page 130: ...ay element has a numeric range of 4 bytes of integer 231 followed by two bytes of fraction 2 147 483 647 9999 Arrays can be used to capture real time data such as position torque and analog input valu...

Page 131: ...The above example can also be executed with the automatic data capture feature described below Uploading and Downloading Arrays to On Board Memory The GalilTools software is recommended for downloadi...

Page 132: ...Analog input n X Y Z W E F G H for AN inputs 1 8 _DEX 2nd encoder position dual encoder _NOX Status bits _OP Output _RLX Latched position _RPX Commanded position _SCX Stop code _TEX Position error _TI...

Page 133: ...through the auxiliary RS 232 port In this mode the DMC 42x0 provides a buffer for receiving characters This mode may only be used when executing an applications program The Operator Data Entry Mode ma...

Page 134: ...subroutine a program must be running in thread 0 at all times for it to be enabled Example A DMC 42x0 is used to jog the A and B axis This program automatically begins upon power up and allows the use...

Page 135: ...ric and String Numerical and string data can be output from the controller using several methods The message command MG can output string and numerical data Also the controller can be commanded to ret...

Page 136: ...0 BGA ASA MG The Speed is _TVA F5 0 N MG counts sec EN When A is executed the above example will appear on the screen as The Speed is 50000 counts sec Using the MG Command to Configure Terminals The M...

Page 137: ...umeric values may be formatted in decimal or hexadecimal with a specified number of digits to the right and left of the decimal point using the PF command Position Format is specified by PF m n where...

Page 138: ...Response from Interrogation Command Formatting Variables and Array Elements The Variable Format VF command is used to format variables and array elements The VF command is specified by VF m n where m...

Page 139: ...to counts by multiplying it by the number of counts revolution Instruction Interpretation RUN Label MG ENTER OF REVOLUTIONS n1 1 Prompt for revs rev JP rev n1 1 Wait until user enters new value for n1...

Page 140: ...t port to zero OP 255 Sets all bits of output port to one 20 21 22 23 24 25 26 27 The output port is useful for setting relays or controlling external switches and events during a motion sequence Exam...

Page 141: ...this input for 2 TTL signals the first signal will be connected to AA and the second to AB AA and AB will be left unconnected To access this input use the function IN 81 and IN 82 NOTE The auxiliary...

Page 142: ...ese inputs in volts may be read using the AN n function where n is the analog input 1 through 8 The resolution of the Analog to Digital conversion is 12 bits 16 bit ADC is available as an option Analo...

Page 143: ...64 AT0 set initial time reference loop REM calculate filtered output and then way 2 samples from last REM time reference last AT 2 1 or AT0 an1 k1 AN 1 k2 an1 AT 2 1 JP loop Extended I O of the DMC 42...

Page 144: ...P may also be used to set output bits specified as blocks of data The OP command accepts 3 parameters The first parameter sets the values of the main output port of the controller Outputs 1 8 block 0...

Page 145: ...r example equals 3185 count sec The input signal may be applied to I1 for example and the output signal is chosen as output 1 The motor velocity profile and the related input and output signals are sh...

Page 146: ...sec 5 in sec 200 000 count sec an acceleration rate of 0 1g equals 0 1g 38 6 in s2 1 544 000 count s2 Note that the circular path has a radius of 2 or 80000 counts and the motion starts at the angle o...

Page 147: ...ut voltage Assume that a full voltage of 10 Volts must produce a motor speed of 3000 rpm with an encoder resolution of 1000 lines or 4000 count rev This speed equals 3000 rpm 50 rev sec 200000 count s...

Page 148: ...ity An alternative approach is the dual loop where we use two sensors rotary and linear The rotary sensor assures stability because the position loop is closed before the backlash whereas the linear s...

Page 149: ...DMC 42x0 may also be created and edited locally using the DMC 42x0 The DMC 42x0 provides a line Editor for entering and modifying programs The Edit mode is entered with the ED instruction Note The ED...

Page 150: ...tly being edited For example if the editor is at line number 2 and cntrl D is applied line 2 will be deleted The previous line number 3 is now renumbered as line number 2 cntrl Q The cntrl Q quits the...

Page 151: ...tion Lines Amp Enable This signal goes low when the motor off command is given when the position error exceeds the value specified by the Error Limit ER command or when off on error condition is enabl...

Page 152: ...oving in the forward direction the controller will automatically jump to the limit switch subroutine LIMSWI if such a routine has been written by the user The CN command can be used to change the pola...

Page 153: ...etting Example The A axis is setup with the following settings for encoder failure detection OA 1 OT 500 OV 3 OE 1 ER 1000 The A axis is commanded to move 300 counts but the B channel on the encoder h...

Page 154: ...POSERR label causes the statements following to be automatically executed if error on any axis exceeds the error limit specified by ER a encoder failure is detected or the abort input is triggered The...

Page 155: ...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 End LR LR MG REVERSE LIMIT Send mes...

Page 156: ...e a different Amplifier Enable setting on the Interconnect Module Refer to Chapter 3 or contact Galil Unable to read main or auxiliary encoder input The encoder does not work when swapped with another...

Page 157: ...ot receiving enough voltage to power up Under Current If the power supply does not have enough current the red LED will cycle on and off along with the green power LED Position Error If any axis that...

Page 158: ...d the jumper location labeled MR or MRST on the controller and put a jumper across the two pins Power up with the jumper installed The Self Test will take slightly longer up to 5seconds After the erro...

Page 159: ...involves the subjects of modeling analysis and design These subjects will be covered in the following discussions The motion profiling is the generation of the desired position function This function...

Page 160: ...motors must be at any instant of time Finally it remains up to the servo system to verify that the motor follows the profiled position by closing the servo loop The following section explains the oper...

Page 161: ...m oscillates we say that the system is unstable Clearly unstable responses are bad when we want a constant level What causes the oscillations The basic cause for the instability is a combination of de...

Page 162: ...modeling in the three modes is as follows Voltage Drive The amplifier is a voltage source with a gain of Kv V V The transfer function relating the input voltage V to the motor position P is P V K K S...

Page 163: ...d V If the motor is a DC brushless motor it is driven by an amplifier that performs the commutation The combined transfer function of motor amplifier combination is the same as that of a similar brush...

Page 164: ...4N 2 count rad For example a 1000 lines rev encoder is modeled as Kf 638 DAC The DAC or D to A converter converts a 16 bit number to an analog voltage The input range of the numbers is 65536 and the...

Page 165: ...ivalent continuous filter G s is G s 16 0 144s 2000 s 250 s 250 The notch filter has two complex zeros z and and two complex poles p and The effect of the notch filter is to cancel the resonance affec...

Page 166: ...ing example Consider a position control system with the DMC 42x0 controller and the following parameters Kt 0 1 Nm A Torque constant J 2 10 4 kg m2 System moment of inertia R 2 Motor resistance Ka 4 A...

Page 167: ...the crossover frequency was computed numerically resulting in 200 rad s Next we determine the phase of A s at the crossover frequency A j200 390 000 j200 51 j200 2 j200 2000 Arg A j200 tan 1 200 51 1...

Page 168: ...Encoder line density The DAC of the DMC 42x0 outputs 10V for a 16 bit command of 32768 counts The design objective is to select the filter parameters in order to close a position loop with a crossove...

Page 169: ...equency c 500 the function would have a magnitude of 160 and a phase lead of 59 degrees These requirements may be expressed as G j500 P j500D 160 and arg G j500 tan 1 500D P 59 The solution of these e...

Page 170: ...he 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 PLK KP KD A KD KP KD C KI B PL Digital D z KP KD 1 z 1 KI 2 1 z 1 1 PL Z PL Cont...

Page 171: ...idth 45 nsec Stepper Control STPn Step TTL 0 5 volts level at 50 duty cycle 6 000 000 pulses sec maximum frequency DIRn Direction TTL 0 5 volts Input Output Opto isolated Inputs DI 16 1 Limit switches...

Page 172: ...ns can be used as uncommitted inputs and are assigned to the following bits Axis A DI81 DI82 Axis B DI83 DI84 Axis C DI85 DI86 Axis D DI87 DI88 Axis E DI89 DI90 Axis F DI91 DI92 Axis G DI93 DI94 Axis...

Page 173: ...0 005 Short Term System dependent Position Range 2147483647 counts per move Velocity Range Up to 22 000 000 counts sec servo 6 000 000 pulses sec stepper Velocity Resolution 2 counts sec Motor Comman...

Page 174: ...ts The 16 bit option provides 16 bit analog inputs on the DMC 42x0 motion controller The standard resolution of the analog inputs is 12 bits Part number ordering example DMC 4210 16bit C012 I000 4 20m...

Page 175: ...d 7 on RS 422 Auxiliary Port ACTS Connects a 120 Termination resistor between the differential Clear To Send inputs on the Aux Serial port Pins 1 and 6 on RS 422 Auxiliary Port JP2 C012 default JP2 C0...

Page 176: ...12 D2 50 J6 10 D3 56 J6 16 D3 54 J6 14 D4 4 J8 4 D4 2 J8 2 D5 8 J8 8 D5 6 J8 6 D6 12 J8 12 D6 10 J8 10 D7 16 J8 16 D7 14 J8 14 C0 71 J6 31 C0 69 J6 29 C1 67 J6 29 C1 65 J6 25 C2 63 J6 23 C2 61 J6 21 C...

Page 177: ...he 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 If a combination of...

Page 178: ...isolation for digital outputs OPTOHC Option for ICM 1900 Provides High Current Opto isolation for digital outputs AMP 19x0 Interconnect module with 1 4 brushless brush PWM motor amplifiers where x spe...

Page 179: ...r 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 To determine if an additional resistor R is required follo...

Page 180: ...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 Pin Functi...

Page 181: ...n Serial Port Cable 9 pin 9 Pin FEMALE Computer 9 Pin FEMALE Controller 2 RXD 2 TXD 3 TXD 3 RXD 5 GND 5 GND 7 RTS 7 CTS 8 CTS 8 RTS Cable to Connect Computer 25 pin to Auxiliary Serial Port Cable 9 pi...

Page 182: ...cted to an isolated power supply This power supply should be used only to power the outputs in order to obtain isolation from the controller The signal OUT x is one of the isolated digital outputs whe...

Page 183: ...toggle relays and trigger external events The output lines are toggled by Set Bit SB and Clear Bit CB instructions The OP instruction is used to define the state of all the bits of the Output port Inp...

Page 184: ...s latch Y Input 3 is latch Z and Input 4 is latch W if the high speed position latch function is enabled Latch High speed position latch to capture axis position on occurrence of latch signal AL comma...

Page 185: ...t 4 33 B Y 83 Output 5 34 B Y 84 Output 6 35 I Y 85 Output 7 36 I Y 86 Output 8 37 A Z 87 5V 38 A Z 88 GND 39 B Z 89 GND 40 B Z 90 GND 41 I Z 91 Analog In 1 42 I Z 92 Analog In 2 43 A W 93 Analog In 3...

Page 186: ...Input Common 20 PWM E Step E 70 Latch E Digital Input 9 21 Amp Enable H 71 Latch F Digital Input 10 22 Amp Enable G 72 Latch G Digital Input 11 23 Amp Enable F 73 Latch H Digital Input 12 24 Amp Enabl...

Page 187: ...5 ABX 23 ABE 6 ABX 24 ABE 7 AAY 25 AAF 8 AAY 26 AAF 9 ABY 27 ABF 10 ABY 28 ABF 11 AAZ 29 AAG 12 AAZ 30 AAG 13 ABZ 31 ABG 14 ABZ 32 ABG 15 AAW 33 AAH 16 AAW 34 AAH 17 ABW 35 ABH 18 ABW 36 ABH DMC 42x0...

Page 188: ...I O 7 62 5 22 GND GND 23 I O 7 61 4 24 GND GND 25 I O 7 60 3 26 GND GND 27 I O 7 59 2 28 GND GND 29 I O 7 58 1 30 GND GND 31 I O 7 57 0 32 I O 6 56 7 33 I O 6 55 6 34 I O 6 54 5 35 I O 6 53 4 36 I O 6...

Page 189: ...3 30 5 62 GND GND 63 I O 3 29 4 64 GND GND 65 I O 3 28 3 66 GND GND 67 I O 3 27 2 68 GND GND 69 I O 3 26 1 70 GND GND 71 I O 3 25 0 72 I O 2 24 7 73 I O 2 23 6 74 I O 2 22 5 75 I O 2 21 4 76 I O 2 20...

Page 190: ...thernet port there are two LEDs that indicate the status of the port s Ethernet connection Green Link LED LNK The green LED indicates there is a valid Ethernet connection This LED will show that the p...

Page 191: ...orage 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 Pinout Block 4 PIN Label I O Description 1 M...

Page 192: ...al Output 1 8 OUT2 O General Output 2 8 OUT3 O General Output 3 8 OUT4 O General Output 4 9 5V O 5 volts 9 HOMEZ I Z axis home input 9 RLSZ I Z axis reverse limit switch input 9 FLSZ I Z axis forward...

Page 193: ...I Analog Input 3 18 ANALOG4 I Analog Input 4 19 5V O 5 volts 19 INX I X Main encoder Index 19 INX I X Main encoder Index 19 GND O Signal Ground 20 MAX I X Main encoder A 20 MAX I X Main encoder A 20 M...

Page 194: ...der Index 25 INW I W Main encoder Index 25 GND O Signal Ground 26 MAW I W Main encoder A 26 MAW I W Main encoder A 26 MBW I W Main encoder B 26 MBW I W Main encoder B ICM 2900 Drawing Appendices 190 D...

Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...

Page 196: ...36 pin high density cable CABLE 36 from the controller and provides terminal blocks for easy access Each terminal is labeled for quick connection One ICM 1908 provides access to all of the auxiliary e...

Page 197: ...parate DMC 42x0 cables into individual screw type terminals Clearly identifies all terminals Provides jumper for connecting limit and input supplies to 5 V supply from PC Available with on board servo...

Page 198: ...MOCMDX O X axis motor command to amp input w respect to ground 33 SIGNX O X axis sign output for input to stepper motor amp 34 PWMX O X axis pulse output for input to stepper motor amp 35 ISO OUT GND...

Page 199: ...Analog Input 1 76 AN2 I Analog Input 2 77 AN3 I Analog Input 3 78 AN4 I Analog Input 4 79 AN5 I Analog Input 5 80 AN6 I Analog Input 6 81 AN7 I Analog Input 7 82 AN8 I Analog Input 8 83 MAX I X Main e...

Page 200: ...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 Main encoder B 108 MBW I W Main encoder B 109 INW I W Main encoder Index 110 INW I W Main encoder I...

Page 201: ...ower Each AMP 195x0 includes a breakout for all controller I O including encoders Hall effect switches digital inputs digital outputs and analog inputs The AMP 19520 19540Brushless drive module can be...

Page 202: ...provide a versatile method of accessing the controller signals without the use of a Galil Interconnect Module Connectors JC8 50 PIN IDC J9 100 PIN HIGH DENSITY CONNECTOR 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8...

Page 203: ...6 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 JC6 50 PIN IDC J9 100 PIN HIGH DENSITY CONNECTOR 1 51 2 52 3 53 4 54 5 55 6 56 7 57 8 58 9 59 10 60 11 61 12 62 13...

Page 204: ...69 20 70 21 71 22 72 23 73 24 74 25 75 26 76 27 77 28 78 29 79 30 80 31 81 32 82 33 83 34 84 35 85 36 86 37 87 38 88 39 89 40 90 41 91 42 92 43 93 44 94 45 95 46 96 47 97 48 98 49 99 50 100 Appendice...

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: ...C6 50 Pin Male IDC J9 80 Pin High Density Connector AMP PART 3 178238 0 JC8 Pin J9 Pin JC8 Pin J9 Pin 1 1 26 GND 2 2 27 27 3 3 28 GND 4 4 29 29 5 5 30 GND 6 6 31 31 7 7 32 GND 8 8 33 32 9 9 34 GND 10...

Page 213: ...6 46 31 71 7 47 32 GND 8 48 33 72 9 49 34 GND 10 50 35 73 11 51 36 GND 12 52 37 74 13 53 38 GND 14 54 39 75 15 55 40 GND 16 56 41 76 17 57 42 GND 18 GND 43 77 19 59 44 GND 20 GND 45 78 21 61 46 GND 2...

Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...

Page 215: ...Appendices 211 DMC 42x0 User Manual...

Page 216: ...WHO SHOULD ATTEND Those who need a basic introduction or refresher on how to successfully implement servo motion control systems TIME 4 hours 8 30 am 12 30 pm ADVANCED MOTION CONTROL WHO SHOULD ATTEND...

Page 217: ...tacting 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 370Hhttp www galilmc com Appendices 213 DMC 42x0 User Man...

Page 218: ...aid We will reship at our expense only to destinations in the United States and for products within warranty Call Galil to receive a Return Materials Authorization RMA number prior to returning produc...

Reviews: