background image

DMC-18x2 

Chapter 4 - Software Tools and Communications • 55 

for every character read and should be read until it signifies empty.  Reading data from the READ 
register when the register is empty will result in reading an FF hex. 

Write Procedure 

To send data to the DMC-18x2, read the control register at address N+1 and check bit 6.  If bit 6 is 
zero, the DMC-18x2 FIFO buffer is not almost full and up to 16 characters may be written to the 
WRITE register at address N.  If bit 6 is one, the buffer is almost full and no additional data should be 
sent.  The size of the buffer may be changed (see "Changing Full Flags" below). 

Any high-level computer language such as C, Basic, Pascal or Assembly may be used to communicate 
with the DMC-18x2 as long as the READ/WRITE procedure is followed as described above.  Example 
software drivers are contained on the COM-DISK from Galil. 

Advanced Communication Techniques 

Changing Full Flags 

The Full flag (Bit 6 of the control register) can be configured to change states at a different level from 
the default level of 16 characters. 

The level, m, can be changed from 16 up to 256 in multiples of 16 as follows: 

1. Write a 5 to the control register at address N+1. 

2. Write the number m-16 to the control register where m is the desired Almost Full level 

between 16 and 256. 

For example, to extend the Almost Full level to 256 bytes, write a 5 to address N+1.  Then write a 240 
to address N+1. 

Clearing FIFO Buffer 

The FIFO buffer may be cleared by writing the following sequence: 

Read N+1 address 

Send 01H to N+1 address 

Send 80H to N+1 address 

Send 01H to N+1 address 

Send 80H to N+1 address 

Read N+1 address 

(Bit 7 will be 1) 

It is a good idea to clear any control data before attempting this procedure.  Send a no-op instruction, 
by reading N+1 address, before you start.  All data, including data from the DMC-18x2, will then be 
cleared. 

Clearing the FIFO is useful for emergency resets or Abort.  For example, to Reset the controller, clear 
the FIFO, then send the RS command. 

 

 

Data Record 

DATA TYPE 

ITEM 

BLOCK 

UB 1

st

 byte of header 

Header 

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Summary of Contents for DMC-18 2 Series

Page 1: ...service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE IN...

Page 2: ...Galil Motion Control Inc 270 Technology Way Rocklin California 95765 Phone 916 626 0101 Fax 916 626 0102 Internet Address support galilmc com URL www galilmc com Rev 3 08 Artisan Technology Group Qua...

Page 3: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 4: ...sume that the instructions apply to all types of systems The icon legend is shown below Attention Pertains to servo motor use Attention Pertains to stepper motor use Please note that many examples are...

Page 5: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 6: ...s on the DMC 18x2 10 Step 3 Install the Communications Software 10 Step 4 Install the DMC 18x2 in the PC 10 Step 5 Establish Communication using Galil Software 11 Step 6 Determine the Axes to be Used...

Page 7: ...al Basic 47 DOS LINUX AND QNX TOOLS 48 COMMAND FORMAT AND CONTROLLER RESPONSE 49 CONTROLLER EVENT INTERRUPTS AND USER INTERRUPTS 51 HARDWARE LEVEL COMMUNICATIONS FOR PCI 53 Communication Registers 54...

Page 8: ...otor Operation 94 Using an Encoder with Stepper Motors 95 Command Summary Stepper Motor Operation 96 Operand Summary Stepper Motor Operation 96 STEPPER POSITION MAINTENANCE MODE SPM 96 Error Limit 97...

Page 9: ...verting to User Units 140 PROGRAMMABLE HARDWARE I O 141 Digital Outputs 141 Digital Inputs 142 Input Interrupt Function 143 EXAMPLE APPLICATIONS 143 Wire Cutter 143 X Y Table Controller 144 CHAPTER 8...

Page 10: ...ICM 2900 OPTO OPTION 181 Standard Opto Isolation and High Current Opto isolation 181 64 EXTENDED I O OF THE DMC 18X2 CONTROLLER 181 Configuring the I O of the DMC 18x2 with DB 14064 182 Connector Desc...

Page 11: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 12: ...tes jerk with programmable acceleration deceleration and profile smoothing For seamless following of complex contours the DMC 18x2 provides continuous vector feed of an infinite number of linear and a...

Page 13: ...least 6 milliseconds For faster motors please contact the factory The controller provides a one time automatic set up procedure The parameters determined by this procedure can then be saved in non vol...

Page 14: ...ins the DMC 18x2 firmware Motor Interface Galil s GL 1800 custom sub micron gate array performs quadrature decoding of each encoder at up to 12 MHz For standard servo operation the controller generate...

Page 15: ...er gain should be set such that a 10 Volt command generates the maximum required current For example if the peak motor current is 10A the amplifier gain should be 1 A V For velocity mode amplifiers a...

Page 16: ...troller and command set Please contact Galil to talk to one of our applications engineers about your particular system requirements Watch Dog Timer The DMC 18x2 provides an internal watch dog timer wh...

Page 17: ...6 Chapter 1 Overview DMC 18x2 THIS PAGE LEFT BLANK INTENTIONALLY Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 18: ...2B RAM 3 Motorola 68331 microprocessor 4 GL 1800 custom gate array 5 Error LED J2 100 pin high density connector part number Amp 2 178238 9 JP2 Jumpers used for configuring stepper motor operation JP...

