Home
DMC-18x2 COMMAND REFERENCE
Contents
1. DMC 18x2 COMMAND REFERENCE Manual Rev 1 0c By Galil Motion Control Inc Galil Motion Control Inc 3750 Atherton Road Rocklin California 95765 Phone 916 626 0101 Fax 916 626 0102 Internet Address support galilmc com URL www galilmc com Rev 07 02 Overview Controller Notation This command reference is a supplement to the Galil Motion Control User Manual For proper controller operation consult the Users Manual This manual describes commands to be used with the Galil Econo Series Motion Controllers DMC 1812 DMC 1822 DMC 1832 and DMC 1842 Commands are listed in alphabetical order Servo and Stepper Motor Notation Your motion controller has been designed to work with both servo and stepper type motors Installation and system setup will vary depending upon whether the controller will be used with stepper motors or servo motors To make finding the appropriate instructions faster and easier icons are next to any information that applies exclusively to one type of system Otherwise assume that the instructions apply to all types of systems The icon legend is shown below S Attention Pertains to servo motor use rn Attention Pertains to stepper motor use Command Descriptions Each executable instruction is listed in the following section in alphabetical order Below is a description of the information which is provided for each command The two letter Opcode for each instruction is plac
2. 1 Refer to the DMC 1802 User Manual for additional information ARGUMENTS UIn where n is an integer between 0 and 15 USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes EXAMPLES 1 Label PR 10000 Position relative SP 5000 Speed BGX Begin motion AS Wait for at speed UI 1 Send interrupt 1 EN End program This program sends an interrupt to the selected IRQ line The host writes a 6 to address N 1 and then reads address N 1 to receive data E1 which corresponds to UI DMC 18X2 Command Reference UL FUNCTION Upload DESCRIPTION The UL command transfers data from the controller to a host computer through port 1 Programs are sent without line numbers The Uploaded program will be followed by a lt control gt Z or a as an end of text marker ARGUMENTS None USAGE DEFAULTS While Moving Yes Default Value 0 In a Program No Default Format Command Line Yes OPERAND USAGE When used as an operand UL gives the number of available variables The number of available variables is 254 RELATED COMMAND DL on page 51 Download EXAMPLES UL Begin upload A Line 0 NO This isan Example Line 1 NO Program Line 2 EN Line 3 lt cntrl gt Z Terminator DMC 18X2 Command Reference UL 161 VA Binary B7 FUNCTION Vector Acceleration DESCRIPTION This command sets the acceleration rate of the vector in a coordinated motion sequence The parameter input will
3. 10 and 2 10 n Incremental distance between pulses Integer between 65535 and 65535 Notes OCx 0 will disable the Circular Compare function The sign of the parameter n will designate the expected direction of motion for the output compare function When moving in the opposite direction output compare pulses will occur at the incremental distance of 65536 In where Inl is the absolute value of n USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _OCx gives the state of the OC function 0 OC function has been enabled but not generated any pulses 1 OC function not enable or has generated the first output pulse EXAMPLES OCX 300 100 Select X encoder as position sensor First pulse at 300 Following pulses at 400 500 DMC 18X2 Command Reference OC 117 OE Binary 8D FUNCTION Off on Error DESCRIPTION The OE command causes the controller to shut off the motor command if a position error exceeds the limit specified by the ER command occurs or an abort occurs from either the abort input or on AB command If a position error is detected on an axis and the motion was under an independent move only that axis will be shut off However if the motion is a coordinated mode of the types VM LM or CM all the participating axes will be stopped ARGUMENTS OE n n n n or OEX n where n 0 Disables the Off On Error function n 1 Enables the Off On Error
4. DMC 1200 2000 2100 The controller s response to this command will be the return of 4 integers separated by commas The four fields represent the following First field returns the number of axes Second field returns the number of bytes to be transferred for general status Third field returns the number bytes to be transferred for coordinated move status Fourth field returns the number of bytes to be transferred for axis specific information ARGUMENTS QZ USAGE While Moving In a Program Command Line Controller Usage RELATED COMMANDS QR on page 126 DEFAULTS Yes Default Value Yes Default Format Yes ALL CONTROLLERS Data Record DMC 18X2 Command Reference RA FUNCTION Record Array DESCRIPTION The RA command selects one through four arrays for automatic data capture The selected arrays must be dimensioned by the DM command The data to be captured is specified by the RD command and time interval by the RC command ARGUMENTS RA m 0 p O where n m o and p are dimensioned arrays as defined by DM command The contain nothing USAGE While Moving In a Program Command Line RELATED COMMANDS DM on page 52 RD on page 131 RC on page 130 EXAMPLES Record DM POS 100 RA POS RD _TPX RC 1 PR 1000 BG EN DEFAULTS Yes Yes Yes Dimension Array Record Data Record Interval Label Define array Specify Record Mode Default Value D
5. OPERAND USAGE _CW contains the value of the data adjustment bit 2 off 1 on Note The CW command can cause garbled characters to be returned by the controller The default state of the controller is to disable the CW command however the Galil Servo Design Kit software and terminal software may sometimes enable the CW command for internal usage If the controller is reset while the Galil software is running the CW command could be reset to the default value which would create difficulty for the software It may be necessary to re enable the CW command The CW command status can be stored in EEPROM Note2 Specifying both fields of the CW command together is not valid as these are read as separate commands If CW2 1 is issued for example the controller will not recognize the second data field Instead the commands must be issued individually such as CW 2 CW 1 DMC 18X2 Command Reference CW 47 DA FUNCTION Deallocate the Variables amp Arrays DESCRIPTION The DA command frees the array and or variable memory space In this command more than one array or variable can be specified for memory de allocation Different arrays and variables are separated by comma when specified in one command The argument deallocates all the variables and 0 deallocates all the arrays ARGUMENTS DA c 0 variable name where c 0 Defined array name variable name Defined variable name Deallocates all the variables 0 Deal
6. TPX Interrogate the controller for current position of X axis 21645 Value returned by the controller VARI Request value of variable VAR1 previously set to 10 10 0000 Value of variable returned by controller DMC 18X2 Command Reference LZ Binary E7 105 MC Binary C9 FUNCTION Motion Complete In Position DESCRIPTION The MC command is a trippoint used to control the timing of events This command will hold up execution of the following commands until the current move on the specified axis or axes is completed and the encoder reaches or passes the specified position Any combination of axes or a motion sequence may be specified with the MC command For example MC XY waits for motion on both the X and Y axis to be complete MC with no parameter specifies that motion on all axes is complete TW x y z w sets the timeout to declare an error if the encoder is not in position within the specified time If a timeout occurs the trippoint will clear and the stopcode will be set to 99 An application program will jump to the special label MCTIME When used in stepper mode the controller will hold up execution of the proceeding commands AA until the controller has generated the same number of steps as specified in the commanded position The actual number of steps that have been generated can be monitored by using the interrogation command TD Note The MC command is useful when operating with stepper motors since the step pulses can b
7. This value can also be specified as a fraction with a resolution of 1 16 n Returns the brushless module for the specified axis USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BMx indicates the cycle length in counts for the specified axis RELATED COMMANDS BA on page 24 Brushless Axis BB Binary 9E on page 25 Brushless Phase Begins BC on page 26 Brushless Commutation BD Binary 9D on page 27 Brushless Degrees BI on page 29 Brushless Inputs BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup BZ on page 38 Brushless Zero EXAMPLES BM 60000 Set brushless modulo for Y axis to be 60000 BMZ 100000 6 Set brushless modulo for Z axis to be 100000 3 33333 333 BM Interrogate the Brushless Module for the W axis Note Changing the BM parameter causes an instant change in the commutation phase DMC 18X2 Command Reference BM Binary 9B 31 BN FUNCTION Burn DESCRIPTION The BN command saves controller parameters variables arrays and applications programs shown below in Flash EEPROM memory This command typically takes 1 second to execute and must not be interrupted The controller returns a when the Burn is complete PARAMETERS SAVED DURING BURN USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _BN contains the serial number of the
8. on page 24 BB on page 25 BC on page 26 BD on page 27 BI on page 29 BM on page 31 BO on page 33 BZ on page 38 Brushless Axis Brushless Phase Begins Brushless Commutation Brushless Degrees Brushless Inputs Brushless Modulo Brushless Offset Brushless Zero Note When using Galil Windows software the timeout must be set to a minimum of 10seconds timeout 10000 when executing the BS command This allows the software to retrieve all messages returned from the controller DMC 18X2 Command Reference BV FUNCTION Burn Variables DESCRIPTION The BV command saves the controller variables in non volatile EEPROM memory This command typically takes up to 2 seconds to execute and must not be interrupted The controller returns a when the Burn is complete ARGUMENTS None USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Not in a Program Yes RELATED COMMANDS BP on page 34 Burn Program Note This command may cause the Galil software to issue the following warning A time out occurred while waiting for a response from the controller This warning is normal and is designed to warn the user when the controller does not respond to a command within the timeout period This occurs because this command takes more time than the default timeout of 1 sec The timeout can be changed in the Galil software but this warning does not affect the operation of the controller or software DMC 18X2 Command
9. on page 38 Brushless Zero HINT To assure that the output voltage equals the BO parameters set the PID and OF parameters to zero DMC 18X2 Command Reference BO Binary 9F 33 34 BP BP FUNCTION Burn Program DESCRIPTION The BP command saves the application program in non volatile EEPROM memory This command typically takes up to 10 seconds to execute and must not be interrupted The controller returns a when the Burn is complete ARGUMENTS None USAGE While Moving In a Program Not in a Program RELATED COMMANDS BN on page 32 BV on page 37 DEFAULTS No Default Value No Yes Burn Parameters Burn Variable Note This command may cause the Galil software to issue the following warning A time out occurred while waiting for a response from the controller This warning is normal and is designed to warn the user when the controller does not respond to a command within the timeout period This occurs because this command takes more time than the default timeout of 1 sec The timeout can be changed in the Galil software but this warning does not affect the operation of the controller or software DMC 18X2 Command Reference BS FUNCTION Brushless Setup DESCRIPTION The command BS tests the wiring of a sinusoidally commutated brushless motor If no Hall sensors are connected the function tests the wiring of the DAC s If Hall sensors are connected the function also tests the wiring of the Ha
10. the first element in the table ET 0 0 Specifies the position of the slave axes X and Z to be synchronized with the starting point of the master ET 1200 400 Specifies the position of the slave axes X and Z to be synchronized with the second point of the master DMC 18X2 Command Reference ET Binary CO 71 FA Binary 94 FUNCTION Acceleration Feedforward DESCRIPTION The FA command sets the acceleration feedforward coefficient or returns the previously set value This coefficient when scaled by the acceleration adds a torque bias voltage during the acceleration phase and subtracts the bias during the deceleration phase of a motion Acceleration Feedforward Bias FA AC 1 5 10 7 Deceleration Feedforward Bias FA DC 1 5 10 7 The Feedforward Bias product is limited to 10 Volts FA operates when commanding motion with PA PR and JG ARGUMENTS FA n n n n or FAX n where n is an unsigned number in the range 0 to 8191 decimal with a resolution of 0 25 n Returns the value of the feedforward acceleration coefficient for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 4 0 Command Line Yes OPERAND USAGE _FAx contains the value of the feedforward acceleration coefficient for the specified axis RELATED COMMANDS FV on page 76 Velocity feedforward EXAMPLES AC 500000 1000000 Set feedforward coefficient to 10 for the X axis FA 10 15 and 15 for the Y axis
11. 0 DEFAULTS Yes Default Value Yes Default Format No Command to begin IF conditional statement End of IF conditional Statement IF conditional statement based on input 1 2 TF conditional statement executed if 1 IF conditional true MG INPUT 1 AND 2 ARE ACTIVE Message to be executed if 2 IF conditional is true ELSE ELSE command for 2 IF conditional statement MG ONLY INPUT 1 IS ACTIVE Message to be executed if 2 IF conditional is false ENDIF End of 2 conditional statement ELSE ELSE command for 1 IF conditional statement MG ONLY INPUT 2 IS ACTIVE Message to be executed if 1 IF conditional statement ENDIF End of 1 conditional statement DMC 18X2 Command Reference EM Binary C1 FUNCTION Cam cycles DESCRIPTION The EM command is part of the ECAM mode It is used to define the change in position over one complete cycle of the master The field for the master axis is the cycle of the master position For the slaves the field defines the net change in one cycle If a slave will return to its original position at the end of the cycle the change is zero If the change is negative specify the absolute value ARGUMENTS EM n n n n or EMX n where n is a positive integer in the range between and 8 388 607 for the master axis and between and 2 147 483 647 for a slave axis USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _EM x contain
12. 67 EQ Binary C5 FUNCTION ECAM quit disengage DESCRIPTION The EQ command disengages an electronic cam slave axis at the specified master position Separate points can be specified for each axis If a value is specified outside of the master s range the slave will disengage immediately ARGUMENTS EQ 1 n n n or EQX n where nis the master positions at which the axes are to be disengaged n Returns if engage command issued and axis is waiting to engage 2 if disengage command issued and axis is waiting to disengage and 0 if ECAM engaged or disengaged USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _EQx contains 1 if engage command issued and axis is waiting to engage 2 if disengage command issued and axis is waiting to disengage and 0 if ECAM engaged or disengaged RELATED COMMANDS EA on page 55 Choose ECAM master EB Binary C4 on page 56 Enable ECAM EC Binary C6 on page 57 Set ECAM table index EG Binary C3 on page 59 Engage ECAM EM Binary C1 on page 63 Specify ECAM cycle EP Binary C2 on page 67 Specify ECAM table intervals amp staring point ET Binary CO on page 71 ECAM table EXAMPLES EQ 300 700 Disengages the X and Y motors at master positions 300 and 700 respectively Note This command is not a trippoint This command will not hold the execution of the program flow If the execution needs to be held until master posi
13. ALL CONTROLLERS RELATED COMMANDS QZ on page 128 Return DMA Data Record information Note The Galil windows terminal will not display the results of the QR command since the results are in binary format DMC 18X2 Command Reference QU FUNCTION Upload Array DESCRIPTION The QU command transfers array data from the controller to a host computer The QU requires that the array name be specified along with the first element of the array and last element of the array The uploaded array will be followed by a lt control gt Z as an end of text marker ARGUMENTS QU array start end delim where array is a valid array name start is the number of the first element of the array default 0 end is the number of the last element of the array default last element delim specifies the character used to delimit the array elements If delim is 1 then the array elements will be separated by acomma Otherwise the elements will be separated by a carriage return USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format Position Format Command Line Yes RELATED COMMANDS QD on page 125 Download array DMC 18X2 Command Reference QU 127 128 QZ QZ FUNCTION Return DMA Data Record information DESCRIPTION The QZ command is an interrogation command that returns information regarding DMA transfers DMC 1700 the secondary FIFO DMC 1600 DMC 1700 DMC 1800 or the Data Record
14. CS on page 46 _CS is the Segment Counter EXAMPLES CM XYZW Specify Contour Mode DT4 Specify time increment for contour CD 200 350 150 500 Specify incremental positions on X Y Z and W axes X axis moves 200 counts Y axis moves 350 counts Z axis moves 150 counts W axis moves 500 counts WC Wait for complete CD 100 200 300 400 New position data WC Wait for complete DTO Stop Contour CD 0 0 0 0 Exit Mode DMC 18X2 Command Reference CD Binary BE 41 CE Binary 8C FUNCTION Configure Encoder DESCRIPTION The CE command configures the encoder to the quadrature type or the pulse and direction type It also allows inverting the polarity of the encoders The configuration applies independently to the four main axes encoders and the four auxiliary encoders ARGUMENTS CE n n n n or CEX n where n is an integer in the range of 0 to 3 The values of n are n Main encoder type o Normal quadrature Normal pulse and direction Reversed quadrature Reversed pulse and direction n Returns the value of the encoder configuration for the specified axes USAGE DEFAULTS While Moving Yes Default Value O In a Program Yes Default Format 2 0 Command Line Yes OPERAND USAGE _CEx contains the value of encoder type for the axis specified by x RELATED COMMANDS MT on page 111 Specify motor type EXAMPLES CE 0 3 0 2 Configure encoders CE Interrogate configuration V _CEX Assign configuration to a variable N
15. Execute Program 175 180 Index DMC 18X2 Command Reference
16. Hint The AD command is accurate to the number of counts that occur in 2 servo samples Multiply your speed by 2 servo samples to obtain the maximum position error in counts Remember AD measures incremental distance from start of move on one axis DMC 18X2 Command Reference AD Binary CD 15 AI Binary D1 FUNCTION After Input DESCRIPTION The AI command is used in motion programs to wait until after the specified input has occurred If n is positive it waits for the input to go high If n is negative it waits for n to go low ARGUMENTS AI n where nis 1 96 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS IN n Function to read input 1 through 8 II on page 82 Input interrupt ININT Label for input interrupt EXAMPLES A Begin Program AI 8 Wait until input 8 is high SP 10000 Speed is 10000 counts sec AC 20000 Acceleration is 20000 counts sec2 PR 400 Specify position BG X Begin motion EN End Program Hint The AI command actually halts execution until specified input is at desired logic level Use the conditional Jump command JP or input interrupt II if you do not want the program sequence to halt 16 Al Binary D1 DMC 18X2 Command Reference AL Binary EE FUNCTION Arm Latch DESCRIPTION The AL command enables the latching function high speed main or auxiliary position capture of the controller When the position latch is armed
17. In a Program No Default Format Command Line Yes 138 lt control gt R lt control gt V DMC 18X2 Command Reference SB Binary EA FUNCTION Set Bit DESCRIPTION The SB command sets one of eight bits on the output port ARGUMENTS SB n where n is an integer in the range 1 to 8 decimal USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMAND CB on page 40 Clear Bit EXAMPLES SB 5 Set output line 5 SB 1 Set output line 1 DMC 18X2 Command Reference SB Binary EA 139 SC Binary E1 FUNCTION Stop Code DESCRIPTION The SC command allows the user to determine why a motor stops The controller responds with the stop code as follows MEANING CODE MEANING Motors are running independent Stopped after Finding mode Edge FE Motors stopped at commanded 10 Stopped after homing independent position HM Decelerating or stopped by FWD 11 Stopped by Selective limit switches Abort Input Decelerating or stopped by Stop 51 Contour Stop Command ST Stopped by Abort command AB 100 Motors are running vector sequence Decelerating or stopped by Off 101 Motors stopped at on Error OE1 commanded vector ARGUMENTS SC xxxx where 3 Decelerating or stopped by REV 50 Contour running limit switches x is X Y Z W or any combination to specify the axis or axes If no argument is specified then all axes will be given USAGE DEFAULTS While Moving Yes Def
18. TC command returns a number between 1 and 255 This number is a code that reflects why a command was not accepted by the controller This command is useful when the controller halts execution of a program at a command or when the response to a command is a question mark Entering the TC command will provide the user with a code as to the reason After TC has been read it is set to zero TC 1 returns the text message as well as the numeric code ARGUMENTS TC n where n 0 Returns code only n 1 Returns code and message n Returns the error code No argument will provide the error code for all axes command response i e _GNX Empty program line or undefined label Mismatched parentheses IP incorrect sign during position move or IP given during forced deceleration ED BN and DL not valid while IN only valid in task 0 program running Command not valid when contouring Record mode already running Application strand already executing No array or source specified Begin not valid with motor off Undefined Array Too many arrays or variables 6 oS eo ee ieee ee Download error line too long or too many lines can o DMC 18X2 Command Reference TC 145 146 TC Begin not valid while running Begin not possible due to Limit Switch Begin not valid because no sequence defined Variable not given in IN command S operand not valid Not valid during coordinated move Sequence segment too short Total move distance i
19. contains the value of the motor type for the specified axis RELATED COMMANDS CE Binary 8C on page 42 Configure encoder type EXAMPLES MT 1 1 2 2 Configure x as servo y as reverse servo z and w as steppers MT Interrogate motor type V _MTX Assign motor type to variable DMC 18X2 Command Reference MT 111 NB FUNCTION Notch Bandwidth DESCRIPTION The NB command sets real part of the notch poles ARGUMENTS NB n n n n or NBX n where 1 nis ranges from 0 Hz to __ 16 Tm USAGE DEFAULTS While Moving Yes Default Value 0 5 In a Program Yes Default Format Command Line Yes RELATED COMMANDS NF on page 113 Notch Filter NZ on page 115 Notch Zeros EXAMPLES _NBX 10 Sets the real part of the notch pole to 10Hz 112 NB DMC 18X2 Command Reference NF FUNCTION Notch Frequency DESCRIPTION The NF command sets the frequency of the notch filter which is placed in series with the PID compensation ARGUMENTS NF n n n n or NFX n where 1 n ranges from 1 Hz to _ where TM is the update rate default TM is 1 msec 4 TM n Returns the value of the Notch filter for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes OPERAND USAGE _NFx contains the value of notch filter for the specified axis RELATED COMMANDS NB on page 112 Notch bandwidth NZ on page 115 Notch Zero EXAMPLES NF 20 Sets the notch frequency of Y axis to 2
20. controller EXAMPLES KD 100 Set damping term for X axis KP 10 Set proportional gain term for X axis KI 1 Set integral gain term for X axis AC 200000 Set acceleration DC 150000 Set deceleration rate SP 10000 Set speed MT 1 Set motor type for X axis to be type 1 reversed polarity servo motor MO Turn motor off BN Burn parameters may take up to 15 seconds 32 BN DMC 18X2 Command Reference BO Binary 9F FUNCTION Brushless Offset DESCRIPTION The BO command sets a fixed offset on command signal outputs for sinusoidally commutated motors This may be used to offset any bias in the amplifier or can be used for phase initialization ARGUMENTS BO n n n_ or BOX n where n is used to specify the voltage and is specified as a decimal value between 10 and 10 n Return the brushless offset for the specified axis USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BOx contains the offset voltage on the DAC for the specified axis EXAMPLES BO 2 1 Generates the voltages 2 and 1 on the first DAC X and the second DAC Z of a sinusoidally commutated motor RELATED COMMANDS BA on page 24 Brushless Axis BB Binary 9E on page 25 Brushless Phase Begins BC on page 26 Brushless Commutation BD Binary 9D on page 27 Brushless Degrees BI on page 29 Brushless Inputs BM Binary 9B on page Brushless Modulo 31 BS on page 35 Brushless Setup BZ
21. decimal USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes EXAMPLES Assume that 10 seconds after a move is over a relay must be closed A Program A PR 50000 Position relative move BGX Begin the move AMX After the move is over WT 10000 Wait 10 seconds SB 0 Turn on relay EN End Program Hint To achieve longer wait intervals just stack multiple WT commands 174 WT Binary D3 DMC 18X2 Command Reference XQ FUNCTION Execute Program DESCRIPTION The XQ command begins execution of a program residing in the program memory of the controller Execution will start at the label or line number specified Up to 8 programs may be executed with the controller ARGUMENTS XQ A n XQm n where A is a program name of up to seven characters m is a line number nis an integer representing the thread number for multitasking n is an integer in the range of 0 to 7 NOTE The arguments for the command XQ are optional If no arguments are given the first program in memory will be executed as thread 0 USAGE DEFAULTS While Moving Yes Default Value of n 0 In a Program Yes Default Format Command Line Yes OPERAND USAGE _XQn contains the current line number of execution for thread n and 1 if thread n is not running RELATED COMMANDS HX on page 81 Halt execution EXAMPLES XQ Apple 0 Start execution at label Apple thread zero XQ data 2 Start execution at label data thread t
22. end the input interrupt ININT subroutine 64 EN DMC 18X2 Command Reference ENDIF FUNCTION End of IF conditional statement DESCRIPTION The ENDIF command is used to designate the end of an IF conditional statement An IF conditional statement is formed by the combination of an IF and ENDIF command An ENDIF command must always be executed for every IF command that has been executed It is recommended that the user not include jump commands inside IF conditional statements since this causes re direction of command execution In this case the command interpreter may not execute an ENDIF command ARGUMENTS ENDIF USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line No RELATED COMMANDS IF on page 83 Command to begin IF conditional statement ELSE on page 62 Optional command to be used only after IF command EXAMPLES IF IN 1 0 IF conditional statement based on input 1 MG INPUT 1 IS ACTIVE Message to be executed if IF conditional is false ENDIF End of conditional statement Note Instead of EN use the RE command to end the error subroutine and limit subroutine Use the RI command to end the input interrupt ININT subroutine DMC 18X2 Command Reference ENDIF 65 EO FUNCTION Echo DESCRIPTION The EO command turns the echo on or off If the echo is off characters input over the bus will not be echoed back ARGUMENTS EO n where n 0 0 turns echo off n 1 1
23. following commands until the current move on the specified axis or axes is completed Any combination of axes or a motion sequence may be specified with the AM command For example AM XY waits for motion on both the X and Y axis to be complete AM with no parameter specifies that motion on all axes is complete ARGUMENTS AM xxxx where x is X Y Z W S or T or any combination to specify the axis or sequence No argument specifies to wait for after motion on all axes and or sequences USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes RELATED COMMANDS BG on page 28 _BGx contains a 0 if motion complete EXAMPLES MOVE Program MOVE PR 5000 5000 5000 5000 Position relative moves BGX Start the X axis AM X After the move is complete on X BGY Start the Y axis AMY After the move is complete on Y BGZ Start the Z axis AMZ After the move is complete on Z BG W Start the W axis AM W After the move is complete on W EN End of Program Hint AM is a very important command for controlling the timing between multiple move sequences For example if the X axis is in the middle of a position relative move PR you cannot make a position absolute move PAX BGX until the first move is complete Use AMX to halt the program sequences until the first motion is complete AM tests for profile completion The actual motor may still be moving Another method for testing motion complete is to check
24. input is active The term active refers to the condition when at least 1ma of current is flowing through the input circuitry The input circuitry can be configured to sink or source current to become active See Chapter 3 in the DMC 1802 User Manual for further details EXAMPLES MG_LRX Display the status of the X axis reverse limit switch Note This is an Operand Not a command 102 LR DMC 18X2 Command Reference LS FUNCTION List Program DESCRIPTION The LS command returns a listing of the programs in memory The listing will start with the line pointed to by the first parameter which can be either a line number or a label If no parameter is specified it will start with line 0 The listing will end with the line pointed to by the second parameter again either a line number or label If no parameter is specified the listing will go to the last line of the program ARGUMENTS LS n m where n and mare valid numbers from 0 to 999 or labels n is the first line to be listed m is the last USAGE DEFAULTS While Moving Yes Default Value 0 Last Line In a Program No Default Format Command Line Yes RELATED COMMANDS LA on page 95 List Arrays LL on page 100 List Labels LV on page 104 List Variables EXAMPLES LS A 6 List program starting at A through line 6 002 A 003 PR 500 004 BGX 005 AM 006 WT 200 Hint Remember to quit the Edit Mode lt cntrl gt Q prior to giving the LS command DMC 18X2 Comman
25. on page 24 Brushless Axis BB Binary 9E on page 25 Brushless Phase Begins BC on page 26 Brushless Commutation BD Binary 9D on page 27 Brushless Degrees BI on page 29 Brushless Inputs BM Binary 9B on page 31 Brushless Modulo BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup 38 BZ DMC 18X2 Command Reference CA FUNCTION Coordinate Axes DESCRIPTION The CA command specifies the coordinate system to apply proceeding vector commands The following commands apply to the current coordinate system as set by the CA command ARGUMENTS CAS CAT where CAS specifies that proceeding vector commands shall apply to the S coordinate system CAT specifies that proceeding vector commands shall apply to the T coordinate system CA returns a 0 if the S coordinate system is active and a if the T coordinate system is active OPERAND USAGE _CA contains a 0 if the S coordinate system is active and a if the T coordinate system is active USAGE While Moving In a Program Command Line RELATED COMMANDS VP on page 168 VS on page 171 VD on page 163 VA on page 162 VM on page 166 VE on page 164 BG on page 28 EXAMPLES CAT VMXY VS 10000 CR 1000 0 360 VE BGT DMC 18X2 Command Reference DEFAULTS Yes Yes Yes Vector Position Vector Speed Vector Deceleration Vector Acceleration Vector Mode End Vector BGS Begin Sequence Default Value CAS
26. only AC n n n n Specify x y z w Where n is replaced by actual values Direct Command Arguments An alternative method for specifying data is to set data for individual axes using an axis designator followed by an equals sign The symbol can be used in place of the axis designator The defines data for all axes to be the same For example PRY 1000 Sets Y axis data to 1000 PR 1000 Sets all axes to 1000 Interrogation Most commands accept a question mark as an argument This argument causes the controller to return parameter information listed in the command description Type the command followed by a for each axis requested The syntax format is the same as the parameter arguments described above except replaces the values PR The controller will return the PR value for the X axis PR The controller will return the PR value for the X Y and Z axes PR The controller will return the PR value for the W axis 2 Overview DMC 18x2 Command Reference Operand Usage Most commands have a corresponding operand that can be used for interrogation The Operand Usage description provides proper syntax and the value returned by the operand Operands must be used inside of valid DMC expressions For example to display the value of an operand the user could use the command MG operand All of the command operands begin with the underscore character _ For example the value of the current position on the X axis
27. or axes USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _RLx contains the latched position of the specified axis RELATED COMMAND AL Binary EE on page 17 Arm Latch EXAMPLES JG 5000 Set up to jog the Y axis BGY Begin jog ALY Arm the Y latch assume that after about 2 seconds input goes low RLY Report the latch 10000 134 RL Binary DD DMC 18X2 Command Reference RP Binary D8 FUNCTION Reference Position DESCRIPTION This command returns the commanded reference position of the motor s ARGUMENTS RP xxxx where x is X Y Z W or any combination to specify the axis or axes USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _RPx contains the commanded reference position for the specified axis RELATED COMMAND TP on page 154 Tell Position Note The relationship between RP TP and TE TEX equals the difference between the reference position RPX and the actual position TPX EXAMPLES Assume that X Y Z and W axes are commanded to be at the positions 200 10 0 110 respectively The returned units are in quadrature counts PF 7 Position format of 7 0 RP 0000200 0000010 0000000 00001 10 Return X Y Z W reference positions RPX 0000200 Return the X motor reference position RPY 0000010 Return the Y motor reference position PF 6 0 Chan
28. page 171 Vector Speed VA on page 162 Vector Acceleration VD on page 163 Vector Deceleration PF on page 122 Position Formatting EXAMPLES CAS Specify S coordinated motion system LM ZW Specify linear interpolation mode for Z and W axes LI 100 200 Specify linear distance LE End linear move BGS Begin motion 96 LE Binary B5 DMC 18X2 Command Reference _LF FUNCTION Forward Limit Switch Operand Keyword DESCRIPTION The _LF operand contains the state of the forward limit switch for the specified axis The operand is specified as _LFx where x is the specified axis Note This operand is affected by the configuration of the limit switches set by the command CN For CN 1 _LFx when the limit switch input is inactive _LFx 0 when the limit switch input is active For CN 1 _LFx 0 when the limit switch input is inactive _LFx 1 when the limit switch input is active The term active refers to the condition when at least 1ma of current is flowing through the input circuitry The input circuitry can be configured to sink or source current to become active See Chapter 3 in the DMC 1802 User Manual for further details EXAMPLES MG _LFX Display the status of the X axis forward limit switch This is an Operand Not a command DMC 18X2 Command Reference _LF 97 LI Binary B1 FUNCTION Linear Interpolation Distance DESCRIPTION The LI x y z w command specifies the incremental distance of travel f
29. passing 25000 counts of relative distance on X axis MG Passed _X TPX Send message on X axis JP B Jump to Label B EN End Program Hint AR is used to specify incremental distance from last AR or AD command Use AR if multiple position trippoints are needed in a single motion sequence 20 AR Binary CF DMC 18X2 Command Reference AS Binary DO FUNCTION At Speed DESCRIPTION The AS command is a trippoint that occurs when the generated motion profile has reached the specified speed This command will hold up execution of the following command until the commanded speed has been reached The AS command will operate after either accelerating or decelerating If the speed is not reached the trippoint will be triggered after the motion is stopped after deceleration ARGUMENTS AS xxxx where x is X Y Z W S or T or any combination to specify the axis or sequence USAGE While Moving In a Program Command Line EXAMPLES SPEED PR 100000 SP 10000 BGX ASX MG At Sp eed EN WARNING DEFAULTS Yes Default Value Yes Default Format Yes Program A Specify position Specify speed Begin X After speed is reached Print Message End of Program The AS command applies to a trapezoidal velocity profile only with linear acceleration AS used with Smoothing profiling will be inaccurate DMC 18X2 Command Reference AS Binary DO 21 AT Binary D2 FUNCTION At Time DESCRIPTION The AT command is a tr
30. segment The LI command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS LI n n n n lt o gt p or LIX n where n is a signed integers in the range 8 388 607 to 8 388 607 and represent incremental move distance o specifies a vector speed to be taken into effect at the execution of the linear segment sis an unsigned even integer between 0 and 12 000 000 for servo motor operation and between 0 and 3 000 000 for stepper motors p specifies a vector speed to be achieved at the end of the linear segment o is an unsigned even integer between 0 and 8 000 000 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes 98 LI Binary B1 DMC 18X2 Command Reference LI cont RELATED COMMANDS LE on page 96 BG on page 28 LM on page 101 CS on page 46 VS on page 171 VA on page 162 VD on page 163 EXAMPLES LM XYZ LI 1000 2000 3000 LE BGS DMC 18X2 Command Reference Linear end BGS Begin sequence Linear Interpolation Mode Clear Sequence Vector Speed Vector Acceleration Vector Deceleration Specify linear interpolation mode Specify distance Last segment Begin sequence LI Binary B1 99 100 LL LL FUNCTION List Labels DESCRIPTION The LL command returns a listing of all of the program labels in memory The listing will be in alphabetical order ARGUMENTS None
31. the electronic cam mode Any axis may be chosen ARGUMENTS EA x where x is one of the axis specified as X Y Z W USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS EB Binary C4 on page 56 Enable ECAM EC Binary C6 on page 57 Set ECAM table index EG Binary C3 on page 59 Engage ECAM EM Binary C1 on page 63 Specify ECAM cycle EP Binary C2 on page 67 Specify ECAM table intervals amp staring point EQ Binary C5 on page 68 Disengage ECAM ET Binary CO on page 71 ECAM table EXAMPLES EAY Select Y as a master for ECAM DMC 18X2 Command Reference EA 55 EB Binary C4 FUNCTION Enable ECAM DESCRIPTION The EB function enables or disables the cam mode In this mode the starting position of the master axis is specified within the cycle When the EB command is given the master axis is modularized ARGUMENTS EB n where n 1 Starts ECAM mode n 0 Stops ECAM mode n Returns 0 if ECAM is disabled and a 1 if enabled USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _EB contains the state of Ecam mode 0 disabled 1 enabled RELATED COMMANDS EA on page 55 Choose ECAM master EC Binary C6 on page 57 Set ECAM table index EG Binary C3 on page 59 Engage ECAM EM Binary C1 on page 63 Specify ECAM cycle EP Binary C2 on page 67 Specify ECA
32. where x is X Y Z W or any combination to specify the axis or axes No argument will provide the torque for all axes USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 1 4 Command Line Yes OPERAND USAGE _TTx contains the value of the torque for the specified axis RELATED COMMANDS TL on page 151 Torque Limit EXAMPLES Vl _TTX Assigns value of TTX to variable V1 TTX Report torque on X 0 2843 Torque is 2843 volts DMC 18X2 Command Reference TT Binary DE 157 TV Binary DC FUNCTION Tell Velocity DESCRIPTION The TV command returns the actual velocity of the axes in units of quadrature count s The value returned includes the sign ARGUMENTS TV xxxx where x is X Y Z W or any combination to specify the axis or axes No argument will provide the dual encoder position for all axes USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 7 0 Command Line Yes OPERAND USAGE _TVx contains the value of the velocity for the specified axis EXAMPLES VELX _TVX Assigns value of X axis velocity to the variable VELX TVX Returns the Y axis velocity 0003420 Note The TV command is computed using a special averaging filter over approximately 25 sec Therefore TV will return average velocity not instantaneous velocity 158 TV Binary DC DMC 18X2 Command Reference TW Binary CA FUNCTION Timeout for IN Position MC DESCRIPTION The TW x y z w co
33. 0 Hz DMC 18X2 Command Reference NFe 113 114 NO DMC 18X2 Command Reference NO FUNCTION No Operation DESCRIPTION The NO command performs no action in a sequence but can be used as a comment in a program This helps to document a program ARGUMENTS NO m where m is any group of letters and numbers up to 77 characters can follow the NO command USAGE While Moving In a Program Command Line EXAMPLES A NO NO This Program NO Does Absolutely NO Nothing EN DEFAULTS Yes Default Value Yes Default Format Yes Program A No Operation No Operation No Operation No Operation End of Program NZ FUNCTION Notch Zero DESCRIPTION The NZ command sets the imaginary part of the notch poles ARGUMENTS NZ n n n n or NZX n where 1 nis ranges from 1 Hz to 16 TM n Returns the value of the Notch filter zero for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 5 In a Program Yes Default Format Command Line Yes OPERAND USAGE _NZx contains the value of the Notch filter zero for the specified axis RELATED COMMANDS NB on page 112 Notch Bandwidth NF on page 113 Notch Filter EXAMPLES NZX 10 Sets the imaginary part of the notch pole to 10 Hz DMC 18X2 Command Reference NZ 115 OB Binary E9 FUNCTION Output Bit DESCRIPTION The OB n logical expression command defines output bit n through 8 as either 0 or 1 depending on the result from the logical expressi
34. 03 E8 represents 1000 FE OC represents 500 Example The command ST XYZS would be A1 00 01 07 where AJ is the command number for ST 00 specifies 0 data fields 01 specifies stop the coordinated axes S 07 specifies stop X bit 0 Y bit 1 and Z bit 2 2 2 2 7 Binary command table ee ee reserved da PRP a O TP PTE PTD PTV e OOO R ss ae ____ Ts DE Ooo e O reserved reserved oo o Jae E tina KD 83 reserved we fat eo da d ea fje w _ a ea j os reserved je o reserved fea boa m m Js w o je aS as fae ses E Se DMC 18x2 Command Reference Overview 5 reserved O reserved 96 os 9 a reserved f 9a poe o a a2 3 a pas 6 a s ao faa al a2 a3 a4 a5 a7 FV GR DE OF GM BG ST AB HM FE FI PA JG MO SH Fast Firmware Operation 6 Overview The motion controllers can operate in a mode which allows for very fast servo update rates This mode is known as fast mo de and allows the following update rates DMC 1812 125 usec DMC 1822 125 usec DMC 1832 250 usec DMC 1842 250 usec Note To set the desired update rates use the command TM In order to run the motion controller in fast mode the fast firmware must be uploaded This can be done through the Galil terminal software such as DMCTERM and WSDK Use the menu option Update Flash EEP
35. 2147483648 to 2147483647 decimal n Returns the current incremental distance for the specified axis USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _PRx contains the current incremental distance for the specified axis RELATED COMMANDS PA Binary A6 on page 121 Position Absolute BG on page 28 Begin AC on page 14 Acceleration DC on page 49 Deceleration SP Binary 92 on page 142 Speed IP on page 86 Increment Position PF on page 122 Position Formatting EXAMPLES PR 100 200 300 400 On the next move the X axis will go 100 counts BG the Y axis will go to 200 counts forward Z axis will go 300 counts and the W axis will go 400 counts PR Return relative distances 0000000 100 0000000200 0000000300 PR 500 Set the relative distance for the X axis to 500 BG The X axis will go 500 counts on the next move while the Y axis will go its previously set relative distance 124 PR Binary A7 DMC 18X2 Command Reference QD FUNCTION Download Array DESCRIPTION The QD command transfers array data from the host computer to the controller QD array start end requires that the array name be specified along with the first element of the array and last element of the array The array elements can be separated by a comma or by lt CR gt lt LF gt The downloaded array is terminated by a lt control gt Z lt control gt Q lt co
36. 25 Brushless Phase Begins BD Binary 9D on page 27 Brushless Degrees BI on page 29 Brushless Inputs BM Binary 9B on page 31 Brushless Modulo BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup BZ on page 38 Brushless Zero DMC 18X2 Command Reference BD Binary 9D FUNCTION Brushless Degrees DESCRIPTION This command sets the commutation phase of a sinusoidally commutated motor When using hall effect sensors a more accurate value for this parameter can be set by using the command BC This command should not be used except when the user is creating a specialized phase initialization procedure ARGUMENTS BD n n n n or BDX n where n is an integer between 0 360 n Returns the current brushless motor angle between 0 360 USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BDx contains the commutation phase of the specified axis RELATED COMMANDS BA on page 24 Brushless Axis BB Binary 9E on page 25 Brushless Phase Begins BC on page 26 Brushless Commutation BI on page 29 Brushless Inputs BM Binary 9B on page 31 Brushless Modulo BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup BZ on page 38 Brushless Zero DMC 18X2 Command Reference BD Binary 9D 27 BG Binary AO FUNCTION Begin DESCRIPTION The BG command starts a motion on the specified axis or sequence ARGU
37. 4 LIMSWI 132 Linear Interpolation 96 98 101 168 Clear Sequence 46 Logical Operator 89 Master Reset 3 137 138 150 Math Function Absolute Value 63 Logical Operator 89 MCTIME 106 159 Memory 32 48 103 Array 48 52 105 116 125 165 Download 51 125 Upload 161 Message 85 Motion Complete MCTIME 106 159 Motion Smoothing S Curve 21 Motor Command 118 151 Moving Acceleration 14 21 24 26 27 29 31 35 72 86 152 162 64 Circular 130 166 DMC 18X2 Command Reference Multitasking 81 175 Execute Program 175 Halt 16 18 81 143 N Non volatile memory Burn 32 O OE Off On Error 13 118 Off On Error 13 118 Operand Internal Variable 18 Optoisolation Home Input 73 Output Motor Command 118 151 Output of Data Clear Bit 40 Set Bit 40 139 P Plug and Play 60 POSERR 69 118 132 Position Error 15 92 118 135 Position Capture 17 Latch 17 44 134 Teach 129 Position Error 15 92 118 135 POSERR 69 118 132 Position Limit 75 Program Flow 59 68 Interrupt 32 60 64 65 82 83 85 129 132 144 160 176 Stack 82 132 174 176 Programmable EEPROM 32 137 Programming Halt 16 18 81 143 Protection Error Limit 69 156 Torque Limit 151 Q Quadrature 15 19 20 23 30 39 41 45 53 69 86 107 110 121 124 135 154 158 168 Quit Abort 13 Stop Motion 143 145 147 148 154 156 157 158 DMC 18X2 Command Reference R Record 129 Latch 17 44 134 Positio
38. Absolute Value 63 Acceleration 14 21 24 26 27 29 31 35 72 86 152 162 64 Address 130 160 Arm Latch 17 Array 48 52 105 116 125 165 Automatic Subroutine LIMSWI 132 MCTIME 106 159 POSERR 69 118 132 Auxiliary Encoder 42 77 Binary 1 4 5 Burn 32 EEPROM 32 137 Variables 37 C Capture Data Record 129 Circle 39 45 70 Circular Interpolation 130 166 Clear Bit 40 Clear Sequence 46 Clock 150 152 Update Rate 150 Code 1 17 42 50 69 73 77 80 85 106 107 110 140 159 Command DMC 18X2 Command Reference Syntax Error Not a valid bookmark in entry on page 2 Commanded Position 77 Communication 47 Conditional jump 16 89 Configuration Jumper 137 Contour Mode 41 43 46 54 173 Control Filter Gain 92 Integrator 84 Coordinated Motion 77 153 162 63 166 169 171 Circular 130 166 Contour Mode 41 43 46 54 173 Ecam 55 59 62 63 67 71 Electronic Cam 55 68 71 Electronic Gearing 77 79 Gearing 77 79 Linear Interpolation 96 98 101 168 Vector Mode 70 168 Cycle Time Clock 150 152 D Data Capture 129 Data Output Set Bit 40 139 Debugging 155 Deceleration 13 21 49 72 87 172 Default Setting 137 Master Reset 3 137 138 150 Digital Output Clear Bit 40 Dip Switch Address 130 160 DMA 126 128 152 Download 51 125 E Ecam 55 59 62 63 67 71 Electronic Cam 55 68 71 Echo 66 144 Edit Mode 58 103 175 EEPROM 32 137 Electronic Cam 55 68 71 Electronic Geari
39. DESCRIPTION The PL command adds a low pass filter in series with the PID compensation The digital transfer function of the filter is 1 P Z P and the equivalent continuous filter is A S A where A is the filter cutoff frequency A 1 T In 1 p rad sec and T is the sample time ARGUMENTS PL n n n n or PLX n where n is a positive number in the range 0 to 0 9999 n Returns the value of the pole filter for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 0 In a Program Yes Default Format 3 0 Not in a Program Yes OPERAND USAGE _PLx contains the value of the pole filter for the specified axis RELATED COMMANDS KD Binary 83 on page 91 Derivative KP Binary 81 on page 93 Proportional KI Binary 82 on page 92 Integral Gain EXAMPLES PL 95 9 8 822 Set X axis Pole to 0 95 Y axis to 0 9 Z axis to 0 8 W axis pole to 0 822 PL Return all Poles 0 9527 0 8997 0 7994 0 8244 PL Return X Pole only 0 9527 PL Return Y Pole only 0 8997 DMC 18X2 Command Reference PL Binary 87 123 PR Binary A7 FUNCTION Position Relative DESCRIPTION The PR command sets the incremental distance and direction of the next move The move is referenced with respect to the current position If a is used then the current incremental distance is returned even if it was set by a PA command Units are in quadrature counts ARGUMENTS PR n n n n or PRX n where nis a signed integer in the range
40. Default Format Specify T coordinate system Specify vector motion in the X and Y plane Specify vector speed Generate circle with radius of 1000 counts start at 0 degrees and complete one circle in counterclockwise direction End Sequence Start motion of T coordinate system CA 39 CB Binary EB FUNCTION Clear Bit DESCRIPTION The CB command sets the specified output bit low CB can be used to clear the outputs of extended I O which have been configured as outputs ARGUMENTS CB n where n is an integer corresponding to the output bit to be cleared The first output bit is specified as l USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS SB Binary EA on page 139 Set Bit OP Binary E8 on page 120 Define output port byte wise EXAMPLES CB 7 Clear output bit 7 40 CB Binary EB DMC 18X2 Command Reference CD Binary BE FUNCTION Contour Data DESCRIPTION The CD command specifies the incremental position on X Y Z and W axes The units of the command are in quadrature counts This command is used only in the Contour Mode CM ARGUMENTS CD n n n n or CDX n where n is an integer in the range of 32762 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS CM on page 43 Contour Mode WC on page 173 Wait for Contour DT on page 54 Time Increment
41. FL command sets the forward software position limit If this limit is exceeded during motion motion on that axis will decelerate to a stop Forward motion beyond this limit is not permitted The forward limit is activated at X 1 Y 1 Z 1 W 1 The forward limit is disabled at 2147483647 The units are in counts When the software limit is activated the automatic subroutine LIMSWI will be executed if it is included in the program and a program is executing See User s Manual Automatic Subroutine ARGUMENTS FL n n n n or FLX n where nis a signed integers in the range 2147483648 to 2147483647 n 2147483647 turns off the forward limit n Returns the value of the forward limit switch for the specified axis USAGE DEFAULTS While Moving Yes Default Value 2147483647 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _FLx contains the value of the forward software limit for the specified axis DMC 18X2 Command Reference RELATED COMMANDS BL on page 30 Reverse Limit PF on page 122 Position Formatting EXAMPLES FL 150000 Set forward limit to 150000 counts on the X axis TEST Test Program AC 1000000 Acceleration Rate DC 1000000 Deceleration Rate FL 15000 Forward Limit JG 5000 Jog Forward BGX Begin AMX After Limit TPX Tell Position EN End Hint Galil controllers also provide hardware limits FL Binary 8E 75 FV Binary 95 FUNCTION Velocity Feedforward DESCRIPTION The FV command sets
42. Find Home Sensor only and FI Find Index only commands The speed used in the second stage of homing cannot be altered by the user 80 HM Binary A3 DMC 18X2 Command Reference HX FUNCTION Halt Execution DESCRIPTION The HX command halts the execution of any of the four programs that may be running independently in multitasking The parameter n specifies the program to be halted ARGUMENTS HXn n is an integer in the range of 0 to 7 which indicates the thread number USAGE While Moving In a Program Command Line OPERAND USAGE DEFAULTS Yes Default Value n 0 Yes Default Format Yes When used as an operand HXn contains the running status of thread n with 0 Thread not running 1 Thread is running 2 Thread has stopped at trippoint RELATED COMMANDS XQ on page 175 EXAMPLES XQ A XQ B 3 HX0 HX3 DMC 18X2 Command Reference Execute program Execute program A thread zero Execute program B thread three Halt thread zero Halt thread three HX 81 II Binary EC FUNCTION Input Interrupt DESCRIPTION The II command enables the interrupt function for the specified inputs By default input interrupts are configured for activation with a logic 0 but can be configured for activation with a logic 1 signal If any of the specified inputs are activated during program execution the program will jump to the subroutine with label ININT Any trippoints set by the program w
43. Format 4 2 Command Line Yes OPERAND USAGE _KPx contains the value of the proportional constant for the specified axis RELATED COMMANDS KI Binary 82 on page 92 Integrator IL on page 84 Integrator Limit DMC 18X2 Command Reference KP Binary 81 93 KS Binary 86 FUNCTION Step Motor Smoothing DESCRIPTION run The KS parameter sets the amount of smoothing of stepper motor pulses This is most useful when operating in full or half step mode Larger values of KS provide greater smoothness This parameter will also increase the motion time by 3KS sampling periods KS adds a single pole low pass filter onto the output of the motion profiler Note KS will cause a delay in the generation of output steps ARGUMENTS KS n n n n or KSX n where nis a positive number in the range between 5 and 16 with a resolution of 1 32 n Returns the value of the derivative constant for the specified axis USAGE DEFAULTS While Moving Yes Default Value 1 313 In a Program Yes Default Format 4 0 Command Line Yes OPERAND USAGE _KSx contains the value of the derivative constant for the specified axis RELATED COMMANDS MT on page 111 Motor Type EXAMPLES KS 2 4 8 Specify x y z axes KS5 Specify x axis only KS 15 Specify z axis only Hint KS is valid for step motors only 94 KS Binary 86 DMC 18X2 Command Reference LA FUNCTION List Arrays DESCRIPTION The LA command returns a list of all arrays in memory The
44. Gear Ratios for the geared axes in the electronic gearing mode The master axis is defined by the GAX or GAY or GAZ or GAW command The gear ratio may be different for each geared axis and range between 127 9999 The slave axis will be geared to the actual position of the master The master can go in both directions GR 0 0 0 0 disables gearing for each axis A limit switch also disables the gearing unless gantry mode has been enabled see GM command ARGUMENTS GR n n n n or GRX n where nis a signed numbers in the range 127 with a fractional resolution of 0001 n 0 Disables gearing n Returns the value of the gear ratio for the specified axis USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _GRx contains the value of the gear ratio for the specified axis RELATED COMMANDS GA on page 77 Master Axis GM on page 78 Gantry Mode EXAMPLES GEAR MOY Turn off servo to Y motor GAY Specify master axis as Y GR 25 5 Specify X and Z gear ratios EN End program Now when the Y motor is rotated by hand the X will rotate at 1 4th the speed and Z will rotate 5 times the speed in the opposite direction Hint when the geared motors must be coupled strongly to the master use the gantry mode GM DMC 18X2 Command Reference GR Binary 96 79 HM Binary A3 FUNCTION Home DESCRIPTION The HM command performs a three stage homing sequence for servo systems
45. H Binary AA on page 141 Servo Here EXAMPLES MO Turn off all motors MOX Turn off the X motor Leave the other motors unchanged MOY Turn off the Y motor Leave the other motors unchanged MOZX Turn off the Z and X motors Leave the other motors unchanged SH Turn all motors on Bob _MOX Sets Bob equal to the X axis servo status Bob Return value of Bob If 1 motor is off If 0 motor is servoed Hint The MO command is useful for positioning the motors by hand Turn them back on with the SH command DMC 18X2 Command Reference MO Binary A9 109 MR Binary CC FUNCTION Reverse Motion to Position DESCRIPTION The MR command is a trippoint used to control the timing of events This command will hold up the execution of the following command until the specified motor moves backward and crosses the position specified The units of the command are in quadrature counts Only one axis may be specified at a time The MR command can also be used when the encoder is the master and not under servo control ARGUMENTS MR n n n n or MRX n where nis a signed integers in the range 2147483648 to 2147483647 decimal USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS AD on page 15 Trippoint for Relative Distances AP Binary CE on page 19 Trippoint for after Absolute Position EXAMPLES TEST Program B DPO Define zero JG 1000 Jog mode speed of 1000 counts sec BGX Begin mov
46. M table intervals amp staring point EQ Binary C5 on page 68 Disengage ECAM ET Binary CO on page 71 ECAM table EXAMPLES EB1 Starts ECAM mode EBO Stops ECAM mode B _EB Return status of cam mode 56 EB Binary C4 DMC 18X2 Command Reference EC Binary C6 FUNCTION ECAM Counter DESCRIPTION The EC function sets the index into the ECAM table This command is only useful when entering ECAM table values without index values and is most useful when sending commands in binary See the command ET ARGUMENTS EC n where n is an integer between 0 and 256 n Returns the current value of the index into the ECAM table USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _EC contains the current value of the index into the ECAM table RELATED COMMANDS EA on page 55 Choose ECAM master EB Binary C4 on page 56 Enable ECAM EG Binary C3 on page 59 Engage ECAM EM Binary C1 on page 63 Specify ECAM cycle EP Binary C2 on page 67 Specify ECAM table intervals amp staring point EQ Binary C5 on page 68 Disengage ECAM ET Binary CO on page 71 ECAM table EXAMPLES ECO Set ECAM index to 0 ET 200 400 Set first ECAM table entries to 200 400 ET 400 800 Set second ECAM table entries to 400 800 DMC 18X2 Command Reference EC Binary C6 57 ED FUNCTION Edit DESCRIPTION Using Galil DOS Terminal Software The ED command puts the
47. MENTS BG xxxx where x is X Y Z W S or T or any combination to specify the axis or sequence USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes OPERAND USAGE _BGx contains a 0 if motion complete on the specified axis or coordinate system otherwise contains a 1 RELATED COMMANDS AM Binary C8 on page 18 ST Binary A1 on page 143 After motion complete Stop motion YSTATE _BGY VMXY VP 1000 2000 VS 20000 BGS VP 4000 1000 VE PR 8000 5000 BGSZW MG _BGS EXAMPLES PR 2000 3000 5000 Set up for a relative move BG XYW Start the X Y and W motors moving HM Set up for the homing BGX Start only the X axis moving JG 1000 4000 Set up for jog BGY Start only the Y axis moving Assign a 1 to YSTATE if the Y axis is performing a move Vector Mode Specify vector position Specify vector velocity Begin coordinated sequenOce Specify vector position Vector End Specify Z and W position Begin sequence and Z W motion Displays a 1 if motion occurring on coordinated system S Hint You cannot give another BG command until current BG motion has been completed Use the AM trippoint to wait for motion complete between moves Another method for checking motion complete is to test for _BG being equal to 0 28 BG Binary AO DMC 18X2 Command Reference BI FUNCTION Brushless Inputs DESCRIPTION The command BI indicates the starting number for the inp
48. ROM to change the controller firmware The fast firmware is included with the controller utilities When operating in fast mode there are functions which are disabled and or altered Commands which are not Allowed when Operating in Fast Mode Gearing Mode Pole PL Stepper Motor Operation MT 2 2 2 5 2 5 Trippoints allowed only in thread 0 Tell Velocity Interrogation Command TV DMC 18x2 Command Reference Commands which are Altered when Operating in Fast Mode Command Modification MT Command argument 2 2 5 2 2 5 not valid AD AI AM AP AR AS AT AV MC Commands not allowed in threads 1 7 MF MR WC Trippoints The DMC 18x2 series controllers provide several commands that can be used to make logical decisions or trippoints based on events during a running program Such events include the completion of a specific motion waiting for a certain position to be reached or simply waiting for a certain amount of time to elapse When a program is executing on the controller each program line is executed sequentially However when a trippoint command is executed the program halts execution of the next line of code until the status of the trippoint is cleared Note that the trippoint only halts execution of the thread from which it is commanded while all other independent threads are unaffected Additionally if the trippoint is commanded from a subroutine execution of the subroutine as well as the ma
49. Reference BV 37 BZ FUNCTION Brushless Zero DESCRIPTION The BZ command is used for axes which are configured for sinusoidal commutation This command drives the motor to zero magnetic phase and then sets the commutation phase to zero This command may be given when the motor is off ARGUMENTS BZ n n n or BZX n where n is areal numbers between 9 998 and 9 998 The parameter n will set the voltage to be applied to the amplifier during the initialization In order to be accurate the BZ command must be large enough to move the motor When the argument is positive when the command completes the motor will be left in the off state MO A negative value causes the motor to end up in the on state SH Note The BZ command causes instantaneous movement of the motor It is recommended to start with small voltages and increase as needed Note Always use the Off On Error function OE command to avoid motor runaway whenever testing sinusoidal commutation USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BZx contains the distance in encoder counts from the motor s current position and the position of commutation zero for the specified axis This can useful to command a motor to move to the commutation zero position for phase initialization EXAMPLES BZ 3 Drive the Z axis to zero phase position with 3 volts signal and end up in SH state RELATED COMMANDS BA
50. The effective bias will be 0 75V for X and 2 25V for Y FA Return X and Y values 010 015 Note Ifthe feedforward coefficient is changed during a move then the change will not take effect until the next move 72 FA Binary 94 DMC 18X2 Command Reference FE Binary A4 FUNCTION Find Edge DESCRIPTION The FE command moves a motor until a transition is seen on the homing input for that axis The direction of motion depends on the initial state of the homing input use the CN command to configure the polarity of the home input Once the transition is detected the motor decelerates to a stop This command is useful for creating your own homing sequences ARGUMENTS FE xxxx where x is X Y Z or W or any combination to specify the axis or axes No argument specifies all axes USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS FI on page 74 Find Index HM on page 80 Home BG on page 28 Begin AC on page 14 Acceleration Rate DC on page 49 Deceleration Rate SP Binary 92 on page 142 Speed for search EXAMPLES FE Set find edge mode BG Begin all axes FEX Only find edge on X BGX FEY Only find edge on Y BGY FEZW Find edge on Z and W BGZW Hint Find Edge only searches for a change in state on the Home Input Use FI Find Index to search for the encoder index Use HM Home to search for both the Home input and the Index Remember to specify BG after e
51. USAGE While Moving In a Program Command Line RELATED COMMANDS LA on page 95 LS on page 103 LV on page 104 EXAMPLES LL FIVE FOUR ONE THREE TWO DEFAULTS List Arrays List Program List Variables Default Value Default Format DMC 18X2 Command Reference LM Binary B 0 FUNCTION Linear Interpolation Mode DESCRIPTION The LM XYZW command specifies the linear interpolation mode Any set of 1 2 3 or 4 axes may be used for linear interpolation LI x y z w commands are used to specify the travel distance for linear interpolation The LE command specifies the end of the linear interpolation sequence Several LI commands may be given as long as the controller sequence buffer has room for additional segments Once the LM command has been given it does not need to be given again unless the VM command has been used It should be noted that the controller computes the vector speed based on the axes specified in the LM mode For example LM XYZ designates linear ipterpglation for the X Y and Z axes The speed of these axes will be computed from VS XS YS ZS where XS YS and ZS are the speed of the X Y and Z axes The controller always uses the axis specifications from LM not LI to compute the speed The LM command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS LM xxxx where x is X Y Z W or any combination t
52. Vector Sequence Clear Sequence Vector smoothing constant S curve Trippoint for Vector distance Specify S coordinate system Specify coordinated mode for X Y Specify arc segment Specify linear segment End vector Begin sequence VMe 167 VP Binary B2 FUNCTION Vector Position DESCRIPTION The VP command defines the target coordinates of a straight line segment in a 2 axis motion sequence which have been selected by the VM command The units are in quadrature counts and are a function of the vector scale factor set using the command VS For three or four axis linear interpolation use the LI command The VP command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS VP n m lt o gt p where nand m are signed integers in the range 2147483648 to 2147483647 The length of each segment must be limited to 8 106 The values for n and m will specify a coordinate system from the beginning of the sequence o specifies a vector speed to be taken into effect at the execution of the vector segment n is an unsigned even integer between 0 and 12 000 000 for servo motor operation and between 0 and 3 000 000 for stepper motors p specifies a vector speed to be achieved at the end of the vector segment p is an unsigned even integer between 0 and 8 000 000 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Y
53. WC Binary D4 FUNCTION Wait for Contour Data DESCRIPTION The WC command acts as a flag in the Contour Mode After this command is executed the controller does not receive any new data until the internal contour data buffer is ready to accept new commands This command prevents the contour data from overwriting on itself in the contour data buffer USAGE While Moving In a Program Command Line RELATED COMMANDS CM on page 43 CD on page 41 DT on page 54 EXAMPLES CM XYZW DT 4 CD 200 350 150 500 WC CD 100 200 300 400 WC DT 0 CD 0 0 0 0 DMC 18X2 Command Reference DEFAULTS Yes Default Value 1 0 Yes Default Format 1 4 Yes Contour Mode Contour Data Contour Time Specify contour mode Specify time increment for contour Specify incremental position on X Y Z and W X axis moves 200 counts Y axis moves 300 counts Z axis moves 150 counts W axis moves 500 counts Wait for contour data to complete Wait for contour data to complete Stop contour Exit mode WC Binary D4 173 WT Binary D3 FUNCTION Wait DESCRIPTION The WT command is a trippoint used to time events After this command is executed the controller will wait for the number of samples specified before executing the next command If the TM command has not been used to change the sample rate from 1 msec then the units of the Wait command are milliseconds ARGUMENTS WT n where n is an integer in the range 0 to 2 Billion
54. X Begin motion WT 10000 Wait 10000 msec STX Stop Hint Using the command position as the master axis is useful for gantry applications Using the vector motion as master is useful in generating Helical motion DMC 18X2 Command Reference GA 77 GM FUNCTION Gantry mode DESCRIPTION The GM command specifies the axes in which the gearing function is performed in the Gantry mode In this mode the gearing will not stop by the ST command or by limit switches Only GRO will stop the gearing in this mode ARGUMENTS GM n n n n or GMX n where n 0 Disables gantry mode function n 1 Enables the gantry mode n Returns the state of gantry mode for the specified axis 0 gantry mode disabled 1 gantry mode enabled USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _GMx contains the state of gantry mode for the specified axis 0 gantry mode disabled 1 gantry mode enabled RELATED COMMANDS GR on page 79 Gear Ratio GA on page 77 Master Axis for Gearing EXAMPLES GM 1 1 1 1 Enable GM on all axes GM 0 Disable GM on X axis other axes remain unchanged GM 1 1 Enable GM on Z axis and W axis other axes remain unchanged GM 1 0 1 0 Enable GM on X and Z axis Disable GM on Y and W axis Hint The GM command is useful for driving heavy load on both sides Gantry Style 78 GM DMC 18X2 Command Reference GR Binary 96 FUNCTION Gear Ratio DESCRIPTION GR specifies the
55. a BG The command has three effects depending on the motion being executed The units of this are quadrature Case 1 Motor is standing still An IP x y z w command is equivalent to a PR x y z w and BG command The motor will move to the specified position at the requested slew speed and acceleration Case 2 Motor is moving towards specified position An IP x y z w command will cause the motor to move to a new position target which is the old target plus x y z w X y z w must be in the same direction as the existing motion Case 3 Motor is in the Jog Mode An IP x y z w command will cause the motor to instantly try to servo to a position x y z w from the present instantaneous position The SP and AC parameters have no effect This command is useful when synchronizing 2 axes in which one of the axis speed is indeterminate due to a variable diameter pulley Warning When the mode is in jog mode an IP will create an instantaneous position error In this mode the IP should only be used to make incremental position movements ARGUMENTS IP n n n n IPX n where nis a signed numbers in the range 2147483648 to 2147483647 decimal n Returns the current position of the specified axis USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 7 0 Command Line Yes RELATED COMMANDS PF on page 122 EXAMPLES IP 50 CORRECT AC 100000 JG 10000 BGX WT 1000 IP 10 STX 86 IP Position F
56. ach of these commands DMC 18X2 Command Reference FE Binary A4 73 FI Binary A5 FUNCTION Find Index DESCRIPTION The FI and BG commands mo ve the motor until an encoder index pulse is detected The controller looks for a transition from low to high When the transition is detected motion stops and the position is defined as zero To improve accuracy the speed during the search should be specified as 500 counts s or less The FI command is useful in custom homing sequences The direction of motion is specified by the sign of the JG command ARGUMENTS FI xxxx where x is X Y Z or W or any conbination to specify the axis or sequence No argument specifies all axes USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS FE on page 73 Find Edge HM on page 80 Home BG on page 28 Begin AC on page 14 Acceleration Rate DC on page 49 Deceleration Rate SP Binary 92 on page 142 Search Speed EXAMPLES HOME Home Routine JG 500 Set speed and forward direction FIX Find index BGX Begin motion AMX After motion MG FOUND INDEX Hint Find Index only searches for a change in state on the Index Use FE to search for the Home Use HM Home to search for both the Home input and the Index Remember to specify BG after each of these commands 74 Fl Binary A5 DMC 18X2 Command Reference FL Binary 8E FUNCTION Forward Software Limit DESCRIPTION The
57. actor of 1024 The units of the parameters are counts per second squared The acceleration rate may be changed during motion The DC command is used to specify the deceleration rate ARGUMENTS AC n n n n or ACX n where nis an unsigned numbers in the range in the range 1024 to 67107840 n Returns the acceleration value for the specified axes USAGE DEFAULTS While Moving Yes Default Value 25600 In a Program Yes Default Format 8 0 Command Line Yes OPERAND USAGE _ACx contains the value of acceleration for the specified axis RELATED COMMANDS DC on page 49 Specifies deceleration rate FA on page 72 Feedforward Acceleration IT on page 87 Smoothing constant S curve EXAMPLES AC 150000 200000 300000 400000 Set X axis acceleration to 150000 Y axis to 200000 counts sec2 the Z axis to 300000 counts sec2 and the W axis to 400000 count sec2 AC Request the Acceleration 0149504 0199680 0299008 0399360 Return Acceleration resolution 1024 V _ACY Assigns the Y acceleration to the variable V Hint Specify realistic acceleration rates based on your physical system such as motor torque rating loads and amplifier current rating Specifying an excessive acceleration will cause large following error during acceleration and the motor will not follow the commanded profile The acceleration feedforward command FA will help minimize the error 14 AC Binary 90 DMC 18X2 Command Reference AD Binary CD FUNCTION After Di
58. alt program execution ARGUMENTS ST xxxx where x is X Y Z W S or T or any combination to specify the axis or sequence No argument will stop motion on all axes and stop any programs which are executing USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS BG on page 28 Begin Motion AB Binary A2 on page 7 Abort Motion BC on page 49 Deceleration rate EXAMPLES STX Stop X axis motion STS Stop coordinated sequence on S coordinate system ST XYZW Stop X Y Z W motion ST Stop program and XYZW motion ST SZW Stop coordinated XY sequence and Z and W motion Hint Use the after motion complete command AM to wait for motion to be stopped DMC 18X2 Command Reference ST Binary A1 143 TB FUNCTION Tell Status Byte DESCRIPTION The TB command returns status information from the controller as a decimal number Each bit of the status byte denotes the following condition when the bit is set high ARGUMENTS Executing error or limit switch routine TB returns the status byte USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _TB Contains the status byte EXAMPLES TB on page 144 Tell status information from the controller 65 Executing program and Echo is on 2 2 64 1 65 144 TB DMC 18X2 Command Reference TC FUNCTION Tell Error Code DESCRIPTION The
59. and two stage sequence for stepper motor operation S For servo motor operation The first stage consists of the motor moving at the user programmed speed until detecting a transition on the homing input for that axis The direction for this first stage is determined by the initial state of the Homing Input Once the homing input changes state the motor decelerates to a stop The state of the homing input can be configured using the CN command The second stage consists of the motor changing directions and slowly approaching the transition again When the transition is detected the motor is stopped instantaneously The third stage consists of the motor slowly moving forward until it detects an index pulse from the encoder It stops at this point and defines it as position 0 run For stepper mode operation the sequence consists of the first two stages The frequency of the motion in stage 2 is 256 cts or steps sec USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _HMx contains the state of the home switch for the specified axis RELATED COMMANDS CN on page 44 Configure Home FI on page 74 Find Index Only FE on page 73 Find Home Only EXAMPLES HM Set Homing Mode for all axes BG Home all axes BGX Home only the X axis BGY Home only the Y axis BGZ Home only the Z axis BGW Home only the W axis Hint You can create your own custom homing sequence by using the FE
60. ata Type RC2 Begin recording and set 4 msec between records JG 1000 BG Begin motion A JP A _RC 1 Loop until done MG DONE Print message RECORDING EN End program DMC 18X2 Command Reference RD FUNCTION Record Data DESCRIPTION The RD command specifies the data type to be captured for the Record Array RA mode The command type includes pop ooo oss o O Tell torque Note the values recorded for torque are in the range of 32767 where 0 is 0 torque 32767 is 10 volt command output and 32767 is 10 volt where x is the axis specifier ARGUMENTS RD m m m3 my where the arguments are data types to be captured using the Record Array feature The order is important Each data type corresponds with the array specified in the RA command USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _RD contains the address for the next array element for recording RELATED COMMANDS RC on page 130 Record Interval DM on page 52 Dimension Array EXAMPLES DM ERRORX 50 ERRORY 50 Define array RA ERRORX ERRORY Specify record mode RD _TEX TEYS Specify data type RCI Begin record JG 1000 BGX Begin motion on X axis DMC 18X2 Command Reference RD 131 132 RE RE FUNCTION Return from Error Routine DESCRIPTION The RE command is used to end a position error handling subroutine or limit switch handling subroutine The error handling subrout
61. ault Value In a Program Yes Default Format 3 0 Command Line Yes OPERAND USAGE _SCx contains the value of the stop code for the specified axis EXAMPLES Tom _SCW Assign the Stop Code of W to variable Tom 140 SC Binary E1 DMC 18X2 Command Reference SH Binary AA FUNCTION Servo Here DESCRIPTION The SH commands tells the controller to use the current motor position as the command position and to enable servo control here This command can be useful when the position of a motor has been manually adjusted following a motor off MO command ARGUMENTS SH xxxx where x is X Y Z W or any combination to specify the axis or axes USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS MO Binary A9 on page 109 Motor off EXAMPLES SH Servo X Y Z W motors SHX Only servo the X motor the Y Z and W motors remain in its previous state SHY Servo the Y motor leave the X Z and W motors unchanged SHZ Servo the Z motor leave the X Y and W motors unchanged SHW Servo the W motor leave the X Y and Z motors unchanged Note The SH command changes the coordinate system Therefore all position commands given prior to SH must be repeated Otherwise the controller motion may be unexpected DMC 18X2 Command Reference SH Binary AA 141 SP Binary 92 FUNCTION Speed DESCRIPTION This command sets the slew speed of any or all axes for independen
62. axis The default value for the derivative constant is 64 If this parameter is not set by using the command KD the controller will automatically set this value to 64 for each axis If the Derivative Constant is changed but not saved in non volatile memory the default value of 64 will be used if the controller is reset or upon power up of the controller If this value is set and saved in non volatile memory it will be restored upon reset until a master reset is given to the controller The default format describes the format for numerical values which are returned when the command is interrogated The format value represents the number of digits before and after the decimal point DMC 18x2 Command Reference Overview 3 Binary Commands 4 Overview Some commands have an equivalent binary value for the controllers These values are listed next to the command in parentheses in hexadecimal format Binary communication mode can be executed much faster than ASCII commands Binary format can only be used when commands are sent from the PC and cannot be embedded in an application program hexadecimal format represents a byte as two 4 bit values Each 4 bit value is represented as a single character with a decimal equivalent between 0 and 15 The characters used for representing 10 15 is A B C D E and F For example the hexadecimal value 6D represent the binary value 01101101 Negative values are represented in 2 s complement Binary Comman
63. axis to 5 OF 3 Set X axis offset to 3 Leave other axes unchanged OF 0 Set Y axis offset to 0 Leave other axes unchanged OF Return offsets 3 0000 0 0000 3 0000 5 0000 OF Return X offset 3 0000 OF Return Y offset 0 0000 DMC 18X2 Command Reference OF Binary 99 119 OP Binary E8 FUNCTION Output Port DESCRIPTION The OP command sends data to the output port of the controller You can use the output port to control external switches and relays The argument controls the output port bits 1 8 ARGUMENTS OP m where m is an integer in the range 0 to 255 decimal or 0000 to 00FF hexadecimal m is the decimal representation of the general output bits m returns the value of the argument USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 3 0 Command Line Yes OPERAND USAGE _OPO contains the value of the argument m RELATED COMMANDS SB Binary EA on page 139 Set output bit CB on page 40 Clear output bit OB Binary E9 on page 116 Output Byte EXAMPLES OP 0 Clear Output Port all bits OP 85 Set outputs 1 3 8 clear the others MG _OPO Returns the first parameter m MG _OP1 Returns the second parameter n 120 OP Binary E8 DMC 18X2 Command Reference PA Binary A6 FUNCTION Position Absolute DESCRIPTION The PA command will set the final destination of the next move The position is referenced to the absolute zero If a is used then the curr
64. be rounded DOWN to the nearest factor of 1024 The units of the parameter is counts per second squared ARGUMENTS VA s t where s and t are unsigned integers in the range 1024 to 68 431 360 s represents the vector acceleration for the S coordinate system and t represents the vector acceleration for the T coordinate system s Returns the value of the vector acceleration for the S coordinate plane t Returns the value of the vector acceleration for the T coordinate plane USAGE DEFAULTS While Moving Yes Default Value 262144 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _VAx contains the value of the vector acceleration for the specified axis RELATED COMMANDS VS on page 171 VP on page 168 VE on page 164 CR on page 45 VM on page 166 BG on page 28 VD on page 163 VT on page 172 EXAMPLES VA 1024 VA 00001024 VA 20000 VA 0019456 ACCEL _VA Vector Speed Vector Position End Vector Circle Vector Mode Begin Sequence Vector Deceleration Vector smoothing constant S curve Set vector acceleration to 1024 counts sec Return vector acceleration Set vector acceleration Return vector acceleration Assign variable ACCEL the value of VA Note This command is not valid in the DMC 1812 162 VA Binary B7 DMC 18X2 Command Reference VD Binary B8 FUNCTION Vector Deceleration DESCRIPTION This command sets the deceleration rate of the vect
65. beyond this limit is not permitted The reverse limit is activated at X 1 Y 1 Z 1 W 1 To disable the reverse limit set X Y Z W to 2147483648 The units are in quadrature counts When the reverse software limit is activated the automatic subroutine LIMSWI will be executed if it is included in the program and a program is executing See User s Manual Automatic Subroutine ARGUMENTS BL n n n n or BLX n where nis a signed integer in the range 2147483648 to 2147483647 n 214783648 Turns off the reverse limit n Returns the reverse software limit for the specified axes USAGE DEFAULTS While Moving Yes Default Value 214783648 In a Program Yes Default Format Position format Command Line Yes OPERAND USAGE _BLx contains the value of the reverse software limit for the specified axis RELATED COMMANDS FL on page 75 Forward Limit PF on page 122 Position Formatting EXAMPLES TEST Test Program AC 1000000 Acceleration Rate DC 1000000 Deceleration Rate BL 15000 Set Reverse Limit JG 5000 Jog Reverse BGX Begin Motion AMX After Motion limit occurred TPX Tell Position EN End Program Hint Galil Controllers also provide hardware limits 30 BL Binary 8F DMC 18X2 Command Reference BM Binary 9B FUNCTION Brushless Modulo DESCRIPTION The BM command defines the length of the magnetic cycle in encoder counts ARGUMENTS BM n n n n or BMX n where n is a decimal value between 1 and 1000000 with a resolution of 1 10
66. ble as a string of length n where n is through 6 N Suppress carriage return line feed Note Multiple text variables and ASCII characters may be used each must be separated by a comma Note The order of arguments is not important USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Variable Format Command Line Yes EXAMPLES Case 1 Message command displays ASCII strings MG Good Morning Displays the string Case 2 Message command displays variables or arrays MG The Answer is Total F4 2 Displays the string with the content of variable TOTAL in local format of 4 digits before and 2 digits after the decimal point Case 3 Message command sends any ASCII characters to the port MG 413 410 448 4055 displays carriage return and the characters 0 and 7 108 MG DMC 18X2 Command Reference MO Binary A9 FUNCTION Motor Off DESCRIPTION The MO command shuts off the control algorithm The controller will continue to monitor the motor position To turn the motor back on use the Servo Here command SH ARGUMENTS MO xxxx where xis X Y Z W or any combination to specify the axis or axes No argument specifies all axes n returns the state of the motor for the specified axis USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _MOx contains the state of the motor for the specified axis RELATED COMMANDS S
67. bles input interrupts If the program sequencer was interrupted while waiting for a trippoint such as WT RII restores the trippoint on the return to the program RIO clears the trippoint To avoid returning to the main program on an interrupt use the command ZS to zero the subroutine stack This turns the jump subroutine into a jump only ARGUMENTS RIn n 0 Clears the interrupted trippoint n 1 Restores state of trippoint no argument clears the interrupted trippoint USAGE While Moving In a Program Command Line RELATED COMMANDS ININT II on page 82 EXAMPLES A II1 JP A EN ININT MG INPUT INTERRUPT SB 1 RI1 Hint An applications program must be executing for the ININT subroutine to function DMC 18X2 Command Reference DEFAULTS No Default Value Yes Default Format No Input interrupt subroutine Enable input interrupts Program label Begin interrupt subroutine Print Message Set output line 1 Return to the main program and restore trippoint Rie 133 RL Binary DD FUNCTION Report Latched Position DESCRIPTION The RL command will return the last position captured by the latch The latch must first be armed by the AL command and then a 0 must occur on the appropriate input Input 1 2 3 and 4 for X Y Z and W respectively The armed state of the latch can be configured using the CN command ARGUMENTS RL xxxx where x is X Y Z W or any combination to specify the axis
68. can be assigned to the variable V with the command V _TPX Usage Description The Usage description specifies the restrictions on proper command usage The following provides an explanation of the command information provided While Moving Describes whether the command is valid while the controller is performing a motion In a program Describes whether the command may be used as part of a user defined program Command Line Describes whether the command may be used as a direct command Default Description In the command description the DEFAULT section provides the default values for controller setup parameters These parameters can be changed and the new values can be saved in the controller s non volatile memory by using the command BN If the setup parameters are not saved in non volatile memory the default values will automatically reset when the system is reset A reset occurs when the power is turned off and on when the reset button is pushed or the command RS is given Resetting the Controller to Factory Default When a master reset occurs the controller will always reset all setup parameters to their default values and the non volatile memory is cleared to the factory state A master reset is executed by the command lt ctrl R gt lt ctrl S gt lt Return gt OR by powering up or resetting the controller with the MRST jumper on For example the command KD is used to set the Derivative Constant for each
69. ckward software limit ER Error limit FL Forward software limit OE Off on error function TL Torque limit TW Timeout for in position I O Commands AL Arm latch CB Clear bit CI Communication interrupt CO Configure I O points EI Enable interrupts I Input interrupt OB Define output bit OC Output compare function OP Output port SB Set bit UI User interrupts DMC 18x2 Command Reference Independent Motion Commands Abort motion Acceleration Begin motion Deceleration Find edge Find index Home Halt execution Increment position Smoothing time constant Jog mode Position absolute Position relative Speed Stop Interrogation Commands LA _LF LL IR LS LV MG QR QZ RP RL ARAV SC TB TC TD TE TI TIME TP TR TS TT TV List arrays Forward limit switch operand List labels Reverse limit switch operand List program List variables Message command Data record Return DMA information Report command position Report latch Firmware revision information Stop code Tell status Tell error code Tell dual encoder Tell error Tell input Time operand internal clock Tell position Trace program Tell switches Tell torque Tell velocity Math Special Functions SIN x Sine of x COS x Cosine of x COM x 1 s compliment of x ASIN x Arc sine of x ACOS x Arc cosine of x ATAN x Arc tangent of x ABS x Absolute value of x DMC 18x2 Command Reference Overview 9 10 Ov
70. command causes a jump to a program location on a specified condition The program location may be any program line number or label The condition is a conditional statement which uses a logical operator such as equal to or less than A jump is taken if the specified condition is true Multiple conditions can be used in a single jump statement The conditional statements are combined in pairs using the operands amp and I The amp operand between any two conditions requires that both statements must be true for the combined statement to be true The I operand between any two conditions requires that only one statement be true for the combined statement to be true Note Each condition must be placed in parenthesis for proper evaluation by the controller ARGUMENTS JP location condition where location is a program line number or label condition is a conditional statement using a logical operator The logical operators are lt less than gt greater than equal to lt less than or equal to gt greater than or equal to lt gt not equal to USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line No EXAMPLES JP POS1 V1 lt 5 Jump to label POS1 if variable V1 is less than 5 JP A V7 V8 0 Jump to A if V7 times V8 equals 0 JP B Jump to B no condition Hint JP is similar to an IF THEN command Text to the right of the comma is the condition that must be met for a ju
71. conditional statement ENDIF End of IF conditional statement DMC 18X2 Command Reference IF 83 IL Binary 89 FUNCTION Integrator Limit DESCRIPTION The IL command limits the effect of the integrator function in the filter to a certain voltage For example IL 2 limits the output of the integrator of the X axis to the 2 Volt range A negative parameter also freezes the effect of the integrator during the move For example IL 3 limits the integrator output to 3V If at the start of the motion the integrator output is 1 6 Volts that level will be maintained through the move Note however that the KD and KP terms remain active in any case ARGUMENTS IL n n n n or ILX n where nis a number in the range 9 9988 to 9 9988 Volts with a resolution of 0 0003 n Returns the value of the integrator limit for the specified axis USAGE DEFAULTS While Moving Yes Default Value 9 9988 In a Program Yes Default Format 1 4 Command Line Yes USAGE _ILx contains the value of the integrator limit for the specified axis RELATED COMMANDS KI Binary 82 on page 92 Integrator EXAMPLES KI 2 3 5 8 Integrator constants IL 3 2 7 2 Integrator limits IL Returns the X axis limit 3 0000 84 IL Binary 89 DMC 18X2 Command Reference IN FUNCTION Input Variable DESCRIPTION The IN command allows a variable to be input from a keyboard When the IN command is executed in a program the prompt message is displayed The operator the
72. controller into the Edit subsystem In the Edit subsystem programs can be created changed or destroyed The commands in the Edit subsystem are lt cntrl gt D Deletes a line lt cntrl gt I Inserts a line before the current one lt cntrl gt P Displays the previous line lt cntrl gt Q Exits the Edit subsystem lt return gt Saves a line Using Galil Windows Terminal Software The ED command causes the Windows terminal software to open the terminal editor OPERAND USAGE _ED contains the line number of the last line to have an error EXAMPLES ED 000 START 001 PR 2000 002 BGX 003 SLKJ Bad line 004 EN 005 CMDERR Routine which occurs upon a command error 006 V _ED 007 MG An error has occurred n 008 MG In line V F3 0 009 ST 010 ZSO 011 EN Hint Remember to quit the Edit Mode prior to executing or listing a program 58 ED DMC 18X2 Command Reference EG Binary C3 FUNCTION ECAM go engage DESCRIPTION The EG command engages an ECAM slave axis at a specified position of the master If a value is specified outside of the master s range the slave will engage immediately Once a slave motor is engaged its position is redefined to fit within the cycle ARGUMENTS EG x y z w or EGX x where X Y Z W are the master positions at which the X Y Z W axis must be engaged n Returns 1 if specified axis is engaged and 0 if disengaged USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Fo
73. current position value for the specified axis No argument will provide the encoder position for all axes RELATED COMMANDS PEF on page 122 Position Formatting EXAMPLES Assume the X axis is at the position 200 decimal the Y axis is at the position 10 decimal the Z axis is at position 0 and the W axis is at 110 decimal The returned parameter units are in quadrature counts PF 7 TP 0000200 0000010 0000000 0000110 TPX 0000200 TPY 0000010 PF 6 0 TP 0000C8 FFFFF6 000000 FFFF93 Position _TPX 154 TP Binary D9 Position format of 7 Return X Y Z W positions Return the X motor position Return the Y motor position Change to hex format Return X Y Z W in hex Assign the variable Position the value of TPX DMC 18X2 Command Reference TR FUNCTION Trace DESCRIPTION The TR command causes each instruction in a program to be sent out the communications port prior to execution TR1 enables this function and TRO disables it The trace command is useful in debugging programs ARGUMENTS TR n where n 0 Disables the trace function n 1 Enables the trace function No argument disables the trace function USAGE DEFAULTS While Moving Yes Default Value TRO In a Program Yes Default Format Command Line Yes DMC 18X2 Command Reference TR 155 TS Binary DF FUNCTION Tell Switches DESCRIPTION TS returns status information of the Home switch Forward Limit switch and Reverse Limit sw
74. d Format All binary commands have a 4 byte header followed by data fields The 4 bytes are specified in hexadecimal format Header Format Byte 1 specifies the command number between 80 to FF The complete binary command number table is listed below Byte 2 specifies the of bytes in each field as 0 1 2 4 or 6 as follows 00 No datafields i e SH or BG 01 One byte per field 02 One word 2 bytes per field 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 movement 01 Coordinated motion movement For example the command STS designates motion to stop on a vector motion The third byte for the equivalent binary command would be 01 Byte 4 specifies the axis or data field as follows Bit 7 8 data field Bit 6 7 data field Bit 5 6 data field Bit 4 5 data field Bit 3 W axis or 4 data field Bit 2 Z axis or 3 data field Bit 1 Y axis or 2 data field Bit 0 X axis or 1 data field DMC 18x2 Command Reference Datafields Format Datafields must be consistent with the format byte and the axes byte For example the command PR 1000 500 would be A7 02 00 05 03 E8 FE 0C where A7 is the command number for PR 02 specifies 2 bytes for each data field 00 S is not active for PR 05 specifies bit 0 is active for A axis and bit 2 is active for C axis 2 27 5
75. d Line Yes OPERAND USAGE When used as an operand DL gives the number of available labels Controller Number of available labels RELATED COMMANDS UL on page 161 Upload EXAMPLES DL Begin download A PR 4000 BGX Data AMX MG DONE Data EN Data lt control gt Z End download DMC 18X2 Command Reference DLe 51 52 DM DM FUNCTION Dimension DESCRIPTION The DM command defines a single dimensional array with a name and n total elements The first element of the defined array starts with element number 0 and the last element is at n 1 ARGUMENTS DM c n where cis aname of up to eight characters starting with an uppercase alphabetic character n specifies the size of the array number of array elements n Returns the number of array elements available USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _DM contains the available array space For example before any arrays have been defined the operand _DM will return 8000 If an array of 100 elements is defined the operand _DM will return 7900 RELATED COMMANDS DA on page 48 Deallocate Array EXAMPLES DM Define dimension of arrays pets with 5 elements Dogs with 2 Pets 5 Dogs 2 Cats 3 elements Cats with 3 elements DM Tests 1600 Define dimension of array Tests with 1600 elements DMC 18X2 Command Reference DP Binary 97 FUNCTION Define Position DESCRIPTION The DP comma
76. d Reference LS 103 LV FUNCTION List Variables DESCRIPTION The LV command returns a listing of all of the program labels in memory The listing will be in alphabetical order ARGUMENTS None USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS LA on page 95 List Arrays LS on page 103 List Program LL on page 100 List Labels EXAMPLES gt LV APPLE 60 0000 BOY 25 0000 ZEBRA 37 0000 104 LV DMC 18X2 Command Reference LZ Binary E7 FUNCTION Leading Zeros DESCRIPTION The LZ command is used for formatting the values returned from interrogation commands or interrogation of variables and arrays By enabling the LZ function all leading zeros of returned values will be removed ARGUMENTS LZ n where n 1 Removes leading zeros n 0 Does not remove leading zeros n Returns the state of the LZ function 0 does not remove and 1 removes zeros USAGE DEFAULTS While Moving Yes Default Value 1 In a Program Yes Default Format Command Line Yes OPERAND USAGE _LZ contains the state of the LZ function 0 is disabled and 1 is enabled EXAMPLES LZ 0 Disable the LZ function TPX Interrogate the controller for current position of X axis 0000021645 Value returned by the controller VARI Request value of variable VAR1 previously set to 10 0000000010 0000 Value of variable returned by controller LZ1 Enable LZ function
77. destination condition where destination is a line number or label condition is a conditional statement using a logical operator USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line No RELATED COMMANDS EN on page 64 End EXAMPLES JS SQUARE V1 lt 5 Jump to subroutine SQUARE if V1 is less than 5 JS LOOP V1 lt gt 0 Jump to LOOP if V1 is not equal to 0 JS A Jump to subroutine A no condition 90 JS DMC 18X2 Command Reference KD Binary 83 FUNCTION Derivative Constant DESCRIPTION KD designates the derivative constant in the controller filter The filter transfer function is D z 4 KP 4 KD z 1 z Kiz 2 z 1 For further details on the filter see the section Theory of Operation ARGUMENTS KD n n n n or KDX n where n is an unsigned numbers in the range 0 to 4095 875 with a resolution of 1 8 n Returns the value of the derivative constant for the specified axis USAGE DEFAULTS While Moving Yes Default Value 64 In a Program Yes Default Format 4 2 Command Line Yes OPERAND USAGE _KDx contains the value of the derivative constant for the specified axis RELATED COMMANDS KI Binary 82 on page 92 Integrator KP Binary 81 on page 93 Proportional EXAMPLES KD 100 200 300 400 25 Specify KD KD Return KD 0100 00 0200 00 0300 00 0400 25 DMC 18X2 Command Reference KD Binary 83 91 KI Binary 82 FUNCTION Integrator DESCRIPTION The KI command sets t
78. digits of integers and the number of digits of fractions can be selected with this command An extra digit for sign and a digit for decimal point will be added to the total number of digits If PF is minus the format will be hexadecimal and a dollar sign will precede the characters Hex numbers are displayed as 2 s complement with the first bit used to signify the sign If a number exceeds the format the number will be displayed as the maximum possible positive or negative number i e 999 99 999 8000 or 7FF The PF command can be used to format values returned from the following commands BL LE DE PA DP PR EM TN FL VE IP TE TP ARGUMENTS PF m n where m is an integer between 8 and 10 which represents the number of places preceding the decimal point A negative sign for m specifies hexadecimal representation nis an integer between 0 and 4 which represent the number of places after the decimal point n Returns the value of m USAGE DEFAULTS While Moving Yes Default Value 10 0 In a Program Yes Default Format 10 0 Command Line Yes OPERAND USAGE _PF contains the value of m position format parameter EXAMPLES TPX Tell position of X 0000000000 Default format PF 5 2 Change format to 5 digits of integers and 2 of fractions TPX Tell Position 00021 00 PF 5 2 New format Change format to hexadecimal TPX Tell Position 00015 00 Report in hex DMC 18X2 Command Reference PL Binary 87 FUNCTION Pole
79. e MR 3000 After passing the position 3000 Vi _TPX Assign V1 X position MG Position is Vi ST Print Message Stop EN End of Program Hint The accuracy of the MR command is the number of counts that occur in 2 servo samples Multiply the speed by 2 servo samples to obtain the maximum error MR tests for absolute position The MR command can also be used when the specified motor is driven independently by an external device 110 MR Binary CC DMC 18X2 Command Reference MT FUNCTION Motor Type DESCRIPTION The MT command selects the type of the motor and the polarity of the drive signal Motor types include standard servo motors which require a voltage in the range of 10 Volts and step rn motors which require pulse and direction signals The polarity reversal inverts the analog signals for servo motors and inverts logic level of the pulse train for step motors ARGUMENTS MT n n n n or MTX n where n 1 Specifies Servo motor n l Specifies Servo motor with reversed polarity n 2 Specifies Step motor with active high step pulses n 2 Specifies Step motor with active low step pulses n 2 5 Specifies Step motor with reversed direction and active high step pulses n 2 5 Specifies Step motor with reversed direction and active low step pulses n Returns the value of the motor type for the specified axis USAGE DEFAULTS While Moving No Default Value 1 1 1 1 In a Program Yes Default Format 1 Command Line Yes OPERAND USAGE _MTx
80. e delayed from the commanded position due to the stepper motor smoothing function KS ARGUMENTS MC xxxx where x is X Y Z W or any combination to specify the axis or axes No argument specifies that motion on all axes is complete USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS BG on page 28 Begin AM Binary C8 on page 18 After Move TW Binary CA on page 159 Timeout EXAMPLES MOVE Program MOVE CAT Specify T coordinate system VMYZ Vector mode for Y and Z on T coordinate system VP 1000 1000 Vector Move on Y and Z axes VE End vector Move BGT Start the Y axis MCT After the move is complete on T coordinate system MG DONE TP Print message EN End of Program Hint MC can be used to verify that the actual motion has been completed 106 MC Binary C9 DMC 18X2 Command Reference MF Binary CB FUNCTION Forward Motion to Position DESCRIPTION The MF command is a trippoint used to control the timing of events This command will hold up the execution of the following command until the specified motor moves forward and crosses the position specified The units of the command are in quadrature counts Only one axis may be specified at a time The MF command can also be used when the encoder is the master and not under servo control ARGUMENTS MF n n n n or MFX n where nis a Signed integer in the range 2147483648 to 2147483647 decimal USAGE DEFAULTS Wh
81. e new position as your absolute zero DMC 18X2 Command Reference DP Binary 97 53 DT Binary BF FUNCTION Delta Time DESCRIPTION The DT command sets the time interval for Contouring Mode Sending the DT command once will set the time interval for all following contour data until anew DT command is sent 2 milliseconds is the time interval Sending DTO followed by CDO command terminates the Contour Mode ARGUMENTS DT n where n is an integer in the range 0 to 8 0 terminates the Contour Mode n 1 through 8 specifies the time interval of 2 samples By default the sample period is 1 msec set by the TM command with n 1 the time interval would be 2 msec n Returns the value for the time interval for contour mode USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _DT contains the value for the time interval for Contour Mode RELATED COMMANDS CM on page 43 Contour Mode CD on page 41 Contour Data WC on page 173 Wait for next data EXAMPLES DT4 Specifies time interval to be 16 msec DT7 Specifies time interval to be 128 msec CONTOUR Begin CMXY Enter Contour Mode DT4 Set time interval CD 1000 2000 Specify data WC Wait for contour CD 2000 4000 New data WC Wait DTO Stop contour CDO Exit Contour Mode EN End 54 DT Binary BF DMC 18X2 Command Reference EA FUNCTION Choose ECAM master DESCRIPTION The EA command selects the master axis for
82. e sequence or from the last AV command The units of the command are quadrature counts ARGUMENTS AV s t where s and t are unsigned integers in the range 0 to 2147483647 decimal s represents the vector distance to be executed in the S coordinate system and t represents the vector distance to be executed in the T coordinate system USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes OPERAND USAGE _AVS contains the vector distance from the start of the sequence in the S coordinate system and _AVT contains the vector distance from the start of the sequence in the T coordinate system EXAMPLES MOVE DP 0 0 Label CAT Specify the T coordinate system LMXY Linear move for X Y LI 1000 2000 Specify distance LI 2000 3000 Specify distance LE BGT Begin motion in the T coordinate system AV 500 After path distance 500 MG Path gt 500 TPXY Print Message EN End Program Hint Vector Distance is calculated as the square root of the sum of the squared distance for each axis in the linear or vector mode DMC 18X2 Command Reference AV 23 24 BA BA FUNCTION Brushless Axis DESCRIPTION The BA command sets all axes that require sinusoidal commutation and reconfigures the controller to reflect the actual number of motors to be controlled Each sinusoidal commutation axis requires an additional DAC which will always be associated with the highest axes on the controller For exam
83. ed in the upper right corner Some commands have a binary equivalent and the binary value is listed next to the ASCII command in parenthesis For binary command mode see discussion below Below the Opcode is a description of the command and required arguments DMC 18x2 Command Reference Overview 1 Axes Arguments Some commands require the user to identify the specific axes to be affected These commands are followed by uppercase X Y Z or W No commas are needed and the order of axes is not important Do not insert any spaces prior to a command For example STX AMX is invalid because there is a space after the semicolon When an argument is not required and is not given the command is executed for all axes Valid syntax SHX Servo Here X only SH XYW Servo Here X Y and W axes SH XZW Servo Here X Z and W axes SH ZXW Servo Here Z X and W axes the axes order does not matter SH XYZW Servo Here X Y Z and W axes SH Servo Here all axes Parameter Arguments Some commands require numerical arguments to be specified following the instruction In the argument description these commands are followed by lower case n n n n where the letter n represents the value Values may be specified for any axis separately or any combination of axes The argument for each axis is separated by commas Examples of valid syntaxare listed below Valid syntax ACn Specify argument for x axis only AC n n Specify x and y only AC n n Specify x and z
84. efault Format Specify data type for record Begin recording at 2 msec intervals Start motion End Hint The record array mode is useful for recording the real time motor position during motion The data is automatically captured in the background and does not interrupt the program sequencer The record mode can also be used for a teach or learn of a motion path DMC 18X2 Command Reference RA 129 130 RC RC FUNCTION Record DESCRIPTION The RC command begins recording for the Automatic Record Array Mode RA RC 0 stops recording ARGUMENTS RC n m where n is an integer 1 thru 8 and specifies 2 samples between records RC 0 stops recording m is optional and specifies the number of records to be recorded If m is not specified the DM number will be used A negative number for m causes circular recording over array addresses 0 to m 1 The address for the array element for the next recording can be interrogated with _RD n Returns status of recording 1 if recording 0 if not recording USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _RC contains status of recording 1 if recording 0 if not recording RELATED COMMANDS DM on page 52 Dimension Array RD on page 131 Record Data RA on page 128 Record Array Mode EXAMPLES RECORD Record DM Torque 1000 Define Array RA Torque Specify Record Mode RD _TTX Specify D
85. ent destination current command position if not moving destination if in a move is returned For each single move the largest position move possible is 2147483647 Units are in quadrature counts ARGUMENTS PA n n n n or PAX n where n is a signed integers in the range 2147483647 to 2147483648 decimal n Returns the commanded position of which motion stopped USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _PAx contains the last commanded position at which motion stopped RELATED COMMANDS PR Binary A7 on page 124 Position relative SP Binary 92 on page 142 Speed AC on page 14 Acceleration DC on page 49 Deceleration BG on page 28 Begin PF on page 122 Position Formatting EXAMPLES PA 400 600 500 200 X axis will go to 400 counts Y axis will go to 600 counts Z axis will go to 500 counts W axis will go to 200 counts PA Returns the current commanded position 400 600 500 200 BG Start the move PA 700 X axis will go to 700 on the next move while the BG Y Z and W axis will travel the previously set relative distance if the preceding move was a PR move or will not move if the preceding move was a PA move DMC 18X2 Command Reference PA Binary A6 121 PF FUNCTION Position Format DESCRIPTION The PF command allows the user to format the position numbers such as those returned by TP The number of
86. ents are specified The BG Begin Sequence command is used to start the motion sequence All parameters r 8 A0 must be specified Radius units are in quadrature counts and A have units of degrees The parameter n is optional and describes the vector speed that is attached to the motion segment ARGUMENTS CR1 8 A9 lt n gt o0 where r is an unsigned real number in the range 10 to 6000000 decimal radius 6 a signed number in the range 0 to 32000 decimal starting angle in degrees A9 is a signed real number in the range 0 0001 to 32000 decimal angle in degrees n specifies a vector speed to be taken into effect at the execution of the vector segment nis an unsigned even integer between 0 and 12 000 000 for servo motor operation and between 0 and 3 000 000 for stepper motors o specifies a vector speed to be achieved at the end of the vector segment o is an unsigned even integer between 0 and 8 000 000 Note The product r AO must be limited to 4 5 108 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS VP on page 168 VS on page 171 VD on page 163 VA on page 162 VM on page 166 VE on page 164 BG on page 28 EXAMPLES VMXY VS 10000 CR 1000 0 360 CR 1000 0 360 lt 40000 VE BGS DMC 18X2 Command Reference Vector Position Vector Speed Vector Deceleration Vector Acceleration Vector Mode End Vector BGS Begin Seque
87. ep enough motion segments in the buffer to ensure continuous motion The Vector End VE command must be given after the last segment This allows the controller to properly decelerate The VM command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS VM n m p where n and m specify plane of vector motion and can be any two axes Vector Motion can be specified for one axis by specifying the parameter m as N Specifying one axis is useful for obtaining sinusoidal motion on axis p is the tangent axis and can be specified as any axis A value of N for the parameter p turns off tangent function n Returns the available spaces for motion segments that can be sent to the buffer A value of zero means that the buffer is full and no additional segments may be sent USAGE DEFAULTS While Moving No Default Value X Y In a Program Yes Default Format Command Line Yes OPERAND USAGE _VMx contains instantaneous commanded vector velocity for the specified coordinate system S or T DMC 18X2 Command Reference RELATED COMMANDS VP on page 168 VS on page 171 VA on page 162 VD on page 163 CR on page 45 VE on page 164 CS on page 46 VT on page 172 AV on page 23 EXAMPLES CAS VM XY CR 500 0 180 VP 100 200 VE BGS DMC 18X2 Command Reference Vector Position Vector Speed Vector Acceleration Vector Deceleration Circle End
88. erview FRAC x Fraction portion of x INTIx Integer portion of x RND x Round of x SQR x Square root of x IN x State of digital input x OUT x State of digital output x ANIx Value of analog input x Programming Commands DA Deallocate variables arrays DL Download program DM Dimension arrays ED Edit program ELSE Conditional statement ENDIF End of conditional statement EN End program IF If statement IN Input variable JP Jump JS Jump to subroutine NO No operation for remarks RA Record array automatic data capture RC Record interval for RA RD Record data for RA RE Return from error routine REM Remark program RI Return from interrupt routine UI User Interrupt UL Upload program XQ Execute program ZS Zero stack Servo Motor Commands FA Acceleration feedforward FV Velocity feedforward IL Integrator limit KD Derivative constant KI Integrator constant KP Proportional constant NB Notch bandwidth NF Notch frequency NZ Notch zero OF Offset PL Pole SH Servo here TL Torque limit TM Sample time ZR Zero Stepper Motor Commands DE Define encoder position DP Define reference position KS Stepper motor smoothing DMC 18x2 Command Reference MT TD TP Motor type Report commanded position Step counts output Tell position of encoder System Configuration BN BP BV cc CE CF CN CW DE DP EI EO IT IZ MO MT PF QD QU RS ARAS ARAV VE Burn parameters Burn pro
89. es OPERAND USAGE _VPx contains the absolute coordinate of the axes at the last intersection along the sequence For example during the first motion segment this instruction returns the coordinate at the start of the sequence The use as an operand is valid in the linear mode LM and in the Vector mode VM RELATED COMMANDS CR on page 45 Circle VM on page 166 Vector Mode VA on page 162 Vector Acceleration VD on page 163 Vector Deceleration VE on page 164 Vector End VS on page 171 Vector Speed BG on page 28 Begin Sequence VT on page 172 Vector smoothing EXAMPLES A Program A CAS Specify S coordinate system VM XY Specify motion plane VP 1000 2000 Specify vector position X Y 168 VP Binary B2 DMC 18X2 Command Reference CR 1000 0 360 Specify arc VE Vector end VS 2000 Specify vector speed VA 400000 Specify vector acceleration BGS Begin motion sequence EN End Program Note This command is not valid in the DMC 1812 Non sequential axes do not require comma delimitation Hint The first vector in a coordinated motion sequence defines the origin for that sequence All other vectors in the sequence are defined by their endpoints with respect to the start of the move sequence DMC 18X2 Command Reference VP Binary B2 169 VR Binary BA FUNCTION Vector Speed Ratio DESCRIPTION The VR sets a ratio to be used as a multiplier of the current vector speed The vector speed can be set by the co
90. es not require an underscore EXAMPLES MG TIME Display the value of the internal clock as does the other operands 150 TIME DMC 18X2 Command Reference TL Binary 8a FUNCTION Torque Limit DESCRIPTION The TL command sets the limit on the motor command output For example TL of 5 limits the motor command output to 5 volts Maximum output of the motor command is 9 998 volts ARGUMENTS TL n n n n or TLX n where nis an unsigned numbers in the range 0 to 9 998 volts with resolution of 0 003 volts n Returns the value of the torque limit for the specified axis USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _TLx contains the value of the torque limit for the specified axis EXAMPLES TL 1 5 9 7 5 Limit X axis to 1volt Limit Y axis to 5 volts Limit Z axis to 9 volts Limit W axis to 7 5 volts TL Return limits 1 0000 5 0000 9 0000 7 5000 TL Return X axis limit 1 0000 DMC 18X2 Command Reference TL Binary 8a 151 TM Binary E5 FUNCTION Update Time DESCRIPTION The TM command sets the sampling period of the control loop Changing the sampling period will uncalibrate the speed and acceleration parameters A negative number turns off the internal clock allowing for an external source to be used as the time base The units of this command are usec ARGUMENTS TM n where With the fast firmware n is an integer in the range 125 t
91. ex numbers are displayed as 2 s complement with the first bit used to signify the sign If a number exceeds the format the number will be displayed as the maximum possible positive or negative number i e 999 99 999 8000 or 7FF ARGUMENTS VF m n where m and n are unsigned numbers in the range 0 lt m lt 10 and 0 lt n lt 4 A negative m specifies hexadecimal format m Returns the value of the format for variables and arrays USAGE DEFAULTS While Moving Yes Default Value 10 4 In a Program Yes Default Format 2 1 Command Line Yes OPERAND USAGE _VF contains the value of the format for variables and arrays RELATED COMMANDS PEF on page 122 Vector Position EXAMPLES VF 5 3 Sets 5 digits of integers and 3 digits after the decimal point VF 8 0 Sets 8 digits of integers and no fractions VF 4 0 Specify hexadecimal format with 4 bytes to the left of the decimal DMC 18X2 Command Reference VF 165 166 VM VM FUNCTION Coordinated Motion Mode DESCRIPTION The VM command specifies the coordinated motion mode and the plane of motion This mode may be specified for motion on any set of two axes The motion is specified by the instructions VP and CR which specify linear and circular segments Up to 511 segments may be given before the Begin Sequence BGS or BGT command Additional segments may be given during the motion when the buffer frees additional spaces for new segments It is the responsibility of the user to ke
92. fault Format 8 0 Command Line Yes When moving the DC command can only be specified while in the jog mode OPERAND USAGE _DCx contains the deceleration rate for the specified axis RELATED COMMANDS AC on page 14 Acceleration PR Binary A7 on page 124 PA Binary A6 on page 121 Position Relative Position Absolute SP Binary 92 on page 142 Speed JG Binary A8 on page 88 Jog BG on page 28 Begin IT on page 87 Smoothing EXAMPLES PR 10000 Specify position AC 2000000 Specify acceleration rate DC 1000000 Specify deceleration rate SP 5000 Specify slew speed BG Begin motion Note The DC command may be changed during the move in JG move but not in PR or PA move DMC 18X2 Command Reference DC Binary 91 49 DE Binary 98 FUNCTION Stepper Encoder Position DESCRIPTION rn The DE command defines the encoder position when used with stepper motors ARGUMENTS DE n n n n or DEX n where n is a signed integers in the range 2147483647 to 2147483648 decimal n Returns the position of the auxiliary encoders for the specified axes rn n returns the commanded reference position of the motor in step pulses when used with a stepper motor Example DEO This will define the TP or encoder position to 0 This will not effect the DE value To set the DE value when in stepper mode use the DP command USAGE DEFAULTS While Moving Yes Default Value 0 0 0 0 In a Program Yes Default Format Position F
93. for the internal variable _BG being equal to zero 18 AM Binary C8 DMC 18X2 Command Reference AP Binary CE FUNCTION After Absolute Position DESCRIPTION The After Position AP command is a trippoint used to control the timing of events This command will hold up the execution of the following command until one of the following conditions have been met 1 The actual motor position crosses the specified absolute position 2 The motion profiling on the axis is complete 3 The commanded motion is in the direction which moves away from the specified position The units of the command are quadrature counts Only one axis may be specified at a time The motion profiler must be on or the trippoint will automatically be satisfied ARGUMENTS AP n n n n or APX n where n is a signed integer in the range 2147483648 to 2147483647 decimal USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS AD on page 15 Trippoint for relative distances MF Binary CB on page 107 Trippoint for forward motion EXAMPLES TEST Program B DPO Define zero JG 1000 Jog mode speed of 1000 counts sec BGX Begin move AP 2000 After passing the position 2000 V1 _TPX Assign V1 X position MG Position is Vi Print Message ST Stop EN End of Program Hint The accuracy of the AP command is the number of counts that occur in 2 msec Multiply the speed by 2 msec to obtain the
94. function n Returns the state of the off on error function for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _OEXx contains the status of the off on error function for the specified axis 0 disabled 1 enabled RELATED COMMANDS AB on page 7 Abort ER on page 69 Error limit SH Binary AA on page 141 Servo Here POSERR Error Subroutine EXAMPLES OE 1 1 1 1 Enable OE on all axes OE 0 Disable OE on X axis other axes remain unchanged OE 1 1 Enable OE on Z axis and W axis other axes remain unchanged OE 1 0 1 0 Enable OE on X and Z axis Disable OE on Y and W axis Hint The OE command is useful for preventing system damage on excessive error 118 OE Binary 8D DMC 18X2 Command Reference OF Binary 99 FUNCTION Offset DESCRIPTION The OF command sets a bias voltage in the motor command output or returns a previously set value This can be used to counteract gravity or an offset in an amplifier ARGUMENTS OF n n n n or OFX n where nis a signed number in the range 9 998 to 9 998 volts with resolution of 0 0003 n Returns the offset for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _OFx contains the offset for the specified axis EXAMPLES OF 1 2 3 5 Set X axis offset to 1 the Y axis offset to 2 the Z axis to 3 and the W
95. ge to hex format RP 0000C8 FFFFF6 000000 FFFF93 Return X Y Z W in hex Position _RPX Assign the variable Position the value of RPX a Hint RP command is useful when operating step motors since it provides the commanded position in steps when operating in stepper mode DMC 18X2 Command Reference RP Binary D8 135 RS FUNCTION Reset DESCRIPTION The RS command resets the state of the processor to its power on condition The previously saved state of the controller along with parameter values and saved sequences are restored USAGE DEFAULTS While Moving Yes Default Value 0 In a Program No Default Format Command Line Yes 136 RS DMC 18X2 Command Reference lt control gt R lt control gt S FUNCTION Master Reset DESCRIPTION This command resets the controller to factory default settings and erases EEPROM A master reset can also be performed by installing a jumper on the controller at the location labeled MRST and resetting the controller power cycle or pressing the reset button Remove the jumper after this procedure USAGE DEFAULTS While Moving Yes Default Value In a Program No Default Format Command Line Yes DMC 18X2 Command Reference lt control gt R lt control gt S 137 lt control gt R lt control gt V FUNCTION Revision Information DESCRIPTION The Revision Information command causes the controller to return firmware revision information USAGE DEFAULTS While Moving Yes Default Value
96. gram Burn variables and arrays Configure auxiliary port Configure encoder type Configure default port Configure switches Data adjustment bit Define dual encoder position Define position Enable interrupts Echo off Independent smoothing Leading zeros format Motor off Motor Type Position format Download array Upload array Reset Master reset Revision information Variable format Trippoint Commands AD Al AM AP AR AS AT AV MC MF MR WC WT After distance After input After motion profiler After absolute position After relative distance At speed At time After vector distance Motion complete After motion forward After motion reverse Wait for contour data Wait for time Vector Linear Interpolation FRRBARS Define vector plane Circular interpolation move Clear motion sequence Ellipse scaling Linear interpolation end Linear interpolation segment DMC 18x2 Command Reference Overview 11 12 Overview SGSSSS8SS8S245E Linear interpolation mode Stop motion Tangent Vector acceleration Vector deceleration Vector sequence end Coordinated motion mode Vector position Vector speed ratio Vector speed Smoothing time constant vector DMC 18x2 Command Reference AB Binary A2 FUNCTION Abort DESCRIPTION AB Abort stops a motion instantly without a controlled deceleration If there is a program operating AB also aborts the program unless a 1 argument is specified The comma
97. he integral gain of the control loop It fits in the control equation as follows D z 4 KP 4 KD z 1 z KI z 2 z 1 The integrator term will reduce the position error at rest to zero ARGUMENTS KI n n n n or KIX n where nis an unsigned numbers in the range 0 to 2047 875 with a resolution of 1 128 n Returns the value of the derivative constant for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 4 0 Command Line Yes OPERAND USAGE _KIx contains the value of the derivative constant for the specified axis RELATED COMMANDS KP Binary 81 on page 93 Proportional Constant KI Binary 82 on page 92 Integrator IL on page 84 Integrator Limit EXAMPLES KI 12 14 16 20 Specify x y z w axis integral KI7 Specify x axis only KI 8 Specify z axis only KI Return X Y Z W 0007 0014 0008 0020 KI values 92 KI Binary 82 DMC 18X2 Command Reference KP Binary 81 FUNCTION Proportional Constant DESCRIPTION KP designates the proportional constant in the controller filter The filter transfer function is D 4 KP 4 KD z 1 z KI z 2 z 1 For further details see the section Theory of Operation ARGUMENTS KP n n n n or KPX n where n is an unsigned numbers in the range 0 to 1023 875 with a resolution of 1 8 n Returns the value of the proportional constant for the specified axis USAGE DEFAULTS While Moving Yes Default Value 6 In a Program Yes Default
98. ile Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS AD on page 15 Trippoint for after Relative Distances AP Binary CE on page 19 Trippoint for after Absolute Position EXAMPLES TEST Program B DPO Define zero JG 1000 Jog mode speed of 1000 counts sec BGX Begin move MF 2000 After passing the position 2000 MG Position is TPX Print Message of current position ST Stop EN End of Program Hint The accuracy of the MF command is the number of counts that occur in 2 servo samples Multiply the speed by 2 servo samples to obtain the maximum error MF tests for absolute position The MF command can also be used when the specified motor is driven independently by an external device DMC 18X2 Command Reference MF Binary CB 107 MG FUNCTION Message DESCRIPTION The MG command sends data out the bus This can be used to alert an operator send instructions or return a variable value ARGUMENTS MG m n V Fm n or m n N Pn where m is a text message including letters numbers symbols or lt ctrl gt G up to 31 characters n is an ASCII character specified by the value n V is a variable name or array element where the following formats can be used Fm n Display variable in decimal format with m digits to left of decimal and n to the right m n Display variable in hexadecimal format with m digits to left of decimal and n to the right Sn Display varia
99. ill be cleared but can be re enabled by the proper termination of the interrupt subroutine using RI The RI command is used to return from the ININT routine ARGUMENTS II m n o p where m is an integer between 0 and 8 decimal 0 disables interrupt The value of m specifies the lowest input to be used for the input interrupt When n is omitted only the input specified by m will be enabled nis an integer between 2 and 8 This argument is optional and is used with m to specify a range of values for input interrupts For example II 2 4 specifies interrupts occurring for Input 2 Input 3 and Input 4 o is an integer between 1 and 255 This argument is a mask for enabling inputs 1 through 8 For example 255 enables all 8 input interrupts and 1 enables input 1 only Using this argument is an alternative to specifying an input range with m n If m and n are specified o will be ignored p is an integer between and 255 This argument is a mask for specifying inputs to be activated with a logic 1 This mask is used on the inputs which have been enabled via the parameters m n or o USAGE DEFAULTS While Moving Yes In a Program Yes Command Line No RELATED COMMANDS RI on page 133 ININT AI on page 16 EXAMPLES A H1 JG 5000 BGX LOOP JP LOOP EN ININT STX MG INTERRUPT AMX CLEAR JP CLEAR IN 1 0 BGX RIO 82 Il Binary EC Default Value Default Format 3 0 mask only Return from Interrupt Interr
100. in thread is halted Since trippoint commands are used as program flow instructions during a running program they should not be implemented directly from the command line of the terminal Sending a trippoint command directly from the command line might cause an interruption in communications between the host PC and the controller until the trippoint is cleared As a brief introduction the following table lists the available commands and their basic usages AD after distance AI after input AM after move AP after absolute position AR after relative position AS at speed AT at time relative to a reference time AV after vector distance MC motion complete and in position MF after motion reverse MR after motion reverse WC wait for contour data to complete WT wait for time DMC 18x2 Command Reference Overview 7 Instruction Set 8 Overview Brushless Motor Commands BA Brushless axis BB Brushless phase BC Brushless calibration BD Brushless degrees BI Brushless inputs BM Brushless modulo BO Brushless offset BS Brushless setup BZ Brushless zero Contour Mode Commands CD Contour data CM Contour mode DT Contour time interval WC Wait for contour data ECAM Gearing EA Ecam master EB Enable ECAM EC ECAM table index EG ECAM go EM ECAM cycle EP ECAM interval EQ Disengage ECAM ET ECAM table entry GA Master axis for gearing GM Gantry mode GR Gear ratio for gearing Error Control Commands BL Ba
101. inate system vector points VP 1000 5000 New vector VP 8000 9000 New vector CSS Clear vectors specified in S coordinate system DMC 18X2 Command Reference CW FUNCTION Copyright information Data Adjustment bit on off DESCRIPTION The CW command has a dual usage The CW command will return the copyright information when the argument n is 0 Otherwise the CW command is used as a communications enhancement for use by the Servo Design Kit software When turned on the communication enhancement sets the MSB of unsolicited returned ASCII characters to 1 Unsolicited ASCII characters are those characters which are returned from the controller without being directly queried from the terminal This is the case when a program has a command that requires the controller to return a value or string ARGUMENTS CW n m where n 0 Causes the controller to return the copyright information n 1 Causes the controller to set the MSB of unsolicited returned characters to 1 n 2 Causes the controller to not set the MSB of unsolicited characters n Returns the copyright information for the controller mis 0 or optional m 0 Causes the controller to pause program execution when output FIFO is full until FIFO no longer full m 1 Causes the controller to continue program execution when output FIFO is full output characters after FIFO is full will be lost USAGE DEFAULTS While Moving Yes Default Value 2 0 In a Program Yes Default Format Command Line Yes
102. ine begins with the POSERR label The limit switch handling subroutine begins with the LIMSWI An RE at the end of these routines causes a return to the main program Care should be taken to be sure the error or limit switch conditions no longer occur to avoid re entering the subroutines If the program sequencer was waiting for a trippoint to occur prior to the error interrupt the trippoint condition is preserved on the return to the program if RE1 is used REO clears the trippoint To avoid returning to the main program on an interrupt use the ZS command to zero the subroutine stack ARGUMENTS REn where n 0 Clears the interrupted trippoint n 1 Restores state of trippoint no argument clears the interrupted trippoint USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line No RELATED COMMANDS POSERR Error Subroutine LIMSWI Limit Subroutine EXAMPLES A JP A EN Label for main program POSERR Begin Error Handling Subroutine MG ERROR Print message SB1 Set output bit 1 RE Return to main program and clear trippoint Hint An applications program must be executing for the LIMSWI and POSERR subroutines to function DMC 18X2 Command Reference RI FUNCTION Return from Interrupt Routine DESCRIPTION The RI command is used to end the interrupt subroutine beginning with the label ININT An RI at the end of this routine causes a return to the main program The RI command also re ena
103. ippoint which is used to hold up execution of the next command until after the specified time has elapsed The time is measured with respect to a defined reference time AT 0 establishes the initial reference AT n specifies n msec from the reference AT n specifies n msec from the reference and establishes a new reference after the elapsed time period ARGUMENTS AT n where n is a signed integer in the range 0 to 2 Billion n 0 defines a reference time at current time positive n waits n msec from reference negative n waits n msec from reference and sets new reference after elapsed time period AT n is equivalent to AT n AT lt old reference n gt USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes EXAMPLES The following commands are sent sequentially ATO Establishes reference time 0 as current time AT 50 Waits 50 msec from reference 0 AT 100 Waits 100 msec from reference 0 AT 150 Waits 150 msec from reference 0 and sets new reference at 150 AT 80 Waits 80 msec from new reference total elapsed time is 230 msec 22 AT Binary D2 DMC 18X2 Command Reference AV FUNCTION After Vector Distance DESCRIPTION The AV command is a trippoint which is used to hold up execution of the next command during coordinated moves such as VP CR or LI This trippoint occurs when the path distance of a sequence reaches the specified value The distance is measured from the start of a coordinated mov
104. is required to specify the end segment of a coordinated move sequence VE would follow the final VP or CR command in a sequence VE is equivalent to the LE command The VE command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS VEn No argument specifies the end of a vector sequence n Returns the length of the vector in counts USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _VEx contains the length of the vector in counts for the specified coordinate system S or T RELATED COMMANDS VM on page 166 Vector Mode VS on page 171 Vector Speed VA on page 162 Vector Acceleration VD on page 163 Vector Deceleration CR on page 45 Circle VP on page 168 Vector Position BG on page 28 Begin Sequence CS on page 46 Clear Sequence EXAMPLES VM XY Vector move in XY VP 1000 2000 Linear segment CR 0 90 180 Arc segment VP 0 0 Linear segment VE End sequence BGS Begin motion 164 VE DMC 18X2 Command Reference VF FUNCTION Variable Format DESCRIPTION The VF command allows the variables and arrays to be formatted for number of digits before and after the decimal point When displayed the value m represents the number of digits before the decimal point and the value n represents the number of digits after the decimal point When in hexadecimal the string will be preceded by a H
105. itch error conditions motion condition and motor state The value returned by this command is decimal and represents an 8 bit value decimal value ranges from 0 to 255 Each bit represents the following status information er o eane Note For active high or active low configuration CN command these bits are 1 when the switch is inactive and 0 when active ARGUMENTS TS xxxx where x is X Y Z W or any combination to specify the axis or axes No argument will provide the status for all axes USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 3 0 Command Line Yes OPERAND USAGE _TS contains the current status of the switches EXAMPLES V1 _TSY Assigns value of TSY to the variable V1 Vl Interrogate value of variable V1 015 returned value Decimal value corresponding to bit pattern 00001111 Y axis not in motion bit 7 has a value of 0 Y axis error limit not exceeded bit 6 has a value of 0 Y axis motor is on bit 5 has a value of 0 Y axis forward limit is inactive bit 3 has a value of 1 Y axis reverse limit is inactive bit 2 has a value of 1 Y axis home switch is high bit 1 has a value of 1 Y axis latch is not armed bit 0 has a value of 1 156 TS Binary DF DMC 18X2 Command Reference TT Binary DE FUNCTION Tell Torque DESCRIPTION The TT command reports the value of the analog output signal which is a number between 9 998 and 9 998 volts ARGUMENTS TT xxxx
106. listing will be in alphabetical order The size of each array will be included next to each array name in square brackets ARGUMENTS None USAGE While Moving In a Program Command Line RELATED COMMANDS LL on page 100 LS on page 103 LV on page 104 EXAMPLES LA CA 10 LA 5 NY 25 VA 17 DMC 18X2 Command Reference DEFAULTS Yes Yes Yes List Labels List Program List Variable Default Value Default Format LA 95 LE Binary B5 FUNCTION Linear Interpolation End DESCRIPTION LE Signifies the end of a linear interpolation sequence It follows the last LI specification in a linear sequence After the LE specification the controller issues commands to decelerate the motors to a stop The VE command is interchangeable with the LE command The LE command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS n Returns the total vector move length in encoder counts for the selected coordinate system S or T To select the coordinate system use the command CAS or CAT USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _LEx contains the total vector move length in encoder counts RELATED COMMANDS LI Binary B1 on page 98 Linear Distance BG on page 28 BGS Begin Sequence LM Binary B 0 on page 101 Linear Interpolation Mode VS on
107. ll sensors This function can be performed with one axis at a time The first parameter indicates the voltage level to be applied to each phase and the second parameter indicates the duration in milliseconds that the voltage will be applied This command returns status information regarding the setup of brushless motors The following information will be returned by the controller 1 Correct wiring of the brushless motor phases 2 An approximate value of the motor s magnetic cycle 3 The value of the BB command If hall sensors are used 4 The results of the hall sensor wiring test If hall sensors are used This command will turn the motor off when done and may be given when the motor is off Once the brushless motor is properly setup and the motor configuration has been saved in non volatile memory the BS command does not have to be re issued The configuration is saved by using the burn command BN Note In order to properly conduct the brushless setup the motor must be allowed to move a minimum of one magnetic cycle in both directions ARGUMENTS BSX v n where v is areal number between 0 and 10 n is a positive integer between 100 or 1000 USAGE DEFAULTS While Moving No Default Value of V 0 In a Program Yes Default Value of n 200 Command Line Yes EXAMPLES BSZ 2 900 Apply set up test to Z axis with 2 volts for 900 millisecond on each step DMC 18X2 Command Reference BS 35 36 BS RELATED COMMANDS BA
108. locates all the arrays n Returns the number of arrays available on the controller USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _DA contains the total number of arrays available For example before any arrays have been defined the operand _DA is 30 If one array is defined the operand _DA will return 29 RELATED COMMANDS DM on page 52 Dimension Array EXAMPLES Cars and Sales are arrays and Total is a variable DM Cars 400 Sales 50 Dimension 2 arrays Total 70 Assign 70 to the variable Total DA Cars 0 Sales 0 Total Deallocate the 2 arrays amp variables DA Deallocate all arrays DA Deallocate all variables and all arrays Note Since this command deallocates the spaces and compacts the array spaces in the memory it is possible that execution of this command may take longer than 2ms DMC 18X2 Command Reference DC Binary 91 FUNCTION Deceleration DESCRIPTION The Deceleration command DC sets the linear deceleration rate of the motors for independent moves such as PR PA and JG moves The parameters will be rounded DOWN to the nearest factor of 1024 and have units of counts per second squared ARGUMENTS DC n n n n or DCX n where n is an unsigned numbers in the range 1024 to 67107840 n Returns the deceleration value for the specified axes USAGE DEFAULTS While Moving Yes Default Value 256000 In a Program Yes De
109. m n where m is the scale factor in counts degree in the range between 127 and 127 with a fractional resolution of 0 004 m Returns the first position value for the tangent axis An When operating with stepper motors m is the scale factor in steps degree n is the absolute position at which the tangent angle is zero in the range between 2 10 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _TN contains the first position value for the tangent axis This allows the user to correctly position the tangent axis before the motion begins RELATED COMMANDS VM on page 166 Vector mode CR Binary B3 on page 45 Circular Command EXAMPLES CAS Specify the S coordinate system VM X Y Z Specify coordinated mode for X and Y axis Z axis is tangent to the motion path TN 100 50 Specify scale factor as 100 counts degree and 50 counts at which tangent angle is zero VP 1000 2000 Specify vector position X Y VE End Vector BGS Begin coordinated motion with tangent axis DMC 18X2 Command Reference TN Binary B4 153 TP Binary D9 FUNCTION Tell Position DESCRIPTION This command returns the current position of the motor s ARGUMENTS TP xxxx where x is X Y Z W or any combination to specify the axis or axes USAGE DEFAULTS While Moving Yes In a Program Yes Command Line Yes OPERAND USAGE Default Value Default Format _TPx contains the
110. maximum error AP tests for absolute position Use the AD command to measure incremental distances DMC 18X2 Command Reference AP Binary CE 19 AR Binary CF FUNCTION After Relative Distance DESCRIPTION The After Relative AR command is a trippoint used to control the timing of events This command will hold up the execution of the following command until one of the following conditions have been met 1 The actual motor position crosses the specified relative distance from either the start of the move or the last AR or AD command 2 The motion profiling on the axis is complete 3 The commanded motion is in the direction which moves away from the specified position The units of the command are quadrature counts Only one axis may be specified at a time The motion profiler must be on or the trippoint will automatically be satisfied Note AR will be affected when the motion smoothing time constant IT is not 1 See IT command for further information ARGUMENTS AR n n n n or ARX n where n is an unsigned integer in the range 0 to 2147483647 decimal USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS AV on page 23 Trippoint for after vector position for coordinated moves AP Binary CE on page 19 Trippoint for after absolute position EXAMPLES A DP 0 0 0 0 Begin Program JG 50000 7000 Specify speeds BG XW Begin motion B Label AR 25000 After
111. mmand VS or the operators lt and gt used with CR VP and LI commands The ratio can be a value between 0 and 10 with a resolution of 0001 VR takes effect immediately and will ratio all the following vector speed commands VR doesn t ratio acceleration or deceleration but the change in speed is accomplished by accelerating or decelerating at the rate specified by VA and VD ARGUMENTS VR s t where s and t are between 0 and 10 with a resolution of 0001 The value specified by s is the vector ratio to apply to the S coordinate system and t is the value to apply to the T coordinate system s Returns the value of the vector speed ratio for the S coordinate plane t Returns the value of the vector speed ratio for the T coordinate plane USAGE DEFAULTS While Moving Yes Default Value 1 In a Program Yes Default Format Command Line Yes OPERAND USAGE _VRx contains the vector speed ratio of the specified coordinate system S or T RELATED COMMANDS VS on page 171 Vector Speed EXAMPLES A Vector Program VMXY Vector Mode VP 1000 2000 Vector Position CR 1000 0 360 Specify Arc VE End Sequence VS 2000 Vector Speed BGS Begin Sequence AMS After Motion JP A Repeat Move SPEED Speed Override VR AN 1 1 Read analog input compute ratio JP SPEED Loop XQ A 0 XQ SPEED Execute task 0 and 1 simultaneously Note VR is useful for feedrate override particularly when specifying the speed of individual segments using the operator l
112. mmand sets the timeout in msec to declare an error if the MC command is active and the motor is not at or beyond the actual position within n msec after the completion of the motion profile If a timeout occurs then the MC trippoint will clear and the stopcode will be set to 99 An application program will jump to the special label MCTIME The RE command should be used to return from the MCTIME subroutine ARGUMENTS TW n n n n or TWX n where n specifies the timeout in msec n ranges from 0 to 32767 msec n l Disables the timeout n Returns the timeout in msec for the MC command for the specified axis USAGE DEFAULTS While Moving Yes Default Value 32766 In a Program Yes Default Format Command Line Yes OPERAND USAGE _TWx contains the timeout in msec for the MC command for the specified axis RELATED COMMANDS MC Binary C9 on page 106 Motion Complete trippoint DMC 18X2 Command Reference TW Binary CA 159 160 Ul UI FUNCTION User Interrupt DESCRIPTION The UI command causes an interrupt on the selected IRQ line There are 16 user interrupts Prior to using the UI command one IRQ line must be enabled on the controller and the data 2 and 4 written to the control register at address N 1 Interrupts may be enabled through the Plug and Play feature An interrupt service routine must also be incorporated in your host program The interrupt condition can be read by writing a 6 to address N and then reading address N
113. mp to occur The destination is the specified label before the comma DMC 18X2 Command Reference JP 89 JS FUNCTION Jump to Subroutine DESCRIPTION The JS command will change the sequential order of execution of commands in a program If the jump is taken program execution will continue at the line specified by the destination parameter which can be either a line number or label The line number of the JS command is saved and after the next EN command is encountered End of subroutine program execution will continue with the instruction following the JS command There can be a JS command within a subroutine Multiple conditions can be used in a single jump statement The conditional statements are combined in pairs using the operands amp and I The amp operand between any two conditions requires that both statements must be true for the combined statement to be true The operand between any two conditions requires that only one statement be true for the combined statement to be true Note Each condition must be placed in parenthesis for proper evaluation by the controller Note Subroutines may be nested 16 deep in the controller A jump is taken if the specified condition is true Conditions are tested with logical operators The logical operators are lt less than or equal to lt less than or equal to gt greater than gt greater than or equal to equal to lt gt not equal ARGUMENTS JS
114. n Capture 17 Teach 129 Register 160 Reset 3 47 136 37 150 Master Reset 3 137 138 150 Standard 150 S Sample Time Update Rate 150 Save Burn 32 SB Set Bit 40 139 Scaling Ellipse Scale 70 S Curve 21 Selecting Address 130 160 Set Bit 40 139 Slew 86 88 142 Smoothing 87 94 KS 94 Special Label 106 159 Specification 96 98 101 143 170 Stack 82 132 174 176 Standard Reset 150 Status 43 47 48 59 81 118 130 144 149 156 176 Interrogation 86 105 Stop Code 140 Step Motor 94 111 KS Smoothing 87 94 Smoothing 94 Stop Abort 13 Stop Code 1 17 42 50 69 73 77 80 85 106 107 110 140 159 Stop Motion 143 145 147 148 154 156 157 158 Subroutine 65 82 90 132 159 176 Syntax Error Not a valid bookmark in entry on page 2 T Tangent 153 166 Teach 129 Data Capture 129 Latch 17 44 134 Position Capture 17 Record 129 Tell Error Index 179 Position Error 15 92 118 135 Terminal 47 Theory 91 93 Time Clock 150 152 Update Rate 150 TIME 150 Time Interval 43 54 129 Timeout 106 159 MCTIME 106 159 Torque Limit 151 Trigger 21 69 Trippoint 15 18 19 20 59 68 81 82 106 107 110 132 159 174 U Update Rate 150 Upload 161 V Variable Internal 18 Vector Acceleration 162 64 Vector Mode 70 168 Circle 39 45 70 Circular Interpolation 130 166 Clear Sequence 46 Ellipse Scale 70 Feedrate 170 Tangent 153 166 Vector Speed 39 45 98 101 142 X XQ
115. n a sequence gt 2 billion More than 511 segments in a sequence Contouring record range error USAGE DEFAULTS While Moving Yes In a Program Yes Not in a Program Yes USAGE _TC contains the error code 3 4 100 5 Contour data being sent too slowly Controller has GL1600 not GL1800 Not a valid number Too many elements Only X Y Z W valid operand SM jumper needs to be installed for stepper motor operation Not valid when running ECAM Improper index into ET must be 0 256 No master axis defined for ECAM Master axis modulus greater than 256 EP value Not valid when axis performing ECAM EB1 command must be given first Default Value Default Format 3 0 EXAMPLES GF32 Bad command TC Tell error code 001 Unrecognized command DMC 18X2 Command Reference TD Binary DB FUNCTION Tell Stepper Counts DESCRIPTION rn When operating with stepper motors the TD command returns the number of counts that have been output by the controller ARGUMENTS TD xxxx where x is X Y Z W or any combination to specify the axis or axes No argument will provide the stepper pulses output for all axes USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Not in a Program Yes OPERAND USAGE _TDx contains the number of steps output on that axis RELATED COMMANDS DE Binary 98 on page 50 Dual Encoder EXAMPLES PF 7 Position format of 7 TD Return X Y Z W S
116. n enters the variable value followed by a carriage return The entered value is assigned to the specified variable name The IN command holds up execution of the following commands in a program until a carriage return or semicolon is detected If no value is given prior to a semicolon or carriage return the previous variable value is kept Input Interrupts Error Interrupts and Limit Switch Interrupts will still be active The IN command may only be used in thread 0 ARGUMENTS IN m n where m is prompt message nis the variable name The limit on the number of characters for n and m are such that the total number of characters per line are 40 characters or less USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Position Format Command Line No EXAMPLES Operator specifies length of material to be cut in inches and speed in inches sec 2 pitch lead screw 2000 counts rev encoder A Program A IN Enter Speed in sec V1 Prompt operator for speed IN Enter Length in V2 Prompt for length V3 V1 4000 Convert units to counts sec V4 V2 4000 Convert units to counts SP V3 Speed command PR V4 Position command BGX Begin motion AMX Wait for motion complete MG MOVE DONE Print Message EN End Program DMC 18X2 Command Reference IN 85 IP FUNCTION Increment Position DESCRIPTION The IP command allows for a change in the command position while the motor is moving This command does not require
117. nce Specify vector motion in the X and Y plane Specify vector speed Generate circle with radius of 1000 counts start at 0 degrees and complete Generate circle with radius of 1000 counts start at 0 degrees and complete End Sequence Start motion CR Binary B3 45 CS FUNCTION Clear Sequence DESCRIPTION The CS command will remove VP CR or LI commands stored in a motion sequence for the S or T coordinate systems After a sequence has been executed the CS command is not necessary to put in a new sequence This command is useful when you have incorrectly specified VP CR or LI commands ARGUMENTS CSS or CST where S and or T can be used to clear the sequence buffer for the S or T coordinate system USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _CSx contains the segment number in the sequence specified by x S or T This operand is valid in the Linear mode LM Vector mode VM RELATED COMMANDS CR Binary B3 on page 45 Circular Interpolation Segment LI Binary B1 on page 98 Linear Interpolation Segment LM Binary B 0 on page 101 Linear Interpolation Mode VM on page 166 Vector Mode VP Binary B2 on page 168 Vector Position EXAMPLES CLEAR Label CAT Specify the T coordinate system vector points VP 1000 2000 Vector position VP 4000 8000 Vector position CST Clear vectors specified in T coordinate system CAS Specify the T coord
118. nd AB will shut off the motors for any axis in which the off on error function is enabled see command OE AB aborts motion on all axes in motion and cannot stop individual axes ARGUMENTS AB n where n 0 The controller aborts motion and program n 1 The controller aborts motion only No argument will cause the controller to abort the motion and program USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _AB gives state of Abort Input inactive and 0 active RELATED COMMANDS SH Binary AA on page 141 Re enables motor OE Binary 8D on page 118 Specifies Off On Error EXAMPLES AB Stops motion OE 1 1 1 1 Enable off on error AB Shuts off motor command and stops motion A Label Start of program JG 20000 Specify jog speed on X axis BGX Begin jog on X axis WT 5000 Wait 5000 msec ABI Stop motion without aborting program WT 5000 Wait 5000 milliseconds SH Servo Here JP A Jump to Label A EN End of the routine Hint Remember to use the parameter I following AB if you only want the motion to be aborted Otherwise your application program will also be aborted DMC 18X2 Command Reference AB Binary A2 13 AC Binary 90 FUNCTION Acceleration DESCRIPTION The Acceleration AC command sets the linear acceleration rate of the motors for independent moves such as PR PA and JG moves The parameters input will be rounded DOWN to the nearest f
119. nd sets the current motor position and current command positions to a user specified value The units are in quadrature counts This command will set both the TP and RP values run The DP command sets the commanded reference position for axes configured as steppers The units are in steps Example DP 0 This will set the DE value to zero but will not effect the TP value ARGUMENTS DP n n n n or DPX n where nis a signed integer in the range 2147483648 to 2147483647 decimal n Returns the current position of the motor for the specified axes USAGE DEFAULTS While Moving No Default Value 0 0 0 0 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _DPx contains the current position of the specified axis RELATED COMMANDS PEF on page 122 Position Formatting EXAMPLES DP 0 100 200 400 Sets the current position of the X axis to 0 the Y axis to 100 the Z axis to 200 and the W axis to 400 DP 50000 Sets the current position of Y axis to 50000 The Y Z and W axes remain unchanged DP Interrogate the position of X Y Z and W axis 0000000 0050000 0000200 0000400 Returns all the motor positions DP Interrogate the position of X axis 0000000 Returns the X axis motor position Hint The DP command is useful to redefine the absolute position For example you can manually position the motor by hand using the Motor Off command MO Turn the servo motors back on with SH and then use DPO to redefine th
120. ng 77 79 Ellipse Scale 70 Encoder Auxiliary Encoder 42 77 Index Pulse 74 80 Quadrature 15 19 20 23 30 39 41 45 53 69 86 107 110 121 124 135 154 158 168 Index 177 Error Codes 145 146 Error Code 1 17 42 50 69 73 77 80 85 106 107 110 140 159 Error Handling 132 Error Limit 69 156 Off On Error 13 118 Execute Program 175 F Feedforward Acceleration 72 Feedrate 170 Filter Parameter Gain 92 Integrator 84 Find Edge 73 Formatting 105 Function 62 63 G Gain 92 Gear Ratio 77 79 Gearing 77 79 H Halt 16 18 81 143 Abort 13 Off On Error 13 118 Stop Motion 143 145 147 148 154 156 157 158 Hardware 30 75 137 Address 130 160 Clear Bit 40 Jumper 137 Set Bit 40 139 Torque Limit 151 Home Input 73 Homing 73 80 Find Edge 73 I O Clear Bit 40 Home Input 73 Set Bit 40 139 Independent Motion Jog 49 86 88 142 Index Pulse 74 80 ININT 16 64 65 82 133 Input Interrupt 64 65 82 83 144 ININT 16 64 65 82 133 178 o Index Integrator 84 Internal Variable 18 Interrogation 86 105 Interrupt 32 60 64 65 82 83 85 129 132 144 160 176 Invert 42 111 J Jog 49 86 88 142 Jumper 137 K Keyword 97 102 150 TIME 150 KS 94 L Label 51 82 89 103 106 132 137 159 175 Special Label 106 159 Latch 17 44 134 Arm Latch 17 Data Capture 129 Position Capture 17 Record 129 Teach 129 Limit Switch 44 75 79 85 97 102 132 140 14
121. nstants for x y z w axes IT Return independent time constant for X axis 0 8 DMC 18X2 Command Reference IT Binary 93 87 JG Binary A8 FUNCTION Jog DESCRIPTION The JG command sets the jog mode The parameters following the JG set the slew speed of the axes Use of the question mark returns the previously entered value or default value The units of this are counts second ARGUMENTS JG n n n n or JGX n where nis a signed numbers in the range 0 to 12 000 000 decimal For stepper motor operation the maximum value is 3 000 000 steps second n Returns the absolute value of the jog speed for the specified axis USAGE DEFAULTS While Moving Yes Default Value 16385 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _JGx contains the absolute value of the jog speed for the specified axis RELATED COMMANDS BG on page 28 Begin ST Binary Al on page 143 Stop AC on page 14 Acceleration DC on page 49 Deceleration IP on page 86 Increment Position TV on page 158 Tell Velocity EXAMPLES JG 100 500 2000 5000 Set for jog mode with a slew speed of 100 counts sec for the X axis 500 counts sec for the Y axis 2000 counts sec for the Z axis and 5000 counts sec for W axis BG Begin Motion JG 2000 Change the Z axis to slew in the negative direction at 2000 counts sec 88 JG Binary A8 DMC 18X2 Command Reference JP FUNCTION Jump to Program Location DESCRIPTION The JP
122. ntrol gt D or ARGUMENTS QD array start end where array is valid array name start is first element of array default 0 end is last element of array default last element USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format Position Format Command Line Yes RELATED COMMANDS QU on page 127 Upload array HINT Using Galil terminal software the command can be used in the following manner 1 Set the timeout to 0 2 Send the command QD 3a Use the send file command to send the data file OR 3b Enter data manually from the terminal End the data entry with the character DMC 18X2 Command Reference QD 125 126 QR QR FUNCTION Data Record DESCRIPTION The QR command causes the controller to return a record of information regarding controller status This status information includes 4 bytes of header information and specific blocks of information as specified by the command arguments The details of the status information is described in Chapter 4 of the user s manual ARGUMENTS QR xxxxxx where x is X Y Z W S T or I or any combination to specify the axis axes sequence or I O status S and T represent the S and T coordinated motion planes I represents the status of the I O Chapter 4 of the users manual provides the definition of the data record information USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage
123. o 20000 decimal with resolution of 125 microseconds In the Fast firmware mode the following functions are disabled Gearing ECAM PL Steppers Trippoints in main thread and TV Using the fast firmware the minimum sample times are the following 125 usec for the DMC 1812 and DMC 1822 250 usec for the DMC 1832 and DMC 1842 With the normal firmware In the normal mode the DMC 1812 and DMC 1822 have minimum sample times of 250 usec 375 usec for the DMC 1832 and DMC 1842 n returns the value of the sample time USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _TM contains the value of the sample time EXAMPLES TM 1000 Turn off internal clock TM 2000 Set sample rate to 2000 EQN mu sec This will cut all speeds in half and all acceleration in fourths TM 1000 Return to default sample rate 152 TM Binary E5 DMC 18X2 Command Reference TN Binary B4 FUNCTION Tangent DESCRIPTION The TN m n command describes the tangent axis to the coordinated motion path m is the scale factor in counts degree of the tangent axis n is the absolute position of the tangent axis where the tangent axis is aligned with zero degrees in the coordinated motion plane The tangent axis is specified with the VM n m p command where p is the tangent axis The tangent function is useful for cutting applications where a cutting tool must remain tangent to the part ARGUMENTS TN
124. o specify the axis or axes x Returns the number of spaces available in the sequence buffer for additional LI commands USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _LMx contains the number of spaces available in the sequence buffer for the x coordinate system S or T RELATED COMMANDS LE Binary B5 on page 96 Linear end LI Binary B1 on page 98 Linear Distance VA on page 162 Vector acceleration VS on page 171 Vector Speed VD on page 163 Vector deceleration AV on page 23 Vector distance CS on page 46 _CS Sequence counter EXAMPLES LM XYZW Specify linear interpolation mode VS 10000 VA 100000 VD 1000000 Specify vector speed acceleration and deceleration LI 100 200 300 400 Specify linear distance LI 200 300 400 500 Specify linear distance LE BGS Last vector then begin motion DMC 18X2 Command Reference LM BinaryB0 101 _LR FUNCTION Reverse Limit Switch Operand Keyword DESCRIPTION The _LR operand contains the state of the reverse limit switch for the specified axis The operand is specified as _LLRx where x is the specified axis Note This operand is affected by the configuration of the limit switches set by the command CN For CN 1 _LRx 1 when the limit switch input is inactive _LRx 0 when the limit switch input is active For CN 1 _LRx 0 when the limit switch input is inactive _LRx 1 when the limit switch
125. ommand is decimal and represents an 8 bit value decimal value ranges from 0 to 255 Each bit represents one input ARGUMENTS TIn n 0 will return the decimal representation for inputs 1 through 8 es eh O n returns the Input Status for Inputs through 8 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _TIn contains the status byte of the input block Note that the operand can be masked to return only specified bit information see the section on Bit wise operations in the DMC 1802 User Manual EXAMPLES TI 08 Input 4 is high others low TI 00 All inputs low Input _TI Sets the variable Input with the TI value TI 255 All inputs high DMC 18X2 Command Reference TI Binary E0 149 TIME FUNCTION Time Operand Keyword DESCRIPTION The TIME operand returns the value of the internal free running real time clock The returned value represents the number of servo loop updates and is based on the TM command The default value for the TM command is 1000 With this update rate the operand TIME will increase by 1 count every update of approximately 1000usec Note that a value of 1000 for the update rate TM command will actually set an update rate of 1 1024 seconds Thus the value returned by the TIME operand will be off by 2 4 of the actual time The clock is reset to 0 with a standard reset or a master reset won The keyword TIME do
126. on Any non zero value of the expression results in a one on the output ARGUMENTS OB n expression where n denotes the output bit expression is any valid logical expression variable or array element USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes EXAMPLES OB 1 POS 1 If POS 1 is non zero Bit 1 is high If POS 1 is zero Bit 1 is low OB 2 IN 1 amp IN 2 _ If Input 1 and Input 2 are both high then Output 2 is set high OB 3 COUNT 1 If the element 1 in the array is zero clear bit 3 OB N COUNT 1 If element 1 in the array is zero clear bit N 116 OB Binary E9 DMC 18X2 Command Reference OC FUNCTION Output Compare DESCRIPTION The OC command allows the generation of output pulses based on one of the main encoder positions The output is a low going pulse with a duration of approximately 600 nanoseconds and is available at the output compare signal labeled CMP on the ICM 1900 or ICM 2900 This function cannot be used with any axis configured for a step motor and the auxiliary encoder of the corresponding axis can not be used while using this function Note The OC function requires that the main encoder and auxiliary encoders be configured exactly the same see the command CE For example CE 0 CE 5 CE 10 or CE 15 ARGUMENTS OCx m n where x X Y Zor W specifies which encoder input to be used m Absolute position for first pulse Integer between 2
127. or each axis in the Linear Interpolation LM mode LI parameters are relative distances given with respect to the current axis positions Up to 511 LI specifications may be given ahead of the Begin Sequence BGS command Additional LI commands may be sent during motion when the controller sequence buffer frees additional spaces for new vector segments The Linear End LE command must be given after the last LI specification in a sequence This command tells the controller to decelerate to a stop at the last LI command It is the responsibility of the user to keep enough LI segments in the controller s sequence buffer to ensure continuous motion LM returns the available spaces for LI segments that can be sent to the buffer 511 returned means the buffer is empty and 511 LI segments can be sent A zero means the buffer is full and no additional segments can be sent It should be noted that the controller computes the vector speed based on the axes specified in the LM mode For example LM XYZ designates lingar injerpojation for the X Y and Z axes The speed of these axes will be computed from VS XS YS ZS where XS YS and ZS are the speed of the X Y and Z axes If the LI command specifies only X and Y the speed of Z will still be used in the vector calculations The controller always uses the axis specifications from LM not LI to compute the speed The parameter n is optional and can be used to define the vector speed that is attached to the motion
128. or in a coordinated motion sequence The parameter input will be rounded DOWN to the nearest factor of 1024 The units of the parameter is counts per second squared ARGUMENTS VD s t where s and t are unsigned integers in the range 1024 to 68431360 s represents the vector deceleration for the S coordinate system and t represents the vector acceleration for the T coordinate system s Returns the value of the vector deceleration for the S coordinate plane t Returns the value of the vector deceleration for the T coordinate plane USAGE DEFAULTS While Moving No Default Value 262144 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _VDx contains the value of the vector deceleration for the specified coordinate system S or T RELATED COMMANDS VA on page 162 VS on page 171 VP on page 168 CR on page 45 VE on page 164 VM on page 166 BG on page 28 VT on page 172 EXAMPLES VECTOR VMXY VA1000000 VD 5000000 VS 2000 VP 10000 20000 VE BGS Vector Acceleration Vector Speed Vector Position Circle Vector End Vector Mode Begin Sequence Smoothing constant S curve Vector Program Label Specify plane of motion Vector Acceleration Vector Deceleration Vector Speed Vector Position End Vector Begin Sequence Note This command is not valid in the DMC 1812 DMC 18X2 Command Reference VD Binary B8 163 VE FUNCTION Vector Sequence End DESCRIPTION VE
129. ormat Command Line Yes OPERAND USAGE _DEXx contains the current position of the specified stepper axis RELATED COMMANDS PF on page 122 Position Formatting EXAMPLES DE 0 100 200 400 Set the current stepper encoder position to 0 100 200 400 on X Y Z and W axes DE Return encoder positions if using steppers ENCX _DEX Assign stepper encoder position of X axis to the variable ENCX 50 DE Binary 98 DMC 18X2 Command Reference DL FUNCTION Download DESCRIPTION The DL command transfers a data file from the host computer to the controller Instructions in the file will be accepted as a datastream without line numbers The file is terminated using lt control gt Z lt control gt Q lt control gt D or DO NOT insert spaces before each command If no parameter is specified downloading a data file will clear all programs in the controllers RAM The data is entered beginning at line 0 If there are too many lines or too many characters per line the controller will return a To download a program after a label specify the label name following DL The argument may be used with DL to append a file at the end of the program in RAM ARGUMENTS DL n where n noargument Downloads program beginning at line 0 Erases programs in RAM n Label Begins download at line following Label n Begins download at end of program in RAM USAGE DEFAULTS While Moving Yes Default Value In a Program No Default Format Comman
130. ormatting 50 counts with set acceleration and speed Label Set acceleration Jog at 10000 counts sec rate Wait 1000 msec Move the motor 10 counts instantaneously Stop Motion DMC 18X2 Command Reference IT Binary 93 FUNCTION Independent Time Constant Smoothing Function DESCRIPTION The IT command filters the acceleration and deceleration functions in independent moves of JG PR PA type to produce a smooth velocity profile The resulting profile has continuous acceleration and results in reduced mechanical vibrations IT sets the bandwidth of the filter where 1 means no filtering and 0 004 means maximum filtering Note that the filtering results in longer motion time The use of IT will not effect the trippoints AR and AD The trippoints AR amp AD monitor the profile prior to the IT filter and therefore can be satisfied before the actual distance has been reached if IT is NOT 1 ARGUMENTS IT n n n n or ITX n where nis a positive numbers in the range between 0 004 and 1 0 with a resolution of 1 256 n Returns the value of the independent time constant for the specified axis USAGE DEFAULTS While Moving Yes Default Value 1 In a Program Yes Default Format 7 0 Command Line Yes OPERAND USAGE _ITx contains the value of the independent time constant for the specified x axis RELATED COMMANDS VT on page 172 Vector Time Constant for smoothing vector moves EXAMPLES IT 0 8 0 6 0 9 0 1 Set independent time co
131. ote When using pulse and direction encoders the pulse signal is connected to CHA and the direction signal is connected to CHB 42 CE Binary 8C DMC 18X2 Command Reference CM Binary BD FUNCTION Contouring Mode DESCRIPTION The Contour Mode is initiated by the instruction CM This mode allows the generation of an arbitrary motion trajectory with any of the axes The CD command specified the position increment and the DT command specifies the time interval The command CM can be used to check the status of the Contour Buffer A value of 1 returned from the command CM indicates that the Contour Buffer is full A value of 0 indicates that the Contour Buffer is empty ARGUMENTS CM xxxx where x is X Y Z W or any combination to specify the axis axes for contour mode n Returns a if the contour buffer is full and 0 if the contour buffer is empty USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 2 0 Command Line Yes OPERAND USAGE _CM contains a 0 if the contour buffer is empty otherwise contains a 1 RELATED COMMANDS CD on page 41 Contour Data WC on page 173 Wait for Contour DT on page 54 Time Increment EXAMPLES V _CM V Return contour buffer status CM Return contour buffer status CM XZ Specify X Z axes for Contour Mode DMC 18X2 Command Reference CM Binary BD 43 CN Binary E6 FUNCTION Configure DESCRIPTION The CN command configures the polarity of
132. otion complete B 5 32 F motion complete 8192 Application program stopped e fomen e fo 7 128 H motion complete 32768 Inputs uses n for mask The conditions must be re enabled after each occurrence 60 El Binary ED DMC 18X2 Command Reference USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes RELATED COMMANDS UI on page 160 User interrupt EXAMPLES 1 Specify interrupts for all axes motion complete and limit switch Enable bits 8 and 10 m 28 210 256 1024 1280 EI 1280 2 Specify interrupt on Input 3 Enable bit 15 on m and bit 2 on n m 215 32768 n 22 4 EI 32768 4 DMC 18X2 Command Reference El Binary ED 61 62 ELSE ELSE FUNCTION Else function for use with IF conditional statement DESCRIPTION The ELSE command is an optional part of an IF conditional statement The ELSE command must occur after an IF command and it has no arguments It allows for the execution of a command only when the argument of the IF command evaluates False If the argument of the IF command evaluates false the controller will skip commands until the ELSE command If the argument for the IF command evaluates true the controller will execute the commands between the IF and ELSE command ARGUMENTS ELSE USAGE While Moving In a Program Command Line RELATED COMMANDS IF on page 83 ENDIF on page 65 EXAMPLES IF IN 1 0 IF IN 2
133. ple a 3 axis controller with X using sinusoidal commutation will require 4 DACs DMC 1842 where the second DAC for the X will be the W axis motor command signal ARGUMENTS BA xx where x is X Y Z or any combination to specify the axis axes for sinusoidal commutation brushless axes No argument clears all axes configured for sinusoidal commutation USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BAx indicates the axis number of the auxiliary DAC used for the second phase of the selected sinusoidal axis The axis numbers start with zero for the X axis DAC If the motor is not configured as brush type or stepper motor _BAx contains 0 RELATED COMMANDS BB Binary 9E on page 25 Brushless Phase Begins BC on page 26 Brushless Commutation BD Binary 9D on page 27 Brushless Degrees BI on page 29 Brushless Inputs BM Binary 9B on page Brushless Modulo 31 BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup BZ on page 38 Brushless Zero DMC 18X2 Command Reference BB Binary 9E FUNCTION Brushless Phase Begins DESCRIPTION The BB function describes the position offset between the Hall transition point and 6 0 for sinusoidally commutated motor This command must be saved in non volatile memory to be effective upon reset ARGUMENTS BB n n n n or BAX n where n is a signed integer which represent the phase offset of
134. rdinate system 002000 Hint Vector speed can be attached to individual vector segments For more information see description of VP CR and LI commands DMC 18X2 Command Reference VS Binary B9 171 VT Binary B6 FUNCTION Vector Time Constant S curve DESCRIPTION The VT command filters the acceleration and deceleration functions in vector moves of VM LM type to produce a smooth velocity profile The resulting profile has continuous acceleration and results in reduced mechanical vibrations VT sets the bandwidth of the filter where 1 means no filtering and 0 004 means maximum filtering Note that the filtering results in longer motion time ARGUMENTS VT s t where s and t are unsigned numbers in the range between 0 004 and 1 0 with a resolution of 1 256 The value s applies to the S coordinate system and t applies to the T coordinate system s Returns the value of the vector time constant for the S coordinate plane t Returns the value of the vector time constant for the T coordinate plane USAGE DEFAULTS While Moving Yes Default Value 1 0 In a Program Yes Default Format 1 4 Command Line Yes OPERAND USAGE _VT contains the vector time constant RELATED COMMANDS IT on page 87 Independent Time Constant for smoothing independent moves EXAMPLES VT 0 8 Set vector time constant for S coordinate system VT Return vector time constant for S coordinate system 0 8 172 VT Binary B6 DMC 18X2 Command Reference
135. rmat Command Line Yes OPERAND USAGE _EGx contains ECAM status for specified axis 0 axis is not engaged 1 axis is engaged RELATED COMMANDS EA on page 55 Choose ECAM master EB Binary C4 on page 56 Enable ECAM EC Binary C6 on page 57 Set ECAM table index EM Binary C1 on page 63 Specify ECAM cycle EP Binary C2 on page 67 Specify ECAM table intervals amp staring point EQ Binary C5 on page 68 Disengage ECAM ET Binary CO on page 71 ECAM table EXAMPLES EG 700 1300 Engages the X and Y axes at the master position 700 and 1300 respectively B _EPY Return the status of Y axis 1 if engaged Note This command is not a trippoint This command will not hold the execution of the program flow If the execution needs to be held until master position is reached use MF or MR command DMC 18X2 Command Reference EG Binary C3 59 EI Binary ED FUNCTION Enable Interrupts DESCRIPTION The EI command enables interrupt conditions such as motion complete or excess error The conditions are selected by the parameter m where m is the bit mask for the selected conditions as shown below Prior to using interrupts interrupts must be configured for your controller An interrupt service routine must also be incorporated in your host program ARGUMENTS EI mn where EI 0 clears the interrupt queue m is interrupt condition mask nis input mask BIT m CONDITION NO 28T NOY aaa EC CONDITION All axes m
136. s the cycle of the specified axis RELATED COMMANDS EA on page 55 Choose ECAM master EB on page 56 Enable ECAM EC on page 57 Set ECAM table index EG on page 59 Engage ECAM EP on page 67 Specify ECAM table intervals amp staring point EQ on page 68 Disengage ECAM ET on page 71 ECAM table EXAMPLES EAZ Select Z axis as master for ECAM EM 0 3000 2000 Define the changes in X and Y to be 0 and 3000 respectively Define master cycle as 2000 V _EMX Return cycle of X DMC 18X2 Command Reference EM Binary C1 63 EN FUNCTION End DESCRIPTION The EN command is used to designate the end of a program or subroutine If a subroutine was called by the JS command the EN command ends the subroutine and returns program flow to the point just after the JS command The EN command is used to end the automatic subroutines MCTIME and CMDERR USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line No RELATED COMMANDS RE on page 132 Return from error subroutine RT on page 133 Return from interrupt subroutine EXAMPLES A Program A PR 500 Move X axis forward 500 counts BGX Pause the program until the X axis completes the motion AMX Move X axis forward 1000 counts PR 1000 Set another Position Relative move BGX Begin motion EN End of Program Note Instead of EN use the RE command to end the error subroutine POSERR and limit subroutine LIMSWI Use the RI command to
137. stance DESCRIPTION The After Distance AD command is a trippoint used to control the timing of events This command will hold up the execution of the following command until one of the following conditions have been met 1 The commanded motor position crosses the specified relative distance from the start of the move 2 The motion profiling on the axis is complete 3 The commanded motion is in the direction which moves away from the specified position The units of the command are quadrature counts Only one axis may be specified at a time The motion profiler must be on or the trippoint will automatically be satisfied Note AD will be affected when the motion smoothing time constant IT is not 1 See IT command for further information ARGUMENTS AD n n n n or ADX n where n is an unsigned integers in the range 0 to 2147483647 decimal USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS AV on page 23 After distance for vector moves EXAMPLES A DP0 0 0 0 Begin Program Define position to 0 on all axes PR 10000 20000 30000 40000 Specify positions BG Begin motion AD 5000 After X reaches 5000 MG Halfway to X TPX Send message AD 10000 After Y reaches 10000 MG Halfway to Y TPY Send message AD 15000 After Z reaches 15000 MG Halfway to Z TPZ Send message AD 20000 After W reaches 20000 MG Halfway to W TPW Send message EN End Program
138. system component such as encoder or amplifier DMC 18X2 Command Reference ER Binary 88 69 70 ES ES FUNCTION Ellipse Scale DESCRIPTION The ES command divides the resolution of one of the axes in a vector mode VM This function allows for correction generation of circular motion when encoder resolutions differ It also allows for the generation of an ellipse instead of a circle The command has two parameters m and n The arguments m and n apply to the axes designated by the command VMyy x and y are the two axes to be used in vector mode When m gt n the resolution of the first axis x will be divided by the ratio m n When m lt n the resolution of the second axis y will be divided by n m The resolution change applies for the purpose of generating the VP and CR commands The result of this command is to cause one axis to move the distance specified by the CR and VP commands and the other axis to move a larger distance The ES command will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT ARGUMENTS ES m n m and n are positive integers in the range between 1 and 65 535 USAGE While Moving In a Program Command Line RELATED COMMANDS VM on page 166 CR on page 45 VP on page 168 EXAMPLES VMXY ES3 4 VMZX ES2 3 where DEFAULTS Yes Yes Yes Vector Mode Circle move Vector position Divide Y resolution by 4 3 Divide X resolu
139. t and gt 170 VR Binary BA DMC 18X2 Command Reference VS Binary B9 FUNCTION Vector Speed DESCRIPTION The VS command specifies the speed of the vector in a coordinated motion sequence in either the LM or VM modes The parameter input is rounded down to the nearest factor of 2 The units are counts per second VS may be changed during motion Vector Speed can be calculated by taking the square root of the sum of the squared values of speed for each axis specified for vector or linear interpolated motion ARGUMENTS VS s t where s and t are unsigned numbers in the range 2 to 12 000 000 for servo motors and 2 to 3 000 000 for stepper motors s is the speed to apply to the S coordinate system and t is the speed to apply to the T coordinate system s Returns the value of the vector speed for the S coordinate plane t Returns the value of the vector speed for the T coordinate plane USAGE DEFAULTS While Moving Yes Default Value 8192 In a Program Yes Default Format Command Line Yes OPERAND USAGE _VSx contains the vector speed of the specified coordinate system S or T RELATED COMMANDS VA on page 162 Vector Acceleration VP on page 168 Vector Position CR on page 45 Circle LM Binary B 0 on page 101 Linear Interpolation VM on page 166 Vector Mode BG on page 28 Begin Sequence VE on page 164 Vector End EXAMPLES VS 2000 Define vector speed of S coordinate system VS Return vector speed of S coo
140. t moves or it will return the previously set value The parameters input will be rounded down to the nearest factor of 2 and the units of the parameter are in counts per second Note Negative values will be interpreted as the absolute value ARGUMENTS SP n n n n or SPX n where nis an unsigned number in the range 0 to 12 000 000 for servo motors OR rn nis an unsigned number in the range 0 to 3 000 000 for stepper motors n Returns the speed for the specified axis USAGE DEFAULTS While Moving Yes Default Value 25000 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _SPx contains the speed for the specified axis RELATED COMMANDS AC on page 14 Acceleration DC on page 49 Deceleration PA Binary A6 on page 121 Position Absolute PR Binary A7 on page 124 Position Relation BG on page 28 Begin EXAMPLES PR 2000 3000 4000 5000 Specify x y z w parameter SP 5000 6000 7000 8000 Specify x y z w speeds BG Begin motion of all axes AMZ After Z motion is complete Note For vector moves use the vector speed command VS to change the speed SP is not a mode of motion like JOG JG 142 SP Binary 92 DMC 18X2 Command Reference ST Binary A1 FUNCTION Stop DESCRIPTION The ST command stops motion on the specified axis Motors will come to a decelerated stop If ST is given without an axis specification program execution will stop in addition to XYZW XYZW specification will not h
141. tepper pulses output 0000200 0000010 0000000 0000110 TDX Return the X motor Stepper pulses 0000200 DUAL _TDX Assign the variable DUAL the value of TDX DMC 18X2 Command Reference TD Binary DB 147 148 TE Binary DA TE Binary DA FUNCTION Tell Error DESCRIPTION This command returns the current position error of the motor s The range of possible error is 2147483647 The Tell Error command is not valid for step motors since they operate open loop ARGUMENTS TE xxxx where x is X Y Z W or any combination to specify the axis or axes No argument will provide the position error for all axes USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Not in a Program Yes RELATED COMMANDS OE Binary 8D on page 118 Off On Error ER on page 69 Error Limit POSERR Error Subroutine PEF on page 122 Position Formatting EXAMPLES TE Return all position errors 00005 00002 00000 00006 0 Position Format TEX Return the X motor position error 00005 TEY Return the Y motor position error 00002 Error _TEX Sets the variable Error with the X axis position error Hint Under normal operating conditions with servo control the position error should be small The position error is typically largest during acceleration DMC 18X2 Command Reference TI Binary E0 FUNCTION Tell Inputs DESCRIPTION This command returns the state of the general inputs The value returned by this c
142. the limit switches home switches latch inputs and the selective abort function ARGUMENTS CN n 0 p where m n o are integers with values 1 or 1 pis an integer 0 or 1 n 1 Home switch configured to drive motor in forward direction when input is high See HM and FE commands 1 Home switch configured to drive motor in reverse direction when input is high See HM and FE commands 1 Configures inputs 5 6 7 8 13 14 15 16 as selective abort inputs for axes A B C D E F G and H respectively Inputs 5 6 7 8 13 14 15 16 are configured as general use inputs USAGE DEFAULTS While Moving Yes Default Value 1 1 1 0 In a Program Yes Default Format 2 0 Command Line Yes OPERAND USAGE _CNO Contains the limit switch configuration _CN1 Contains the home switch configuration _CN2 Contains the latch input configuration _CN3 Contains the state of the selective abort function 1 enabled 0 disabled RELATED COMMANDS AL Binary EE on page 17 Arm latch EXAMPLES CN 1 1 Sets limit and home switches to active high CN 1 Sets input latch active low 44 CN Binary E6 DMC 18X2 Command Reference CR Binary B3 FUNCTION Circle DESCRIPTION The CR command specifies a 2 dimensional arc segment of radius r starting at angle 0 and traversing over angle A9 A positive AO denotes counterclockwise traverse negative AO denotes clockwise The VE command must be used to denote the end of the motion sequence after all CR and VP segm
143. the main or auxiliary encoder position will be captured upon a low going signal Each axis has a position latch and can be activated through the general inputs Input 1 X or A axis Input 2 Y or B axis Input 3 Z or C axis and Input 4 W or D axis The command RL returns the captured position for the specified axes When interrogated the AL command will return a 1 if the latch for that axis is armed or a zero after the latch has occurred The CN command will change the polarity of the latch ARGUMENTS AL xxxx or ALx x x x where x can be X Y Z or W The value of x is used to specify main encoder for the specified axis to be latched x can be SX SY SZ or SW The value of x is used to specify the auxiliary encoder for the specified axis to be latched USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes OPERAND USAGE _ALx contains the state of the specified latch 0 not armed 1 armed RELATED COMMANDS RL Binary DD on page 134 Report Latch EXAMPLES START Start program ALY Arm Y axis latch JG 50000 Set up jog at 50000 counts sec BGY Begin the move LOOP Loop until latch has occurred JP LOOP _ALY 1 RLY Transmit the latched position EN End of program DMC 18X2 Command Reference AL Binary EE 17 AM Binary C8 FUNCTION After Move DESCRIPTION The AM command is a trippoint used to control the timing of events This command will hold up execution of the
144. the selected axes expressed in multiples of 30 n returns the hall offset for the specified axis USAGE DEFAULTS While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes EXAMPLES BB 30 60 The offsets for the Y and W axes are 30 and 60 respectively OPERAND USAGE _BBx contains the position offset between the Hall transition and 0 0 for the specified axis RELATED COMMANDS BA on page 24 Brushless Axis BC on page 26 Brushless Commutation BD Binary 9D on page 27 Brushless Degrees BI on page 29 Brushless Inputs BM Binary 9B on page 31 Brushless Modulo BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup BZ on page 38 Brushless Zero Note BB is only effective as part of the BC command or upon reset DMC 18X2 Command Reference BB Binary 9E 25 26 BC BC FUNCTION Brushless Calibration DESCRIPTION The function BC monitors the status of the Hall sensors of a sinusoidally commutated motor and upon transition replaces the estimated value of a commutated phase by an exact value ARGUMENTS BC xxxx where x is X Y Z W or any combination to specify the axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BCx contains the state of the Hall sensor inputs This value should be between and 6 RELATED COMMANDS BA on page 24 Brushless Axis BB Binary 9E on page
145. the velocity feedforward coefficient or returns the previously set value This coefficient generates an output bias signal in proportions to the commanded velocity Velocity feedforward bias 1 22 10 6 FV Velocity in cts s FV operates when commanding motion with PA PR JG VM LM and CM For example if FV 10 and the velocity is 200 000 count s the velocity feedforward bias equals 2 44 volts ARGUMENTS FV n n n n or FVX n where nis an unsigned numbers in the range 0 to 8191 decimal n Returns the feedforward velocity for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 3 0 Command Line Yes OPERAND USAGE _FVx contains the feedforward velocity for the specified axis RELATED COMMANDS FA on page 72 Acceleration feedforward EXAMPLES FV 10 20 Set feedforward coefficients to 10 and 20 for x JG 30000 80000 and y respectively This produces 0 366 volts for x and 1 95 volts for y FV Return the x and y values 010 020 76 FV Binary 95 DMC 18X2 Command Reference GA FUNCTION Master Axis for Gearing DESCRIPTION The GA command specifies the master axes for electronic gearing Multiple masters for gearing may be specified The masters may be the main encoder input auxiliary encoder input or the commanded position of any axis The master may also be the commanded vector move in a coordinated motion of LM or VM type When the master is a simple axis it may mo
146. tion by 3 2 Default Value 1 1 Default Format DMC 18X2 Command Reference ET Binary CO FUNCTION Electronic cam table DESCRIPTION The ET command sets the ECAM table entries for the slave axes The values of the master axes are not required The slave entry n is the position of the slave axes when the master is at the point n i o where i is the interval and o is the offset as determined by the EP command ARGUMENTS ET n n n n n where n is an integer in the range between 2 147 438 648 and 2 147 438 647 The value n can be left out of the command if the index count has been set using the command EC In this mode each ET command will automatically increment the index count by 1 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS EA on page 55 Choose ECAM master EB Binary C4 on page 56 Enable ECAM EC Binary C6 on page 57 Set ECAM table index EG Binary C3 on page 59 Engage ECAM EM Binary C1 on page 63u Specify ECAM cycle EP Binary C2 on page 67 Specify ECAM table intervals amp staring point EQ Binary C5 on page 68 Disengage ECAM EXAMPLES ET 0 0 0 Specifies the position of the slave axes X and Z to be synchronized with the starting point of the master ET 1 1200 400 Specifies the position of the slave axes X and Z to be synchronized with the second point of the master ECO Set the table index value to 0
147. tion is reached use MF or MR command 68 EQ Binary C5 DMC 18X2 Command Reference ER Binary 88 FUNCTION Error Limit DESCRIPTION The ER command sets the magnitude of the X Y Z and W axis position errors that will trigger an error condition When the limit is exceeded the Error output will go low true If the Off On Error OE1 command is active the motors will be disabled The units of ER are quadrature counts ARGUMENTS ER n n n n or ERX n where nis an unsigned numbers in the range 1 to 32767 n Returns the value of the Error limit for the specified axis USAGE DEFAULTS While Moving Yes Default Value 16384 In a Program Yes Default Format Position Format Command Line Yes OPERAND USAGE _ERx contains the value of the Error limit for the specified axis RELATED COMMANDS OE Binary 8D on page 118 Off On Error POSERR Automatic Error Subroutine EXAMPLES ER 200 300 400 600 Set the X axis error limit to 200 the Y axis error limit to 300 the Z axis error limit to 400 and the W axis error limit to 600 ER 1000 Sets the Y axis error limit to 1000 leave the X axis error limit unchanged ER Return X Y Z and W values 00200 00100 00400 006 00 ER Return X value 00200 V1 _ERX Assigns V1 value of ERX Vl Returns V1 00200 Hint The error limit specified by ER should be high enough as not to be reached during normal operation Examples of exceeding the error limit would be a mechanical jam or a fault in a
148. turns echo on USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes EXAMPLES EO 0 Turns echo off EO 1 Turns echo on 66 EO DMC 18X2 Command Reference EP Binary C2 FUNCTION Cam table intervals and starting point DESCRIPTION The EP command defines the ECAM table intervals and offset The offset is the master position of the first ECAM table entry The interval is the difference of the master position between 2 consecutive table entries This command effectively defines the size of the ECAM table The parameter m is the interval and n is the starting point Up to 257 points may be specified ARGUMENTS EP m n where m is a positive integer in the range between and 32 767 m Returns the value of the interval m n is an integer between 2 147 483 648 and 2 147 483 647 USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes OPERAND USAGE _EP contains the value of the interval m RELATED COMMANDS EA on page 55 Choose ECAM master EB Binary C4 on page 56 Enable ECAM EC Binary C6 on page 57 Set ECAM table index EG Binary C3 on page 59 Engage ECAM EM Binary C1 on page 63 Specify ECAM cycle EQ Binary C5 on page 68 Disengage ECAM ET Binary CO on page 71 ECAM table EXAMPLES EP 20 100 Sets the cam master points to 100 120 140 D _EP Contains interval m DMC 18X2 Command Reference EP Binary C2
149. upt Subroutine Trippoint for input Program A Specify interrupt on input 1 Specify jog and begin motion on X axis Loop End Program Interrupt subroutine Stop X print message wait for motion to complete Check for interrupt clear Begin motion Return to main program don t re enable trippoints DMC 18X2 Command Reference IF FUNCTION IF conditional statement DESCRIPTION The IF command is used in conjunction with an ENDIF command to form an IF conditional statement The arguments are one or more conditional statements If the conditional statement s evaluates true the command interpreter will continue executing commands which follow the IF command If the conditional statement evaluates false the controller will ignore commands until the associated ENDIF command OR an ELSE command occurs in the program ARGUMENTS IF condition where Conditions are tested with the following logical operators lt less than or equal to gt greater than equal to lt less than or equal to gt greater than or equal to lt gt not equal USAGE DEFAULTS While Moving Yes Default Value In a Program Yes Default Format Command Line No RELATED COMMANDS ELSE on page 62 Optional command to be used only after IF command ENDIF on page 65 End of IF conditional Statement EXAMPLES IF _TEX lt 1000 IF conditional statement based on X motor position MG Motor is within 1000 counts of zero Message to be executed if IF
150. ut lines to which the Hall sensors have been wired for sinusoidally commutated motors These inputs will be the general use inputs bits 1 8 The Hall sensors of each axis must be connected with consecutive numbers of input lines The brushless setup command BS can be used to determine the proper wiring of the hall sensors ARGUMENTS BI n n n or BIX n where nis an unsigned integer which represent the first digital input to be used for hall sensor input n 0 Clear the hall sensor configuration for the axis n Returns the starting input used for Hall sensors for the specified axis USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 0 Command Line Yes OPERAND USAGE _BIx contains the starting input used for Hall sensors for the specified axis EXAMPLE BI 5 The Hall sensor of the Y axis are on inputs 5 6 and 7 RELATED COMMANDS BA on page 24 Brushless Axis BB Binary 9E on page 25 Brushless Phase Begins BC on page 26 Brushless Commutation BD Binary 9D on page 27 Brushless Degrees BM Binary 9B on page 31 Brushless Modulo BO Binary 9F on page 33 Brushless Offset BS on page 35 Brushless Setup BZ on page 38 Brushless Zero DMC 18X2 Command Reference Ble 29 BL Binary 8F FUNCTION Reverse Software Limit DESCRIPTION The BL command sets the reverse software limit If this limit is exceeding during motion motion on that axis will decelerate to a stop Reverse motion
151. ve in any direction and the slave follows When the master is a commanded vector move the vector move is considered positive and the slave will move forward if the gear ratio is positive and backward if the gear ratio is negative The slave axes and ratios are specified with the GR command and gearing is turned off by the command GRO ARGUMENTS GA x x x x or GAX x where x can be X Y Z or W The value of x is used to set the specified main encoder axis as the gearing master The slave axis is specified by the position of the argument The first position of the argument corresponds to the X axis the second position corresponds to the Y axis etc A comma must be used in place of an argument if the corresponding axes will not be a slave x can be CX CY CZ or CW The value of x is used to set the commanded position of the specified axis as the gearing master x can be Sor T S and T are used to specify the vector motion of the coordinated system S or T as the gearing master x can be DX DY DZ or DW The value of x is used to set the specified auxiliary encoder axis as the gearing master USAGE DEFAULTS While Moving No Default Value In a Program Yes Default Format Command Line Yes RELATED COMMANDS GR on page 79 Gear Ratio GM on page 78 Gantry Mode EXAMPLES GEAR Gear program GA X T Specify X axis as master for Y and vector motion on T as master for Z GR 5 2 5 Svecifv Y and Z ratios JG 5000 Svecify master iog speed BG
152. wo XQ 0 Start execution at line 0 Hint Don t forget to quit the edit mode first before executing a program DMC 18X2 Command Reference XQ 175 ZS FUNCTION Zero Subroutine Stack DESCRIPTION The ZS command is only valid in an application program and is used to avoid returning from an interrupt either input or error ZS alone returns the stack to its original condition ZS1 adjusts the stack to eliminate one return This turns the jump to subroutine into a jump Do not use RI Return from Interrupt when using ZS To re enable interrupts you must use II command again The status of the stack can be interrogated with the operand _ZSx see operand usage below ARGUMENTS ZS n where n 0 Returns stack to original condition n 1 Eliminates one return on stack USAGE DEFAULTS While Moving Yes Default Value 0 In a Program Yes Default Format 3 0 Command Line No OPERAND USAGE _ZSn contains the stack level for the specified thread where n 0 1 2 or 3 Note n can also be specified using X thread 0 Y thread1 Z thread2 or W thread3 EXAMPLES Il Input Interrupt on 1 A JP A EN Main program ININT Input Interrupt MG INTERRUPT Print message S _ZS Interrogate stack S Print stack ZS Zero stack S _ZS Interrogate stack S Print stack EN End 176 ZS DMC 18X2 Command Reference Index A Abort 13 Off On Error 13 118 Stop Motion 143 145 147 148 154 156 157 158 Absolute Position 19 20 53 107 110 153
Download Pdf Manuals
Related Search
Related Contents
Samsung DV665JS manual de utilizador MHC-RG660 ハンディプログラマJW-14PG取扱説明書 EN Operating Instructions Atdec TH3070CTWBB User's Manual manual de usuario cc - Sindicato de Camioneros del Chaco 376\377}\317T\bv\343\211\2260\2750\3250\310\000 \000F\000l Aristo W82 S.A. MARINA PISCINES ET FILTRATIONS Cl S.A.S. PISCINES Copyright © All rights reserved.
Failed to retrieve file