Home

Rev 1.0f

image

Contents

1. PX Tell Position 00015 00 Report in hex 294 PL Pole Full Description The PL command adds a low pass filter in series with the PID compensation The digital transfer function of the filter is 1 n Z n and the equivalent continuous filter is A S A where A is the filter cutoff frequency A 1 T In 1 n rad sec and T is the sample time To convert from the desired crossover 3 dB frequency in Hertz to the value given to PL use the following formula where n is the argument given to PL T is the controller s servo loop sample time in seconds TM divided by 1 000 000 fc is the crossover frequency in Hertz Example fc 36Hz TM 1000 n e 0 001 36 2p 0 8 n 0 0 2 0 4 0 6 0 8 0 999 Fc HZ 8 off 256 145 81 360 Arguments PL n n n n n n n n or PLA 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 While Moving Yes Default Value 0 0 In a Program Yes Default Format 1 4 Not in a Program Yes Controller Usage ALL CONTROLLERS Operand Usage _PLn contains the value of the pole filter for the specified axis Related Commands KD Derivative KP Proportional 295 KI Integral Gain Examples PL 95 9 8 822 Set A axis Pole to 0 95 B axis to 0 9 C axis to 0 8 D axis pole to 0 822 PL yep eye 0 9527 0 8997 0 7994 0 8244 Return all Poles PL 0 9927 Return A Pole only 296 PR Position Relat
2. The controller will return the PR value for the H axis PR The controller will return the PR value for all axes 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 10 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 A axis can be assigned to the variable V with the command V _TPA 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 Controller Usage Identifies the controller models that can accept the 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 B
3. Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _OFn contains the offset for the specified axis Related Commands Examples OF 1 2 3 5 Set A axis offset to 1 the B axis offset to 2 the C axis to 3 and the D axis to 5 OF 3 Set A axis offset to 3 Leave other axes unchanged OF 0 Set B axis offset to 0 Leave other axes unchanged OF Return offsets 3 0000 0 0000 3 0000 5 0000 OF Return A offset 3 0000 OF Return B offset 20 0000 281 OP Output Port Full Description The OP command sends data to the output ports of the controller You can use the output port to control external switches and relays The arguments of the OP command are the decimal representation of the general output bits 0 through 7 For example OP255 0 sets all outputs in bank O bits 0 7 high and all outputs in bank 1 bits 8 15 low Arguments OP m a b c d where m is an integer in the range 0 to 65535 decimal or 0000 to FFFF hexadecimal 0 to 255 for 4 axes or less m is the decimal representation of the general output bits Output 1 through output 8 for controllers with 4 axes or less Outputs 1 through output 16 for controller with 5 or more axes a b c d represent the extended I O in consecutive groups of 16 bits values from 0 to 65535 Arguments which are given for I O points which are configured as inputs wi
4. 235 KI Integrator Full Description The KI command sets the integral gain of the control loop It fits in the control equation as follows D z KP 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 n n n n or KIA n where n is an unsigned numbers in the range 0 to 255 with a resolution of 0 001 n Returns the value for the specified axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format 4 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _KIn contains the value of the integral gain for the specified axis Related Commands KP Proportional Constant KD Derivative Constant IL Integrator Limit Examples KI 12 14 16 20 Specify a b c d axis integral KI 7 Specify a axis only KI 448 Specify c axis only KI 2 Return A B C D 7 14 8 20 KI values 236 KP Proportional Constant Full Description KP designates the proportional constant in the controller filter The filter transfer function is D z KP KD z 1 z KI z 2 z 1 For further details see the section Theory of Operation in the User s Manual Arguments KP n n n n n n n n or KPA 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 While Moving Yes Default Value 6 In a Program Yes Default Format 4 2 Comman
5. LA List Arrays Full Description The LA command returns a list of all arrays in memory The 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 Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands LL List Labels LS List Program LV List Variable Examples LA NY A CA VA 239 LB LCD Bias Contrast Full Description Sets the Bias contrast on the LCD Arguments LBn where n is an integer between 0 and 15 where 0 is least contrast and 15 is greatest contrast A negative value turns the optional backlight on Usage While Moving Yes Default Value 0 In a Program Yes Default Format 8 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LB contains setting of the LB command Related Commands MG Message Lx LU LCD Update Examples LBO Set the LCD Bias Contrast to minimum LB15 Set the LCD Bias Contrast to maximum LB 8 Set the LCD Bias Contrast to default and turn on backlight backlight is an optional enhancement 240 LC Low Current Stepper Mode Full Description Causes the amp enable line for the specified axes to toggle disabling the stepper drives a programmable amount of time after the respective axes stop profiler holding position Each axis is han
6. SD Switch Deceleration Full Description The Limit Switch Deceleration command SD sets the linear deceleration rate of the motors when a limit switch has been reached The parameters will be rounded down to the nearest factor of 1024 and have units of counts per second squared Arguments SD n n n n n n n n or SDA n where n is an unsigned numbers in the range 1024 to 1073740800 n Returns the deceleration value for the specified axes Usage While Moving Yes Default Value 256000 In a Program Yes Default Format 10 0 Command Line Yes Controller Usage ALL CONTROLLERS SD command cannot be specified while moving Operand Usage _SDn contains the deceleration rate for the specified axis Related Commands AC Acceleration DC Deceleration PR Position Relative PA Position Absolute SP Speed Examples PR 10000 Specify position 330 AC 2000000 Specify acceleration rate DC 1000000 Specify deceleration rate SD 5000000 Specify Limit Switch Deceleration Rate SP 5000 Specify slew speed Note The SD command may be changed during the move in JG move but not in PR or PA move 331 SH Servo Here Full 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 nnnnnnnnnn where n
7. Up to 8 parameters can be passed on the subroutine stack One value can be returned from a subroutine More returns are possible with pass by reference and array passing Using subroutine stacks and passing parameters in a subroutine has many advantages including 1 Code flexibility reuse A single subroutine can be written and called many times and from various locations in code The stack remembers where to return when completed This is opposite from a blind jump JP 2 Variable Scope Local variables A subroutine can run with a protected variable space Local variables exist only in the extent of the subroutine and no external thread or stack level can access local variables Global variables aren t needed for counters indices and other helper variables a h must be used for local variables Regular variable names remain global 3 Each thread has its own stack therefore subroutines are reentrant In other words multiple threads can be running the same subroutine simultaneously at various stack depths 4 Support for recursion Although the subroutine stack is only 16 deep recursion is possible A stack depth of 16 is sufficient for many recursive tasks E G recursing 232 axes handles and thread status 5 Parameter passing A calling command can explicitly specify the inputs to a subroutine The subroutine can pass one value back to the calling command More returns are possible with pass by reference and array pas
8. Full 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 A return parameter can be specified to EN from a subroutine to return a value from the subroutine to the calling stack The EN command is used to end the automatic subroutines MCTIME COMINT and CMDERR When the EN command is used to terminate the COMINT communications interrupt subroutine there are 2 argurments The first determines whether trippoints will be restored upon completion of the subroutine and the second determines whether the communication will be re enabled Arguments EN m n r where m 0 Return from subroutine without restoring trippoint m 1 Return from subroutine and restore trippoint n 0 Return from COMINT without restoring Cl interrupt trigger n 1 Return from COMINT and restore Cl interrupt trigger r anyvalue Return a value from a subroutine accessible to the calling stack in _JS Note 1 The default value for the argument is 0 Note 2 Use the RE command to return from the interrupt handling subroutines LIMSWI and POSERR Use the RI command to return from the ININT subroutine Usage O While Moving Yes Default Value m 0 In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS perand Usage Related Commands RE Return fr
9. Full 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 up to 16 deep Multiple conditions can be used in a single jump statement The conditional statements are combined in pairs using the operands amp and l 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 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 Passing Values on the Stack Note Passing values on the stack is advanced DMC programming and is recommended for experienced DMC programmers familiar with the concept of passing arguments by value and by reference
10. MW Modbus Wait Full Description Enabling the MW command causes the controller to hold up execution of the program after sending a Modbus command until a response from the Modbus device has been received If the response is never received then the FTCPERR subroutine will be triggered and an error code of 123 will occur on _TC Arguments MWn where n 0 Disables the Modbus Wait function n 1 Enables the Modbus Wait function Usage While Moving Yes Default Value 1 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage MW contains the state of the Modbus Wait _MW contains returned function code _MW1I contains returned error code Related Commands MB Modbus Examples MW1 Enables Modbus Wait SB1001 Set Bit 1 on Modbus Handle A CB1001 Clear Bit 1 on Modbus Handle A 270 NB Notch Bandwidth Full Description The NB command sets real part of the notch poles Arguments NB n n n n n n n n or NBA n where n is ranges from O Hz to Usage While Moving Yes Default Value 0 5 In a Program Yes Default Format 3 1 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _NBn contains the value of the notch bandwidth for the specified axis Related Commands NF Notch Filter NZ Notch Zeros Examples _NBA 10 Sets the real part of the notch pole to 10 2 Hz notch _NBA Sets the variable notch equal to the notch bandwidth value for the A axis 271 NF No
11. The 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 or when the response to a command is a question mark After TC has been read the error code is set to zero TC1 will return the error code along with a human readable description of the code Tell Code List Tell Code Number Description nrecognized command ommand only valid from program ommand not valid in program perand error nput buffer full umber out of range ommand not valid while running no RIO ommand not valid while not running no RIO ariable error mpty program line or undefined label nvalid label or line number ubroutine more than 16 deep G only valid when running in jog mode no RIO EPROM check sum error EPROM write error IP incorrect sign during position move or IP given during forced deceleration no RIO 17 ED BN and DL not valid while program running 8 IM 341 Error in IF statement without ENDIF SM jumper needs to be installed for stepper motor operation no Accelera no RIO 342 08 BinaryCommands not valid in application program o9 I Bad binary command number E T E C A C A M M thernet input buffer overrun CP lost sync thernet handle already in use Arguments 343 TC n where n 0 Returns numerical code only n 1 Returns numerical c
12. 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 Zm n Same as Fm n but suppresses the leading zeros m n Display variable in hexadecimal format with m digits to left of decimal and n to the right Sn Display variable as a string of length n where n is through 6 N Suppress carriage return line feed Ex Sends the message out the Ethernet handle x where x is A B C D E F G or H Pn Sends the message out the Serial port n where n is 1 or 2 denoting Main or Auxilary Lx Sends the message to the LCD where x is 1 or 2 for the top or bottom line of the LCD The message cannot be more than 8 characters when sent to the LCD screen excess characters will not be shown or stored The LU command must be set to 0 for user messages sent to the LCD to appear 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 While Moving Yes Default Value In a Program Yes Default Format Variable Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands 263 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
13. 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 While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _CSn contains the segment number in the sequence specified by n S or T This operand is valid in the Linear mode LM Vector mode VM Related Commands CR Circular Interpolation Segment LI Linear Interpolation Segment LM Linear Interpolation Mode VM Vector Mode VP Vector Position Examples 139 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 coordinate system vector points VP 1000 5000 New vector VP 8000 9000 New vector CSS Clear vectors specified in S coordinate system EN End program 140 CW Copyright information Data Adjustment bit on off Full 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 Galil terminal software programs When turned
14. BGS Begin motion 245 LI Linear Interpolation Distance Full Description The LI a b c d command specifies the incremental distance of travel for 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 ABC designates linear interpolation for the A B and C axes The speed of these axes will be computed from VS2 AS2 BS2 CS2 where AS BS and CS are the speed of the A B and C axes If the LI command specifies only A and B the speed of C will still be used in the vector calculations The controller always uses the
15. Controller Usage DMC 40x0 Operand Usage _VVn contains the vector speed variable of the specified coordinate system n S or T Related Commands VA Vector Acceleration VD 382 Vector Deceleration VP Vector Position Segment CR Circular Interpolation Segment LI Linear Interpolation Segment VM Vector Mode LM Linear Interpolation Mode Examples VVS 20000 Define vector speed variable to 20000 for the S coordinate system VP1000 2000 lt 1 gt 100 Define vector speed variable for specific segment VVS Returns 20000 lt CRLF gt as set above 383 WH Which Handle Full Description The WH command is used to identify the handle in which the command is executed The command returns IHA through IHH to indicate on which handle the command was executed The command returns RS232 if communicating serially Arguments None Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _WH contains the numeric representation of the handle in which a command is executed Handles A through H are indicated by the value 0 7 while a 1 indicates the serial port Related Commands TH Tell Handle Examples WH Request handle identification Command executed in handle C IHC WH Request handle identification RS232 Command executed in RS232 port 384 WT Wait Full Description The WT command is a trippoint use
16. MC motion complete and in position MF after motion forward MR after motion reverse WT waitfor time 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 placed in the upper left corner Below the opcode is a description of the command and required arguments Axes Arguments Some commands require the user to identify the specific axes to be affected These commands are followed by uppercase X Y Z W or A B C D E F G and H No commas are needed and the order of axes is not important Do not insert any spaces prior to any command For example STX AMX is invalid because there is a space after the semicolon The proper syntax for commands requires that the command argument be separated from the command by a single space When an argument is not required and is not given the command is executed for all axes Valid syntax SHA Servo Here A only SH ABD Servo Here A B and D axes SH ACD Servo Here A C and D axes SH ABCD Servo Here A B C and D axes SH BCAD Servo Here A B C and D axes SH ADEG Servo Here A D E and G axes SHH Servo Here H axis only 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
17. The Revision Information command causes the RIO board to return the firmware revision information Arguments Usage In a Program No Command Line Yes Can be Interrogated No Used as an Operand No Operand Usage Related Commands Examples 50 _GP Gearing Phase Differential Operand Keyword Full Description The _GP operand contains the value of the phase differential 1 accumulated on the most current change in the gearing ratio between the master and the slave axes The value does not update if the distance over which the slave will engage is set to 0 with the GD command The operand is specified as GPn where n is the specified slave axis 1Phase Differential is a term that is used to describe the lead or lag between the master axis and the slave axis due to gradual gear shift Pa GR Cm Cs where Pd is the phase differential GR is the gear ratio Cm is the number of encoder counts the master axis moved and Cs is the number of encoder counts the slave moved Arguments Usage Operand Usage Related Commands GR Gear Ratio GA Gear Axis Examples A GAY Sets the Y axis as the gearing master for the X axis This axis does not have to be under servo control In this example the axis is connected to a conveyor operating open loop GD1000 Set the distance that the master will travel to 1000 counts before the gearing is fully engaged for the X axis slave AI 1 Wait for input 1 to go low In this example t
18. W axis 4 or E E Axis 5 or F F axis 6 or G G axis 7 or H H axis 8 or S S coordinate system 9 or T T coordinate system 10 or N Virtual N axis 11 or M Virtual M axis Usage While Moving Yes Default Value In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage n contains the axis number 0 11 Related Commands Examples 55 9 Math Operators Full Description The addition subtraction multiplication division and modulus operators are binary operators they take two arguments and return one value used to perform mathematical operations on variables constants and operands Arguments n m or n m or n m or n m or n m where n and m are signed numbers in the range 2147483648 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands Parenthesis Examples x 1 2 3 7 2 assign 1 to x MG 40 6 integer remainder of 40 divided by 6 4 0000 56 9 5 lt gt lt gt Comparison Operators Full Description The comparison operators are as follows lt less than gt greater than equals lt less than or equal gt greater than or equal lt gt not equals These are used in conjunction with IF JP JS amp and to perform conditional jumps The result of a
19. While Moving Yes Default Value 0 Last Line In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands LA List Arrays LL List Labels LV List Variables Examples LS A 6 List program starting at A through line 6 2 A 3 PR 500 4 BGA 5 AM 6 WT 200 251 Hint Remember to quit the Edit Mode lt cntrl gt Q prior to giving the LS command DOS 252 LU LCD Update Full Description Turns the automatic axes status update on the LCD on or off Arguments LUn where n 0 Turns off the automatic update of the LCD with the axis status n 1 Sets the LCD in an automatic update mode with the axes status shown below ABCDEFGH mmmmmmmm where m is the axis status for axes ABCDEFGH and is I Idle 1 Low power Idle O Motor Off M Motion Axis running in indepent mode E Error Position error exceeded S Stop Stopped from ST command L Limit Decelerating or stopped by a limit switch A Abort Stopped by abort V Vector Running in Vector or Linear Interpolation Mode C Contour Running in Contour Mode H Homing Running in a Homing Rotine e ECAM Running in ECAM Mode F Fault Amplifier Fault T Stall Stepper Position Maintenance Mode Stall Detected Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LU contains t
20. 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 Using Galil DOS Terminal Software The ED command puts the 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 Arguments DL n where n no argument 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 While Moving Yes Default Value In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage When used as an operand _DL gives the number of available labels 510 maximum Related Commands 150 UL Upload Examples DL Begin download A PR 4000 BGA Data AMA MG DONE
21. 311 RA Record Array Full Description The RA command selects one through eight 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 n m 0 p RA n m 1 0 1 p 1 q11 r11 s t where n m o and p are dimensioned arrays as defined by DM command The contain nothing Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands DM Dimension Array RD Record Data RC Record Interval Examples Record Label DM POS 100 Define array RA POS Specify Record Mode RD _TPA Specify data type for record RC 1 Begin recording at 2 msec intervals PR 1000 BG Start motion EN 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 312 RC Record Full 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 thru 8 and specifies 2n samples between records RC 0 stops recording m is optional and specifies the number of records to be recorded If m is n
22. Accelera Controllers with 7 8 axes 187 5 sec n returns the value of the sample time Usage While Moving Yes Default Value 1000 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TM contains the value of the sample time Related Commands 354 Examples TM 1000 Turn off internal clock TM 2000 Set sample rate to 2000 usec TM 1000 Return to default sample rate 355 TN Tangent Full 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 m n where m is the scale factor in counts degree in the range between 127 and 127 witha fractional resolution of 0 004 m Returns the first position value for the tangent axis 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 8388608to 8388607 Usage While Moving Yes Default Value In a Program Yes Default Format PF Command Line Yes Controller Usage ALL CONTROLLERS Operand Usag
23. BGS AMS JP A r r r Vector Speed Begin Sequenc After Motion Repeat Move 379 VS Vector Speed Full Description The VS command specifies the speed of the vector in a coordinated motion sequence in either the LM or VM modes 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 even numbers in the range 2 to 22 000 000 for servo motors and 2 to 6 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 The units are counts per second 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 While Moving Yes Default Value 25000 In a Program Yes Default Format 8 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VSn contains the vector speed of the specified coordinate system S or T Related Commands VA Vector Acceleration VP Vector Position CR Circle LM Linear Interpolation VM Vector Mode 380 BG Begin Sequence VE Vector End Examples VS 2000 Define vector speed of S coordinate system VS Return vector speed of S coordinate system 2000 Hint Vector speed can be attached to i
24. Bit Status 07 Undefined set to 0 06 Undefined set to 0 05 Undefined set to 0 04 Undefined set to 0 03 Undefined set to 0 02 Hall C State 01 Hall B State 00 Hall A State Arguments QHn returns the Hall sensor input byte where n A B C D E F G H Usage While Moving Yes Default Value O In a Program Yes Default Format 1 0 Command Line Yes Controller Usage DMC 40x0 D430x0 Operand Usage _QHhn Contains the state of the Hall sensor inputs Related Commands PA Position Absolute BS Brushless Setup EXAMPLE QHY 6 Hall inputs B and C active on Y axis 305 QR Examples 306 QR TO Data Record Full 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 nnnnnnnnnn where nis A B C D E F G H 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 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Note The Galil windows terminal wi
25. CI commands with Port 2 Arguments CC m n r p m Baud rate 9600 19200 38400 or 115200 n Handshake O for handshake off 1 for handshake on r Mode O disabled lenabled p Echo 0 for echo off 1 for echo on Note echo only active when daisy chain feature is off Usage While Moving Yes Default Value 115200 0 1 0 In a Program Yes Default Format Command Line Yes Controller Usage DMC 40x0 Operand Usage Related Commands CI Configure Communication Interrupt Examples cc 9600 0 0 0 9600 baud no handshake echo off Typical setting with TERM P or TERM H 125 CD Contour Data Full Description The CD command specifies the incremental position on contour axes The units of the command are in encoder counts This command is used only in the Contour Mode CM The incremental position will be executed over the time period specified by the command DT ranging from 2 to 256 servo updates or by the operand Arguments CD n n n n n n n n m or CDA n where n is an integer in the range of 32767 m optional is an integer in the range 0 to 8 n m 0 terminates the Contour Mode m through 8 specifies the time interval DT of 2m samples n 0 and m 1 pauses the contour buffer By default the sample period is 1 msec set by the TM command with m 1 the time interval would be 2 msec Note1 The command CD 0 0 0 would follow the last CD command in a sequence CD 0 0 0 is similar to VE a
26. CM all participating axes will be stopped Arguments OE n n n n n n n n or OEA n where n 0 Disables the Off On Error function n 1 Motor shut off MO by position error TE gt ER or abort input n 2 Motor shut off MO by hardware limit switch n 3 Motor shut off MO either by position error TE gt ER hardware limit switch or abort input Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _OEn contains the status of the off on error function for the specified axis Related Commands AB Abort ER Error limit SH Servo Here POSERR 219 Error Subroutine LIMSWI Limit switch automatic subroutine TA Tell Amplifier Error Examples OE 1 1 1 1 Enable OE on all axes OE 0 Disable OE on A axis other axes remain unchanged OB pA Enable OE on C axis and D axis other axes remain unchanged OE 1 0 1 0 Enable OE on A and C axis Disable OE on B and D axis Hint The OE command is useful for preventing system damage 280 OF Offset Full 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 n n n n or OFA n where n is 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
27. D E F G H or any combination to specify the axis axes for contour mode n Returns a 0 if the contour buffer is full and 511 if the contour buffer is empty Usage While Moving Yes Default Value 0 In a Program Yes Default Format 3 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _CM contains a 0 if the contour buffer is full otherwise it contains the number of available contour segments Related Commands CD Contour Data DT Time Increment Examples V _CM V Return contour buffer status CM Return contour buffer status CM AC Specify A C axes for Contour Mode 132 CN Configure Full Description The CN command configures the polarity of the limit switches home switches latch inputs and the selective abort function Arguments CN m n o p q where m n o are integers with values 1 or 1 p is an integer 0 or 1 m 1 Limit switches active high 1 Limit switches active low 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 o Latch input is active high 1 Latch input is active low p 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 Will also trigger FPOSERR automatic subroutine if program is running 0 Inputs 5 6 7 8 13 14 15 16 are configured as general
28. EXAMPLE BR 1 0 0 Sets X axis to brush type Y and Z to brushless Note If an axis has Off On Error OE set to 1 an amplifier error will occur if there are no halls and BR is set to 0 With all axes that do not have halls sensors going to the controller and the D430x0 is installed set BR to 1 to avoid an amplifier error state This includes running brushed motors with the D430x0 and using external drives when a D430x0 is installed 112 BS Examples 113 BS Brushless Setup Full Description A The command BS tests the wiring of a sinusoidally commutated brushless motor If Hall sensors are connected this command also tests the wiring of the Hall sensors This function can only be performed with one axis at a time 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
29. Motion Complete User Interrupt 1 Application Program Stopped Digital Input 1 is low 6 bytes in this payload Note both Ox and are used throughout this document to indicate hexadecimal number representation Arguments EI m n h where m is a 16 bit integer mask between 0 and 65535 and is used to select the interrupt condition s to be used 0 the default means don t interrupt and clears the queue when issued bit m 24bit Status byte Condition 0 0001 1 DO 208 Axis A profiled motion complete _BGA 0 0002 2 D1 209 Axis B profiled motion complete _BGB 0 0004 4 D2 210 Axis C profiled motion complete _BGC 0 0008 8 D3 211 Axis D profiled motion complete _BGD 0 0010 16 D4 212 Axis E profiled motion complete _BGE 0 0020 32 D5 213 Axis F profiled motion complete _BGF 0 0040 64 D6 214 Axis G profiled motion complete _BGG 0 0080 128 D7 215 Axis H profiled motion complete _BGH 0 0100 256 D8 216 All axes profiled motion complete _BGI 0 0200 512 C8 200 Excess position error _TEn gt _ERn 10 0400 1024 C0 192 Limit switch _LFn 0 Must be profiling motion in NON 0 DU uno 167 direction of activated limit switch for interrupt to occur 11 0800 2048 Reserved 12 1000 4096 Reserved 13 2000 8192 DB 219 Application program stopped _XQn 1 14 4000 16384 Reserved 15 8000 32768 E1 E8 225 232 Digital input s 1 8 low use n
30. OR n is an unsigned number in the range 0 to 6 000 000 for stepper motors n Returns the speed for the specified axis Usage While Moving Yes Default Value 25000 In a Program Yes Default Format 8 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _SPn contains the speed for the specified axis Related Commands AC Acceleration DC Deceleration PA Position Absolute PR Position Relative BG Begin Examples 335 PR 2000 3000 4000 5000 Specify a b c d parameter SP 5000 6000 7000 8000 Specify a b c d speeds BG Begin motion of all axes Note For vector moves use the vector speed command VS to change the speed SP is not a mode of motion like JOG JG 336 ST Stop Full Description The ST command stops motion on the specified axis Motors will come to a decelerated stop If ST is sent from the host without an axis specification program execution will stop in addition to motion Arguments ST nnnnnnnnnn where nis A B C D E F G H M N S or T or any combination to specify the axis or sequence If the specific axis or sequence is specified program execution will not stop No argument will stop motion on all axes Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands BG Begin Motion AB Abort Motion DC Deceleration rate Examples STA Stop
31. TH Tell current handle configuration CONTROLLER IP ADDRESS 10 51 0 87 ETHERNET ADDRESS 00 50 4C 08 01 1F IHA TCP PORT 1050 TO IP ADDRESS 10 51 0 89 PORT 1000 IHB TCP PORT 1061 TO IP ADDRESS 10 51 0 89 PORT 1001 IHC TCP PORT 1012 TO IP ADDRESS 10 51 0 93 PORT 1002 IHD TCP PORT 1023 TO IP ADDRESS 10 51 0 93 PORT 1003 IHE TCP PORT 1034 TO IP ADDRESS 10 51 0 101 PORT 1004 IHF TCP PORT 1045 TO IP ADDRESS 10 51 0 101 PORT 1005 IHG AVAILABLE IHH AVAILABLE 348 TI Tell Inputs Full Description This command returns the state of the inputs including the extended I O configured as inputs The value returned by this command is decimal and represents an 8 bit value decimal value ranges from 0 to 255 Each bit represents one input where the LSB is the lowest input number and the MSB is the highest input bit Arguments TIn where n 0 Return Input Status for Inputs 1 through 8 n 1 Return Input Status for Inputs 9 through 16see note 1 n 2 through 5 see note 2 where n represents the extended inputs ranging from 8 n 1 through 8 n 1 n 10 Return Input Status for Inputs 81 through 88 auxiliary encoder inputs n 11 Return Input Status for Inputs 89 through 96 auxiliary encoder inputs no argument will return the Input Status for Inputs 1 through 8 n returns the Input Status for Inputs 1 through 8 note 1 Applies only to controllers with more than 4 axes note 2
32. Usage _EB contains the state of Ecam mode 0 disabled 1 enabled Related Commands EA Choose ECAM master EC Set ECAM table index EG Engage ECAM EM Specify ECAM cycle EP Specify ECAM table intervals amp staring point EQ Disengage ECAM ET ECAM table 160 Examples EB1 Starts ECAM mode EBO Stops ECAM mode B _EB Return status of cam mode 161 EC ECAM Counter Full 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 While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _EC contains the current value of the index into the ECAM table Related Commands EA Choose ECAM master EB Enable ECAM EG Engage ECAM EM Specify ECAM cycle EP Specify ECAM table intervals amp staring point EQ Disengage ECAM ET ECAM table 162 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 163 ED Edit Full Description Using Galil DOS Terminal Software The ED command puts the controller into the Edit subsystem In th
33. VA 370 VD Vector Deceleration Full Description This command sets the deceleration rate of the vector in a coordinated motion sequence Arguments VD s t where s and t are unsigned integers in the range 1024 to 1073740800 s represents the vector deceleration for the S coordinate system and t represents the vector acceleration for the T coordinate system The parameter input will be rounded down to the nearest factor of 1024 The units of the parameter is counts per second squared 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 While Moving No Default Value 256000 In a Program Yes Default Format 10 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VDn contains the value of the vector deceleration for the specified coordinate system S or T Related Commands VA Vector Acceleration VS Vector Speed VP Vector Position CR Circle VE Vector End 371 VM Vector Mode BG Begin Sequence IT Smoothing constant S curve Examples VECTOR Vector Program Label VMAB Specify plane of motion VA1000000 Vector Acceleration VD 5000000 Vector Deceleration VS 2000 Vector Speed VP 10000 20000 Vector Position VE End Vector BGS Begin Sequenc AMS Wait for Vector sequence to complete EN End Program 372 VE Vector Sequence End F
34. Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BN contains the serial number of the controller Related Commands BP Burn Program BV Burn Variables 107 Examples KD KP KI AC DC SP MT 100 10 1 200000 150000 10000 1 Set Set Set Set Set Set Set damping term for A axis proportional gain term for A axis integral gain term for A axis acceleration deceleration rate speed 1 motor type for A axis to be typ polarity servo motor MO Turn motor off BN Burn parameters may take up to 5 seconds e reversed 108 BO Brushless Offset Full 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 n n n n or BOA n where n specifies the voltage n is a signed number in the range 9 998 to 9 998 with a resolution of 0 0003 n Return the brushless offset for the specified axis Usage While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BOn contains the offset voltage on the DAC for the specified axis Related Commands BA Brushless Axis BB Brushless Phase Begins BC Brushless Commutation BD Brushless Degrees BI Brushless Inputs BM Brushless Modu
35. Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _EGn contains ECAM status for specified axis O axis is not engaged 1 axis is engaged Related Commands EA Choose ECAM master EB Enable ECAM EC Set ECAM table index EM Specify ECAM cycle EP Specify ECAM table intervals amp staring point EQ Disengage ECAM 165 ET ECAM table Examples EG 700 1300 Engages the A and B axes at the master position 700 and 1300 respectively B _EGB Return the status of B axis 1 if engaged Note This command is not a trippoint This command will not hold If the execution needs to be the execution of the program flow use MF or MR command held until master position is reached 166 EI UDP Event Interrupts Full Description EI enables UDP interrupts for the predefined event conditions in the table below When a condition e g Axis A profiled motion complete occurs after EI is armed a status byte value e g DO or 208 is delivered to the host PC inside a UDP packet GalilTools version 1 2 1 0 or newer required for software support The UDP packet can contain up to 16 individual status bytes and is framed as the following Format Header fixed byte Status bytes 1 16 bytes Payload Byte count 0x03 0x12 including header and footer Example 0x01 OxDOF1DBE1 0x06 Example Decoded Interrupt Packet Indicator Axis A Profiled
36. _YCn contains the encoder resolution for the specified axis Related Commands QS Error Magnitude YS Stepper Position Maintenance Mode Enable Status YA Step Drive Resolution YB Step Motor Resolution YR Error Correction Examples 1 Set th ncoder resolution of the D axis for a 4000 count rev encoder YC 77 4000 2 Query the D axis value YCD 391 4000 Response shows D axis encoder resolution 392 YR Error Correction Full Description The YR command allows the user to correct for position error in Stepper Position Maintenance mode This correction acts like an IP command moving the axis or axes the specified quantity of step counts YR will typically be used in conjunction with QS Arguments YR m m m m m m m m or YRn m where nis A B C D E F G or H or any combination to specify the axis or axes m is a magnitude in step counts Usage While Moving No Default Value 0 In a Program Yes Default Format 1 4 Command Line Yes Operand Usage None Related Commands QS Error Magnitude YA Step Drive Resolution YB Step Motor Resolution YR Error Correction YS Stepper Position Maintenance Mode Enable Status Examples 1 Using an SDM 20620 microstepping drive query th rror of the B axis 393 QSB 2253 This shows 253 step counts of error The SDM 20620 resolution is 64 microsteps per full motor step nearly 4 full motor steps of error 2 Correct for the error YRB _QSB
37. at the output compare signal labeled CMP on the ICM 1900 and ICM 2900 For one shot the output goes low until OC is called again Axes A D pulses are output on the CMP pin and axes E H pulses are output on the second CMP pin Both outputs can be used simultaneously For both OC compare signals 1 4 axis output and 5 8 axis output to execute successfully the beginning pulse position for both commands MUST be within 65535 counts of their current axis positions when the commands are executed 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 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 CE 15 Arguments OCx m n where x A B C D E F G H specifies which encoder input to be used m Absolute position for first pulse Integer between 2 109 and 2 109 n Incremental distance between pulses Integer between 65535 and 65535 0 one shot when moving in the forward direction 65536 one shot when moving in the reverse direction OCA 0 will disable the Circular Compare function on axes A D OCE 0 will disable the Circular Compare function on axes E H 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 pul
38. axes Usage While Moving Yes Default Value 256000 In a Program Yes Default Format 10 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _ACx contains the value of acceleration for the specified axis Related Commands DC Specifies deceleration rate FA Feedforward Acceleration IT Smoothing constant S curve Examples Ac 150000 200000 300000 400000 Set A axis acceleration to 150000 B axis to 200000 counts sec2 the C axis to 300000 counts sec2 and the D axis to 400000 count sec2 AC Request the Acceleration 149504 199680 299008 399360 Return Acceleration 61 resolution 1024 V _ACB Assigns the B 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 fol Llowing error during acceleration and the motor will not follow the commanded profile The acceleration feedforward command FA will hel lp minimize the error 62 AD After Distance Full 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
39. axis Related Commands MO Motor Off SH Servo Here Examples 118 BW100 Set brake delay to 100 ms TM1000 for the X axis 119 BZ Brushless Zero Full 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 n n n n or BZA n or BZ lt t where n is areal number between 4 998 and 4 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 voltage must be large enough to move the motor If the argument is positive when the BZ operation is complete the motor will be left in the off state MO A negative value causes the motor to end up in the on state SH lt t is an integer between 1 and 32767 and represents the settling time of the BZ function The controller will wait t sec to update sufficient samples sampling rate 1000 sec by default to settle the motor at the zero magnetic phase The t parameter should be specified prior to issuing the BZ command 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 While Moving No Defaul
40. ccted ian deeh cede as ae sod A cn R tease 128 A sistas lnesanestre essa A seh anea cya A A ele beau uaunba saci R meena med 130 EM dad uc 132 CN OPE ta cadena Dai snip nda ea Ea ca ben cabo c Sde a Ss Gals sin eae gps a isha wana a e a des 133 CORR 135 A O RO 137 A a a du spe aan A a pe E apenas Sapeaiosaa nose E A AA 139 MV she css cts eyes SAA ARE 143 TOC A ness ahe alan atts Gatea stan NRA aE A E N 145 DEA A A cals as doe stages A EA AAA E sates 147 Dist 149 Dindir 150 DN SS Na 152 Dri A AA taes EE 153 DR A A A A AR 155 Didi siid 156 A vas aan tbsp caaieaaleed an a R AA R R aoias Moen arama 157 PAE RENO 159 ER ai a a a A E A A E E 160 PESAS A E 162 ED aae R A A O A R CPTI SPR A R RRS 164 A E acy E E ie Bec ae E T A 165 FI E EEE AA is 167 ELSE E A E etre ere 170 o A n a R A R A A A A A AE TAA e 172 EN aves Goh A gad nds A E da gust A A E AS 174 ENDIE 00 AA e AA i A AT ao 176 TOD cee Sascha candi inbaa tu Wie baa toasted Gaus aes sett ca allt tB E 177 EPen a Maan tee tegatana aan ties Naan utese Seta A E tte 178 PO A AAA AA 180 A O O O 182 ES AA di 184 J A E PP apse danse E E E ans a aawatesouetes 186 O 188 A a dhne teem ean E E A N aia deta a Ie 190 PA A ii 191 A ss eee a a Sone de cso A acon g Sa pos uaa E ae 193 A iiss cae selva ie aa sap eda ogee wes eds og Suave E eld aida ia vs EA 195 Eliana dai 197 Pa ONO N 198 CA A A A R 199 A nan A asd bestia dca A ouch nancies ba ges ga can eis Sad aes 955 pos ps sns ba Sura ba a eae 2
41. comparison expression can also be printed with MG or assigned to a variable Arguments n lt m or n gt m or n m or n lt m or n gt m or n lt gt m where n and m are signed numbers in the range 2147483648 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands O Parentheses IF If statement JP Jump JS Jump subroutine Examples 57 IF x gt 2 y 4 MG true ENDIF x must be greater than 2 and y equal to 4 for the message to print 58 Equals Assignment Operator Full Description The assignment operator is used for three reasons 1 to define and initialize a variable x 0 before it is used 2 to assign a new value to a variable x 5 3 to print a variable or array element x which is equivalent to MG x MG is the preferred method of printing Arguments mmmmmmmm n where mmmmmmmm is a variable name and n is a signed number in the range 2147483648 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands MG Print Message Examples x 5 x 5 0000 MG x 5 0000 define and initialize x to 5 print x two different ways 59 AB Abort Full Description AB Abort stops a motion instantly without a controlled deceler
42. decimal value between and 1000000 with a resolution of 1 10 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 While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BMnh indicates the cycle length in counts for the specified axis Related Commands BA Brushless Axis BB Brushless Phase Begins BC Brushless Commutation BD Brushless Degrees BI Brushless Inputs BO Brushless Offset BS Brushless Setup BZBZ Brushless Zero 105 Examples BM 60000 Set brushless modulo for B axis to be 60000 BMC 100000 3 Set brushless modulo for C axis to be 100000 3 33333 333 BM 7 77 2 Interrogate the Brushless Module for the D axis Note Changing the BM parameter causes an instant change in the commutation phase 106 BN Burn Full Description The BN command saves controller parameters 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 AC CE GR MT SM AF CN HV NB SP AG CO IA NF TK AQ CW IK NZ TL AU DC IL OA TM BA DHIT OE TR BB DV KD OF VA BI EO KI OP VD BL ER KP OT VF BM FA KS OV VS BO FL LC PF YA BR FV LD PL YB BW GA LZ PW YC CB GM MO SB Arguments Usage While Moving Yes Default
43. difficulty for the software It may be necessary to re enable the CW command The CW command status can be stored in EEPROM 142 DA Deallocate the Variables amp Arrays Full 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 Galil PC 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 Because of the dual function only one field can be set at a time Instead of CW2 1 use CW2 CW 1 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 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 inform
44. first profiled motion is complete AM tests for profile completion The a ctual motor may still be moving To halt program sequence until t ne actual physical motion has completed use the MC command Another method for testing motion complete is to check for the internal variable _BGn being equal to zero see BG command 73 AO Analog Output Full Description The AO command sets the analog output voltage of Modbus Devices connected via Ethernet Arguments AO m n where m is the I O number calculated using the following equations m SlaveAddress 10000 HandleNum 1000 Module 1 4 Bitnum 1 Slave Address is used when the ModBus device has slave devices connected to it and specified as Addresses 0 to 255 Please note that the use of slave devices for modbus are very rare and this number will usually be 0 HandleNum is the handle specifier from A to F Module is the position of the module in the rack from 1 to 16 BitNum is the I O point in the module from 1 to 4 n the voltage which ranges from 9 99 to 9 99 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands SB Set Bit CB Clear Bit MB Modbus AP Examples 74 AP After Absolute Position Full Description The After Position AP command is a trippoint used to control the timing of events This c
45. first vector in a coordinated motion sequence defines th origin for that sequence All other vectors in the sequence ar defined by their endpoints with respect to the start of the move sequence 377 VR Vector Speed Ratio Full 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 command VS or the operators lt and gt used with CR VP and LI commands 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 Returns the value of the vector speed ratio for the T coordinate plane Usage While Moving Yes Default Value 1 In a Program Yes Default Format 2 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VRn contains the vector speed ratio of the specified coordinate system S or T Related Commands VS Vector Speed Examples FA Vector Program VMAB Vector Mode VP 1000 2000 Vector Position CR 1000 0 360 Specify Arc VE End Sequence 378 VS 2000
46. for mask Queued with UI FO FF 240 255 User Interrupt See UI command n is an 8 bit integer mask between 0 and 255 and is used to select the specific digital input s if bit 15 of m is set indicating that digital inputs are to be used for interrupting bit n 2 bit status byte Condition 0 01 1 E1 225 Digital input 1 is low IN 1 0 02 2 E2 226 Digital input 2 is low IN 2 0 04 4 E3 227 Digital input 3 is low IN 3 0 08 8 E4 228 Digital input 4 is low IN 4 0 10 16 E5 229 Digital input 5 is low IN 5 0 20 32 E6 230 Digital input 6 is low IN 6 0 40 64 E7 231 Digital input 7 is low IN 7 0 80 128 E8 232 Digital input 8 is low IN 8 0 The conditions must be re enabled with EI after each occurrence h is 0 7 or 1 and indicates the preconfigured UDP handle where interrupts should be sent 0 7 indicates handles A H respectively If the handle specified by h is not UDP or not initialized an error will occur TC1 A 1 disables the interrupt dispatch GalilTools software will auto configure h allowing the user to ignore its use in most cases NYDN WN Usage While Moving Yes Default Value 0 0 1 In a Program Yes Default Format Command Line Yes Controller Usage DMC 4000 Operand Usage _EI contains the interrupt mask m Related Commands UI User Interrupt Examples 168 1 Interrupt when motion is complete on all axes OR if a limit sw
47. home switch is high bit 1 has a value of latch is not armed bit 0 has a value of 1 bit 6 has a value of 0 lue of 1 lue of 1 1 361 TT Tell Torque Full 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 nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument will provide the torque for all axes Usage While Moving Yes Default Value In a Program Yes Default Format 1 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TTn contains the value of the torque for the specified axis Related Commands TL Torque Limit Examples V1 _TTA Assigns value of TTA to variable V1 TTA Report torque on A 0 2843 Torque is 2843 volts 362 TV Tell Velocity Full Description The TV command returns the actual velocity of the axes in units of encoder count s The value returned includes the sign Arguments TV nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument will provide the velocity for all axes Usage While Moving Yes Default Value In a Program Yes Default Format 8 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TVn contains the value of the velocity for the specified axis Related Commands Examples VELA _TVA Assigns value of A axis velocity to the variable VELA TVA Returns the A ax
48. in the formula If the nx value is a zero then the bank of 8 I O points will be configured as inputs For example if banks 3 and 4 are to be configured as outputs CO 6 is issued Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage _CO returns extended I O configuration value Related Commands CB Clear Output Bit SB Set Output Bit OP Set Output Port 135 TI Tell Inputs Examples co 15 Configure all points as outputs co 0 Configure all points as inputs co 1 Configures bank 2 as outputs on extended I O Hint See user manual appendix for more information on the extended 1 0 board 136 CR Circle Full Description The CR command specifies a 2 dimensional arc segment of radius r starting at angle and traversing over angle A positive denotes counterclockwise traverse negative denotes clockwise The VE command must be used to denote the end of the motion sequence after all CR and VP segments are specified The BG Begin Sequence command is used to start the motion sequence All parameters r must be specified Radius units are in quadrature counts and have units of degrees The parameter n is optional and describes the vector speed that is attached to the motion segment Arguments CR r lt n gt o where r is an unsigned real number in the range 10 to 6000000 decimal radius a signed number in the range 0 to
49. inaccurate 81 AT At Time Full Description The AT command is a trippoint 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 even integer in the range 0 to 2 Billion n 0 defines a reference time at current time n gt 0 specifies a wait time of n msec from the reference time n lt 0 specifies a wait time of n msec from the reference time and re sets the reference time when the trippoint is satisfied AT n is equivalent to AT n AT lt old reference n gt Usage While Moving Yes Default Value 0 In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands Examples The following commands are sent sequentially AT 0 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 referenc at 150 AT 80 Waits 80 msec from new reference total elapsed time is 230 msec 82 AU Set amplifier current loop Full Description The AU command sets the amplifier current loop gain for the AMP 430x0 Current loop is ava
50. is complete 3 If in jog JG mode 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 AD can only be used when there s command motion on the axis If the direction of motion is reversed when in PT mode the starting position for AD is reinitialized to the position at which the motor is reversed Note AD command 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 n n n n or ADA n where n is an unsigned integers in the range 0 to 2147483647 decimal Note The AD command cannot have more than largument Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands AV After distance for vector moves AP After position trip point AR After relative distance trip point 63 MF Motion Forward trip point MR Motion Reverse trip point Examples A DPO 0 Begin Program PR 10000 20000 Specify positions BG Begin motion AD 5000 After A reaches 5000 MG Halfway to A TPA Send message AD 10000 After B reaches 10000 MG Halfway to B TPB Send message EN End Program Hint The AD command is accurate to the number of counts that occur in 2 TM sec Multiply your speed by 2 TM sec to obtain the maximum po
51. is detected on the index line When the transition is detected the position is latched and the motor will decelerate to a stop In the second stage the motor will reverse direction and move to the latched position of the index pulse at the speed set by the HV command Arguments FI nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or sequence No argument specifies all axes Usage While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands FE Find Edge HM Home BG Begin AC Acceleration Rate DC Deceleration Rate SP Search Speed 195 HV Homing Velocity Examples HOME Home Routine JG 500 Set speed and forward direction FIA Find index BGA Begin motion AMA After motion MG FOUND INDEX EN 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 196 FL Forward Software Limit Full Description The 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 A 1 B 1 C 1 D 1 The forward limit is disabled at 2147483647 The units are in count
52. last value set Usage While Moving Yes Default Value 0 9438 In a Program Yes Default Format 1 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _OVn contains the OV value for the specified axis Related Commands OA Off on encoder failure OV Off on encoder failure voltage Examples OTX 10 Set time to 10 milliseconds OVX 5 Set voltage to 5 285 OAX 1 Enabl ncoder detection feature 286 P2CD Serial port 2 code Full Description P2CD returns the status of the auxiliary serial port port 2 Arguments Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands P2CH Serial port 2 character P2NM Serial port 2 number P2ST Serial port 2 string CI Configure COMINT CC Configure serial port 2 COMINT Communication interrupt automatic subroutine Examples PROV DMC4040 Rev 1 0 RES 287 P2CH Serial port 2 character Full Description P2CH returns the last character sent to the auxiliary serial port port 2 Arguments Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands P2CD Serial port 2 code P2NM Serial port 2 number P2ST Serial port 2 string CI Configure COMINT CC Configure serial port 2 COMINT Communication interrupt automatic subrouti
53. n 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 syntax are listed below Valid syntax ACn Specify argument for A axis only AC n n Specify argument for A and B only AC n n Specify argument for A and C only AC n n n n Specify arguments for A B C D axes AC n n n n Specify arguments for A B C D AC n n Specify arguments for B and E axis only AC n n Specify arguments for E and F 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 PRB 1000 Sets B axis data at 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 A axis PR The controller will return the PR value for the D axis PR The controller will return the PR value for the A B C and D axes PR
54. 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 Note Bit wise operators and amp can be used to evaluate multiple conditions Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands ELSE Optional command to be used only after IF command ENDIF End of IF conditional Statement Examples 215 A IF _TEA lt 1000 IF conditional statement based on A motor position MG Motor is within 1000 counts of zero Message to b xecuted if IF conditional statement is true ENDIF End of IF conditional statement EN End Program 216 IH Open Internet Handle Full Description The IH command is used when the controller is operated as a master also known as a client This command opens a handle and connects to a slave Each controller may have 8 handles open at any given time They are designated by the letters A through H To open a handle the user must specify 1 The IP address of the slave 2 The type of session TCP IP or UDP IP 3 The port number of the slave This number is not necessary if the slave device does not require a specific port value If not specified the controller will spe
55. on the communication enhancement from the command sets the MSB of unsolicited returned ASCII characters to 1 Unsolicited ASCII characters are characters that are returned from a program running on the controller This command does not affect solicited characters which are characters that are returned as a response to a command sent from a host PC Arguments CW n m where n is a number either 0 1 or 2 0 or Causes the controller to return the copyright information 1 Causes the controller to set the MSB of unsolicited returned characters to 1 2 Causes the controller to not set the MSB of unsolicited characters mis 0 or 1 optional 0 Causes the controller to pause program execution when hardware handshaking disables character transmissions 1 Causes the controller to continue program execution when hardware handshake disables character transmissions output characters will be lost Usage In a Program Yes Command Line Yes Can be Interrogated Yes Used as an Operand Yes Operand Usage _CW contains the value of the data adjustment bit 1 on 2 off Related Commands Examples 141 Note The CW command can cause garbled characters to be returned by the controller The default state of the board is to disable the CW command However the terminal software may enable the CW command for internal usage If the board is reset while the Galil software is running the CW command could be reset to the default value which creates
56. program flow to jump to the COMINT subroutine If multiple program threads are used the COMINT subroutine runs in thread 0 and the remaining threads continue to run without interruption The characters received can be accessed via the internal variables P2CH P2ST P2NM P2CD For more see Operator Data Entry Mode in chapter 7 of the user manual Arguments CI n m PARAMETER EXPLANATION n 0 Do not interrupt n Interrupt on carriage return n 2 Interrupt on any character n 1 Clear interrupt data buffer Usage While Moving Yes Default Value n 0 m 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands CC Configure communications IN Communication input MG Message output Examples 130 Interrupt when the lt enter gt key is received on port 2 Interrupt on a single character received on Port 2 131 CM Contour Mode Full 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 number of available contour segments A value of 0 returned from the command CM indicates that the Contour Buffer is full A value of 511 indicates that the Contour Buffer is empty Arguments CM nnnnnnnnnn where nis A B C
57. return 1 if there is no physical link Related Commands IH Internet Handle Examples TA 151 12 53 89 Assigns the controller with the address 151 12 53 89 IA 2534159705 Assigns the controller with the address 151 12 53 89 IA lt 500 Sets the timeout value to 500msec ID 213 ID Identify Full Description The ID command is used to query the controller for the accessories that are attached It will respond with the type of communications board followed by the amplifier for axes 1 4 and then axes 5 8 if any are attached Arguments None Usage While Moving Yes Default Value In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands Examples ID Connector Connector Connector J3 Communications Board CMB 41012 3 3 volt i o Pl Stepper Amplifier Board AMP 44040 P2 Stepper Amplifier Board AMP 44040 214 IF IF conditional statement Full Description The IF command is used in conjunction with an ENDIF command to form an IF conditional statement The arguments consist of one or more conditional statements and each condition must be enclosed with parenthesis 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
58. returned by TP The number of 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 negative 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 n is an integer between 0 and 4 which represent the number of places after the decimal point n Returns the value of m Usage O While Moving Yes Default Value 10 0 In a Program Yes Default Format 2 1 Command Line Yes Controller Usage ALL CONTROLLERS perand Usage _PF contains the value of the position format parameter 293 Related Commands Examples PX Tell position of X 0 Default format PF 5 2 Change format to 5 digits of integers and 2 of fractions PX Tell Position 721 00 PE 5 2 New format Change format to hexadecimal
59. system component such as encoder or amplifier 183 ES Ellipse Scale Full Description The ES command divides the resolution of one of the axes in a vector mode VM This function allows for the 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 VM When m gt n the resolution of the first axis x will be multiplied by the ratio m n When m lt n the resolution of the second axis y will be multiplied by n m The resolution change applies for the purpose of generating the VP and CR commands effectively changing the axis with the lower resolution to match the higher resolution 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 where m and n are positive integers in the range between 1 and 65 535 Usage While Moving Yes Default Value 1 1 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands VM Vector Mode CR Circle move VP Vector position Examples VMAB ES3 4 Scale B resolution by 4 3 184 VMCA ES2 3 Scale A resolution by 3 2 VMAC ES3 2 Scale A Resolution by 3 2 Note ES must be issued after VM 185 ET Electronic cam table Full Descriptio
60. the axis is still stopped and in addition code is executed LIMSWI is most commonly used to turn the motor off when a limit switch is tripped see example below For LIMSWI to run the switch corresponding to the direction of motion must be tripped forward limit switch for positive motion and negative limit switch for negative motion LIMSWI interrupts thread 0 when it runs Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands _LFX State of Forward limit switch _LRX State of Reverse limit switch Examples Main print a message every second MG Main WT1000 JP Main EN 20 MCTIME MC command timeout automatic subroutine Full Description MCTIME runs when the MC command is used to wait for motion to be complete and the actual position TP does not reach or pass the target _PA _PR within the specified timeout TW Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands MC Wait for motion complete trip point TW MC timeout Examples BEGIN Begin main program TWX 1000 Set the time out to 1000 ms PRX 10000 Position relative MCX Motion Complete trip point r r r BGX Begin motion r End main program 21 POSERR Position error automatic subroutine Full Description The factory default behavior of the Galil con
61. the current value Related Commands _LFX State of forward limit _LRX State of reverse limit SC Stop code BL Backward soft limit FL Forward soft limit Examples 242 LDX 1 Disable the forward limit switch on the X axis 243 LE Linear Interpolation End Full 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 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 While Moving Yes Default Value 0 In a Program Yes Default Format PF Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LEn contains the total vector move length in encoder counts Related Commands LI Linear Distance BG BGS Begin Sequence LM Linear Interpolation Mode VS Vector Speed VA Vector Acceleration VD Vector Deceleration 244 PF Position Formatting Examples CAS Specify S coordinated motion system LM CD Specify linear interpolation mode for C and D axes LI 100 200 Specify linear distance LE End linear move
62. the limit is exceeded the Error output will go low true and the controller s red light will be turned on If the Off On Error OE1 command is active the motors will be disabled For debugging purposes ERO and ER 1 can be used to turn the red LED on and off Arguments ER n n n n n n n n or ERA n where n is an unsigned number in the range 1 to 2147483647 which represents the error limit in encoder counts A value of 1 will disable the position error limit for the specified axis n Returns the value of the Error limit for the specified axis Usage While Moving Yes Default Value 16384 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _ERn contains the value of the Error limit for the specified axis Related Commands OE Off On Error POSERR Automatic Error Subroutine Examples ER 200 300 400 600 Set the A axis error limit to 200 the B axis error limit to 300 the C axis error limit to 400 and the D axis error limit to 600 ER 1000 Sets the B axis error limit to 1000 leave the A axis error limit unchanged 182 ER Return A B C and D values 200 100 400 600 ER Return A value 200 V1 _ERA Assigns V1 value of ERA Vl Returns V1 200 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
63. to occur prior to the error interrupt the trippoint condition is preserved on the return to the program if RE is used A motion trippoint such as MF or MR requires the axis to be actively profiling in order to be restored with REI REO clears the trippoint To avoid returning to the main program on an interrupt use the ZS command to zero the subroutine stack Arguments RE n where n 0 Clears the interrupted trippoint n 1 Restores state of trippoint no argument clears the interrupted trippoint Usage While Moving No Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands POSERR Error Subroutine LIMSWI Limit Subroutine Examples A JP A EN Label for main program 317 POSERR Begin Error Handling Subroutine MG ERROR Print message SB1 Set output bit 1 RE Return to main program and clear trippoint 318 REM Remark Full Description REM is used for comments The REM statement is NOT a controller command Rather it is recognized by Galil PC software which strips away the REM lines before downloading the DMC file to the controller REM differs from NO or in the following ways 1 NO comments are downloaded to the controller and REM comments aren t 2 NO comments take up execution time and REM comments don t therefore REM should be used for code that needs to run fast 3 REM comments cannot be r
64. use inputs q Abort input will not terminate program execution 0 Abort input will terminate program execution Usage While Moving Yes Default Value 1 1 1 0 0 In a Program Yes Default Format 2 0 Command Line Yes Controller Usage ALL CONTROLLERS 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 O disabled _CN4 Contains whether the abort input will terminate the program 133 Related Commands AL Arm latch Examples CN 1 1 Sets limit and home switches to active high CNpy 1 Sets input latch active low 134 CO Configure Extended I O Full Description The CO command configures which points are inputs and which are outputs on the extended I O The 32 extended I O points of the controller can be configured in banks of 8 The extended I O is denoted as bits 17 48 and banks 2 5 Arguments CO n where n is a decimal value which represents a binary number Each bit of the binary number represents one bank of extended I O When set to 1 the corresponding bank is configured as an output The least significant bit represents bank 2 and the most significant bit represents bank 5 The decimal value can be calculated by the following formula n n2 2 n3 4 n4 8 n5 where nx represents the bank To configure a bank as outputs substitute a one into that nx
65. 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 only requires an encoder and does not require that the axis be under servo control When using a stepper motor this condition is satisfied when the stepper position as determined by the output buffer has crossed the specified Reverse Motion Position For further information see Chapter 6 of the User Manual Stepper Motor Operation Arguments MR n n n n n n n n or MRA n where n is a signed integers in the range 2147483648 to 2147483647 decimal Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands AR Trippoint for Relative Distances AP Trippoint for after Absolute Position Examples TEST Program Test DPO Define zero JG 1000 Jog mode speed of 1000 counts sec BG A Begin move MF 3000 After passing the position 3000 V1 _TPA Assign V1 A position 266 MG Position is V1 Print Message ST Stop EN End of Program Hint The accuracy of the MR command is the number of counts that occur in 2 TM sec Multiply the speed by 2 IM sec to obtain the maximum error MR tests for absolute position The MR command can also be used when the specified motor is driven
66. 01 A NS 203 Rania ia Ai ida 205 A 207 RO 209 HV harane laa A AT A R R DA 210 Los CAP e O 211 e eis RU A epee on ted a nl el Sunol i Sea Nl atl Ga ls din yes naires ede 212 MD E 214 SAI AA A satan sina ese 215 diia 217 A E E one ey Sd acme aaa aad nadeesree 221 A EE 222 NR A AA A A A AA A iat 223 A AOS 224 Diana iia 226 Ed ras 228 Pi A AA IA 230 A O ais naa alee us ussace E E Ges nasdeietseaageeanadsaga caters 232 O A OS 235 WU E E E E E ET 236 IP E A ETE 237 Ki A A guy A A ataddaduglees 238 A E E i eeauauatberaiareaamasatenbeeronnioe 239 A R A A A RE IEE A A O A A AS 240 E A E E ah a te E E T Ded 241 TTD er e Sou gach ds A RA E AA boas dese A E a N Eaa EN 242 A E A E R E A 244 E E EE E E TT warateneeenontomes 246 A E EE EE ETE E E EEE EE 248 LM erdot aenn e i i i a a a a i a Slavs 249 Ea Udri 251 A tee E Nasir du teee Sia r eae Na ea cage theta rsa meee miele eoeag 233 A ios cata aes wen A Wesunea aa Decay canoe asd gets Ne eaeus G A oS e uate SRS 255 A A eda E E TE 256 MB ss svselatoacaltsba onvytinuet bane Stes saan eat aula savy Suse a a hyenas abe daaetodl geo a matte 257 O ARO 5 Ron av nnd EEE co pee vse apes getdate E a e e a 259 ME ani NA a A A EES 261 MO n aaa a A T a a A A 263 MO ia 265 Mi A A A A A A A Aa 266 va POOL O mn A 268 MW ansiada rasa 270 NE ON ia 271 NE sii NAAA 272 A n sega aaah ies pda ae A R Aa T A A A aa Mae pasteles as 273 Nadia dd adas 274 A ts i En ARR N AA AA aaa A R aS 275 OB RE RRA 276
67. 200 400 Specifies the position of the slave axes A and C to be synchronized with the second point of the master uv tE ona 00 187 EW ECAM Widen Segment Full Description The EW command allows widening the length of one or two ECAM segments beyond the width specified by EP For ECAM tables with one or two long linear sections this allows placing more points in the curved sections of the table There are only two widened segments and if used they are common for all ECAM axes Remember that the widened segment lengths must be taken into account when determining the modulus EM for the master The segments chosen should not be the first or last segments or consecutive segments Arguments EW m1 n1 m2 n2 where ml is the index of the first widened segment ml is a positive integer between 1 and 255 nl is the length of the first widened segment in master counts n1 is an integer between 1 and 2 147 483 647 m2 is the index of the second widened segment m2 is a positive integer between 3 and 255 n2 is the length of the second widened segment in master counts n2 is an integer between 1 and 2 147 483 647 If m1 or m2 is set to 1 there is no widened segment The segment number m2 must be greater than m1 and m2 may not be used unless ml is used Usage While Moving No Default Value 1 0 1 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLERS Operand Usage _EWO contains
68. 32000 decimal starting angle in degrees 1s 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 n is an unsigned even integer between 0 and 22 000 000 for servo motor operation and between 0 and 6 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 O and 8 000 000 Note The product r must be limited to 4 5 108 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands VP Vector Position VS Vector Speed VD 137 Vector Deceleration VA Vector Acceleration VM Vector Mode VE End Vector BG BGS Begin Sequence Examples VMAB Specify vector motion in the A and B plane VS 10000 Specify vector speed CR 1000 0 360 Generate circle with radius of 1000 counts start at 0 degrees and complete one circle in counterclockwise direction CR 1000 0 360 lt 40000Generate circle with radius of 1000 counts start at 0 degrees and complete one circle in counterclockwise direction and use a vector speed of 40000 VE End Sequence BGS Start motion 138 CS Clear Sequence Full Description The CS command will remove VP CR or LI commands stored in a motion sequence for the S or T coordinate systems
69. 7 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands INT n Integer part Examples MG FRAC 1 2 0 2000 MG FRAC 2 4 0 4000 36 IN n Read digital input Full Description Returns the value of the given digital input either 0 or 1 Arguments IN n where n is an unsigned integer in the range 1 to 96 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands AN n Read analog input OUT n Read digital output SB Set digital output bit CB Clear digital output bit OF Set analog output offset Examples MG IN 1 1 0000 IN 1 2 xX x 1 000 print digital input 1 37 INT n Integer part Full Description Returns the integer part of the given number Note that the modulus operator can be implemented with INT see example below Arguments INT n n is a signed number in the range 2147483648 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands FRAC n Fractional part Examples MG INT 1 2 1 0000 MG INT 2 4 2 0000 38 OUTI n Read digital output Full Description Returns the value of the given digital output either 0 or 1 Argumen
70. 90 0000 MG ACOS 1 0 0001 30 AN n Analog Input Query Full Description Returns the value of the given analog input in volts Arguments AN n where n is the input number assigned to a particular analog input pin 1 8 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Operand Usage AN is an operand not a command It can only be used as an argument to other commands and operators Related Commands AQ Analog Range Examples MG AN 1 print analog input 1 1 7883 x AN 1 assign analog input 1 to a variable 31 ASIN n Inverse sine Full Description Returns in degrees the arc sine of the given number Arguments ASIN n where n is a signed number in the range 1 to 1 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands ACOS n Arc cosine SIN n sine ATAN n Arc tangent COS n Cosine TAN n Tangent Examples MG ASIN 1 90 0000 MG ASIN O0 0 0000 MG ASIN 1 90 0000 32 ATAN n Inverse tangent Full Description Returns in degrees the arc tangent of the given number Arguments ATAN n n is a signed number in the range 2147483647 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands ASIN n Arc
71. A O 217 DEN gasp heatmna wna hensaopainaa R E AA D AA 219 OOF ict sti EE E EET A T ued yes sate A E EE 281 OP a AAA A tea Bs Galas A Sapir ATA a e a 282 OWT 2 sth 5s sae O 284 O SAA SAA A 285 P2CD A chdusinga cous vatxaae se A ioe tpeaineaanei Ra peroneal 287 A A icbtas Satay Siedamaueezele 289 P2S A inni e Gases scan ach RAE N A E E A N 290 PA seai ea A don ss A A A A R Iet 291 TRE rd hat baths ot a a a a e a a a a 293 Prandi 295 PR IS AS NS 297 Pla AA A tas aa wanes 299 PV esaisas case pn sesicea sie E AEA aed nas A A A A A A A 301 Prato ass 303 OD Daba dina 304 OH RN 305 OR A guy eae ndoaan leg antetaddadeg ies 307 DAA rai 308 A A A AERAR 310 QZ iten n a tae ods oh cinalo cgs pn ed gh a i Nie Ue i i dee Ses 311 RA AA i n 312 RO A e 313 A vocxdae A E A das besweus in A TA e 315 RE a Goda A A OS 317 REM viennin TS sedans A dy ed e e AA e a SBM 319 A rnini i aao a A NO UO NA etal UB ee 320 RD a a E A A A N 321 RP tenie e A AAA 323 A aa a tac A A E A O aaa eiis 324 A E PETE TA 325 OD PEPA A EEE E O E S E E si E A E E 327 VEAS ARA A E E E T 328 o D E E T E E E E E E 330 SUED E E E E AE 332 MA a A da ipo A aw 333 SNA ssa seis wed AA AA aul AAA A dd 334 iaa ap alabada 335 SS NO a 337 MIA cal sisson a A A AE 338 PB rran A E A A A A A 340 AA I AEI A EEE A E E EE A A nasa alana Saaneasanne 341 A ia a va R eased as A AE RO RR R N R 345 TEEN OR 346 A RN 348 A coun tiasa daa sehen sicya tatu sg ancus tate baa uauntaseeiearaaauateeu
72. A axis motion sT S Stop coordinated sequence ST ABCD Stop A B C D motion ST Stop ABCD motion ST SCD Stop coordinated AB sequence and C and D motion Hint Use the after motion complete command AM to wait for motion to be stopped 337 TA Tell Amplifier error status Full Description The command returns the amplifier error status The value is decimal and represents an 8 bit value Bit 7 is most significant bit 0 is least Tell Amplifier Error Bit Definition TAO TA3 IT IsTATUS STATUS STATUS STATUS Under Voltage E H Hall Error H Peak Current 0 Axes Axis H Axis Over Temperature E Hall Error G Peak Current 0 H Axes Axis G Axis Over Voltage E H Hall Error F Peak Current F 0 Axis Axis al o 4 Over Current E H all Error E Peak Current Axis EAxis Under Voltage A D Hall Error D Peak Current Axes Axis DAxis gt Over Temperature A Hall Error C Peak Current ID Axes Axis CAxis Axes Axis Axis Axes Axes Axis A Axis Axes Valid for AMP 43040 D3040 Valid for AMP 43040 D3040 amp SDM 44140 D4140 Valid for AMP 43140 D3140 amp Valid for SDM 44140 D4140 amp Valid for SDM 44040 D4040 e Valid for AMP 43040 D3040 amp Valid for AMP 43140 D3140 amp Valid for SDM 44140 D4140 amp Valid for SDM 44040 D4040 gt gt O un x Te er Hint If your Brushed type servo motor is d
73. Command Line Yes Controller Usage DMC 40x0 D430x0 Operand Usage Related Commands TA Tell Amplifier AG Amplifier Gain BS Brushless Setup EXAMPLE AW Y 60 5 0 Sets a 60 volt drive motor with 5 millihenries inductance and normal current loop gain 4525 732 Is the bandwidth in hertz 87 BA Examples 88 BA Brushless Axis Full Description The BA command configures the controller axes for sinusoidal commutation and reconfigures the controller to reflect the actual number of motors that can be controlled Each sinusoidal commutation axis requires 2 motor command signals The second motor command signals will always be associated with the highest axes on the controller For example a 3 axis controller with A and C configured for sinusoidal commutation will require 5 command outputs 5 axes controller where the second outputs for A and C will be the D and E axes respectively Arguments BA xxxxxxxxxx where nis A B C D E F G or any combination to specify the axis axes for sinusoidal commutation brushless axes No argument removes all axes configured for sinusoidal commutation Usage While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BAn 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 A axis DAC If the motor is configured a
74. Data EN Data lt control gt ZEnd download 151 DM Dimension Full Description The DM command defines a single dimensional array with a name and the number of elements in the array 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 c is aname of up to eight characters starting with an alphabetic character n specifies the size of the array number of array elements n Returns the number of array elements available Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _DM contains the available array space For example before any arrays have been defined the operand _DM will return 16000 If an array of 100 elements is defined the operand _DM will return 15900 Related Commands DA Deallocate Array Examples DM Pets 5 Dogs 2 Cats 3 Define dimension of arrays pets with 5 elements Dogs with 2 elements Cats with 3 elements DM Tests 1600 Define dimension of array Tests with 1600 elements 152 DP Define Position Full Description The DP command 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 The DP command sets the commanded reference position for axes configured as steppers The units are in steps Ex
75. E Find Home Sensor only and FI Find Index only commands 208 HS Handle Assignment Switch Full Description The HS command is used to switch the handle assignments between two handles The controller assigns handles when the handles are opened with the HC command or are assigned explicitly with the IH command Should those assignments need modifications the HS command allows the handles to be reassigned Arguments HSh i where h is the first handle of the switch A through H S i is the second handle of the switch A through H S S is used to represent the current handle executing the command Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands IH Internet Handle Examples HSC D Connection for handle C is assigned to handle D Connection for handle D is assigned to handle C HSS E Executing handle connection is assigned to handle E Connection for handle E is assigned to executing handle 209 HV Homing Velocity Full Description Sets the slew speed for the FI final move to the index and all but the first stage of HM Arguments HV n n n n n n n n or HVA n where n is an unsigned even number in the range 0 to 22 000 000 for servo motors The units are encoder counts per second OR n is an unsigned number in the range 0 to 6 000 000 for stepper motors n Returns th
76. Galil Motion Control HARDWARE COMMAND REFERENCE Edition 7 31 2009 e Hardware Referenced All DMC40x0 e Command Details included for All DMC DMC40x0 Galil Motion Control 270 Technology Way Rocklin California 95765 Web www galilmc co Table of Contents Table of Contes A A es A aa ath iaa 2 DV ELV CW ss arses Rosso aaa Rese e E AE 8 A oes ae TEE 13 FAMPER Ra tna dada 14 A Coeur Racin sda heat tons dean cata Saetaeiad ae nea a tanec a NN 15 AUTOERR anda 16 CMDER R ca Rink sho gata nh iit Atay a a A A slate it atte de 17 AS a a EERE ann EUR REET A TY Ars ee CERT 18 PINTO ES A AS aida aches asa da O 19 LIMS Wide Us Woke Sale ER Ga 20 A e a a a e vgn tik aed dale cnctt tas 21 POSEER A 22 AR a e Oe Lala Mh fa E oe hae 23 O PE TEA E A A E TAE E S E TTE EA 25 aa RA EAEE EE ESAE ESE EES 26 VEE L EIEE OOE EEE E T A AAE TA 27 A A E A A E A E E E E A enact 28 o erna a n N enn yy O A N a N N y 29 DACOS Musa a T O 30 A acs sa as nc dea ie A dot Do ees 31 KOA SUN tds ando 32 DATA ii Aid 33 A Msani Sid ebeaer ieee tate tae nated aed as ria eal Goan sacar Gel ntk Mra a nats ital cee 4 2t8 34 OCOS A A ER A 35 OPERA CA RAE 36 CIN ansia addons 37 INTO oda 38 OUT NS 39 TRUSTED INGEN A E 40 SINM a dd 41 OSO n sita pisa 43 A Taoaec bs dake es ease Sas Svat esa a a ed esau recat a naa tac dae NNN 44 de o ed CAN Ba TAAN BEN SE i We NO PRR OSE OT ro NE De ee rea ee OM ne ee 45 OR Meteo hae atc to yc ata Ret Sane ETE
77. M sec to obtain the maximum error AP tests for absolute position Use the AD command to measure incremental distances 76 AQ Analog Input Configuration Full Description The Analog Configuration AQ command is used to set the range of the analog inputs There are 4 different ranges that each analog input may be assigned Setting a negative range for inputs 1 3 5 or 7 configures those inputs as the differential input relative to input 2 4 6 and 8 respectively Arguments AQn m where n is an integer from 1 8 that represents the analog input channel m is an integer from 1 4 that designates the analog range m Analog Range Position Range 12 bit 16 bit 1 5V 2048 to 2047 32 768 to 32767 2 10V 2048 to 2047 32 768 to 32767 3 0 5V 0 to 4095 0 to 65535 4 0 10V 0 to 4095 0 to 65535 Usage While Moving Yes Default Value n 2 In a Program Yes Default Format 1 0000 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _AQn holds the range setting for that axis where n 1 8 Related Commands AN n Read Analog Input AF Analog Feedback Examples AQ2 3 Specify analog input 2 as 0 5V 77 AQ1 3 Specify analog input 1 as 0 5V and the differential input to analog input 2 MG_AQ2 3 0000 78 AR After Relative Distance Full 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
78. N 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 11 For example the command KD is used to set the Derivative Constant for each 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 12 Label subroutine Full Description The operator deno
79. RS 232 Since it assigns an IP address to the controller communication with the controller via internet cannot be accomplished until after the address has been assigned Arguments IA 1p0 1p1 1p2 ip3 or IA n or IA lt t where 1p0 ipl 1p2 ip3 are 1 byte numbers separated by commas and represent the individual fields of the IP address n is the IP address for the controller which is specified as an integer representing the signed 32 bit number two s complement lt t specifies the time in update samples between TCP retries 1 lt t lt 2 147 483 647 up to 5 retries occur TCP IP connection only gt u specifies the multicast IP address where u is an integer between 0 and 63 UDP IP connection only IA will return the IP address of the controller Usage While Moving No Default Value n 0 t 250 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _IAO contains the IP address representing a 32 bit signed number Two s complement _IA1 contains the value for t retry time _TA2 contains the number of available handles _IA3 contains the number of the handle using this operand where the number is 0 to 5 0 represents handle A 1 handle B etc _TA4 contains the number of the handle that lost communication last contains A 1 on reset to indicate no handles lost 212 _IAS returns autonegotiation Ethernet speed Returns 10 for 10 Base T and returns 100 for 100 Base T it will
80. Related Commands Examples UL Begin upload A Line 0 NO This is an Example Line 1 NO Program Line 2 EN Line 3 lt cntrl gt Z Terminator 368 VA Vector Acceleration Full Description This command sets the acceleration rate of the vector in a coordinated motion sequence Arguments VA s t where s and t are unsigned integers in the range 1024 to 1073740800 s represents the vector acceleration for the S coordinate system and t represents the vector acceleration for the T coordinate system The parameter input will be rounded down to the nearest factor of 1024 The units of the parameter is counts per second squared 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 While Moving Yes Default Value 256000 In a Program Yes Default Format 10 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VAx contains the value of the vector acceleration for the specified axis Related Commands VS Vector Speed VP Vector Position VE End Vector CR Circle VM Vector Mode BG 369 Begin Sequence VD Vector Deceleration IT Smoothing constant S curve Examples VA 1024 Set vector acceleration to 1024 counts sec2 VA Return vector acceleration 1024 VA 20000 Set vector acceleration VA 19456 Return vector acceleration ACCEL _VA Assign variable ACCEL the value of
81. SB Set Bit Full Description The SB command sets one of the output bits Arguments SB n where n is an integer which represents a specific controller output bit to be set high output 1 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS RELATED COMMAND CB Clear Bit Operand Usage Related Commands Examples SB 5 Set output line 5 SB 1 Set output line 1 327 SC Stop Code Full Description The Stop Code command returns a number indicating why a motor has stopped The controller reponds with a number interpreted as follows Stop Code Table Stop Code O Motors are running independent mode Motors decelerating or stopped at commanded independent position Decelerating or stopped by REV limit switch or soft limit BL S Decelerating or stopped by encoder failure OA 1 DMC 40x0 18x6 Amplifier Fault DMC 40x0 Running in PVT mode PVT mode completed normally Motors are running Vector Sequence 101 Motors stopped at commanded vector 99 Arguments 328 SC nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes Usage Usage and Default Details Value Ina Program Yes Yes Default Value Operand Usage _SCn contains the value of the stop code for the specified axis Related Commands LU LCD Update Examples Tom _SCD Assign the Stop Code of D to variable Tom 329
82. The latch will now capture the stepper position based on the pulses generated by the controller Arguments RL nnnnnnnnnn where nis X Y Z W A B C D E F G or H or any combination to specify the axis or axes Usage While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _RLn contains the latched position of the specified axis RELATED COMMAND AL Arm Latch 321 Related Commands Examples JG 5000 Set up to jog the B axis BGB Begin jog ALB Arm the B latch assume that after about 2 seconds input goes low RLB Report the latch 10000 322 RP Reference Position Full Description This command returns the commanded reference position of the motor s Arguments RP nnnnnnnnnn where nis A B C D E F G H M or N or any combination to specify the axis or axes Usage While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _RPn contains the commanded reference position for the specified axis RELATED COMMAND TP Tell Position Note The relationship between RP TP and TE TEA equals the difference between the reference position RPA and the actual position TPA Related Commands Examples Assume that ABC and D axes are commanded to be at the positions 200 10 07 110 respectively The returned units are in quadratu
83. The motor moves _QS step counts to correct for the error and YS is set back to 1 394 YS Stepper Position Maintenance Mode Enable Status Full Description The YS command enables and disables the Stepper Position Maintenance Mode function YS also reacts to excessive position error condition as defined by the QS command Arguments YS m m m m m m m m or YSn m where nis A B C D E F G or H or any combination to specify the axis or axes m 0 SPM Mode Disable m 1 Enable SPM Mode Clear trippoint and QS error M 2 Error condition occurred Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 4 Command Line Yes Operand Usage _YSn contains the status of the mode for the specified axis Related Commands QS Error Magnitude YA Step Drive Resolution YB Step Motor Resolution YC Encoder Resolution YR Error Correction Examples 1 Enable the mode 395 2 YSH 1 Query the valu YS 2 0 7 07 07 0520 70 7 05 Response shows H axis is enabled 396 ZA User Data Record Variables Full Description ZA sets the user variables in the data record The eight user variables one per axis are automatically sent as part of the status record from the controller to the host computer These variables provide a method for specific controller information to be passed to the host automatically Arguments ZA n n n n n n n n or ZAA n where n is an integer and can be a number cont
84. These arguments only apply when using extended I O configured as inputs Usage While Moving Yes Default Value In a Program Yes Default Format 3 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TIn contains the status byte of the input block specified by n Note that the operand can be masked to return only specified bit information see section on Bit wise operations in Chapter 7 of the user manual Related Commands Examples TI 08 Input 4 is high others low 349 TI 00 All inputs low Input _TI Sets the variable Input with the TI value LL 2255 All inputs high 350 TIME Time Operand Keyword Full 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 976 microseconds 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 The keyword TIME does not require an underscore _ as does the other operands Arguments Usage Operand Usage Related Commands Examples MG TIME Display the value of the internal cl
85. alee Suse sa lean Adana 47 O tua satan E A E E E AE AE TA AN 49 ARV Ne ARR eer Oe E EE A O E A Ae Re RE ON AA CE RON aE ON SAE NE 50 GPAs Iona let DEORE Eee OTE nr OIC tre a et oie Ieee Ren ADT a et Mere N 51 A de att 53 A A AN tae aetna N a cath Saat pent renee adhe he alte sates Ay 54 RTM RNR OEY OA US 55 a Oe eR EA A E ONAN O RIUM TT A NN MT ORE SOE NT nor eee Oe 56 pS aot anette deed ested cece ese ae ed i eset 57 e e aa 59 PN aires apace tare NA OA 61 PID 5 wc caeosste scents dovaaus Al 63 VaN seh sabes AN 65 Aita 67 PAL dia ERa 69 Pa AI a 70 AMS Ai 712 A A aside e a E A A A A A A a eee 74 PAP ited A a 75 A A ROT 11 NE SO 79 SN AA AAA 81 A AAN 82 A a A RE RENREN 83 ES teannain Sidi a a hoe ode pa a a e i i a i 85 AW eei cai ds A a A Oi 87 tae dd 89 BR Fea T A E ER A ea 91 A A A A ARRE 93 BD inin ae eei ae a e a e baa a i den Sibir 95 ci sea heels cca henna Uds 97 RR 99 Brin A A A AAA 101 A AS 103 BM iS saasabteatidswuatese e ra a a a a aa ase 105 BN ERRE A eeri e causa EE AK A A AE E A igus sho ssa A A ans a awate sous 107 O eea r a R E a A E S NA 109 E 111 A hea ey e oR AATA sua shana du E E A E O R A teeacvasiataes 112 DO A fm A a i 114 Jl E areen e a a css Sco Sau i say a Sesave Dean loatban s 116 BN dida apta 117 A a ee Ste ease a Mena eae 118 BL A AAA A gS hE Sag A A aT A 120 CA n ia A O R A E E N Saad aes sae lac a a i 122 Cato a soe etek used goes e a Sa 124 O O lada 125 UD tE ER 126 CE sninn aadag aster ea
86. alue n 1 Command Line Yes Operand Usage _IK can not be used as an operand Related Commands TH Tell Handles IH Open new Ethernet handle Examples IK1 Blocks undesirable port communication IKO Allows all Ethernet ports to be used 221 IL Integrator Limit Full 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 A 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 n n n n or ILA n where n is a number in the range 10 to 10 Volts with a resolution of 0 0003 n Returns the value of the integrator limit for the specified axis Usage While Moving Yes Default Value 9 9982 In a Program Yes Default Format 1 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _ILn contains the value of the integrator limit for the specified axis Related Commands KI Integrator Examples KI 2 3 5 8 Integrator constants IL 3 2 7 2 Integrator limits IL Returns the A axis limit 3 0000 222 IN Input Variable Full Description The IN command allows a variable to b
87. ample DP 0 this will set the registers for TD and RP to zero but will not effect the TP register value Arguments DP n n n n n n n n or DPA n where n is a signed integer in the range 2147483648 to 2147483647 decimal n Returns the current position of the motor for the specified axes Usage Usage and Default Details Usage Valuel Default hile Moving No Default Value 0 0 0 0 0 0 0 0 In a Program Yes Default FormatfPosition Format Command Line Yes J ontroller UsagejAll ooo Operand Usage _DPn contains the current position of the specified axis Related Commands DE Define Aux Encoder FI Find Index FE Find Edge HM Home PF Position Format RP Reference Position TP Tell Encoder Position 153 Examples DP 0 100 200 400 Sets the current position of the A axis to 0 the B axis to 100 the C axis to 200 and the D axis to 400 DP 50000 Sets the current position of B axis to 50000 The B C and D axes remain unchanged DP Interrogate the position of A B C and D axis 0 0050000 200 400 Returns all the motor positions DP Interrogate the position of A axis 0 Returns the A 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 the new position as your absolute zero 154 DR Configur
88. and the BP command are required to run an application program on the controller Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands BP Burn program EN End program Examples AUTO Start on powerup SB1 Set bit 1 WI500 Wait 500msec CB1 Clear bit 1 JP AUTO Jump back to AUTO EN EN to end 15 AUTOERR Automatic subroutine for notification of EEPROM checksum errors Full Description AUTOERR will run code upon power up if data in the EEPROM has been corrupted The EEPROM is considered corrupt if the checksum calculated on the bytes in the EEPROM do not match the checksum written to the EEPROM The type of checksum error can be queried with _RS Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands _RS Checksum error code EN End program Examples 16 CMDERR Command error automatic subroutine Full Description Without CMDERR defined if an error see TC command occurs in an application program running on the Galil controller the program all threads will stop FCMDERR allows the programmer to handle the error by running code instead of stopping the program Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands TC Tell Error Code _ED Last prog
89. ata one 16 bit word per element MBh addr 17 array where array is where the returned data is stored Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Note Port 502 must be used as the Modbus Ethernet handle See the IH command for more info on how to open a handle with a specific port number MC Operand Usage Related Commands Examples 258 MC Motion Complete In Position Full 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 may be specified with the MC command For example MC AB waits for motion on both the A and B axis to be complete MC with no parameter specifies that motion on all axes is complete The command TW 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 stop code will be set to 99 An application program will jump to the special label FMCTIME When used in stepper mode the controller will hold up execution of the proceeding commands 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 mon
90. ation PR Position Relative PA Position Absolute SP Speed JG Jog SD Limit Switch Deceleration Examples 145 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 146 DE Dual Auxiliary Encoder Position Full Description The DE command defines the position of the auxiliary encoders The DE command defines the encoder position when used with stepper motors Note The auxiliary encoders are not available for the stepper axis or for any axis where output compare is active Arguments DE n n n n n n n n or DEA n where n is a signed integers in the range 2147483648 to 2147483647 decimal n Returns the position of the auxiliary encoders for the specified axes n returns the commanded reference position of the motor in step pulses when used with a stepper motor Example DE 0 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 While Moving Yes Default Value 0 0 0 0 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _DEn contains the current position of the specified auxiliary encoder Related Commands DP Define main encoder position TD Te
91. ation If there is a program operating AB also aborts the program unless a 1 argument is specified The command 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 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _AB gives state of Abort Input 1 inactive and 0 active Related Commands SH Re enables motor OE Specifies Off On Error Examples AB Stops motion Om 1 111 Enable off on error AB Shuts off motor command and stops r motion 60 AC Acceleration Full Description The Acceleration AC command sets the linear acceleration rate of the motors for independent moves such as PR PA and JG moves The acceleration rate may be changed during motion The DC command is used to specify the deceleration rate Arguments AC n n n n n n n n or ACA n where n is an unsigned number in the range 1024 to 1073740800 The parameters input will be rounded down to the nearest factor of 1024 The units of the parameters are counts per second squared n Returns the acceleration value for the specified
92. ation for the controller m is optional m 0 Causes the controller to pause program execution when output FIFO is full and to resume execution when FIFO is no longer full m Causes the controller to continue program execution when output FIFO is full Characters output after FIFO is full will be lost DA c 0 variable name where c 0 Defined array name variable name Defined variable name Deallocates all the variables 0 Deallocates all the arrays DA Returns the number of arrays available on the controller Usage While Moving Yes Default Value 2 0 In a Program Yes Default Format 143 Command Line Yes Controller Usage ALL CONTROLLERS While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS 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 DA _DA contains the total number of a
93. 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 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 n n n n lt o gt p or LIA n where n is a signed integer in the range 8 388 607 to 8 388 607 and represents the incremental move distance at least one n must be non zero o specifies a vector speed to be taken into effect at the execution of the linear segment o is an unsigned even integer between O and 22 000 000 for servo motor operation and between 0 and 6 000 000 for stepper motors p specifies a vector speed to be achieved at the end of the linear segment Based on vector accel and decal rates p is an unsigned even integer between 0 and 22 000 000 for servos and between 0 and 6 000 000 for steppers Usage 246 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands LE Linear end LM Linear Interpolation Mode Examples LM ABC Specify linear interpolation mode LI 1000 2000 3000 Specify distance LE Last segment BGS Begin sequenc 247 LL List Labels Full Description The LL command returns a listing of all of the program labels in memory and their associated line numbers The listing wil
94. be activated through the general inputs A axis latch Input 1 B axis latch Input 2 C axis latch Input 3 D axis latch Input 4 E axis latch Input 9 F axis latch Input 10 G axis latch Input 11 H axis latch Input 12 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 can be used to change the polarity of the latch function Arguments AL nnnnnnnn or AL n n n n n n n n where n can be A B C D E F G or H specifying the main encoder for the axis to be latched n can be SA SB SC SD SE SF SG or SH specifying the auxiliary encoder ncan be TA TB TC TD TE TF TG or TH specifying the main encoder is latched from the index pulse instead of a digital input Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _ALn contains the state of the specified latch 0 not armed armed Related Commands 70 RL Report Latch Examples D Program Label LB Arm B axis latch G 50000 Set up jog at 50000 counts sec GB Begin the move LOOP Loop until latch has occurred P LOOP _ALB 1 LB Transmit the latched position End of program Ho a d H Z 71 AM After Move Full Description The AM command is a trippoint used to control the timing of events This command wi
95. cho on Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands Examples EO 0 Turns echo off EO 1 Turns echo on 177 EP Cam table master interval and phase shift Full 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 1 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 n is the offset Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _EP contains the value of the interval m Related Commands EA Choose ECAM master EB Enable ECAM EC Set ECAM table index EG Engage ECAM EM Specify ECAM cycle EQ Disengage ECAM 178 ET ECAM table Examples EP 20 100 Sets the cam master points to 100 120 140 D _EP Set the variable D equal to the ECAM internal valve 179 EQ ECAM quit disengage Full Description The EQ command disengages an elect
96. cify the port value as 1000 Arguments IHh ip0 ip1 ip2 ip3 lt p gt q or IHh n lt p gt q or IHh gt r where h is the handle specified as A B C D E F G or H 1p0 1p1 1p2 1p3 are integers between O and 255 and represent the individual fields of the IP address These values must be separated by commas n is a signed integer between 2147483648 and 2147483647 This value is the 32 bit IP address and can be used instead of specifying the 4 address fields IHS gt r closes the handle that sent the command where r 1 for UDP IP or r 2 for TCP IP IHT gt r closes all handles except for the one sending the command where r 1 UDP or r 2 TCP lt p specifies the port number of the slave where p is an integer between 0 and 65535 This value is not required for opening a handle gt q specifies the connection type where q is 0 for no connection 1 for UDP and 2 for TCP gt r specifies that the connection be terminated and the handle be freed where r is 1 for UDP 2 for TCP IP or 3 for TCP IP Reset returns the IP address as 4 1 byte numbers Usage While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage 217 _IHhO contains the IP address as a 32 bit number _IHh1 contains the slave port number _THh2 contains a 0 if the handle is free contains a 1 if it is for a UDP slave contains a 2 if it is for a TCP slave contain
97. comm and for lst IF conditional statement MG ONLY INPUT 2 IS ACT TIVE Message to b xecuted if 1st IF conditional statement is false 170 fH e Z NDIF End of 1st conditional statement 171 EM Cam cycles modulus Full 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 n n n n or EMA n where n is a positive integer in the range between 1 and 8 388 607 for the master axis and between and 2 147 483 647 for a slave axis Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _EM n contains the cycle of the specified axis Related Commands EA Choose ECAM master EB Enable ECAM EC Set ECAM table index EG Engage ECAM EP Specify ECAM table intervals amp staring point EQ Disengage ECAM 172 ET ECAM table Examples EAC Select C axis as master for ECAM EM 0 3000 2000 Define the changes in A and B to be 0 and 3000 respectively Define master cycle as 2000 V _EMA Return cycle of A 173 EN End
98. contains the returned of the subroutine called by JS Related Commands amp Bitwise Logical Operators AND and OR Na Nb Ne Ad Ne Af g h JS subroutine stack variable 233 EN 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 Passing Parameters ADD JS SUM 1 2 3 4 5 6 7 8 call subroutine pass values MG_JS print return value EN 234 KD Derivative Constant Full Description KD designates the derivative constant in the control filter The filter transfer function is D z KP 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 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 While Moving Yes Default Value 64 In a Program Yes Default Format 4 2 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _KDn contains the value of the derivative constant for the specified axis Related Commands KI Integrator KP Proportional Examples KD 100 200 300 400 25 Specify KD KD Return KD 2100 00 200 00 300 00 400 25 Note KD now has four time more resolution as prior controllers and thus for the same value is four times less effective
99. curs because this command takes more time than the default timeout of 5 sec The timeout can be changed in the Galil software but this warning does not affect the operation of the controller or software Examples 117 BW Brake Wait Full Description The BW command sets the delay between when the brake is turned on and when the amp is turned off When the controller goes into a motor off MO state this is the time in samples between when the brake digital output changes state and when the amp enable digital output changes state The brake is actuated immediately upon MO and the delay is to account for the time it takes for the brake to engage mechanically once it is energized electrically The brake is released immediately upon SH Outputs 1 8 are used for Axes A H where output 1 is the brake for axis A and output 2 is the brake for axis B and so on Note The Brake Wait does not apply when the motor is shut off due to OE1 Off on Error In this case position error exceeded or Abort triggered the motor off and brake output will be applied simultaneously Arguments BW n n n n n n n n or BWA n where n specifies the brake wait time in samples n ranges from 1 to 32000 n 0 Turns Brake Wait off n Returns the brake wait time in msec for the specified axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes Operand Usage _BWn contains the brake wait time in samples for the specified
100. d Line Yes Controller Usage ALL CONTROLLERS Operand Usage _KPn contains the value of the proportional constant for the specified axis Related Commands KD Derivative Constant KI Integrator Constant IL Integrator Limit Examples KP 12 14 16 20 Specify a b c d axis proportional KP 7 Specify a axis only KP y8 Specify c axis only KP Return A B C D eTa 14 8 20 KP values 237 KS Step Motor Smoothing Full Description 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 n n n n or KSA n where n is a positive number in the range between 0 25 and 64 with a resolution of 1 32 n Returns the value of the smoothing constant for the specified axis Usage While Moving Yes Default Value 2 000 In a Program Yes Default Format 2 3 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _KSn contains the value of the stepper motor smoothing constant for the specified axis Related Commands MT Motor Type Examples KS 2 4 8 Specify a b c axes KS 5 Specify a axis only KS ro Specify c axis only Hint KS is valid for step motor only 238
101. d numbers in the range 0 lt m lt 10 and O lt n lt 4 m represents the number of digits before the decimal point A negative m specifies hexadecimal format When in hexadecimal the string will be preceded by a and Hex numbers are displayed as 2 s complement with the first bit used to signify the sign n represents the number of digits after the decimal point m Returns the value of the format for variables and arrays Usage While Moving Yes Default Value 10 4 In a Program Yes Default Format 2 1 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VF contains the value of the format for variables and arrays Related Commands PF Position Format 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 VE 4 0 Specify hexadecimal format with 4 bytes to the left of the decimal 375 VM Coordinated Motion Mode Full 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 elliptical scale factor set using the command ES For three or more axes 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 n and m are signed integers
102. d to time events When this command is executed the controller will wait for the number of miliseconds specified before executing the next command Arguments WT n where n is an unsigned even number in the range 0 to 2000000000 2 Billion Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Operand Usage Related Commands Examples Assume that 10 seconds after a move is over a relay must be closed A Program A PR 50000 Position relative move BGA Begin the move AMA After the move is over WT 10000 Wait 10 seconds SB 1 Turn on relay EN End Program 385 XQ Execute Program Full 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 n is 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 While Moving Yes Default Value of n 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _XQn contains the current line number of execution for thread n and 1 if th
103. dled individually This will reduce current consumption but there will be no holding torque The MT command must be issued prior to the LC command Arguments LC n n n n n n n n where n 0 Normal stepper drive always on n 1 Stepper drive on at a reduced current n is an integer between 2 and 32767 specifying the number of samples to wait between the end of the move and when the amp enable line toggles n Returns the current value Usage While Moving Yes Default Value O In a Program Yes Default Format 5 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LCn contains the low current value Related Commands MT Motor Type Examples MTZ 2 Specify stepper mode for the z axis LCZ 1 Specify low current mode for the z axis and disable immediately 241 LD Limit Disable Full Description Disables limit switches Soft limits BL and FL are still in effect This feature should be used to gain additional digital inputs if limit switches are not used or if there is a noise problem which causes limit switch conditions even though no limit switches are connected Arguments LD n n n n n n n n or LDA n where n 0 enabled default n 1 forward limit disabled n 2 reverse limit disabled n 3 both disabled n returns the current setting Usage While Moving Yes Default Value O In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LDn contains
104. e _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 Vector mode CR Circle Command Examples 356 VM A B C Specify coordinated mode for A and B axis C 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 A B VE End Vector BGS Begin coordinated motion with tangent axis 357 TP Tell Position Full Description The TP command returns the current position of the motor s Arguments TP nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes Usage While Moving Yes Default Value In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TPx contains the current position value for the specified axis Related Commands PF Position Formatting Examples Assume the A axis is at the position 200 decimal the B axis is at the position 10 decimal the C axis is at position 0 and the D axis is at 110 decimal The returned parameter units are in quadrature counts TP Return A B C D positions 2200 10 0 L10 TPA Return the A motor position 200 TPB Return the B motor position L0 PF 6 0 Change to hex format TP Return A B C D in hex 0000C8 SFFFFF6 000000 SFFFF93 Pos
105. e 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 Arguments Usage Operand Usage _ED contains the line number of the last line to have an error _ED1 contains the number of the thread where the error occurred for multitasking Related Commands Examples jw START PR 2000 BGA SLKJ Bad line EN CMDERR Routine which occurs upon a command error V _ED MG An error has occurred n MG In line V F3 0 9 ST 10 ZSO 11 EN Hint Remember to quit the Edit Mode prior to executing or listing a program o 0 0 b wb O F 164 EG ECAM go engage Full 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 n n n n n n n n or EGA n where n is the ECAM master position at which the ECAM slave axis must be engaged n Returns 1 if specified axis is engaged and 0 if disengaged Usage While Moving
106. e input from a keyboard When the IN command is executed in a program the prompt message is displayed The operator then 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 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 n is the variable name The total number of characters for n and m must be less than 80 characters Note Do not include a space between the comma at the end of the input message and the variable name Usage While Moving Yes Default Value In a Program Yes Default Format Position Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands Examples Operator specifies length of material to be cut in inches and speed in inches sec 2 pitch lead screw 2000 counts rev encoder 223 IP Increment Position Full Description The IP command allows for a change in the command position while the motor is moving This command does not require a BG The command has three effects depending on the motion being executed The units of this are quadrature Case 1 Motor is sta
107. e speed for the specified axis Usage While Moving Yes Default Value 256 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _HVn contains the homing speed for the specified axis Related Commands HM Home FI Find index Examples HVX 1000 set homing speed HMX home to home switch then index BGX begin motion AMX wait for motion complete EN end program 210 HX Halt Execution Full Description The HX command halts the execution of any program that is running Arguments HXn where n is an integer in the range of 0 to 7 and indicates the thread number Usage While Moving Yes Default Value n 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage 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 Execute program HX Stop all threads of motion Examples XQ FA Execute program A thread zero XQ B 3 Execute program B thread three HXO Halt thread zero HX3 Halt thread three 211 IA IP Address Full Description The IA command assigns the controller with an IP address The IA command may also be used to specify the time out value This is only applicable when using the TCP IP protocol The IA command can only be used via
108. e with label ININT Any trippoints set by the program will 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 O disables interrupt The value of m specifies the lowest input to be used for the input interrupt When the 2nd argument n is omitted only the input specified by m will be enabled n is 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 Using this argument is an alternative to specifying an input range with m n If m and n are specified o will be ignored The argument o is an integer value and represents a binary number For example if o 15 the binary equivalent is 00001111 where the bottom 4 bits are 1 bit O through bit 3 and the top 4 bits are O bit 4 through bit 7 Each bit represents an interrupt to be enabled bit0 for interrupt 1 bit 1 for interrupt 2 etc If o 15 the inputs 1 2 3 and 4 would be enabled p is an integer between 1 and 255 The argument p is used to specify inputs that will be activated with a logic 1 This argument is an integer value and represents a binary number This binary number is used to logically AND with the inputs which have be
109. ecovered when uploading a program but NO comments are recovered Thus the uploaded program is less readable with REM 4 NO comments take up program line space and REM lines don t 5 REM comments must be the first and only thing on a line whereas NO can be used to place comments to the right of code on the same line NO or should be used instead of REM unless speed or program space is an issue Arguments REM n where n is a text string comment Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL Operand Usage Related Commands NO apostrophe also accepted No operation comment Examples 319 RI Return from Interrupt Routine Full 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 enables input interrupts If the program sequencer was interrupted while waiting for a trippoint such as WT RI restores the trippoint on the return to the program A motion trippoint such as MF or MR requires the axis to be actively profiling in order to be restored with RI 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 RI n where n 0 Clears the interrupted trippoint n 1 Restores sta
110. ecution in thread 0 102 BL Reverse Software Limit Full Description The BL command sets the reverse software limit If this limit is exceeded during motion motion on that axis will decelerate to a stop Reverse motion beyond this limit is not permitted When the reverse software limit is activated the automatic subroutine LIMS WI will be executed if it is included in the program Arguments BL n n n n n n n n or BLA n where n is a signed integer in the range 2147483648 to 2147483647 The reverse limit is activated at the position n 1 The units are in quadrature counts n 2147483648 Turns off the reverse limit n Returns the reverse software limit for the specified axes Usage While Moving Yes Default Value 214783648 In a Program Yes Default Format Position format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BLn contains the value of the reverse software limit for the specified axis Related Commands FL Forward Limit PF Position Formatting Examples TEST Test Program AC 1000000 Acceleration Rate DC 1000000 Deceleration Rate BL 15000 Set Reverse Limit JG 5000 Jog Reverse 103 r Begin Motion After Motion r r Tell Position End Program limit occurred 104 BM Brushless Modulo Full Description The BM command defines the length of the magnetic cycle in encoder counts Arguments BM n n n n n n n n or BMA n where n is a
111. ed 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 first element of the array default 0 end is 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 a comma Otherwise the elements will be separated by a carriage return Usage While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands QD Download array QZ Examples 310 Return Data Record information Full Description The QZ command is an interrogation command that returns information regarding data record transfers 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 Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands DR Ethernet data record update rate RA Examples
112. ee JS Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands COM n Bitwise complement IF If statement JP Jump statement JS Jump subroutine Examples IF x gt 2 amp y 4 MG true ENDIF x must be greater than 2 and y equal to 4 for the message to print 26 Parentheses order of operations Full Description The parentheses denote the order of math and logical operations Note that the controller DOES NOT OBEY STANDARD OPERATOR PRECEDENCE For example multiplication is NOT evaluated before addition Instead the controller follows left to right precedence Therefore it is recommended to use parenthesis as much as possible Arguments n where n is a math or logical 8 expression Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands Math Operators amp Logical Operators Examples MG 1 2 3 9 0000 MG 1 2 3 7 0000 27 Semicolon Command Delimiter Full Description The semicolon operator allows multiple Galil commands to exist on a single line It is used for the following three reasons 1 To put comments on the same line as the command BGX begin motion 2 To compress DMC programs to fit within the program line limit Note use a compre
113. eesenancies 349 O AS 351 Y sees is ca Be inlets tsa asia ibe Sade ina WE Sala ainda Seah se aa estaba da a Sie 352 A RO 353 TM RO 354 TN pieun a aa eA ea A a se A A A Ra a 356 A icbmeash Gay T 359 A e A E AE N A E E O A 360 VA A a A A a A A tubes A 362 a A O AE 363 TW intra A E 364 DO A IS AS AN E 365 Ulla A A EE 366 AS 368 pd A Tu TN 369 A vats tan tuSepeaiaalied cacy a R AA R R E mean 371 MESE SAR 373 MEA A E R R nes 375 Mii AS 376 A A O 378 A Pe Shah Se ase Gh Sa gi cpa dpa Usa Gs soa Sey aes i a See 380 AA E 382 Wi A a 384 WE dao 385 A O O 386 nn seis cdi on Sail vd E Gesu dn told sands pn Pae Sees 387 Y Beornred cant inten a Bie haa ta sass Geetha sett cg A N Mla d aes Vie Sam Les Lis etal Ud ee 389 DA OE RSE cee mem Det REP Ta See ERR CNet E Tare SP MOE etree ore 391 Vi A AA ns teased geen ao Nes 393 A aa SEPT e RCT LOR FUE E ISIE ERY OPPUE NC SET ALND POE DOPED SA 395 AS AAA AAA AA 397 Ld EE EE A E A E E E E E E E E nse vpuoaios aioe 398 Overview Controller Notation Trippoints This command reference is a supplement to the Galil User Manual For proper controller operation consult the Users Manual This command reference describes commands for Galil Accelera Series Motion Controller DMC 40x0 Commands are listed in alphabetical order Please note that all commands may not be valid for every controller To identify the controllers for which the command is applicable please review the Usage Section of the co
114. efault Value 0 In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS 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 Related Commands Examples MOVE DP 0 0 Label CAT Specify the T coordinate system LMAB Linear move for A B 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 TPAB Print Message EN End Program 85 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 86 AW Amplifier Bandwidth Full Description The AW command accepts the drive voltage volts and motor inductance millihenries and uses the current loop gain setting AU as the default and then reports the calculated bandwidth The user can check how the amplifier bandwidth is affected by changing the n parameter The AU command uses the transfer function for the AMP 430x0 for the calculation of the bandwidth Arguments AWx v l n where x Axis designator v Drive voltage in Volts 1 Motor inductance in millihenries n optional current loop gain setting 1 or 0 Usage While Moving No Default Value 0 0 0 In a Program Yes Default Format
115. en specified by the parameters m and n or the parameter o For example if m 1 and n 4 the inputs 1 2 3 and 4 have been activated If the value for p is 2 the binary equivalent of 2 is 00000010 input 2 will be activated by a logic 1 and inputs 1 3 and 4 will be activated with a logic 0 Usage While Moving Yes Default Value In a Program Yes Default Format 3 0 mask only Command Line Yes Controller Usage All Controllers 219 Operand Usage Related Commands RI Return from Interrupt ININT Interrupt Subroutine AI Trippoint for input Examples FA Program A ET 1 Specify interrupt on input 1 G 5000 BGA Specify jog and begin motion on A axis LOOP JP LOOP Loop N End Program ININT Interrupt subroutine STA MG INTERRUPT AMA Stop A print message wait for motion to complete CLEAR JP CLEAR IN 1 0 Check for interrupt clear BGA Begin motion RIO Return to main program don t re enable trippoints J G amp E 220 IK Block Ethernet ports Full Description The IK command blocks the controller from receiving packets on Ethernet ports lower than 1000 except for ports 0 23 68 and 502 Arguments IKn where n 0 allows controller to receive Ethernet packets on any port n 1 blocks controller from receiving Ethernet packets on all ports lower than 1000 except for 0 23 68 and 502 n queries controller for value of IK Usage In a Program Yes Default V
116. ents UI n where n is an integer between 0 and 15 corresponding to status bytes FO to FF 240 255 STATUS BYTE CONDITION FO 240 UI or UIO was executed F1 241 UII was executed F2 242 UI2 was executed F3 243 UI3 was executed F4 244 UI4 was executed F5 245 UIS was executed F6 246 UI6 was executed F7 247 UI7 was executed F8 248 UI8 was executed F9 249 UIO was executed FA 250 UNO was executed FB 251 UI11 was executed FC 252 UI12 was executed FD 253 UI13 was executed FE 254 UI14 was executed FF 255 UI15 was executed Usage While Moving Yes Default Value 0 In a Program Yes Default Format 3 0 Command Line Yes Controller Usage DMC 4000 366 Operand Usage Related Commands EI Event interrupts MG Message Examples JG 5000 Jog at 5000 counts s BGA Begin motion ASA Wait for at speed UI 1 Cause an interrupt with status byte F1 241 367 UL Upload Full Description The UL command transfers data from the controller to a host computer Programs are sent without line numbers The Uploaded program will be followed by a lt control gt Z as an end of text marker Arguments None Usage While Moving Yes Default Value 0 In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage When used as an operand _UL gives the number of available variables The number of available variables is 510 RELATED COMMAND DL Download
117. er axis is defined by the GA command The gear ratio may be different for each geared axis The master can go in both directions A gear ratio of 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 n n n n or GRA n where n is a signed numbers in the range 127 with a fractional resolution of n 0 Disables gearing n Returns the value of the gear ratio for the specified axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format 3 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _GRn contains the value of the gear ratio for the specified axis Related Commands GA Master Axis GM Gantry Mode Examples GEAR MOB Turn off servo to B motor GAB B Specify master axis as B GR 25 5 Specify A and C gear ratios EN End program 205 Now when the B motor is rotated by hand the A will rotate at 1 4th the speed and C 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 206 HM Home Full Description The HM command performs a three stage homing sequence for servo systems and two stage sequence for stepper motor operation For servo motor operation During first stage of the homing sequence the motor moves at the user programmed speed until detecting a transitio
118. error code _IA4 Last dropped handle MG Print message SA Send ASCII command via Ethernet Examples L MG EA L WT1000 23 JP L TCPERR MG P1 TCPERR RE NOTE Dropped handle _IA4 Use RE to end the routine 24 Hexadecimal Full Description The operator denotes that the following string is in hexadecimal notation Arguments nnnnnnnn mmmm n is up to eight hexadecimal digits denoting 32 bits of integer m is up to four hexadecimal digits denoting 16 bits of fraction Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands Multiply shift left Divide shift right MG 8 4 Print in hexadecimal Examples x S7 fff ff 0000 store 2147483647 in x y x 0000ffff 0000 store lower 16 bits of x in y Z x amp ffff0000 0000 10000 store upper 16 bits of x in z 25 amp Bitwise Logical Operators AND and OR Full Description The operators amp and are typically used with IF JP and JS to perform conditional jumps however they can also be used to perform bitwise logical operations Arguments n amp m orn m where n and m are signed numbers in the range 2147483648 to 2147483647 For IF JP and JS n and m are typically the results of logical expressions such as x gt 2 amp is also used to pass a variable by reference in a JS call S
119. es I O Data Record Update Rate Full Description The controller creates a QR record and sends it periodically to a UDP Ethernet Handle Arguments DR n m n specifies the data update rate in samples between updates When TM is set to the default of 1000 n specifies the data update rate in milliseconds n 0 to turn it off or n must be an integer in the range of 2 to 30 000 m specifies the Ethernet handle on which to periodically send the Data Record 0 is handle A 1 is B 7 is H The handle must be UDP not TCP Usage While Moving Yes Default Value DRO off In a Program Yes Default Format Command Line Yes Controller Usage DMC 40x0 Operand Usage _DR contains the data record update rate Related Commands QZ Sets format of data QR Query a single data record Examples DR8 0 G X a P P _ H P _ 0 P DRO Note The data record is in a binary non printable format the output above is normal when printing to the terminal 155 DT Delta Time Full Description The DT command sets the time interval for Contour Mode Sending the DT command once will set the time interval for all contour data until a new DT command or CDm n is sent Arguments DT n where n is an integer in the range 0 to 8 n 1 through 8 specifies the time interval of 2n samples n 1 allows a pre load of the contour buffer or to asynchrounsly pause the contour buffer DT 1 during countor mode will pause the c
120. f the Hall sensors of a sinusoidally commutated motor and resets the commutation phase upon detecting the first hall sensor This procedure replaces the estimated commutation phase value with a more precise value determined by the hall sensors Arguments BC nnnnnnn where nis A B C D E F G or any combination to specify the axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BCn contains the state of the Hall sensor inputs This value should be between 1 and 6 Related Commands BA Brushless Axis BB Brushless Phase Begins BD Brushless Degrees BI Brushless Inputs BM Brushless Modulo BO Brushless Offset BS Brushless Setup 93 BZ Brushless Zero BD Examples 94 BD Brushless Degrees Full 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 n n n n or BDA n where n is an integer between 0 360 n Returns the current brushless motor angle between 0 360 Usage While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BDn contains the commuta
121. g between the Y axis slave and the master The gearing will be disengaged over the number of counts of the master specified with the GD command above EN End program 202 GM Gantry mode Full 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 be stopped by the ST command or by limit switches Only GRO will stop the gearing in this mode Arguments GM n n n n n n n n or GMA 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 While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _GM n contains the state of gantry mode for the specified axis O gantry mode disabled 1 gantry mode enabled Related Commands GR Gear Ratio GA Gear Axes Examples GM 1 1 1 1 Enable GM on all axes GM 0 Disable GM on A axis other axes remain unchanged GM 1 1 Enable GM on C axis and D axis other axes remain unchanged GM 1 0 1 0 Enable GM on A and C axis disable GM on B and D axis 203 Hint The GM command is useful for driving heavy load on both sides Gantry Style 204 GR Gear Ratio Full Description GR specifies the Gear Ratios for the geared axes in the electronic gearing mode The mast
122. ge DMC 40x0 Usage _BTn contains the number of PV segments that have executed Related Commands PV PVT Data Examples MG_BTX Query number of PVT segments executed 20 0000 PVX 100 200 100 Command X axis to go 100 counts at speed 200 in 100 samples PVX 100 0 100 Command X axis to go 200 counts at speed 0 in 100 samples PVX 0 Command X axis exit PVT mode BTX Begin PVT mode AMX Wait for the PVT mode of motion to complete MG_BTX Query number of PVT segments executed 23 0000 EN End program 116 BV Burn Variables and Array Full Description The BV command saves the controller variables and arrays 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 While Moving Yes Default Value In a Program Yes Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BV returns the number of controller axes Related Commands BP Burn Program BN Burn Parameters Burn Program Note 1 This command will store the ECAM table values in non volatile EEPROM memory Note 2 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 oc
123. he setting of the LU command Related Commands 253 MG Message Lx LB LCD Bias Contrast SC Stop Code Examples LUO Turn the LCD update off MG DMC 40x0 L1 Send DMC 40x0 to line 1 of the LCD screen MG Galil MC L2 Send Galil MC to line 2 of the LCD screen LU1L Set the LCD to automatically update the LCD screen with the axis status 254 LV List Variables Full Description The LV command returns a listing of all of the program variables in memory The listing will be in alphabetical order Arguments None Usage While Moving Yes Default Value In a Program Yes Default Format VF Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands LA List Arrays LS List Program LL List Labels Examples LV APPLE 60 0000 BOY 25 0000 ZEBRA 37 0000 255 LZ Inhibit leading zeros Full 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 While Moving Yes Default Value 1 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LZ contains the state of
124. hile Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands TI Tell Inputs SB CB Set Clear output bits OP Output port CO Configure I O Examples TZ Tell current master I O status BLOCK 0 8 1 dedicated as input value 255 1111_1111 BLOCK 0 8 1 dedicated as output value O 0000_0000 BLOCK 2 24 17 configured as input value 255 1111_1111 BLOCK 3 32 25 configured as input value 255 1111_1111 BLOCK 4 40 33 configured as input value 255 1111_1111 BLOCK 5 48 41 configured as input value 255 1111_1111 BLOCK 6 56 49 configured as input value 255 1111_1111 BLOCK 10 88 81 dedicated as input value 255 1111_1111 365 UI User UDP Interrupt Full Description UI pushes a user defined status byte into the EI queue UI can generate 16 different status bytes FO to FF 240 255 corresponding to UIO to UI15 When the UI command e g UIS is executed the status byte value e g F5 or 245 is queued up for transmission to the host along with any other interrupts The UDP interrupt packet dispatch may be delayed If immediate packet dispatch is required use the message command MG to send a unique message to the host software EL h must be set to a valid UDP port set by the host not the DMC code is recommended before any interrupt packet will be dispatched Argum
125. his input is representing a sensor that senses an object on a conveyor This will trigger the controller to begin gearing and synchronize the master and slave axes together GR1 Engage gearing between the master and slave P1 _TPY Sets the current Y axis position to variable Pl This variable is used in the next command because MF requires an absolute position MF P1 1000 Wait for the Y axis master to move forward 1000 encoder counts so the gearing engagement period is 51 complete Then the phase difference can be adjusted for Note this example assumes forward motion IP_GPX Increment the difference to bring the master slave in position sync from the point that the GR1 command was EN End Program lssued 52 _LF Forward Limit Switch Operand Keyword Full Description The _LF operand contains the state of the forward limit switch for the specified axis The operand is specified as _LFn where n is the specified axis Note This operand is affected by the configuration of the limit switches set by the command CN For CN 1 _LFn 1 when the limit switch input is inactive _LFn 0 when the limit switch input is active For CN 1 _LFn 0 when the limit switch input is inactive _LFn 1 when the limit switch input is active The term active refers to the condition when at least 1 ma of current is flowing through the input circuitry The input ci
126. ied time OT Note that for this function to work properly it is necessary to have a non zero value for KI Arguments OTn n n n n n n n where n is the number of samples between 2 and 32000 returns the last value set Usage While Moving Yes Default Value 30 In a Program Yes Default Format 5 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _OTn contains the OT value for the specified axis Related Commands OA Off on encoder failure OV Off on encoder failure voltage Examples OTX 10 Set time to 10 milliseconds TM1000 OVX 5 Set voltage to 5 OAX 1 Enabl ncoder detection feature 284 OV Off on encoder failure voltage Full Description Sets the threshold voltage for detecting an encoder failure The controller can detect a failure on either or both channels of the encoder This is accomplished by checking on whether motion of at least 4 counts is detected whenever the torque exceeds a preset level OV for a specified time OT Note that for this function to work properly it is necessary to have a non zero value for KI The default value for OV is approximately 95 volts The value should be high enough to guarantee that the motor would overcome any static friction If it is too low there will be false triggering of the error condition The OV value may not be higher than the TL value Arguments OTn n n n n n n n where where n is a positive voltage between 0 001 and 9 9 volts returns the
127. ilable in one of two settings 0 is normal while 1 sets a higher current loop Values stored in EEPROM by the BN command Arguments AU n where n 0 for normal current loop gain 0 5 for chopper mode and normal loop gain 1 for higher current loop gain 1 5 for chopper mode and higher current loop gain Usage While Moving No Default Value 0 In a Program Yes Default Format Command Line Yes Controller Usage DMC 40x0 D430x0 Operand Usage Related Commands TA Tell Amplifier AG Amplifier Gain BS Brushless Setup AW Amplifier Bandwidth EXAMPLE AU1 0 Sets X axis to higher loop gain and Y axis to normal loop gain AUY Query Y axis current loop gain 0 Y axis normal current loop gain 83 AUTO Examples 84 AV After Vector Distance Full Description A 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 move sequence or from the last AV command The units of the command are quadrature counts rguments 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 While Moving Yes D
128. 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 o is an unsigned even integer between 0 and 22 000 000 for servo motor operation and between 0 and 6 000 000 for stepper motors o is in units of counts per sample 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 p is in units of counts per sample Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VPn 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 VM Vector Mode 376 VE Vector End BG Begin Sequence IT Vector smoothing Examples A Program Label VM AB Specify motion plane VP 1000 2000 Specify vector position 1000 2000 VP 2000 4000 Specify vector position 2000 4000 CR 1000 0 360 Specify arc VE Vector end BGS Begin motion sequence AMS Wait for vector motion to complete EN End Program Hint The
129. inal MG P2ST S3 the characters ABC were entered ABC 290 PA Position Absolute Full Description The PA command will set the final destination of each axis The position is referenced to the absolute zero Arguments PA n n n n n n n n or PAA n where n is a signed integers in the range 2147483648 to 2147483647 decimal Units are in encoder counts n Returns the commanded position at which motion stopped Usage While Moving No Default Value In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _PAn contains the last commanded position at which motion stopped Related Commands PR Position relative SP Speed AC Acceleration DC Deceleration BG Begin PF Position Formatting Examples 291 PA 400 600 500 200A axis will go to 400 counts B axis will go to 600 counts C axis will go to 500 counts D axis will go to 200 counts BG AM Execute Motion and Wait for Motion Complete PA Returns the current commanded position after motion has completed 400 600 500 200 BG Start the move PA 700 A axis will go to 700 on the next move while the BG B C and D 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 292 PF Position Format Full Description The PF command allows the user to format the position numbers such as those
130. independently by an external device 267 MT Motor Type Full Description The MT command selects the type of the motor and the polarity of the drive signal Motor types include standard servomotors which require a voltage in the range of 10 Volts and step motors which require pulse and direction signals The polarity reversal inverts the analog signals for servomotors and inverts logic level of the pulse train for step motors Arguments MT n n n n n n n n or MTA n where n 1 Specifies Servo motor n 1 Specifies Servo motor with reversed polarity n 1 5 Specifies PWM Sign servo drive n 1 5 Specifies PWM Sign servo drive 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 While Moving No Default Value 1 1 1 1 In a Program Yes Default Format 1 1 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _MTn contains the value of the motor type for the specified axis Related Commands CE Configure encoder type Examples 268 MT 1 1 2 2 Configure a as servo b as reverse servo Cc and d as steppers MT 2 72 Interrogate motor type V _MTA Assign motor type to variable 269
131. ine Yes Controller Usage ALL CONTROLLERS Operand Usage _OAn contains the OA value for the specified axis Related Commands OT Off on encoder failure time OV Off on encoder failure voltage Examples OTX 10 Set time to 10 milliseconds OVX 5 Set voltage to 5 OAX 1 Enabl ncoder detection feature 275 OB Output Bit Full Description The OB n logical expression command defines output bit n as either 0 or 1 depending on the result from the logical expression 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 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands 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 276 OC Output Compare Full Description The OC command allows the generation of output pulses based on one or two for a 5 8 axis controller of the main encoder positions For circular compare the output is a low going pulse with a duration of approximately 300 nanoseconds and is available
132. ing Function Full Description The IT command filters the acceleration and deceleration functions of independent moves such as JG PR PA to produce a smooth velocity profile The resulting profile known as smoothing 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 n n n n or TA n where n is 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 While Moving Yes Default Value 1 In a Program Yes Default Format 1 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _ITn contains the value of the independent time constant for the specified n axis Related Commands PR Position relative PA Position absolute JG Jog VM Vector mode 226 LM Linear Interpolation Mode Examples ET Ory Duby O Oe Set independent time constants for a b c d axes IT Return independent time constant for A axis 70 8 227 JG Jog Full Description The JG command sets the jog mode and the
133. int absolute position of master Y 190 FA Acceleration Feedforward Full Description The FA command sets the acceleration feedforward coefficient 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 n n n n or FAS 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 O While Moving Yes Default Value 0 In a Program Yes Default Format 4 2 Command Line Yes Controller Usage ALL CONTROLLERS perand Usage _FAn contains the value of the feedforward acceleration coefficient for the specified axis Related Commands FV Velocity feedforward Examples AC 500000 1000000 Set feedforward coefficient to 10 for the A axis FA 10 15 and 15 for the B axis The effective bias will be 0 75V for A and 2 25V for B FA Return A and B values Oy LS 191 Note If the feedforward coefficient is changed during a move then the change will not take effect until the next move 192 FE Find Edge Full Description The FE command moves a m
134. is A B C D E F G or H or any combination to specify the axis or axes Usage While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands MO Motor off Examples SH Servo A B C D motors SHA Only servo the A motor the B C and D motors remain in its previous state SHB Servo the B motor leave the A C and D motors unchanged SHC Servo the C motor leave the A B and D motors unchanged SHD Servo the D motor leave the A B and C motors unchanged Note The SH command changes the coordinate system Therefore all position commands given prior to SH must be repeated Otherwise the controller produces incorrect motion 332 SL Single Step Full Description For debugging purposes Single Step through the program after execution has paused at a breakpoint BK Optional argument allows user to specify the number of lines to execute before pausing again The BK command resumes normal program execution Arguments SL n where n is an integer representing the number of lines to execute before pausing again Usage While Moving Yes Default Value 1 In a Program No Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands BK Breakpoint TR Trace Examples BK 3 Pause at line 3 the 4th line in thread 0 BK 5 Continue to line 5 SL Execute the next line SL 3 Execute the next 3 lines BK Resume normal e
135. is velocity 23420 Note The TV command is computed using a special averaging filter over approximately 0 25 sec for TM1000 Therefore TV will return average velocity not instantaneous velocity 363 TW Timeout for IN Position MC Full Description The TW command sets the timeout in samples msec for TM1000 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 stop code will be set to 99 An application program will jump to the special label FMCTIME The RE command should be used to return from the MCTIME subroutine Arguments TW n n n n n n n n or TWA n where n specifies the timeout in samples msec for TM1000 n ranges from 0 to 32767 msec n 1 Disables the timeout n Returns the timeout in samples msec for TM1000 for the MC command for the specified axis Usage While Moving Yes Default Value 32766 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TWn contains the timeout in samples msec for TM1000 for the MC command for the specified axis Related Commands MC Motion Complete trippoint TZ Examples 364 TZ Tell I O Configuration Full Description The TZ command is used to request the I O status This is returned to the user as a text string Arguments TZ where Usage W
136. isabling and TA1 shows a hall error try using the BR command to set that axis as a Brushed axis causing the controller to ignore invalid Hall states Arguments 338 TA n returns the amplifier error status where n is 0 1 2 or 3 Usage While Moving Yes Default Value In a Program Yes Default Format 1 0 Command Line Yes Controller Usage DMC 40x0 with D30x0 D4040 D4140 DMC 21x3 with AMP 204x0 AMP 205x0 or SDM 206x0 Operand Usage _TAn Contains the Amplifier error status Related Commands AMPERR Amplifier Error Automatic Subroutine BR Brush Axis Configuration QH Hall State Examples TAL 5 Hall Error for Axis A and C 339 TB Tell Status Byte Full 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 BIT STATUS Bit 7 Executing application program Bit 6 N A Bit 5 Contouring Bit 4 Executing error or limit switch routine Bit 3 Input interrupt enabled Bit 2 Executing input interrupt routine Bit 1 N A Bit 0 Echo on Arguments TB returns the status byte Usage While Moving Yes Default Value In a Program Yes Default Format 3 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TB Contains the status byte Related Commands Examples TB 65 Data Record Active and Echo is on 26 20 64 1 65 340 TC Tell Error Code Full Description
137. 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 Bit Status Bit 7 Axis in motion if high Bit 6 Axis error exceeds error limit if high Bit 5 A motor off if high Bit 4 Undefined Bit 3 Forward Limit Switch Status inactive if high Bit 2 Reverse Limit Switch Status inactive if high Bit 1 Home A Switch Status Bit 0 Latched Note For active high or active low configuration CN command the limit switch bits are 1 when the switch is inactive and 0 when active Arguments TS nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument will provide the status for all axes Usage While Moving Yes Default Value In a Program Yes Default Format 3 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TS contains the current status of the switches Related Commands Examples V1 _TSB Assigns value of TSB to the variable V1 360 Vl Interrogate value of variable V1 Decimal value corresponding to bit pattern 00001111 bit 7 has a value of 0 SS axis axis axis axis axis axis axis KKK KK KK not in motion error limit not exceeded motor is on bit 5 has a value of 0 limit limit forward reverse is is inactive bit 3 has a val inactive bit 2 has a val
138. itch is hit From the table enable bits 8 and 10 m 28 210 256 1024 1280 EL 1280 2 Interrupt when digital input 3 is low Enable bit 15 of m and PIEZ OF nis EI 32768 4 169 ELSE Else function for use with IF conditional statement Full 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 Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands ENDIF End of IF conditional Statement Examples A IF IN 1 0 IF conditional statement based on input 1 IF IN 2 0 2nd IF conditional statement executed if lst IF conditional true MG INPUT 1 AND INPUT 2 ARE ACTIVE Message to b xecuted if 2nd IF conditional is true ELSE ELSE command for 2nd IF conditional statement MG ONLY INPUT 1 IS ACTIVE 7 Message to b xecuted if 2nd IF conditional is false ENDIF End of 2nd conditional statement SE ELSE
139. ition _TPA Assign the variable Position the value of TPA 358 TR Trace Full 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 m where n 0 Disables the trace function n 1 Enables the trace function m is an integer between 0 and 255 and designates which threads to trace A binary weighted bit is set per thread Thread 0 1 Thread 1 2 Thread 2 4 Thread 7 128 The default is 255 all threads The least significant bit represents thread O and the most significant bit represents thread 7 The decimal value can be calculated by the following formula n n0 2 n1 4 n2 8 n3 16 n4 32 n5 64 n6 128 n7 where nx represents the thread To turn tracing on for a thread substitute a one into that nx in the formula If the nx value is a zero then tracing will be off for that thread For example if threads 3 and 4 are to be traced TR24 is issued Usage While Moving Yes Default Value TRO 255 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands CW Set clear most significant bit Examples ED define a small looping program 359 TS Tell Switches Full Description TS returns status information of the Home switch Forward Limit switch Reverse Limit sw
140. itored by using the interrogation command TD Note The MC command is recommended when operating with stepper motors since the generation of step pulses can be delayed due to the stepper motor smoothing function KS In this case the MC command would only be satisfied after all steps are generated Arguments MC nnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument specifies that motion on all axes is complete Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands BG Begin AM After Move 239 TW Timeout Examples MOVE Program MOVE PR 2000 4000 Independent Move on A and B axis BG AB Start the B axis MC AB After the move is complete on T coordinate system MG DONE TP Print message EN End of Program 260 MF Forward Motion to Position Full 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 only requires an encoder and does not require that the axis be under servo control When using a stepper motor this condition is satisfied when the stepper position as determined by the outpu
141. ive Full Description The PR command sets the incremental distance and direction of the next move The move is referenced with respect to the current position Arguments PR n n n n n n n n or PRA n where n is a signed integer in the range 2147483648 to 2147483647 decimal Units are in encoder counts n Returns the current incremental distance for the specified axis Usage While Moving No Default Value 0 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _PRn contains the current incremental distance for the specified axis Related Commands PA Position Absolute BG Begin AC Acceleration DC Deceleration SP Speed IP Increment Position PF Position Formatting 297 Examples PR 100 200 300 400 On the next move the A axis will go 100 counts BG the B axis will go to 200 counts forward C axis will go 300 counts and the D axis will go 400 counts PR Return relative distances 100 200 300 PR 500 Set the relative distance for the A axis to 500 BG The A axis will go 500 counts on the next move while the B axis will go its previously set relative distance 298 PT Position Tracking Full Description The PT command will place the controller in the position tracking mode In this mode the controller will allow the user to issue absolute position commands on the fly The motion profile is trapezoidal with the parameter
142. jog slew speed of the axes Arguments JG n n n n n n n n or JGA n where n is a signed numbers in the range 0 to 22 000 000 decimal The units of this are counts second Use JGN n or JGM n for the virtual axes For stepper motor operation the maximum value is 6 000 000 steps second n Returns the absolute value of the jog speed for the specified axis Usage While Moving Yes Default Value 25000 In a Program Yes Default Format 8 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands _JGn contains the absolute value of the jog speed for the specified axis BG Begin ST Stop AC Acceleration DC Deceleration IP Increment Position TV Tell Velocity Examples 228 JG 100 500 2000 5000 Set for jog mode with a slew speed of 100 counts sec for the A axis 500 counts sec for the B axis 2000 counts sec for the C axis and 5000 counts sec for D axis BG Begin Motion JG 2000 Change the C axis to slew in the negative direction at 2000 counts sec 229 JP Jump to Program Location Full Description The JP 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 s
143. l be in alphabetical order Arguments None Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands LA List Arrays LS List Program LV List Variables Examples LL FIVE 5 FOUR 4 ONE 1 HREE 3 TWO 2 248 LM Linear Interpolation Mode Full Description The LM command specifies the linear interpolation mode and specifies the axes for linear interpolation Any set of 1 thru 8 axes may be used for linear interpolation LI commands are used to specify the travel distances 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 ABC designates linear interpolation for the A B and C axes The speed of these axes will be computed from VS2 AS2 BS2 CS2 where AS BS and CS are the speed of the A B and C axes In this example If the LI command specifies only A and B the speed of C will still be used in the vector calculations The controller always uses the axis specifications from LM not LI to compute the speed The LM command
144. les dual loop on C axis and D axis Other axes remain unchanged DV 1 0 1 0 Enables dual loop on A and C axis Disables dual loop on B and D axis MG_DVA Returns state of dual velocity mode for A axis 157 Hint The DV command is useful in backlash and resonance compensation 158 EA Choose ECAM master Full Description The EA command selects the master axis for the electronic cam mode Any axis may be chosen Arguments EA n where n is one of the axis specified as A B C D E F G H M or N Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands EB Enable ECAM EC Set ECAM table index EG Engage ECAM EM Specify ECAM cycle EP Specify ECAM table intervals amp staring point EQ Disengage ECAM ET ECAM table Examples EAB Select B as a master for ECAM 159 EB Enable ECAM Full 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 While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand
145. ll Dual Encoder position Examples DE 0 100 200 400 Set the current auxiliary encoder position to 0 100 200 400 on A B C and D axes DE Return auxiliary encoder positions 147 DualA _DEA Assign auxiliary encoder position of A axis to the variable DualA Hint Dual encoders are useful when you need an encoder on the motor and on the load The encoder on the load is typically the auxiliary encoder and is used to verify the true load position Any error in load position is used to correct the motor position 148 DH DHCP Server Enable Full Description The DH command configures the DHCP or BOOT P functionality on the controller for Server IP addressing Arguments DH n where n 0 disables DHCP and enables BOOT P n 1 disables BOOT P and enables DHCP n returns the current state of the setting Usage While Moving Yes Default Value 1 0 In a Program Yes Default Format Command Line Yes Controller Usage DMC 4000 Operand Usage Related Commands IA IP Address Examples DH 1 Sets the DHCP function on IA assignment will no longer work IP address cannot be burned Controller will receive its IP address from the DHCP server on the network DH 0 Sets the DHCP function off and the Boot P function on 149 DL Download Full Description The DL command transfers a data file from the host computer to the controller Instructions in the file will be accepted as a data stream without line numbers The
146. ll be ignored The following table describes the arguments used to set the state of outputs Arguments Blocks Bits Description m 0 1 8 General Outputs 1 4 axes controllers 0 1 1 16 General Outputs 5 8 axes controllers a 2 3 17 32 Extended I O b 4 5 33 48 Extended I O c 6 7 49 64 Extended I O d 8 9 65 80 Extended I O n returns the value of the argument where n is any of the above arguments Usage 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 first argument m _OP1 contains the value of the first argument a _OP2 contains the value of the first argument b 282 _OP3 contains the value of the first argument c _OP4 contains the value of the first argument d Related Commands SB Binary EA Set output bit CB Clear output bit OB m 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 a 283 OT Off on encoder failure time Full Description Sets the time in samples milliseconds for TM1000 that the controller will wait for motion after the OV threshold has been exceeded The controller can detect a failure on either or both channels of the encoder This is accomplished by checking on whether motion of at least 4 counts is detected whenever the torque exceeds a preset level OV for a specif
147. ll hold up execution of the 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 AB waits for motion on both the A and B axis to be complete AM with no parameter specifies that motion on all axes is complete Arguments AM nnnnnnnnnn where nis A B C D E F G H 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 While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands BG _BGn contains a 0 if motion complete MC Motion Complete Examples MOVE Program MOVE PR 5000 5000 5000 5000 Position relative moves BG A Start the A axis AM A After the move is complete on A BG B Start the B axis AM B After the move is complete on B BG C Start the C axis AM C After the move is complete on C 12 BG D Start the D axis AM D After the move is complete on D EN End of Program Hint AM is a very important command for controlling the ti between multiple move sequences For example if the A axis the middle of a position relative move PR you cannot make a mplete position absolute move PAA BGA until the first move is co ming is in Use AMA to halt the program sequences until the
148. ll not display the results of the QR command since the results are in binary format QS Operand Usage Related Commands Examples 307 QS Error Magnitude Full Description The QS command reports the magnitude of error in step counts for axes in Stepper Position Maintenance mode A step count is directly proportional to the resolution of the step drive Arguments QS nnnnnnnn or QSn where nis A B C D E F G or H or any combination to specify the axis or axes Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 4 Command Line Yes Operand Usage _QSn contains the error magnitude in drive step counts for the given axis Related Commands YA Step Drive Resolution YB Step Motor Resolution YC Encoder Resolution YR Error Correction YS Stepper Position Maintenance Mode Enable Status Examples 1 For an SDM 44140 microstepping drive query th rror of B axis OSB 253 This shows 253 step counts of error The SDM 44140 resolution is 64 microsteps per full motor step nearly four full motor steps of error 2 Query the value of all axes 308 QS 702537 07070707 070 Response shows all axes error values 309 QU Upload Array Full 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 follow
149. lo BS Brushless Setup 109 BZ Brushless Zero Examples BO 2 1 Generates the voltages 2 and 1 on the first DAC A and the second DAC C of a sinusoidally commutated motor HINT To assure that the output voltage equals the BO parameters set the PID and OF parameters to zero 110 BP Burn Program Full 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 No Default Value In a Program Yes Not in a Program Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands BN Burn Parameters BV Burn Variable BR Examples 111 BR Brush Axis Full Description The BR command is used in conjunction with an AMP 430x0 to enable which axis will be set as brush type servo The hall error bits are not set in the TA value when an axis is configured as brush type The hall inputs are available for general use via the QH command Arguments BR n n n n n n n n n where n 0 Brushless servo axis n 1 Brush type servo axis n Returns the value of the axis Usage While Moving Yes Default Value 0 0 0 0 0 0 0 0 In a Program Yes Default Format Command Line Yes Controller Usage DMC 40x0 D430x0 Operand Usage Related Commands OE Off On Error TA Tell Amplifier QH Hall State
150. ly 0 3 bits valid _TTn 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 n is the axis specifier A H Arguments RD ml m2 m3 m4 m5 m6 m7 m8 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 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _RD contains the address for the next array element for recording Related Commands 315 RA Record Array RC Record Interval DM Dimension Array Examples DM ERRORA 50 RA ERRORA RD _TEA _TEB ERRORB 50 Define array ERRORB Specify record mode Specify data type RC1 Begin record JG 1000 BG Begin motion 316 RE Return from Error Routine Full Description The RE command is used to end a position error handling subroutine or limit switch handling subroutine The error handling subroutine 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
151. ml the index of the first widened segment _EW 1 contains n1 the length of the first widened segment _EW2 contains m2 the index of the second widened segment _EW3 contains n2 the length of the second widened segment Related Commands 188 EP ECAM master positions EA Choose ECAM master EB Enable ECAM EC Set ECAM table index EG Engage ECAM Slave EM Specify ECAM cycle EQ Disengage ECAM Slave ET ECAM table Examples EW 41 688 Widen segment 41 to 688 master counts EW 41 688 124 688 Widen segments 41 and 124 to 688 master counts 189 EY ECAM Cycle Count Full Description Sets or gets the ECAM cycle count This is the number of times that the ECAM axes have exceeded their modulus as defined by the EM command EY will increment by one each time the master exceeds its modulus in the positive direction and EY will decrement by one each time the master exceeds its modulus in the negative direction EY can be used to calculate the absolute position of an axis with the following equation Absolute position EY EM TP Arguments EY n where n is a signed integer in the range 2147483648 to 2147483647 decimal n returns the current cycle count Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _EY returns the current cycle count Related Commands EM ECAM modulus Examples MG _EY _EMY _TPY pr
152. mmand description The controller provides 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 main 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 atspeed AT at time relative to a reference time AV after vector distance
153. n 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 m 1 o where 1 is the interval and o is the offset as determined by the EP command Arguments ET m n n n n n n n n where m is an integer between O and 256 n is an integer in the range between 2 147 438 648 and 2 147 438 647 n Returns the slave position for the specified point The value m 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 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands EA Choose ECAM master EB Enable ECAM EC Set ECAM table index EG Engage ECAM EM Specify ECAM cycle EP Specify ECAM table intervals amp staring point 186 EQ Disengage ECAM Examples 0 0 0 Specifies the position of the slave axes A and C to be ynchronized with the starting point of the master 1 1200 400 Specifies the position of the slave axes A and C be synchronized with the second point of the master O Set the table index value to 0 the first element in the table Qi 5 0 Specifies the position of the slave axes A and C to be ynchronized with the starting point of the master ET 1
154. n Arc cosine TAN n Tangent Examples MG SIN O 0 0000 MG SIN 90 1 0000 MG SIN 180 0 0000 MG SIN 270 1 0000 MG SIN 360 0 0000 42 SQR n Square Root Full Description Takes the square root of the given number If the number is negative the absolute value is taken first Arguments SQR n where n is a signed number in the range 2147483648 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands ABS n Absolute value Examples MG SOR 2 1 4142 MG SOR 2 1 4142 43 Square Brackets Array Index Operator Full Description The square brackets are used to denote the array index for an array or to denote an array name They are also used to designate the argument to a function such as ABS n Arguments mmmmmmmm n where mmmmmmmm is the array name n is the array index and is an integer between 0 and 15999 When used in an array n 1 returns the array length Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands DM Dimension Array QU Print Upload Array Examples 44 Ma Ah An Ag Ma AF Ag A a b C d e f 8 h JS subroutine stack variable Full Description Provides local subroutine access for up to 8 variables passed on the subrou
155. n Program JG 50000 7000 Specify speeds BG AD Begin motion HB Label AR 25000 After passing 25000 counts of relative distance on A axis MG Passed _A _TPA Send message on A axis JP B Jump to Label B EN End Program command Use AR if multiple position trippoints are needed in a Single motion sequence Hint AR is used to specify incremental distance from last AR or AD 80 AS At Speed Full Description A U 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 speed begins diverging from the AS value rguments AS nnnnnnnnnn where nis A B C D E F G H S or T or any combination to specify the axis or sequence sage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands Examples SPEED Program A PR 100000 Specify position SP 10000 Specify speed BGA Begin A ASA After speed is reached MG At Speed Print Message EN End of Program WARNING The AS command applies to a trapezoidal velocity profile only with linear acceleration AS used with smoothing profiling will be
156. n 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 At the second stage the motor change directions and slowly approach the transition again at the speed set with the HV command When the transition is detected the motor is stopped instantaneously At the third stage the motor moves forward at the speed set with the HV command until it detects an index pulse from the encoder It latches to this point and defines it as position 0 For stepper mode operation the sequence consists of the first two stages The frequency of the motion in stage 2 is set with the HV command Arguments HM nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis No argument homes all axes Usage While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _HM n contains the state of the home switch for the specified axis Related Commands CN Configure Home FI 207 Find Index Only FE Find Home Only HV Homing velocity Examples HM Set Homing Mode for all axes BG Home all axes BGA Home only the A axis BGB Home only the B axis BGC Home only the C axis BGD Home only the D axis Hint You can create your own custom homing sequence by using the F
157. nd LE Once executed by the controller CD 0 0 0 will terminate the contour mode Note2 The command CDO 0 will assign a variable CDO the value of 0 In this case the user must have a space after CD in order to terminate the Contour Mode correctly Example CD 0 0 will terminate the contour mode for the X axis Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands CM Contour Mode DT Time Increment 126 Examples ContO Define label Cont0O CM ABCD Specify Contour Mode DT 4 Specify time increment for contour CD 200 350 150 500 Specify incremental positions on A B C and C axes A axis moves 200 counts B axis moves 350 counts C axis moves 150 counts C axis moves 500 counts CD 100 200 300 400 New position data CD 0 0 0 0 0 Wait JP Wait CM lt gt 511 End of Contour Buffer Sequence Wait until path is done EN End program 127 CE Configure Encoder Full 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 which reverses the direction of the feedback Note when using a servo motor the motor will run away The configuration applies independently to the main axes encoders and the auxiliary encoders WWhen the MT command is configured for a stepper motor the auxiliary encode
158. nding still An IP a b c d command is equivalent to a PR a b c d and BG command The motor will move to the specified position at the requested slew speed and acceleration Case 2 Motor is moving towards a position as specified by PR PA or IP An IP command will cause the motor to move to a new position target which is the old target plus the specified increment The incremental position must be in the same direction as the existing motion Case 3 Motor is in the Jog Mode An IP command will cause the motor to instantly try to servo to a position which is the current instantaneous position plus the specified increment 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 small incremental position movements Arguments IP n n n n n n n n or IPA n where n is a signed numbers in the range 2147483648 to 2147483647 decimal n Returns the current position of the specified axis Usage While Moving Yes Default Value In a Program Yes Default Format PF Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands PF Position Formatting 224 Examples IP 50 50 counts with set acceleration and speed 225 IT Independent Time Constant Smooth
159. ndividual vector segments For more information see description of VP CR and LI commands 381 VV Vector Speed Variable Full Description The VV command sets the speed of the vector variable in a coordinated motion sequence in either the LM or VM modes VV may be changed during motion The VV command is used to set the lt vector speed variable argument for segments that exist in the vector buffer By defining a vector segment begin speed as a negative 1 i e lt 1 the controller will utilize the current vector variable speed as the segment is profiled from the buffer This is useful when vector segments exist in the buffer that use the lt and gt speed indicators for specific segment and corner speed control and the host needs to be able to dynamically change the nominal return operating speed The vector variable is supported for VP CR and LI segments Arguments VVS n and VVT n where n specifies the speed as an unsigned even number in the range 2 to 22 000 000 for servo motors and 2 to 6 000 000 for stepper motors VVS is the speed to apply to the S coordinate system and VVT is the speed to apply to the T coordinate system The units are in counts per second VVS Returns the value of the vector speed variable for the S coordinate plane VVT Returns the value of the vector speed variable for the T coordinate plane Usage While Moving Yes Default Value 0 In a Program Yes Default Format 8 0 Command Line Yes
160. ne Examples PROV DMC4040 Rev 1 0 RES 288 P2NM Serial port 2 number Full Description P2NM converts from ASCII e g 1234 to binary so that a number can be stored into a variable and math can be performed on it Numbers from 2147483648 to 2147483647 can be processed P2NM returns the last number followed by carriage return sent to auxiliary serial port port 2 Arguments Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands P2CD Serial port 2 code P2CH Serial port 2 character P2ST Serial port 2 string CI Configure COMINT CC Configure serial port 2 COMINT Communication interrupt automatic subroutine Examples RV DMC4040 Rev 1 0 SARAS 289 P2ST Serial port 2 string Full Description P2ST returns the last string followed by carriage return sent to auxiliary serial port port 2 NO MORE THAN SIX CHARACTERS CAN BE ACCESSED Arguments Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands P2CD Serial port 2 code P2CH Serial port 2 character P2NM Serial port 2 number CI Configure COMINT CC Configure serial port 2 COMINT Communication interrupt automatic subroutine Examples CC 9600 0 1 0 MG TEST P2 send a message to the hand term
161. nged to a new gear setting The distance is entered as an absolute value the motion of the master may be in either direction If the distance is set to 0 then the gearing will engage instantly Arguments GD n n n n n n n n where n is an integer in the range 0 to 32767 the units are in encoder counts n 0 will result in the conventional method of instant gear change n will return the value that is set for the appropriate axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format 5 0 Command Line Yes Controller Usage Operand Usage _GDn contains the distance the master axis will travel for the specified slave axis to fully engage disengage or change ratios Related Commands _GP Gearing Phase Differential GR Gear Ratio GA Gear Axis Examples HA GA X Sets the X axis as the gearing master for the Y axis 201 GD 5000 Set distance over which gearing is engaged to 5000 counts of the master axis JG5000 Set the X axis jog speed to 5000 cts sec BGX Begin motion on the X axis ASX Wait until X axis reaches the set speed of 5000 counts sec GR 1 Engage gearing on the Y axis with a ratio of 1 1 the distance to fully engage gearing will be 5000 counts of the master axis WT1000 Wait 1 second GR 3 Set the gear ratio to three The ratio will be changed over the distance set by the GD command WT1000 Wait 1 second GR 0 Disengage the gearin
162. nse shows D axis step drive resolution 388 YB Step Motor Resolution Full Description The YB command specifies the resolution of the step motor in full steps per full revolution for Stepper Position Maintenance mode Arguments YB m m m m m m m m or YBn m where nis A B C D E F G or H or any combination to specify the axis or axes m is 0 to 9999 which represents the motor resolution in full steps per revolution Usage While Moving No Default Value 200 In a Program Yes Default Format 1 4 Command Line Yes Operand Usage _YBn contains the stepmotor resolution for the specified axis Related Commands QS Error Magnitude YS Stepper Position Maintenance Mode Enable Status YA Step Drive Resolution YC Encoder Resolution YR Error Correction Examples 1 Set the step motor resolution of the A axis for a 1 8 step motor YBA 200 2 Query the A axis value YBA 389 42 0 0 Response shows A axis step motor resolution 390 YC Encoder Resolution Full Description The YC command specifies the resolution of the encoder in counts per revolution for Stepper Position Maintenance mode Arguments YC m m m m m m m m or YCn m where nis A B C D E F G or H or any combination to specify the axis or axes m is 0 to 32766 which represents the encoder resolution in counts per revolution Usage While Moving No Default Value 4000 In a Program Yes Default Format 1 4 Command Line Yes Operand Usage
163. ock 351 TK Peak Torque Limit Full Description The TK command sets the peak torque limit on the motor command output and TL sets the continuous torque limit When the average torque is below TL the motor command signal can go up to the TK Peak Torque for a short amount of time If TK is set lower than TL then TL is the maximum command output under all circumstances Arguments n is an unsigned number in the range of 0 to 9 99 volts n 0 disables the peak torque limit n returns the value of the peak torque limit for the specified axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 4 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _TKn contains the value of the peak torque limit for the specified axis Related Commands Examples TLA 7 Limit A axis to a 7 volt average torque output TKA 9 99 Limit A axis to a 9 99 volt peak torque output 352 TL Torque Limit Full 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 n n n n or TLA n where n is an unsigned numbers in the range 0 to 9 998 volts with resolution of 0 0003 volts n Returns the value of the torque limit for the specified axis Usage While Moving Yes Default Value 9 998 In a Program Yes Default Format 1 4 Command Line Yes Cont
164. ode and human readable message n Returns the error code Usage Usage Details Usage Value Default Value N A Default Format_ 3 0 Operand Usage _ TC contains the value of the error code Related Commands Examples GF32 Bad command 2T CL Tell error code 1 Unrecognized command 344 TD Tell Dual Encoder Full Description The TD command returns the current position of the dual auxiliary encoder s Auxiliary encoders are not available for stepper axes or for the axis where output compare is used When operating with stepper motors the TD command returns the number of counts that have been output by the controller Arguments TD nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument will provide the dual encoder position for all axes Usage While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Not in a Program Yes Controller Usage ALL CONTROLLERS Operand Usage _TDn contains value of dual encoder register Related Commands DE Dual Encoder Examples TD Return A B C D Dual encoders 200 10 0 110 TDA Return the A motor Dual encoder 200 DUAL _TDA Assign the variable DUAL the value of TDA 345 TE Tell Error Full 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 loo
165. oller Usage ALL CONTROLLERS Operand Usage _AFx contains a 1 if analog feedback is enabled and 0 if not enabled for the specified axis Related Commands 65 AQ Analog Configuration CE Configure Encoder MT Motor Type Examples AF 1 0 0 1 Analog feedback on A and D axis Vl _AFA Assign feedback type to variable AF 24 2 Interrogate feedback type 66 AG Amplifier Gain Full Description The AG command sets the amplifier current voltage gain for the AMP 430x0 0 sets the lowest ratio or value while 2 sets the highest ratio AG is stored in EEPROM by the BN command The MT command must be issued prior to the AG command to set the proper range The axis must be in the motor off state MO before new AG settings will take effect Arguments AG n n n n n n n n where AMP 430x0 SDM 44140 SDM 44040 n 004A Vn 005An 005A n 10 7 A Vn 11 0An 10 75A n 210A Vn 220An 21 0A n 330An 314A n Returns the value of the amplifier gain Usage While Moving No Default Value 1 1 1 1 1 1 1 1 In a Program Yes Default Format Command Line Yes Controller Usage DMC 40x0 D430x0 DMC 40x0 D4140 DMC 40x0 D4040 Operand Usage Related Commands TA Tell Amplifier AW Amplifier Bandwidth BS Brushless Setup EXAMPLE MO Set motor off 67 AG2 1 Sets the highest amplifier gain for A axis and medium gain for B axis on 430x0 SH Turn motor on BN Save AG setting to EEPROM Al Examples 68 Al After Inp
166. olutely No Operation NO Nothing No Operation EN End of Program 273 NZ Notch Zero Full Description The NZ command sets the real part of the notch zero Arguments NZ n n n n n n n n or NZA n where n is ranges from Hz to n Returns the value of the Notch filter zero for the specified axis Usage While Moving Yes Default Value 0 5 In a Program Yes Default Format 3 1 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _NZn contains the value of the Notch filter zero for the specified axis Related Commands NB Notch Bandwidth NF Notch Filter Examples NZA 10 Sets the real part of the notch pole to 10 2 Hz 274 OA Off on encoder failure Full Description Turns on or off encoder failure detection The controller can detect a failure on either or both channels of the encoder This is accomplished by checking on whether motion of at least 4 counts is detected whenever the torque exceeds a preset level OV for a specified time OT Note that for this function to work properly it is necessary to have a non zero value for KI The OA command works like the OE command if OA is set to 1 and an encoder failure occurs the axis goes into the motor off MO state and the stop code SC is set to 12 Arguments OAn n n n n n n n where nis Oor 1 with 1 enabling this feature returns the last value set Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command L
167. om error subroutine 174 RI Return from interrupt subroutine Examples A Program A PR 500 Move A axis forward 500 counts BGA Begin motion AMA Pause the program until the A axis completes the motion EN End of Program 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 subroutine 175 ENDIF End of IF conditional statement Full 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 While Moving Yes In a Program Yes Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands IF Command to begin IF conditional statement ELSE Optional command to be used only after IF command JP Jump command JS Jump to subroutine command Examples 176 EO Echo Full 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 turns e
168. ommand X axis to go 100 counts and reach a speed of 200 in 256 samples 301 PVY 50 500 100 reach a speed o PVX 200 200 50 reach a speed o PVX 300 0 50 PVY 300 0 50 reach a speed o PVY 0 PVX 0 BTXY EN PVY 100 100 51 speed of 100 in reach a speed of 0 Command Y 500 in 100 samples Command Y axis to 510 samples j Command X 200 in 50 samples Command X O in 50 samples Command Y O in 50 samples Exit PVI Exit PVI End program axis to go 150 axis to axis to axis to go 50 counts go 300 go 600 go 150 mode on Y axis mode on X axis Begin PVT on X and Y axis counts and and reach a counts and counts and counts and 302 PW Password Full Description The password can be set with the command PW password password where the password can be up to 8 alphanumeric characters The default value after master reset is a null string The password can only be changed when the controller is in the unlocked state L K The password is burnable but cannot be interrogated If you forget the password you must master reset the controller to gain access Arguments PW n n where n is a string from 0 to 8 characters in length Usage While Moving Yes Default Value null string In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands lt control gt L lt cont
169. ommand 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 When using a stepper motor this condition is satisfied when the stepper position as determined by the output buffer has crossed the specified position For further information see Chapter 6 of the User Manual Stepper Motor Operation 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 AP can only be used when there s commanded motion on the axis Arguments AP n n n n n n n n or APA n where n is a signed integer in the range 2147483648 to 2147483647 decimal Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands AR Trippoint for relative distances MF Trippoint for forward motion Examples TEST Program B DPO Define zero JG 1000 Jog mode speed of 1000 counts sec 13 BG A Begin move AP 2000 After passing the position 2000 V1 _TPA Assign V1 A position MG Position is V1 Print Message Sr hStop EN E End of Program Hint The accuracy of the AP command is the number of counts that occur in 2 TM sec Multiply the speed by 2 T
170. ontour buffer and commanded movement A positive DT will resume contour mode from paused position of buffer 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 While Moving Yes Default Value 1 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _DT contains the value for the time interval for Contour Mode Related Commands CM Contour Mode CD Contour Data Examples 156 DV Dual Velocity Dual Loop Full Description The DV function changes the operation of the filter It causes the KD derivative term to operate on the dual encoder instead of the main encoder This results in improved stability in the cases where there is a backlash between the motor and the main encoder and where the dual encoder is mounted on the motor Arguments DV n n n n n n n n or DVX n where n 0 Disables the dual loop mode n 1 Enables the dual loop mode Usage While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _DVn contains the state of dual velocity mode for specified axis O disabled 1 enabled Related Commands KD Damping constant FV Velocity feedforward Examples DV 1 1 1 1 Enables dual loop on all axes DV 0 Disables DV on A axis DV 1 1 Enab
171. ot 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 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _RC contains status of recording 1 if recording 0 if not recording Related Commands DM Dimension Array RD Record Data QZ Record Array Mode Examples FRECORD Record DM Torgque 1000 Define Array 313 RC 2 HA JP RA Torque Specify Record Mode RD _TTA Specify Data Type Begin recording and set 4 msec betw n records JG 1000 BG Begin motion A _RC 1 Loop until done MG DONE RECORDING Print message EN End program 314 RD Record Data Full Description The RD command specifies the data type to be captured for the Record Array RA mode The command type includes _AFn Analog Input Value 32767 to 32768 The analog inputs are limited to those which correspond to an axis on the controller _DEn 2nd encoder _OP Outputs _RLn Latched position _SCn Stop code _SHn Commanded Position _TDn Stepper Position _TEn Position Error _TI Inputs TIME Time in servo sample as read by the TIME command _TPn Position _TSn Switches on
172. otor 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 nnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument specifies all axes Usage While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands FI Find Index HM Home BG Begin AC Acceleration Rate DC Deceleration Rate SP Speed for search Examples 193 FE Set find edge mode BG Begin all axes FEA Only find edge on A BGA FEB Only find edge on B BGB FECD Find edge on C and D BGCD Hint Find Edge only searches for a change in state on the Home Input Use FI Find Index to search for th ncoder index Use HM Home to search for both the Home input and the Index Remember to specify BG after each of these commands 194 FI Find Index Full Description The FI and BG commands move the motor until an encoder index pulse is detected The controller looks for a transition from low to high There are 2 stages to the FI command The first stage jogs the motor at the speed and direction of the JG command until a transition
173. p Arguments TE nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument will provide the position error for all axes Usage While Moving Yes Default Value 0 In a Program Yes Default Format Position Format Not in a Program Yes Controller Usage ALL CONTROLLERS Operand Usage _TEn contains the current position error value for the specified axis Related Commands OE Off On Error ER Error Limit POSERR Error Subroutine PF Position Formatting Examples TE Return all position errors Py Lp 0 6 TEA Return the A motor position error 346 19 TEB Return the B motor position error 2 Error _TEA Sets the variable Error with the A 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 347 TH Tell Ethernet Handle Full Description The TH command is used to request the controllers handle status Data returned from this command indicates the IP address and Ethernet address of the current controller This data is followed by the status of each handle indicating connection type and IP address Arguments None Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands IH Internet Handle WH Which Handle Examples
174. pecified axis Usage While Moving Yes Default Value O In a Program Yes Default Format 4 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _FVn contains the feedforward velocity for the specified axis Related Commands FA Acceleration Feedforward Examples FV 10 20 Set feedforward coefficients to 10 and 20 for A and B respectively JG 30000 80000 This produces 0 366 volts for A and 1 95 volts tor B FV Return the A and B values 010 020 198 GA Master Axis for Gearing Full 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 move 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 n n n n n n n n or GAA n where n can be A B C D E F G H M or N The value of n is used to set the specified main encoder axis as the gearing master and M and N represents the virtual axes The slave axis is specified by the
175. position of the argument The first position of the argument corresponds to the A axis the second position corresponds to the B axis etc A comma must be used in place of an argument if the corresponding axes will not be a slave n can be CA CB CC CD CE CF CG or CH The value of x is used to set the commanded position of the specified axis as the gearing master ncan be S or T S and T are used to specify the vector motion of the coordinated system S or T as the gearing master n can be DA DB DC DD DE DF DG or DH The value of n is used to set the specified auxiliary encoder axis as the gearing master Usage While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands 199 GR Gear Ratio GM Gantry Mode Examples GEAR Gear program GA A T Specify A axis as master for B and vector motion 7 on T as master for C GR 5 2 5 Specify B and C ratios JG 5000 Specify master jog speed BGA Begin motion WT 10000 Wait 10000 msec STA Stop AMA Wait for motion to complete EN End Program 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 200 GD Gear Distance Full Description The GD command sets the distance of the master axis over which the specified slave will be engaged disengaged or cha
176. r used to count stepper pulses will be forced to pulse and direction Arguments CE n n n n n n n n or CEA n where n is an integer in the range of O to 15 Each integer is the sum of two integers M and N which configure the main and the auxiliary encoders The values of M and N are M Main encoder type N Auxiliary encoder type 0 Normal quadrature 0 Normal quadrature 1 Normal pulse and direction 4 Normal pulse and direction 2 Reversed quadrature 8 Reversed quadrature 3 Reversed pulse and direction 12 Reversed pulse and direction For example n 10 implies M 2 and N 8 thus both encoders are reversed quadrature n Returns the value of the encoder configuration for the specified axes Usage While Moving Yes Default Value 0 In a Program Yes Default Format 2 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _CEn contains the value of encoder type for the axis specified by n Related Commands MT Specify motor type 128 Examples CE 0 3 6 2 Configure encoders CE TRI 0 376 72 Interrogate configuration V _CEB V 3 Assign configuration to a variable Note When using pulse and direction encoders the pulse signal is connected to CHA and the direction signal is connected to CHB 129 CI Configure Communication Interrupt Full Description The CI command configures a program interrupt based on characters received on communications port 2 the AUX serial port An interrupt causes
177. ram line with an error EN End program Examples BEGIN Begin main program IN ENTER SPEED Speed Prompt for speed JG Speed BGX Begin motion EN End main program 17 COMINT Communication interrupt automatic subroutine Full Description COMINT can be configured by the CI command to run either when any character or a Carriage return is received on the auxiliary serial port Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands P2CD Serial port 2 code P2CH Serial port 2 character P2NM Serial port 2 number P2ST Serial port 2 string CI Configure COMINT CC Configure serial port 2 EN End subroutine Examples A Program Label CC9600 0 1 0 CI2 interrupt on any character 18 ININT Input interrupt automatic subroutine Full Description ININT runs upon a state transition of digital inputs 1 to 8 and is configured with II ININT runs in thread 0 Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands II Input interrupt IN n Read digital input RI Return from interrupt Examples A IIl arm digital input 1 19 LIMSWI Limit switch automatic subroutine Full Description Without LIMSWI defined the controller will effectively issue the STn on the axis when it s limit switch is tripped With LIMSWI defined
178. rcuitry can be configured to sink or source current to become active See Chapter 3 in the User s Manual for further details Arguments Usage Operand Usage Related Commands Examples MG _LFA Display the status of the A axis forward limit switch 53 _LR Reverse Limit Switch Operand Keyword Full Description The _LR operand contains the state of the reverse limit switch for the specified axis The operand is specified as _LRn where n is the specified axis Note This operand is affected by the configuration of the limit switches set by the command CN For CN 1 _LRn 1 when the limit switch input is inactive _LRn 0 when the limit switch input is active For CN 1 _LRn 0 when the limit switch input is inactive _LRn 1 when the limit switch input is active The term active refers to the condition when at least 1 ma 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 User s Manual for further details Arguments Usage Operand Usage Related Commands Examples MG _LRA Display the status of the A axis reverse limit switch 54 Variable Axis Designator Full Description The signifies a variable axis designator Arguments n m n is a lowercase letter a through h m is a positive integer O through 11 where 0 or A quotes required X axis 1 or B Y axis 2 or C Z axis 3 or D
179. rdinate system is active Related Commands VP Vector Position VS Vector Speed VD Vector Deceleration VA Vector Acceleration 122 VM Vector Mode VE End Vector BG BGS Begin Sequence Examples CAT Specify T coordinate system VMAB Specify vector motion in the A and B plane VS 10000 Specify vector speed CR 1000 0 360 Generate circle with radius of 1000 counts start at 0 degrees and complete one circle in counterclockwise direction VE End Sequence BGT Start motion of T coordinate system 123 CB Clear Bit Full 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 a specific output on the controller to be cleared set to 0 The first output on the controller is denoted as output 1 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands SB Set Bit OB Output Bit OP Define output port byte wise Examples CB 7 CB 16 lear output bit 7 lear output bit 16 8 axis controllers only 124 CC Configure Communications Port 2 Full Description The CC command configures baud rate handshake mode and echo for the AUX SERIAL PORT referred to as Port 2 This command must be given before using the MG IN or
180. re counts 323 RS Reset Full Description The RS command resets the state of the processor to its power on condition The previously saved state of the hardware along with parameter values and saved program are restored RS 1 Soft master reset Restores factory defaults without erasing EEPROM To restore saved EEPROM settings use RS with no arguments Arguments Usage In a Program No Command Line Yes Can be Interrogated Yes Used as an Operand Yes Operand Usage _RS returns the state of the processor on its last power up condition The value returned is the decimal equivalent of the 4 bit binary value shown below Bit 3 For master reset error there should be no program to execute Bit 2 For program check sum error Bit 1 For parameter check sum error Bit 0 For variable check sum error Related Commands Examples RS Reset the hardware 324 SA Send Command Full Description SA sends a command form one controller to another via Ethernet NOTE A wait statement e g WTS must be inserted between successive calls to SA Arguments SAh arg or SAh arg arg arg arg arg arg arg arg where h is the handle being used to send commands to the slave controller arg is anumber controller operand variable mathematical function or string The range for numeric values is 4 bytes of integer 231 followed by two bytes of fraction 2 147 483 647 9999 The maximum number of characters for a string is 38 character
181. read n is not running Related Commands HX Halt execution Examples XQ APPLE 0 Start execution at label APPLE thread zero XQ DATA 2 Start execution at label DATA thread two XQ 0 Start execution at line 0 Hint For DOS users don t forget to quit the edit mode first before executing a program 386 YA Step Drive Resolution Full Description The YA command specifies the resolution of the step drive in step counts per full motor step for Stepper Position Maintenance mode and to configure the stepper amplifier Arguments YA m m m m m m m m or YAn m where n is A B C D E F G or H or any combination to specify the axis or axes m is 0 to 9999 which represents the drive resolution in step counts per full motor step For SDM 44040 only mis 1 2 4 16 for full half 1 4 and 1 16 step drive resolution with the SDM 44040 the YA command configures the actual resolution of the stepper driver Usage While Moving No Default Value 2 In a Program Yes Default Format 1 4 Command Line Yes Operand Usage _YAn contains the resolution for the specified axis Related Commands QS Error Magnitude YS Stepper Position Maintenance Mode Enable Status YB Step Motor Resolution YC Encoder Resolution YR Error Correction 387 Examples 1 Set the step drive resolution for the SDM 44140 Microstepping Drive YA 64 64 64 64 2 Query the D axis value MG_YAD 764 0000 Respo
182. rget position every 10 milliseconds WT10 WT10 Wait 10 milliseconds JP LOOP Repeat by jumping back to label LOOP Special Notes The AM and MC trip points are not valid in this mode It is recommended to use MF and MR as trip points with this command as they allow the user to specify both the absolute position and the direction The AP trip point may also be used 300 PV PVT Data Full Description The PV command is used to enter PVT data into the PVT buffer by specifying the target position velocity and delta time For more details on PVT mode of motion see the user manual Arguments PVa p v t where a specifies the axis p is the relative target position specified in counts 11 000 000 lt p lt 1 1 000 000 v is the target velocity specified in counts per second 22 000 000 lt v lt 22 000 000 Integer values only for p and v t is the time to achieve target position and velocity t is in even samples 2 lt t lt 2048 If t 0 then the PVT mode is exited If t 1 the PVT buffer is cleared t is in samples and sample time is defined by TM With a default TM of 1000 1024 samples is 1 second If t is omitted then the previous value is used Defaults While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage DMC 40x0 Usage _PVa contains the number of spaces available in the PT buffer for each axis Related Commands BT Begin PVT Motion Examples PVX 100 200 256 C
183. rol gt K Lock Unlock ED Edit program UL Upload program LS List program TR Trace program Examples PWtest test Set password to test POLK test 1 Lock the program ED Attempt to edit program 303 QD Download Array Full 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 index of the first element of the array and the index of the 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 Arguments QD array start end where array is valid array name start is index of first element of array default 0 end is index of last element of array default size 1 Usage While Moving Yes Default Value start 0 end size 1 In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands QU 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 W QH Examples 304 QH Hall State Full Description The QH command transmits the state of the Hall sensor inputs The value is decimal and represents an 8 bit value
184. roller Usage ALL CONTROLLERS Operand Usage _TLn contains the value of the torque limit for the specified axis Related Commands Examples Th 15 5 9 100 Limit Limit C axis to 9 volts TL Return limits 1 0000 5 0000 9 0000 7 TL Return A axis 21 0000 A axis to 1 volt Limit B axis to 5 volts Limit D axis to 7 5 volts 5000 limit 353 TM Update Time Full Description The TM command sets the sampling period of the control loop A zero or negative number turns off the servo loop The units of this command are sec Arguments TM n where With the fast firmware n is an number in the range 31 25 to 20000 decimal with resolution of 31 25 microseconds The minimum sample time is possible when using the fast firmware In the Fast firmware mode the following functions are disabled TD DV TK NB NZ NF second field of EI Gearing CAM PL Analog Feedback Steppers Trippoints in all but threads 0 and 1 Data Record and TV Using the fast firmware the minimum sample times are the following Accelera Controllers with 1 2 axes 31 25 sec Accelera Controllers with 3 4 axes 62 5 sec Accelera Controllers with 5 6 axes 93 75 sec Accelera Controllers with 7 8 axes 125 sec With the normal firmware Using the normal firmware the minimum sample times are the following Accelera Controllers with 1 2 axes 62 5 sec Accelera Controllers with 3 4 axes 125 sec Accelera Controllers with 5 6 axes 156 25 sec
185. roller operand variable mathematical function or string The range for numeric values is 4 bytes of integer 2 147 483 648 to 2 147 483 647 The maximum number of characters for a string is 4 characters Strings are identified by quotations n returns the current value Usage While Moving Yes Default Value 0 In a Program Yes Default Format 10 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _ZAn contains the current value Related Commands DR Data record update rate QZ Data record format Examples Thread ZAX MyVar constantly update ZA JP Thread 397 ZS Zero Subroutine Stack Full 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 _ZSn see operand usage below Arguments Usage Operand Usage Related Commands Examples 398
186. ronic 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 n n n n n n n n or EQA n where n is the master positions at which the axes are to be disengaged n Returns 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 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _EQn 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 Choose ECAM master EB Enable ECAM EC Set ECAM table index EG Engage ECAM EM Specify ECAM cycle EP 180 Specify ECAM table intervals amp staring point ET ECAM table Examples EQ 300 700 Disengages the A and B 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 position is reached use MF or MR command 181 ER Error Limit Full Description The ER command sets the magnitude of the position errors for each axis that will trigger an error condition When
187. rrays 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 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 time than 2 ms 144 DC Deceleration Full 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 n n n n or DCA n where n is an unsigned numbers in the range 1024 to 1073740800 n Returns the deceleration value for the specified axes Usage While Moving Yes Default Value 256000 In a Program Yes Default Format 10 0 Command Line Yes Controller Usage ALL CONTROLLERS When moving the DC command can only be specified while in the jog mode Operand Usage _DCn contains the deceleration rate for the specified axis Related Commands AC Acceler
188. s When the forward software limit is activated the automatic subroutine LIMSWI will be executed if it is included in the program See User s Manual Automatic Subroutine Arguments FL n n n n n n n n or FLA n where n is a signed integers in the range 2147483648 to 2147483647 n represents the absolute position of axis n 2147483647 turns off the forward limit n Returns the value of the forward limit switch for the specified axis Usage While Moving Yes Default Value 2147483647 In a Program Yes Default Format Position Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _FLn contains the value of the forward software limit for the specified axis Related Commands BL Reverse Limit PF Position Formatting Examples FL 150000 Set forward limit to 150000 counts on the A axis 197 FV Velocity Feedforward Full Description The FV command sets 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 n n n n or FVA n where n is an unsigned numbers in the range O to 8191 decimal n Returns the feedforward velocity for the s
189. s Strings are identified by quotations Typical usage would have the first argument as a string such as KI and the subsequent arguments as the arguments to the command Example SAF KI 1 2 would send the command KI1 2 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _SAhn gives the value of the response to the command sent with an SA command The h value represents the handle A thru H and the n value represents the specific field returned from the controller 0 7 If the specific field is not used the operand will be 2431 RELATED COMMAND MG Display messages IH Opens handle Related Commands Examples 325 A IHA 10 0 0 12 B JP B _IHA2 lt gt 2 SAA KI 1 2 Configures handle A to be connected to a Wait for connection Sends the command t controller with the IP address 10 0 0 12 o handle A slave controller KI 1 2 WT5 SAA TE Sends the command to handle A slave controller TE WT5 MG_SAAO Display the content of the operand_SAA first response to TE command 132 response from controller MG_SAA1 Display the content of the operand_SAA 2nd response to TE command 12 response from controller SAA TEMP 16 controller EN End Program Sets variable temp equal to 16 on handle A 326
190. s Commutation BD 99 Brushless Degrees BM Brushless Modulo BO Brushless Offset BS Brushless Setup BZ Brushless Zero BK Examples 100 BK Breakpoint Full Description For debugging Causes the controller to pause execution of the given thread at the given program line number which is not executed All other threads continue running Only one breakpoint may be armed at any time After a breakpoint is encountered a new breakpoint can be armed to continue execution to the new breakpoint or BK will resume program execution The SL command can be used to single step from the breakpoint The breakpoint can be armed before or during thread execution Arguments BK n m where n is an integer in the range O to 1999 which is the line number to stop at n must be a valid line number in the chosen thread m is an integer in the range 0 to 7 The thread Usage While Moving Yes Default Value of m 0 In a Program No Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BK will tell whether a breakpoint has been armed whether it has been encountered and the program line number of the breakpoint LineNumber breakpoint armed LineNumber breakpoint encountered 2147483648 breakpoint not armed Related Commands SL Single Step TR Trace Examples 101 3 5 3 Pause at line 3 the 4th line Continue to line 5 Execute the next line Execute the next 3 lines Resume normal ex
191. s a 1 if it is for a UDP master contains a 2 if it is for a TCP master contains a 5 while attempting to establish a UDP handle contains a 6 while attempting to establish a TCP IP handle _IHh3 contains a 0 if the ARP was successful contains a if it has failed or is still in progress _IHh4 contains a 1 if the master controller is waiting for acknowledgment from the slave after issuing a command contains a 2 if the master controller received a colon from the slave after issuing a command contains a 3 1f the master controller received a question mark from the slave after issuing a command contains a 4 1f the master controller timed out while waiting for a response from the slave after issuing a command Related Commands IA Internet Address Examples THA 251 29 51 1 Open handle A at IP address 251 29 51 1 THA 2095238399 Open handle A at IP address 251 29 51 1 Note When the IH command is given the controller initializes an ARP on the slave device before opening a handle This operation can cause a small time delay before the controller responds 218 Il Input Interrupt Full 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 subroutin
192. s controlled by acceleration deceleration and speed AD DC SP The absolute position may be specified such that the axes will begin motion continue in the same direction reverse directions or decelerate to a stop When an axis is in the special mode the ST command will exit the mode The PA command is used to give the controller an absolute position target Motion commands other than PA are not supported in this mode Arguments PT n n n n n n n n n 0 or 1 where 1 designates the controller is in the special mode n returns the current setting Usage While Moving Yes Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL Operand Usage Related Commands PA Position Absolute AC Acceleration DC Deceleration SP Speed Examples A 299 PT1 1 1 1 Enable the position tracking mode for axes X Y Z and W LOOP Create label LOOP in a program This small program will update the absolute position at 100 Hz Note that the user must update the variables V1 V2 V3 and V4 from the host PC or another thread operating on the controller PAV1 V2 V3 V4 Command XYZW axes to move to absolute positions Motion begins when the command is processed BG is not required to begin motion in this mode In this example it is assumed that the user is updating the variables at a specified rate The controller will update the new ta
193. s standard servo or stepper motor _BAn contains 0 Related Commands BB Brushless Phase Begins BC Brushless Commutation BD Brushless Degrees BI Brushless Inputs BM 89 Brushless Modulo BO Brushless Offset BS Brushless Setup BZ Brushless Zero BB Examples 90 BB Brushless Phase Begins Full Description The BB function describes the position offset between the Hall transition point and 0 for a sinusoidally commutated motor This command must be saved in non volatile memory to be effective upon reset Arguments BB n n n n n n n or BBA n where n is a signed integer which represent the phase offset of the selected axes expressed in multiples of 30 n returns the hall offset for the specified axis Usage While Moving No Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BBn contains the position offset between the Hall transition and 0 for the specified axis Related Commands BA Brushless Axis BC Brushless Commutation BD Brushless Degrees BI Brushless Inputs BM Brushless Modulo BO Brushless Offset BS Brushless Setup 91 BZ Brushless Zero Note BB is only effective as part of the BC command or upon reset BC Examples BB 30 60 The offsets for the Y and W axes are 30 and 60 respectively 92 BC Brushless Calibration Full Description The function BC monitors the status o
194. ses will occur at the incremental distance of 65536 InI where Inl is the absolute value of n When changing to CEx 2 if the original command was OCx m n and the starting position was _TPx the new command is OCx 2 _TPx m n For pulses to occur under CEx 2 the following conditions must be met m gt _TPx and n gt 0 for negative moves e g JGx 1000 and m lt _TPx and n lt 0 for positive moves e g JGx 1000 Usage 277 While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _OC contains the state of the OC function _OC 0 OC function has been enabled but not generated any pulses _OC 1 OC function not enables or has generated the first output pulse on a 5 8 axis controller OC is a logical AND of axes A D and E H Related Commands Examples OCA 300 100 Select A encoder as position sensor First pulse at 300 Following pulses at 400 500 278 OE Off on Error Full Description The OE command causes the controller to shut off the motor command if a position error TE exceeds the limit specified by the ER command an abort occurs from either the abort input or on AB command or a hardware limit switch is tripped or an amplifier error exists If a position error is detected on an axis and the motion was executing an independent move only that axis will be shut off If the motion is a part of coordinated mode of the types VM LM or
195. sine SIN n sine ACOS n Arc cosine COS n Cosine TAN n Tangent Examples MG ATAN 10 84 2894 MG ATAN O 0 0000 MG ATAN 10 84 2894 33 COM n Bitwise complement Full Description Performs the bitwise complement NOT operation to the given number Arguments COM n where n is a signed integer in the range 2147483647 to 2147483647 The integer is interpreted as a 32 bit field Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands amp Logical operators AND and OR Examples MG 8 0 COM 0 SFFFFFFFF MG 8 0 COM SFFFFFFFF 00000000 34 COS n Cosine Full Description Returns the cosine of the given angle in degrees Arguments COS n where n is a signed number in degrees in the range of 32768 to 32767 with a fractional resolution of 16 bit Usage Default Value In a Program Yes Command Line Yes Default Format While Moving Yes Operand Usage Related Commands ASIN n Arc sine SIN n Sine ATAN n Arc tangent ACOS n Arc cosine TAN n Tangent Examples MG COS 0 1 0000 MG COS 90 0 0000 MG COS 180 1 0000 MG COS 270 0 0000 MG COS 360 1 0000 FRAC n Fractional part Full Description Returns the fractional part of the given number Arguments FRAC n n is a signed number in the range 2147483648 to 214748364
196. sing Constants Variables and Arrays may be passed up a subroutine stack Variables may be passed by value or by reference If passed by value a copy is made in the subroutine stack leaving the original variable unchangeable If passed by reference the original variable s value will be changed when the subroutine writes to its local variable This is similar but not exactly analogous to a C pointer A variable passed by reference is automatically dereferenced the variable pointer is not exposed to the user Following the C syntax a by reference pass is accomplished with the ampersand amp in the invoking call Arrays can be passed in the stack though only by reference No amp is used when passing arrays by reference is assumed The length of an array is returned by reading index 1 e g array 1 To return a value on the stack write the value in the EN command upon ending the subroutine Arguments JS destination param1 param2 param8 condition where destination is a line number or label An expression such as FLABEL 4 is also valid paraml param8 are optional parameters to pass to the subroutine s stack referenced from within the subroutine as a h respectively Condition is a conditional statement using a logical operator Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage _JS used after JS is called this operand
197. sition error in counts Remember AD measures incremental distance from start of move on one axis 64 AF Analog Feedback Select Full Description The Analog Feedback AF command is used to set an axis with analog feedback instead of digital feedback quadrature pulse dir The analog feedback is decoded by a 12 bit A D converter An option is available for 16 bits The position and analog range is set using the AQ command Note AQ must be set prior to setting AF Arguments AF n n n n n n n n or AFA n where n 1 Enables analog feedback n 0 Disables analog feedback and switches to digital feedback n Returns the state of analog feedback for the specified axes O disabled 1 enabled For 1Vp p Sinusoidal Encoder Input with ICM 42100 1100 n 5 12 indicates that the sinusoidal encoder input is to be used with 2n interpolation counts per encoder cycle n 0 Disables Sinusoidal Interpolation and switches to digital feedback Differential encoder inputs must be used when using digital encoders with the ICM 42100 Consult the factory for single ended use n Returns the state of analog feedback for the specified axes n 1 When not using Analog feedback a 1 provides that the analog hardware still be sampled in the servo interrupt This provides evenly sampled data for both the data record and the RA RD RC function Usage While Moving No Default Value 0 0 0 0 In a Program Yes Default Format Command Line Yes Contr
198. ssion utility to do this Do not program this way because it is hard to read 3 To give higher priority to a thread All commands on a line are executed before the thread scheduler switches to the next thread Arguments n n n where n is a Galil command Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands NO apostrophe also accepted comment Examples BGX comment 28 ABS n Absolute value Full Description Takes the absolute value of the given number Returns the value if positive and returns 1 times the value if negative Arguments ABS n where n is a signed number in the range 2147483647 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands SQR n Square Root Examples MG ABS 2147483647 2147483647 0000 29 ACOS n Inverse cosine Full Description Returns in degrees the arc cosine of the given number Arguments ACOS n where n is a signed number in the range 1 to 1 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands ASIN n Arc sine SIN n sine ATAN n Arc tangent COS n Cosine TAN n Tangent Examples MG ACOS 1 180 0000 MG ACOS 0
199. t Value n 0 t 1000 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BZn 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 Related Commands 120 BA Brushless Axis BB Brushless Phase Begins BC Brushless Commutation BD Brushless Degrees BI Brushless Inputs BM Brushless Modulo BO Brushless Offset BS Brushless Setup Examples BZ 3 Drive C axis to zero phase with 3 volt signal and end with motor enabled 121 CA Coordinate Axes Full Description The CA command specifies the coordinate system to apply proceeding vector commands The following commands apply to the active coordinate system as set by the CA command CR ES LE LI LM TN VE VM VP Arguments CAS or 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 1 if the T coordinate system is active Usage While Moving Yes Default Value CAS In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _CA contains a 0 if the S coordinate system is active and a 1 if the T coo
200. t be executed for any axis in which motion has not completed Use the AM trippoint to wait for motion complete between moves Determining when motion is complete can also be accomplished by testing for the value of the operand _BGn 98 BI Brushless Inputs Full Description The command BI is used to define the inputs which are used when Hall sensors have been wired for sinusoidally commutated motors These inputs can be the general use inputs bits 1 8 the auxiliary encoder inputs bits 81 96 or the extended I O inputs bits 17 48 The Hall sensors of each axis must be connected to consecutive input lines for example BI 3 indicates that inputs 3 4 and 5 are used for halls sensors The brushless setup command BS can be used to determine the proper wiring of the hall sensors Arguments BI n n n n n n n n or BIA n where n is 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 While Moving Yes Default Value 0 In a Program Yes Default Format 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BIn 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 Brushless Axis BB Brushless Phase Begins BC Brushles
201. t buffer has crossed the specified Forward Motion Position For further information see Chapter 6 of the User Manual Stepper Motor Operation Arguments MF n n n n n n n n or MFA n where n is a signed integer in the range 2147483648 to 2147483647 decimal Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands AR Trippoint for after Relative Distances AP Trippoint for after Absolute Position Examples TEST Program Test DPO Define zero JG 1000 Jog mode speed of 1000 counts sec BG A Begin move MF 2000 After passing the position 2000 V1 _TPA Assign V1 A position 261 MG Position is V1 Print Message ST 7 Stop EN End of Program Hint The accuracy of the MF command is the number of counts that occur in 2 TM sec Multiply the speed by 2 TM sec 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 262 MG Message Full 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 Ex Pn Lx where m is a text message including letters numbers symbols or lt ctrl gt G up to 72 characters 4n is an ASCII character specified by the value n
202. tatements 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 While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands JS Jump to Subroutine IF 230 If conditional statement ELSE Else function for use with IF conditional statement ENDIF End of IF conditional statement Examples JP POS1 V1 lt 5 ump to label POS1 if variable V1 is less than 5 JP A V7 V8 0 ump 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 jump to occur The destination is the specified label before the comma 231 JS Jump to Subroutine
203. tch Frequency Full 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 n n n n or NFA n where n ranges from 1 Hz to 1 4 TM Hz where TM is the update rate default TM is 1000 n Returns the value of the Notch filter for the specified axis Usage While Moving Yes Default Value 0 In a Program Yes Default Format 3 1 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _NFn contains the value of notch filter for the specified axis Related Commands NB Notch bandwidth NZ Notch Zero Examples NF 20 Sets the notch frequency of B axis to 20 Hz 272 NO No Operation Full Description The NO or an apostrophe 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 Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _NO returns a bit field indicating which threads are running For example 0 means no threads are running 1 means only thread 0 is running 3 means threads O and 1 are running and 255 means all 8 threads are running Related Commands Examples A Program A NO No Operation NO This Program No Operation NO Does Abs
204. te of trippoint no argument clears the interrupted trippoint Usage While Moving No Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands ININT Input interrupt subroutine II Enable input interrupts Examples A I1I1 JP A EN Program label ININT Begin interrupt subroutine MG INPUT INTERRUPT Print Message SB 1 Set output line 1 RI 1 Return to the main program and restore trippoint 320 RL Report Latched Position Full 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 Each axis uses a specific general input for the latch input X A axis latch Input 1 Y B axis latch Input 2 Z C axis latch Input 3 W D axis latch Input 4 E axis latch Input 9 F axis latch Input 10 G axis latch Input 11 H axis latch Input 12 The armed state of the latch can be configured using the CN command Note The Latch Function works with the main encoder When working with a stepper motor without an encoder the latch can be used to capture the stepper position To do this place a wire from the controller Step PWM output into the main encoder input channel A Connect the Direction sign output into the channel B input Configure the main encoder for Step Direction using the CE command
205. tes the name of a program label for example Move Labels can be up to seven characters long and are often used to implement subroutines or loops Labels are divided into a user defined and b automatic subroutines User defined labels can be printed with LL and the number of labels left available can be queried with MG _DL The automatic subroutines include FCMDERR LIMSWI POSERR ININT AUTO AUTOERR and MCTIME no RIO A label can only be defined at the beginning of a new line There is a maximum of 510 labels available Arguments nnnnnnn where nnnnnnn is a label name up to seven characters Usage Usage and Default Details Command Line No ALL Default Value F Default Format F Operand Usage Related Commands Examples 13 AMPERR Amplifier error automatic subroutine Full Description AMPERR is used to run code when a fault occurs on a Galil amplifier See the TA command and individual amplifier information in the DMC 40x0 User Manual Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands TA Tell amplifier status CN Configure I O OE Off on error Examples 14 AUTO Subroutine to run automatically upon power up Full Description AUTO denotes code to run automatically when power is applied to the controller or after the controller is reset When no host software is used with the controller AUTO
206. the following conditions have been met 1 The commanded motor position crosses the specified relative distance from either the start of the move or the last AR or AD command When using a stepper motor this condition is satisfied when the stepper position as determined by the output buffer has crossed the specified Relative Position For further information see Chapter 6 of the User Manual Stepper Motor Operation 2 The motion profiling on the axis is complete 3 If in jog JG mode the commanded motion is in the direction which moves away from the specified position If the direction of the motion is reversed when in position tracking mode see PT command the starting point for the trippoint is reinitialized to the point at which the motion reversed The units of the command are quadrature counts Only one axis may be specified at a time AR can only be used when there s commanded motion on the axis 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 n n n n or ARA n where n is an unsigned integer in the range 0 to 2147483647 decimal Usage While Moving Yes Default Value In a Program Yes Default Format Command Line No Controller Usage ALL CONTROLLERS Operand Usage Related Commands AV Trippoint for after vector position for coordinated moves 79 AP Trippoint for after absolute position Examples A DP 0 0 0 0 Begi
207. the LZ function 0 is disabled and 1 is enabled Related Commands Examples LZ 0 Disable the LZ function TPA Interrogate the controller for current position of A axis 0000021645 0000 Value returned by the controller VAR1 Request value of variable VARI previously set to 10 0000000010 0000 Value of variable returned by controller LZ1 Enable LZ function TPA Interrogate the controller for current position of A axis 21645 0000 Value returned by the controller VAR1 Request value of variable VARI previously set to 10 10 0000 Value of variable returned by controller 256 MB Modbus Full Description The MB command is used to communicate with I O devices using the first two levels of the Modbus protocol The format of the command varies depending on each function code The function code 1 designates that the first level of Modbus is used creates raw packets and receives raw data The other codes are the 10 major function codes of the second level that the controller supports FUNCTION CODE DEFINITION 01 Read Coil Status Read Bits 02 Read Input Status Read Bits 03 Read Holding Registers Read Words 04 Read Input Registers Read Words 05 Force Single Coil Write One Bit 06 Preset Single Register Write One Word 07 Read Exception Status Read Error Code 15 Force Multiple Coils Write Multiple Bits 16 Preset Multiple Registers Write Words 17 Report Slave ID Note For those command forma
208. the application program When locked the ED UL LS and TR commands will give privilege error 106 The application program will still run when locked The locked or unlocked state can be saved with a BN command Upon master reset the controller is unlocked Once the program is unlocked it will remain accessible until a lock command or a reset with the locked condition burned in occurs Arguments lt control gt L lt control gt Kpassword n where When n is 1 this command will lock the application program When n is 0 the program will be unlocked Usage While Moving Yes Default Value In a Program No Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands PW Password ED Edit program UL Upload program LS List program TR Trace program Examples PW test test Set password to test 47 L Ktest 1 Lock the program ED Attempt to edit program 48 ARAS Master Reset Full Description The Master Reset command resets the RIO to factory default settings and erases EEPROM A master reset can also be performed by installing a jumper at the location labeled MRST and resetting the board power cycle or pressing the reset button Remove the jumper after this procedure Arguments Usage In a Program No Command Line Yes Can be Interrogated No Used as an Operand No Operand Usage Related Commands Examples 49 ARAV Revision Information Full Description
209. the brushless setup the motor must be allowed to move a minimum of one magnetic cycle in both directions rguments BSA v n where v is areal number between 0 and 10 v represents the voltage level to be applied to each phase n is a positive integer between 100 or 1000 n represents the duration in milliseconds that voltage should be applied to the motor phases Usage O While Moving No Default Value of V 0 In a Program Yes Default Value of n 200 Command Line Yes Controller Usage ALL CONTROLLERS perand Usage Related Commands BA Brushless Axis BB 114 Brushless Phase Begins BC Brushless Commutation BD Brushless Degrees BI Brushless Inputs BM Brushless Modulo BO Brushless Offset BZ Brushless Zero Examples BSC 2 900 Apply set up test to C axis with 2 volts for 900 millisecond on each step Note When using Galil Windows software the timeout must be set to a minimum of 10 seconds timeout 10000 when executing the BS command This allows the software to retrieve all messages returned from the controller 115 BT Begin PVT Motion Full Description The BT command begins PVT motion on the specified axes All axes will begin at the same time For more details on PVT mode see the user manual Arguments BTnnnnnnnn where n is A B C D E F G H or any combination of axes Defaults While Moving No Default Value In a Program Yes Default Format Command Line Yes Controller Usa
210. tine stack when using the JS jump to subroutine command Passing values on the stack is advanced DMC programming and is recommended for experienced DMC programmers familiar with the concept of passing arguments by value and by reference See the JS command for a full explanation of passing stack variables Notes 1 Passing parameters has no type checking so it is important to exercise good programming style when passing parameters See examples below for recommended syntax 2 Do not use spaces in expressions containing 3 Global variables MUST be assigned prior to any use in subroutines where variables are passed by reference Arguments Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage DMC 4000 Operand Usage Related Commands MG Message amp Pass by reference JS Jump to subroutine Examples Add JS SUM 1 2 3 4 5 6 7 8 call subroutine pass values MG_JS print return value EN SUM 7NO a b c d e f g h Sums the values a to h and returns the result 45 E N a b c d e f g h Executed program from programi dmce 36 0000 return sum S th Note For additional examples Variables M Abh ez Ad e St User Manual A g h JS Subroutine Stack section in the DMC 40x0 46 ALAK Lock program Full Description lt control gt L lt control gt K locks user access to
211. tion phase of the specified axis Related Commands BA Brushless Axis BB Brushless Phase Begins BC Brushless Commutation BI Brushless Inputs BM Brushless Modulo BO Brushless Offset BS Brushless Setup BZ 95 Brushless Zero BG Examples 96 BG Begin Full Description The BG command starts a motion on the specified axis or sequence Arguments BG nnnnnnnnnn where nis A B C D E F G H S T M or N or any combination to specify the axis or sequence Usage While Moving Yes Default Value 0 In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _BGn contains a 0 if motion complete on the specified axis or coordinate system otherwise contains a 1 Related Commands AM After Move ST Stop motion Examples PR 2000 3000 5000 Set up for a relative move BG ABD Start the A B and D motors moving HM Set up for the homing BGA Start only the A axis moving JG 1000 4000 Set up for jog BGY Start only the B axis moving BSTATE _BGB Assign a 1 to BSTATE if the B axis is performing a move VP 1000 2000 Specify vector position VS 20000 Specify vector velocity BGS Begin coordinated sequen0ce VMAB Vector Mode VP 4000 1000 Specify vector position 97 VE Vector End PR 8000 5000 Specify C and D position BGSCD Begin sequence and C D motion MG _BGS Displays a 1 if motion occurring on coordinated system gn Hint A BG command canno
212. troller upon a position error TE gt ER is to do nothing more than turn on the red error LED If OE is set to 1 the motor whose position error ER was exceeded will be turned off MO POSERR can be used if the programmer wishes to run code upon a position error for example to notify a host computer The POSERR label causes the statements following to be automatically executed if error on any axis exceeds the error limit specified by ER The error routine must be closed with the RE command The RE command returns from the error subroutine to the main program Arguments Usage While Moving Yes In a Program Yes Command Line No Controller Usage ALL Operand Usage Related Commands OE Off on error TE Tell error ER Error limit Examples A Dummy program JP A 22 TCPERR Ethernet communication error automatic subroutine Full Description The following error see TC occurs when a command such as MG hello EA is sent to a failed Ethernet connection 123 TCP lost sync or timeout This error means that the client on handle A did not respond with a TCP acknowledgement for example because the Ethernet cable was disconnected Handle A is closed in this case TCPERR allows the application programmer to run code for example to reestablish the connection when error 123 occurs Arguments Usage While Moving Yes In a Program Yes Command Line No Operand Usage Related Commands TC Tell
213. ts OUTI n where n is an unsigned integer in the range 1 to 80 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands AN n Read analog input IN n Read digital input SB Set digital output bit CB Clear digital output bit OF Set analog output offset Examples MG OUT 1 print digital output 1 1 0000 x OUT 1 assign digital output 1 to a variable 39 RND n Round Full Description Rounds the given number to the nearest integer Arguments ERNDIn n is a signed number in the range 2147483648 to 2147483647 Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands INT n Truncates to the nearest integer Examples MG RND 1 2 0 MG a z DER zkazil 0 0 0 D 7 0 E E K d sara Wo OU ou z or 00 MG RND 5 5 5 0000 40 SIN n Sine Full Description Returns the sine of the given angle in degrees Arguments SIN n where n is a signed number in degrees in the range of 32768 to 32767 with a fractional resolution of 16 bit Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL Operand Usage Related Commands ASIN n Arc sine COS n Cosine ATAN n Arc tangent ACOS
214. ts that have addr this is the slave address The slave address may be designated or defaulted to the device handle number Note All the formats contain an h parameter This designates the connection handle number A thru H Arguments MBh 1 len array where len is the number of the bytes Array is the name of array containing data MBh addr 1 m n array where m is the starting bit number n is the number of bits array of which the first element will hold result MBh addr 2 m n array where m is the starting bit number n is the number of bits array of which the first element will hold result MBh addr 3 m n array where m is the starting register number 257 n is the number of registers array will hold the response MBh addr 4 m n array where m is the starting register number n is the number of registers array will hold the response MBh addr 5 m n where m is the starting bit number n is O or 1 and represents the coil set to off or on MBh addr 6 m n where m is the register number n is the 16 bit value MBh addr 7 array where array is where the returned data is stored one byte per element MBh addr 15 m n array where m is the starting bit number n is the number of bits array contains the data one byte per element MBh addr 16 m n array where m is the starting register number n is the number of registers array contains the d
215. ull Description VE 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 While Moving Yes Default Value In a Program Yes Default Format PF Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _VEn contains the length of the vector in counts for the specified coordinate system S or T Related Commands VM Vector Mode VS Vector Speed VA Vector Acceleration VD Vector Deceleration CR Circle VP Vector Position 373 BG Begin Sequence CS Clear Sequence Examples FA Program Label VM AB Vector move in AB VP 1000 2000 Linear segment CR 0 90 180 Arc segment VP 0 0 Linear segment VE End sequence BGS Begin motion AMS Wait for VE to execute in buffer N End program E 374 VF Variable Format Full Description The VF command formats the number of digits to be displayed when interrogating the controller 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 unsigne
216. ut Full Description The AI command is a trippoint used in motion programs to wait until after a specified input has changed state This command can be configured such that the controller will wait until the input goes high or the input goes low Arguments AI n where n is an integer between 1 and 96 and represents the input number If n is positive the controller will wait for the input to go high If n is negative it waits for n to go low Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage Related Commands IN n Function to read input 1 through 96 II Input interrupt ININT Label for input interrupt Examples HA 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 BGA 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 69 AL Arm Latch Full Description The AL command enables the latch function high speed main or auxiliary position capture of the controller When the position latch is armed the main or auxiliary encoder position will be captured upon a low going signal Each axis has a position latch and can
217. 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 13 10 48 055 displays carriage return and the characters 0 and 7 264 MO Motor Off Full 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 nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes No argument specifies all axes Usage While Moving No Default Value 0 In a Program Yes Default Format 1 0 Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _MOn contains the state of the motor for the specified axis Related Commands SH Servo Here Examples MO Turn off all motors MOA Turn off the A motor Leave the other motors unchanged MOB Turn off the B motor Leave the other motors unchanged MOCA Turn off the C and A motors Leave the other motors unchanged SH Turn all motors on Bob _MOA Sets Bob equal to the A axis servo status Bob Return value of Bob If 1 in motor off mode If 0 in servo mode Hint The MO command is useful for positioning the motors by hand Turn them back on with the SH command 265 MR Reverse Motion to Position Full Description The MR command is a trippoint used to control the timing of events This command
218. will apply to the selected coordinate system S or T To select the coordinate system use the command CAS or CAT Arguments LM nnnnnnnnnn where nis A B C D E F G or H or any combination to specify the axis or axes n Returns the number of spaces available in the sequence buffer for additional LI commands Usage While Moving Yes Default Value In a Program Yes Default Format Command Line Yes Controller Usage ALL CONTROLLERS Operand Usage _LMn contains the number of spaces available in the sequence buffer for the n coordinate system S or T Related Commands 249 LE Linear end LI Linear Distance VA Vector acceleration VS Vector Speed VD Vector deceleration AV Vector distance CS _CS Sequence counter Examples LM ABCD Specify linear interpolation mode VS 10000 VA 100000 VD 1000000 Specify vector speed acceleration and deceleration LI 200 300 400 500 Specify linear distance LE BGS Last vector then begin motion 250 LS List Full Description The LS command returns a listing of the programs in memory Arguments LS n m where n and m are valid numbers from 0 to 1999 or labels n is the first line to be listed m is the last n is an integer in the range of 0 to 1999 or a label in the program memory n is used to specify the first line to be listed m is an integer in the range of to 1999 or a label on the program memory m is used to specify the last line to be listed Usage
219. xecution 333 SM Subnet Mask Full Description The SM command assigns a subnet mask to the controller All packets sent to the controller whose source IP address is not on the subnet will be ignored by the controller For example for SM 255 255 0 0 and IA 10 0 51 1 only packets from IP addresses of the form 10 0 xxx xxx will be accepted Arguments SM sm0 sml sm2 sm3 or SM n where sm0 sm1 sm2 sm3 are byte numbers 0 to 255 separated by commas and represent the individual fields of the subnet mask n is the subnet mask for the controller which is specified as an integer representing the signed 32 bit number two s complement SM will return the subnet mask of the controller Usage While Moving Yes Default Value SM 0 0 0 0 In a Program Yes Default Format Command Line Yes Operand Usage _SMO contains the subnet mask representing a 32 bit signed number Two s complement Related Commands IH Internet Handle IA IP address Examples SM 255 255 255 255 Ignore all incoming Ethernet packets SM 0 0 0 O Process all incoming Ethernet packets 334 SP Speed Full Description This command sets the slew speed of any or all axes for independent moves Note Negative values will be interpreted as the absolute value Arguments SP n n n n n n n n or SPA n where n is an unsigned even number in the range 0 to 22 000 000 for servo motors The units are encoder counts per second

Download Pdf Manuals

image

Related Search

Related Contents

ヘルメットHDカメラ  LG LFC21770ST Energy Guide  Honda YGFM285827 User's Manual  Kathrein UAS 572 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file