Page 19: ...e peak motor current is 10A the amplifier gain should be 1 A V For velocity mode amplifiers a command signal of 10 Volts should run the motor at the maximum required speed Set the velocity gain so tha...

Page 20: ...ndard servo axes and one axis of sinusoidal commutation the controller will require a total of four DAC s and the controller must be a DMC 1842 Sinusoidal commutation is configured with the command BA...

Page 21: ...agram of the DMC 18x2 The individual jumpers are labeled SMX SMY SMZ and SMW and configure the controller for Stepper Motors for the corresponding X Y Z and W axes when installed The jumper labeled OP...

Page 22: ...will pause for 3 15 seconds The top of the screen will display the message Status not connected with Galil motion controller and the following error will appear STOP Unable to establish communication...

Page 23: ...nect provides screw terminals for access to the 100 pin connections System connection procedures will depend on system components and motor types Any combination of motor types can be used with the DM...

Page 24: ...if you have a preferred definition of the forward and reverse directions make sure that the encoder wiring is consistent with that definition The DMC 18x2 accepts single ended or differential encoder...

Page 25: ...the instruction BI 6 or BIZ 6 Step 8a Connect Standard Servo Motors The following discussion applies to connecting the DMC 18x2 controller to standard servo motor amplifiers The motor and the amplifie...

Page 26: ...imit is below the normal operating range See description of TL in the command reference Step D Connect the Motor Once the parameters have been set connect the analog motor command signal ACMD to the a...

Page 27: ...KP KD and KI It is necessary to accurately tune your servo system to ensure fidelity of position and minimize motion oscillation as described in the next section J7 J6 J51 DC Servo Motor Encoder AUX...

Page 28: ...X MBX MAX GND INX MBX MAX ICM A MP 1900 REV D GA LIL M OTION CONTROL M ADE IN USA LSCOM INCOM VCC VCC Unused with the DMC 18x2 Controller 100 pin high density connector AMP part 2 178238 9 Error LED R...

Page 29: ...ng 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 1842 BAXY This command causes the control...

Page 30: ...s are Not Available Without hall sensors the controller will not be able to estimate the commutation phase of the brushless motor In this case the controller could become unstable until the commutatio...

Page 31: ...le to initialize the X axis motor upon power or reset the following commands may be given SHX Enable X axis motor PRX 1 _BZX Move X motor close to zero commutation phase BGX Begin motion on X axis AMX...

Page 32: ...ep C Configure DMC 18x2 for motor type using MT command You can configure the DMC 18x2 for active high or active low pulses Use the command MT 2 for active low step motor pulses and MT 2 for active hi...

Page 33: ...t to each command these remarks must not be included in the actual program Example 1 System Set up This example assigns the system filter parameters error limits and enables the automatic error shut o...

Page 34: ...Y motion Example 5 Position Interrogation The position of the four axes may be interrogated with the instruction TP Instruction Interpretation TP Tell position all four axes TP X Tell position X axis...

Page 35: ...The motion can be stopped with the instruction ST Stop Example 8 Operation Under Torque Limit The magnitude of the motor command may be limited independently by the instruction TL Instruction Interpr...

Page 36: ...the motion Example 11 Using the On Board Editor Motion programs may be edited and stored in the controller memory They may be executed at a later time If the Smart Terminal is opened in the 3 pane vi...

Page 37: ...cute Program A Example 13 Motion Programs with Trippoints The motion programs may include trippoints as shown below Instruction Interpretation B Label DP 0 0 Define initial positions PR 30000 60000 Se...

Page 38: ...Y Z motors distance of 7000 3000 6000 respectively along linear trajectory Namely motors start and stop together Instruction Interpretation LM XYZ Specify linear interpolation axes LI 7000 3000 6000 R...

Page 39: ...leration VD 50000 Vector deceleration VE End vector sequence BGS Start motion 0 0 local zero 0 4000 4000 4000 4000 0 X Y R 2000 Figure 2 4 Motion Path for Example 16 Artisan Technology Group Quality I...

Page 40: ...motion control program and is useful for executing specific instructions upon activation of a limit switch After a limit switch has been activated further motion in the direction of the limit switch...

Page 41: ...ge 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 Index is an option for homing it is no...

Page 42: ...timer activates the motor off command MO is given or the OE1command Enable Off On Error is given and the position error exceeds the error limit As shown in Figure 3 1 AEN can be used to disable the a...

Page 43: ...he DMC 18x2 has 8 uncommitted TTL level inputs The command IN or TI will read the state of the inputs For more information on these commands refer to the Command Reference The reset input is also a TT...

Page 44: ...position has been passed For further information see the command OC in the Command Reference The error signal output is available on the interconnect module as ERROR This is a TTL signal which is low...

Page 45: ...34 Chapter 3 Connecting Hardware DMC 18x2 THIS PAGE LEFT BLANK INTENTIONALLY Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 46: ...are provided in this chapter describing the PCI communication registers used on the DMC 18x2 controller The following sections in this chapter are a brief introduction to the software tools and commun...

Page 47: ...Controls DMCShell ocx DMCReg ocx DMCTerm ocx etc GLWDMPCI sys DMC 18x2 FIFO IRQ Application Level Galil API Level Driver Level Hardware Interface DMCBUS32 dll Figure 4 1 Software Communications Hierar...

Page 48: ...Galil website at http www galilmc com support download html Figure 4 2 Galil SmartTERM layout The following SmartTERM File menu items briefly describe some basic features of the application Download...

Page 49: ...ialog box uses the DMC32 dll s DMCArrayUpload function to upload the array The controller s firmware must be recent enough to support the QU command Convert File ASCII to Binary Opens a dialog box tha...

Page 50: ...clicking on the Smart Terminal with Editor mode button on the terminal window s toolbar Reset Controller Offers three reset options Reset Controller sends an RS command to the controller The RS comman...

Page 51: ...he editor window is also useful for uploading and editing programs already residing in the controller memory This window has basic text editing features such as copy cut paste etc Also the editor wind...

Page 52: ...f the record can be displayed To modify the display right click on an object to access the options For detailed information about the features of the Galil DMC SmartTERM including the Data Record plea...

Page 53: ...he current controller models installed to the PC along with their associated I O addresses interrupt lines and controller serial numbers The Galil Registry is part of the DMCReg ocx ActiveX object ref...

Page 54: ...ure 4 5 General Communications Parameters Dialog Advanced communications settings are available under the Communication Method tab to allow different methods of communications to be utilized shown in...

Page 55: ...method the Stall method uses the opposite strategy The thread that performs I O with the controller maintains ownership of the CPU and polls the controller until a response is received This approach...

Page 56: ...ler The ActiveX Toolkit includes a collection of ready made ActiveX COM controls for use with Visual Basic Visual C Delphi LabVIEW and other ActiveX compatible programming tools The most common enviro...

Page 57: ...ications 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 ww...

Page 58: ...es making them available for the VB project To add this file select Add Module from the Project menu in VB5 6 Sending Commands in VB Most commands are sent to the controller with the DMCCommand functi...

Page 59: ...e controller It is returned by DMCOpen m_nRetCode is the return code for the routine m_nResponseLength is the response string length which must be set to the size of the response string m_sResponse is...

Page 60: ...aracters ASCII Command mode In the ASCII mode instructions are represented by two characters followed by the appropriate parameters Each instruction must be terminated by a carriage return or semicolo...

Page 61: ...ovement S axis coordinated motion movement For example the command STS commands motion to stop on the S axis vector motion The third byte for the equivalent binary command would then be 01 Byte 4 spec...

Page 62: ...sition error The DMC 18x2 uses only one of the PC s interrupts however it is possible to interrupt on multiple conditions For this reason the controller provides a status byte register that contains a...

Page 63: ...argument then set the desired inputs using the 8 bit mask for the n argument For example to enable interrupt on inputs 1 4 set EI32768 15 Note that the input interrupts must be reset for all inputs af...

Page 64: ...eturn the Status Byte For example when using the ActiveX toolkit DMCShell control with VB the DMCShell1_DMCInterrupt event procedure shown below will automatically execute and return the StatusByte in...

Page 65: ...ee registers used for communication The READ register and WRITE register occupy address N and the CONTROL register occupies address N 1 in the I O space The READ register is used for receiving data fr...

Page 66: ...nfigured to change states at a different level from the default level of 16 characters The level m can be changed from 16 up to 256 in multiples of 16 as follows 1 Write a 5 to the control register at...

Page 67: ...output 9 I block UB error code I block UB general status I block UW segment count of coordinated move for S plane S block UW coordinated move status for S plane S block SL distance traveled in coordi...

Page 68: ...d axis position error D block SL w d axis auxiliary position D block SL w d axis velocity D block SW w d axis torque D block UW e axis status E block UB e axis switches E block UB e axis stopcode E bl...

Page 69: ...A N A N A Trace on Echo On Axis Switch Information 1 Byte BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 Latch Occurred State of Latch Input N A N A State of Forward Limit State of Reverse Limit Stat...

Page 70: ...he velocity information that is returned in the data record is 64 times larger than the value returned when using the command TV Tell Velocity See command reference for more information about TV The t...

Page 71: ...60 Chapter 4 Software Tools and Communications DMC 18x2 THIS PAGE LEFT BLANK INTENTIONALLY Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 72: ...ll DMC 18x2 instructions is included in the Command Reference Command Syntax ASCII DMC 18x2 instructions are represented by two ASCII upper case characters followed by applicable arguments A space may...

Page 73: ...000 Instead of data some commands request action to occur on an axis or group of axes For example STXY stops motion on both the X and Y axes Commas are not required in this case since the particular a...

Page 74: ...04 One long word 4 bytes per field 06 Galil real format 4 bytes integer and 2 bytes fraction Byte 3 specifies whether the command applies to a coordinated move as follows 00 No coordinated motion move...

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

Page 76: ...mmand TC1 For example TC1 enter Tell Code command 1 Unrecognized command Returned response There are many reasons for receiving an invalid command response The most common reasons are unrecognized com...

Page 77: ...Request X Y Z W values PR Request Y value only The controller can also be interrogated with operands Operands Most DMC 18x2 commands have corresponding operands that can be used for interrogation Oper...

Page 78: ...positioning where each axis is independent and follows prescribed velocity profile Independent Axis Positioning PA PR SP AC DC Velocity control where no final endpoint is prescribed Motion stops on S...

Page 79: ...ch axis follows its own profile The user specifies the desired absolute position PA or relative position PR slew speed SP acceleration ramp AC and deceleration ramp DC for each axis On begin BG the DM...

Page 80: ...x y z w Specifies slew speed AC x y z w Specifies acceleration rate DC x y z w Specifies deceleration rate BG XYZW Starts motion ST XYZW Stops motion before end of move IP x y z w Changes position tar...

Page 81: ...celeration This example will specify a relative position movement on X Y and Z axes The movement on each axis will be separated by 20 msec Fig 6 1 shows the velocity profiles for the X Y and Z axis A...

Page 82: ...sign of the JG parameters When the begin command is given BG the motor accelerates up to speed and continues to jog at that speed until a new speed or stop ST command is issued If the jog speed is cha...

Page 83: ...r interpolation mode for 2 or more axes In linear interpolation mode motion between the axes is coordinated to maintain the prescribed vector speed acceleration and deceleration along the specified pa...

Page 84: ...r to determine which segment is being completed Additional Commands The commands VS n VA n and VD n are used to specify the vector speed acceleration and deceleration The DMC 18x2 computes the vector...

Page 85: ...r mode between X and Y axes LI 4000 0 4000 1000 Specify first linear segment with a vector speed of 4000 and end speed 1000 LI 1000 1000 4000 1000 Specify second linear segment with a vector speed of...

Page 86: ...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 supp...

Page 87: ...0 40000 FEEDRATE 0 0 1 0 5 0 6 4000 36000 30000 27000 3000 VELOCITY Z AXIS VELOCITY W AXIS POSITION W TIME sec TIME sec TIME sec Figure 6 2 Linear Interpolation Artisan Technology Group Quality Instr...

Page 88: ...ing of linear and arc segments to be prescribed Motion along the path is continuous at the chosen vector speed even at transitions between linear and circular segments The DMC 18x2 performs all the co...

Page 89: ...ure continuous motion If the controller receives no additional motion segments and no VE command the controller will stop motion instantly at the last vector There will be no controlled deceleration L...

Page 90: ...ecifies the tangent axis such as X Y Z W p N turns off tangent axis Before the tangent mode can operate it is necessary to assign an axis via the VM command and define its offset and scale factor via...

Page 91: ...on sequence on S or T coordinate system CS Clear sequence AV n Trippoint for After Relative Vector distance n AMS Holds execution of next command until Motion Sequence is complete TN m n Tangent scale...

Page 92: ...d 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 when the motion is halfway between the points A a...

Page 93: ...X An alternative gearing method is to synchronize the slave motor to the commanded vector motion of several axes performed by GAS For example if the X and Y motor form a circular motion the Z axis may...

Page 94: ...he 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 c...

Page 95: ...ample the position of x is always expressed in the range between 0 and 6000 Similarly the slave position is also redefined such that it starts at zero and ends at 1500 At the end of a cycle when the m...

Page 96: ...lue 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 specified by ET 0 0 ET 1 3000 ET 2 2250 ET 3 1500 This spec...

Page 97: ...ges the slave axis at a specified master position If the parameter is outside the master cycle the stopping is instantaneous To illustrate the complete process consider the cam relationship described...

Page 98: ...nts N 0 Index LOOP Loop to construct table 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 pro...

Page 99: ...the Master for ECAM EM 0 0 4000 Change for Z is 4000 zero for X Y EP400 0 ECAM interval is 400 counts with zero start ET 0 0 0 When master is at 0 position 1st point ET 1 40 20 2nd point in the ECAM t...

Page 100: ...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 example CMXZ specifies contouring o...

Page 101: ...nclude 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 DT 2 Specifies first time interval 22 ms CD...

Page 102: ...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 Mode is ideal for generating an arbitrary ve...

Page 103: ...osition value at intervals of 8 ms This is stored at the array POS Then the difference between the positions is computed and is stored in the array DIF Finally the motors are run in the contour mode C...

Page 104: ...a The captured data may then be played back in the contour mode The following array commands are used DM C n Dimension array RA C Specify array for automatic record up to 4 RD _TPX Specify data for ca...

Page 105: ...ve high step output pulses 2 5 specifies a stepper motor with active low step output pulses and reversed direction 2 5 specifies a stepper motor with active high step output pulse and reversed directi...

Page 106: ...e amount of delay depends on the parameter which is specified by the command KS As mentioned earlier there will always be some amount of stepper motor smoothing The default value for KS is 2 which cor...

Page 107: ...ntains the value of the main encoder for the x axis Stepper Position Maintenance Mode SPM The Galil controller can be set into the Stepper Position Maintenance SPM mode to handle the event of stepper...

Page 108: ...y encoder register step pulses and TP is the main encoder register feedback encoder Additionally YA defines the step drive resolution where YA 1 for full stepping or YA 2 for half stepping The full ra...

Page 109: ...UTION COUNTS PER REVOLUTION SHX ENABLE AXIS WT50 ALLOW SLIGHT SETTLE TIME YS1 ENABLE SPM MODE Half Stepping Drive X axis SETUP OE1 SET THE PROFILER TO STOP AXIS UPON ERROR KS16 SET STEP SMOOTHING MT 2...

Page 110: ...R REVOLUTION YC4000 ENCODER RESOLUTION COUNTS PER REVOLUTION SHX ENABLE AXIS WT100 ALLOW SLIGHT SETTLE TIME YS1 ENABLE SPM MODE MOTION PERFORM MOTION SP512 SET THE SPEED PR1000 PREPARE MODE OF MOTION...

Page 111: ...coder SETUP SET THE PROFILER TO CONTINUE UPON ERROR KS16 SET STEP SMOOTHING MT 2 2 2 2 MOTOR TYPE SET TO STEPPER YA64 STEP RESOLUTION OF THE MICROSTEPPING DRIVE YB200 MOTOR RESOLUTION FULL STEPS PER R...

Page 112: ...he IT and VT commands These commands filter the acceleration and deceleration functions to produce a smooth velocity profile The resulting velocity profile known as S curve has continuous acceleration...

Page 113: ...Step Motor Smoothing When operating with step motors motion smoothing can be accomplished with the command KS The KS command smoothes the frequency of step motor pulses Similar to the commands IT and...

Page 114: ...elerate rapidly after sensing the home switch The velocity profile generated is shown in Fig 6 8 The Home HM command can be used to position the motor on the index pulse after the home switch is detec...

Page 115: ...MC 18x2 SP 8000 Speed FE Y Find edge command BG Y Begin motion AM Y After complete MG FOUND HOME Send message DP 0 Define position as 0 EN End Artisan Technology Group Quality Instrumentation Guarante...

Page 116: ...POSITION HOME SWITCH INDEX PULSES MOTION REVERSE TOWARD HOME DIRECTION MOTION TOWARD INDEX DIRECTION MOTION BEGINS TOWARD HOME DIRECTION Figure 6 8 Motion intervals in the Home sequence Artisan Techno...

Page 117: ...Input goes low by using the _AL X or Y or Z or W command Example V1 _ALX returns the state of the X latch to the variable V1 V1 is 1 if the latch has not occurred 3 After the latch has occurred read...

Page 118: ...ound on our website In order to set the desired update rate use the command TM When the controller is operating with the fast firmware the following functions are disabled Gearing mode Ecam mode Pole...

Page 119: ...108 Chapter 6 Programming Motion DMC 18x2 THIS PAGE LEFT BLANK INTENTIONALLY Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 120: ...uss all aspects of creating applications programs The program memory size is 80 characters x 1000 lines Using the DMC 18x2 Editor to Enter Programs Application programs for the DMC 18x2 may be created...

Page 121: ...letes the line currently 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...

Page 122: ...T EN End of Program The above program moves X and Y 10000 and 20000 units respectively After the motion is complete the motors rest for 2 seconds The cycle repeats indefinitely until the stop command...

Page 123: ...PROGRAM Note The NO command is an actual controller command Therefore inclusion of the NO commands will require process time by the controller Using REM Statements with the Galil Terminal Software If...

Page 124: ...tches 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 n Where n indicates the thread number To...

Page 125: ...hen the FIFO becomes full program execution will be delayed until it is cleared If the user wants to avoid this delay the command CW 1 can be given This command causes the controller to throw away the...

Page 126: ...s _UL contains the number of available variables _DA contains the number of available arrays _DM contains the number of available array elements _AB contains the state of the Abort Input _LFx contains...

Page 127: ...logic levels The DMC 18x2 provides several event triggers that cause the program sequencer to halt until the specified event occurs Normally a program is automatically executed sequentially one line...

Page 128: ...y be specified If position is already past the point then MR will trip immediately Will function on geared axis or aux inputs MC X or Y or Z or W Halt program execution until after the motion profile...

Page 129: ...egin motion AD 1000 Wait until 1000 counts SB1 Set output bit 1 EN End program Event Trigger Repetitive Position Trigger To set the output bit every 10000 counts during a move the AR trippoint is used...

Page 130: ...st AV command VECTOR Label CAS Identify coordinate system VMXY VS 5000 Coordinated path VP 10000 20000 Vector position VP 20000 30000 Vector position VE End vector BGS Begin sequence AV 5000 After vec...

Page 131: ...8x2 to make decisions without a host computer For example the DMC 18x2 can decide between two motion profiles based on the state of an input line Command Format JP and JS FORMAT DESCRIPTION JS destina...

Page 132: ...n this example this statement will cause the program to jump to the label TEST if V1 is less than V2 and V3 is less than V4 To illustrate this further consider this same example with an additional con...

Page 133: ...OR an ELSE command occurs in the program see discussion of ELSE command below Note An ENDIF command must always be executed for every IF command that has been executed It is recommended that the user...

Page 134: ...ARE ACTIVE Message to be executed if 2nd IF conditional is true ELSE ELSE command for 2nd IF conditional statement MG ONLY INPUT 1 IS ACTIVE Message to be executed if 2nd IF conditional is false ENDI...

Page 135: ...LIMSWI routine is executed it is often desirable to restart the program sequence instead of returning to the location where the limit occurred To do this give a ZS command at the end of the LIMSWI ro...

Page 136: ...OOP EN Motion commands such as JG 5000 can still be sent from the PC even while the dummy applications program is being executed ED Edit Mode 000 LOOP Dummy Program 001 JP LOOP EN Jump to Loop 002 LIM...

Page 137: ...motion MCX Motion Complete trip point EN End main program MCTIME Motion Complete Subroutine MG X fell short Send out a message EN End subroutine This simple program will issue the message X fell shor...

Page 138: ...llowing format XQ _ED2 or _ED3 _ED1 1 Where the 1 at the end of the command line indicates a restart therefore the existing program stack will not be removed when the above format executes The followi...

Page 139: ...input the input variable will hold up to 6 characters These characters are combined into a single value which is represented as 32 bits of integer and 16 bits of fraction Each ASCII character is repr...

Page 140: ...ent of n n in degrees with range of 32768 to 32767 and 16 bit fractional resolution ASIN n Arc Sine of n between 90 and 90 Angle resolution in 1 64000 degrees ACOS n Arc Cosine of n between 0 and 180...

Page 141: ...id variable names are Valid Variable Names POSX POS1 V3OS Invalid Variable Names REALLONGNAME Cannot have more than 8 characters 123 Cannot begin variable name with a number SPEED Z Cannot have spaces...

Page 142: ...mp to LOOP if the position error of X is greater than 5 JP ERROR _TC 1 Jump to ERROR if the error code equals 1 Operands can be used in an expression and assigned to a programmable variable but they c...

Page 143: ...array named speed with 100 entries DM POSX 0 Frees array space Assignment of Array Entries Like variables each array element can be assigned a value Assigned values can be numbers or returned values f...

Page 144: ...as position position error inputs or torque This is useful for teaching motion trajectories or observing system performance Up to four types of data can be captured and stored in four arrays The capt...

Page 145: ...e Recording into An Array During a position move store the X and Y positions and position error every 2 msec RECORD Begin program DM XPOS 300 YPOS 300 Define X Y position arrays DM XERR 300 YERR 300 D...

Page 146: ...ngth of material is to be advanced a specified distance When the motion is complete a cutting head is activated to cut the material The length is variable and the operator is prompted to input it in i...

Page 147: ...sponses can be used in the message command For example MG The input is IN 1 MG The Position of X is _TPX Formatting Messages String variables can be formatted using the specifier Sn where n is the num...

Page 148: ...ine feed Sn Sends the first n characters of a string variable where n is 1 thru 6 Displaying Variables and Arrays Variables and arrays may be sent to the screen using the format variable or array x Fo...

Page 149: ...returned preceded by a and in 2 s complement Hex values should be input as signed 2 s complement where negative numbers have a negative sign The default format is PF 10 0 If the number of decimal plac...

Page 150: ...cimal For example Examples TP F2 2 Tell Position in decimal format 2 2 05 00 05 00 00 00 07 00 Response from Interrogation Command TP 4 2 Tell Position in hexadecimal format 4 2 FFFB 00 0005 00 0000 0...

Page 151: ...is also used with the MG command Fast Firmware Mode To allow faster servo update rates a minimized firmware mode is available where certain features are disabled When the fast firmware mode is activa...

Page 152: ...rammable Hardware I O Digital Outputs The DMC 18x2 has an 8 bit uncommitted output port for controlling external events For example Instruction Function SB6 Sets bit 6 of output port CB4 Clears bit 4...

Page 153: ...hrough 8 For example a Jump on Condition instruction can be used to execute a sequence if a high condition is noted on an input 3 To halt program execution the After Input AI instruction waits until t...

Page 154: ...EN to return from the ININT subroutine Examples Input Interrupt A Label A II 1 Enable input 1 for interrupt function JG 30000 20000 Set speeds on X and Y axes BG XY Begin motion on X and Y axes B Lab...

Page 155: ...the forward move the controller outputs a pulse for 20 ms and then waits an additional 80 ms before returning to A for a new cycle Instruction Function A Label AI1 Wait for input 1 PR 6370 Distance S...

Page 156: ...c 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 of 270 and t...

Page 157: ...Wait for X completion PR 80000 Lower Z BGZ AMZ CR 80000 270 360 Z second circle move VE VS 40000 BGS AMS PR 80000 Raise Z BGZ AMZ VP 37600 16000 Return XY to start VE VS 200000 BGS AMS EN Artisan Tech...

Page 158: ...er 7 Application Programming 147 R 2 B C A 0 4 9 3 4 Y X Figure 7 2 Motor Velocity and the Associated Input Output signals Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www...

Page 159: ...148 Chapter 7 Application Programming DMC 18x2 THIS PAGE LEFT BLANK INTENTIONALLY Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 160: ...exceeds the value specified by the Error Limit ER command or when an off on error condition is enabled OE1 and the abort command is given Each axis amplifier has a separate enable line This signal als...

Page 161: ...is moving in the reverse direction the controller will automatically jump to the limit switch subroutine LIMSWI if such a routine has been written by the user Software Protection The DMC 18x2 provide...

Page 162: ...isabled while they are moving they may coast to a stop because they are no longer under servo control To re enable the system use the Servo Here SH command The SH command will clear any position error...

Page 163: ...LR condition specifies the reverse limit and _LF specifies the forward limit X Y Z or W following _LR or _LF specifies the axis The CN command can be used to configure the polarity of the limit switch...

Page 164: ...away when connected to amplifier with no additional inputs Amplifier offset too large Adjust amplifier offset Same as above but offset adjustment does not stop the motor Damaged amplifier Replace ampl...

Page 165: ...ng 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 does not start or complete a move Noise...

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

Page 167: ...y 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 profi...

Page 168: ...p is very similar Suppose that we want the motor position to be at 90 degrees The motor position is measured by a position sensor often an encoder and the position feedback is sent to the controller L...

Page 169: ...he three constants KP KI and KD which correspond to the proportional integral and derivative term respectively The damping element of the filter acts as a predictor thereby reducing the delay associat...

Page 170: ...ombined inertia of motor and load kg m2 L Armature Inductance H When the motor parameters are given in English units it is necessary to convert the quantities to MKS units For example consider a motor...

Page 171: ...previous equations Velocity Loop The motor driver system may include a velocity loop where the motor velocity is sensed by a tachometer and is fed back to the amplifier Such a system is illustrated in...

Page 172: ...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 incr...

Page 173: ...P KD KI and PL respectively The relationship between the filter coefficients and the instructions are K KP KD 4 A KD KP KD C KI 2 B PL This filter includes a lead compensation an integrator and a low...

Page 174: ...tem elements The analysis procedure is illustrated in terms of the following example Consider a position control system with the DMC 18x2 controller and the following parameters Kt 0 1 Nm A Torque con...

Page 175: ...control system The open loop transfer function A s is the product of all the elements in the loop A 390 000 s 51 s2 s 2000 To analyze the system stability determine the crossover frequency c at which...

Page 176: ...tical design method The Analytical Method The analytical design method is aimed at closing the loop at a crossover frequency c with a phase margin PM The system parameters are assumed known The design...

Page 177: ...hat A s has a crossover frequency of 500 rad s and a phase margin of 45 degrees This requires that A j500 1 Arg A j500 135 However since A s L s G s then it follows that G s must have magnitude of G j...

Page 178: ...with the instruction KP 20 6 KD 68 6 In a similar manner other filters can be programmed The procedure is simplified by the following table which summarizes the relationship between the various filter...

Page 179: ...168 Chapter 10 Theory of Operation DMC 18x2 PAGE LEFT BLANK INTENTIONALLY Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 180: ...idth 80 nsec Stepper Control Pulse TTL 0 5 Volts level at 50 duty cycle 3MHz maximum step output frequency Direction TTL 0 5 Volts Input Output Uncommitted Inputs Limits Home Abort Inputs TTL OUT 1 th...

Page 181: ...and Resolution 16 bit or 0 0003 V Variable Range 2 billion Variable Resolution 1 10 4 Array Size 8000 elements 30 arrays Program Size 1000 lines x 80 characters Connectors for DMC 18x2 Main Board J1 D...

Page 182: ...35 I Y 86 Output 8 36 I Y 87 5V 37 A Z 88 Ground 38 A Z 89 Ground 39 B Z 90 Ground 40 B Z 91 NC 41 I Z 92 NC 42 I Z 93 NC 43 A W 94 NC 44 A W 95 NC 45 B W 96 NC 46 B W 97 NC 47 I W 98 NC 48 I W 99 12...

Page 183: ...the bits of the Output port Inputs Encoder A B Position feedback from incremental encoder with two channels in quadrature CHA and CHB The encoder may be analog or TTL Any resolution encoder may be use...

Page 184: ...s If you are using stepper SMW motors SM must always be jumpered The Analog command is not valid with SM jumpered OPT Motor Off on power up JP6 MRST Master Reset enable Returns controller to factory d...

Page 185: ...tputs Features Separates DMC 18x2 cable into individual screw type terminals Clearly identifies all terminals Available with on board servo drives see AMP 19X0 Can be configured for AEN high or low No...

Page 186: ...th opto isolation 36 VCC O 5 Volts 37 AMPENW O W axis amplifier enable 38 AMPENZ O Z axis amplifier enable 39 AMPENY O Y axis amplifier enable 40 AMPENX O X axis amplifier enable 41 LSCOM I Limit Swit...

Page 187: ...AX I X Main encoder A 84 MAX I X Main encoder A 85 MBX I X Main encoder B 86 MBX I X Main encoder B 87 INX I X Main encoder Index 88 INX I X Main encoder Index 89 ANALOG GND Analog Ground 90 VCC 5 Vol...

Page 188: ...220 0 440 2 000 6 880 4 940 Dimensions 13 5 x 2 675 x 6 88 AMP 19X0 Mating Power Amplifiers The AMP 19X0 series are mating brush type servo amplifiers for the DMC 18x2 The AMP 1910 contains 1 amplifie...

Page 189: ...system elements A single ICM 2900 can be used for up to 4 axes Block 4 PIN Label I O Description 1 MOCMDZ O Z axis motor command to amp input w respect to ground 1 SIGNZ O Z axis sign output for inpu...

Page 190: ...mit Switch Common Input No Connection 10 HOMEW I W axis home input 10 RLSW I W axis reverse limit switch input 10 FLSW I W axis forward limit switch input 11 HOMEX I X axis home input 11 RLSX I X axis...

Page 191: ...n encoder A 20 MAX I X Main encoder A 20 MBX I X Main encoder B 20 MBX I X Main encoder B 21 5V O 5Volts 21 INY I X Main encoder Index 21 INY I X Main encoder Index 21 GND O Signal Ground 22 MAY I X M...

Page 192: ...one of the isolated digital outputs where X stands for the digital output terminals The default configuration is for active high outputs If active low outputs are desired reverse RP3 in it s socket Th...

Page 193: ...e is a zero then the block of 8 I O points will be configured as an input For example if block 4 and 5 is to be configured as an output CO 12 is issued 8 Bit I O Block Block Binary Representation Deci...

Page 194: ...utput the following command may be issued OP 7 7 This command will set bits 1 2 3 block 0 and bits 65 66 67 block 8 to 1 Bits 4 through 8 and bits 68 through 80 will be set to 0 All other bits are una...

Page 195: ...23 6 37 I O 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 41 0 4 I O 5 42 1 6 I O 5 43 2 8 I O 5 44 3 10 I O 5 45 4 12 I O 5 46 5 14 I O 5 47 6 16 I O 5 48...

Page 196: ...61 4 25 I O 7 60 3 27 I O 7 59 2 29 I O 7 58 1 31 I O 7 57 0 33 I O 6 56 7 35 I O 6 55 6 37 I O 6 54 5 39 I O 6 53 4 41 I O 6 52 3 43 I O 6 51 2 45 I O 6 50 1 47 I O 6 49 0 49 5V 2 I O 9 73 0 4 I O 9...

Page 197: ...for 2mA at up to 28 VDC Configurable as inputs or outputs in groups of eight bits Provides 16 high power outputs capable of up to 500mA each Connects to controller via 100 pin shielded cable All I O...

Page 198: ...he eight banks of extended I O on the controller Each bank is individually configured as an input or output bank by inserting the appropriate integrated circuits and resistor packs The hardware config...

Page 199: ...Hardware Banks The extended I O on the DMC 18x2 and DB 14064 is configured using the CO command The banks of buffers on the IOM 1964 are configured to match by inserting the appropriate IC s and resi...

Page 200: ...appropriate sockets A group of eight LED s indicates the status of each I O point The numbers above the Bank 0 label indicate the number of the I O point corresponding to the LED above it Digital Inp...

Page 201: ...xternal 5V in the circuits above is for example only The inputs are optically isolated and can accept a range of input voltages from 4 to 28 VDC Active outputs are connected to the optically isolated...

Page 202: ...by inserting the optical isolator NEC2505 IC s into the Ux1 and Ux2 sockets The digital input IC s Ux3 and Ux4 are removed The resistor packs RPx2 and RPx3 are inserted and the input resistor pack RPx...

Page 203: ...of current available to source as well as affecting the low level voltage at the I O output The maximum sink current is 2mA regardless of RPx3 or I OC voltage determined by the NEC2505 optical isolato...

Page 204: ...s configurable as inputs or outputs in groups of 8 Digital Inputs Maximum voltage 28 VDC Minimum input voltage 4 VDC Maximum input current 3 mA High Power Digital Outputs Maximum external power supply...

Page 205: ...the same value as that returned by TI n IN n Function that returns state of individual input bit n is number of the input from 1 to 80 Screw Terminal Listing Rev A B boards orange and Rev C boards bl...

Page 206: ...6 4 45 43 I O48 I O bit 48 3 46 46 I O47 I O bit 47 3 47 45 I O46 I O bit 46 3 48 48 I O45 I O bit 45 3 49 47 I O44 I O bit 44 3 50 50 I O43 I O bit 43 3 51 49 I O42 I O bit 42 3 52 52 I O41 I O bit 4...

Page 207: ...19 I O bit 19 0 91 89 I O18 I O bit 18 0 92 92 I O17 I O bit 17 0 93 91 OUTC17 24 Out common for I O 17 24 0 94 94 I OC17 24 I O common for I O 17 24 0 95 93 OUTC17 24 Out common for I O 17 24 0 96 96...

Page 208: ...circular arc is defined by the arc radius the starting angle and the angular width of the arc The zero angle corresponds to the positive direction of the X axis and the CCW direction of rotation is po...

Page 209: ...is given by D Lk k n 1 The velocity profile may be specified independently in terms of the vector velocity and acceleration For example the velocity profile corresponding to the path of Fig A 2 may be...

Page 210: ...or 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 point along the path starting at A...

Page 211: ...200 Appendices DMC 18x2 A B D a b c time C Figure A 4 Vector and Axes Velocities Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Page 212: ...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 30pm ADVANCED MOTION CONTROL WHO SHOULD ATTEND Those who c...

Page 213: ...rol 270 Technology Way Rocklin California 95765 Phone 916 626 0101 Fax 916 626 0102 E mail address support galilmc com URL www galilmc com FTP www galilmc com ftp Artisan Technology Group Quality Inst...

Page 214: ...ip 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 product to Galil Any d...

Page 215: ...d Position 82 83 126 Communication 3 FIFO 3 54 55 Conditional jump 109 116 118 121 Contour Mode 89 94 Control Filter Damping 154 Coordinated Motion 62 Circular 82 Contour Mode 89 94 Ecam 84 85 88 Elec...

Page 216: ...124 125 131 LIMSWI 29 111 124 125 Linear Interpolation 76 82 89 Clear Sequence 78 80 Logical Operator 120 Masking Bit Wise 121 128 Math Function Absolute Value 84 121 129 150 Bit Wise 121 128 Cosine...

Page 217: ...172 Stop Code 49 66 125 131 Stop Motion 78 126 152 Subroutine 29 77 111 120 126 Automatic Subroutine 124 Synchronization 4 84 Tangent 77 79 80 Teach 93 Latch 66 Record 91 93 Tell Code 65 Tell Error 66...

Page 218: ...service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE IN...

Reviews: