Home
User Manual V2.6.11-22-gb8bc0ad, 2015-11-29
Contents
1. The most important part is to tell LinuxCNC to use gmoccapy editing the DISPLAY section DISPLAY DISPLAY gmoccapy PREFERENCE_FILE_PATH gmoccapy_preferences The line PREFERENCE_FILE_PATH gives the location and name of the preferences file to be used In most cases this line will not be needed it is used by gmoccapy to store your settings of the GUI like themes DRO units colors and keyboard settings etc see SETTINGS for more details Note If no path or file is given gmoccapy will use as default lt your_machinename gt pref if no machine name is given in your INI File it will use gmoccapy pref The file will be stored in your config dir so the settings will not be mixed if you use several configs If you only want to use one file for several machines you need to include PREFERENCE_FILE_PATH in your INI DEFAULT_LINEAR_VELOCITY 166 666 Sets the default linear velocity in machine units per second User Manual V2 6 11 34 gff59490 2015 12 16 48 253 Note If no value is given a value of 15 will be applied If you don t set max linear velocity the default linear velocity will be reduced to the default value max linear velocity 60 If you don t set max velocity in TRAJ it may be reduced as well see TRAY section MAX_LINEAR_VELOCITY 166 666 Sets the v
2. Code Description MO M1 Program Pause M2 M30 Program End M60 Pallet Change Pause M3 M4 M5 Spindle Control M6 Tool Change M7 M8 M9 Coolant Control M19 Orient Spindle M48 M49 Feed amp Spindle Overrides Enable Disable M50 Feed Override Control M51 Spindle Override Control M52 Adaptive Feed Control M53 Feed Stop Control M61 Set Current Tool Number M62 M65 Output Control M66 Input Control M67 Analog Output Control M68 Analog Output Control M70 Save Modal State M71 Invalidate Stored Modal State M72 Restore Modal State M73 Save Autorestore Modal State M100 M199 User Defined M Codes 17 2 MO M1 Program Pause e MO pause a running program temporarily LinuxCNC remains in the Auto Mode so MDI and other manual actions are not enabled Pressing the cycle start button will restart the program at the following line e MI pause a running program temporarily if the optional stop switch is on LinuxCNC remains in the Auto Mode so MDI and other manual actions are not enabled Pressing the cycle start button will restart the program at the following line Note It is OK to program MO and M1 in MDI mode but the effect will probably not be noticeable because normal behavior in MDI mode is to stop after each line of input anyway User Manual V2 6 11 34 gff59490 2015 12 16 204 253 17 3 M2 M30 Program End e M2 end the program Pressing cycle start will start the program a
3. Item RS274NGC USER_M_PATH dirnamel dirname2 dirname3 Example RS274NGC USER_M_PATH nc_files ngcgui_lib mfiles Note Optional needed to locate custom user mfiles Item DISPLAY EMBED_ TAB NAME name to display on embedded tab page Example DISPLAY EMBED_TAB NAME Pyngcgui Note The entries EMBED TAB NAME EMBED TAB COMMAND EMBED TAB LOCATION define an embedded application for several linuxCNC guis Item DISPLAY EMBED_TAB COMMAND programname followed by arguments Example DISPLAY EMBED_ TAB COMMAND gladevcp x XID pyngcgui_axis ui Note For gladevcp applications see the man page for gladevcp Item DISPLAY EMBED_ TAB LOCATION name_of_location Example DISPLAY EMBED_ TAB LOCATION notebook_main Note See example INI files for possible locations Not required for the axis gui Item DISPLAY PROGRAM_PREFIX dirname Example DISPLAY PROGRAM_PREFIX ne_files Note Mandatory and needed for numerous linuxCNC functions It is the first directory used in the search for files item DISPLAY TKPKG Ngcgui version_number Example DISPLAY TKPKG Ngcgui 1 0 Note Required only for axis gui embedding specifies loading of ngcgui axis tab pages Item DISPLAY NGCGUI_FONT font_descriptor Example DISPLAY NGCGUI_FONT Helvetica 12 normal Note Optional font_desc
4. e lt _feed gt Return the current feed value F e lt _rpm gt Return the current spindle speed S e lt _x gt Return current X coordinate Same as 5420 e lt _y gt Return current Y coordinate Same as 5421 e lt _z gt Return current Z coordinate Same as 5422 e lt _a gt Return current A coordinate Same as 5423 e lt _b gt Return current B coordinate Same as 5424 e lt _c gt Return current C coordinate Same as 5425 e lt _u gt Return current U coordinate Same as 5426 e lt _v gt Return current V coordinate Same as 5427 e lt _w gt Return current W coordinate Same as 5428 e lt _current_tool gt Return number of the current tool in spindle Same as 5400 e lt _current_pocket gt Return pocket number of the current tool e lt _selected_tool gt Return number of the selected tool post a T code Default 1 e lt _selected_pocket gt Return number of the selected pocket post a T code Default 1 no pocket selected e lt _value gt Return value from the last O word return or endsub Default value 0 if no expression after return or endsub Initialized to 0 on program start e lt _value_returned gt 1 0 if the last O word return or endsub returned a value O otherwise Cleared by the next O word call e lt _task gt 1 0
5. ngcgui files lt home john emc2 dev nc_files ngcgui_lib utilitysubs in_std ngc nc_files ngcqui_lib db25 n gc gt ngcgui feature line added lt _feature gt 0 ngcgui preamble file home john emc2 dev nc_files ngcgui_lib utilitysubs in_std ngc gl7 xy plane g20 inches g40 cancel cutter radius compensation g49 cancel tool lengthoffset ESTOP No tool i Position Relative Actual User Manual V2 6 11 34 gff59490 2015 12 16 100 253 Chapter 8 Touchy GUI Touchy is a user interface for LinuxCNC meant for use on machine control panels and therefore does not require keyboard or mouse It is meant to be used with a touch screen and works in combination with a wheel MPG and a few buttons and switches Relative Absolute DTG Handwheel x 0 0000 X 0 0000 X 0 0000 Y 0 0000 Te 0 0000 T 0 0000 FO 100 Z 1 2063 Z 0 0000 Z 0 0000 Power SO 100 Estop Reset Machine On Override Limits MV 100 Estop Machine Off Jogging Homing r X Home All Home Selected M Unhome All Unhome Selected Z MDI Manual Auto Status Preferences Startup Figure 8 1 Touchy User Manual V2 6 11 34 gff59490 2015 12 16 101 253 8 1 Panel Configuration 8 1 1 HAL connections Touchy requires that you create a file named touchy hal in your configuration directory the directory your ini file is in to connect 1ts controls Touchy executes the HAL commands in this file af
6. Tool Switch ii pece Machine Vise With the first given tool change the tool will be measured and the offset will be set automatically to fit the block height The advantage of the gmoccapy way is that you do not need a reference tool Note Your program must contain a tool change at the beginning The tool will be measured even it has been used before so there is no danger if the block height has changed There are several videos showing the way to do that on you tube 6 6 1 Tool measurement pins Gmoccapy offers 5 pins for tool measurement purpose The pins are mostly used to be read from a gcode subroutine so the code can react to different values e gmoccapy toolmeasurement HAL_BIT enable or not tool measurement e gmoccapy blockheight HAL_FLOAT the measured value of the top face of the workpiece e gmoccapy probeheight HAL_FLOAT the probe switch height e gmoccapy searchvel HAL_FLOAT the velocity to search for the tool probe switch e gmoccapy probevel HAL_FLOAT the velocity to probe tool length User Manual V2 6 11 34 gff59490 2015 12 16 67 253 6 6 2 Tool Measurement INI File modifications Modify your INI File to include the following The RS274NGC section RS274NGC Enables the reading of INI and HAL values from gcode FEATURES 12 is the sub with is called when a error during tool change happens ON_ABORT_COMMAND 0 lt on_abort gt call The remap code REMAP M6
7. debug in main state now o lt showstate gt call M70 save caller state in at global level O lt imperialsub gt call M72 explicitely restore state debug back in main state now o lt showstate gt call m2 17 22 M73 Save and Autorestore Modal State To save modal state within a subroutine and restore state on subroutine endsub or any return path program M73 Aborting a running program in a subroutine which has an M73 operation will not restore state Also the normal end M2 of a main program which contains an M73 will not restore state The suggested use is at the beginning of a O word subroutine as in the following example Using M73 this way enables designing subroutines which need to modify modal state but will protect the calling program against inadvertant modal changes Note the use of predefined named parameters in the showstate subroutine O lt showstate gt sub DEBUG imperial lt _imperial gt absolute lt _absolute gt feed lt _feed gt rpm lt _rpm gt O lt showstate gt endsub O lt imperialsub gt sub M73 save caller state in current call context restore on return or endsub g20 imperial g91 relative mode F5 low feed S300 low rpm debug in subroutine state now o lt showstate gt call note no M72 is needed her the following endsub or an explicit return will restore caller stat O lt imperialsub gt endsub main program User Manual V2 6
8. l Found at http en wikipedia org wiki Unix_philosophy 07 06 2008 2 Found at http en wikipedia org wiki Unix_philosophy 07 06 2008 User Manual V2 6 11 34 gff59490 2015 12 16 4 253 e Paraphrasing the words of Doug Gwyn on UNIX LinuxCNC was not designed to stop its users from doing stupid things as that would also stop them from doing clever things e Likewise the words of Steven King LinuxCNC is user friendly It just isn t promiscuous about which users it s friendly with User Manual V2 6 11 34 gff59490 2015 12 16 5 253 Chapter 2 LinuxCNC User Introduction 2 1 This Manual The focus of this manual is on using LinuxCNC It is intended to be used once LinuxCNC is installed and configured For standard installations see the Getting Started Guide for step by step instructions to get you up and going For detailed information on installation and configuration of LinuxCNC see the Integrator Manual 2 2 How LinuxCNC Works The Enhanced Machine Controller LinuxCNC is a lot more than just another CNC mill program It can control machine tools robots or other automated devices It can control servo motors stepper motors relays and other devices related to machine tools There are four main components to the LinuxCNC software e a motion controller EMCMOT e a discrete I O controller EMCIO e a task executor which coordinates them EMCTASK e and one of several graphical user interfaces In ad
9. Note After creating a new M7nn file you must restart the GUI so it is aware of the new file otherwise you will get an Unkown m code error The external program named M100 through M199 no extension and a capitol M is executed with the optional P and Q values as its two arguments Execution of the G code file pauses until the external program exits Any valid executable file can be used The file must be located in the search path specificed in the ini file configuration See the ini config section of the Integrators Manual for more information on search paths User Manual V2 6 11 34 gff59490 2015 12 16 213 253 Warning Do not use a word processor to create or edit the files A word processor will leave unseen codes that will cause problems and may prevent a bash or python file from working Use a text editor like Gedit in Ubuntu or Notepad in other operating systems to create or edit the files The error Unknown M code used denotes one of the following e The specified User Defined Command does not exist e The file is not an executable file e The file name has an extension e The file name does not follow this format M1nn where nn 00 through 99 e The file name used a lower case M For example to open and close a collet closer that is controlled by a parallel port pin using a bash script file using M101 and M102 Create two files named M101 and M102 Set them as executable files typically right click properties permi
10. G10 L2 P lt axes R gt e P coordinate system 0 9 e R rotation about the Z axis G10 L2 offsets the origin of the axes in the coordinate system specified to the value of the axis word The offset is from the machine origin established during homing The offset value will replace any current offsets in effect for the coordinate system specified Axis words not used will not be changed Program PO to P9 to specify which coordinate system to change User Manual V2 6 11 34 gff59490 2015 12 16 176 253 Table 16 1 Coordinate System P Value Coordinate G code System 0 Active n a 1 1 G54 2 2 G55 3 3 G56 4 4 G57 5 5 G58 6 6 G59 7 7 G59 1 8 8 G59 2 9 9 G59 3 Optionally program R to indicate the rotation of the XY axis around the Z axis The direction of rotation is CCW as viewed from the positive end of the Z axis All axis words are optional Being in incremental distance mode G91 has no effect on G10 L2 Important Concepts G10 L2 Pn does not change from the current coordinate system to the one specified by P you have to use G54 59 3 to select a coordinate system When a rotation is in effect jogging an axis will only move that axis in a positive or negative direction and not along the rotated axis If a G92 origin offset was in effect before G10 L2 it will continue to be in effect afterwards The coordinate system whose origin is set by a G 0 command may
11. N G8 G17 G21 G40 G49 G54 G64 GB o Sd G90 G91 1 G94 G97 G99 FO 100 3 Program 100 No Program loaded ee R 9 o Y Version 0 2 Nov 2014 i_am_lost halo_world jog_around increment go_to_posi Configuration of User Created Messages Gmoccapy has the ability to create hal driven user messages To use them you need to introduce some lines in the DISPLAY section of the INI file Here is how to set up 3 user popup message dialogs the messages support pango markup language Detailed information about the markup language can be found at Pango Markup MESSAGE_TEXT The text to be displayed may be pango markup formated MESSAGE_TYPE status okdialog yesnodialog MESSAGE_PINNAME is the name of the hal pin group to be created e status Will just display a message as popup window using the messaging system of gmoccapy e okdialog Will hold focus on the message dialog and will activate a waiting Hal_Pin OUT Closing the message will reset the waiting pin e yesnodialog Will hold focus on the message dialog and will activate a waiting Hal_Pin bit OUT it will also give access to an response Hal_Pin Bit Out this pin will hold 1 if the user clicks OK and in all other states it will be 0 Closing the message will reset the waiting pin The response Hal Pin will remain until the dialog is called again User Manual V2 6 11 34 gff59490 2015 12 16 55 253 Example ESSAGE
12. 16 50 G92 Coordinate System Offset G92 axes G92 makes the current point have the coordinates you want without motion where the axis words contain the axis numbers you want All axis words are optional except that at least one must be used If an axis word is not used for a given axis the coordinate on that axis of the current point is not changed When G92 is executed the origins of all coordinate systems move They move such that the value of the current controlled point in the currently active coordinate system becomes the specified value All coordinate system s origins are offset this same distance For example suppose the current point is at X 4 and there is currently no G92 offset active Then G92 x7 is programmed This moves all origins 3 in X which causes the current point to become X 7 This 3 is saved in parameter 5211 Being in incremental distance mode has no effect on the action of G92 G92 offsets may be already be in effect when the G92 is called If this is the case the offset is replaced with a new offset that makes the current point become the specified value It is an error if e all axis words are omitted LinuxCNC stores the G92 offsets and reuses them on the next run of a program To prevent this one can program a G92 1 to erase them or program a G92 2 to remove them they are still stored See the Coordinate System Section for an overview of coordinate systems See the Offsets Section for more
13. 3 and FUP 2 8 2 for example The EXISTS function checks for the existence of a single named parameter It takes only one named parameter and returns 1 if it exists and O if it does not exist It is an error if you use a numbered parameter or an expression Here is an example for the usage of the EXISTS function o lt test gt sub o10 if EXISTS lt _global gt debug _global exists and has the value lt _global gt 010 else debug _global does not exist 010 endif o lt test gt endsub o lt test gt call lt _global gt 4711 o lt test gt call m2 15 11 Repeated Items A line may have any number of G words but two G words from the same modal group may not appear on the same line See the Modal Groups Section for more information A line may have zero to four M words Two M words from the same modal group may not appear on the same line For all other legal letters a line may have only one word beginning with that letter If a parameter setting of the same parameter is repeated on a line 3 15 3 6 for example only the last setting will take effect It is silly but not illegal to set the same parameter twice on the same line If more than one comment appears on a line only the last one will be used each of the other comments will be read and its format will be checked but it will be ignored thereafter It is expected that putting more than one comment on a line will be very rare 15 12 Item order Th
14. In a typical mill you probably want an entry for Z tool length offset In a typical lathe you probably want an entry for X X tool offset and Z Z tool offset In a typical mill using cutter diameter compensation cutter comp you probably also want to add an entry for D cutter diameter In a typical lathe using tool nose diameter compensation tool comp you probably also want to add an entry for D tool nose diameter A lathe also requires some additional information to describe the shape and orientation of the tool So you probably want to have entries for I tool front angle and J tool back angle You probably also want an entry for Q tool orientation A complete description of the lathe entries can be found in the lathe section of the user manual here The Diameter column contains a real number This number is used only if cutter compensation is turned on using this tool If the programmed path during compensation is the edge of the material being cut this should be a positive real number representing the measured diameter of the tool If the programmed path during compensation is the path of a tool whose diameter is nominal this should be a small number positive or negative but near zero representing only the difference between the measured diameter of the tool and the nominal diameter If cutter compensation is not used with a tool it does not matter what number is in this column The Comment column may optionally be used to
15. Otherwise they must appear on covers around the whole aggregate 8 TRANSLATION Translation is considered a kind of modification so you may distribute translations of the Document under the terms of section 4 Replacing Invariant Sections with translations requires special permission from their copyright holders but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections You may include a translation of this License provided that you also include the original English version of this License In case of a disagreement between the translation and the original English version of this License the original English version will prevail 9 TERMINATION You may not copy modify sublicense or distribute the Document except as expressly provided for under this License Any other attempt to copy modify sublicense or distribute the Document is void and will automatically terminate your rights under this License However parties who have received copies or rights from you under this License will not have their licenses terminated so long as such parties remain in full compliance 10 FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new revised versions of the GNU Free Documentation License from time to time Such new versions will be similar in spirit to the present version but may differ in detail to address new problems or concerns See http www g
16. Rok gs hk BOR ae SORE A Ge pe i 203 17 2 MO M1 Program Pange oo nceo a A RE ERA ee eA Ee ae 203 TES M Mat Proscar eo HA ER EY A EA Ew SE RR de 204 Pee MOD Pallet Change PAUSE s ieena he wa ete BRS Ed oe Bho ae odie ERA AN 204 TES M3 Ma MS Spindle Coattel 25 54 see pee eR wR EY ew AEE ERE EES Ea HE ES 204 176 M6 Tool Change o scoe ee ae ee RE RE Se ee BA ee Eee ee ww a 204 17 6 1 Mammal Tool Change osos ee ee a eee eee ae oe a a 204 IG Too CARME e sa oe RE ERR Rae EAS GORA Ro be A eke ak 205 17 7 M7 MB M9 Coolant Control 2 2 4 6 4 es we ww ee SERA hee eS ee bea ES 205 TES NUS rent Spmole s s ec oe Bia eA SOP eR a ee ee e 205 17 9 M48 M49 Speed and Feed Override Control ee 206 TEMO Peed Override Control o so s ke ee w t ia eee ee eb OR Ea a 206 17 11M51 Spindle Speed Override Control 2 ke sv ee e me Tp ee ee ee 206 ERISMIAZ Supl Feed OMe o ed tok eae SS BHR EEA Sew EY Sean es EAS 207 PLASM Feed Stop Conttel escorpio OE RR Ro A Se be eee e 207 PRIMO Set Current Tool Number capos ee ee ew ewe eh DEERE S Abe ee eed 207 TLISM62 to M65 Output Control lt e ses esi ceres ew ae ee ee ee Eee a ee eA Re wa 207 17 IGMOO Vat on Input lt e se pa ER ee ge Da RARE Ba E ea eS Bioe Ra as Palgodk eae 208 17 17M67 Synchronized Analog Output cocoa a Ae ee Aa a 208 User Manual V2 6 11 34 gff59490 2015 12 16 xii TELSNIOS Analog Out s ce ee ee ee RE BR Ee ew eR Re Eee eee eee 8 209 TLISM Save Modal SUE s cop o Ace eae eR i
17. We do hope to fix that in a future release Note The grid will not be shown in perspective view Show DRO Will show the a DRO also in the preview window it will be shown automatically in fullsize preview Show DTG Will show also the DTG direct distance to end point in the preview only if Show DRO is active and not fullsize preview Show Offsets Will show the offsets in the preview window User Manual V2 6 11 34 gff59490 2015 12 16 72 253 Note If you only check this option and leave the others unchecked you will get in fullsize preview a offset page Mouse Button Mode With this combobox you can select the button behavior of the mouse to rotate move or zoom within the preview e left rotate middle move right zoom e left zoom middle move right rotate e left move middle rotate right zoom e left zoom middle rotate right move e left move middle zoom right rotate e left rotate middle zoom right move Default is left move middle zoom right rotate The mouse wheel will still zoom the preview in every mode Tip If you select an element in the preview the selected element will be taken as rotation center point File to load on start up Select the file you want to be loaded on start up In other GUI changing this was very cumbersome because the users where forced to edit the INI File If a file is loaded it can be set by pressing the current button to avoid that any program is loaded at
18. fixed offset in degrees added to M19 R word HAL Pins motion spindle orient angle out float Desired spindle orientation for M19 Value of the M19 R word parameter plus the value of the RS274NGC ORIENT_OFFSET ini parameter motion spindle orient mode out s32 Desired spindle rotation mode Reflects M19 P parameter word Default 0 motion spindle orient out bit Indicates start of spindle orient cycle Set by M19 Cleared by any of M3 M4 MS5 If spindle orient fault is not zero during spindle orient true the M19 command fails with an error message motion spindle is oriented in bit Acknowledge pin for spindle orient Completes orient cycle If spindle orient was true when spindle is oriented was asserted the spindle orient pin is cleared and the spindle locked pin is asserted Also the spindle brake pin is asserted motion spindle orient fault in s32 Fault code input for orient cycle Any value other than zero will cause the orient cycle to abort motion spindle locked out bit Spindle orient complete pin Cleared by any of M3 M4 M5 17 9 M48 M49 Speed and Feed Override Control e M48 enable the spindle speed and feed rate override controls e M49 disable both controls It is OK to enable or disable the controls when they are already enabled or disabled See the Feed Rate Section for more details 17 10 M50 Feed Override Control e M50 lt P1 gt enable the feed rate override control The P1 is optional e M
19. iquad ngc GCGUI_SUBFILE db25 ngc GCGUI_SUBFILE ihex ngc GCGUI_SUBFILE gosper ngc User Manual V2 6 11 34 gff59490 2015 12 16 90 253 specify for a custom tab page NGCGUI_SUBFILE NGCGUI_SUBFILE use when image frame is specified if opening other files is required images will be put in a top level window NGCGUI_OPTIONS NGCGUI_OPTIONS optl opt2 opt items nonew disallow making a new custom tab noremove disallow removing any tab page noauto no auto send makeFile then manually send noiframe no internal image image on separate top level GCMC_INCLUDE_PATH home myname gcmc_includes EPuSlype tracer PREAMBLE an Sue mee PROGRAM_PREFIX A A Clos Note The above is not a complete axis gui INI the items show are those used by ngcgui Many additional items are required by LinuxCNC to have a complete INI file 7 5 4 Truetype Tracer Ngcgui_ttt provides support for truetype tracer v4 It creates an axis tab page which allows a user to create a new ngcgui tab page after entering text and selecting a font and other parameters Truetype tracer must be installed independently To embed ngcgui_ttt in axis specify the following items in addition to ngcgui items Item DISPLAY TKPKG Ngcgui_ttt version_number Example DISPLAY TKPKG Ngcgui_ttt 1 0 Note Mandatory specifies loading of ngcgui_ttt in an axis tab
20. lt c Hl amo User Manual V2 6 11 34 gff59490 2015 12 16 146 253 Table 15 1 continued Letter Meaning X X axis of machine Y Y axis of machine Z Z axis of machine 15 6 Number The following rules are used for explicit numbers In these rules a digit is a single character between 0 and 9 e A number consists of 1 an optional plus or minus sign followed by 2 zero to many digits followed possibly by 3 one decimal point followed by 4 zero to many digits provided that there is at least one digit somewhere in the number e There are two kinds of numbers integers and decimals An integer does not have a decimal point in it a decimal does e Numbers may have any number of digits subject to the limitation on line length Only about seventeen significant figures will be retained however enough for all known applications e A non zero number with no sign as the first character is assumed to be positive Notice that initial before the decimal point and the first non zero digit and trailing after the decimal point and the last non zero digit zeros are allowed but not required A number written with initial or trailing zeros will have the same value when it is read as if the extra zeros were not there Numbers used for specific purposes in RS274 NGC are often restricted to some finite set of values or some to some range of values In many uses decimal numbers must be close to integers
21. on the repetitions Thus if you program L10 you will get 10 cycles The first cycle will be distance X Y from the original location The R and Z positions do not change during the repeats The L number is not sticky In absolute distance mode L gt 1 means do the same cycle in the same place several times Omitting the L word is equivalent to specifying L 1 16 37 4 Retract Mode The height of the retract move at the end of each repeat called clear Z in the descriptions below is determined by the setting of the retract mode either to the original Z position 1f that is above the R position and the retract mode is G98 OLD_Z or otherwise to the R position See the G98 G99 Section 16 37 5 Canned Cycle Errors It is an error if e axis words are all missing during a canned cycle axis words from different groups XYZ UVW are used together a P number is required and a negative P number is used an L number is used that does not evaluate to a positive integer rotary axis motion is used during a canned cycle inverse time feed rate is active during a canned cycle or cutter compensation is active during a canned cycle If the XY plane is active the Z number is sticky and it is an error if e the Z number is missing and the same canned cycle was not already active e or the R number is less than the Z number If other planes are active the error conditions are analogous to the XY conditions above 16 37 6 Prelimina
22. this includes the values of indexes for parameters and carousel slot numbers for example M codes and G codes multiplied by ten A decimal number which is supposed be close to an integer is considered close enough if it is within 0 0001 of an integer 15 7 Parameters The RS274 NGC language supports parameters what in other programming languages would be called variables There are several types of parameter of different purpose and appearance each described in the following sections The only value type supported by parameters is floating point there are no string boolean or integer types in G code like in other programming languages However logic expressions can be formulated with boolean operators AND OR XOR and the comparison operators EO NE GT GE LT LE and the MOD ROUND FUP and FIX operators support integer arithmetic Parameters differ in syntax scope behavior when not yet initialized mode persistence and intended use Syntax There are three kinds of syntactic appearance e numbered 4711 e named local lt localvalue gt e named global lt _globalvalue gt Scope The scope of a parameter is either global or local within a subroutine Subroutine parameters and local named variables have local scope Global named parameters and numbered parameters starting from number 31 are global in scope RS274 NGC uses lexical scoping in a subroutine only the local variables defined therein and any global variables are
23. 11 34 gff59490 2015 12 16 212 253 g21 metric g90 absolute 200 fast speed 2500 high rpm debug in main state now o lt showstate gt call o lt imperialsub gt call debug back in main state now o lt showstate gt call m2 17 22 1 Selectively restoring modal state by testing predefined parameters Executing an M72 or returning from a subroutine which contains an M73 will restore all modal state saved If only some aspects of modal state should be preserved an alternative is the usage of predefined named parameters local parameters and conditional statements The idea is to remember the modes to be restored at the beginning of the subroutine and restore these before exiting Here is an example based on snippet of nc_files tool length probe ngc O lt measure gt sub measure reference tool lt absolute gt lt _absolute gt remember in local variable if G90 was set F g30 above switch g38 2 z0 f15 measure gol giz 2 Ore elle Sein 1000 5063 save reference tool length print reference length is 1000 r O lt restore_abs gt if lt absolute gt g90 restore G90 only if it was set on entryi O lt restore_abs gt endif i O lt measure gt endsub 17 23 M100 to M199 User Defined Commands M1 lt P Q gt e MI an integer in the range of 100 199 e P a number passed to the file as the first parameter e Q a number passed to the file as the second parameter
24. 26 245 tkLinuxCNC 103 TkLinuxCNC GUI 103 Tool Compensation 137 Tool Touch Off 30 Tool Table Format 138 Touch Off 137 Touchy GUI 100 Trajectory Control 17 186 Traverse Move 245 U units 128 245 User Manual V2 6 11 34 gff59490 2015 12 16 253 253 Unsigned Integer 245 User Concepts 17 User Defined Commands M100 M199 212 User Foreword 3 vV Virtual Control Panel 42 W while 215 Word 145 world coordinates 245
25. 3 4 Automatic control 9 3 4 1 Buttons for control The buttons in the lower part of TkLinuxCNC are used to control the execution of a program Open to load a program Verify to check it for errors Run to start the actual cutting Pause to stop 1t while running Resume to resume an already paused program Step to advance one line in the program and Optional Stop to toggle the optional stop switch if the button is green the program execution will be stopped on any M1 encountered Program fhome uvefemc2inc_files 3D_Chips ngc Status idle Open Run Pause Resume Step Verify Optional Stop N6871Y56 061 2 28 146 N6661 Y56 1052 27 694 N6691Y56 112 27 638 N6901Y56 1282 27 634 6911 G0Z10 N6931 M9 Figure 9 2 TkLinuxCNC Interpreter program control 9 3 4 2 Text Program Display Area When the program is running the line currently being executed is highlighted in white The text display will automatically scroll to show the current line 9 3 5 Manual Control 9 3 5 1 Implicit keys TkLinuxCNC allows you to manually move the machine This action is known as jogging First select the axis to be moved by clicking it Then click and hold the or button depending on the desired direction of motion The first four axes can also be moved by the keyboard arrow keys X and Y the PAGE UP and PAGE DOWN keys Z and the and keys A 4th If Continuous is selected the motion will continue as long as the button or key is pressed
26. 4 ngcgui preamble file home john emc2 dev nc_files ngcgui_lib utilitysubs in_std ngc 5 gl7 xy plane 6 g20 inches AN noma ASAS AAA AAA eee Z on Tool 1 offset 0 511 diameter 0 125 Position Relative Actual This photo shows the backplot of the DB25 subroutine User Manual V2 6 11 34 gff59490 2015 12 16 98 253 File Machine View Help OD ele s Uja s IZ N IX yje elb Manual Control F3 MDI F5 Preview DRO simp xyz iquad db25 ihex gosper Custom ttt Axis X Y Z 5 5090 A _ Continuous y 2 4038 0 2000 0 0000 _Home All Touch Off Feed Override 100 Jog Speed 16 in min ul Max Velocity 72 in min t ste 0 2 3 8 zstart 0 9 xctr 5 10 ytop 2 11 rotate o lt db25 gt call 1 2000 2 10 1 02 0 2 0 5 2 90 ngcgui m2 line added m2 g54 activated N ON Tool 1 offset 0 511 diameter 0 125 Position Relative Actual This photo shows the use of the new button and the custom tab to create three DB25 cutouts in one program User Manual V2 6 11 34 gff59490 2015 12 16 99 253 File Machine View Help Oole a IZ N IX Ye Gl Manual Control F3 MDI F5 Preview DRO simp xyz iquad db25 ihex gosper db25 1 ttt db25 2 Axis SE _Home All Feed Override 100 Jog Speed 16 in min Max Velocity 72 in min ngcgui FEATURE 110701 06 36 13
27. AXIS ri ESTOP No tool Position Relative Actual Figure 2 5 NGCGUI GUI embedded into Axis e Mini a Tcl Tk based GUI User Manual V2 6 11 34 gff59490 2015 12 16 Program View Settings Info Editor Backplot Tools M Offsets Help MANUAL MDI X 2 9 500 l X Y X Z Y Z 3D Hide Setup Y 6 050 213 378 Feed Override 100 MESSAGES 1 Program file is home john emc2 dev3 nc_files 3D_ Chips ngc N9171Y lt yscale gt 7 237 Z lt zscale gt 15 482 N9181Y lt yscale gt 6 237 Z lt zscale gt 13 677 scale gt 4 737 Z lt zscale gt 11 229 9201Y lt yscale gt 4 237 2Z zscale gt 10 475 N9211Y lt yscale gt 3 237 Z lt zscale gt 9 204 N9221Y lt yscale gt 2 737 Z lt zscale gt 8 696 N9231Y lt yscale gt 2 237 Z lt zscale gt 8 264 Figure 2 6 The Mini GUI TkLinuxCNC a Tcl Tk based GUI User Manual V2 6 11 34 gff59490 2015 12 16 12 253 X0 0000 Y0 0000 Z0 0000 X 0 0000 Y 0 0000 Z 0 0000 1 100 100 Optional Stop Figure 2 7 The TkLinuxCNC GUI a Character based screen graphics program suitable for minimal installations without the X server running User Manual V2 6 11 34 gff59490 2015 12 16 13 253 Fi Estop On Off FS HDI Mode F9 Spndl Fud OFF ESC Aborts Actions F2 Machine On Off F Reset Interp Fi Spndl Rev OFF TAB Selects Params FS Manual Mode FF Mist On Off H Sprd Decrease END Quits
28. Auto mode does not normally display the active or modal codes If the operator wishes to check these use menu Info Active_G Codes This will write all modal codes onto the message scratch pad User Manual V2 6 11 34 gff59490 2015 12 16 114 253 If abort or estop is pressed during a run a set of buttons will display to the right of the text that allow the operator to shift the restart line forward or backward If the restart line is not the last active line it will be highlighted as white letters on a blue background Caution a very slow feed rate and a finger poised over the pause button is advised during any program restart From the Sherline CNC Operators Manual The real heart of CNC machine tool work is the auto mode Sherline s auto mode displays the typical functions that people have come to expect from LinuxCNC Along the top are a set of buttons which control what is happening in auto mode Below them is the window that shows the part of the program currently being executed As the program runs the active line shows in white letters on a red background The first three buttons Open Run and Pause do about what you d expect Pause will stop the run right where it is The next button Resume will restart motion They are like feedhold if used this way Once Pause is pressed and motion has stopped Step will resume motion and continue it to the end of the current block Press Step again to get the motion of t
29. Blend Without Tolerance Mode G64 is the default setting when you start LinuxCNC G64 is just blending and the naive cam detector is not enabled G64 and G64 PO tell the planner to sacrifice path following accuracy in order to keep the feed rate up This is necessary for some types of material or tooling where exact stops are harmful and can work great as long as the programmer is careful to keep in mind that the tool s path will be somewhat more curvy than the program specifies When using GO rapid moves with G64 use caution on clearance moves and allow enough distance to clear obstacles based on the acceleration capabilities of your machine G64 P Q Blend With Tolerance Mode This enables the naive cam detector and enables blending with a tolerance If you program G64 P0 05 you tell the planner that you want continuous feed but at programmed corners you want it to slow down enough so that the tool path can stay within 0 05 user units of the programmed path The exact amount of slowdown depends on the geometry of the programmed corner and the machine constraints but the only thing the programmer needs to worry about is the tolerance This gives the programmer complete control over the path following compromise The blend tolerance can be changed throughout the program as necessary Beware that a specification of G64 PO has the same effect as G64 alone above which is necessary for backward compatibility for old G Code programs See the G Code Ch
30. CNC LinuxCNC is selected The Configuration Selector offers a selection of configurations organized My Configurations User configurations Sample Configurations Sample configurations that can be copied to My Configurations sim simulation configurations These can be used for testing or learning by_interfac configurations organized by interface by_machin configurations organized by machine apps applications that do not require starting linuxcnc but may be useful for testing or trying applications like pyvcp or gladevcp attic obsolete or historical configurations The sim configurations are often the most useful starting point for new users and are organized around supported guis axis gmoccapy gscreen low_graphics tklinuxcne touchy A gui configuration directory may contain subdirectories with configurations that illustrate special situations or the embedding of other applications The by_interface configurations are organized around common supported interfaces like general mechatronics mesa parport User Manual V2 6 11 34 gff59490 2015 12 16 25 253 pico pluto servotogo vigilant vitalsystems Related hardware may be required to use these configurations as starting points for a system The by_machine configurations are organized around complete known systems like boss cooltool sherline smithy tormach A complete system may be required to use these confi
31. Coordinate lt se ce est dy eek e ae ae ede ea RA a eo 20 3 5 2 134 393 User Coordinates 2 oo po socors maa a a e G e 20 WIS Win AUS LA seio A E A AA AE A AA oy 20 3 6 Machine Configurations occ ee A A AA EEA Ea ee a 20 User Manual V2 6 11 34 gff59490 2015 12 16 iii I User Interfaces 23 4 CONFIGURATION SELECTOR 24 5 AXIS GUI 26 24 TATOJUCHON 20000000 bee ee EEG Se eee ee ee he ee Oe e E eee ee 26 oe ARIAS HNO oc ted AAG Be he ee Be ap he AAA a te eyes ee oe Bee oe E 27 321 A Typreal SESSION e o bee Ph A eee ed dA ae eb eG Ae ee 27 Sa ANG DIPA soo a E R ea A eee ee GR ee oe 28 emul e AR NR Aes Ghar deh SG amp k 28 Sie Toolbar Duong o a ece 44 342 48 bebe Sha eee ed dA ae we eee Aa ee ee 31 Has Cabaphical Diploma E A Se Dae A e E SR ee E 32 S34 West Display Aled oso ee Pa ee ea AO OURS Bae ae EG wale Se we 34 32 MantalContel cs eec rs 4a 488 ode eee Ea AA ee ee a ee HO 34 Dae BD oo aca a os SR ee ee e Be EO ale amp ee ee E 36 Sout Peed Overnde ooo A ee ae AO eae a Ee wae Sos 36 3 38 Spindle Speed Overrid 0 644488 bs eA ee Ta eA Ae eee a ee 37 220 JOP Speed a 4 eo eee es SA ee ee Se eae Ee Pa ER A 37 Sol MOS VEGI IA O oO oe 37 oo Mecbesri Gaia 26 e ea a bo eka eee ikast heen eee eee hd beac eee ek 31 59 Show LinuxCNC Status UDURCHCIO_ N lt s goca 446 6 GA eS e 38 S50 MDI MEE os ao ke eR REEDS DA aA Ba PR SR bop Rael A a alge a 39 Ot SPO AS ee eRe ean ee ewe Re es hbo eee s 3 39 50 Manual To
32. Display F4 Auto Mode FB Flood On Off Fi Sprdl Increase 7 Toggles Help MANUAL SPINDLE STOPPED HOMED Overrides 100 LUBE OFF BRAKE ON SELECTED Tool LUBE Ok MIST OFF Speed 60 0 Offsets 00000 FLOOD OFF Ince continuous P Relative Act Post 00000 O 0000 0 0000 O 0000 SS EMC HAL SIM KEYSTICK EMC Version Figure 2 8 The Keystick GUI e Xemc an X Windows program A simulator configuration of Xemc can be ran from the configuration picker e halui a HAL based user interface which allows to control LinuxCNC using knobs and switches See the Integrators manual for more information on halui e linuxcncrsh a telnet based user interface which allows commands to be sent to LinuxCNC from remote computers 2 4 Virtual Control Panels e PyVCP a python based virtual control panel that can be added to the Axis GUI or be stand alone User Manual V2 6 11 34 gff59490 2015 12 16 14 253 File Machine View Help GOID gt gt ujan 1z Nx lr al THC Enable THC Settings Vel Tolerance 0 20 Volts Setting 1 Volts Tolerance 2 0 Arc Volts Status Under OK Over Manual Control F3 MDI F5 Preview DRO Axis ex alh Lale lale me ae Spindle Y Status Velocity Arc Offset HE EE 0 0000 Actual Volts Feed Override 100 zi Jog Speed 60 in min Max Velocity 420 in min MDI Commands Rapid to Home ESTOP Noto Position Relative Actual Figure 2 9
33. Exit Move Lead In Move Tool Figure 14 4 Outside Profile Compensated tool path User Manual V2 6 11 34 gff59490 2015 12 16 143 253 G20 Inch Mode 3 F30 Set Feed Rote 610 L1 P1 R 25 Zi Set Tool Table T1 M Load the Tool 3 GO ZO Move to safe Z height G41 Start Cutter Comp Left X4 Y3 Rapid ta start point G1 X5 Z 1 Move to cut height gt G3 X6 Y4 Ji Are into cut path G1 Y6 Cut Profile X2 Y2 xE Y4 G3 X5 Y5 I 1 Are out of cut path GO ZO Move cutter to safe Z height 640 Stop Cutter Comp Compensated GO X1 Y1 Move to safe position Cut Path TO M Remove Tacl gt M2 End Program Part Profile Rapid Mave Figure 14 5 Inside Profile User Manual V2 6 11 34 gff59490 2015 12 16 144 253 Chapter 15 G Code Overview 15 1 Overview The LinuxCNC G Code language is based on the RS274 NGC language The G Code language is based on lines of code Each line also called a block may include commands to do several different things Lines of code may be collected in a file to make a program A typical line of code consists of an optional line number at the beginning followed by one or more words A word consists of a letter followed by a number or something that evaluates to a number A word may either give a command or provide an argument to a command For example G X3 is a valid line of code with two words G is a command meanin
34. G96 D2500 S250 set CSS with a max rpm of 2500 and a surface speed of 250 It is an error if S is not specified with G96 A feed move is specified in G96 mode while the spindle is not turning User Manual V2 6 11 34 gff59490 2015 12 16 202 253 16 55 G98 G99 Canned Cycle Return Level e G9S retract to the position that axis was in just before this series of one or more contiguous canned cycles was started e G99 retract to the position specified by the R word of the canned cycle Program a G98 and the canned cycle will use the Z position prior to the canned cycle as the Z return position if it is higher than the R value specified in the cycle If it is lower the R value will be used The R word has different meanings in absolute distance mode and incremental distance mode G98 Retract to Origin COMA NZS O TES Cei KA VO AOG RLE TO The G98 to the second line above means that the return move will be to the value of Z in the first line since it is higher that the R value specified The initial G98 plane is reset any time cycle motion mode is abandoned whether explicitly G80 or implicitly any motion code that is not a cycle Switching among cycle modes say G81 to G83 does NOT reset the initial plane It is possible to switch between G98 and G99 during a series of cycles User Manual V2 6 11 34 gff59490 2015 12 16 203 253 Chapter 17 M Codes 17 1 M Code Quick Reference Table
35. Group 0 G4 G10 G28 G30 G53 G92 G92 1 G92 2 G92 3 Motion Group 1 GO G1 G2 G3 G33 G38 x G73 G76 G80 G81 G82 G83 G84 G85 G86 G87 G88 G89 Plane selection Group 2 G17 G18 G19 G17 1 G18 1 G19 1 Distance Mode Group 3 G90 G91 Arc IJK Distance Mode Group 4 G90 1 G91 1 Feed Rate Mode Group 5 G93 G94 G95 Units Group 6 G20 G21 Cutter Diameter Compensation Group 7 G40 G41 G42 G41 1 G42 1 User Manual V2 6 11 34 gff59490 2015 12 16 158 253 Table 15 4 continued Modal Group Meaning Member Words Tool Length Offset Group 8 G43 G43 1 G49 Canned Cycles Return Mode Group 10 G98 G99 Coordinate System Group 12 G54 G55 G56 G57 G58 G59 G59 1 G59 2 G59 3 Control Mode Group 13 G61 G61 1 G64 Spindle Speed Mode Group 14 G96 G97 Lathe Diameter Mode Group 15 G7 G8 Table 15 5 M Code Modal Groups Modal Group Meaning Member Words Stopping Group 4 MO M1 M2 M30 M60 T O on off Group 5 M6 Tn Tool Change Group 6 M6 Tn Spindle Group 7 M3 M4 M5 Coolant Group 8 M7 M8 can both be on M9 Override Switches Group 9 M48 M49 User Defined Group 10 M100 M199 For several modal groups when a machining center is ready to accept commands one member of the group must be in effect There are default settings for these modal groups When the machining center is turned on or otherwise
36. MDI because some Manual commands like Touch Off are actually implemented by sending MDI commands It does this by automatically changing to the mode that is needed for the action the user has requested User Manual V2 6 11 34 gff59490 2015 12 16 17 253 Chapter 3 Important User Concepts This chapter covers important user concepts that should be understood before attempting to run a CNC machine with g code 3 1 Trajectory Control 3 1 1 Trajectory Planning Trajectory planning in general is the means by which LinuxCNC follows the path specified by your G Code program while still operating within the limits of your machinery A G Code program can never be fully obeyed For example imagine you specify as a single line program the following move Gl X1 F10 Gl is linear move Xl is the destination F10 is the speed In reality the whole move can t be made at F10 since the machine must accelerate from a stop move toward X 1 and then decelerate to stop again Sometimes part of the move is done at F10 but for many moves especially short ones the specified feed rate is never reached at all Having short moves in your G Code can cause your machine to slow down and speed up for the longer moves if the naive cam detector is not employed with G64 Pn The basic acceleration and deceleration described above is not complex and there is no compromise to be made In the INI file the specified machine constraints such as maximum axis
37. PyVCP with Axis e GladeVCP a glade based virtual control panel that can be added to the Axis GUI or be stand alone User Manual V2 6 11 34 gff59490 2015 12 16 15 253 mM axis ngc AXIS 2 5 0 pre auf Fraese Klippfeld K12 simuliert Datei Maschine Ansicht eo a gt nmu 12 N ax e S d Spindle Corner Angle X Y Z Hole Test Manuele Kontrolie F3 sot FS Vorschau DRO Camera Gladevcr Spindie chee Ex r r Modbus VED online C AL speed onine 3 button Oc brake mual Spindle RPM O VFDHz 0 0 0 0 3500 0 0 2000 Gear ber position top middie bottom VorschubUbersteuerung 100s _ o Schettgesxchwindigket 1823 mnymin EE JN 59 Maximale Geschwindigkeit 720 mm min I j AE AXIS splash g code Not intended for actual silling 2 joypad max jog on To run this code anyway you sight have to Tewch Off the Z axis 400 depending on your setup As if yeu had sose eaterial in your e111 Mint jog the Z axis dem a bit then touch off Also press the Toggle Skip Lines with to see that part Limit switches If the progras is too big or small for your sachine change the scale 3 x 0 20 2 0 font usr share fonts truetype t reefont FreeSeri tBelditalic ttt text EMCIAAXIS f Kein Werkzeug Position relativ aktuel Figure 2 10 GladeVCP with Axis See the Integrators manual for more information on Virtual Control Panels 2 5 Languages LinuxCNC uses trans
38. Run the program Note To run the same program again depends on your setup and requirements You might need to load more material and set offsets or move over and set an offset then run the program again If your material is fixtured then you might need to only run the program again See the Machine Menu for more information on the run command 5 3 AXIS Display The AXIS window contains the following elements e A display area that shows one of the following a preview of the loaded file in this case axis ngc as well as the current location of the CNC machine s controlled point Later this area will display the path the CNC machine has moved through called the backplot a large readout showing the current position and all offsets e A menu bar and toolbar that allow you to perform various actions Manual Control Tab which allows you to make the machine move turn the spindle on or off and turn the coolant on or off if included in the ini file MDI Tab where G code programs can be entered manually one line at a time This also shows the Active G Codes which shows which modal G Codes are in effect Feed Override which allows you to scale the speed of programmed motions The default maximum is 120 and can be set to a different value in the ini file See the Integrator Manual for more information on this setting Spindle Override which allows you to scale the spindle speed up or down Jog Speed which allo
39. See the Integrator s Manual Core Components Section Motion subsection for more information Note M67 will not function unless the appropriate motion analog out nn pins are connected in your hal file to outputs 17 18 M68 Analog Output MOG m O e M68 set an analog output immediately e E output number ranging from 0 to 3 e Q is the value to set set to O to turn off M68 output happen immediately as they are received by the motion controller They are not synchronized with movement and they will break blending M68 functions the same as M64 65 The number of I O can be increased by using the num_dio or num_aio parameter when loading the motion controller See the Integrator s Manual Core Components Section Motion subsection for more information Note M68 will not function unless the appropriate motion analog out nn pins are connected in your hal file to outputs 17 19 M70 Save Modal State To explicitly save the modal state at the current call level program M70 Once modal state has been saved with M70 it can be restored to exactly that state by executing an M72 A pair of M70 and M72 instructions will typically be used to protect a program against inadvertant modal changes within subroutines The state saved consists of current G20 G21 settings imperial metric selected plane G17 G18 G19 G17 1 G18 1 G19 1 status of cutter compensation G40 G41 G42 G41 1 G42 1 distance mode relati
40. VAR file that is requested by the INI file during the startup of an LinuxCNC In our example below we ll use G55 The values for each axis for G55 are stored as variable numbers Variable Value 5241 0 000000 5242 0 000000 5243 0 000000 5244 0 000000 5245 0 000000 5246 0 000000 In the VAR file scheme the first variable number stores the X offset the second the Y offset and so on for all six axes There are numbered sets like this for each of the fixture offsets Each of the graphical interfaces has a way to set values for these offsets You can also set these values by editing the VAR file itself and then restarting LinuxCNC so that the LinuxCNC reads the new values however this is not the recommended way G10 G92 G28 1 etc are better ways to affect variables For our example let s directly edit the file so that G55 takes on the following values Variable Value 5241 2 000000 5242 1 000000 5243 2 000000 5244 0 000000 5245 0 000000 5246 0 000000 You should read this as moving the zero positions of G55 to X 2 units Y 1 unit and Z 2 units away from the absolute zero position User Manual V2 6 11 34 gff59490 2015 12 16 133 253 Once there are values assigned a call to G55 in a program block would shift the zero reference by the values stored The following line would then move each axis to the new zero position Unlike G53 G54 through G59 3 are moda
41. Velocity 72 in min EEJ GUL A ZL 1 4 Y LU 0 L1NeTO 39 GOl X 98 3 5 Y 0 3 6 lineto GOl X 98 23 85 Y 102 3 6 lineto G3 X 29 9645 3 5 Y 114 9024 3 6 R 1100 7342 3 G3 X 36 5000 3 5 Y 134 0000 3 6 R 567 9238 23 G3 X 81 5487 3 5 Y 153 0590 3 6 R 411 1467 3 15 G3 X 154 8636 23 85 Y 217 2743 3 6 R 176 9183 3 G3 X 179 7500 43 45 Y 260 7500 3 6 R 405 6030 3 mm stane eames 1 mm mem Ll mms ON No tool Position Relative Actual Figure 5 3 Current and Selected Lines 5 3 5 Manual Control While the machine is turned on but not running a program the items in the Manual Control tab can be used to move the machine or control its spindle and coolant User Manual V2 6 11 34 gff59490 2015 12 16 35 253 When the machine is not turned on or when a program is running the manual controls are unavailable Many of the items described below are not useful on all machines When AXIS detects that a particular pin is not connected in HAL the corresponding item in the Manual Control tab is removed For instance if the HAL pin motion spindle brake is not connected then the Brake button will not appear on the screen If the environment variable AXIS_NO_AUTOCONFIGURE is set this behavior is disabled and all the items will appear The Axis group Axis allows you to manually move the machine This action is known as jogging First select the axis to be moved by clicki
42. Y axis pointing up G2 G3 Arc directions are based on the axis they rotate around In the case of lathes 1t is the imaginary Y axis If the Y axis points toward the floor you have to look up for the arc to appear to go in the correct direction So looking from above you reverse the G2 G3 for the arc to appear to go in the correct direction 21 6 2 Radius Diameter Mode When calculating arcs in radius mode you only have to remember the direction of rotation as it applies to your lathe When calculating arcs in diameter mode X is diameter and the X offset I is radius even if you re in G7 diameter mode 21 7 Tool Path 21 7 1 Control Point The control point for the tool follows the programmed path The control point is the intersection of a line parallel to the X and Z axis and tangent to the tool tip diameter as defined when you touch off the X and Z axes for that tool When turning or facing straight sided parts the cutting path and the tool edge follow the same path When turning radius and angles the edge of the tool tip will not follow the programmed path unless cutter comp is in effect In the following figures you can see how the control point does not follow the tool edge as you might assume Contralor Tool Tip Radius Figure 21 4 Control Point User Manual V2 6 11 34 gff59490 2015 12 16 230 253 21 7 2 Cutting Angles without Cutter Comp Now imagine we program a ramp without cutter comp The programmed
43. YO and ZO you would use G92 X0 YO Z0 G92 does not work from absolute machine coordinates It works from current location G92 also works from current location as modified by any other offsets that are in effect when the G92 command is invoked While testing for differences between work offsets and actual offsets it was found that a G54 offset could cancel out a G92 and thus give the appearance that no offsets were in effect However the G92 was still in effect for all coordinates and did produce expected work offsets for the other coordinate systems It is a good practice to clear the G92 offsets at the end of their use with G92 1 or G92 2 When starting up LinuxCNC if any offsets are in the G92 variables they will be applied when an axis is homed 13 4 2 Setting G92 values There are at least two ways to set G92 values e right mouse click on position displays of tkLinuxCNC will popup a window into which you can type a value the G92 command Both of these work from the current location of the axis to which the offset is to be applied Issuing G92 X Y ZA B C U V W does in fact set values to the G92 variables such that each axis takes on the value associated with its name These values are assigned to the current position of the machine axis These results satisfy paragraphs one and two of the NIST document G92 commands work from current axis location and add and subtract correctly to give the current axis position the value assigned b
44. a lathe 3 2 3 Tool Radius Offset Tool Radius Offset G41 42 requires that the tool be able to touch somewhere along each programmed move without gouging the two adjacent moves If that is not possible with the current tool diameter you will get an error A smaller diameter tool may run without an error on the same path This means you can program a cutter to pass down a path that is narrower than the cutter without any errors See the Cutter Compensation Section for more information 3 3 Homing After starting LinuxCNC each axis must be homed prior to running a program or running a MDI command If your machine does not have home switches a match mark on each axis can aid in homing the machine coordinates to the same place each time Once homed your soft limits that are set in the ini file will be used If you want to deviate from the default behavior or want to use the Mini interface you will need to set the option NO_FORCE_HOMING 1 in the TRAJ section of your ini file More information on homing can be found in the Integrator Manual 3 4 Tool Changes There are several options when doing manual tool changes See the EMCIO section of the Integrator Manual for information on configuration of these options Also see the G28 and G30 section of the User Manual User Manual V2 6 11 34 gff59490 2015 12 16 20 253 3 5 Coordinate Systems The Coordinate Systems can be confusing at first Before running a CNC machine you must un
45. and more For more information see the Integrator Manual User Manual V2 6 11 34 gff59490 2015 12 16 43 253 5 11 7 Axis Preview Control Special comments can be inserted into the G Code file to control how the preview of AXIS behaves In the case where you want to limit the drawing of the preview use these special comments Anything between the AXIS hide and AXIS show will not be drawn during the preview The AXIS hide and AXIS show must be used in pairs with the AXIS hide being first Anything after a AXIS stop will not be drawn during the preview These comments are useful to unclutter the preview display for instance while debugging a larger g code file one can disable the preview on certain parts that are already working OK e AXIS hide Stops the preview must be first e AXIS show Resumes the preview must follow a hide e AXIS stop Stops the preview from here to the end of the file e AXIS notify the_text Displays the_text as an info display This display can be useful in the Axis preview when debug message comments are not displayed User Manual V2 6 11 34 gff59490 2015 12 16 44 253 Chapter 6 gmoccapy 6 1 Introduction GMOCCAPY is a GUI for linuxcnc designed to be used with a touch screen but can also be used on normal screens with a mouse or hardware buttons and MPG wheels as it presents HAL Pins for the most common needs Please find more information in the following It offers
46. as the linear machine units See G20 and G21 for more information The angular program units are always measured in degrees Python General purpose very high level programming language Used in LinuxCNC for the Axis GUI the Stepconf configuration tool and several G code programming scripts Rapid Fast possibly less precise motion of the tool commonly used to move between cuts If the tool meets the workpiece or the fixturing during a rapid it is probably a bad thing Rapid rate The speed at which a rapid motion occurs In auto or mdi mode rapid rate is usually the maximum speed of the machine It is often desirable to limit the rapid rate when testing a g code program for the first time Real time Software that is intended to meet very strict timing deadlines Under Linux in order to meet these requirements it is necessary to install a realtime kernel such as RTAI and build the software to run in the special real time environment For this reason real time software runs in kernel space RTAI Real Time Application Interface see https www rtai org the real time extensions for Linux that LinuxCNC can use to achieve real time performance RTLINUX See https en wikipedia org wiki RTLinux an older real time extension for Linux that LinuxCNC used to use to achieve real time performance Obsolete replaced by RTAI RTAPI A portable interface to real time operating systems including RTAI and RTLINUX RS 274 NGC The formal name for
47. asking for parameters like User Manual V2 6 11 34 gff59490 2015 12 16 57 253 go_to_position X pos Y pos Z pos The parameters must be separated by spaces This calls a file go_to_position ngc with the following content Testfile go to position will jog the machine to a given position O lt go_to_position gt sub ily G21 G54 G61 G40 G49 G80 G90 1 lt X Pos gt 7 2 lt Y Pos gt 3 lt Z Pos gt lt ll 2 N ll DBG Will now move machine to X 1 3 GO X 1 Y 2 Z 3 O lt go_to_position gt endsub M2 after pushing the execute macro button you will be asked to enter the values for X pos Y pos Z pos and the macro will only run if all values have been given User Manual V2 6 11 34 gff59490 2015 12 16 58 253 gt gt gt gt o gmoccapy for linuxcnc 1 4 0 Set parameter X pos to 12 345 r i 4 IX LY Z H J Tool information 1 2 3 Spindle rpm Tool no Diameter offset z 4 o o O 0 S 3500 100 as No tool description availa G Code Abbrechen OK 100 MO M5 M9 M45 M53 G8 G17 G21 G40 G49 G54 G64 G80 s o 8 G90 G91 1 G94 G97 G99 FO 100 B Program 100 No Program loaded o 0 6000 O iam_lost halo_worid jog_around increment go to posi 6 4 4 The TRAJ Section MAX_VELOCITY 230 000 Sets the maximal velocity of the machine this value will also take influence to default velocity 6 5 HAL Pins gmoccapy exports several ha
48. bar for various offset related displays e Coordinate display area e A set of sliders which control Jogging speed Feed Override and Spindle speed Override which allow you to increase or decrease those settings e Manual data input text box MDI e Status bar display with active G codes M codes F and S words e Interpreter related buttons e A text display area that shows the G code source of the loaded file For some of these actions it might be necessary to change the mode LinuxCNC is currently running in User Manual V2 6 11 34 gff59490 2015 12 16 105 253 9 3 1 Main buttons From left to right the buttons are e Machine enable ESTOP gt ESTOP RESET gt ON e Toggle mist coolant e Decrease spindle speed e Set spindle direction SPINDLE OFF gt SPINDLE FORWARD SPINDLE REVERSE e Increase spindle speed Abort then on the second line e Operation mode MANUAL gt MDI gt AUTO e Toggle flood coolant e Toggle spindle brake control 9 3 2 Offset display status bar The Offset display status bar displays the currently selected tool selected with Txx M6 the tool length offset if active and the work offsets set by right clicking the coordinates 9 3 3 Coordinate Display Area The main part of the display shows the current position of the tool The color of the position readout depends on the state of the axis If the axis is unhomed the axis will be displayed in yellow letters Once homed it will be d
49. code past the second percent sign is not evaluated Note The file must be created with a text editor like Gedit and not a word processor like Open Office Word Processor 15 24 File Size The interpreter and task are carefully written so that the only limit on part program size is disk capacity The TkLinuxCNC and Axis interface both load the program text to display it to the user though so RAM becomes a limiting factor In Axis because the preview plot is drawn by default the redraw time also becomes a practical limit on program size The preview can be turned off in Axis to speed up loading large part programs In Axis sections of the preview can be turned off using preview control comments 15 25 G Code Order of Execution The order of execution of items on a line is defined not by the position of each item on the line but by the following list O word commands optionally followed by a comment but no other words allowed on the same line Comment including message Set feed rate mode G93 G94 Set feed rate F Set spindle speed S Select tool T HAL pin I O M62 M68 Change tool M6 and Set Tool Number M61 Spindle on or off M3 M4 M5 Save State M70 M73 Restore State M72 Invalidate State M71 Coolant on or off M7 M8 M9 Enable or disable overrides M48 M49 M50 M51 M52 M53 User defined Commands M100 M199 Dwell G4 Set active plane G17 G18 G19 Set length un
50. command If it is Actual then it is the position the machine has actually moved to These values can differ for several reasons Following error dead band encoder resolution or step size For instance if you command a movement to X 0 0033 on your mill but one step of your stepper motor or one encoder count is 0 00125 then the Commanded position might be 0 0033 but the Actual position will be 0 0025 2 steps or 0 00375 3 steps Preview Plot When a file is loaded a preview of it is shown in the display area Fast moves such as those produced by the GO command are shown as cyan lines Moves at a feed rate such as those produced by the GZ command are shown as solid white lines Dwells such as those produced by the G4 command are shown as small pink X marks GO Rapid moves prior to a feed move will not show on the preview plot Rapid moves after a T lt n gt Tool Change will not show on the preview until after the first feed move To turn either of these features off program a G1 without any moves prior to the GO moves Program Extents The extents of the program in each axis are shown At the ends the least and greatest coordinate values are indicated In the middle the difference between the coordinates is shown When some coordinates exceed the soft limits in the ini file the relevant dimension is shown in a different color and enclosed by a box In figure below the maximum soft limit is exceeded on the X axis as indicated b
51. commands As a good preventative measure put a line similar to the following at the top of all your programs G17 G20 G40 G49 G54 G80 G90 G94 XY plane inch mode cancel diameter compensation cancel length offset coordinate system 1 cancel motion non incremental motion feed minute mode Perhaps the most critical modal setting is the distance units If you do not include G20 or G21 then different machines will mill the program at different scales Other settings such as the return mode in canned cycles may also be important 15 26 5 Don t put too many things on one line Ignore everything in Section Order of Execution and instead write no line of code that is the slightest bit ambiguous 15 26 6 Don t set amp use a parameter on the same line Don t use and set a parameter on the same line even though the semantics are well defined Updating a variable to a new value such as 1 2 is OK User Manual V2 6 11 34 gff59490 2015 12 16 162 253 15 26 7 Don t use line numbers Line numbers offer no benefits When line numbers are reported in error messages the numbers refer to the line number in the file not the N word value 15 27 Linear and Rotary Axis Because the meaning of an F word in feed per minute mode varies depending on which axes are commanded to move and because the amount of material removed does not depend only on the feed rate it may be easier to use G93 inverse time feed mode to achieve th
52. computer control of machinery Instead of a human Operator turning cranks to move a cutting tool CNC uses a computer and motors to move the tool based on a part program Comp A tool used to build compile and install LinuxCNC HAL components Configuration n A directory containing a set of configuration files Custom configurations are normally saved in the users home linuxcnc configs directory These files include LinuxCNC s traditional INI file and HAL files A configuration may also contain several general files that describe tools parameters and NML connections Configuration v The task of setting up LinuxCNC so that it matches the hardware on a machine tool Coordinate Measuring Machine A Coordinate Measuring Machine is used to make many accurate measurements on parts These machines can be used to create CAD data for parts where no drawings can be found when a hand made prototype needs to be digitized for moldmaking or to check the accuracy of machined or molded parts Display units The linear and angular units used for onscreen display DRO A Digital Read Out is a system of position measuring devices attached to the slides of a machine tool which are connected to a numeric display showing the current location of the tool with respect to some reference position DROs are very popular on hand operated machine tools because they measure the true tool position without backlash even if the machine has very loose Acme screws So
53. cutter compensation is on User Manual V2 6 11 34 gff59490 2015 12 16 186 253 16 32 G54 G59 3 Select Coordinate System G54 select coordinate system 1 G55 select coordinate system 2 G56 select coordinate system 3 G57 select coordinate system 4 G58 select coordinate system 5 G59 select coordinate system 6 G59 1 select coordinate system 7 G59 2 select coordinate system 8 G59 3 select coordinate system 9 The coordinate systems store the axis values and the XY rotation angle around the Z axis in the parameters shown in the following table Table 16 2 Coordinate System Parameters Select CS X Y Z A B C U V W R G54 1 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 G55 2 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 G56 3 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 G57 4 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 G58 5 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 G59 6 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 G59 1 7 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 G592 8 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 G59 3 9 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 It is an error if e selecting a coordinate system is used while
54. cutter compensation is on See the Coordinate System Section for an overview of coordinate systems 16 33 G61 G61 1 Exact Path Mode e G6 exact path mode G61 visits the programmed point exactly even though that means temporarily coming to a complete stop e G61 1 exact stop mode Same as G61 16 34 G64 Path Blending G64 lt P lt Q gt gt User Manual V2 6 11 34 gff59490 2015 12 16 187 253 e P motion blending tolerance e Q naive cam tolerance G64 best possible speed G64 P lt Q gt blending with tolerance G64 without P means to keep the best speed possible no matter how far away from the programmed point you end up G64 P Q is a way to fine tune your system for best compromise between speed and accuracy The P tolerance means that the actual path will be no more than P away from the programmed endpoint The velocity will be reduced if needed to maintain the path In addition when you activate G64 P Q it turns on the naive cam detector when there are a series of linear XYZ feed moves at the same feed rate that are less than Q away from being collinear they are collapsed into a single linear move On G2 G3 moves in the G17 XY plane when the maximum deviation of an arc from a straight line is less than the G64 P tolerance the arc is broken into two lines from start of arc to midpoint and from midpoint to end those lines are then subject to the naive cam algorithm for lines Thus l
55. cycle is intended for boring This cycle uses a P number where P specifies the number of seconds to dwell 1 Preliminary motion as described in the Preliminary and In Between Motion section 2 Move the Z axis only at the current feed rate to the Z position 3 Dwell for the P number of seconds 4 Retract the Z axis at the current feed rate to clear Z 16 48 G90 G91 Distance Mode e G90 absolute distance mode In absolute distance mode axis numbers X Y Z A B C U V W usually represent positions in terms of the currently active coordinate system Any exceptions to that rule are described explicitly in the G80 G89 Section e G91 incremental distance mode In incremental distance mode axis numbers usually represent increments from the current coordinate User Manual V2 6 11 34 gff59490 2015 12 16 200 253 G90 Example G90 set absolute distance mode GO X2 5 rapid move to coordinate X2 5 including any offsets in effect G91 Example G91 set incremental distance mode GO X2 5 rapid move 2 5 from current position along the X axis e See GO section for more information 16 49 G90 1 G91 1 Arc Distance Mode e G90 1 absolute distance mode for I J amp K offsets When G90 1 is in effect I and J both must be specified with G2 3 for the XY plane or J and K for the XZ plane or it is an error e G91 1 incremental distance mode for I J amp K offsets G91 1 Returns I J amp K to their default behavior
56. describe the tool Any type of description is OK This column is for the benefit of human readers only The comment must be preceded by a semicolon 14 2 2 Tool Changers LinuxCNC supports three types of tool changers manual random location and fixed location Information about configuring an LinuxCNC tool changer is in the Integrator Manual Manual Tool Changer Manual tool changer you change the tool by hand is treated like a fixed location tool changer and the P number is ignored Using the manual tool changer only makes sense if you have tool holders that remain with the tool Cat NMTB Kwik Switch etc when changed thus preserving the location of the tool to the spindle Machines with R 8 or router collet type tool holders do not preserve the location of the tool and the manual tool changer should not be used User Manual V2 6 11 34 gff59490 2015 12 16 140 253 Fixed Location Tool Changers Fixed location tool changers always return the tools to a fixed position in the tool changer This would also include designs like lathe turrets When LinuxCNC is configured for a fixed location tool changer the P number is ignored but read preserved and rewritten by LinuxCNC so you can use P for any bookkeeping number you want Random Location Tool Changers Random location tool changers swap the tool in the spindle with the one in the changer With this type of tool changer the tool will always be in a different pocket after a tool change Wh
57. ewe AS eae dete amp 4 81 G I SeUMeePase ke tee ye dO A Ee eR as E 81 6 104 Simulated Hardware Button i c e ce ete he BSe See Gb O o S ES 81 OAS User Tebe aia oir ee Bork akan pe Dee ea A a 81 6 106 Tool Measurement Video o s oe sus Sede ee a oe Se ee bw w 81 GEL a Probleme A inte dA ee a A RS ERE Eee Eee ee eS E 81 6 11 1 Strange numbers in the info area o seso c mmm Ree eae ee 81 User Manual V2 6 11 34 gff59490 2015 12 16 v 7 NGCGUI 83 EL MOVCIVIEW perehi saa A de ee E as da 84 7a Demonsiraton CoOOBUTABOAS ecs oe RA AAA Sea A dx 84 Ta Libery Locion oe es rad AA ER ARA ba AR a 86 7A Standalone Usage wk bk Be Re A A e 87 Sl AREAS MOLE oe hk e ee Sh tE dE Gx 87 342 Standalone PYNGCGUT osse cg mes t ed Ae ae ede Ce Gam eae ee 87 7 9 Embedding NGCGUL p e eei saos aopa ES eR Re ee ee ae Bee 88 Tal Embeddme NGCGUL MAAS os swaaie tid ee we EG ware a A Yee peered ex 88 7 5 2 Embedding PYNGCGUI as a gladevcp tab page in a gui 00004 88 7 5 3 Additional INI File items required for ngcgui or pyngegui ee ee ee 89 Soe Tp TE 00 6 5 A ee aS es SESE wars MES Sees oe wee gree Sa 90 Fo IND File Path Specifications 2 4 68 e446 4 ee bbe ea de eed eae Shae we 90 7 5 6 Summary of INI File item details for NGCGUI Usage e 91 46 Pile Requirements for NGCGUI Compatibility s ecs i e sace a 4445408 5 A Pewee Ee SESS 93 7 6 1 Single File Gcode ngc Subroutine Requirem
58. group 1 will also cancel the canned cycle It is an error if e Axis words are programmed when G80 is active G80 Example G90 G81 X1 Y1 Z1 5 R2 8 absolute distance canned cycle G80 turn off canned cycle motion GO X0 YO ZO rapid move to coordinate home The following code produces the same final position and machine state as the previous code G0 Example G90 G81 X1 Y1 21 5 R2 8 absolute distance canned cycle GO X0 YO ZO rapid move to coordinate home The advantage of the first set is that the G80 line clearly turns off the G81 canned cycle With the first set of blocks the programmer must turn motion back on with GO as is done in the next line or any other motion mode G word If a canned cycle is not turned off with G80 or another motion word the canned cycle will attempt to repeat itself using the next block of code that contains an X Y or Z word The following file drills G81 a set of eight holes as shown in the following caption G80 Example 1 N100 G90 GO XO YO ZO coordinate home N110 Gl X0 G4 PO 1 N120 G81 X1 YO ZO R1 canned drill cycle N130 X2 N140 X3 N150 X4 User Manual V2 6 11 34 gff59490 2015 12 16 194 253 160 AL 20 5 LVO X 180 X2 N190 X1 N200 G80 turn off canned cycle N210 GO X0 rapid move home 220 YO 230 20 240 M2 program end Note Notice the z position change after the first four holes Also this is one of the few places where line numbers have som
59. have to wait until the first one is complete before jogging again Jog speed is displayed above the slider It can be set using the slider by clicking in the slider s open slot on the side you want it to move toward or by clicking on the Default or Rapid buttons This setting only affects the jog move while in manual mode Once a jog move is initiated jog speed has no effect on the jog As an example of this say you set jog mode to incremental and the increment to 1 inch Once you press the Jog button it will travel that inch at the rate at which it started 10 4 2 AUTO When the Auto button is pressed or lt F4 gt on the keyboard and LinuxCNC is set to that mode a set of the traditional auto operation buttons is displayed and a small text window opens to show a part program During run the active line will be displayed as white lettering on a red background In the auto mode many of the keyboard keys are bound to controls For example the numbers above the qwerty keys are bound to feed rate override The 0 sets 100 9 sets 90 and such Other keys work much the same as they do with the tkLinuxCNC graphical interface n100 This is a test plot nc program to be ron on back plot n101 Author Ray Henry 10 Feb 2000 nig 50 55 200 pd 20 120 n103 xl Fi start xy circh n104 17 202 x2 yZ regqril 5 n105 xl y1 11 1 sqrt10 51 n106 g0 2 1 add xy lettering n107 1 75 n108 z Figure 10 4 Auto Mode
60. if the executing interpreter instance is part of milltask 0 0 otherwise Sometimes it is necessary to treat this case specially to retain proper preview for instance when testing the success of a probe G38 x by inspecting 5070 which will always fail in the preview interpreter e g Axis e lt _call_level gt current nesting level of O word procedures For debugging e lt _remap_level gt current level of the remap stack Each remap in a block adds one to the remap level For debugging 15 8 Expressions An expression is a set of characters starting with a left bracket and ending with a balancing right bracket In between the brackets are numbers parameter values mathematical operations and other expressions An expression is evaluated to produce a number The expressions on a line are evaluated when the line is read before anything on the line is executed An example of an expression is 1 acos 0 3 4 0 2 User Manual V2 6 11 34 gff59490 2015 12 16 153 253 15 9 Binary Operators Binary operators only appear inside expressions There are four basic mathematical operations addition subtraction multiplication and division There are three logical operations non exclusive or OR exclusive or XOR and logical and AND The eighth operation is the modulus operation MOD The ninth operation is the power operation of raising the number on the left of the oper
61. in the current LinuxCNC configuration files but you will run out of display space in Mini long before you get there Tip You can use Menu gt View gt Show Popin Full to see more tools if you need 10 6 4 Offset Page The offset page can be used to display and setup work offsets The coordinate system is selected along the left hand side of the window Once you have selected a coordinate system you can enter values or move an axis to a teach position User Manual V2 6 11 34 gff59490 2015 12 16 120 253 0 000000 0 000000 0 000000 0 000000 0 000000 Wr E ee Figure 10 8 Mini Offset Display You can also teach using an edgefinder by adding the radius and length to the offset_by widgets When you do this you may need to add or subtract the radius depending upon which surface you choose to touch from This is selected with the add or subtract radiobuttons below the offset windows The zero all for the active coordinate system button will remove any offsets that you have showing but they are not set to zero in the variable file until you press the write and load file button as well This write and load file button is the one to use when you have set all of the axis values that you want for a coordinate system 10 7 Keyboard Bindings A number of the bindings used with tkLinuxCNC have been preserved with mini A few of the bindings have been changed to extend that set or to ease the operation of a machine using this
62. information See the Parameters Section for more information 16 51 G92 1 G92 2 Reset G92 Offsets e G92 1 reset G92 offsets to zero and set parameters 5211 5219 to zero e G92 2 reset G92 offsets to zero Note G92 1 only clears G92 offsets to change G53 G59 3 coordinate system offsets in G code use either G10 L2 or G10 L20 User Manual V2 6 11 34 gff59490 2015 12 16 201 253 16 52 G92 3 Restore G92 Offsets G92 3 set the G92 offset to the values saved in parameters 5211 to 5219 You can set axis offsets in one program and use the same offsets in another program Program G92 in the first program This will set parameters 5211 to 5219 Do not use G92 in the remainder of the first program The parameter values will be saved when the first program exits and restored when the second one starts up Use G92 3 near the beginning of the second program That will restore the offsets saved in the first program 16 53 G93 G94 G95 Feed Rate Mode G93 is Inverse Time Mode In inverse time feed rate mode an F word means the move should be completed in one divided by the F number minutes For example if the F number is 2 0 the move should be completed in half a minute When the inverse time feed rate mode is active an F word must appear on every line which has a G1 G2 or G3 motion and an F word on a line that does not have G1 G2 or G3 is ignored Being in inverse time feed rate mode does not affect GO rapid
63. input stops further execution of the program until the selected event or the programmed timeout occurs It is an error to program M66 with both a P word and an E word thus selecting both an analog and a digital input In LinuxCNC these inputs are not monitored in real time and thus should not be used for timing critical applications The number of I O can be increased by using the num_dio or num_aio parameter when loading the motion controller See the Integrator s Manual Core Components Section Motion subsection for more information Note M66 will not function unless the appropriate motion digital in nn pins or motion analog in nn pins are connected in your hal file to an input Example HAL Connection net signal name motion digital in 00 lt parport 0 pinl0 in 17 17 M67 Synchronized Analog Output MGT i e M67 set an analog output synchronized with motion e E output number ranging from 0 to 3 e Q is the value to set set to O to turn off User Manual V2 6 11 34 gff59490 2015 12 16 209 253 The actual change of the specified outputs will happen at the beginning of the next motion command If there is no subsequent motion command the queued output changes won t happen It s best to always program a motion G code GO Gl etc right after the M67 M67 functions the same as M62 63 The number of I O can be increased by using the num_dio or num_aio parameter when loading the motion controller
64. is commanded using an F word F10 would mean ten machine units per minute Feedback A method e g quadrature encoder signals by which LinuxCNC receives information about the position of motors User Manual V2 6 11 34 gff59490 2015 12 16 243 253 Feedrate Override A manual operator controlled change in the rate at which the tool moves while cutting Often used to allow the operator to adjust for tools that are a little dull or anything else that requires the feed rate to be tweaked Floating Point Number A number that has a decimal point 12 300 In HAL it is known as float G Code The generic term used to refer to the most common part programming language There are several dialects of G code LinuxCNC uses RS274 NGC GUI Graphical User Interface General A type of interface that allows communications between a computer and a human in most cases via the manipulation of icons and other elements widgets on a computer screen LinuxCNC An application that presents a graphical screen to the machine operator allowing manipulation of the machine and the corresponding controlling program HAL Hardware Abstraction Layer At the highest level it is simply a way to allow a number of building blocks to be loaded and interconnected to assemble a complex system Many of the building blocks are drivers for hardware devices However HAL can do more than just configure hardware drivers Home A specific location in the mac
65. it may be any valid tool number Note G41 G42 DO is a little special Its behavior is different on random tool changer machines and nonrandom tool changer machines see the Tool Changers section On nonrandom tool changer machines G41 G42 DO applies the TLO of the tool currently in the spindle or a TLO of 0 if no tool is in the spindle On random tool changer machines G41 G42 DO applies the TLO of the tool TO defined in the tool table file or causes an error if TO is not defined in the tool table To start cutter compensation to the left of the part profile use G41 G41 starts cutter compensation to the left of the programmed line as viewed from the positive end of the axis perpendicular to the plane To start cutter compensation to the right of the part profile use G42 G42 starts cutter compensation to the right of the pro grammed line as viewed from the positive end of the axis perpendicular to the plane The lead in move must be at least as long as the tool radius The lead in move can be a rapid move Cutter compensation may be performed if the XY plane or XZ plane is active User M100 M199 commands are allowed when Cutter Compensation is on The behavior of the machining center when cutter compensation is on is described in the Cutter Compensation Section along with code examples It is an error if The D number is not a valid tool number or 0 e The YZ plane is active e Cutter compensation is commanded to turn on w
66. lines that will appear as comments to the gcmc compiler Example variable tags formats User Manual V2 6 11 34 gff59490 2015 12 16 96 253 ngcgui varnamel ngcgui varname2 value2 ngcgui varname3 value3 label3 Examples fimigeswal seis ngcgui feedrate 10 aseos sl Op sx limite For these examples the entry box for varnamel will have no default the entry box for varname2 will have a default of value2 and the entry box for varname 3 will have a default of value 3 and a label label3 instead of varname3 The default values must be numbers To make it easier to modify valid lines in a gemc file alternate tag line formats accepted The alternate formats ignore trailing semicolons and trailing comment markers With this provision it is often makes it possible to just add the ngcgui tag to existing lines in a gcmc file Alternate variable tag formats ngcgui varname2 value2 ngcgui varname3 value3 label3 Examples ngcgui feedrate 10 Aneemia sil Os ff 8 Lee An info line that will appear at the top of a tab page may be optionally included with a line tagged as Info tag ASEGURAN E OR Text cO epoca ck Too Oi Tag Dage When required options can be passed to the gemc compiler with a line tagged Option line tag format ngcgui option_name option_value Examples ngcgui I ngcgui imperial ngcgui precision 5 ngcgui precis
67. maximum currently 256 to the number of characters allowed on a line 1 an optional block delete character which is a slash 2 an optional line number 3 any number of words parameter settings and comments 4 anend of line marker carriage return or line feed or both Any input not explicitly allowed is illegal and will cause the Interpreter to signal an error Spaces and tabs are allowed anywhere on a line of code and do not change the meaning of the line except inside comments This makes some strange looking input legal The line GOX 0 12 34Y 7 is equivalent to GO x 0 1234 Y7 for example User Manual V2 6 11 34 gff59490 2015 12 16 145 253 Blank lines are allowed in the input They are to be ignored Input is case insensitive except in comments i e any letter outside a comment may be in upper or lower case without changing the meaning of a line 15 3 Block Delete The optional block delete character the slash when placed first on a line can be used by some user interfaces to skip lines of code when needed In Axis the key combination Alt m toggles block delete on and off When block delete is on any lines starting with the slash are skipped 15 4 Line Number A line number is the letter N followed by an unsigned integer optionally followed by a period and another unsigned integer For example N1234 and N56 78 are valid line numbers They may be repeated or used out of order although normal practi
68. nonrandom toolchanger machine and unloads the spindle It is an error if e a negative T number is used T number is used that does not appear in the tool table file with the exception that TO on nonrandom toolchangers is accepted as noted above On some machines the carousel will move when a T word is programmed at the same time machining is occurring On such machines programming the T word several lines before a tool change will save time A common programming practice for such machines is to put the T word for the next tool to be used on the line after a tool change This maximizes the time available for the carousel to move Rapid moves after a T lt n gt will not show on the AXIS preview until after a feed move This is for machines that travel long distances to change the tool like a lathe This can be very confusing at first To turn this feature off for the current tool program a G1 without any move after the T lt n gt User Manual V2 6 11 34 gff59490 2015 12 16 221 253 Chapter 20 G Code Examples After you install LinuxCNC several sample files are placed in the nc_files folder Make sure the sample file is appropriate for your machine before running 20 1 Mill Examples 20 1 1 Helical Hole Milling File Name useful subroutines ngc Description Subroutine for milling a hole using parameters 20 1 2 Slotting File Name useful subroutines ngc Description Subroutine for milling a slot using
69. not possible to maintain constant speed because acceleration or deceleration is required at the beginning and or end of the motion It is feasible however to control the axes so that at all times each axis has completed the same fraction of its required motion as the other axes This moves the tool along same path and we also call this kind of motion coordinated linear motion Coordinated linear motion can be performed either at the prevailing feed rate or at traverse rate or it may be synchronized to the spindle rotation If physical limits on axis speed make the desired rate unobtainable all axes are slowed to maintain the desired path 12 2 5 Feed Rate The rate at which the controlled point or the axes move is nominally a steady rate which may be set by the user In the Interpreter the interpretation of the feed rate is as follows unless inverse time feed or feed per revolution modes are being used see Section G93 G94 G95 1 If any of XYZ are moving F is in units per minute in the XYZ cartesian system and all other axes ABCUVW move so as to start and stop in coordinated fashion 2 Otherwise if any of UVW are moving F is in units per minute in the UVW cartesian system and all other axes ABC move so as to start and stop in coordinated fashion 3 Otherwise the move is pure rotary motion and the F word is in rotary units in the ABC pseudo cartesian system 12 2 6 Coolant Flood coolant and mist coolant may each be turned o
70. one The author s and publisher s of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version 5 COMBINING DOCUMENTS You may combine the Document with other documents released under this License under the terms defined in section 4 above for modified versions provided that you include in the combination all of the Invariant Sections of all of the original documents unmodified and list them all as Invariant Sections of your combined work in its license notice The combined work need only contain one copy of this License and multiple identical Invariant Sections may be replaced with a single copy If there are multiple Invariant Sections with the same name but different contents make the title of each such section unique by adding at the end of it in parentheses the name of the original author or publisher of that section if known or else a unique number Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work In the combination you must combine any sections entitled History in the various original documents forming one section entitled History likewise combine any sections entitled Acknowledgements and any sections entitled Dedications You must delete all sections entitled Endorsements 6 COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Docume
71. only makes sense when both rows and columns are being milled Possible bounding options are e None Rows and columns are both fully milled e Secondary When milling in the second direction areas that do not strongly slope in that direction are skipped e Full When milling in the first direction areas that strongly slope in the second direction are skipped When milling in the second direction areas that do not strongly slope in that direction are skipped 23 4 18 Contact angle When Lace bounding is not None slopes greater than Contact angle are considered to be strong slopes and slopes less than that angle are considered to be weak slopes 23 4 19 Roughing offset and depth per pass Image to gcode can optionally perform rouging passes The depth of successive roughing passes is given by Roughing depth per pass For instance entering 0 2 will perform the first roughing pass with a depth of 0 2 the second roughing pass with a depth of 0 4 and so on until the full Depth of the image is reached No part of any roughing pass will cut closer than Roughing Offset to the final part The following figure shows a tall vertical feature being milled In this image Roughing depth per pass is 0 2 inches and roughing offset is 0 1 inches User Manual V2 6 11 34 gff59490 2015 12 16 240 253 Figure 23 1 Roughing passes and final pass User Manual V2 6 11 34 gff59490 2015 12 16 241 253 Chapter 24 Glossary A listing of
72. or explicitly Such commands are called modal For example if coolant is turned on it stays on until it is explicitly turned off The G codes for motion are also modal If a G1 straight move command is given on one line for example it will be executed again on the next line if one or more axis words is available on the line unless an explicit command is given on that next line using the axis words or canceling motion Non modal codes have effect only on the lines on which they occur For example G4 dwell is non modal 15 14 Polar Coordinates Polar Coordinates can be used to specify the XY coordinate of a move The On is the distance and n is the angle The advantage of this is for things like bolt hole circles which can be done very simply by moving to a point in the center of the circle setting the offset and then moving out to the first hole then run the drill cycle Polar Coordinates always are from the current XY zero position To shift the Polar Coordinates from machine zero use an offset or select a coordinate system In Absolute Mode the distance and angle is from the XY zero position and the angle starts with 0 on the X Positive axis and increases in a CCW direction about the Z axis The code G1 1790 is the same as G1 Y1 In Relative Mode the distance and angle is also from the XY zero position but it is cumulative This can be confusing at first how this works in incremental mode For example if you have the following program y
73. parameters 20 1 3 Grid Probe File Name gridprobe ngc Description Rectangular Probing This program repeatedly probes in a regular XY grid and writes the probed location to the file probe results txt in the same directory as the ini file 20 1 4 Smart Probe File Name smartprobe ngc Description Rectangular Probing This program repeatedly probes in a regular XY grid and writes the probed location to the file probe results txt in the same directory as the ini file This is improved from the grid probe file User Manual V2 6 11 34 gff59490 2015 12 16 222 253 20 1 5 Tool Length Probe File Name tool length probe ngc Description Tool Length Probing This program shows an example of how to measure tool lengths automatically using a switch hooked to the probe input This is useful for machines without tool holders where the length of a tool is different every time it is inserted 20 1 6 Hole Probe File Name probe hole ngc Description Finding the Center and Diameter of a hole The program demonstrates how to find the center of a hole measure the hole diameter and record the results 20 1 7 Cutter Compensation To be added 20 2 Lathe Examples 20 2 1 Threading File Name lathe g76 ngc Description Facing threading and parting off This file shows an example of threading on a lathe using parameters User Manual V2 6 11 34 gff59490 2015 12 16 223 253 Chapter 21 Lathe User Information Th
74. preview window show offsets the Offsets will be shown in the preview window show DTG the distance to go will be shown in the preview window show DRO Button will allow you to display additional buttons on the left side of the DRO It will display one button to switch from relative to absolute coordinates one button to toggle between distance to go and the other states and one button to toggle the units from metric to imperial and vice versa Warning It is not recommended to use this option because the user will loose the auto unit option which will toggle the units according to the active gcode G20 G21 Note You can change through the DRO modes absolute relative distance to go by clicking on the DRO Use Auto Units allows to disable the auto units option of the display so you can run a program in inches and watch the DRO in mm size allows to set the size of the DRO font default is 28 if you use a bigger screen you may want to increase the size up to 56 If you do use 4 axis the DRO font size will be 3 4 of the value because of space reason digits sets the number of digits of the DRO from 1 to 5 NOTE Imperial will show one digit more that metric So if you are in imperial machine units and set the digit value to 1 you will get no digit at all in metric Preview Grid Size Sets the grid size of the preview window Unfortunately the size has to be set in inches even if your machine units are metric
75. re initialized the default values are automatically in effect Group 1 the first group on the table is a group of G codes for motion One of these is always in effect That one is called the current motion mode It is an error to put a G code from group 1 and a G code from group 0 on the same line if both of them use axis words If an axis word using G code from group 1 is implicitly in effect on a line by having been activated on an earlier line and a group 0 G code that uses axis words appears on the line the activity of the group 1 G code is suspended for that line The axis word using G codes from group 0 are G10 G28 G30 and G92 It is an error to include any unrelated words on a line with O flow control 15 16 Comments Comments can be added to lines of G code to help clear up the intention of the programmer Comments can be embedded in a line using parentheses or for the remainder of a line using a semi colon The semi colon is not treated as the start of a comment when enclosed in parentheses Comments may appear between words but not between words and their corresponding parameter So S100 set speed F 200 feed is OK while S speed 100F feed is not COM Bapuditoss tonta al yall GCO XKL Nase Rapids TA Seane lote COn e caer cne coo Fam M2 End of program There are several active comments which look like comments but cause some action like debug or print If there are several comments on a line only
76. same as the menu Save gcode as Save the current file with a new name Properties The sum of the rapid and feed moves Does not factor in acceleration blending or path mode so time reported will never be less than the actual run time Edit tool table Same as Edit if you have defined an editor you can open the tool table and edit it Reload tool table After editing the tool table you must reload it Ladder editor If you have loaded Classic Ladder you can edit it from here See the Integrator Manual on setting up Classic Ladder Quit Terminates the current LinuxCNC session MACHINE MENU Toggle Emergency Stop F1 Change the state of the Emergency Stop Toggle Machine Power F2 Change the state of the Machine Power if the Emergency Stop is not on Run Program Run the currently loaded program from the beginning Run From Selected Line Select the line you want to start from first Use with caution as this will move the tool to the expected position before the line first then it will execute the rest of the code Warning Do not use Run From Selected Line if your g code program contains subroutines Step Single step through a program Pause Pause a program Resume Resume running from a pause Stop Stop a running program When run is selected after a stop the program will start from the beginning Stop at M1 If an M1 is reached and this is checked program execution will stop on the M1 line Press R
77. that allow you to change the angle of view and the size of the plot You can rotate the little position angle display with these They take effect when you press the Refresh button The Reset button removes all of the paths from the display and readies it for a new run of the program but retains your settings for that session If backplot is started before a program is started it will try to use some color lines to indicate the kind of motion that was used to make it A green line is a rapid move A black line is a feed rate move Blue and red indicate arcs in counterclockwise and clockwise directions The backplotter with Mini allows you to zoom and rotate views after you have run your program but it is not intended to store a tool path for a long period of time 10 6 3 Tool Page The tool page is pretty much like the others You can set length and diameter values here and they become effective when you press the Enter key You will need to set up your tool information before you begin to run a program You can t change tool offsets while the program is running or when the program is paused User Manual V2 6 11 34 gff59490 2015 12 16 119 253 Figure 10 7 Mini Tool Display The Add Tools and Remove Tools buttons work on the bottom of the tool list so you will want to fill in tool information in descending order Once a new tool has been added you can use it in a program with the usual G code commands There is a 32 tool limit
78. that even though a radius has been programmed the part will actually end up with a square corner Control Point Actual Profile Cut Programmed Path Figure 21 8 Radius Cut Now you can see as the control point follows the radius programmed the tool tip has left the part and is now cutting air User Manual V2 6 11 34 gff59490 2015 12 16 233 253 Control Point Programmed Path Figure 21 9 Radius Cut In the final figure we can see the tool tip will finish cutting the face but leave a square corner instead of a nice radius Notice also that if you program the cut to end at the center of the part a small amount of material will be left from the radius of the tool To finish a face cut to the center of a part you have to program the tool to go past center at least the nose radius of the tool Pragrammed Path Control Point Figure 21 10 Face Cut 21 7 4 Using Cutter Comp When using cutter comp on a lathe think of the tool tip radius as the radius of a round cutter When using cutter comp the path must be large enough for a round tool that will not gouge into the next line When cutting straight lines on the lathe you might not want to use cutter comp For example boring a hole with a tight fitting boring bar you may not have enough room to do the exit move The entry move into a cutter comp arc is important to get the correct results User Manual V2 6 11 34 gff59490 2015 12 16 234 253 Chapter 22 RS274 N
79. the distance to search for contact an error will be launched if no contact is given The distance has to be given in relative coordinates beginning the move from Z Pos so you have to give a negative value to go down e Probe Height is the height of your probe switch you can measure it Just touch off the base where the probe switch is located and set that to zero Then make a tool change and watch the tool_offset_z value that is the hight you must enter here User Manual V2 6 11 34 gff59490 2015 12 16 771 1253 Probe velocities e Search Vel The velocity to search for the tool switch after contact the tool will go up again and then goes toward the probe again with probe vel so you will get better results e Probe Vel Is the velocity for the second movement to the switch it should be slower to get better touch results In sim mode this is commented out in macros change ngc otherwise the user would have to click twice on the probe button Tool Changer If your 4 th axis is used in a tool changer you may want to hide the DRO and all the other buttons related to that axis You can do that by checking the checkbox that will hide e 4 th axis DRO e 4 th axis Jog button e 4 th axis home button e column of 4 th axis in the offsetpage e column of 4 th axis in the tolleditor Message behavior and appearance This will display small popup windows displaying the message or error text the behavior is very si
80. the language used by LinuxCNC part programs Servo Motor Generally any motor that is used with error sensing feedback to correct the position of an actuator Also a motor which is specially designed to provide improved performance in such applications Servo Loop A control loop used to control position or velocity of an motor equipped with a feedback device User Manual V2 6 11 34 gff59490 2015 12 16 245 253 Signed Integer A whole number that can have a positive or negative sign In HAL it is known as s32 A signed 32 bit integer has a usable range of 2 147 483 647 to 2 147 483 647 Spindle The part of a machine tool that spins to do the cutting On a mill or drill the spindle holds the cutting tool On a lathe the spindle holds the workpiece Spindle Speed Override A manual operator controlled change in the rate at which the tool rotates while cutting Often used to allow the operator to adjust for chatter caused by the cutter s teeth Spindle Speed Override assumes that the LinuxCNC software has been configured to control spindle speed Stepconf An LinuxCNC configuration wizard It is able to handle many step and direction motion command based machines It writes a full configuration after the user answers a few questions about the computer and machine that LinuxCNC is to run on Stepper Motor A type of motor that turns in fixed steps By counting steps it is possible to determine how far the motor has turned If
81. the position specified by axes including any offsets then will make a rapid move to the absolute position of the values in parameters 5181 5186 for axes specified Any axis not specified will not move G30 1 stores the current absolute position into parameters 5181 5186 G30 Example Line G30 22 5 rapid to 22 5 then to the location specified in the G30 stored parameters It is an error if e Cutter Compensation is turned on User Manual V2 6 11 34 gff59490 2015 12 16 180 253 16 21 G33 Spindle Synchronized Motion CaS w Wa w K e K distance per revolution For spindle synchronized motion in one direction code G33 X Y Z K where K gives the distance moved in XYZ for each revolution of the spindle For instance if starting at Z 0 G33 Z 1 K 0625 produces a 1 inch motion in Z over 16 revolutions of the spindle This command might be part of a program to produce a 16TPI thread Another example in metric G33 Z 15 K1 5 produces a movement of 15mm while the spindle rotates 10 times for a thread of 1 5mm Spindle synchronized motion waits for the spindle index and spindle at speed pins so multiple passes line up G33 moves end at the programmed endpoint G33 could be used to cut tapered threads or a fusee All the axis words are optional except that at least one must be used Note K follows the drive line described by X Y Z K is not parallel to the Z axis if X or Y endpoints are used for example when cutting t
82. the possibility to display up to 4 axis support a lathe mode for normal and back tool lathe and can be adapted to nearly every need because gmoccapy supports embedded tabs and side panels As a good example for that see gmoccapy_plasma It has support for integrated virtual keyboard onboard or matchbox keyboard so there is no need for a hardware keyboard or mouse but it can also be used with that hardware Gmoccapy offers a separate settings page to configure most settings of the GUI without editing files gmoccapy can be localized very easy because the corresponding files are separated from the linuxcnc po files so there is no need to translate unneeded stuff The files are placed in src po gmoccapy Just copy the gmoccapy pot file to something like fr po and translate that file with gtranslator or poedit After a make you got the GUI in your preferenced language Please publish your translation so it can be included in the official packages and be published to other users At the Moment it is available in English German Spanish Polish Serbian and Hungarian Feel free to help me to introduce more languages nieson web de Ifyou need help don t hesitate to ask User Manual V2 6 11 34 gff59490 2015 12 16 45 253 0 1mm LET 0 01mm we Y z c iS 0 001mm N 1 2345in IS gt Le 4 Tool information Max Velocity Cooling Spindle rpm A Too no Diameter offset z o o 0 000 Vel o so 100 No tool description av
83. to accelerate from 0 to the desired feed rate and then stop again Using A as 1 2 the ini file MAX_ACCELERATION and F as the feed rate in units per second the acceleration time is ta F A and the acceleration distance is da F t 2 The deceleration time and distance are the same making the critical distance d da dg 2 da F A For example for a feed rate of 1 inch per second and an acceleration of 10 inches sec the critical distance is 17 10 1 10 0 1 inches For a feed rate of 0 5 inch per second the critical distance is 52 100 25 10 0 025 inches 3 2 GCode 3 2 1 Defaults When LinuxCNC first starts up many G and M codes are loaded by default The current active G and M codes can be viewed on the MDI tab in the Active G Codes window in the AXIS interface These G and M codes define the behavior of LinuxCNC and it is important that you understand what each one does before running LinuxCNC The defaults can be changed when running a G Code file and left in a different state than when you started your LinuxCNC session The best practice is to set the defaults needed for the job in the preamble of your G Code file and not assume that the defaults have not changed Printing out the G Code Quick Reference page can help you remember what each one is 3 2 2 Feed Rate How the feed rate is applied depends on if an axis involved with the move is a rotary axis Read and understand the Feed Rate section if you have a rotary axis or
84. value entered See G10 L10 in the G code chapter Tool touch off to fixture When performing Touch Off the value entered is relative to the ninth G59 3 coordinate system with the axis offset G92 ignored This is useful when there is a tool touch off fixture at a fixed location on the machine with the ninth G59 3 coordinate system set such that the tip of a zero length tool is at the fixture s origin when the Relative coordinates are 0 See G10 L11 in the G code chapter It s all in your point of view The AXIS display pick menu View refers to Top Front and Side views These terms are correct if the CNC machine has its Z axis vertical with positive Z up This is true for vertical mills which is probably the most popular application and also true for almost all EDM machines and even vertical turret lathes where the part is turning below the tool The terms Top Front and Side might be confusing however in other CNC machines such as a standard lathe where the Z axis is horizontal or a horizontal mill again where the Z axis is horizontal or even an inverted vertical turret lathe where the part is turning above the tool and the Z axis positive direction is down Just remember that positive Z axis is almost always away from the part So be familiar with your machine s design and interpret the display as needed Top View The Top View or Z view displays the G code looking along the Z axis from positive
85. variant basic the letters de are for German you will have to set them according to your locale settings Just execute this file before starting LinuxCNC it can be done also adding a starter to your local folder config autostart so that the layout is set automatically on starting For matchbox keyboard you will have to make your own layout for a German layout ask in the forum On Touch Off give the option to show the preview tab or the offset page tab if you enter the touch off mode by clicking the corresponding bottom button e show preview e show offsets As the notebook tabs are shown you are able to switch between both views in any case Show Aux Display By clicking this button a additional window will be opened This button is only sensitive if a file named gmoccapy2 glade is located in your config folder You can build the Aux Screen using Glade O Warning The main window of the aux screen must be named window2 DRO Options You have the option to select the background colors of the different DRO states So users suffering from protanopia red green weakness are able to select proper colors By default the backgrounds are User Manual V2 6 11 34 gff59490 2015 12 16 71 253 e Relative mode black e Absolute mode blue e Distance to go yellow and the foreground color of the DRO can be selected with e homed color green e unhomed color red show dro in preview the DRO will be shown in the
86. visible The local variables of a calling procedure are not visible in a called procedure User Manual V2 6 11 34 gff59490 2015 12 16 147 253 Behavior of uninitialized parameters 1 unitialized global parameters and unused subroutine parameters return the value zero when used in an expression 2 unitialized named parameters signal an error when used in an expression Mode Most parameters are read write and may be assigned to within an assignment statement However for many predefined parameters this does not make sense so they are are read only they may appear in expressions but not on the left hand side of an assignment statement Persistence When LinuxCNC is shut down volatile parameters lose their values All parameters except numbered parameters in the current persistent range are volatile Persistent parameters are saved in the var file and restored to their previous values when LinuxCNC is started again Volatile numbered parameters are reset to zero Intended Use 1 user parameters numbered parameters in the range 31 5000 and named global and local parameters except prede fined parameters These are available for general purpose storage of floating point values like intermediate results flags etc throughout program execution They are read write can be assigned a value 2 subroutine parameters these are used to hold the actual parameters passed to a subroutine 3 numbered parameters most of these ar
87. you have 3 axis then will select axis O 1 will select axis 1 and 2 will select axis 2 The remainder of the number keys will still set the Feed Override When running a program 1234567890 will set the Feed Override to 0 100 The most frequently used keyboard shortcuts are shown in the following Table Table 5 1 Most Common Keyboard Shortcuts Keystroke Action Taken Mode F1 Toggle Emergency Stop All F2 Turn machine on off All 1 9 0 Set feed override from 0 to Varies 100 X Activate first axis Manual Y 1 Activate second axis Manual Led Activate third axis Manual A 3 Activate fourth axis Manual I Select jog increment Manual C Continuous jog Manual Control Home Perform homing sequence Manual End Touch off Set G54 offset for Manual active axis Left Right Jog first axis Manual Up Down Jog second axis Manual Pg Up Pg Dn Jog third axis Manual Jog fourth axis Manual O Open File Manual Control R Reload File Manual R Run file Manual User Manual V2 6 11 34 gff59490 2015 12 16 38 253 Table 5 1 continued Keystroke Action Taken Mode P Pause execution Auto S Resume Execution Auto ESC Stop execution Auto Control K Clear backplot Auto Manual V Cycle among preset views Auto Manual Shift Left Right Rapid X Axis Manual Shift Up Down Rapid Y Axis Manual Shift PgUp PgDn Rapid Z Axis Manual 5 5 Show Li
88. 0 5 7 axis remote AXIS includes a program called axis remote which can send certain commands to a running AXIS The available commands are shown by running axis remote help and include checking whether AXIS is running ping loading a file by name reloading the currently loaded file reload and making AXIS exit quit 5 8 Manual Tool Change LinuxCNC includes a userspace HAL component called hal_manualtoolchange which shows a window prompt telling you what tool is expected when a M6 command is issued After the OK button is pressed execution of the program will continue The HAL configuration file configs sim axis_manualtoolchange hal shows the HAL commands necessary to use this component hal_manualtoolchange can be used even when AXIS is not used as the GUI This component is most useful if you have presettable tools and you use the tool table Note Important Note Rapids will not show on the preview after a T lt n gt is issued until the next feed move after the M6 This can be very confusing to most users To turn this feature off for the current tool change program a G1 with no move after the T lt n gt lt gt Insert tool 1 and click continue when ready Continue Figure 5 7 The Manual Toolchange Window User Manual V2 6 11 34 gff59490 2015 12 16 40 253 5 9 Python modules AXIS includes several Python modules which may be useful to others For more information on one of these module
89. 0 2015 12 16 110 253 Mini was designed to be a full screen graphical interface It was first written for the Sherline CNC but is available for anyone to use copy and distribute under the terms of the GPL copyright Rather than popup new windows for each thing that an operator might want to do Mini allows you to display these within the regular screen Parts of this chapter are copied from the instructions that were written for that mill by Joe Martin and Ray Henry 1 10 2 Screen layout Sherline Steppermod Minimill O Xx a al m x 0 0000 pa ee Y 0 0000 Z 0 0000 Fead Overrida 100 Figure 10 2 Mini Display for a Running LinuxCNC The Mini screen is laid out in several sections These include a menu across the top a set of main control buttons just below the menu and two rather large columns of information that show the state of your machine and allow you to enter commands or programs When you compare starting screen with run screen you will see many differences In the second figure e each axis has been homed the display numbers are dark green e the LinuxCNC mode is auto the auto button has a light green background 1 Much of this chapter quotes from a chapter of the Sherline CNC Operators Manual User Manual V2 6 11 34 gff59490 2015 12 16 111 253 e the backplotter has been turned on backplot is visible in the pop in window e the tool path from the progra
90. 000 Free Software Foundation Inc 59 Temple Place Suite 330 Boston MA 02111 1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document but changing it is not allowed 0 PREAMBLE The purpose of this License is to make a manual textbook or other written document free in the sense of freedom to assure everyone the effective freedom to copy and redistribute it with or without modifying it either commercially or noncommercially Secondarily this License preserves for the author and publisher a way to get credit for their work while not being considered responsible for modifications made by others This License is a kind of copyleft which means that derivative works of the document must themselves be free in the same sense It complements the GNU General Public License which is a copyleft license designed for free software We have designed this License in order to use it for manuals for free software because free software needs free documentation a free program should come with manuals providing the same freedoms that the software does But this License is not limited to software manuals it can be used for any textual work regardless of subject matter or whether it is published as a printed book We recommend this License principally for works whose purpose is instruction or reference 1 APPLICABILITY AND DEFINITIONS This License applies to any manual or other work that contains a notice placed b
91. 1 34 gff59490 2015 12 16 125 253 Part III Using LinuxCNC User Manual V2 6 11 34 gff59490 2015 12 16 126 253 Chapter 12 CNC Machine Overview This section gives a brief description of how a CNC machine is viewed from the input and output ends of the Interpreter 12 1 Mechanical Components A CNC machine has many mechanical components that may be controlled or may affect the way in which control is exercised This section describes the subset of those components that interact with the Interpreter Mechanical components that do not interact directly with the Interpreter such as the jog buttons are not described here even if they affect control 12 1 1 Axes Any CNC machine has one or more Axes Different types of CNC machines have different combinations For instance a 4 axis milling machine may have XYZA or XYZB axes A lathe typically has XZ axes A foam cutting machine may have XYUV axes In LinuxCNC the case of a XYYZ gantry machine with two motors for one axis is better handled by kinematics rather than by a second linear axis Primary Linear Axes axesprimary linear primary linear The X Y and Z axes produce linear motion in three mutually orthogonal directions Secondary Linear Axes axessecondary linear secondary linear The U V and W axes produce linear motion in three mutually orthogonal directions Typically X and U are parallel Y and V are parallel and Z and W are parallel Rotational Axes axesrotati
92. 10 L20 is similar to G10 L2 except that instead of setting the offset entry to the given value it is set to a calculated value that makes the current coordinates become the given value G10 L20 Example Line G10 120 P1 X1 5 set the X axis current location in coordinate system 1 to 1 5 It is an error if e The P number does not evaluate to an integer in the range 0 to 9 e An axis is programmed that is not defined in the configuration 16 17 G17 G19 1 Plane Selection These codes set the current plane as follows e G17 XY default G18 ZX G19 YZ G17 1 UV G18 1 WU G19 1 VW The UV WU and VW planes do not support arcs It is a good idea to include a plane selection in the preamble of each G code file The effects of having a plane selected are discussed in Section G2 G3 and Section G81 G89 16 18 G20 G21 Units e G20 to use inches for length units e G2 to use millimeters for length units It is a good idea to include units in the preamble of each G code file User Manual V2 6 11 34 gff59490 2015 12 16 179 253 16 19 G28 G28 1 Go to Predefined Position Warning Only use G28 when your machine is homed to a repeatable position and the desired G28 position has been stored with G28 1 G28 uses the values stored in parameters 5161 5166 as the X Y ZA B C U V W final point to move to The parameter values are absolute machine coordinates in the native machine units as specifed in
93. 100 Estop Reset Machine On Override Limits MV 100 Estop Machine Off Jogging Homing a X Home All Home Selected Y Unhome All Unhome Selected Zz Startup MDI Manual Auto Status Preferences Figure 2 4 Touchy GUI e NGCGUI a subroutine GUI that provides fill in the blanks programming of G code It also supports concatenation of subroutine files to enable you to build a complete G code file without programming User Manual V2 6 11 34 gff59490 2015 12 16 10 253 File Machine View Help CURE Ulea Iz 5 lx lie Manual Control F3 MDI F5 Preview DRO simp xyz lll x _Home All Touch off ngcgui 0 move move gt simp simple subroutine example Ctrl U to edit Positional Parameters I 1 6 Radius A 2 04 radius 3 100 feedrate Create Feature Feed Override 100 mal Jog Speed 16 in min M_I AAA Max Velocity 72 injmin a Ctri k for Key bindings l AXIS splash g code Not intended for actual milling 2 To run this code anyway you might have to Touch Off the Z axis 3 depending on your setup As if you had some material in your mill 4 Hint jog the Z axis down a bit then touch off 5 Also press the Toggle Skip Lines with to see that part If the program is too big or small for your machine change the scale 3 font usr share fonts truetype freefont FreeSerifBoldItalic ttf text EMC2 5
94. 11 34 gff59490 2015 12 16 217 253 0102 else parameter 2 between 2 and 5 F200 0102 endif 18 4 Repeat The repeat will execute the statements inside of the repeat endrepeat the specified number of times The example shows how you might mill a diagonal series of shapes starting at the present position Repeat Example Mill 5 diagonal shapes G91 Incremental mode 0103 repeat 5 insert milling code here GO X1 Y1 diagonal move to next position o103 endrepeat G90 Absolute mode 18 5 Indirection The O number may be given by a parameter and or calculation Indirection Example o 101 2 call Computing values in O words For more information on computing values see the following sections e Parameters e Expressions e Binary Operators e Functions 18 6 Calling Files To call a separate file with a subroutine name the file the same as your call and include a sub and endsub in the file The file must be in the directory pointed to by PROGRAM_PREFIX or SUBROUTINE_PATH in the ini file The file name can include lowercase letters numbers dash and underscore only A named subroutine file can contain only a single subroutine definition Named File Example o lt myfile gt call Numbered File Example Sl25 calik In the called file you must include the oxxx sub and endsub and the file must be a valid file Called File Example User Manual V2 6 11 34 gff59490 2015 12 16 218 253 filename myfile ngc o l
95. 15 12 16 xiv 24 Glossary 241 25 Legal Section 246 231 COENE TONAS o aa a e RA Ae a a aia eb a e 246 25 2 GNU Pree Documentation License soo o es sa cw r o a da a E EA ee ee E ee ee 246 26 Index 250 User Manual V2 6 11 34 gff59490 2015 12 16 XV The LinuxCNC Team User Manual V2 6 11 34 gff59490 2015 12 16 1 253 Part I LinuxCNC Introduction User Manual V2 6 11 34 gff59490 2015 12 16 2 253 This handbook is a work in progress If you are able to help with writing editing or graphic preparation please contact any member of the writing team or join and send an email to emc users lists sourceforge net Copyright 2000 2015 LinuxCNC org Permission is granted to copy distribute and or modify this document under the terms of the GNU Free Documentation License Version 1 1 or any later version published by the Free Software Foundation with no Invariant Sections no Front Cover Texts and no Back Cover Texts A copy of the license is included in the section entitled GNU Free Documentation License LINUXO is the registered trademark of Linus Torvalds in the U S and other countries The registered trademark Linux is used pursuant to a sublicense from LMI the exclusive licensee of Linus Torvalds owner of the mark on a world wide basis User Manual V2 6 11 34 gff59490 2015 12 16 3 253 Chapter 1 User Foreword LinuxCNC is modular and flexible These attributes lead many to see it as a con
96. 2 382 G38 3 383 G38 4 384 G38 5 385 G5 2 52 G73 730 G76 760 G80 800 G81 810 G82 820 G83 830 G84 840 G85 850 G86 860 G87 870 G88 880 G89 890 e lt _plane gt returns the value designating the current plane Plane return value G17 170 G18 180 G19 190 G17 1 171 G18 1 181 G19 1 191 e lt _ccomp gt Status of cutter compensation Return values Mode return value G40 400 User Manual V2 6 11 34 gff59490 2015 12 16 151 253 Mode return value G41 410 G41 1 411 G41 410 G42 420 G42 1 421 e lt _metric gt Return 1 if G21 is on else 0 e lt _imperial gt Return 1 if G20 is on else 0 e lt _absolute gt Return 1 if G90 is on else 0 e lt _incremental gt Return 1 if G91 is on else 0 e lt _inverse_time gt Return 1 if inverse feed mode G93 is on else 0 e lt _units_per_minute gt Return 1 if Units minute feed mode G94 is on else 0 e lt _units_per_rev gt Return 1 if Units revolution mode G95 is on else 0 e lt _coord_system gt Return index of the current coordinate system G54 G59 3 Mode return value G54 0 G55 1 G56 2 G57 3 G58 4 G59 5 G59 1 6 G59 2 7 G59 3 8 e lt _tool_offset gt Return 1 if tool offset G43 is on e
97. 274NGC Section open change ngc with a editor and uncomment the following lines 49 and 50 User Manual V2 6 11 34 gff59490 2015 12 16 68 253 F lt _hal gmoccapy probevel gt G38 2 Z 4 You may want to modify this file to fit more your needs feel free but do not ask for support 6 6 4 Needed Hal connections connect the tool probe in your hal file like so net probe motion probe input lt lt your_input_pin gt The line might look like this net probe motion probe input lt parport 0 pin 15 in In your postgui hal file add The next lines are only needed if the pins had been connected befor unlinkp iocontrol 0 tool change unlinkp iocontrol 0 tool changed unlinkp iocontrol 0 tool prep number unlinkp iocontrol 0 tool prepared link to gmoccapy toolchange so you get the advantage of tool description on change dialog net tool chang gmoccapy toolchange chang lt iocontrol 0 tool change net tool changed gmoccapy toolchange changed lt iocontrol 0 tool changed net tool prep number gmoccapy toolchange number lt iocontrol 0 tool prep number net tool prep loop iocontrol 0 tool prepare lt iocontrol 0 tool prepared 6 7 The settings page To enter the page you will have to click on and give an unlock code witch is 123 as default If you want to change it at this time you will have to edit the hidden preference file see the display section for details The page looks at t
98. 37 253 5 3 8 Spindle Speed Override By moving this slider the programmed spindle speed can be modified For instance if a program requests S8000 and the slider is set to 80 then the resulting spindle speed will be 6400 This item only appears when the HAL pin motion spindle speed out is connected 5 3 9 Jog Speed By moving this slider the speed of jogs can be modified For instance if the slider is set to 1 in min then a 01 inch jog will complete in about 6 seconds or 1 100 of a minute Near the left side slow jogs the values are spaced closely together while near the right side fast jogs they are spaced much further apart allowing a wide range of jog speeds with fine control when it is most important On machines with a rotary axis a second jog speed slider is shown This slider sets the jog rate for the rotary axes A B and C 5 3 10 Max Velocity By moving this slider the maximum velocity can be set This caps the maximum velocity for all programmed moves except spindle synchronized moves 5 4 Keyboard Controls Almost all actions in AXIS can be accomplished with the keyboard A full list of keyboard shortcuts can be found in the AXIS Quick Reference which can be displayed by choosing Help gt Quick Reference Many of the shortcuts are unavailable when in MDI mode Feed Override Keys The Feed Override keys behave differently when in Manual Mode The keys 12345678 will select an axis if it is programed If
99. 4 gff59490 2015 12 16 56 253 Command m3 996 D6000 200 g97 949 940 949 F 52500 m3 tim6 g43 1 1475 By ty N SUEN IYA Y Tool information Max Velocity Cooling Spindle rpm Too no Diameter offset z 0 0 0 000 vel o so 100 as No tool description available 14040 G Code 3 D 100 MO M5 M9 M48 M53 F o Feed Override G8 G10 G17 G21 G40 G49 G54 G64 5 o G80 G90 G91 1 G94 G97 G99 FO 100 3 Program 100 fhomejemcm linuxcne nc_files examples 3D_Chips ng 9 0 6000 O i_am_lost halo_world jog_around increment go_to_posi The name of the file must be exactly the same as the name given in the MACRO line So the macro i_am_lost will call the file i_am_lost ngc The macro files must follow some rules e the name of the file need to be the same as the name mentioned in the macro line just with the ngc extension The file must contain a subroutine like so O lt i_am_lost gt sub the name of the sub must match exactly case sensitive the name of the macro the file must end with an endsub O lt i_am_lost gt endsub followed by an M2 command the files need to be placed in a folder specified in your INI file in the RS274NGC section see RS274NGC The code in between sub and endsub will be executed by pushing the corresponding macro button Note You will find the sample macros in macros folder placed in the gmoccapy sim folder Gmoccapy will also accept macros
100. 5 12 16 166 253 motion mode is GO This will produce coordinated linear motion to the destination point at the maximum rapid rate or slower It is expected that cutting will not take place when a GO command is executing 16 3 1 Rapid Velocity Rate The MAX_VELOCITY setting in the ini file TRAJ section defines the maximum rapid traverse rate The maximum rapid traverse rate can be higher than the individual axes MAX_VELOCITY setting during a coordinated move The maximum rapid traverse rate can be slower than the MAX_VELOCITY setting in the TRAJ section if an axis MAX_VELOCITY or trajectory constraints limit it G0 Example G90 set absolute distance mode GO X1 Y 2 3 Rapid linear move from current location to X1 Y 2 3 M2 end program e See G90 amp M2 sections for more information If cutter compensation is active the motion will differ from the above see the Cutter Compensation Section If G53 is programmed on the same line the motion will also differ see the G53 Section for more information The path of a GO rapid motion can be rounded at direction changes and depends on the trajectory control settings and maximum acceleration of the axes It is an error if e An axis letter is without a real value e An axis letter is used that is not configured 16 4 G1 Linear Move Gl axes For linear straight line motion at programed feed rate for cutting or not program GJ axes where all the axis words are opti
101. 50 PO disable the feed rate control While disabled the feed override will have no influence and the motion will be executed at programmed feed rate unless there is an adaptive feed rate override active 17 11 M51 Spindle Speed Override Control e MSI lt P1 gt enable the spindle speed override control The P1 is optional e M51 PO disable the spindle speed override control program While disabled the spindle speed override will have no influence and the spindle speed will have the exact program specified value of the S word described in Spindle Speed Section User Manual V2 6 11 34 gff59490 2015 12 16 207 253 17 12 M52 Adaptive Feed Control e M52 lt P1 gt use an adaptive feed The P1 is optional e M52 PO stop using adaptive feed When adaptive feed is enabled some external input value is used together with the user interface feed override value and the commanded feed rate to set the actual feed rate In LinuxCNC the HAL pin motion adaptive feed is used for this purpose Values on motion adaptive feed should range from 0 feed hold to 1 full speed 17 13 M53 Feed Stop Control M53 lt PI gt enable the feed stop switch The P1 is optional Enabling the feed stop switch will allow motion to be interrupted by means of the feed stop control In LinuxCNC the HAL pin motion feed hold is used for this purpose A true value will cause the motion to stop when M53 is active M53 PO disable the feed stop sw
102. 65 253 e gmoccapy tooloffset x e gmoccapy tooloffset z just connect them like so in your postgui hal net tooloffset x gmoccapy tooloffset x lt motion tooloffset x net tooloffset z gmoccapy tooloffset z lt motion tooloffset z Please note that gmoccapy takes care of its own to update the offsets sending an G43 after any tool change but not in auto mode Important So writing a program makes you responsible to include an G43 after each tool change 6 6 Auto Tool Measurement Gmoccapy offers an integrated auto tool measurement To use this feature you will need to do some additional settings and you may want to use the offered hal pin to get values in your own ngc remap procedure Important O Before starting the first test do not forget to enter the Probe height and probe velocities on the settings page See Settings Page Tool Measurement It might be also a good idea to take a look at the tool measurement video see tool measurement related videos Tool Measurement in gmoccapy is done a little bit different to many other GUI You should follow theese steps touch of you workpiece in X and Y measure the hight of your block from the base where your tool switch is located to the upper face of the block including chuck etc Push the button block height and enter the measured value Go to auto mode and start your program here is a small sketch User Manual V2 6 11 34 gff59490 2015 12 16 66 253
103. 7 M66 Input Control 208 M67 Analog Motion Output Control 208 M68 Analog Aux Output Control 209 M7 Mist Coolant 205 M70 Save Modal State 209 M71 Invalidate Stored Modal State 210 M72 Restore Modal State 210 M73 Save and Autorestore Modal State 211 M8 Flood Coolant 205 M9 Coolant Off 205 machine on 31 machine units 243 Manual 34 112 121 Manual Out 199 Manual Tool Change 39 Max Velocity 37 MDI 36 244 Messages 159 Mini GUI 109 Modal Groups 157 N NGCGUI 83 NIST 244 NML 244 O O Codes 214 offsets 244 OpenGL 26 operator precedence 153 optional block delete 127 optional program stop 127 129 Other Codes 219 P Parameters 146 parameters 130 part Program 244 Path Control 186 path control mode 129 Plane Selection 178 Polar Coordinates 155 preview plot 33 Print Messages 159 Probe Logging 159 program extents 33 program units 244 Programming the Planner 17 Python 26 40 R rapid 244 Rapid Move 165 Rapid Move Out 199 rapid rate 244 real time 244 Repeat 217 return 215 Return Values 218 RS274 NGC Programs 234 RS274NGC 244 RTAI 244 RTAPI 244 RTLINUX 244 S S Set Spindle Speed 219 servo motor 244 Sherline 110 Signed Integer 245 spindle 35 126 245 spindle speed override 37 127 Spindle Stop Manual Out 199 Rapid Move Out 199 stepper motor 245 sub 215 Subroutines 215 T T Select Tool 219 TASK 245 Tk
104. 8 3 Conditional The if conditional consists of a group of statements with the same o number that start with if and end with endif Optional elseif and else conditions may be between the starting if and the ending endif If the if conditional evaluates to true then the group of statements following the if up to the next conditional line are executed If the if conditional evaluates to false then the elseif conditions are evaluated in order until one evaluates to true If the elseif condition is true then the statements following the elseif up to the next conditional line are executed If none of the if or elseif conditions evaluate to true then the statements following the else are executed When a condition is evaluated to true no more conditions are evaluated in the group If Endif Example o101 if 31 EQ 3 if parameter 31 is equal to 3 set 2000 2000 0101 endif If ElseIf Else EndIf Example o102 if 2 GT 5 if parameter 2 is greater than 5 set F100 F100 0102 elseif 2 LT 2 else if parameter 2 is less than 2 set F200 F200 0102 else else if parameter 2 is 2 through 5 set F150 F150 0102 endif Several conditons may be tested for by elseif statements until the else path is finally executed if all preceding conditons are false If Elseif Else Endif Example 0102 if 2 GT 5 if parameter 2 is greater than 5 set F100 F100 0102 elseif 2 LT 2 else if parameter 2 less than 2 set F200 F20 User Manual V2 6
105. A be Oe ee ee ee 116 103 3 IMERSTES 65 bo ee ele ee ee ee ook ee Ree e Gee LG es 116 WO TNE ETN ece pedan 8 amp ye a Bae et echt BE gh Bl ge Ace ete AS 116 106 Program Editor es soere ad a e a ad ea be ae ee ea he 117 106 2 Backplot DiS phy 5 ce A OR OA eae E Dee eae BSS eRe e OS 118 Wes TOTE ok eee eee e SE SG SS SEES AGRE ERS SER 118 INGA Oiltsel Page ba ee era bee bee hae ee Aa eee ee Ae ee 119 10 7 Keyboard Bindings se a ee a a A ae A Cao Pe a ek 120 ME COMIDAS x ee Sd bok eS Eas Saeed 4 Ee og te Be ee Ce res 120 Ws Mamak hide lt a ee A Oe eee Re ee Ee Be A PR Pee e e 121 O73 AWo Mode AI 122 TOS MBE co o ee ee ee ba a BEE EERE Ae we ee eee i 122 User Manual V2 6 11 34 gff59490 2015 12 16 vii 11 KEYSTICK GUI 123 LT TOGMeHGN ia o eh a o Ga A e ae OR ee ee ee A a e id e da 123 UD Mestalla iia a a RE Se AA A A a Ed ee 124 VS SDE a o A pb BER Pe E aOR ee ee bow a Y td O 124 HI Using LinuxCNC 125 12 CNC Machine Overview 126 12 1 Mechanical COmponeniS sun 3 ee Ok KEY RR RE A Ee REE 126 V2 Axes fee eb eed SSA ES Eee SEY ME ERNE SESS RRR EP EEE ew RR eSES ES 126 W202 Spe sre a a ee ee ee Rw eee Ele eR Ree a Ge al ee 126 E ARE AIR E 126 2 14 Peed and Speed tiveness oe A AE 127 121 5 Block Delete Much cc resi EG ees Be ee EE Rew A Sees Ea ae Be 127 12 6 Optional Program Stop Switel c o s 5 6445 655 be wR Re ee Re bee we ee 127 12 2 Control and Data Components a RS a RS A ee 127 122 1 LN ARES casar Ba ee
106. Cover Texts If your document contains nontrivial examples of program code we recommend releasing these examples in parallel under your choice of free software license such as the GNU General Public License to permit their use in free software User Manual V2 6 11 34 gff59490 2015 12 16 250 253 Chapter 26 Index axisrc 42 A acme screw 241 Arc Distance Mode 200 Arc Move 167 Auto 113 122 AXIS 26 40 axis 241 Axis GUI 26 AXIS in lathe mode 40 Axis Menu 28 Axis Preview Control 43 AxisUI coolant 36 feed override 36 jog speed 37 keyboard shortcuts 37 Max Velocity 37 MDI 36 spindle 35 spindle speed override 37 B backlash 241 backlash compensation 241 backplot 118 ball nut 241 ball screw 241 Block Delete 145 block delete 129 break 215 C call 215 Calling Files 217 CNC 28 242 CNC Machine Overview 126 comp 242 Conditional if elseif else 216 CONFIGURATION SELECTOR 24 continue 215 controlled point 127 coolant 36 126 128 coordinate measuring machine 242 Coordinate System 131 D Debug Messages 159 display units 242 do 215 DRO 242 Dwell Feed Out 199 dwell 128 E EDM 242 else 216 elseif 216 else 216 EMC 242 EMCIO 242 EMCMOT 242 encoder 242 endif 216 endsub 215 endwhile 215 ESTOP 31 External Editor 42 F F Set Feed Rate 219 feed 242 Feed Out 198 199 feed override 36 116 127 feed rate 128 242 f
107. Cycle GIG P B TS UE RS k Oe lle m ll K Ti Soe Thread Depth Pitch Initial Position xk F End Position Length af Threads Figure 16 3 G76 Threading Drive Line A line through the initial X position parallel to the Z P The thread pitch in distance per revolution Z The final position of threads At the end of the cycle the tool will be at this Z position Note When G7 Lathe Diameter Mode is in force the values for J and K are diameter measurements When G8 Lathe Radius Mode is in force the values for J and K are radius measurements I The thread peak offset from the drive line Negative I values are external threads and positive J values are internal threads Generally the material has been turned to this size before the G76 cycle e J A positive value specifying the initial cut depth The first threading cut will be J beyond the thread peak position e K A positive value specifying the full thread depth The final threading cut will be K beyond the thread peak position User Manual V2 6 11 34 gff59490 2015 12 16 189 253 Optional settings R The depth degression R1 0 selects constant depth on successive threading passes R2 0 selects constant area Values between 1 0 and 2 0 select decreasing depth but increasing area Values above 2 0 select decreasing area Beware that unnec essarily high degression values will cause a large number of passes to be used de
108. D_Chips nge Status idle Open Run Pause Resume Step Verify Optional Stop N6671 Y56 061 2 26 146 N6661 Y56 1052 27 694 N6091Y56 112 27 038 N6901Y56 1282 27 634 N6911GO0Z10 N6931 M9 Figure 9 1 TkLinuxCNC Window User Manual V2 6 11 34 gff59490 2015 12 16 104 253 9 2 Getting Started To select TkLinuxCNC as the front end for LinuxCNC edit the ini file In the section DISPLAY change the DISPLAY line to read DISPLAY tklinuxcnc Then start LinuxCNC and select that ini file The sample configuration sim tklinuxcnc tklinuxcnc ini is already configured to use TkLinuxCNC as its front end 9 2 1 A typical session with TkLinuxCNC 1 Start LinuxCNC and select a configuration file 2 Clear the E STOP condition and turn the machine on by pressing F1 then F2 3 Home each axis 4 Load the file to be milled 5 Put the stock to be milled on the table 6 Set the proper offsets for each axis by jogging and either homing again or right clicking an axis name and entering an offset value 7 Run the program 8 To mill the same file again return to step 6 To mill a different file return to step 4 When you re done exit LinuxCNC 9 3 Elements of the TkLinuxCNC window The TkLinuxCNC window contains the following elements e A menubar that allows you to perform various actions e A set of buttons that allow you to change the current working mode start stop spindle and other relevant I O e Status
109. EMBED TAB NAME Second user tab Ss o AB_LOCATION ntb_preview MBED_TAB_COMMAND gladevcp x XID vcp_box glade all you have to take care off is that you include for every tab or side panel the mentioned three lines EMBED_TAB_NAME represents the name of the tab or side panel it is up to you what name you use but it must be present EMBED_TAB_LOCATION is the place where your program will be placed in the GUI valid values are valid values are ntb_user_tabs as main tab covering the complete screen ntb_preview as tab on the preview side box_left on the left complete high of the screen box_right on the right in between the normal screen and the button list box_coolant_and_spindle will hide the coolant and spindle frames and introduce your glade file here box_cooling will hide the cooling frame and introduce your glade file box_spindle will hide the spindle frame and introduce your glade file box_vel_info will hide the velocity frames and introduce your glade file box_custom_1 will introduce your glade file left of vel_frame box_custom_2 will introduce your glade file left of cooling_ frame box_custom_3 will introduce your glade file left of spindle_frame box_custom_4 will introduce your glade file right of spindle_frame see the different INI files included to see the differences EMBED_TAB_COMMAND is the c
110. Es cS es eect ee NA 222 PUA Euler Compensi 00 eee oe ey ed oe Ee eee Ge ee o RSS heels Se 222 20 2 Lathe Examples ooo 2 Ga eo Rea ba ea ae ea ee ee eA ea ee 222 U2 WHAM oc See ces oe MUR Poe a we Bk eo e SE Ge ale Se ee SS de 222 21 Lathe User Information 223 2d Ente MOSS oko a ee MA ee hoe he ee ee a ak ke eee be te PG Se amp ow A 223 212 Las Teel Table suse e we Cale eee he at RARE A owe OG ee 223 213 Lathe Tool Onentahom os ies a ES a a E a a a 223 2102 Ton Tamer oa ros Be in td Sie Oe ow reed A SE eS a da 227 214 AVRO ereere Bee Re ae BRA GS Ea Hae eee HOR EE E 227 User Manual V2 6 11 34 gff59490 2015 12 16 xiii 22 23 ES AN E eg ek eek ty bP a ee AN 227 21S The Nace MEE fon kb keh eet heehee s eh s LE SEES ES eres 48 228 21 5 Spindle Synchronized Motion oo a Ew E 228 PAM ER NR eee ee oY 228 21 6 1 Ares and Lathe Desion 3 a dade BO a a ee a hee ee A 229 2102 Radios Diameter Mods cocoa aa RG Bake ae aS wagon ee 229 hie DOGS soe aa a hens eS ee Sees GA ok oe ee be eS ee hee be a 229 217 1 Control Point occ 6b be ee ea PERE eA eee ea awh See hae es 229 21 7 2 Cutting Angles without Cutter Comp 2 554252 Gee Gees oe BG Reon ee SSS 230 2a Citira RS oe os ee ek KUN oO eee Se E SS A OSS 231 21 74 Using Cutter Comp 2 55444 54402 e44 bese ea eat et eae bea Sew ee hea eee 233 RS274 NGC Differences 234 22 1 Chances from RSEZSMINOO oe ecas cb ba a A EA RA ee ee AE a E 234 222 Additions TH ES2IA GO co de EEE ERAS LEMS eR
111. G Code D MO M5 M9 M48 M53 o Feed Override 100 F e G8 G10 G18 G21 G40 G49 G54 G64 5 o G80 G90 G91 1 G94 G97 G99 Foo 100 33 Program 100 N fhomejemem nuxcncinc_filestexamples lathe_pawn ngc 0 0 6000 O Fia f a i e et se ta As you see the R DRO has a black background and the D DRO is gray This will change according to the active G Code G7 or G8 The active mode is visible by the black background meaning in the shown images G8 is active The next difference to the standard screen is the location of the Jog Button X and Z have changed places and Y is gone You will note that the X and X buttons changes there places according to normal or back tool lathe Also the keyboard behavior will change Normal Lathe e Arrow Left Z minus e Arrow Right Z plus e Arrow up X minus e Arrow Down X plus Back Tool Lathe e Arrow Left Z minus e Arrow Right Z plus e Arrow up X plus User Manual V2 6 11 34 gff59490 2015 12 16 80 253 e Arrow Down X minus The tool information frame will show not only the Z offset but also the X offset and the tool table is showing all lathe relevant information 6 9 Plasma specific section Program to mill a flowsnake K Lerman z lt level gt 1 lt startx gt 2 lt starty gt 3 9 lt endX gt 4 10 lt endY gt 5 A 11 Ibe 12 01001 if lt level gt EQ 0 1 2 3 4 01000 sub 6 7 8 13 g1 f10 x lt e
112. GC Differences 22 1 Changes from RS274 NGC DIFFERENCES THAT CHANGE THE MEANING OF RS274 NGC PROGRAMS Location after a tool change In LinuxCNC the machine does not return to its original position after a tool change This change was made because the new tool might be longer than the old tool and the move to the original machine position could therefore leave the tool tip too low Offset parameters are ini file units In LinuxCNC the values stored in parameters for the G28 and G30 home locations the P1 P9 coordinate systems and the G92 offset are in ini file units This change was made because otherwise the meaning of a location changed depending on whether G20 or G21 was active when G28 G30 G10 L2 or G92 3 is programmed Tool table lengths diameters are in ini file units In LinuxCNC the tool lengths offsets and diameters in the tool table are specified in ini file units only This change was made because otherwise the length of a tool and its diameter would change based on whether G20 or G21 was active when initiating G43 G41 G42 modes This made it impossible to run G code in the machine s non native units even when the G code was simple and well formed starting with G20 or G21 and didn t change units throughout the program without changing the tool table G84 G87 not implemented G84 and G87 are not currently implemented but may be added to a future release of LinuxCNC G28 G30 with axis words When G28 or G30 is pr
113. GG aS RG Ee wae eo 106 O24 1 Buttons forcontial 2 06 65 64 0264 eee baa ee Ea REA ee eae bea eee 106 9342 Text Prosram Display ATL oo a oe Oe Re Os EG Aw ee ee e Y 106 9 3 5 Manual Control ss 2 5866 bbe Bebe eR RR REE RES DERE a Ae ae a 106 Dl lip Kee oc i he A eS ee ee ee bee hehehe a ee 106 830 2 The spindle group 5 pe eee ee ee es ee eee Se be Se 107 Sis Se OO BIO sss Sele teeth ie eS ee ee ee Be A Gee ie S 107 9 36 COEM lt lt See ea ea ee ee wae ee ea a ba hed ae deere 8 107 gzel MBE ek a eh Ae aa ke BA Se RS BAS SO oe RA we Oe a ee Sh 107 e ROVERS AAA 107 gF JOP Speed AI ANT 108 238 Peed OWN ee Ae Bee oa 108 9 39 Spindle speed vertida sc cios ee ee ea hee wa ee a eo 108 Sa Keybord RAN 108 MINI GUI 109 10 1 UnOduenen ok a ee ae eee eS eee Bh DR E e de dd a we 109 VEZ Screen yO o a A Eee EAE eae eae hae ee eA Gea a 110 IS Meni Dat o eb e ee a Pe eR ee we Geek ea Eee ee ee ees a 111 104 Conitol Balton Bar oe x oe Eee eS RA A EA SSS Se Soe EE ee oe 112 MAT MANUAL 2a bbe a ee ee eee be ale DER ea Ree ae Sea ee 112 A2 AUTO ope ek aori a Be ee ew Ry So Bee Oe Oe Oh eS aoe amp e s 113 WAS MIE 60s 6 hee eee ES A be EMSS SSP ERE eee KS SS 114 10 44 FEEDHOLD CONTINUE ooo e 114 IAS ABORT 200 a A RES a A E be A de 114 We ESTOP e ore Pe Be o A o a area ti A e a Ss we 115 VES LR lO oe A A A Oe e A A da 115 105 1 Axis Position Displays ccoo coso be SS RR e ee a we a 115 10 532 Fedra Oved o 2 be ce ek ee bh e e
114. I_OPTIONS optl opt2 DISPLAY NGCGUI_OPTIONS nonew noremov Multiple options are separated by blanks By default ngcgui configures tab pages so that 1 a user can make new tabs a user can remove tabs except for the last remaining one 2 3 finalized files are 4 automatically sent to linuxCNC an image frame iframe is made available to display an image for the subfile if an image is provided 5 the ngcgui result file sent to linuxCNC is terminated with an m2 and incurs m2 side effects The options nonew noremove noauto noiframe nom2 respectively disable these default behaviors By default if an image png gif jpg pgm file is found in the same directory as the subfile the image is displayed in the the noiframe option makes for selecting a preamble additional checkboxes S amp S iframe Specifying available additional buttons subfile and postamble and lections of the checkboxes are always available with special keys Ctrl R Toggle Retain values on Subfile read Ctrl E Toggle Expand subroutine Ctrl a Toggle Autosend Ctrl k lists all keys and functions If noiframe is specified and an image file is found the image is displayed in a separate window and all functions are available on the tab page The NGCGUI_OPTIONS apply to all ngcgui tabs except that the nonew noremove and noiframe options are
115. If another value is selected the machine will move exactly the displayed distance each time the button is clicked or the key is pressed The available values are 1 0000 0 1000 0 0100 0 0010 0 0001 By pressing Home or the HOME key the selected axis will be homed Depending on your configuration this may just set the axis value to be the absolute position 0 0 or it may make the machine move to a specific home location through use of home switches See the Integrator Manual for more information on homing By pressing Override Limits the machine will temporarily be permitted to jog outside the limits defined in the ini file Note if Override Limits is active the button will be displayed using a red color User Manual V2 6 11 34 gff59490 2015 12 16 107 253 override limits continuous f continuous l 0 0001 o 0 0010 0 0100 1 0000 Figure 9 3 TkLinuxCNC Override Limits amp Jogging increments example 9 3 5 2 The Spindle group The button on the first row selects the direction for the spindle to rotate Counterclockwise Stopped Clockwise The buttons next to it allow the user to increase or decrease the rotation speed The button on the second row allows the spindle brake to be engaged or released Depending on your machine configuration not all the items in this group may have an effect 9 3 5 3 The Coolant group The two buttons allow the Mist and Flood coolants to be turned on and off Depen
116. M 300 gt a Spindle bar min Spindle bar max 6000 Turtle Jog Hide turtle Jog Button 7 z Turtle jog Factor 207 delete MDI TE Cl ladder Hal Scope Status Hal Meter Calibration Halshow Hardware MPG Scales For the different Hal Pin to connect MPG Wheels to you may select individual scales to be applied The main reason for this was my own test to solve this through hal connections resulting in a very complex hal file Imagine a user having an MPG Wheel with 100 ipr and he wants to slow down the max vel from 14000 to 2000 mm min that needs 12000 impulses resulting in 120 turns of the wheel Or an other user having a MPG Wheel with 500 ipr and he wants to set the spindle override witch has limits from 50 to 120 so he goes from min to max within 70 impulses meaning not even 1 4 turn By default all scales are set using the calculation MAX MIN 100 Keyboard shortcuts Some users want to jog there machine using the keyboard buttons and there are others that will never allow this So everybody can select whether to use them or not Default is to use keyboard shortcuts Please take care if you use a lathe than the shortcuts will be different See the Lathe section e Arrow Left X minus e Arrow Right X plus e Arrow up Y plus User Manual V2 6 11 34 gff59490 2015 12 16 75 253 e Arrow Down Y minus e Page Up Z plus e Page Down Z minus e F1 Estop will work even if keyboard shortcuts are dis
117. NE ESAS a oa a r E A E A AAA AE AS AS ox 159 153 22C0omment Parameters oso ee ba wee eee be en Sad dd 159 I2 Fie Requirements es Se pe a AE OR ke eee Oe EE ee ee 6 oe 160 o ee ie Oe ae ae ey es Gs ME es Se a ee te eS i RA 160 13 230 Code Order of EXEC e o o ee ba we eee be en Sad eh OER Edw eS 160 ab Code Best Practices ks Seay ee eB A OS ee PO Re Sew Be oe s 161 15 26 1 Use an appropriate decimal precision s o oce cecs RG ERR EG eee ee 161 15 26 2 Use consistent Whitespace a ee a ea eae ee 161 15 20 2 Use Center TOMAC BIOS or e 0 ec Ve EE OR ee Oe ee He YB ee Ge x 161 13 264 Put important modal settings at the top of the fle 2 ee RR ee ee ee 161 13 26 35 Don t put too many things on one line lt s cs ee a ee ee ee eae eee 161 15 26 6 Don t set amp use a parameter on the same ling lt s ee e ecet aoe s ook Ree RR ey VERS eS Os 161 15 20 72 Don tuse WARS NUMBERS iaa Sa GS RS SR ORS ASG OS Me Oe RS Bey ee ee 162 12 Lien and Rotary ARIS ea kh hh dt eh ESA bee eee eee ESE SSA 162 1522 Common Error Messager o nk ei Wak eH a YO eee ey eB ee ee ee E 162 A Numbered Parameters persistence 163 16 G Codes 164 DOE ECONO ii ee Re A Ra aR Ae Oe he Oe Ra eee ob ae 164 16 2 G Code Quick Reference Table lt s s o c 24 4648 6245 be BOE EAA Re ae Re eS 164 16 3 30 Rapid MOVE ica AA we we E ER Dee hee ee eee ho 165 16 3 Rapid Velocity Rate 2 2 5 55 a pda Pa OR ee ee paw Ee wR A ES eS 166 16 4 G1 Lanear Move oo e cn ee ba R
118. O J le Reload current file Ctrl R User Manual V2 6 11 34 gff59490 2015 12 16 32 253 p Begin executing the current file R y Execute next line T Pause Execution P Resume Execution S Stop Program Execution ESC L Toggle Skip lines with Alt M 7 ag Toggle Optional Pause Alt M 1 E Zoom In Zoom Out IZ e Top view mei N Rotated Top view e 4 Side view e Front view J Perspective view a e Toggle between Drag and Rotate Mode D ds Clear live backplot Ctrl K 5 3 3 Graphical Display Area Coordinate Display In the upper left corner of the program display is the coordinate display It shows the position of the machine To the left of the axis name an origin symbol is shown if the axis has been homed A limit symbol is shown if the axis is on one of its limit switches E To properly interpret these numbers refer to the Position indicator in the status bar If the position is Absolute then the displayed number is in the machine coordinate system If it is Relative then the displayed number is in the offset coordinate system When the coordinates displayed are relative and an offset has been set the display will include a cyan machine origin marker oS User Manual V2 6 11 34 gff59490 2015 12 16 33 253 If the position is Commanded then it is the ideal position for instance the exact coordinate given in a GO
119. S aloe File Machine View Help lt gt ER Oole Blja Z N x je gl b Manual Control F3 MDI F5 Preview DRO Axis Feed Override 100 D Jog Speed 16 in min f Max Velocity 72 in min AXIS splash g code Not intended for actual milling q To run this code anyway you might have to Touch Off the Z axis depending on your setup As if you had some material in your mill 4 Hint jog the Z axis down a bit then touch off 5 Also press the Toggle Skip Lines with to see that part If the program is too big or small for your machine change the scale 3 font usr share fonts truetype freefont FreeSerifBoldItalic ttf text EMC2 5 AXIS ESTOP No tool Position Relative Actual Figure 5 1 AXIS Window 5 2 Getting Started If your configuration is not currently set up to use AXIS you can change it by editing the ini file In the section DISPLAY change the DISPLAY line to read DISPLAY axis The sample configuration sim axis ini is already configured to use AXIS as its front end 5 2 1 A Typical Session 1 Start LinuxCNC 2 Reset E STOP F1 and turn the Machine Power F2 on 3 Home all axes User Manual V2 6 11 34 gff59490 2015 12 16 28 253 Load the g code file Use the preview plot to verify that the program is correct Load the material Set the proper offset for each axis by jogging and using the Touch Off button as needed oN A a A
120. The first directory searched is DISPLAY PROGRAM_PREFIX You can use this directory but it is better practice to create dedicated directory ies and put them at the beginning of the RS274NGC SUBROUTINE_PATH In the following example files in home myname linuxcnc mysubs will be found before files in nc_files ngcgui_lib Adding User Directory Example RS274NGC SUBROUTINE_PATH home myname linuxcnc mysubs nc_files ngcgui_lib e nc_files ngcgui_lib utilitysubs New users may inadvertently try to use files that are not structured to be compatible with ngcgui requirements Ngcgui will likely report numerous errors if the files are not coded per its conventions Good practice suggests that ngcgui compatible subfiles should be placed in a directory dedicated to that purpose and that preamble postamble and helper files should be in separate directory ies to discourage attempts to use them as subfiles Files not intended for use as subfiles can include a special comment not_a_subfile so that ngcgui will reject them automatically with a relevant message 7 5 6 Summary of INI File item details for NGCGUI usage Item RS274NGC SUBROUTINE_PATH dirnamel dirname2 dirname3 Example RS274NGC SUBROUTINE_PATH nce_files ngcgui_lib nc_files gt ngcgui_lib utilitysubs Note Optional but very useful to organize subfiles and utility files User Manual V2 6 11 34 gff59490 2015 12 16 92 253
121. User Manual V2 6 11 34 gff59490 2015 12 16 User Manual V2 6 11 34 gff59490 2015 12 16 User Manual V2 6 11 34 gff59490 2015 12 16 ii Contents I LinuxCNC Introduction 1 1 User Foreword 3 2 LinuxCNC User Introduction 5 A Mammal ee hea ee eee he ea wee be kb Pe eae SGA ode le 5 2 2 How Lin xCNG WODKS osos ae AS eR we ee eS eo a ee Bee 5 Za Grapmeal User biterinces so edb Se AAA AAA a 4 6 2A Vital Control Panslgs cos oi A ad a a so 13 Poy ILABUIBES io A OR ee O RA EE e ee a 15 20 Thinking Like a Machine 2pergunr no e wa Se oa Eee A WEE SSeS ee ox 15 20 Modes of Operation oo ee he eee Se Bae a eA ea PRA e 15 3 Important User Concepts 17 SL TIMES rar A EERE See we eee ee Eee eRe Se ee e 17 3 1 1 Trajectory Planong 0 5 46 4 we Re EONS REE ERO ae ER ea a ol be eae we n 17 24 2 Path Pouowing oesi eere ii A ee hE ee hee a eae SO 17 2 U2 Programming the Ponner s p cee pc ee ee RR Re Ew a Pe ee ee ee oS 17 31 34 Planning Moves o cucos he Re ado RES eR ee Ee as 18 Sa AUS Ga at e ge u eS DE ORE ESOS ea ee Eee See RS EGS ES AREA 19 S21 Weal cc ene eh eee AA Oe aOR OE A a A ee a a 19 32a Peed Kate o o lepa a ie Pe AS RES ee a oe hh ae a 19 ood Tool Radws LINGER eS ee Se ee OE eae eA AS oe wee eee ox 19 O CAE so pk ee Se a ee ee eB PA Oe ae a Sd A a OR do ew ee 19 34A TOGICINAADES cope se epa eR Ae Be ee Se ERS we we we we a ee we a 19 So CAMAS o EE i a Seek e te Spe ADRIAN oe wee ee ox 20 33 1 G53Machine
122. _TEXT This is a lt span background ff0000 foreground ffffff gt info gt message lt span gt test ESSAGE_TYPE status ESSAGE_PINNAME statustest ESSAGE_TEXT This is a yes no dialog test ESSAGE_TYPE yesnodialog ESSAGE_PINNAME yesnodialog ESSAGE_TEXT Text can be lt small gt small lt small gt lt big gt big lt big gt lt b gt bold lt b gt lt lt lt i gt italic lt i gt and even be lt span color red gt colored lt span gt ESSAGE_TYPE okdialog ESSAGE_PINNAME okdialog The specific hal pin conventions for these can be found under the User Messages hal pin section 6 4 2 The RS274NGC Section RS274NGC SUBROUTINE_PATH macros sets the path to search for macros and other subroutines 6 4 3 The MACRO Section You can add macros to gmoccapy similar to touchy s way A macro is nothing else than a ngc file You are able to execute complete CNC programs in MDI mode by just pushing one button To do so you have to add a section like so MACROS MACRO i_am_lost MACRO halo_world MACRO jog_around MACRO increment xinc yinc MACRO go_to_position X pos Y pos Z pos This will add 5 macros to the MDI button list Please note that maximal 9 macros will appear in the GUI due to place reasons But it is no error placing more in your INI file User Manual V2 6 11 3
123. a line immediately below the tool info that shows what offsets have been applied This is a total distance for each axis from machine zero Show_Restart adds a block of buttons to the right of the program display in auto mode These allow the operator to restart a program after an abort or estop These will pop in whenever estop or abort is pressed but can be shows by the operator anytime auto mode is active by selecting this menu item Hide_Restart removes the block of buttons that control the restart of a program that has been aborted or estopped Show_Split_Right changes the nature of the right hand column so that it shows both mode and pop in information Show_Mode_Full changes the right hand column so that the mode buttons or displays fill the entire right side of the screen In manual mode running with mode full you will see spindle and lube control buttons as well as the motion buttons Show_Popin_Full changes the right hand column so that the popin fills the entire right side of the screen e Settings These menu items allow the operator to control certain parameters during a run Actual_Position sets the main position displays to actual machine based values Commanded_Position sets the main position displays to the values that they were commanded to Machine_Position sets the main position displays to the absolute distance from where the machine was homed Relative_Position sets the m
124. abled e F2 Machine on e ESC Abort There are additional keys for message handling see Message behavior and appearance WINDOWS Delete last message lt STRG gt lt SPACE gt Delete all messages Unlock options you have three options to unlock the settings page e use unlock code the user must give a code to get in e Do not use unlock code There will be no security check not recommended e Use hal pin to unlock hardware pin must be high to unlock the settings see hardware unlock pin Default is use unlock code default 123 Spindle The start RPM sets the rpm to be used if the spindle is started and no S value has been set With the MIN and MAX settings you set the limits of the spindle bar shown in the INFO frame on the main screen It is no error giving wrong values If you give a maximum of 2000 and your spindle makes 4000 rpm only the bar level will be wrong on higher speeds than 2000 rpm default values are MIN 0 MAX 6000 Turtle Jog This settings will have influence on the jog velocities hide turtle jog button will hide the button right of the jog velocity slider if you hide this button please take care that it shows the rabbit icon otherwise you will not be able to jog faster than the turtle jog velocity which is calculated using the turtle jog factor Turtle jog factor sets the scale to apply for turtle jog mode If you set a factor of 20 the max jog velocity will be 1 20 of max velocity of the machin
125. achining center maintains an array of numerical parameters defined by a system definition RS274NGC_MAX_ PARAMETERS Many of them have specific uses especially in defining coordinate systems The number of numerical parameters can increase as development adds support for new parameters The parameter array persists over time even if the machining center is powered down LinuxCNC uses a parameter file to ensure persistence and gives the Interpreter the responsibility for maintaining the file The Interpreter reads the file when it starts up and writes the file when it exits All parameters are available for use in G code programs The format of a parameter file is shown in the following table The file consists of any number of header lines followed by one blank line followed by any number of lines of data The Interpreter skips over the header lines It is important that there be exactly one blank line with no spaces or tabs even before the data The header line shown in the following table describes the data columns so it is suggested but not required that that line always be included in the header The Interpreter reads only the first two columns of the table The third column Comment is not read by the Interpreter Each line of the file contains the index number of a parameter in the first column and the value to which that parameter should be set in the second column The value is represented as a double precision floating point number ins
126. ack Boring 199 G88 Boring Cycle Spindle Stop Manual Out 199 G89 Boring Dwell Feed Out 199 G90 G91 Distance Mode 199 G91 Distance Mode 199 G92 Coordinate System Offset 200 G93 G94 G95 Feed Rate Mode 201 G94 G95 Feed Rate Mode 201 G95 Feed Rate Mode 201 G96 G97 Spindle Control Mode 201 G97 Spindle Control Mode 201 G98 G99 Canned Cycle Return 202 G99 Canned Cycle Return 202 GMOCCAPY 44 gmoccapy 44 GUI 241 243 H HAL 243 home 243 I if 216 Image to G Code 236 Indirection 217 INI 243 Instance 243 J jog 243 jog speed 37 joint coordinates 243 K keyboard shortcuts 37 KEYSTICK 123 kinematics 243 L Lathe User Information 223 lead screw 243 Line Number 145 Linear Move 166 Linux 6 LinuxCNC User Introduction 5 Logging 159 loop 244 Looping 215 M M Codes 203 MO Program Pause 203 M1 Program Optional Pause 203 User Manual V2 6 11 34 gff59490 2015 12 16 252 253 M100 to M199 User Defined Commands 212 M19 Orient Spindle 205 M2 Program End 204 M3 Spindle CW 204 M30 Program End 204 M4 Spindle CCW 204 M48 M49 Override Control 206 M49 Override Control 206 M5 Spindle Stop 204 M50 Feed Override Control 206 M51 Spindle Speed Override 206 M52 Adaptive Feed Control 207 M53 Feed Stop Control 207 M6 Tool Change 204 M60 Pallet Change Pause 204 M61 Set Current Tool Number 207 M62 to M65 Output Control 20
127. ailable 14040 A G Code D 100 MO M5 M9 M48 M53 F o Feed Override e G8 G17 G21 G40 G49 G54 G64 G80 5 o G90 G91 1 G94 G97 G99 FO 100 3 Program 100 16 10 47 fhome emcm ols_with_cutter_radius_compensation ngc 9 0 6000 O 28 11 2015 af 4 o t w e at i Y ta 6 2 Requirements Gmoccapy has been tested on UBUNTU 10 04 and 12 04 and DEBIAN Wheesy with LinuxCNC 2 6 2 7 master and ma chinekit if you use other versions please inform about problems or solutions on the forum or the emc users mailing list in German Peters CNC Ecke in English gmoccapy on linuxenc The minimum screen resolution for gmoccapy using it without side panels is 979 x 750 Pixel so it should fit to every standard screen 6 3 How to get gmoccapy Beginning with LinuxCNC 2 6 gmoccapy is included in the standard installation So the easiest way to get gmoccapy on you controlling PC is just to get the actual ISO and install from the CD DVD USB Stick If you do have already installed an earlier LinuxCNC version check how to update here You will receive updates with the regular deb packages You will get a similar screen to the following The design may variate depending on your config User Manual V2 6 11 34 gff59490 2015 12 16 46 253 ze AJA A gt Tool information Max Velocity Cooling Spindle rpm lo Too no Diameter offset z a o o 0 000 vel S 3500 A No tool description available G Code MO M5 M9 M48 M53 o p Feed Ove
128. ain position displays to show the current position including any offsets like part zeros that are active For more information on offsets see the chapter on coordinate systems e Info lets you see a number of active things by writing their values into the MESSAGE pad Program_File will write the currently active program file name Editor_File will write the currently active file if the editor pop in is active and a file has been selected for editing Parameter_File will write the name of the file being used for program parameters You can find more on this in the chapters on offsets and using variables for programming Tool_File will write the name of the tool file that is being used during this run User Manual V2 6 11 34 gff59490 2015 12 16 112 253 Active_G Codes will write a list of all of the modal program codes that are active whenever this item is selected For more information about modal codes see the introductory part programming chapter e Help opens a text window pop in that displays the contents of the help file You will notice between the info menu and the help menu there are a set of four buttons These are called check buttons because they have a small box that shows red if they have been selected These four buttons Editor Backplot Tools and Offsets pop in each of these screens If more than one pop in is active button shown as red you can toggle between these pop ins by right clicking your mou
129. alue of the max velocity for jogging in machine units per second Note If no value is given a value of 60 will be applied MAX_FEED_OVERRIDE 1 5 Sets the maximum feed override in the example given you will be allowed to override the feed by 150 MAX_SPINDLE_OVERRIDE 1 2 MIN_SPINDLE_OVERRIDE 0 5 will allow you to change the spindle override within a limit from 50 to 120 LATHE 1 BACK_TOOL_LATHE 1 the first line set the screen layout to control a lathe The second line is optional and will switch the X axis in a way you need for a back tool lathe Also the keyboard shortcuts will react in a different way Tip See also LATHE specific section PROGRAM_PREFIX nc_files Is the entry to tell linuxcnc gmoccapy where to look for the ngc files Note if not omitted we will look in the following order jinuxcne nc_files Configuration of tabs and side panels You can add embedded programs to gmoccapy like you can do in axis touchy and gscreen All is done by gmoccapy automatically if you include a few lines in your INI file in the DISPLAY section If you never used a glade panel I recommend to read the excellent documentation Glade VCP User Manual V2 6 11 34 gff59490 2015 12 16 49 253 Example EMBED_TAB_NAME DRO EMBED_TAB_LOCATION ntb_user_tabs EMBED_TAB_COMMAND gladevcp x XID dro glade
130. apered threads Technical Info At the beginning of each G33 pass LinuxCNC uses the spindle speed and the machine acceleration limits to calculate how long it will take Z to accelerate after the index pulse and determines how many degrees the spindle will rotate during that time It then adds that angle to the index position and computes the Z position using the corrected spindle angle That means that Z will reach the correct position just as it finishes accelerating to the proper speed and can immediately begin cutting a good thread HAL Connections The pins motion spindle at speed and the encoder n phase Z for the spindle must be connected in your HAL file before G33 will work See the Integrators Manual for more information on spindle synchronized motion G33 Example G90 absolute distance mode COSAS E apra tos poste S100 M3 start spindle turning G33 Z 2 K0 125 move Z axis to 2 at a rate to equal 0 125 per revolution GO X1 25 rapid move tool away from work Z0 1 rapid move to starting Z position M2 end program e See G90 amp GO amp M2 sections for more information It is an error if e All axis words are omitted e The spindle is not turning when this command is executed e The requested linear motion exceeds machine velocity limits due to the spindle speed 16 22 G33 1 Rigid Tapping GIS K we B K e K distance per revolution User Manual V2 6 11 34 gff59490 2015 12 16 181 253 For rigid ta
131. apter for more information on G64 P Q Blending without tolerance The controlled point will touch each specified movement at at least one point The machine will never move at such a speed that it cannot come to an exact stop at the end of the current movement or next movement if you pause when blending has already started The distance from the end point of the move is as large as it needs to be to keep up the best contouring feed Naive Cam Detector Successive G1 moves that involve only the XYZ axes that deviate less than Q from a straight line are merged into a single straight line This merged movement replaces the individual G1 movements for the purposes of blending with tolerance Between successive movements the controlled point will pass no more than P from the actual endpoints of the movements The controlled point will touch at least one point on each movement The machine will never move at such a speed that it cannot come to an exact stop at the end of the current movement or next movement if you pause when blending has already started On G2 3 moves in the G17 XY plane when the maximum deviation of an arc from a straight line is less than the G64 Q tolerance the arc is broken into two lines from start of arc to midpoint and from midpoint to end those lines are then subject to the naive cam algorithm for lines Thus line arc arc arc and arc line cases as well as line line benefit from the naive cam detector This improves
132. arting in username s home directory Relative Paths Relative paths are based on the startup directory which is the directory containing the INI file Using relative paths can facilitate relocation of configurations but requires a good understanding of linux path specifiers d0 is the same as d0 e g a directory named d0 in the startup directory AT refers to a directory dl in the parent directory safe FOZ refers to a directory d2 in the parent of the parent directory AMAS SEE Multiple directories can be specified with RS274NGC SUBROUTINE_PATH by separating them with colons The following example illustrates the format for multiple directories and shows the use of relative and absolute paths Multiple Directories Example RS274NGC SUBROUTINE_PATH nc_files ngcgui_lib nc_files ngcgui_lib utilitysubs tmp tmpngc This is one long line do not continue on multiple lines When linuxCNC and or ngcgui searches for files the first file found in the search is used LinuxCNC and ngcgui must be able to find all subroutines including helper routines that are called from within ngcgui subfiles It is convenient to place utility subs in a separate directory as indicated in the example above The distribution includes the ngcgui_lib directory and demo files for preambles subfiles postambles and helper files To modify the behavior of the files you can copy any file and place it in an earlier part of the search path
133. ation to the power on the right The relational operators are equality EQ inequality VE strictly greater than GT greater than or equal to GE strictly less than LT and less than or equal to LE The binary operations are divided into several groups according to their precedence see table Operator Precedence If operations in different precedence groups are strung together for example in the expression 2 0 3 1 5 5 5 11 0 operations in a higher group are to be performed before operations in a lower group If an expression contains more than one operation from the same group such as the first and in the example the operation on the left is performed first Thus the example is equivalent to 2 0 3 1 5 5 5 11 0 which is equivalent to to 7 0 0 5 which is 0 5 The logical operations and modulus are to be performed on any real numbers not just on integers The number zero is equivalent to logical false and any non zero number is equivalent to logical true Table 15 2 Operator Precedence Operators Precedence me highest MOD EQ NE GT GE LT LE AND OR XOR lowest 15 9 1 Equality and floating point values The RS274 NGC language only supports floating point values of finite precision Therefore testing for equality or inequality of two floating point values is inherently problematic The interpreter solves this problem by considering values equal if their absolut
134. be active or inactive at the time the G 0 is executed If it is currently active the new coordinates take effect immediately It is an error if e The P number does not evaluate to an integer in the range 0 to 9 e An axis is programmed that is not defined in the configuration G10 L2 Example Line ALO 18 191 KoD Ne Z In the above example the origin of the first coordinate system the one selected by G54 is set to be X 3 5 and Y 17 2 Because only X and Y are specified the origin point is only moved in X and Y the other coordinates are not changed G10 L2 Example Line G10 L2 Pl XO YO ZO clear offsets for X Y Z axes in coordinate system 1 The above example sets the XYZ coordinates of the coordinate system 1 to the machine origin The coordinate system is described in the Coordinate System Section User Manual V2 6 11 34 gff59490 2015 12 16 177 253 16 14 G10 L10 Set Tool Table G10 L10 P axes lt R I J Q gt e P tool number e R radius of tool e J front angle lathe e J back angle lathe e Q orientation lathe G10 L10 changes the tool table entry for tool P so that if the tool offset is reloaded with the machine in its current position and with the current G5x and G92 offsets active the current coordinates for the given axes will become the given values The axes that are not specified in the G10 L10 command will not be changed This could be useful with a probe move as described in t
135. blathe g76base ngc gui for g76 threading g76diam ngc threading speced by major minor diameters id ngc bores the inside diameter od ngc turns the outside diameter taper od ngc turns a taper on the outside diameter e nc_files gcmc_lib drill gcmce drill holes in rectangle pattern square gcmc simple demo of variable tags for gemc files star gcmc geme demo illustrating functions and arrays wheels gcmc geme demo of complex patterns To try a demonstration select a sim configuration and start the linuxCNC program If using the axis gui press the E Stop Y then Machine Power then Home All Pick a ngcgui tab fill in any empty blanks with sensible values and press Create Feature then Finalize Finally press the Run button to watch it run Experiment by creating multiple features and features from different tab pages Other guis will have similar functionality but the buttons and names may be different Notes The demonstration configs create tab pages for just a few of the provided examples Any gui with a Custom tab page can open any of the library example subroutines or any user file if it is in the linuxCNC subroutine path To see special key bindings click inside an ngcgui tab page to get focus and then presss Control k The demonstration subroutines should run on the simulated machine configurations included in the distribution A user should always understand the behavior and purpose of a program befo
136. built in options to be created at the option level widgetDefault so that X Resources which are level userDefault can override them 5 11 3 Physical jog wheels To improve the interaction of AXIS with physical jog wheels the axis currently selected in the GUI is also reported on a pin with a name like axisui jog x One of these pins is TRUE at one time and the rest are FALSE These are meant to control motion s jog enable pins After AXIS has created these HAL pins it executes the HAL file named in HAL POSTGUI_HALFILE Unlike HAL HALFILE only one such file may be used 5 11 4 axisrc If it exists the contents of axisrc are executed as Python source code just before the AXIS GUI is displayed The details of what may be written in the axisrc are subject to change during the development cycle The following adds Control Q as a keyboard shortcut for Quit root_window bind lt Control q gt destroy hieip2rapp ence Cie omc olk OF oO 5 11 5 External Editor The menu options File gt Edit and File gt Edit Tool Table become available after defining the editor in the ini section DIS PLAY Useful values include EDITOR gedit and EDITOR gnome terminal e vim For more information see the DISPLAY section of the INI Configuration Chapter in the Integrator Manual 5 11 6 Virtual Control Panel AXIS can display a custom virtual control panel in the right hand pane You can program buttons indicators data displays
137. by up to a maximum of 56 tool entries 1 Although tool numbers up to 99999 are allowed the number of entries in the tool table at the moment is still limited to a maximum of 56 tools for technical reasons The LinuxCNC developers plan to remove that limitation eventually If you have a very large tool changer please be patient User Manual V2 6 11 34 gff59490 2015 12 16 139 253 Earlier versions of LinuxCNC had two different tool table formats for mills and lathes but since the 2 4 x release one tool table format is used for all machines Just ignore the parts of the tool table that don t pertain to your machine or which you don t need to use Each line of the tool table file after the opening semicolon contains the data for one tool One line may contain as many as 16 entries but will likely contain much fewer The units used for the length diameter etc are in machine units You will probably want to keep the tool entries in ascending order especially if you are going to be using a randomizing tool changer Although the tool table does allow for tool numbers in any order Each line may have up to 16 entries The first two entries are required The last entry a remark or comment preceded by a semicolon is optional It makes reading easier if the entries are arranged in columns as shown in the table but the only format requirement is that there be at least one space or tab after each of the entries on a line and a
138. ca eh Se EE eR SESE SEEMS RADE SHEE ES 181 16 24640 Compensation OM 2 bee ee De RRA AS EER RE ee A ee ae 182 16 25641 G42 Cutter Compensation gt e sese ee denn ee we be ee ea he owe dee wae Ge 183 16 260041 442 1 Dynamic Cutter Compensanon lt 4 0 4 eee hed a Eee se YE BEG eS So 183 1627043 Tool Lene ONSET ssp Go eR REY ERR wR EE wR Ee ee Le RG ls 184 16 236443 1 Dynamic Tool Length Offset ee Ee ee ea eae 184 16 29643 2 Apply additional Tool Length Offset o ce ee ee ee 185 16 30649 Cancel Tool Length Compensation lt o cs coes pe a ee ES RO Se Ee Re eS e 185 IG 51053 Move in Machine Coordinates p sa ce ds 6S Ra E Bye ee EO GE E 185 16 320534 0539 3 Select Coordinate Systemi oca Re a GA be RR a a de 186 16 35661 161 Exact Path Mode o oa re been SE Ba wee eae ee ea RA eae a 186 16 500704 Vata BENAS AAA 186 16 556 73 Drilling Cycle with Chip Breakiig s roces EA RRR EEG BO EEE ER SE e 187 16 306376 Threading Cycle o ear ea ee a ae ea ee Eee Le ee eee eee 188 TETAS cc aE SERRE DE SERS Rae ERS R aa eR eee ee 190 16 37 10 Common Words 2 5 ob bce ewe See a eee Paw ee be eR ER a 190 Oare ey WOME 6 sa ne dd oS ESS eee wee BH SS Abe eee SH sk 190 10 18 Repeat Cycle oko eek Be oh ewe ee bb we whos ee ee BA we a s 191 16 37 A Retrat M de o osou a wee Se Dea ee ee we a ae ee EE 191 boot ve aad a Cle A RR ee gawd 4 191 16 37 6 Preliminary and In Between Motion 6 5 56 55 6 be RE eR Re ee RE ee ee 191 User Ma
139. can result from nuts that are loose on leadscrews slippage in belts cable slack wind up in rotary couplings and other places where the mechanical system is not tight Backlash will result in inaccurate motion or in the case of motion caused by external forces think cutting tool pulling on the work piece the result can be broken cutting tools This can happen because of the sudden increase in chip load on the cutter as the work piece is pulled across the backlash distance by the cutting tool Backlash Compensation Any technique that attempts to reduce the effect of backlash without actually removing it from the mechanical system This is typically done in software in the controller This can correct the final resting place of the part in motion but fails to solve problems related to direction changes while in motion think circular interpolation and motion that is caused when external forces think cutting tool pulling on the work piece are the source of the motion Ball Screw A type of lead screw that uses small hardened steel balls between the nut and screw to reduce friction Ball screws have very low friction and backlash but are usually quite expensive Ball Nut A special nut designed for use with a ball screw It contains an internal passage to re circulate the balls from one end of the screw to the other User Manual V2 6 11 34 gff59490 2015 12 16 242 253 CNC Computer Numerical Control The general term used to refer to
140. ce is to avoid such usage Line numbers may also be skipped and that is normal practice A line number is not required to be used but must be in the proper place if used 15 5 Word A word is a letter other than N followed by a real value Words may begin with any of the letters shown in the following Table The table includes N for completeness even though as defined above line numbers are not words Several letters I J K L P R may have different meanings in different contexts Letters which refer to axis names are not valid on a machine which does not have the corresponding axis Table 15 1 Words and their meanings Letter Meaning A axis of machine B axis of machine C axis of machine Tool radius compensation number Feed rate General function See table Modal Groups Tool length offset index X offset for arcs and G87 canned cycles Y offset for arcs and G87 canned cycles Z offset for arcs and G87 canned cycles Spindle Motion Ratio for G33 synchronized movements generic parameter word for G10 M66 and others Miscellaneous function See table Modal Groups Line number Dwell time in canned cycles and with G4 Key used with G10 Feed increment in G73 G83 canned cycles Arc radius or canned cycle plane Spindle speed Tool selection U axis of machine V axis of machine W axis of machine AU a GQ al al al w gt v z z a S
141. cle N130 G90 GO XO Y1 140 Z0 N150 G91 G81 X1 YO Z 0 5 R1 L4 canned drill cycle 160 G80 turn off canned cycle 170 M2 program end Z The G98 to the second line above means that the return move will be to the value of Z in the first line since it is higher that the R value specified H120 block does these 4 Paes 0 0 01 Twelve Holes in a Square This example demonstrates the use of the L word to repeat a set of incremental drill cycles for successive blocks of code within the same G81 motion mode Here we produce 12 holes using five lines of code in the canned motion mode N1000 G90 GO XO YO ZO move coordinate home N1010 Gl F50 XO G4 PO 1 LOZ0 Cols Gs Sa v0 2 025 Ri EA canned dar mite yc le 1030 XO Y1 RO L3 repeat 1040 X 1 YO L3 repeat N1050 XO Y 1 L2 repeat N1060 G80 turn off canned cycle N1070 G90 GO X0 rapid move home 1080 YO 1090 A0 1100 M2 program end User Manual V2 6 11 34 gff59490 2015 12 16 193 253 H1030 block sed 1040 block does oe H1050 block doesthese 7 N1020 block i Wa does these 4 0 0 0 The second reason to use a canned cycle is that they all produce preliminary moves and returns that you can anticipate and control regardless of the start point of the canned cycle 16 38 G80 Cancel Canned Cycle e G80 cancel canned cycle modal motion G80 is part of modal group 1 so programming any other G code from modal
142. contouring performance by simplifying the path In the following figure the blue line represents the actual machine velocity The red lines are the acceleration capability of the machine The horizontal lines below each plot is the planned move The upper plot shows how the trajectory planner will slow the machine down when short moves are encountered to stay within the limits of the machines acceleration setting to be able to come to an exact stop at the end of the next move The bottom plot shows the effect of the Naive Cam Detector to combine the moves and do a better job of keeping the velocity as planned AAA CTA A spe Figure 3 1 Naive Cam Detector 3 1 4 Planning Moves Make sure moves are long enough to suit your machine material Principally because of the rule that the machine will never move at such a speed that it cannot come to a complete stop at the end of the current movement there is a minimum movement length that will allow the machine to keep up a requested feed rate with a given acceleration setting The acceleration and deceleration phase each use half the ini file MAX_ACCELERATION In a blend that is an exact reversal this causes the total axis acceleration to equal the ini file MAX_ACCELERATION In other cases the actual machine acceleration is somewhat less than the ini file acceleration User Manual V2 6 11 34 gff59490 2015 12 16 19 253 To keep up the feed rate the move must be longer than the distance it takes
143. copy of the Document means a machine readable copy represented in a format whose specification is available to the general public whose contents can be viewed and edited directly and straightforwardly with generic text editors or for images composed of pixels generic paint programs or for drawings some widely available drawing editor and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent A copy that is not Transparent is called Opaque Examples of suitable formats for Transparent copies include plain ASCII without markup Texinfo input format LaTeX input format SGML or XML using a publicly available DTD and standard conforming simple HTML designed for human modi fication Opaque formats include PostScript PDF proprietary formats that can be read and edited only by proprietary word processors SGML or XML for which the DTD and or processing tools are not generally available and the machine generated HTML produced by some word processors for output purposes only The Title Page means for a printed book the title page itself plus such following pages as are needed to hold legibly the material this License requires to appear in the title page For works in formats which do not have any title pag
144. d When the tool length offset is zero the default value this is a point on the spindle axis often called the gauge point that is some fixed distance beyond the end of the spindle usually near the end of a tool holder that fits into the spindle The location of the controlled point can be moved out along the spindle axis by specifying some positive amount for the tool length offset This amount is normally the length of the cutting tool in use so that the controlled point is at the end of the cutting tool On a lathe tool length offsets can be specified for X and Z axes and the controlled point is either at the tool tip or slightly outside it where the perpendicular axis aligned lines touched by the front and side of the tool intersect 2 Tf the parallelism requirement is violated the system builder will have to say how to distinguish clockwise from counterclockwise User Manual V2 6 11 34 gff59490 2015 12 16 128 253 12 2 4 Coordinated Linear Motion To drive a tool along a specified path a machining center must often coordinate the motion of several axes We use the term coordinated linear motion to describe the situation in which nominally each axis moves at constant speed and all axes move from their starting positions to their end positions at the same time If only the X Y and Z axes or any one or two of them move this produces motion in a straight line hence the word linear in the term In actual motions it is often
145. dard position If you change a tool like a drill bit you repeat the above and it is now in sync with the rest of the tools for Z offset Some tools might require a bit of cyphering to determine the control point from the touch off point For example if you have a 0 125 wide parting tool and you touch the left side off but want the right to be ZO then enter 0 125 in the touch off window 21 4 3 The Z Machine Offset Once all the tools have the Z offset entered into the tool table you can use any tool to set the machine offset using the machine coordinate system A typical session might be 1 Home each axis if not homed 2 Set the current tool with Tn M6 where n is the tool number 3 Issue a G43 so the current tool offset is in effect 4 Bring the tool to the work piece and set the machine Z offset If you forget to set the G43 for the current tool when you set the machine coordinate system offset you will not get what you expect as the tool offset will be added to the current offset when the tool is used in your program 21 5 Spindle Synchronized Motion Spindle synchronized motion requires a quadrature encoder connected to the spindle with one index pulse per revolution See the motion man page and Spindle Control Example in integrators manual for more information Threading The G76 threading cycle is used for both internal and external threads For more information see the G76 Section Constant Surface Speed CSS or Constant Su
146. derstand the basics of the coordinate systems used by LinuxCNC In depth information on the LinuxCNC Coordinate Systems is in the Coordinate System Section of this manual 3 5 1 G53 Machine Coordinate When you home LinuxCNC you set the G53 Machine Coordinate System to 0 for each axis homed e No other coordinate systems or tool offsets are changed by homing The only time you move in the G53 machine coordinate system is when you program a G53 on the same line as a move Normally you are in the G54 coordinate system 3 5 2 G54 59 3 User Coordinates Normally you use the G54 Coordinate System When an offset is applied to a current user coordinate system a small blue ball with lines will be at the machine origin when your DRO is displaying Position Relative Actual in Axis If your offsets are temporary use the Zero Coordinate System from the Machine menu or program G70 L2 P1 X0 YO ZO at the end of your G Code file Change the P number to suit the coordinate system you wish to clear the offset in e Offsets stored in a user coordinate system are retained when LinuxCNC is shut down e Using the Touch Off button in Axis sets an offset for the chosen User Coordinate System 3 5 3 When You re Lost If you re having trouble getting 0 0 0 on the DRO when you think you should you may have some offsets programmed in and need to remove them e Move to the Machine origin with G53 GO X0 YO ZO e Clear any G92 offset with G92 1 e Use the G54 coordi
147. ding on your machine configuration not all the items in this group may appear 9 3 6 Code Entry Manual Data Input also called MDI allows G code programs to be entered manually one line at a time When the machine is not turned on and not set to MDI mode the code entry controls are unavailable G1 G17 G40 G21 G90 G94 G54 G49 G99 G64 G51 M2 MS M9 M46 F225 51600 Figure 9 4 The Code Entry tab 9 3 6 1 MDI This allows you to enter a g code command to be executed Execute the command by pressing Enter 9 3 6 2 Active G Codes This shows the modal codes that are active in the interpreter For instance G54 indicates that the G54 offset is applied to all coordinates that are entered User Manual V2 6 11 34 gff59490 2015 12 16 108 253 9 3 7 Jog Speed By moving this slider the speed of jogs can be modified The numbers above refer to axis units second The text box with the number is clickable Once clicked a popup window will appear allowing for a number to be entered 9 3 8 Feed Override By moving this slider the programmed feed rate can be modified For instance if a program requests F60 and the slider is set to 120 then the resulting feed rate will be 72 The text box with the number is clickable Once clicked a popup window will appear allowing for a number to be entered 9 3 9 Spindle speed Override The spindle speed override slider works exactly like the feed override slider but it controls to the sp
148. dition there is a layer called HAL Hardware Abstraction Layer which allows configuration of LinuxCNC without the need of recompiling User Manual V2 6 11 34 gff59490 2015 12 16 6 253 Power supply Linux PC Stepper Stepper drives motors Figure 2 1 Simple LinuxCNC Controlled Machine The above figure shows a simple block diagram showing what a typical 3 axis LinuxCNC system might look like This diagram shows a stepper motor system The PC running Linux as its operating system is actually controlling the stepper motor drives by sending signals through the printer port These signals pulses make the stepper drives move the stepper motors The LinuxCNC system can also run servo motors via servo interface cards or by using an extended parallel port to connect with external control boards As we examine each of the components that make up an LinuxCNC system we will remind the reader of this typical machine 2 3 Graphical User Interfaces A user interface is the part of the LinuxCNC that the machine tool operator interacts with The LinuxCNC comes with several types of user interfaces e Axis the standard GUI interface User Manual V2 6 11 34 gff59490 2015 12 16 7 253 File Machine View Help Crea Iz NIX JR ly BOIB 2 d tuna Manual Control F3 MDI F5 Preview DRO Axis Feed Override 100 HE Jog Speed 16 in min Max Velocity 72 in min jE AXIS splash g code No
149. e is written to the log file if it is open Supports expansion of parameters as described below 15 20 Debug Messages e DEBUG displays a message like MSG with the addition of special handling for comment parameters as described below 15 21 Print Messages e PRINT messages are output to stderr with special handling for comment parameters as described below 15 22 Comment Parameters In the DEBUG PRINT and LOG comments the values of parameters in the message are expanded For example to print a named global variable to stderr the default console window add a line to your G code like Parameters Example print endmill dia lt _endmill_dia gt print value of variable 123 is 123 Inside the above types of comments sequences like 23 are replaced by the value of the parameter 123 Sequences like lt named parameter gt are replaced by the value of the named parameter Named parameters will have white space removed from them So lt named parameter gt will be converted to lt namedparameter gt User Manual V2 6 11 34 gff59490 2015 12 16 160 253 15 23 File Requirements A G code file must contain one or more lines of G code and be terminated with a Program End Any G code past the program end is not evaluated If a program end code is not used a pair of percent signs with the first percent sign on the first line of the file followed by one or more lines of G code and a second percent sign Any
150. e See RA Gee Be WALA a Be eS aa 209 17 20M71 Invahdate Stored Modal Stats coco eama e ee REESE a DAY Be Re a 210 21M7 Restore Model State co bee me Oe OR eR aw ere a ee eR SOR ee eee 210 17 22M73 Save and Autorestore Modal State ee 211 17 22 1 Selectively restoring modal state by testing predefined parameters 212 17 23M100 to M199 User Defined Commands io ee ee ee ee ee a 212 18 O Codes 214 BOR SUNNE o Go re Re e be Boe ea Se he bw ee SOR ed a 215 e JABBER 215 133 OMG lt A A AA A A A AA 216 TRA R PGG ss ito bs ee is PA ee eR ed ee ts A ts da 217 Teo INFECCIOSO ice e e ea we eer ee 8 217 Pty CASES 0 3 a a Ri a ee eo a eee oo ee ea de ee ee AA 217 18 2 Subroutine Fett Vales saciar woe po Oe OR eR a Sw Oe ee Re ee e 218 19 Other Codes 219 TM Feet Peed ales che ea RS AEE Ba A OAR Ew ee Rae ee Ae ca Oo 219 H2 el OPW PEE is a ee ee EPP Rb eee Seer e ea eh Se hd bes beeen ies 219 DS ao Le MOG 005 ah E a ae ee Ha A ee Ye A ee eG ee ee A 219 20 G Code Examples 221 201 Mill Examples cb See ha ee REE Se ee Be eA Se A ee we we 221 20 1 1 Helical Hole Milling ooo 6 ce 44 Ge eae BA wwe ae eae a REDS E 221 D012 SMe a ee ee ek e ee oda awe ee eGR ee 221 LS Ao PODE ine ed a ee eS ee eer ee eee See he Ow e Sr ed da e a 221 UL Smart PVRS ee Ay Ged ob ee ae Se ee be BAe Gee SG RA ole eee OR Oe She S amp S amp 221 20 15 Tool Length Probe o eote 44s 34a ee bed Shae ee bd A ee bs Poe Ae ee E 222 Shae THONG PO
151. e The image file can help clarify the parameters used by the subfile The image file should be in the same directory as the subfile and have the same name with an appropriate image suffix e g the subfile example ngc could be accompanied by an image file examp png Ngcgui attempts to resize large images by subsampling to a size with maximum width of 320 and maximum height of 240 pixels None of the conventions required for making an ngcgui compatible subfile preclude its use as general purpose subroutine file for LinuxCNC The LinuxCNC distribution includes a library ngcgui_lib directory that includes both example ngcgui compatible subfiles and utility files to illustrate the features of LinuxCNC subroutines and ngcgui usage Another libary gcmc_lib provides examples for subroutine files for the Gcode meta compiler gcmc Additional user sumitted subroutines can be found on the Forum in the Subroutines Section 7 6 2 Gcode meta compiler gcmc file requirements Files for the Gcode meta compiler gcmc are read by ngcgui and it creates entry boxes for variables tagged in the file When a feature for the file is finalized ngcgui passes the file as input to the gemc compiler and if the compile is successful the resulting gcode file is sent to linuxCNC for execution The resulting file is formatted as single file subroutine gcmc files and ngc files can be intermixed by ngcgui The variables identified for inclusion in ngcgui are tagged with
152. e OG EY Oe RGAE REE ew ee Ee eee 127 1222 Remon e sy oo ike ee ee ee he oe Gb a ee we a ee Soe Ge ee a 127 1222 COMMONSI PONE ss ho Ae et ee ee ee he es Oe Se Sk daa 127 12 24 Coordmated Linear Molon s aox t soe see ER EE ew ee ee Ee ee 128 De a A Soert a woke eee ee eo Ee Soe Gb a oe we a ok we See Ge eS 128 USO OOO e a Oe eo kode A ee had A Se OS Sek amp das a 128 LALA Wwe ee a Ree ee Shek ee Red ois bab A whole Bees PREM A 128 Wee A eee ha pe eR Ee Sk a eRe ee eA ee See Lee ee 128 229 ren POSO 6 5 kkk A A Ss Oe Sk da das 128 12 2 TO Selected Plane s e ae eee ssl ae Sees BAe aed a wa ele Beads RACY SLE SS amp 129 ZITTO Carmel tas Ga be Be a A Ge a a ee ee ee ee ee e e 129 12 212 TOOL CAES oe ek eh Ae Sew ey Se Bee A Sw oe e a 129 22 ES Pallet Sipe ue As ae hh ets ee ee Ge Soe amp oe aie ede Ges Bete a 129 122 14 Path Control Mods s o cs 44 bea eRe Se a 129 12 3 Interpreter Interaction with Switches lt s oo 25 04 540 45 ee bb Ee a See a we a 129 123 1 Peed and Speed tverncde Switches ces p ae eee eee Gees A ESAS amp 129 12 32 Block Delete Swatch s co ece macro ee ee PEA EEE EEE ee Oem wae A 129 123 3 Optional Proprant Stop RUC sca egos GA ee CRE RA eS e 129 TAE Te RBE e 25 puts GAR a Seta A e Sele Ga ed AA ees AO eee S k 130 LES POMO ce OS EA ee hee ee ee POS ES be ee eo ea OEE eS 130 User Manual V2 6 11 34 gff59490 2015 12 16 viii 13 Coordinate System 131 1351 EntroduERon opc A A de e eR eae 131 13 2 The Mac
153. e Z axis by adding the Z word G2 Example Helix COMO ROR AO ily CA XC Seal T9 JA z asilos ere alicia 74 CCEE In the next example we show how to make more than one turn using the P word P word Example GO XO YO ZO G2 XO Sel wail Ti OI 2 T25 In the center format the radius of the arc is not specified but it may be found easily as the distance from the center of the circle to either the current point or the end point of the arc User Manual V2 6 11 34 gff59490 2015 12 16 171 253 16 5 3 Radius Format Arcs G2 or G3 axes R e R radius from current position It is not good practice to program radius format arcs that are nearly full circles or nearly semicircles because a small change in the location of the end point will produce a much larger change in the location of the center of the circle and hence the middle of the arc The magnification effect is large enough that rounding error in a number can produce out of tolerance cuts For instance a 1 displacement of the endpoint of a 180 degree arc produced a 7 displacement of the point 90 degrees along the arc Nearly full circles are even worse Other size arcs in the range tiny to 165 degrees or 195 to 345 degrees are OK In the radius format the coordinates of the end point of the arc in the selected plane are specified along with the radius of the arc Program G2 axes R or use G3 instead of G2 R is the radius The axis words are all optional except that at lea
154. e an axis when the ESTOP button is pressed you ll get a message that says something about commanding motion when LinuxCNC is not ready If an axis faults out for something like falling behind the message pad will show what happened If you want to remind an operator to change a tool for example you can add a line of code to your program that will display in the message box An example might be msg change to tool 3 and press resume This line of code included in a program will display change to tool 3 and press resume in the message box The word msg with comma included is the command to make this happen without msg the message wouldn t be displayed It will still show in the auto modes display of the program file To erase messages simply click the message button at the top of the pad or on the keyboard hold down the Alt key and press the m key 10 6 Right Column The right column is a general purpose place to display and work Here you can see the modal buttons and text entry or displays Here you can view a plot of the tool path that will be commanded by your program You can also write programs and control tools and offsets here The modal screens have been described above Each of the popin displays are described in detail below User Manual V2 6 11 34 gff59490 2015 12 16 117 253 10 6 1 Program Editor Figure 10 5 Mini Text Editor The editor is rather limited compared to many modern text editors It does
155. e as such Title Page means the text near the most prominent appearance of the work s title preceding the beginning of the body of the text 2 VERBATIM COPYING You may copy and distribute the Document in any medium either commercially or noncommercially provided that this License the copyright notices and the license notice saying this License applies to the Document are reproduced in all copies and that you add no other conditions whatsoever to those of this License You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute However you may accept compensation in exchange for copies If you distribute a large enough number of copies you must also follow the conditions in section 3 You may also lend copies under the same conditions stated above and you may publicly display copies 3 COPYING IN QUANTITY If you publish printed copies of the Document numbering more than 100 and the Document s license notice requires Cover Texts you must enclose the copies in covers that carry clearly and legibly all these Cover Texts Front Cover Texts on the front cover and Back Cover Texts on the back cover Both covers must also clearly and legibly identify you as the publisher of these copies The front cover must present the full title with all words of the title equally prominent and visible You may add other material on the covers in addition Copying with changes limited to t
156. e desired material removal rate 15 28 Common Error Messages e G code out of range A G code greater than G99 was used the scope of G codes in LinuxCNC is 0 99 Not every number between 0 and 99 is a valid G code Unknown g code used A G code was used that is not part of the LinuxCNC G code language i j k word with no Gx to use it i j and k words must be used on the same line as the G code Cannot use axis values without a g code that uses them Axis values can not be used on a line without either a modal G code in effect or a G code on the same line File ended with no percent sign or program end Every G code file must end in a M2 or M30 or be wrapped with the percent sign User Manual V2 6 11 34 gff59490 2015 12 16 163 253 Appendix A Numbered Parameters persistence The values of parameters in the persistent range are retained over time even if the machining center is powered down LinuxCNC uses a parameter file to ensure persistence It is managed by the Interpreter The Interpreter reads the file when it starts up and writes the file when it exits The format of a parameter file is shown in Table Parameter File Format The Interpreter expects the file to have two columns It skips any lines which do not contain exactly two numeric values The first column is expected to contain an integer value the parameter s number The second column contains a floating point number this parameter s last value T
157. e difference is less than 0 0001 this value is defined as TOLERANCE_EQUAL in src emc rs274ngc interp_internal hh 15 10 Functions A function is either ATAN followed by one expression divided by another expression for example ATAN 2j 1 3 or any other function name followed by an expression for example SIN 90 The available functions are shown in table Functions Arguments to unary operations which take angle measures COS SIN and TAN are in degrees Values returned by unary operations which return angle measures ACOS ASIN and ATAN are also in degrees Table 15 3 Functions Function Name Function result ATAN Y X Four quadrant inverse tangent ABS arg Absolute value ACOS arg Inverse cosine ASIN arg Inverse sine COS arg Cosine EXP arg e raised to the given power FIX arg Round down to integer FUP arg Round up to integer ROUND arg Round to nearest integer User Manu al V2 6 11 34 gff59490 2015 12 16 154 253 Table 15 3 continued Function Name Function result LN arg Base e logarithm SIN arg Sine SQRT arg Square Root TAN arg Tangent EXISTS arg Check named Parameter The FIX function rounds towards the left less positive or more negative on a number line so that FIX 2 8 2 and FIX 2 8 3 for example The FUP operation rounds towards the right more positive or less negative on a number line FUP 2 8
158. e eae be eG eS EA ea ee ee 166 VERS G2 GS Fite MOVE od o a oa oe A pe a ew ow ewe Ree wee ed 167 153 1 Center e AIS nic be oe ee RAE Oe we ee ee ee ee a a ee 167 16 5 2 Center Format Examples o s a c be eS eR RRR eR ee Be ea a eh a ee a 169 1633 Radmis Format Ares csi A RA REESE A Ce ee SE a 171 User Manual V2 6 11 34 gff59490 2015 12 16 x O tr Dwell o oo Pa eRe PER eR Pe RR ir A A ek eee e 171 o ks ee hk bP eee Behe ee REG A SAS ee Sh 172 16 8 15 1 Quadratic spline c s cacra a repa eR EE Se ee DR RO Ew ee ew a 172 16 9 33 2 G53 NURBS Block occ ew Oe a a ee oa ae eR ee Ee de eee 173 1G DUE Lathe Diameter Mode z soii aeoo eR ee ae EAE ESE EBA SE dS ae ewe Eee we ox 174 16 118 Lathe Radius Mode os codos ee RE RRR ORR me EO eRe REE Ye eR A EO om 174 1GAZGIOLI Se Tool Table oo og a eb A ER a ERA ee we eA Ee ae 175 16 13G10 L2 Set Coordinate System oo a RS ER Be Ne we 175 110 Lilo Set Teel Table i eacee we 6 na ee RB E Re de 177 PE ASCOT Ret TR Table 0 ARE A wae ee AU as AA 4 177 1G 16G10 L20 Set Coordinate SES oc a A a e 178 16 17617 619 1 Plane Selecion occiso A A e A A 178 PE A COIE o i a aa aaa a A A Bee A e eS A OA 178 16 19628 G28 1 Gato Piedefined Peston 264 cocaina Y 179 16 20030 030 1 Goto Predefined Posie i bo dou ee we a a we a Soe ee ew Gd 179 16 21033 Spindle Synchronized MOON ek a gc a a eS Baek ee io ee 180 16 22633 1 Riel Tapping coo oe pe pe ee Yeoh wR EY eee ee ee oe ba ME Ses 180 TR LISAS IIS Probe 62
159. e eee ee Ee SSS 234 Image to G Code 236 27d MORE AE Mes Ye Seg th pe Se Eee OS BSR YS Se ee aie yale BE A ESOS E k 236 23 2 Integrating image to gcode with the AXIS user interface e 236 230 Using Moseo aces espiadas EE She ee Pee a do a 237 pr E di AR A 237 al EAS 20 a rr a db whe ia ee ds Beet ds Ba 237 2342 Ivern nage AR 237 234 3 Normalize Image o o ceres dau tee aa ee ee e ee E 237 2344 Expand Imaps Border oi aR a A A a wal god a 237 2545 Tolerance RIA we ee ee EEG Oe Ye 237 2540 Piel Size Unii gt e or Bk a e aed eh eA ewe eS 237 23 47 Plunge Feed Rate units per minute o ee 44 s i scs 6 eee Se Be Ce EN SC RRS See SS 237 2343 Feed Rate mits per minute lt lt so poca AR E aw eS Be ee a e 238 234 9 Spindle Speed RPM cres cadd neee beda e A e e a e eae ee a ee 238 Poca PA lt a A A DAA Sette oe es Soars oh 238 Zod Seam MECO sss ea ales Sk A a a A ee hoe Ea ES AG eel de 238 23A EDEMA ee OE EER ee ee ee be 8 238 Zoe A Sep Ver peels A be Ee oe SESH SG ewe ES Se oS EES ES 238 2 Boal Diameter lora be BES ESS REDS Be ee ae e BO eed bee de 238 pee NOE MEINE ke ee ee ee A Ye ee RA YG Oe Ree e 238 Se WOU AE hn ee Be ghee Bee Bees yarns amp Bite Gras ene kG el ee ae Be Gee a det ae k 239 Zoe Lace DOUNE ong alae A A ER Sa RG GORE Re ee Bee ee ak 239 a oe ee ee pa eee Oa ee ee A Db wae Sa ee ee 239 23 4 19 Roughing offset and depth per pass 25442 4 4 ee eed bea ee ee ae ee 239 User Manual V2 6 11 34 gff59490 20
160. e if in turtle mode button pressed showing the turtle Note This button can be activated using the turtle jog hal pin User Manual V2 6 11 34 gff59490 2015 12 16 76 253 6 7 3 Advanced Settings gmoccapy for linuxcne 1 4 0 ASE Debug Settings Alarm History Tool Measurement gmoccapy message Run from line Apearamce a Use auto tool measurement behavior and appearance Do not use run from line Probe Informations X Pos 15 s Use run from line Hardware X Pos 10 Y Pos ss Y Pos 10 Log Advanced Z Pos 20 Width 250 gt actions Settings Max Probe 20 a 1012 Probe Height 35 800 2 Font Sans 10 Probe velocitys Y Use frames Search Vel 13 Launch test message Probe Vel 10 delete MDI Fi Fi Cl ladder Hal Scope Status Hal Meter Calibration Halshow Tool Measurement If this part is not sensitive you do not have a valid INI file configuration to use tool measurement Please check Auto Tool Measurement e Use auto tool measurement If checked after each tool change a tool measurement will be done the result will be stored in the tool table and an G43 will be executed after the change Probe informations The following informations are taken from your INI file and must be given in absolute coordinates e X Pos The X position of the tool switch e Y Pos The Y position of the tool switch e Z Pos The X position of the tool switch we will go as rapid move to this coordinate e Max Probe is
161. e must be a probe or contact a probe switch In response to this command the machine moves the controlled point which should be at the center of the probe ball in a straight line at the current feed rate toward the programmed point In inverse time feed mode the feed rate is such that the whole motion from the current point to the programmed point would take the specified time The move stops within machine acceleration limits when the programmed point is reached or when the requested change in the probe input takes place whichever occurs first After successful probing parameters 5061 to 5069 will be set to the coordinates of X Y Z A B C U V W of the location of the controlled point at the time the probe changed state After unsuccessful probing they are set to the coordinates of the programmed point Parameter 5070 is set to 1 if the probe succeeded and 0 if the probe failed If the probing operation failed G38 2 and G38 4 will signal an error by posting an message on screen if the selected GUI supports that And by halting program execution A comment of the form PROBEOPEN filename txt will open filename txt and store the 9 number coordinate consisting of XYZABCUVW of each successful straight probe in it The file must be closed with PROBECLOSE For more information see the Comments Section An example file smartprobe ngc is included in the examples directory to demonstrate using probe moves to log to a file the coordinates o
162. e of the G76 canned cycle and can be previewed and executed on any machine using the sim lathe ini configuration G76 Example CO 20 5 052 ES 120 05 7 1 12 075 UNO 00 0 043 2955 162 nO WAS User Manual V2 6 11 34 gff59490 2015 12 16 190 253 In the figure the tool is in the final position after the G76 cycle is completed You can see the entry path on the right from the Q29 5 and the exit path on the left from the L2 E0 045 The white lines are the cutting moves Figure 16 4 G76 Example 16 37 Canned Cycles The canned cycles G87 through G89 and the canned cycle stop G80 are described in this section All canned cycles are performed with respect to the currently selected plane Any of the six planes may be selected Throughout this section most of the descriptions assume the XY plane has been selected The behavior is analogous if another plane is selected and the correct words must be used For instance in the G 7 plane the action of the canned cycle is along W and the locations or increments are given with U and V In this case substitute U V W for X Y Z in the instructions below Rotary axis words are not allowed in canned cycles When the active plane is one of the XYZ family the UVW axis words are not allowed Likewise when the active plane is one of the UVW family the XYZ axis words are not allowed 16 37 1 Common Words All canned cycles use X Y Z or U V W groups depending on the plane selected and R
163. e spindle speed is set above zero or the override switch is turned up the spindle will start turning It is OK to use M3 or M4 when the spindle is already turning or to use M5 when the spindle is already stopped 17 6 M6 Tool Change 17 6 1 Manual Tool Change If the HAL component hal_manualtoolchange is loaded M6 will stop the spindle and prompt the user to change the tool based on the last 7 number programmed For more information on hal_manualtoolchange see the Manual Tool Change section User Manual V2 6 11 34 gff59490 2015 12 16 205 253 17 6 2 Tool Changer To change a tool in the spindle from the tool currently in the spindle to the tool most recently selected using a T word see Section Select Tool program M6 When the tool change is complete The spindle will be stopped The tool that was selected by a T word on the same line or on any line after the previous tool change will be in the spindle If the selected tool was not in the spindle before the tool change the tool that was in the spindle if there was one will be placed back into the tool changer magazine If configured in the ini file some axis positions may move when a M6 is issued See the EMCIO section of the Integrator s Manual for more information on tool change options No other changes will be made For example coolant will continue to flow during the tool change unless it has been turned off by an M9 Warning The tool length offset i
164. e switches For certain moves such as the traverse out of the end of a thread during a threading cycle the switches are disabled automatically LinuxCNC reacts to the speed and feed override settings when these switches are enabled See the M48 M49 Override section for more information 12 3 2 Block Delete Switch If the block delete switch is on lines of G code which start with a slash the block delete character are not interpreted If the switch is off such lines are interpreted Normally the block delete switch should be set before starting the NGC program 12 3 3 Optional Program Stop Switch If this switch is on and an M1 code is encountered program execution is paused User Manual V2 6 11 34 gff59490 2015 12 16 130 253 12 4 Tool Table A tool table is required to use the Interpreter The file tells which tools are in which tool changer slots and what the size and type of each tool is The name of the tool table is defined in the ini file EMCIO tool table file TOOL_TABLE tooltable tbl The default filename probably looks something like the above but you may prefer to give your machine its own tool table using the same name as your ini file but with a tbl extension TOOL_TABLE acme_300 tbl or TOOL_TABLE EMC AXIS SIM tbl For more information on the specifics of the tool table format see the Tool Table Format Section 12 5 Parameters In the RS274 NGC language view a m
165. e three types of item whose order may vary on a line as given at the beginning of this section are word parameter setting and comment Imagine that these three types of item are divided into three groups by type The first group the words may be reordered in any way without changing the meaning of the line If the second group the parameter settings is reordered there will be no change in the meaning of the line unless the same parameter is set more than once In this case only the last setting of the parameter will take effect For example after the line User Manual V2 6 11 34 gff59490 2015 12 16 155 253 3 15 3 6 has been interpreted the value of parameter 3 will be 6 If the order is reversed to 3 6 3 15 and the line is interpreted the value of parameter 3 will be 15 If the third group the comments contains more than one comment and is reordered only the last comment will be used If each group is kept in order or reordered without changing the meaning of the line then the three groups may be interleaved in any way without changing the meaning of the line For example the line g40 g1 3 15 foo 4 7 0 has five items and means exactly the same thing in any of the 120 possible orders such as 4 7 0 gl 3 15 g40 foo for the five items 15 13 Commands and Machine Modes Many commands cause the controller to change from one mode to another and the mode stays active until some other command changes it implicitly
166. e tool table e After homing load a tool with Tn M6 where n is the tool number e Move tool to an established point using a gauge or take a test cut and measure e Click the Touch Off button in the Manual Control tab or hit the End button on your keyboard e Select Tool Table in the Coordinate System drop down box e Enter the gauge or measured dimension and select OK The Tool Table will be changed with the correct Z length to make the DRO display the correct Z position and a G43 command will be issued so the new tool Z length will be in effect Tool table touch off is only available when a tool is loaded with Tn M6 Touch Off Enter coordinate relative to 10 250 Workplece 0 250000 Coordinate system T Tool Table OR Cancel Figure 14 1 Touch Off Tool Table User Manual V2 6 11 34 gff59490 2015 12 16 138 253 14 1 2 Using G10 L1 L10 L11 The G10 L1 L10 L11 commands can be used to set tool table offsets these are just quick summaries see the G code section for full details e G10 LI Pn Set offset s to a value Current position irrelevant see G10 L1 for details e G10 L10 Pn Set offset s so current position w fixture 1 8 becomes a value see G10 L10 for details e G10 L11 Pn Set offset s so current position w fixture 9 becomes a value see G10 L11 for details 14 2 Tool Table The Tool Table is a text file that contains information about each tool The file is located in the sa
167. e used to access offsets of coordinate systems 4 system parameters used to determine the current running version They are read only 15 7 1 Numbered Parameters A numbered parameter is the pound character followed by an integer between 1 and currently 5602 The parameter is referred to by this integer and its value is whatever number is stored in the parameter A value is stored in a parameter with the operator for example 3 15 set parameter 3 to 15 A parameter setting does not take effect until after all parameter values on the same line have been found For example if parameter 3 has been previously set to 15 and the line 3 6 G X 3 is interpreted a straight move to a point where X equals 15 will occur and the value of parameter 3 will be 6 The character takes precedence over other operations so that for example 2 means the number found by adding 2 to the value of parameter 1 not the value found in parameter 3 Of course 1 2 does mean the value found in parameter 3 The character may be repeated for example 2 means the value of the parameter whose index is the integer value of parameter 2 31 5000 G Code user parameters These parameters are global in the G Code file and available for general use Volatile 5061 5069 Coordinates of a G38 2 Probe result X Y Z A B C U V amp W Volatile 5070 G38 probe result 1 if success O if probe failed to close Used with G38 3 and G38 5 Volat
168. e value being able to point a reader to a specific line of code 3D PLOT Absolute distance mode 681 drilling cycle R value Second value 661 canned cycle at starts here dk Wht AS Re 0 0 0 Preliminary more ee to R value a __ First Z value Figure 16 5 G80 Cycle The use of G80 in line N200 is optional because the GO on the next line will turn off the G81 cycle But using the G80 as shown in Example 1 will provide for easier to read canned cycle Without it it is not so obvious that all of the blocks between N120 and N200 belong to the canned cycle 16 39 G81 Drilling Cycle Gel k w we wie U We W R Ib The G87 cycle is intended for drilling The cycle functions as follows 1 Preliminary motion as described in the Preliminary and In Between Motion section User Manual V2 6 11 34 gff59490 2015 12 16 195 253 2 Move the Z axis at the current feed rate to the Z position 3 The Z axis does a rapid move to clear Z Example 1 Absolute Position G81 Suppose the current position is X1 Y2 Z3 and the following line of NC code is inter preted CIO CSE Goil AS ZLS RZ This calls for absolute distance mode G90 and OLD_Z retract mode G98 and calls for the G81 drilling cycle to be performed once The X value and X position are 4 The Y value and Y position are 5 The Z value and Z position are 1 5 The R value and clear Z are 2 8 OLD_Z is 3 The fo
169. ease take also a look to jog velocities and turtle jog hal pin for more details Example Spindle Override Min Value 20 Spindle Override Max Value 120 gmoccapy analog enable 1 gmoccapy spindle override value 0 25 value to set Min Value Max Value Min Value gmoccapy spindle override value value to set 20 120 20 0 25 value to set 45 6 5 3 jog hal pins All axis given in the INI File have a jog plus and a jog minus pin so hardware momentary switches can be used to jog the axis For the standard config following hal Pin will be available e gmoccapy jog x plus e gmoccapy jog x minus e gmoccapy jog y plus e gmoccapy jog y minus e gmoccapy jog z plus e gmoccapy jog z minus if you use a 4 axis INI file there will be two additional pins User Manual V2 6 11 34 gff59490 2015 12 16 62 253 e gmoccapy jog lt your fourth axis letter gt plus e gmoccapy jog lt your fourth axis letter gt minus for a C axis you will see e gmoccapy jog c plus gmoccapy jog c minus 6 5 4 jog velocities and turtle jog hal pin The jog velocity can be selected with the corresponding slider The scale of the slider will be modified if the turtle button the one showing a rabbit or a turtle has been toggled If the button 1s not visible it might have been disabled on the settings page If the button shows the rabbit icon the scale is from min to max machine velocity If it sho
170. ecial comments in the subroutine file Subroutine invocations are concatenated together to form a multiple step program Any single file gcode subroutine that conforms to ngcgui conventions can be used Any gcmc Gcode meta compiler program that conforms to ngcgui conventions for tagging variables can be used The gcmc executable must be installed separately see http www vagrearg org content gemc Note NGCGUI and PYNGCGUI implement the same functions and both process ngc and gcmc files that conform to a few ngcgui specific conventions In this document the tern NGCGUI generally refers to either application 7 2 Demonstration Configurations A number of demonstration configurations are located in the sim directory of the Sample Configurations offered by the LinuxCNC configuration picker The configuration picker is on the system s main menu Applications gt CNC gt LinuxCNC Examples are included for the axis touchy gscreen and gmoccapy guis These examples demonstrate both 3 axis XYZ cartesian configurations like mills and lathe XZ setups Some examples show the use of a popupkeyboard for touch screen systems and other examples demonstrate the use of files created for the gemc Gcode Meta Compiler application The touchy examples also demonstrate incorporation of a gladevcp backplot viewer gremlin_view The simplest application is found as Sample Configurations sim axis ngcgui ngcgui_simple A comprehe
171. ed consequences In LinuxCNC existing global named parameters will be valid at subroutine execution and subroutines can modify or create global named parameters Passing information to subroutines using global named parameters is discouraged since such usage requires the establishment and maintenance of a well defined global context that is difficult to maintain Using numbered parameters 1 thru 30 as subroutine inputs should be sufficient to satisfy a wide range of design requirements While input global named parameters are discouraged linuxCNC subroutines must use global named parameters for returning results Since ngcgui compatible subfiles are aimed at gui usage return values are not a common requirement However ngcgui is useful as a testing tool for subroutines which do return global named parameters and it is common for ngcgui compatible subfiles to call utility subroutine files that return results with global named parameters User Manual V2 6 11 34 gff59490 2015 12 16 95 253 To support these usages ngcgui ignores global named parameters that include a colon character in their name Use of the colon in the name prevents ngcgui from making entryboxes for these parameters Global Named Parameters o lt examp gt sub lt _examp result gt 5410 return the current tool diameter o lt helper gt call lt x1 gt lt x2 gt call a subroutine lt xresult gt lt _helper answer gt immediately
172. eed will be different from what is programmed It is OK to program SO the spindle will not turn if that is done It is an error if e the S number is negative As described in the G84 Section if a G84 tapping canned cycle is active and the feed and speed override switches are enabled the one set at the lower setting will take effect The speed and feed rates will still be synchronized In this case the speed may differ from what is programmed even if the speed override switch is set at 100 19 3 T Select Tool Tx prepare to change to tool x The tool is not changed until an M6 is programmed see Section M6 The T word may appear on the same line as the M6 or on a previous line It is OK if T words appear on two or more lines with no tool change Only the the most recent T word will take effect at the next tool change Note When LinuxCNC is configured for a nonrandom toolchanger see the entry for RANDOM_TOOLCHANGER in the EMCIO Section TO gets special handling no tool will be selected This is useful if you want the spindle to be empty after a tool change User Manual V2 6 11 34 gff59490 2015 12 16 220 253 Note TO When LinuxCNC is configured for a random toolchanger see the entry for RANDOM_TOOLCHANGER in the EMCIO Section TO does not get any special treatment TO is a valid tool like any other It is customary to use TO on a random toolchanger machine to track an empty pocket so that it behaves like a
173. eedback 242 feedrate override 243 G G Code Best Practices 161 G Code Order of Execution 160 G Code Overview 144 User Manual V2 6 11 34 gff59490 2015 12 16 251 253 G Code Table 164 G Codes 164 G Code 243 GO Rapid Move 165 Gl Linear Move 166 G10 L1 Tool Table 175 G10 L10 Set Tool Table 177 G10 L11 Set Tool Table 177 G10 L2 Coordinate System 175 G10 L20 Set Coordinate System 178 G17 G18 G19 Plane Selection 178 G2 G3 Arc Move 167 G20 Inches 178 G21 Millimeters 178 G28 179 G3 Arc Move 167 G30 179 G33 Spindle Synchronized Motion 180 G33 1 Rigid Tapping 180 G38 x Probe 181 G4 Dwell 171 G40 Cutter Compensation Off 182 G41 G42 Cutter Compensation 183 G41 1 G42 1 Dynamic Compensation 183 G43 Tool Length Offset 184 G43 1 Dynamic Tool Length Offset 184 G43 2 Apply additional Tool Length Offset 185 G49 Cancel Tool Length Offset 185 G5 Cubic spline 172 G5 1 Quadratic spline 172 G5 2 G5 3 NURBS Block 173 G53 Machine Coordinates 185 G54 G59 3 Select Coordinate System 186 G55 132 G61 G61 1 G64 Path Control 186 G64 Path Blending 186 G7 Lathe Diameter Mode 174 G73 Drilling Cycle Chip Break 187 G76 Threading 188 G8 Lathe Radius Mode 174 G80 Cancel Modal Motion 193 G80 G89 Canned Cycles 190 G81 Drilling Cycle 194 G82 Drilling Cycle Dwell 197 G83 Peck Drilling 198 G84 Right Hand Tapping 198 G85 Boring Feed Out 198 G86 Boring Spindle Stop Rapid Move Out 199 G87 B
174. en a tool is changed LinuxCNC rewrites the pocket number to keep track of where the tools are T can be any number but P must be a number that makes sense for the machine 14 3 Cutter Compensation Cutter Compensation allows the programmer to program the tool path without knowing the exact tool diameter The only caveat is the programmer must program the lead in move to be at least as long as the largest tool radius that might be used There are two possible paths the cutter can take while cutter compensation is on to the left or right side of a line when facing the direction of cutter motion from behind the cutter To visualize this imagine you were standing on the part walking behind the tool as it progresses across the part G41 is your left side of the line and G42 is the right side of the line The end point of each move depends on the next move If the next move creates an outside corner the move will be to the end point of the compensated cut line If the next move creates in an inside corner the move will stop short so to not gouge the part The following figure shows how the compensated move will stop at different points depending on the next move Outside Corner End of first move G41 Path Programmed Path Inside Corner End of first move G42 Path Figure 14 2 Compensation End Point User Manual V2 6 11 34 gff59490 2015 12 16 141 253 14 3 1 Overview Tool Table Cutter compensation uses the data from the t
175. ent tool table formats for mills and lathes but since the 2 4 x release one tool table format is used for all machines Just ignore the parts of the tool table that don t pertain to your machine or which you don t need to use For more information on the specifics of the tool table format see the Tool Table Section 21 3 Lathe Tool Orientation The following figure shows the lathe tool orientations with the center line angle of each orientation and info on FRONTANGLE and BACKANGLE The FRONTANGLE and BACKANGLE are clockwise starting at a line parallel to Z User Manual V2 6 11 34 gff59490 2015 12 16 224 253 lt Position 270 x gt as a FRONTANGLE 210 FRONTANGLE 330 Position 5 Tool 180 gt lt Pasition 7 0 BACKANGLE 159 BACKANGLE 30 Z Position 6 90 gt Figure 21 1 Lathe Tool Orientations In AXIS the following figures show what the Tool Positions look like as entered in the tool table Tool Orientation 1 Tool CL 135 deg Figure 21 2 Tool Positions 1 2 3 amp 4 User Manual V2 6 11 34 gff59490 2015 12 16 225 253 Tool Orientation 2 Tool CL 45 deg h Tool Orientation 3 Tool CL 315 deg dl Tool Orientation 4 Tool CL 225 deg User Manual V2 6 11 34 gff59490 2015 12 16 226 253 gt Tool Orientation 5 Tool CL 180 deg Figure 21 3 Tool Positions 5 6 7 amp 8 Tool Orientation 6 Tool CL 90 deg a Tool O
176. ents 0 0 2 0 00500004 93 7 6 2 Gcode meta compiler geme file requirements s s eroras we s eS ee eS 95 ta DBZ Beagle sc kk ars oA A PE A A A oe a Sek 97 8 Touchy GUI 100 5 1 Tantl CONUSUCAION soca eee haa a ewe ee ea ea eo 101 SLI HAL conmection lt lt psa EEE RE Rw Ew Se Re ee ee be ee e 101 BAA Bequaredconttols s sya chee ek RRR ES OSS ea ae ee a eh a ee a 101 SAL pone contol lt 8 ers Seen tid wo Ree Se ew ES Sad Bee ee eee ox 101 S03 Optional pancilanps lt lt sos eee ee ee Pee ee wR ds E a 101 1 2 Recommended ior any Sep so Ske ee Re ee ew ee be ee ee 101 So II 2 ES A ee he eye he ee AAN Baty ee Be as A e 101 Sal Enabling Touchy og ee eee ad eb ORAM EEA E 101 S22 Prelerences o cepa ook a aap kid OS eS A a ee ee amp 102 Gane o eens NR 102 9 TkLinuxCNC GUI 103 Ol Mmiod cHon s sre drasa ewe he ea eS ee Aa ale Waa eae ea he A ea ee a 103 g gt pene Smed tn se ee a Re OR EE NN 104 9 41 Atypical session with ThLanuxCN o bc eee Peewee oe Le eee eo eee E 104 9 3 Elements of the TkLinuxCNe window 2 ee ee ee ee ee eee eee ee 104 AT IMOUTERONE ss doe ee ce ea ee ea he Soe Pe Ee wee eS E 105 932 Offset display stats bar lt s soe 2 5 2b 6b he eR RR RRR RR a ee ee E 105 933 Coonduiate Display Ara gt s sad ew Se eS ee EE ee a he ee ea ee 105 User Manual V2 6 11 34 gff59490 2015 12 16 vi 10 E A A PRR eR he ee Re ew eR EE e a 105 Dash Automa contol cs mecc ee ARS eG ae Bae BA
177. er is not used for the axis gui While pyngcgui can be embedded in axis integration is more complete when using ngcgui using TKPKG Ngcgui 1 0 To specify the EMBED_TAB_LOCATION for other guis see the example ini files Note The truetype tracer gui front end is not currently available for gladevcp applications User Manual V2 6 11 34 gff59490 2015 12 16 89 253 7 5 3 Additional INI File items required for ngcgui or pyngcgui The following INI file items go in the DISPLAY section for any gui that embeds either ngcgui or pyngcgui e NGCGUI_FONT Helvetica 12 normal specifices the font name size normallbold e NGCGUI_PREAMBLE in_std ngc the preamble file to be added in front of the subroutines When concatenating several common subroutine invocations this preamble is only added once For mm based machines use mm_std ngc NGCGUI_SUBFILE filenamel ngc creates a tab from the filename subroutine NGCGUI_SUBFILE filename2 ngc creates a tab from the filename2 subroutine etc NGCGUI_SUBFILE gcmcname1 gcmc creates a tab from the gemcnamel file NGCGUI_SUBFILE gcmcname2 gcmc creates a tab from the gemcname2 file etc NGCGUI_SUBFILE creates a custom tab that can open any subroutine in the search path NGCGUI_OPTIONS optl opt2 NGCGUI options nonew disallow making a new custom tab noremove disallow removing any tab page noauto no autosend use makeFile t
178. erline CNC Operators Manual MDI mode allows you to enter single blocks and have the interpreter execute them as if they were part of a program kind of like a one line program You can execute circles arcs lines and such You can even test sets of program lines by entering one block waiting for that motion to end and then enter the next block Below the entry window there is a listing of all of the current modal codes This listing can be very handy I often forget to enter a g00 before I command a motion If nothing happens I look down there to see if g80 is in effect G80 stops any motion If it s there I remember to issue a block like g00 x0 y0 z0 In MDI you are entering text from the keyboard so none of the main keys work for commands to the running machine F1 will Estop the control Since many of the keyboard keys are needed for entry most of the bindings that were available in auto mode are not available here 10 4 4 FEEDHOLD CONTINUE Feedhold is a toggle When the LinuxCNC is ready to handle or is handling a motion command this button shows the feedhold label on a red background If feedhold has been pressed then it will show the continue label Using it to pause motion has the advantage of being able to restart the program from where you stopped it Feedhold will toggle between zero speed and whatever feed rate override was active before it was pressed This button and the function that it activates is also bou
179. es BS wags e 145 e pee eee eee ee ehh ES Pe Oe we eee ete ta ee bh eee eee 145 150 NUDIDOL y cio hw a eee Dd Re oe oe ea ee ra ek a 146 ESF DREAM sok kek os AA aR e ROR ES ghee a Ae a Ree ay Bae Paes Be Bags e 146 15 31 Numbered Parameters css eee ds e e eS REA eee SSS 147 3 3 2 Subroutine Parameters soccer ee ee eee a de ee ee eae ee 149 15 73 Named Parameters ok be nee pa a be wR Oe eS we 149 15 7 4 Predefined Named Parameters ooo ewe Se ES Bo eee Se 150 15 73 System Paramotis e oe eee ee ee a ee ea ke 151 ES Express odon poa ee a ee wR RN EE eR Rw ew See Roe Eee ee eee e 152 15 9 Binary Operate cocos Ae ee AS eS RR we ee ee Be a e eR ee a 153 139 1 Equality and floating point values oir a Se 153 User Manual V2 6 11 34 gff59490 2015 12 16 ix ESIORUDERAGAS ta bo ee Soe hy ee we De ee A we ee ee we Oe eed Ow a 153 15 Ui Repeated ems cc ea eop a maok a EERO SOR RMR ESOS Se ee eh ae 154 LS Piim ordek a 8 end 6 e Eee SG OE SPADES Bae S RGA SE ow Ee A E RE aS DSS 154 15 15 Comma ds and Machine Modes o c ccc s bw Oe RE eR A bee EA RR RE ws 155 15 IA Polar Coordinat s a o he ee ce Be ee RW Rb ew eee ee we a ee eR ew 155 ES Orly RIPON a Sg ee Ae eye A eee EG we ee ant ee ge we Bae AE E 157 ESLORA eG ee bd eee ee be beeen eee de ed 158 US IRIESSat S ke a eS eS Re Be YP oe a ee ee 159 ES TAP One LOZORNE os bg ee Bee See A ee ee wo ea AE ERAS AAA ox 159 A 159 15 20D6 bue Messages cos 02m a ao e a Re RES e ae eo 159 ED SUPI
180. es do not have return values but they may change the value of parameters above 30 and those changes will be visible to the calling code Subroutines may also change the value of global named parameters 18 2 Looping The while loop has two structures while endwhile and do while In each case the loop is exited when the while condition evaluates to false The difference is when the test condition is done The do while loop runs the code in the loop then checks the test condition The while endwhile loop does the test first While Endwhile Example draw a sawtooth shape GO X1 YO move to start position 1 1 assign parameter 1 the value of 0 F25 set a feed rate 0101 while 1 LT 10 User Manual V2 6 11 34 gff59490 2015 12 16 216 253 Gl X0 Gl Y 1 10 X1 1 1 1 increment the test counter 0101 endwhile M2 end program Do While Example 1 0 assign parameter 1 the value of 0 0100 do debug parameter 1 1 SLG i E OREA 1 3 assign the value of 3 to parameter 1 msg 1 has been assigned the value of 3 0100 continue skip to start of loop 0110 endif some code here 1 1 1 increment the test counter 0100 while 1 LT 3 msg Loop Done M2 Inside a while loop O break immediately exits the loop and O continue immediately skips to the next evaluation of the while condition If it is still true the loop begins again at the top If it is false it exits the loop 1
181. ess than 360 degrees No axis words and both offsets must be programmed for full circles The P word defaults to 1 and is optional For more information on Absolute Arc Distance Mode see the G90 1 section XY plane G17 User Manual V2 6 11 34 gff59490 2015 12 16 168 253 CLAROS ES gt e Z helix e X offset e J Y offset P number of turns XZ plane G18 G2 Cie 63 lt x B W I y BSS e Y helix e I X offset e K Z offset P number of turns YZ plane G19 GZ Of C3 lt V Ze X J K P gt e X helix e J Y offset e K Z offset P number of turns It is an error if e No feed rate is set with the F word e No offsets are programmed e When the arc is projected on the selected plane the distance from the current point to the center differs from the distance from the end point to the center by more than 05 inch 5 mm OR 0005 inch 005mm AND 1 of radius Deciphering the Error message Radius to end of arc differs from radius to start Start the current position center the center position as calculated using the i j or k words end the programmed end point rl radius from the start position to the center r2 radius from the end position to the center User Manual V2 6 11 34 gff59490 2015 12 16 169 253 16 5 2 Center Format Examples Calculating arcs by hand can be difficult at times One option is to draw the arc with a cad prog
182. est point 23 4 3 Normalize Image If yes the darkest pixel is remapped to black the lightest pixel is remapped to white 23 4 4 Expand Image Border If None the input image is used as is and details which are at the very edges of the image may be cut off If White or Black then a border of pixels equal to the tool diameter is added on all sides and details which are at the very edges of the images will not be cut off 23 4 5 Tolerance units When a series of points are within tolerance of being a straight line they are output as a straight line Increasing tolerance can lead to better contouring performance in LinuxCNC but can also remove or blur small details in the image 23 4 6 Pixel Size units One pixel in the input image will be this many units usually this number is much smaller than 1 0 For instance to mill a 2 5x2 5 inch object from a 400x400 image file use a pixel size of 00625 because 2 5 400 00625 23 4 7 Plunge Feed Rate units per minute The feed rate for the initial plunge movement User Manual V2 6 11 34 gff59490 2015 12 16 238 253 23 4 8 Feed Rate units per minute The feed rate for other parts of the path 23 4 9 Spindle Speed RPM The spindle speed S code that should be put into the gcode file 23 4 10 Scan Pattern Possible scan patterns are e Rows e Columns e Rows then Columns e Columns then Rows 23 4 11 Scan Direction Possible scan directions are e P
183. esume to continue Skip lines with 7 If a line begins with and this is checked the line will be skipped Clear MDI history Clears the MDI history window Copy from MDI history Copies the MDI history to the clipboard Paste to MDI history Paste from the clipboard to the MDI history window Calibration Starts the Servo Axis Calibration assistant Calibration reads the HAL file and for every sefp that uses a variable from the ini file that is in an AXIS_n section it creates an entry that can be edited and tested Show HAL Configuration Opens the HAL Configuration window where you can monitor HAL Components Pins Parameters Signals Functions and Threads HAL Meter Opens a window where you can monitor a single HAL Pin Signal or Parameter User Manual V2 6 11 34 gff59490 2015 12 16 30 253 HAL Scope Opens a virtual oscilloscope that allows plotting HAL values vs time Show LinuxCNC Status Opens a window showing LinuxCNC s status Set Debug Level Opens a window where debug levels can be viewed and some can be set Homing Home one or all axes Unhoming Unhome one or all axes Zero Coordinate System Clear set to zero a chosen offset Tool touch off to workpiece When performing Touch Off the value entered is relative to the current workpiece G5x coordi nate system as modified by the axis offset G92 When the Touch Off is complete the Relative coordinate for the chosen axis will become the
184. f X Y Z A B C U V W they specify a destination point Axis numbers are in the currently active coordinate system unless explicitly described as being in the absolute coordinate system Where axis words are optional any omitted axes will retain their original value Any items in the G code prototypes not explicitly described as optional are required The values following letters are often given as explicit numbers Unless stated otherwise the explicit numbers can be real values For example G10 L2 could equally well be written G 2 5 L 1 1 If the value of parameter 100 were 2 G10 L 100 would also mean the same If L is written in a prototype the will often be referred to as the L number and so on for any other letter 16 2 G Code Quick Reference Table Code Description GO Coordinated Straight Motion Rapid Rate Gl Coordinated Straight Motion Feed Rate G2 G3 Coordinated Helical Motion Feed Rate G4 Dwell User Manual V2 6 11 34 gff59490 2015 12 16 165 253 Code Description G5 Cubic Spline G5 1 Quadratic B Spline G5 2 NURBS add control point G5 3 NURBS execute G7 Diameter Mode lathe G8 Radius Mode lathe G10 L1 Set Tool Table Entry G10 L10 Set Tool Table Calculated Workpiece G10L11 Set Tool Table Calculated Fixture G10 L2 Coordinate Sy
185. f a part The program smartprobe ngc could be used with ngcgui with minimal changes It is an error if e the current point is the same as the programmed point e no axis word is used e cutter compensation is enabled e the feed rate is zero e the probe is already in the target state 16 24 G40 Compensation Off e G40 turn cutter compensation off If tool compensation was on the next move must be a linear move and longer than the tool diameter It is OK to turn compensation off when it is already off G40 Example current location is X1 after finishing cutter compensated move G40 turn compensation off GO X1 6 linear move longer than current cutter diameter M2 end program See GO amp M2 sections for more information It is an error if e A G2 G3 arc move is programmed next after a G40 e The linear move after turning compensation off is less than the tool diameter User Manual V2 6 11 34 gff59490 2015 12 16 183 253 16 25 G41 G42 Cutter Compensation G41 lt D gt left of programmed path G42 lt D gt right of programmed path e D tool number The D word is optional if there is no D word the radius of the currently loaded tool will be used if no tool is loaded and no D word is given a radius of 0 will be used If supplied the D word is the tool number to use This would normally be the number of the tool in the spindle in which case the D word is redundant and need not be supplied but
186. file Note As a standalone application pyngcgui can read an ini file or a running linuxCNC application to create tab pages for multiple subfiles 7 5 Embedding NGCGUI 7 5 1 Embedding NGCGUI in Axis The following INI file items go in the DISPLAY section See additional sections below for additional items needed TKPKG Ngcgui 1 0 the NGCGUI package TKPKG Ngcguittt 1 0 the True Type Tracer package for generating text for engraving optional must follow TKPKG Ngcgui TIT truetype tracer name of the truetype tracer program it must be in user PATH TTT_PREAMBLE in_std ngc Optional specifies filename for preamble used for ttt created subfiles alternate mm_std ngc Note The optional truetype tracer items are used to specify an ngcgui compatible tab page that uses the application truetype tracer The truetype tracer application must be installed independently and located in the user PATH 7 5 2 Embedding PYNGCGUI as a gladevcp tab page in a gui The following INI file items go in the DISPLAY section for use with the axis gscreen or touchy guis See additional sections below for additional items needed EMBED_ Items EMBED_TAB_ NAME Pyngcgui name to appear on embedded tab EMBED _TAB COMMAND gladevcp x XID pyngcgui_axis ui invokes gladevcp EMBED_TAB LOCATION name_of_location where th mbeded page is located Note The EMBED_TAB_LOCATION specifi
187. for X Y Z A B C U V W amp R Persistent 5341 5350 Coordinate System 7 G59 1 for X Y Z A B C U V W amp R Persistent 5361 5370 Coordinate System 8 G59 2 for X Y Z A B C U V W amp R Persistent 5381 5390 Coordinate System 9 G59 3 for X Y Z A B C U V W amp R Persistent 5399 Result of M66 Check or wait for input Volatile 5400 Tool Number Volatile 5401 5409 Tool Offsets for X Y Z A B C U V amp W Volatile 5410 Tool Diameter Volatile 5411 Tool Front Angle Volatile 5412 Tool Back Angle Volatile 5413 Tool Orientation Volatile 5420 5428 Current relative position in the active coordinate system including all offsets and in the current program units for X Y Z A B C U V amp W volatile User Manual V2 6 11 34 gff59490 2015 12 16 149 253 5599 flag for controlling the output of DEBUG statements 1 output 0 no output default 1 Volatile 5600 toolchanger fault indicator Used with the iocontrol v2 component 1 toolchanger faulted 0 normal Volatile 5601 toolchanger fault code Used with the iocontrol v2 component Reflects the value of the toolchanger reason HAL pin if a fault occured Volatile 15 7 2 Subroutine Parameters 1 30 Subroutine local parameters of call arguments These parameters are local to the subroutine Volatile See also the chapter on O Codes 15 7 3 Named Parameters Named parameters work like numbe
188. for the subroutine call These definitions must be consecutive beginning with 1 and ending with the last used parameter number Definitions must be provided for each of these parameters no omissions Parameter Numbering lt xparm gt 1 lt yparm gt 2 lt zparm gt 3 LinuxCNC considers all numbered parameters in the range 1 thru 30 to be calling parameters so ngcgui provides entry boxes for any occurence of parameters in this range It is good practice to avoid use of numbered parameters 1 through 30 anywhere else in the subroutine Using local named parameters is recommended for all internal variables Each defining statement may optionally include a special comment and a default value for the parameter Statement Prototype lt vname gt n default_value or lt vname gt n comment_text or lt vname gt n default_value comment_text Parameter Examples lt xparm gt 1 0 0 lt yparm gt 2 Ystart lt zparm gt 3 0 0 Z start setting If a default_value is provided it will be entered in the entry box for the parameter on startup If comment_text is included it will be used to identify the input instead of the parameter name Global Named Parameters Notes on global named parameters and ngcgui global named parameters have a leading underscore in the name like lt _someglobalname gt As in many programming languages use of globals is powerful but can often lead to unexpect
189. fset cs 2 HO also acr im TO s tool orrae M2 end program You can sum together an arbitrary number of offsets by calling G43 2 more times There are no built in assumptions about which numbers are geometry offsets and which are wear offsets or that you should have only one of each Like the other G43 commands G43 2 does not cause any motion The next time a compensated axis is moved that axis s endpoint is the compensated location It is an error if e H is unspecified or e the given tool number does not exist in the tool table 16 30 G49 Cancel Tool Length Compensation e G49 cancels tool length compensation It is OK to program using the same offset already in use Itis also OK to program using no tool length offset if none is currently being used 16 31 G53 Move in Machine Coordinates G53 axes To move in the machine coordinate system program G53 on the same line as a linear move G53 is not modal and must be programmed on each line GO or G does not have to be programmed on the same line if one is currently active For example G53 GO X0 YO ZO will move the axes to the home position even if the currently selected coordinate system has offsets in effect G53 Example Line G53 GO X0 YO ZO rapid linear move to the machine origin G53 X2 rapid linear move to absolute coordinate X2 e See GO section for more information It is an error if e G53 is used without GO or G1 being active e or G53 is used while
190. fusing jumble of little things and wonder why it is the way itis This page attempts to answer that question before you get into the thick of things LinuxCNC started at the National Institute of Standards and Technology in the USA It grew up using Unix as its operating system Unix made it different Among early Unix developers there grew a set of code writing ideas that some call the Unix way These early LinuxCNC authors followed those ways Eric S Raymond in his book The Art of Unix Programming summarizes the Unix philosophy as the widely used engineering philosophy Keep it Simple Stupid KISS Principle He then describes how he believes this overall philosophy is applied as a cultural Unix norm although unsurprisingly it is not difficult to find severe violations of most of the following in actual Unix practice e Rule of Modularity Write simple parts connected by clean interfaces e Rule of Clarity Clarity is better than cleverness e Rule of Composition Design programs to be connected to other programs e Rule of Separation Separate policy from mechanism separate interfaces from engines Mr Raymond offered several more rules but these four describe essential characteristics of the LinuxCNC motion control system The Modularity rule is critical Throughout these handbooks you will find talk of the interpreter or task planner or motion or HAL Each of these is a module or collection of modules It s modularity that allows
191. g move in a straight line at the programmed feed rate to the programmed end point and X3 provides an argument value the value of X should be 3 at the end of the move Most LinuxCNC G Code commands start with either G or M for General and Miscellaneous The words for these commands are called G codes and M codes The LinuxCNC language has no indicator for the start of a program The Interpreter however deals with files A single program may be in a single file or a program may be spread across several files A file may demarcated with percents in the following way The first non blank line of a file may contain nothing but a percent sign possibly surrounded by white space and later in the file normally at the end of the file there may be a similar line Demarcating a file with percents is optional if the file has an M2 or M30 in it but is required if not An error will be signaled if a file has a percent line at the beginning but not at the end The useful contents of a file demarcated by percents stop after the second percent line Anything after that is ignored The LinuxCNC G Code language has two commands M2 or M30 either of which ends a program A program may end before the end of a file Lines of a file that occur after the end of a program are not to be executed The interpreter does not even read them 15 2 Format of a line A permissible line of input code consists of the following in order with the restriction that there is a
192. gression a descent by stages or steps Q The compound slide angle is the angle in degrees describing to what extent successive passes should be offset along the drive line This is used to cause one side of the tool to remove more material than the other A positive Q value causes the leading edge of the tool to cut more heavily Typical values are 29 29 5 or 30 H The number of spring passes Spring passes are additional passes at full thread depth If no additional passes are desired program HO E Specifies the distance along the drive line used for the taper The angle of the taper will be so the last pass tapers to the thread crest over the distance specified with E E0 2 will give a taper for the first last 0 2 length units along the thread For a 45 degree taper program E the same as K L Specifies which ends of the thread get the taper Program LO for no taper the default L for entry taper L2 for exit taper or L3 for both entry and exit tapers Entry tapers will pause at the drive line to synchronize with the index pulse then move at the feed rate in to the beginning of the taper No entry taper and the tool will rapid to the cut depth then synchronize and begin the cut The tool is moved to the initial X and Z positions prior to issuing the G76 The X position is the drive line and the Z position is the start of the threads The tool will pause briefly for synchronization before each threading pass so a relief gro
193. gurations The apps items are typically 1 utilities that don t require starting linuxenc or 2 demonstrations of applications that can be used with linuxcne info creates a file with system information that may be useful for problem diagnosis gladevcp xample gladevcp applications halrun starts halrun in an terminal latency applications to investigate latency parport applications to test parport pyvcp xample pyvcp applications xhc hb04 applications to test an xhc hb04 USB wireless MPG The attic directory stores obsolete or historical configurations When started the Configuration Selector allows the user to pick one of their existing configurations My Configurations or select a new one from the Sample Configurations to be copied to their home directory Copied configurations will appear under My Configurations on the next invocation of the Configuration Selector Note Under the Apps directory only applications that are usefully modified by the user are offered for copying to the user s directory User Manual V2 6 11 34 gff59490 2015 12 16 26 253 Chapter 5 AXIS GUI 5 1 Introduction AXIS is a graphical front end for LinuxCNC which features a live preview and backplot It is written in Python and uses Tk and OpenGL to display its user interface User Manual V2 6 11 34 gff59490 2015 12 16 27 253 ax axis ngc AXIS 2 5 0 on EMC HAL SIM AXI
194. he G38 section G10 L10 Example T1 M6 G43 load tool 1 and tool length offsets cl ALO PAS AS GEE tithe eurr renti posi ti one hoi 4 10 ls lS G43 reload the tool length offsets from the changed tool table M2 end program e See T amp M6 and G43 G43 1 sections for more information It is an error if e Cutter Compensation is on e The P number is unspecified e The P number is not a valid tool number from the tool table The P number is 0 16 15 G10 L11 Set Tool Table ELO Lill P axes SR I J Q gt e P tool number e R radius of tool e I front angle lathe e J back angle lathe e Q orientation lathe G10 L11 is just like G10 L10 except that instead of setting the entry according to the current offsets it is set so that the current coordinates would become the given value if the new tool offset is reloaded and the machine is placed in the G59 3 coordinate system without any G92 offset active This allows the user to set the G59 3 coordinate system according to a fixed point on the machine and then use that fixture to measure tools without regard to other currently active offsets It is an error if User Manual V2 6 11 34 gff59490 2015 12 16 178 253 e Cutter Compensation is on The P number is unspecified The P number is not a valid tool number from the tool table The P number is 0 16 16 G10 L20 Set Coordinate System G10 L20 P axes e P coordinate system 0 9 G
195. he covers as long as they preserve the title of the Document and satisfy these conditions can be treated as verbatim copying in other respects If the required texts for either cover are too voluminous to fit legibly you should put the first ones listed as many as fit reasonably on the actual cover and continue the rest onto adjacent pages If you publish or distribute Opaque copies of the Document numbering more than 100 you must either include a machine readable Transparent copy along with each Opaque copy or state in or with each Opaque copy a publicly accessible computer network location containing a complete Transparent copy of the Document free of added material which the general network using public has access to download anonymously at no charge using public standard network protocols If you use the latter option you must take reasonably prudent steps when you begin distribution of Opaque copies in quantity to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy directly or through your agents or retailers of that edition to the public It is requested but not required that you contact the authors of the Document well before redistributing any large number of copies to give them a chance to provide you with an updated version of the Document 4 MODIFICATIONS You may copy and distribute a Modified Version of the Docume
196. he following pin are exported e gmoccapy max vel counts HAL_S32 Maximal Velocity of the machine e gmoccapy jog speed counts HAL_S32 Jog velocity e gmoccapy spindle override counts HAL_S32 spindle override e gmoccapy feed override counts HAL_S32 feed override e gmoccapy reset feed override HAL_BIT reset the feed override to 100 e gmoccapy reset spindle override HAL_BIT reset the spindle override to 100 User Manual V2 6 11 34 gff59490 2015 12 16 61 253 To connect potmeters use the following hal pin e gmoccapy analog enable HAL_BIT Must be True to allow analog inputs e gmoccapy jog vel value HAL_FLOAT To adjust the jog velocity slider e gmoccapy max vel value HAL_FLOAT To adjust the max velocity slider e gmoccapy feed override value HAL_FLOAT To adjust the feed override slider e gmoccapy spindle override value HAL_FLOAT To adjust the spindle override slider The float pin do accept values from 0 0 to 1 0 being the percentage value you want to set the slider value Warning O If you use both connection types do not connect the same slider to both pin as the influences between the two has not been tested Different sliders may be connected to the one or other hal connection type Important O Please be aware that for the jog velocity depends on the turtle button state it will lead to different slider scales depend ing on the mode turtle or rabbit Pl
197. he macro by pressing the Macro button on the MDI tab in Touchy you can enter values for xinc and yinc These are passed to the macro as and 2 respectively Parameters you leave empty are passed as value 0 If there are several different macros press the Macro button repeatedly to cycle through them In this simple example if you enter 1 for xinc and press cycle start a rapid GO move will be invoked moving one unit to the left This macro capability is useful for edge hole probing and other setup tasks as well as perhaps hole milling or other simple operations that can be done from the panel without requiring specially written gcode programs User Manual V2 6 11 34 gff59490 2015 12 16 103 253 Chapter 9 TkLinuxCNC GUI 9 1 Introduction TkLinuxCNC is one of the first graphical front ends for LinuxCNC It is written in Tcl and uses the Tk toolkit for the display Being written in Tcl makes it very portable it runs on a multitude of platforms A separate backplot window can be displayed as shown TkEmc BackPlot File View Settings Units Scripts x X Z v z 3D SETUP ESE ON MIST OFI ABORT AUTO FLOOD OFF BRAKE ON 1 offset Work Offsets X0 0000 Y0 0000 Z0 0000 mm override limits relative machine actual commanded joint world continuous home Axis Speed EA Feed Override 100 EOS 100 A G1 G17 G40 G21 G90 G94 G54 G49 G99 G64 G51 M2 M5 M9 M48 F225 31600 Program dhomejuvefeme2inc_files 3
198. he moment like so User Manual V2 6 11 34 gff59490 2015 12 16 69 253 Settings Alarm History Main Window Apearance Start as fullscreen Start maximized Hardware Start as window x Pos 40 Advanced Settings YPos 30 Width 979 Height 750 T hide cursor gt dr ay 51 Keyboard Show keyboard on offset O Show keyboard on tooledit C Show keyboard on MDI Show keyboard on EDIT Y Show keyboard on load file On Touch off show preview show offsets Display Aux Screen gmoccapy delete MDI 1 5 5 3 The page is separated in three main tabs 6 7 1 Appearance gmoccapy for linuxcne 1 5 5 3 DRO File to load on start Relative Color MN testfile_differem_vel ngc Absolute Color BE ann none DTG Color hj Select jump to dir Homed color memcmesa a cdcolor ME Themes and sound O Show the DRO Button Themes A Use Auto Units Follow System Theme s size E Waming Audio A dialog Preview Grid size 1 000 gt Mouse Button mode left move middle zoor w Cl ladder Hal Scope Status Hal Meter on this tab you will find the following options 15 59 17 28 11 2015 Calibration Halshow Main Window Here you can select how you wish the GUI to start The main reason for this was the wish to get an easy way for the user to set the starting options without the need to touch code You have three options e start as fullscreen e start maximized e start as window If you selec
199. he next block Press Resume and the interpreter goes back to reading ahead and running the program The combination of Pause and Step work a lot like single block mode on many controllers The difference is that Pause does not let motion continue to the end of the current block Feed rate Override can be very handy as you approach a first cut Move in quickly at 100 percent throttle back to 10 and toggle between Feedhold and 10 using the pause button When you are satisfied that you ve got it right hit the zero to the right of nine feedrate 100 and go The Verify button runs the interpreter through the code without initiating any motion If Verify finds a problem it will stop the read near the problem block and put up some sort of message Most of the time you will be able to figure out the problem with your program by reading the message and looking in the program window at the highlighted line Some of the messages are not very helpful Sometimes you will need to read a line or two ahead of the highlight to see the problem Occasionally the message will refer to something well ahead of the highlight line This often happens if you forget to end your program with an acceptable code like M2 M30 or M60 10 4 3 MDI The MDI button or lt F5 gt sets the Manual Data Input mode This mode displays a single line of text for block entry and shows the currently active modal codes for the interpreter From the Sh
200. he value is represented as a double precision floating point number inside the Interpreter but a decimal point is not required in the file Parameters in the user defined range 31 5000 may be added to this file Such parameters will be read by the Interpreter and written to the file as it exits Missing Parameters in the persistent range will be initialized to zero and written with their current values on the next save operation The parameter numbers must be arranged in ascending order An Parameter file out of order error will be signaled if they are not in ascending order The original file is saved as a backup file when the new file is written Table A 1 Parameter File Format Parameter Number Parameter Value 5161 0 0 5162 0 0 User Manual V2 6 11 34 gff59490 2015 12 16 164 253 Chapter 16 G Codes 16 1 Conventions Conventions used in this section In the G code prototypes the hyphen stands for a real value and lt gt denotes an optional item If L is written in a prototype the will often be referred to as the L number and so on for any other letter In the G code prototypes the word axes stands for any axis as defined in your configuration An optional value will be written like this lt L gt A real value may be e An explicit number 4 e An expression 2 2 e A parameter value 88 e A unary function value acos 0 In most cases if axis words are given any or all o
201. hen it is already on 16 26 G41 1 G42 1 Dynamic Cutter Compensation Gal sil De lt CLEAN left of programmed path right of programmed path Ls L e D cutter diameter e L tool orientation see lathe tool orientation G41 1 amp G42 1 function the same as G41 amp G42 with the added scope of being able to program the tool diameter The L word defaults to 0 if unspecified It is an error if e The YZ plane is active e The L number is not in the range from 0 to 9 inclusive e The L number is used when the XZ plane is not active e Cutter compensation is commanded to turn on when it is already on User Manual V2 6 11 34 gff59490 2015 12 16 184 253 16 27 G43 Tool Length Offset G43 lt H gt H tool number optional G43 enables tool length compensation G43 changes subsequent motions by offsetting the axis coordinates by the length of the offset G43 does not cause any motion The next time a compensated axis is moved that axis s endpoint is the compensated location G43 without an H word uses the currently loaded tool from the last Tn M6 G43 Hn uses the offset for tool n Note G43 HO is a little special Its behavior is different on random tool changer machines and nonrandom tool changer machines see the Tool Changers section On nonrandom tool changer machines G43 HO applies the TLO of the tool currently in the spindle or a TLO of 0 if no tool is in the spindle On random too
202. hen save or manually send noiframe no internal image display images on separate top level widget nom2 do not terminate with m2 use terminator This option eliminates all the side effects of m2 termination GCMC_INCLUDE_PATH dirname 1 dirname2 search directories for gemc include files This is an example of embedding NGCGUI into Axis The subroutines need to be in a directory specified by the RS274NGC SUBROUT Some example subroutines use other subroutines so check to be sure you have the dependences if any ina SUBROUTINE_PATH directory Some subroutines may use custom Mfiles which must be in a directory specified by the RS274NGC USER_M_PATH The Gcode meta compiler gcmc can include statements like include filename inc gcmc By default gcmc includes the current directory which for linuxCNC will be the directory containing the linuxCNC ini file Additional directories can be prepended to the gcmc search order with the GCMC_INCLUDE_PATH item Sample axis gui based INI RS274NGC SUBROUTINE_PATH S oof or ANS O E AN ADE AA ys tos USER_M_PATH nc_files ngcgui_lib mfiles DISPLAY TKPKG Ngcgui 1 0 TKPKG STNG CCU ante eyliee O Ngcgui must precede Ngcguittt GCGUI_FONT Helvetica 12 normal specify filenames only files must be in RS274NGC SUBROUTINE_PATH GCGUI_PREAMBLE alin Sel ee GCGUI_SUBFILE simp ngc GCGUI_SUBFILE Xyz ngc GCGUI_SUBFILE
203. hine s work envelope that is used to make sure the computer and the actual machine both agree on the tool position ini file A text file that contains most of the information that configures LinuxCNC for a particular machine Instance One can have an instance of a class or a particular object The instance is the actual object created at runtime In programmer jargon the Lassie object is an instance of the Dog class Joint Coordinates These specify the angles between the individual joints of the machine See also Kinematics Jog Manually moving an axis of a machine Jogging either moves the axis a fixed amount for each key press or moves the axis at a constant speed as long as you hold down the key In manual mode jog speed can be set from the graphical interface kernel space See real time Kinematics The position relationship between world coordinates and joint coordinates of a machine There are two types of kinematics Forward kinematics is used to calculate world coordinates from joint coordinates Inverse kinematics is used for exactly the opposite purpose Note that kinematics does not take into account the forces moments etc on the machine It is for positioning only Lead screw An screw that is rotated by a motor to move a table or other part of a machine Lead screws are usually either ball screws or acme screws although conventional triangular threaded screws may be used where accuracy and long life are not as important a
204. hine Position Command G33 lt ess eda sarapa Eadie a A 131 13 3 Preta Omset OSADO pook a PR PE RR OER RRA Pee A RR 132 13 3 1 Detault coordinate system oo 6 5 ss eR ep ee ew ee ee eh ee ee 133 13 3 2 Setting coordinate fixture offsets from G code oa ese aoea ee ee ae ee ee EES Gs 133 DA GI ONI 4 hk Pe oe hb eee Oe be ee ee eed eb ORAM Ea ew 133 134 1 The G92 commands oco s asia e eR RRR EE Re ee Ee ee po eh ee ee 133 he eRe rd AMES 1 et he a RU ee Se A MES Sg es A ox 134 134 3 G92 CANONS oo a to ed ee a bade Pe a bbe 134 13 5 Sample Program Usinge D SSS ooo coc ER Rw pa ee ee a 135 14 Tool Compensation 137 ET Teel lenih ORE sie ha ee Se eae eee Bhd oe OPS A oe ee 8 137 HLT TOOL ne oe a ee ee A ee ead baw ee oe a E ae A 137 14 14 Usine GIO LILI cos cosida See pe eee ee we 138 EZ Tool Toe oa a Ba Sek Se Awe Bye eS we BR Se od GS Shh Ge te a 138 14 2 1 Tool Table Formal lt lt eee eee a eee eee ee ea ee 138 t422 Tool nage oc kc ee ee aN ee ae A ee eR ee we 139 14 3 Cit Compensation lt ss cora a ENS Ee REE ER ROS OS ea e eh a ee E 140 PELI OVINA e ea eee eal oe Me ea 141 LARGA EGP bos o Be ben ee SOON o A ee Se epee ER eR ee ee 142 15 G Code Overview 144 LEL VII nc a a Ae A aE ER SRE EG aR AE a he Rey eee ae eas eo 144 o e a ee Ea ee Se PRE ee eee hee LS SS 2 AN 144 15 3 Block Dokle oere deade ea eee ida deabe et eta a ee tee dba PR Reba he ew a ee ae 145 154 Line SE ios e ae Bee RES pha a AEE a he Ra Pe Pa
205. ide the Interpreter but a decimal point is not required in the file All of the parameters shown in the following table are required parameters and must be included in any parameter file except that any parameter representing a rotational axis value for an unused axis may be omitted An error will be signaled if any required parameter is missing A parameter file may include any other parameter as long as its number is in the range 1 to 5400 The parameter numbers must be arranged in ascending order An error will be signaled if not Any parameter included in the file read by the Interpreter will be included in the file it writes as it exits The original file is saved as a backup file when the new file is written Comments are not preserved when the file is written Table 12 1 Parameter File Format Parameter Number Parameter Value Comment 5161 0 0 G28 Home X 5162 0 0 G28 Home Y See the Parameters section for more information User Manual V2 6 11 34 gff59490 2015 12 16 131 253 Chapter 13 Coordinate System 13 1 Introduction You have seen how handy a tool length offset can be Having this allows the programmer to ignore the actual tool length when writing a part program In the same way it is really nice to be able to find a prominent part of a casting or block of material and work a program from that point rather than having to take account of the location at which the casting or block will be held during
206. ile 5161 5169 G28 Home for X Y Z A B C U V amp W Persistent 5181 5189 G30 Home for X Y Z A B C U V amp W Persistent The range of persistent parameters may change as development progresses This range is currently 5161 5390 It is defined in the _required_parameters array in file the src emc rs274ngc interp_array cc The RS274 NGC interpreter maintains an array of numbered parameters Its size is defined by the symbol RS274NGC_MAX_PARAMETERS in the file src emc rs274ngc interp_internal hh This number of numerical parameters may also increase as development adds support for new parameters User Manual V2 6 11 34 gff59490 2015 12 16 148 253 5211 5219 G92 offset for X Y Z A B C U V 8 W Persistent 5210 1 if G92 offset is currently applied O otherwise Persistent 5211 5219 G92 offset X Y ZABCUV W 5220 Coordinate System number 1 9 for G54 G59 3 Persistent 5221 5230 Coordinate System 1 G54 for X Y Z A B C U V W 8 R R denotes the XY rotation angle around the Z axis Persistent 5241 5250 Coordinate System 2 G55 for X Y Z A B C U V W amp R Persistent 5261 5270 Coordinate System 3 G56 for X Y Z A B C U V W amp R Persistent 5281 5290 Coordinate System 4 G57 for X Y Z A B C U V W amp R Persistent 5301 5310 Coordinate System 5 G58 for X Y Z A B C U V W amp R Persistent 5321 5330 Coordinate System 6 G59
207. indle speed If a program requested S500 spindle speed 500 RPM and the slider is set to 80 then the resulting spindle speed will be 400 RPM This slider has a minimum and maximum value defined in the ini file If those are missing the slider is stuck at 100 The text box with the number is clickable Once clicked a popup window will appear allowing for a number to be entered 9 4 Keyboard Controls Almost all actions in TkLinuxCNC can be accomplished with the keyboard Many of the shortcuts are unavailable when in MDI mode The most frequently used keyboard shortcuts are shown in the following table Table 9 1 Most Common Keyboard Shortcuts Keystroke Action Taken Fl Toggle Emergency Stop F2 Turn machine on off 1 90 Set feed override from 0 to 100 Xx Activate first axis Y 1 Activate second axis LD Activate third axis gt A 3 Activate fourth axis Home Send active axis Home Left Right Jog first axis Up Down Jog second axis Pg Up Pg Dn Jog third axis L Jog fourth axis ESC Stop execution User Manual V2 6 11 34 gff59490 2015 12 16 109 253 Chapter 10 MINI GUI 10 1 Introduction A Stepper Fregmod Minimill Bl gt lt F 5 F F MANUAL X 0 0000 Y 0 0000 Z 0 0000 Feed Override 100 O O O MESSAGES Figure 10 1 The Mini Graphical Interface upon starting User Manual V2 6 11 34 gff5949
208. indow Move the X to a known position or take a test cut and measure the diameter Select Touch Off and pick Tool Table then enter the position or the diameter NH rn A Follow the same sequence to correct the Z axis Note if you are in Radius Mode you must enter the radius not the diameter 21 4 2 Z Touch Off The Z axis offsets can be a bit confusing at first because there are two elements to the Z offset There is the tool table offset and the machine coordinate offset First we will look at the tool table offsets One method is to use a fixed point on your lathe and set the Z offset for all tools from this point Some use the spindle nose or chuck face This gives you the ability to change to a new tool and set its Z offset without having to reset all the tools A typical session might be User Manual V2 6 11 34 gff59490 2015 12 16 228 253 1 Home each axis if not homed 2 Make sure no offsets are in effect for the current coordinate system 3 Set the current tool with Tn M6 G43 where n is the tool number 4 Select the Z axis in the Manual Control window 5 Bring the tool close to the control surface Using a cylinder move the Z away from the control surface until the cylinder just passes between the tool and the control surface 6 Select Touch Off and pick Tool Table and set the position to 0 0 7 Repeat for each tool using the same cylinder Now all the tools are offset the same distance from a stan
209. ine arc arc arc and arc line cases as well as line line benefit from the naive cam detector This improves contouring performance by simplifying the path It is OK to program for the mode that is already active See also the Trajectory Control Section for more information on these modes If Q is not specified then it will have the same behavior as before and use the value of P G64 P Example Line G64 P0 015 set path following to be within 0 015 of the actual path It is a good idea to include a path control specification in the preamble of each G code file 16 35 G73 Drilling Cycle with Chip Breaking GIS Y B R Q lt L gt e R retract position along the Z axis e Q delta increment along the Z axis e L repeat The G73 cycle is drilling or milling with chip breaking This cycle takes a Q number which represents a delta increment along the Z axis 1 Preliminary motion e If the current Z position is below the R position The Z axis does a rapid move to the R position e Move to the X Y coordinates 2 Move the Z axis only at the current feed rate downward by delta or to the Z position whichever is less deep 3 Rapid up a bit 4 Repeat steps 2 and 3 until the Z position is reached at step 2 5 The Z axis does a rapid move to the R position It is an error if e the Q number is negative or zero e the R number is not specified User Manual V2 6 11 34 gff59490 2015 12 16 188 253 16 36 G76 Threading
210. interface Some keys operate the same regradless of the mode Others change with the mode that LinuxCNC is operating in 10 7 1 Common Keys Pause Toggle feedhold e Escape abort motion e F toggle estop estop reset state e F2 toggle machine off machine on state e F3 manual mode F4 auto mode User Manual V2 6 11 34 gff59490 2015 12 16 121 253 e F5 MDI mode e F6 reset interpreter The following only work for machines using auxiliary I O e F7 toggle mist on mist off e F8 toggle flood on flood off e F9 toggle spindle forward off e F10 toggle spindle reverse off e FI decrease spindle speed e F12 increase spindle speed 10 7 2 Manual Mode e 1 90 set feed override to 10 90 0 is 100 e set feed override to 0 or feedhold e x select X axis e y select Y axis e z select Z axis e a select A axis e b select B axis e c select C axis e Left Right Arrow jog X axis e Up Down Arrow jog Y axis e Page Up Down jog Z axis e _ jog the active axis in the minus direction e jog the active axis in the plus direction e Home home selected axis e iI toggle through jog increments The following only work with a machine using auxiliary I O e b take spindle brake off e Alt b put spindle brake on User Manual V2 6 11 34 gff59490 2015 12 16 122 253 10 7 3 Auto Mode 1 9 0 set feed override to 10 90 O is 100 e set feed over
211. ion 6 Options for gemc are available with the terminal command gcmc help A gcmce program by default uses metric mode The mode can be set to inches with the option setting ngcgui imperial A preamble file if used can set a mode g20 or g21 that conflicts with the mode used by a gemc file To ensure that the geme program mode is in effect include the following statement in the gcmc file include ensure_mode gcmc and provide a proper path for gcmc include_files in the ini file for example DISPLAY GCMC_INCLUDE_PATH nc_files gcmc_lib User Manual V2 6 11 34 gff59490 2015 12 16 97 253 7 7 DB25 Example The following shows the DB25 subroutine In the first photo you see where you fill in the blanks for each variable File Machine View Help BOS g dG 7 00 12 5 leal Manual Control F3 MDI F5 Preview DRO simp xyz iquad db25 ihex gosper Custom ttt mis ex cy cz remove new ngcgui3 lt move move gt pa Continuous E db25 connector uses iquad ngc Home All Touch Off AR ao o Create Feature Finalize pez 0 Restart Feed Override 100 E i Jog Speed 16 inmin _ Py Max Velocity 72 in min T j l ngcgui FEATURE 110701 05 34 54 2 ngcgui files lt home john emc2 dev nc_files ngcgui_lib utilitysubs in_std ngc nc_files ngcgu i_lib db25 ngc gt 3 ngcgui feature line added lt feature gt 0
212. ion entitled Endorsements Such a section may not be included in the Modified Version N Do not retitle any existing section as Endorsements or to conflict in title with any Invariant Section If the Modified Version includes new front matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document you may at your option designate some or all of these sections as invariant To do this add their titles to the list of Invariant Sections in the Modified Version s license notice These titles must be distinct from any other section titles You may add a section entitled Endorsements provided it contains nothing but endorsements of your Modified Version by various parties for example statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard You may add a passage of up to five words as a Front Cover Text and a passage of up to 25 words as a Back Cover Text to the end of the list of Cover Texts in the Modified Version Only one passage of Front Cover Text and one of Back Cover Text may be added by or through arrangements made by any one entity If the Document already includes a cover text for the same cover previously added by you or by arrangement made by the same entity you are acting on behalf of you may not add another but you may replace the old one on explicit permission from the previous publisher that added the old
213. is or equivalently the plane perpendicular to the axis is selected with G 7 Z axis XY plane G18 Y axis XZ plane or G19 X axis YZ plane Planes 17 1 18 1 and 19 1 are not currently supported If the arc is circular it lies in a plane parallel to the selected plane To program a helix include the axis word perpendicular to the arc plane for example if in the G 7 plane include a Z word This will cause the Z axis to move to the programmed value during the circular XY motion To program an arc that gives more than one full turn use the P word specifying the number of full turns plus the programmed arc The P word must be an integer If P is unspecified the behavior is as if P was given that is only one full or partial turn will result For example if a 180 degree arc is programmed with a P2 the resulting motion will be 1 1 2 rotations For each P increment above 1 an extra full circle is added to the programmed arc Multi turn helical arcs are supported and give motion useful for milling holes or threads If a line of code makes an arc and includes rotary axis motion the rotary axes turn at a constant rate so that the rotary motion starts and finishes when the XYZ motion starts and finishes Lines of this sort are hardly ever programmed If cutter compensation is active the motion will differ from the above see the Cutter Compensation Section The arc center is absolute or relative as set by G90 1 or G91 1 respectively Two fo
214. is chapter attempts to bring together all the lathe specific information and is currently under construction 21 1 Lathe Mode If your CNC machine is a lathe there are some specific changes you will probably want to make to your ini file in order to get the best results from LinuxCNC If you are using the AXIS display have Axis display your lathe tools properly See the INI Configuration section of the Integrator Manual for more details but you will probably want to make an entry like this to set up AXIS for Lathe Mode DISPLAY Tell the Axis Display our machine is a lathe LATHE TRUE Lathe Mode in Axis does not set your default plane to G18 XZ You must program that in the preamble of each gcode file or better add it to your ini file like this RS274NGC g code modal codes modes that the interpreter is initialized with on startup RS274NGC_STARTUP_CODE G18 G20 G90 21 2 Lathe Tool Table The Tool Table is a text file that contains information about each tool The file is located in the same directory as your configuration and is called tool tbl by default The tools might be in a tool changer or just changed manually The file can be edited with a text editor or be updated using G10 L1 L10 L11 There is also a built in tool table editor in the Axis display The maximum number of entries in the tool table is 56 The maximum tool and pocket number is 99999 Earlier versions of LinuxCNC had two differ
215. isplayed in green letters If there is an error with the current axis TkLinuxCNC will use red letter to show that for example if an hardware limit switch is tripped To properly interpret these numbers refer to the radio boxes on the right If the position is Machine then the displayed number is in the machine coordinate system If it is Relative then the displayed number is in the offset coordinate system Further down the choices can be actual or commanded Actual refers to the feedback coming from encoders if you have a servo machine and the commanded refers to the position command send out to the motors These values can differ for several reasons Following error deadband encoder resolution or step size For instance if you command a movement to X 0 0033 on your mill but one step of your stepper motor is 0 00125 then the Commanded position will be 0 0033 but the Actual position will be 0 0025 2 steps or 0 00375 3 steps Another set of radio buttons allows you to choose between joint and world view These make little sense on a normal type of machine e g trivial kinematics but help on machines with non trivial kinematics like robots or stewart platforms you can read more about kinematics in the Integrator Manual 9 3 3 1 Backplot When the machine moves it leaves a trail called the backplot You can start the backplot window by selecting View gt Backplot User Manual V2 6 11 34 gff59490 2015 12 16 106 253 9
216. itch The state of motion feed hold will have no effect on feed when M53 is not active 17 14 M61 Set Current Tool Number e M61 Q change the current tool number while in MDI or Manual mode One use is when you power up LinuxCNC with a tool currently in the spindle you can set that tool number without doing a tool change It is an error if e Q is not 0 or greater 17 15 M62 to M65 Output Control e M62 P turn on digital output synchronized with motion The P word specifies the digital output number e M63 P turn off digital output synchronized with motion The P word specifies the digital output number e M64 P turn on digital output immediately The P word specifies the digital output number e M65 P turn off digital output immediately The P word specifies the digital output number The P word ranges from 0 to a default value of 3 If needed the the number of I O can be increased by using the num_dio parameter when loading the motion controller See the Integrator s Manual Configuration Section LinuxCNC and HAL section for more information The M62 amp M63 commands will be queued Subsequent commands referring to the same output number will overwrite the older settings More than one output change can be specified by issuing more than one M62 M63 command The actual change of the specified outputs will happen at the beginning of the next motion command If there is no subsequent motion command the queued output cha
217. its G20 G21 Cutter radius compensation on or off G40 G41 G42 Cutter length compensation on or off G43 G49 User Manual V2 6 11 34 gff59490 2015 12 16 161 253 Coordinate system selection G54 G55 G56 G57 G58 G59 G59 1 G59 2 G59 3 Set path control mode G61 G61 1 G64 Set distance mode G90 G91 Set retract mode G98 G99 Go to reference location G28 G30 or change coordinate system data G10 or set axis offsets G92 G92 1 G92 2 G94 Perform motion GO to G3 G33 G38 x G73 G76 G80 to G89 as modified possibly by G53 Stop MO M1 M2 M30 M60 15 26 G Code Best Practices 15 26 1 Use an appropriate decimal precision Use at least 3 digits after the decimal when milling in millimeters and at least 4 digits after the decimal when milling in inches 15 26 2 Use consistent white space G code is most legible when at least one space appears before words While it is permitted to insert white space in the middle of numbers there is no reason to do so 15 26 3 Use Center format arcs Center format arcs which use J K instead of R behave more consistently than R format arcs particularly for included angles near 180 or 360 degrees 15 26 4 Put important modal settings at the top of the file When correct execution of your program depends on modal settings be sure to set them at the beginning of the part program Modes can carry over from previous programs and from the MDI
218. k moreto R valve Y 0 0 0 Example 4 Absolute G81 R gt Z This is a plot of the path of motion for the second g81 block of code CIL GIs Cel KA XI AMG RIE L3 Since this plot starts with X0 YO Z0 the interpreter adds the initial ZO and R1 8 and rapid moves to that location After that initial Z move the repeat feature works the same as it did in example 3 with the final Z depth being 0 6 below the R value Preliminary motions More to second to first incremental drill and retract location A e 2 First drill Mare to third and retract dell and retract Wht 0 0 0 Example 5 Relative position R gt Z GHO CSS Cei XA Xo AMG RI E Since this plot starts with XO YO ZO the interpreter adds the initial ZO and R1 8 and rapid moves to that location as in Example 4 After that initial Z move the rapid move to X4 Y5 is done Then the final Z depth being 0 6 below the R value The repeat function would make the Z move in the same location again 16 40 G82 Drilling Cycle Dwell CES k Ve Ze wie CU We We IR Ib E The G82 cycle is intended for drilling with a dwell at the bottom of the hole 1 Preliminary motion as described in the Preliminary and In Between Motion section 2 Move the Z axis at the current feed rate to the Z position User Manual V2 6 11 34 gff59490 2015 12 16 198 253 3 Dwell for the P number of seconds 4 The Z axis does a rapid move to clear Z The motion of a G82 ca
219. l changer machines G43 HO applies the TLO of the tool TO defined in the tool table file or causes an error if TO is not defined in the tool table G43 H Example Line G43 H1 set tool offsets using the values from tool 1 in the tool table It is an error if e the H number is not an integer or e the H number is negative or e the H number is not a valid tool number though note that 0 is a valid tool number on nonrandom tool changer machines it means the tool currently in the spindle 16 28 G43 1 Dynamic Tool Length Offset G43 1 axes e G43 1 axes change subsequent motions by offsetting the Z and or X offsets stored in the tool table G43 1 does not cause any motion The next time a compensated axis is moved that axis s endpoint is the compensated location G43 1 Example G90 set absolute mode T1 M6 G43 load tool 1 and tool length offsets Z is at machine 0 and DRO shows 21 500 G43 1 20 250 offset current tool offset by 0 250 DRO now shows 21 250 M2 end program See G90 amp T amp M6 sections for more information It is an error if motion is commanded on the same line as G43 1 User Manual V2 6 11 34 gff59490 2015 12 16 185 253 16 29 G43 2 Apply additional Tool Length Offset 643752 He H tool number G43 2 applies an additional simultaneous tool offset G43 2 Example G90 set absolute mode Tl Moe load tool 1 G43 or G43 H1 replace all tool offsets with T1 s of
220. l commands They will act on all blocks of code after one of them has been set The program that might be run using fixture offsets would require only a single coordinate reference for each of the locations and all of the work to be done there The following code is offered as an example of making a square using the G55 offsets that we set above Es 0 lt 0 340 740 GL EZ 2420200010 x1 AL x0 YO GO ZO G54 X0 YO ZO M2 But you say why is there a G54 in there near the end Many programmers leave the G54 coordinate system with all zero values so that there is a modal code for the absolute machine based axis positions This program assumes that we have done that and use the ending command as a command to machine zero It would have been possible to use g53 and arrive at the same place but that command would not have been modal and any commands issued after it would have returned to using the G55 offsets because that coordinate system would still be in effect G54 use preset work coordinate system 1 C55 use preset work coordinate system 2 G56 use preset work coordinate system 3 G57 use preset work coordinate system 4 G58 use preset work coordinate system 5 G59 use preset work coordinate system 6 C591 use preset work coordinate system 7 COSA use preset work coordinate system 8 COSAS use preset work coordinate system 9 13 3 1 Default coordinate system One other variable in the VAR file becomes important when we think about offset s
221. l pin to be able to react to hardware devices The goal is to get a GUI that may be operated in a tool shop completely mostly without mouse or keyboard Note You will have to do all connections to gmoccapy pins in your postgui hal file because they are not available before loading the GUI completely 6 5 1 Right and bottom button lists The screen has two main button lists one on the right side an one on the bottom The right handed buttons will not change during operation but the bottom button list will change very often The buttons are count from up to down and from left to right beginning with 0 In hal_show you will see the right vertical buttons are User Manual V2 6 11 34 gff59490 2015 12 16 59 253 e gmoccapy v button 0 e gmoccapy v button 1 e gmoccapy v button 2 e gmoccapy v button 3 e gmoccapy v button 4 e gmoccapy v button 5 e gmoccapy v button 6 and the bottom horizontal buttons are gmoccapy h button 0 gmoccapy h button 1 gmoccapy h button 2 gmoccapy h button 3 gmoccapy h button 4 gmoccapy h button 5 gmoccapy h button 6 gmoccapy h button 7 gmoccapy h button 8 gmoccapy h button 9 as the buttons in the bottom list will change according the mode and other influences the hardware buttons will activate different functions and you don t have to take care about switching functions around in hal because that is done completely by gmoccapy The sens of this is to be able to u
222. l will fail If executed in a subroutine which protects modal state by an M73 a subsequent return or endsub will not restore modal state The usefulness of this feature is dubious It should not be relied upon as it might go away 17 21 M72 Restore Modal State Modal state saved with an M70 code can be restored by executing an M72 The handling of G20 G21 is specially treated as feeds are interpreted differently depending on G20 G21 if length units mm in are about to be changed by the restore operation M72 will restore the distance mode first and then all other state including feed to make sure the feed value is interpreted in the correct unit setting It is an error to execute an M72 with no previous M70 save operation at that level The following example demonstrates saving and explicitely restoring modal state around a subroutine call using M70 and M72 Note that the imperialsub subroutine is not aware of the M7x features and can be used unmodified User Manual V2 6 11 34 gff59490 2015 12 16 211 253 O lt showstate gt sub DEBUG imperial lt _imperial gt absolute lt _absolute gt feed lt _feed gt rpm lt _rpm gt O lt showstate gt endsub O lt imperialsub gt sub g20 imperial g91 relative mode F5 low feed S300 low rpm debug in subroutine state now o lt showstate gt call O lt imperialsub gt endsub 7 main program ge metric g90 absolute 200 fast speed 2500 high rpm
223. lane There is always a selected plane which must be the XY plane the YZ plane or the XZ plane of the machining center The Z axis is of course perpendicular to the XY plane the X axis to the YZ plane and the Y axis to the XZ plane 12 2 11 Tool Carousel Zero or one tool is assigned to each slot in the tool carousel 12 2 12 Tool Change A machining center may be commanded to change tools 12 2 13 Pallet Shuttle The two pallets may be exchanged by command 12 2 14 Path Control Mode The machining center may be put into any one of three path control modes 1 exact stop mode 2 exact path mode or 3 continuous mode with optional tolerance In exact stop mode the machine stops briefly at the end of each programmed move In exact path mode the machine follows the programmed path as exactly as possible slowing or stopping if necessary at sharp corners of the path In continuous mode sharp corners of the path may be rounded slightly so that the feed rate may be kept up but by no more than the tolerance if specified See Sections G61 G61 1 and G64 12 3 Interpreter Interaction with Switches The Interpreter interacts with several switches This section describes the interactions in more detail In no case does the Interpreter know what the setting of any of these switches is 12 3 1 Feed and Speed Override Switches The Interpreter will interpret RS274 NGC commands which enable M48 or disable M49 the feed and speed overrid
224. lation files to translate LinuxCNC User Interfaces into many languages You just need to log in with the language you intend to use and when you start up LinuxCNC it comes up in that language If your language has not been translated contact a developer on the IRC or the mailing list if you can assist in the translation 2 6 Thinking Like a Machine Operator This book will not even pretend that it can teach you to run a mill or a lathe Becoming a machinist takes time and hard work An author once said We learn from experience if at all Broken tools gouged vices and scars are the evidence of lessons taught Good part finish close tolerances and careful work are the evidence of lessons learned No machine no computer program can take the place of human experience As you begin to work with the LinuxCNC program you will need to place yourself in the position of operator You need to think of yourself in the role of the one in charge of a machine It is a machine that is either waiting for your command or executing the command that you have just given it Throughout these pages we will give information that will help you become a good operator of the LinuxCNC system You will need some information right up front here so that the following pages will make sense to you 2 7 Modes of Operation When LinuxCNC is running there are three different major modes used for inputting commands These are Manual Auto and MDI Changing from one mode to ano
225. le 0100 sub G53 GO X0 YO Z0 rapid move to machine home 0100 endsub 0100 call call the subroutine here M2 See G53 amp GO amp M2 sections for more information O Return Inside a subroutine O return can be executed This immediately returns to the calling code just as though O endsub was encountered O Return Example 0100 sub 0110 if 2 GT 5 test if parameter 2 is greater than 5 0100 return return to top of subroutine if test is true 0110 endif some code here that only gets executed if parameter 2 is less than 5 0100 endsub See the Binary Operators amp Parameters sections for more information O Call O Call takes up to 30 optional arguments which are passed to the subroutine as 1 2 N Parameters from N 1 to 30 have the same value as in the calling context On return from the subroutine the values of parameters 1 through 30 regardless of the number of arguments will be restored to the values they had before the call Parameters 1 30 are local to the subroutine Because 2 3 is parsed as the number 123 the parameters must be enclosed in square brackets The following calls a subroutine with 3 arguments O Call Example 3200 seal MO 121 13 Subroutine bodies may not be nested They may only be called after they are defined They may be called from other functions and may call themselves recursively if it makes sense to do so The maximum subroutine nesting level is 10 Subroutin
226. ll else fails press a software ESTOP This does everything that abort does but adds in a reset so that the LinuxCNC returns to the standard settings that it wakes up on If you have an external estop circuit that watches the relevant parallel port or DIO pin a software estop can turn off power to the motors From the Sherline CNC Operators Manual Most of the time when we abort or E Stop it s because something went wrong Perhaps we broke a tool and want to change it We switch to manual mode and raise the spindle change tools and assuming that we got the length the same get ready to go on If we return the tool to the same place where the abort was issued LinuxCNC will work perfectly It is possible to move the restart line back or ahead of where the abort happened If you press the Back or Ahead buttons you will see a blue highlight that shows the relationship between the abort line and the one on which LinuxCNC will start up again By thinking through what is happening at the time of the restart you can place the tool tip where it will resume work in an acceptable manner You will need to think through things like tool offsets barriers to motion along a diagonal line and such before you press the Restart button 10 5 Left Column There are two columns below the control line The left side of the screen displays information of interest to the operator There are very few buttons to press here 10 5 1 Axis Posi
227. llowing moves take place 1 a rapid move parallel to the XY plane to X4 Y5 2 a rapid move move parallel to the Z axis to Z2 8 3 move parallel to the Z axis at the feed rate to Z1 5 4 a rapid move parallel to the Z axis to Z3 Prelimin ary motion XY linear move to Preliminary motion X and Y volves Rapid from old Initial position Ma Fa ee 1 3 3 na Pi a Drilling cycle Feedrate more from R tof Rapid retum to dd Z 0 0 01 Example 2 Relative Position G81 Suppose the current position is X1 Y2 Z3 and the following line of NC code is interpreted GOL CJG SUMAS OMS hs This calls for incremental distance mode G91 and OLD_Z retract mode G98 It also calls for the G81 drilling cycle to be repeated three times The X value is 4 the Y value is 5 the Z value is 0 6 and the R value is 1 8 The initial X position is 5 1 4 the initial Y position is 7 2 5 the clear Z position is 4 8 1 8 3 and the Z position is 4 2 4 8 0 6 OLD_Z is 3 The first preliminary move is a maximum rapid move along the Z axis to X1 Y2 Z4 8 since OLD_Z lt clear Z The first repeat consists of 3 moves 1 arapid move parallel to the XY plane to X5 Y7 2 move parallel to the Z axis at the feed rate to Z4 2 3 arapid move parallel to the Z axis to X5 Y7 Z4 8 User Manual V2 6 11 34 gff59490 2015 12 16 196 253 The second repeat consists of 3 moves The X position is reset to 9 5 4 and the Y p
228. localize the helper global result lt _helper answer gt 0 0 nullify global named parameter used by subroutine o lt examp gt endsub In the above example the utility subroutine will be found in a separate file named helper ngc The helper routine returns a result in a global named parameter named lt _helper answer For good practice the calling subfile immediately localizes the result for use elsewhere in the subfile and the global named parameter used for returning the result is nullified in an attempt to mitigate its inadvertent use elsewhere in the global context A nullification value of 0 0 may not always be a good choice Ngcgui supports the creation and concatenation of multiple features for a subfile and for multiple subfiles It is sometimes useful for subfiles to determine their order at runtime so ngcgui inserts a special global parameter that can be tested within subroutines The parameter is named lt _feature gt Its value begins with a value of 0 and is incremented for each added feature Additional Features A special info comment can be included anywhere in an ngcgui compatible subfile The format is tinto Intoctext The info_text is displayed near the top of the ngcgui tab page in axis Files not intended for use as subfiles can include a special comment so that ngcgui will reject them automatically with a relevant message not_a_subfile An optional image file png gif jpg pgm can accompany a subfil
229. lse 0 e lt _retract_r_plane gt Return if G98 is set else 0 e lt _retract_old_z gt Return 1 if G99 is on else 0 15 7 5 System Parameters e lt _spi e lt _spi e lt _ijk e lt _lat e lt _lat e lt _spi e lt _spi nd nd le_rpm_mode gt Return 1 if spindle rpm mode G97 is on else 0 le_css_mode gt Return 1 if constant surface speed mode G96 is on else 0 absolute_mode gt Return 1 if Absolute Arc distance mode G90 1 is on else 0 nd nd he_diameter_mode gt Return if this is a lathe configuration and diameter G7 mode is on else 0 he_radius_mode gt Return 1 if this is a lathe configuration and radius G8 mode is on else 0 le_on gt Return 1 if spindle currently running M3 or M4 else 0 le_cw gt Return 1 if spindle direction is clockwise M3 else 0 e lt _mist gt Return 1 if mist M7 is on User Manual V2 6 11 34 gff59490 2015 12 16 152 253 e lt _flood gt Return 1 if flood M8 is on e lt _speed_override gt Return 1 if feed override M48 or M50 P1 is on else 0 e lt _feed_override gt Return 1 if feed override M48 or M51 P1 is on else 0 e lt _adaptive_feed gt Return 1 if adaptive feed M52 or M52 P1 is on else 0 e lt _feed_hold gt Return 1 if feed hold switch is enabled M53 P1 else 0
230. m is showing in the display Once you start working with Mini you will quickly discover how easily it shows the conditions of the LinuxCNC and allows you to make changes to it 10 3 Menu Bar The first row is the menu bar across the top Here you can configure the screen to display additional information Some of the items in this menu are very different from what you may be accustomed to with other programs You should take a few minutes and look under each menu item in order to familiarize yourself with the features that are there The menu includes each of the following sections and subsections e Program This menu includes both reset and exit functions Reset will return the LinuxCNC to the condition that it was in when it started Some startup configuration items like the normal program units can be specified in the ini file e View This menu includes several screen elements that can be added so that you can see additional information during a run These include Position_Type This menu item adds a line above the main position displays that shows whether the displays are in inches or metric and whether they are Machine or Relative location and if they are Actual positions or Commanded positions These can be changed using the Settings menu described below Tool_Info This adds a line immediately below the main position displays that shows which tool has been selected and the length of offset applied Offset_Info adds
231. m to know when running an unknown G code program for the first time In combination with the rapid override and feedrate override controls unwanted tool and machine damage can be avoided Once the G code program has been debugged and is running smoothly the Distance to Go display can be disabled if desired Clear Live Plot As the tool travels in the Axis display the G code path is highlighted To repeat the program or to better see an area of interest the previously highlighted paths can be cleared Show Commanded Position This is the position that LinuxCNC will try to go to Once motion has stopped this is the position LinuxCNC will try to hold Show Actual Position Actual Position is the measured position as read back from the system s encoders or simulated by step generators This may differ slightly from the Commanded Position for many reasons including PID tuning physical constraints or position quantization Show Machine Position This is the position in unoffset coordinates as established by Homing Show Relative Position This is the Machine Position modified by G5x G92 and G43 offsets HELP MENU About Axis We all know what this is Quick Reference Shows the keyboard shortcut keys 5 3 2 Toolbar buttons From left to right in the Axis display the toolbar buttons keyboard shortcuts shown in brackets are Y Toggle Emergency Stop F1 also called E Stop Toggle Machine Power F2 Open G Code file
232. me DROs use linear quadrature encoders to pick up position information from the machine and some use methods similar to a resolver which keeps rolling over EDM EDM is a method of removing metal in hard or difficult to machine or tough metals or where rotating tools would not be able to produce the desired shape in a cost effective manner An excellent example is rectangular punch dies where sharp internal corners are desired Milling operations can not give sharp internal corners with finite diameter tools A wire EDM machine can make internal corners with a radius only slightly larger than the wire s radius A sinker EDM can make internal corners with a radius only slightly larger than the radius on the comer of the sinking electrode EMC The Enhanced Machine Controller Initially a NIST project Renamed to LinuxCNC in 2012 EMCIO The module within LinuxCNC that handles general purpose I O unrelated to the actual motion of the axes EMCMOT The module within LinuxCNC that handles the actual motion of the cutting tool It runs as a real time program and directly controls the motors Encoder A device to measure position Usually a mechanical optical device which outputs a quadrature signal The signal can be counted by special hardware or directly by the parport with LinuxCNC Feed Relatively slow controlled motion of the tool used when making a cut Feed rate The speed at which a cutting motion occurs In auto or mdi mode feed rate
233. me directory as your configura tion and is called tool tbl The tools might be in a tool changer or just changed manually The file can be edited with a text editor or be updated using G10 L1 See the Lathe Tool Table Section for an example of the lathe tool table format The maximum number of entries in the tool table is 56 The maximum tool and pocket number is 99999 The Tool Editor or a text editor can be used to edit the tool table If you use a text editor make sure you reload the tool table in the GUI 14 2 1 Tool Table Format Table 14 1 Tool Table Format TA PH X Y Z A B C U Vv W Dia FA BA Ori Rem no data after opening semicolon Tl P17 X0 YO ZO AO BO CO UO vo WO DO 10 JO Q0 rem T2 PS X0 YO ZO AO BO CO UO vo WO DO 10 JO Q0 rem T3 P12 X0 YO ZO AO BO CO UO vo WO DO 10 JO Q0 rem In general the new tool table line format is e Opening semicolon no data e T tool number 0 99999 tool numbers must be unique e P pocket number 1 99999 pocket numbers must be unique e X W tool offset on specified axis floating point e D tool diameter floating point absolute value e I front angle lathe only floating point e J back angle lathe only floating point e Q tool orientation lathe only integer 0 9 e beginning of comment or remark text The file consists of one opening semicolon on the first line followed
234. me_width width of varname field USA fewer comments in outfile noiframe default frame displays image Note As a standalone application ngcgui handles a single subroutine file which can be invoked multiple times Multiple standalone ngcgui applications can be started independently 7 4 2 Standalone PYNGCGUI For usage type in a terminal pyngcgui help Usage pyngcgui Options sub_filename Options requiring values l demo 0 1 2 0 DEMO standalone toplevel 1 DEMO embed new notebook 2 DEMO embed within existing notebook S subfil sub_filename p preambl preamble_filename P postamble postamble_filename 1 inifile_name a autofile autoauto_filename E E eSt testno ZH height height_of_entry widget typ 20 40 ER keyboardfil glade_file use custom popupkeyboard glade file Solo Options v verbose D debug N nom2 no m2 terminator use E nosuta save but do not automatically send result k keyboard use default popupkeybaord User Manual V2 6 11 34 gff59490 2015 12 16 88 253 s sendtoaxis send generated ngc file to axis gui Notes A set of files is comprised of a preamble subfile postamble The preamble and postamble are optional One set of files can be specified from cmdline Multiple sets of files can be specified from an inifile SNA NOS pS cie de search for a running linuxCNC and use it s ini
235. milar to the one axis uses You can delete a specific message by clicking on it s close button if you want to delete the last one just hit the WINDOWS key on your keyboard or delete all messages at ones with lt STRG gt lt SPACE gt You are able to set some options e X Pos The position of the top left corner of the message in X counted in pixel from the top left corner of the screen e Y Pos The position of the top left corner of the message in Y counted in pixel from the top left corner of the screen Width The width of the message box max The maximum messages you want to see at ones if you set this to 10 the 11th message will delete the first one so you will only see the last 10 ones Font The font and size you want to use to display the messages use frames If you activate the checkbox each message will be displayed in a frame so it is much easiere to distinguish the messages But you will need a little bit more space The button launch test message will just do what it is supposed to it will show a message so you can see the changes of your settings without the need to generate an error Run from line option You can allow or disallow the run from line This will set the corresponding button insensitive grayed out so the user will not be able to use this option Warning D It is not recommend to use run from line as LinuxCNC will not take care of any previous lines in the code before the starting line S
236. mm O O o J Comm ar ts 1 2345in Tool information Max Velocity Cooling Spindle rpm Too no Diameter offset z e 0 o 0 000 Vel 0 2500 100 as No tool description available 14040 G Code MO M3 M9 M48 MS3 F o Feed Override G8 G17 G21 G40 G49 G54 G64 G80 Si 10 Ma G90 G91 1 G94 G97 G99 S 2500 FO 100 3 a E 13 Program 100 No Program loaded O o 30 E oe 7 E box_left showing gmoccapy in edit mode User Manual V2 6 11 34 gff59490 2015 12 16 53 253 gmoccapy for linuxcne 1 4 0 nll3g0z 1 n114 y1 75 x1 6 n115 zo ni16g1y15x18 n117 y1 75 x2 n118 y1 5 x1 8 n119 y 1 25 n120 gO x0 y0 z0 n121 x1 zl start xz circle n122 g18 g02i 5k 5 n124 go y 1 add xz lettering 125 21 75 n126 yO n127 g1 71 25 x14 n128 z1 5 x1 2 129 71 25 x1 n130 21 75 x14 n131 g0 y 1 n132 21 75 x1 6 n133 y0 nl34 g1 x2 n135 21 25 x16 n136 x2 n137 gO x0 yO z0 n138 y1 z1 start yz circle ARETES box_right and gmoccapy in MDI mode User Manual V2 6 11 34 gff59490 2015 12 16 54 253 Jerry s Custom Panel V1 1 X X O jo e LO Command g96 D6000 200 z Z O g97 949 g40 A A z SUBPANEL 1 tim 943 u a IA y Tool information Max Velocity Cooling Spindle rpm Tool no Diameter offsetz Vel O 42 7 o o 0 000 S 3500 100 as No tool description available 14040 Fi G Code IA A 100 MO MS M9 M48 M53 F o Feed Override
237. modalgroup 6 prolog change_prolog ngc chang pilog change_epilog The tool sensor section The position of the tool sensor and the start position of the probing movement all values are absolute coordinates except MAXPROBE what must be given in relative movement TOOLSENSOR xX 10 Y 10 Z 20 MAXPROBE 20 The Change position section this is not named TOOL_CHANGE POSITION on purpose canon uses that name and will interfere otherwise The position to move the machine before giving the change tool command All values are in absolute coordinates CHANGE_POSITION xX 10 Y 10 Z 2 The Python section the Python plugins serves interpreter and task PYTHON The path to start a search for user modules PATH_PREPEND python The start point for all TOPLEVEL python toplevel py 6 6 3 Needed Files You must copy the following files to your config dir First make a directory python in your config folder from your_linuxcnc dev_directory configs sim gmoccapy python Copy toplevel py to your config_dir python folder Copy remap py to your config_dir python folder Copy stdglue py to your config_dir python folder from your_linuxcnc dev_directory configs sim gmoccapy macros copy on_abort ngc to the directory specified as SUBROUTINE_PATH see RS274NGC Section from your_linuxcnc dev_directory configs sim gmoccapy macros copy change ngc to the directory specified as SUBROUTINE_PATH see RS
238. move motions G94 is Units per Minute Mode In units per minute feed mode an F word is interpreted to mean the controlled point should move at a certain number of inches per minute millimeters per minute or degrees per minute depending upon what length units are being used and which axis or axes are moving G95 is Units per Revolution Mode In units per revolution mode an F word is interpreted to mean the controlled point should move a certain number of inches per revolution of the spindle depending on what length units are being used and which axis or axes are moving G95 is not suitable for threading for threading use G33 or G76 G95 requires that motion spindle speed in to be connected It is an error if Inverse time feed mode is active and a line with G1 G2 or G3 explicitly or implicitly does not have an F word A new feed rate is not specified after switching to G94 or G95 16 54 G96 G97 Spindle Control Mode G96 lt D gt S Constant Surface Speed G97 RPM Mode D maximum spindle RPM S surface speed G96 D S selects constant surface speed of S feet per minute if G20 is in effect or meters per minute if G21 is in effect D is optional When using G96 ensure that XO in the current coordinate system including offsets and tool lengths is the center of rotation or LinuxCNC will not give the desired spindle speed G96 is not affected by radius or diameter mode G97 selects RPM mode G96 Example Line
239. moving each axis to a known home position and issuing an axis home command any G92 offsets will be applied If you have a G92 X1 in effect when you home the X axis the DRO will read X 1 000 instead of the expected X 0 000 because the G92 was applied to the machine origin If you issue a G92 1 and the DRO now reads all zeros then you had a G92 offset in effect when you last ran LinuxCNC Unless your intention is to use the same G92 offsets in the next program the best practice is to issue a G92 1 at the end of any G Code files where you use G92 offsets 13 5 Sample Program Using Offsets This sample engraving project mills a set of four 1 radius circles in roughly a star shape around a center circle We can setup the individual circle pattern like this G10 L2 P1 X0 YO ZO ensure that G54 is set to machine zero CO X01 wO ZO Cl wil 220 25 CONS OOO GO Z0 M2 We can issue a set of commands to create offsets for the four other circles like this CLO 2 P2 XOS OE Ss SS Gobo xX value by Oso Nen CLO mA 123 20 0 Olas ces G30 X vetus Joy 0 5 Nen GLO M2 PA VOLS OE SCS ED X vabe oy OO LNC CLO WA 125 DO Os SiS C99 Y valus oy 0 5 TTEN We put these together in the following program a program for milling five small circles in a diamond shape L2 Pl XO YO ZO ensure that G54 is machine zero L2 P2 X0 5 offsets G55 X value by 0 5 inch TA 2S OS cs SS X value ly OaS aliorela a TA OS orcas E de seul lr 63 ialela IA RS 0S
240. n be found here 16 10 G7 Lathe Diameter Mode G7 Program G7 to enter the diameter mode for axis X on a lathe When in the diameter mode the X axis moves on a lathe will be 1 2 the distance to the center of the lathe For example X1 would move the cutter to 0 500 from the center of the lathe thus giving a 1 diameter part 16 11 G8 Lathe Radius Mode G8 User Manual V2 6 11 34 gff59490 2015 12 16 175 253 Program G8 to enter the radius mode for axis X on a lathe When in Radius mode the X axis moves on a lathe will be the distance from the center Thus a cut at X1 would result in a part that is 2 in diameter G8 is default at power up 16 12 G10 L1 Set Tool Table G10 L1 P axes lt R I J Q gt e P tool number e R radius of tool e I front angle lathe e J back angle lathe e Q orientation lathe G10 L1 sets the tool table for the P tool number to the values of the words A valid G10 L1 rewrites and reloads the tool table G10 L1 Example Line GIO wL PL wil S ser cool i 4 rre meca das machus erica To ILS G10 L1 P2 RO 015 Q3 lathe example setting tool 2 radius to 0 015 and orientation to 3 It is an error if e Cutter Compensation is on e The P number is unspecified The P number is not a valid tool number from the tool table The P number is 0 For more information on cutter orientation used by the Q word see the Lathe Tool Orientation diagram 16 13 G10 L2 Set Coordinate System
241. n independently The RS274 NGC language turns them off together see Section M7 M8 M9 12 2 7 Dwell A machining center may be commanded to dwell i e keep all axes unmoving for a specific amount of time The most common use of dwell is to break and clear chips so the spindle is usually turning during a dwell Regardless of the Path Control Mode see Section Path Control the machine will stop exactly at the end of the previous programmed move as though it was in exact path mode 12 2 8 Units Units used for distances along the X Y and Z axes may be measured in millimeters or inches Units for all other quantities involved in machine control cannot be changed Different quantities use different specific units Spindle speed is measured in revolutions per minute The positions of rotational axes are measured in degrees Feed rates are expressed in current length units per minute or degrees per minute or length units per spindle revolution as described in Section G93 G94 G95 12 2 9 Current Position The controlled point is always at some location called the current position and the controller always knows where that is The numbers representing the current position must be adjusted in the absence of any axis motion if any of several events take place 1 Length units are changed 2 Tool length offset is changed 3 Coordinate system offsets are changed User Manual V2 6 11 34 gff59490 2015 12 16 129 253 12 2 10 Selected P
242. n se cr A a SS 62 Gas Jog mcemen ARALAR A ES 62 65 6 erdware unlock pin sos riders Ree See ea Ee ESR EA SR Ow 62 Wie EROE P e o boc bs et Ge BA hers BM ROS A ee aris Ae He Ge 8G S amp 63 635 User Created Message HAL PWS 2 25 ooog accea eee eho PERE EE we eee eS 63 65 9 Spmdletecdback pins lt lt s e sree erete eee eee Ra ee E ee a ee 63 6 5 10 Pins to indicate program progress information 2 2 2 200 eee ee 64 6311 Tool related pits e e ei alk dab ee ae gd A a a al hee ee ra oe N 64 6 0 Auto Tool M as tement o s c socera ESD RA RRS ERA ODE eA eae GO 65 6 6 1 Toolmeasinemient Ping lt A ee eee ee 66 6 6 2 Tool Measurement INI File modifications s sa 665656 6s ee ee ee EN eee ee 67 G03 Needed Piles es ee Hate eee oN Be eee ee Ee eR as E 67 Gos Needed Hal commechions 2 4522 22 et Ge SASS Gb bes ved eH Se PEPE eS ES 68 07 Thesetings PRES occ ee ee ew eR Pe eR eee ee eR pe Seb ek Ee eS A eR ESS 68 el Pepe an eis po Ae a Ke BAe Gare de ee E eae ee ane ee Hoe Gad SG GS amp 69 Baz Hal ba oe eh A eS Bete Sho PRES Owe ad ee e e 74 6 7 9 Advanced Semmes e escea 44468 bbe ee ae E Ra ee ea ee a ee 76 0S LATHE specmiesocnot acciona Seles Peaa deep dee aa Pica d Bee ae Page a 78 69 Plasma Specie setli cc a ba ee eae ee we a De ea he we ee wre oe 80 0 10 VIDEO On you Tbe oscar a ES ae RR RRS EEA OE ee A eae 80 6 10 1 Basie Usage ocios eA ee bd eee bee eR ee e eee eo 81 6102 Simulated Jog Wheels ce ore oxo Se da d ee eee eedod
243. nate system with G54 e Set the G54 coordinate system to be the same as the machine coordinate system with G10 L2 P1 X0 YO ZO RO e Turn off tool offsets with G49 e Turn on the Relative Coordinate Display from the menu Now you should be at the machine origin XO YO ZO and the relative coordinate system should be the same as the machine coordinate system 3 6 Machine Configurations The following diagram shows a typical mill showing direction of travel of the tool and the mill table and limit switches Notice how the mill table moves in the opposite direction of the Cartesian coordinate system arrows shown by the Tool Direction image This makes the tool move in the correct direction in relation to the material User Manual V2 6 11 34 gff59490 2015 12 16 21 253 Tool Direction Z Y A X Rotary Table Rotaion A Z Origin Home Switch amp 12 Home Position X Origin amp Home Switch Y Origin Home Switch amp Home Position Figure 3 2 Mill Configuration The following diagram shows a typical lathe showing direction of travel of the tool and limit switches User Manual V2 6 11 34 gff59490 2015 12 16 22 253 Figure 3 3 Lathe Configuration User Manual V2 6 11 34 gff59490 2015 12 16 23 253 Part II User Interfaces User Manual V2 6 11 34 gff59490 2015 12 16 24 253 Chapter 4 CONFIGURATION SELECTOR The Configuraton Selector gui is activated from the system main menu when
244. nd to the pause button on most keyboards 10 4 5 ABORT The abort button stops any motion when it is pressed It also removes the motion command from the LinuxCNC No further motions are cued up after this button is pressed If you are in auto mode this button removes the rest of the program from the User Manual V2 6 11 34 gff59490 2015 12 16 115 253 motion cue It also records the number of the line that was executing when it was pressed You can use this line number to restart the program after you have cleared up the reasons for pressing it 10 4 6 ESTOP The estop button is also a toggle but it works in three possible settings When Mini starts up it will show a raised button with red background with black letters that say ESTOP PUSH This is the correct state of the machine when you want to run a program or jog an axis Estop is ready to work for you when it looks like this If you push the estop button while a motion is being executed you will see a recessed gray button that says ESTOPPED You will not be able to move an axis or do any work from the Mini gui when the estop button displays this way Pressing it with your mouse will return Mini to normal ready condition A third view is possible here A recessed green button means that estop has been take off but the machine has not been turned on Normally this only happens when lt F1 gt estop has been pressed but lt F2 gt has not been pressed Joe Martin says When a
245. ndle 100 RPM G33 1 Z 0 750 K0 05 rigid tap a 20 TPI thread 0 750 deep M2 end program e See G90 amp GO amp M2 sections for more information It is an error if e All axis words are omitted e The spindle is not turning when this command is executed e The requested linear motion exceeds machine velocity limits due to the spindle speed 16 23 G38 x Straight Probe G38 x axes G38 2 probe toward workpiece stop on contact signal error if failure G38 3 probe toward workpiece stop on contact G38 4 probe away from workpiece stop on loss of contact signal error if failure G38 5 probe away from workpiece stop on loss of contact User Manual V2 6 11 34 gff59490 2015 12 16 182 253 Important You will not be able to use a probe move until your machine has been set up to provide a probe input signal The probe input signal must be connected to motion probe input in a hal file G38 x uses motion probe input to determine when the probe has made or lost contact TRUE for probe contact closed touching FALSE for probe contact open Program G38 x axes to perform a straight probe operation The axis words are optional except that at least one of them must be used The axis words together define the destination point that the probe will move towards starting from the current location If the probe is not tripped before the destination is reached G38 2 and G38 4 will signal an error The tool in the spindl
246. ndx gt y lt endy gt 14 01001 else sc Bent Vn sr Ve M Sean Y gt Signals Control Cutting Piercing Corner lock THC Voltage Float Sw zup 0 on 15 0 Y Autostart Enable Actual Tip Volts Torch On O Zdown o Treshold Arc OK O Cnriock O limits THCSpd THCSpd 5 000 mm 60 i 0 V G Code Pos 4 000 mm Gap Gap xu as MO MS M9 M48 M53 F o 0 tG ok tae z 100 V G8 G17 G21 G40 G49 G54 G64 G80 o A AG oo s G90 G91 1 G94 G97 G99 45 000 Programm Delay Delay z THC J Inc_files Mowsnake ngc GO Gap j GO Gap z Hinweise E 4 There is a very good WIKI which is actually growing maintained by Marius see Plasma wiki page 6 10 VIDEO on you tube This are videos showing gmoccapy in action unfortunately the videos don t show the latest version of gmoccapy but the way to use it will not change much in the future I will try to actualize the videos as soon as possible User Manual V2 6 11 34 gff59490 2015 12 16 81 253 6 10 1 Basic Usage German English https www youtube com watch v 05B s3uil6g 6 10 2 Simulated Jog Wheels English http youtu be ag34SGxt970 6 10 3 Settings Page German Settings English Settings https www youtube com watch v AuwhSHRJoiI 6 10 4 Simulated Hardware Button German Hardware_Button http www youtube com watch v DTqh Y MfzDE English Hardware Button http www youtube com watch v ItVWJBK9WFA 6 10 5 User Tabs English User Tabs http www youtube com
247. ne or groove around the X axis to highlight its position display This groove says that X is the active axis It will be the target for jog moves made with the plus and minus jog buttons You can change axis focus by clicking on any other axis display You can also change axis focus in manual mode if you press its name key on your keyboard Case is not important here Y or y will shift the focus to the Y axis A or a will shift the focus to the A axis To help you remember which axis will jog when you press the jog buttons the active axis name is displayed on them LinuxCNC can jog move a particular axis as long as you hold the button down when it is set for continuous or it can jog for a preset distance when it is set for incremental You can also jog the active axis by pressing the plus or minus keys on the keyboard Again case is not important for keyboard jogs The two small buttons between the large jog buttons let you set which kind of jog you want When you are in incremental mode the distance buttons come alive You can set a distance by pressing it with the mouse You can toggle between distances by pressing i or I on the keyboard Incremental jog has an interesting and often unexpected effect If you press the jog button while a jog is in progress it will add the distance to the position it was at when the second jog command was issued Two one inch jog presses in close succession will not get you two inches of movement You
248. nents 12 2 1 Linear Axes The X Y and Z axes form a standard right handed coordinate system of orthogonal linear axes Positions of the three linear motion mechanisms are expressed using coordinates on these axes The U V and W axes also form a standard right handed coordinate system X and U are parallel Y and V are parallel and Z and W are parallel when A B and C are rotated to zero 12 2 2 Rotational Axes The rotational axes are measured in degrees as wrapped linear axes in which the direction of positive rotation is counterclockwise when viewed from the positive end of the corresponding X Y or Z axis By wrapped linear axis we mean one on which the angular position increases without limit goes towards plus infinity as the axis turns counterclockwise and deceases without limit goes towards minus infinity as the axis turns clockwise Wrapped linear axes are used regardless of whether or not there is a mechanical limit on rotation Clockwise or counterclockwise is from the point of view of the workpiece If the workpiece is fastened to a turntable which turns on a rotational axis a counterclockwise turn from the point of view of the workpiece is accomplished by turning the turntable in a direction that for most common machine configurations looks clockwise from the point of view of someone standing next to the machine 12 2 3 Controlled Point The controlled point is the point whose position and rate of motion are controlle
249. newline character at the end of each entry The meanings of the entries and the type of data to be put in each are as follows Tool Number required The 7 column contains the number unsigned integer which represents a code number for the tool The user may use any code for any tool as long as the codes are unsigned integers Pocket Number required The P column contains the number unsigned integer which represents the pocket number slot number of the tool changer slot where the tool can be found The entries in this column must all be different The pocket numbers will typically start at 1 and go up to the highest available pocket on your tool changer But not all tool changers follow this pattern Your pocket numbers will be determined by the numbers that your tool changer uses to refer to the pockets So all this is to say that the pocket numbers you use will be determined by the numbering scheme used in your tool changer and the pocket numbers you use must make sense on your machine Data Offset Numbers optional The Data Offset columns XYZABCUVW contain real numbers which represent tool offsets in each axis This number will be used if tool length offsets are being used and this tool is selected These numbers can be positive zero or negative and are in fact completely optional Although you will probably want to make at least one entry here otherwise there would be little point in making an entry in the tool table to begin with
250. ng it Then click and hold the or button depending on the desired direction of motion The first four axes can also be moved by the arrow keys X and Y PAGE UP and PAGE DOWN keys Z and the and keys A If Continuous is selected the motion will continue as long as the button or key is pressed If another value is selected the machine will move exactly the displayed distance each time the button is clicked or the key is pressed By default the available values are 0 1000 0 0100 0 0010 0 0001 See the Configure section of the Integrator Manual for more information on setting the increments Homing If your machine has home switches and a homing sequence defined for all axes the button will read Home All The Home All button or the Ctrl HOME key will home all axes using the homing sequence Pressing the HOME key will home the current axis even if a homing sequence is defined If your machine has home switches and no homing sequence is defined or not all axes have a homing sequence the button will read Home and will home the selected axis only Each axis must be selected and homed separately If your machine does not have home switches defined in the configuration the Home button will set the current selected axis current position to be the absolute position O for that axis and will set the is homed bit for that axis See the Integrator Manual for more information on homing Touch Off By pressing Touch Off or the END key the G54 off
251. ng on your machine configuration not all the items in this group may appear Pressing the spindle start button sets the S speed to 1 The Coolant group The two buttons allow the Mist and Flood coolants to be turned on and off Depending on your machine configuration not all the items in this group may appear 5 3 6 MDI MDI allows G code commands to be entered manually When the machine is not turned on or when a program is running the MDI controls are unavailable Manual Control F3 MDI F5 History m3 A g88 1 x1 M63 PO GO XO YO 0 M63 PO GO X0 YO ZO J 7 MDI Command Po Active G Codes Gl G17 G40 G20 G90 G94 G54 G49 G99 1664 G97 91 1 G8 M2 MS M9 M48 MS3 MO Figure 5 5 The MDI tab e History This shows MDI commands that have been typed earlier in this session e MDI Command This allows you to enter a g code command to be executed Execute the command by pressing Enter or by clicking Go e Active G Codes This shows the modal codes that are active in the interpreter For instance G54 indicates that the G54 offset is applied to all coordinates that are entered When in Auto the Active G Codes represent the codes after any read ahead by the interpreter 5 3 7 Feed Override By moving this slider the programmed feed rate can be modified For instance if a program requests F60 and the slider is set to 120 then the resulting feed rate will be 72 User Manual V2 6 11 34 gff59490 2015 12 16
252. nges won t happen It s best to always program a motion G code GO G1 etc right after the M62 63 M64 amp M65 happen immediately as they are received by the motion controller They are not synchronized with movement and they will break blending Note M62 65 will not function unless the appropriate motion digital out nn pins are connected in your hal file to outputs User Manual V2 6 11 34 gff59490 2015 12 16 208 253 17 16 M66 Wait on Input MOG B MESE e P specifies the digital input number from 0 to 3 e E specifies the analog input number from 0 to 3 e L specifies the wait mode type Mode 0 IMMEDIATE no waiting returns immediately The current value of the input is stored in parameter 5399 Mode 1 RISE waits for the selected input to perform a rise event Mode 2 FALL waits for the selected input to perform a fall event Mode 3 HIGH waits for the selected input to go to the HIGH state Mode 4 LOW waits for the selected input to go to the LOW state e Q specifies the timeout in seconds for waiting If the timeout is exceeded the wait is interrupt and the variable 5399 will be holding the value 1 The Q value is ignored if the L word is zero IMMEDIATE A Q value of zero is an error if the L word is non zero e Mode 0 is the only one permitted for an analog input M66 Example Lines WSE RO LS O05 mete vwa Lo 5 S SONAS MEAR gr cp UEG O M66 wait on an
253. nned cycle looks just like G81 with the addition of a dwell at the bottom of the Z move The length of the dwell is specified by a P word in the G82 block 16 41 G83 Peck Drilling Cycle Gis CH X m oF W y W R b The G83 cycle often called peck drilling is intended for deep drilling or milling with chip breaking The retracts in this cycle clear the hole of chips and cut off any long stringers which are common when drilling in aluminum This cycle takes a Q number which represents a delta increment along the Z axis The retract before final depth will always be to the retract plane even if G98 is in effect The final retract will honor the G98 99 in effect G83 functions the same as G81 with the addition of retracts during the drilling operation 1 Preliminary motion as described in the Preliminary and In Between Motion section 2 Move the Z axis at the current feed rate downward by delta or to the Z position whichever is less deep 3 Rapid move back out to the retract plane specified by the R word 4 Rapid move back down to the current hole bottom backed off a bit 5 Repeat steps 2 3 and 4 until the Z position is reached at step 2 6 The Z axis does a rapid move to clear Z It is an error if e the Q number is negative or zero 16 42 G84 Right Hand Tapping Cycle This code is currently unimplemented in LinuxCNC It is accepted but the behavior is undefined See section G33 1 16 43 G85 Boring Cycle Feed O
254. not applicable for Custom tabs Do no to limit the user s abili additional tab pages DISPLAY GCMC_INCLUDE_PAT DISPLAY GCMC_INCLUDE_PAT gemc_includes2 t use Custom tabs if you want ty to select subfiles or create dirnamel dirname2 oo am ll home myname gecmc_includes home myname gt Optional each directory will be included when gcmc is invoked using the option include dirname 7 6 File Requirements for NGCGUI Compatibility 7 6 1 Single File Gcode ngc Subroutine Requirements An NGCGUI compatible subfile contains a single subroutine definition The name of the subroutine must be the same as the filename not including the ngc suffix LinuxCNC supports named or numbered subroutines but only named subroutines are User Manual V2 6 11 34 gff59490 2015 12 16 94 253 compatible with NGCGUI For more information see the O Codes Chapter The first non comment line should be a sub statement The last non comment line should be a endsub statement examp ngc info info_text_to_appear_at_top_of_tab_page comment line beginning with semicolon comment line using parentheses o lt examp gt sub BODY_OF_SUBROUTINI o lt examp gt endsub E comment line beginning with semicolon comment line using parentheses The body of the subroutine should begin with a set of statements that define local named parameters for each positional parameter expected
255. not have undo nor paste between windows with the clipboard These were eliminated because of interaction with a running program Future releases will replace these functions so that it will work the way you ve come to expect from a text editor It is included because it has the rather nice feature of being able to number and renumber lines in the way that the interpreter expects of a file It will also allow you to cut and paste from one part of a file to another In addition it will allow you to save your changes and submit them to the LinuxCNC interpreter with the same menu click You can work on a file in here for a while and then save and load if the LinuxCNC is in Auto mode If you have been running a file and find that you need to edit it that file will be placed in the editor when you click on the editor button on the top menu User Manual V2 6 11 34 gff59490 2015 12 16 118 253 10 6 2 Backplot Display Figure 10 6 Minis Backplotter Backplot Backplot will show the tool path that can be viewed from a chosen direction 3 D is the default Other choices and controls are displayed along the top and right side of the pop in If you are in the middle of a cut when you press one of these control buttons the machine will pause long enough to re compute the view Along the right side of the pop in there is a small pyramid shaped graphic that tries to show the angle you are viewing the tool path from Below it are a series of sliders
256. nsive example showing gcmc compatibility is at Sample Configurations sim axis ngcgui ngcgui_gemc A comprehensive example embedded as a gladevcp app and using gcmc is at Sample Configurations sim gscreen ngcgui pyngcgui_geme The example sim configurations make use of library files that provide example gcode subroutine ngc files and Gcode meta compiler gcmc files User Manual V2 6 11 34 gff59490 2015 12 16 85 253 e nc_files ngcgui_lib arcl ngc basic arc using cutter radius compensation arc2 ngc arc speced by center offset width angle calls arc 1 backlash ngc routine to measure an axis backlash with dial indicator db25 ngc creates a DB25 plug cutout gosperngc a recursion demo flowsnake helix ngc helix or D hole cutting helix_rtheta ngc helix or D hole positioned by radius and angle hole_circle ngc equally spaced holes on a circle ihex ngc internal hexagon iquad ngc internal quadrilateral ohex ngc outside hexagon oquad ngc outside quadrilateral qpex_mm ngc demo of qpockets mm based qpex ngc demo of qpockets inch based qpocket ngc quadrilateral pocket rectangle_probe ngc probe a rectangular area simp ngc a simple subroutine example that creates two circles slot ngc slot from connecting two endpoints xyz ngc machine exerciser constrained to a box shape e nc_files ngcgui_li
257. nt and other documents released under this License and replace the indi vidual copies of this License in the various documents with a single copy that is included in the collection provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects User Manual V2 6 11 34 gff59490 2015 12 16 249 253 You may extract a single document from such a collection and distribute it individually under this License provided you insert a copy of this License into the extracted document and follow this License in all other respects regarding verbatim copying of that document 7 AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works in or on a volume of a storage or distribution medium does not as a whole count as a Modified Version of the Document provided no compilation copyright is claimed for the compilation Such a compilation is called an aggregate and this License does not apply to the other self contained works thus compiled with the Document on account of their being thus compiled if they are not themselves derivative works of the Document If the Cover Text requirement of section 3 is applicable to these copies of the Document then if the Document is less than one quarter of the entire aggregate the Document s Cover Texts may be placed on covers that surround only the Document within the aggregate
258. nt under the conditions of sections 2 and 3 above provided that you release the Modified Version under precisely this License with the Modified Version filling the role of the Document thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it In addition you must do these things in the Modified Version User Manual V2 6 11 34 gff59490 2015 12 16 248 253 A Use in the Title Page and on the covers if any a title distinct from that of the Document and from those of previous versions which should if there were any be listed in the History section of the Document You may use the same title as a previous version if the original publisher of that version gives permission B List on the Title Page as authors one or more persons or entities responsible for authorship of the modifications in the Modified Version together with at least five of the principal authors of the Document all of its principal authors if it has less than five C State on the Title page the name of the publisher of the Modified Version as the publisher D Preserve all the copyright notices of the Document E Add an appropriate copyright notice for your modifications adjacent to the other copyright notices F Include immediately after the copyright notices a license notice giving the public permission to use the Modified Version under the terms of this License in the form shown in the Addendum below G Preserve in
259. nu org copyleft Each version of the License is given a distinguishing version number If the Document specifies that a particular numbered version of this License or any later version applies to it you have the option of following the terms and conditions either of that specified version or of any later version that has been published not as a draft by the Free Software Foundation If the Document does not specify a version number of this License you may choose any version ever published not as a draft by the Free Software Foundation ADDENDUM How to use this License for your documents To use this License in a document you have written include a copy of the License in the document and put the following copyright and license notices just after the title page Copyright c YEAR YOUR NAME Permission is granted to copy distribute and or modify this document under the terms of the GNU Free Documentation License Version 1 1 or any later version published by the Free Software Foundation with the Invariant Sections being LIST THEIR TITLES with the Front Cover Texts being LIST and with the Back Cover Texts being LIST A copy of the license is included in the section entitled GNU Free Documentation License If you have no Invariant Sections write with no Invariant Sections instead of saying which ones are invariant If you have no Front Cover Texts write no Front Cover Texts instead of Front Cover Texts being LIST likewise for Back
260. nual V2 6 11 34 gff59490 2015 12 16 xi 16 3 ool Cancel Canned Cycle sopesar RE YR BR ir eR Re bw eee ee e 193 16 39681 Drillinp Cycle os crop ERE EMERG ORES ER MARS EES AB ae ee eh ee 194 16540682 Drilling Cycle Dwell gt oe 064 660 AA EEE a ee we ee 197 1641683 Peck DaAlline Cycle lt i s oa eae ke Ea ge ae RASS BAG Re ESS Pace Rae a Bago eek 198 16 42G84 Right Hand Tapping Cycle e sone a Seb See Se Ee e hee ew r 198 Ages Borne Cycle Peed Our ce RE EEA OO He ER RE OEE AE ER SEH SSE 198 16 44G86 Boring Cycle Spindle Stop Rapid Move Out 2 2 ee ee 199 1645687 Back Bonne Cycle o oo e 199 16 46G88 Boring Cycle Spindle Stop Manual Out 2 2 2 ee ee 199 16 47639 Boring Cycle Dwell Feed Qut a coo eee Ba ee we we ee RSS ae ea ew 199 1648690 G91 Distance Mod cos ek ES OR Ge OR Se ee bob eo ee Soe ee Oe es 199 16 49G90 1 G91 1 Are Distance Mode o oe eaea ke SEER eee ee eee EES 200 16 50592 Coordinate System Offset occ est a eee a ee a RE eee eae 200 16 510921 G92 2 Resat G92 ONES o ek RS RE Ree eR RAS Rae eR ape ak 200 16 526592 9 Restore G92 OSES e o o ke ee ER Pe bee ee bbe et eA bee e a 201 16323093 G94 G93 Peed Kate Mode ss sois EN Bo Se RR REE DR RE OS a 201 10 534096 G97 spindle Contool Mode 2 464 axe Sed eke eee EEG SEHR a SG ewe Cede amp 4 201 16 55098 G99 Canned Cycle Return Level oe re Se eee Pe ea eae 202 17 M Codes 203 11 M Code Quick Reference Table lt o e oona a A gee ee dic AS Be
261. nuxCNC Status linuxcnctop AXIS includes a program called linuxcnctop which shows some of the details of LinuxCNC s state You can run this program by invoking Machine gt Show LinuxCNC Status acceleration 1e 99 active_ queue 0 actual position 0 2723 0 0300 1 2163 ooo ooo ooo ooo ooo cop ooo cop oo oo oo 2o oo cop oo cop oo cop oo cop ooo 2o oo 2o ooo oof cop oo con oo con oo cop oo cop oo oo cop oo cop oo con oo cos oo oof 200 8o00 cop 220 8o008 ooo ooo ooo cop ooo Copy All Figure 5 6 LinuxCNC Status Window The name of each item is shown in the left column The current value is shown in the right column If the value has recently changed it is shown on a red background User Manual V2 6 11 34 gff59490 2015 12 16 39 253 5 6 MDI interface AXIS includes a program called mdi which allows text mode entry of MDI commands to a running LinuxCNC session You can run this program by opening a terminal and typing mdi Once it is running it displays the prompt MDI gt When a blank line is entered the machine s current position is shown When a command is entered it is sent to LinuxCNC to be executed This is a sample session of mdi S mdi MDI gt 0 0 Os0 0 0 0 0 Oc 0 10 MDI gt Gl F5 XL MDI gt 0 S9Z2I500000000S74 O 0 1 0 0 0 0 0 0 0 MDI gt ERS O OOOO COW CO OO OGSIS ae DO 1 0 0 0 0 0 101
262. o errors or crashes are very probably Default is disable run from line Log Actions If this button is active nearly every button press or relevant action of LinuxCNC will be logged in the ALARM history This is very useful for debugging User Manual V2 6 11 34 gff59490 2015 12 16 78 253 6 8 LATHE specific section If in the INI File LATHE is given the GUI will change its appearance to the special needs for a lathe Mainly the Y axis will be hidden and the jog buttons will be arranged in a different order Normal Lathe 36 30 56 302 DTG 0 000 1 000 mm Zz Z A 0 100 mm X 0 010 mm w3 ur tS iv Y 0 001 mm a a x ii gt Tool information Max Velocity Cooling Spindle rpm Tool no Diameter offset z offset x Vel 0 e 1 0 4000 0 000 0 000 S 3500 100 as 60 Grad vorn 14040 A G Code D 100 MO M5 M9 M48 M53 M61 F o Feed Override a G8 G18 G21 G40 G49 G54 G64 G80 5 o gt G90 G91 1 G94 G97 G99 FO 100 33 Program 100 Momejemcm nuxcncinc_filesjexamplesflathe_pawn ngc 9 0 6000 O A a bh bs Back Tool Lathe User Manual V2 6 11 34 gff59490 2015 12 16 79 253 38 065 AOE 178 065 DTG m Continuous X 1 000 mm Z Z e 0 100 mm X 0 010 mm 3 er oh t Y K 0 001 mm S Tool information Max Velocity Cooling Spindle rpm Tool no Diameter offset z offset x 5 o 0 000 0 000 Vel o S 3500 100 ar No tool description available 14040 A
263. ogrammed with only some axis words present LinuxCNC only moves the named axes This is common on other machine controls To move some axes to an intermediate point and then move all axes to the predefined point write two lines of G code GO X Y axes to move to intermediate point G28 move all axes to predefined point 22 2 Additions to RS274 NGC DIFFERENCES THAT DO NOT CHANGE THE MEANING OF RS274 NGC PROGRAMS G33 G76 threading codes These codes are not defined in RS274 NGC G38 2 The probe tip is not retracted after a G38 2 movement This retraction move may be added in a future release of LinuxCNC User Manual V2 6 11 34 gff59490 2015 12 16 235 253 G38 3 G38 5 These codes are not defined in RS274 NGC O codes These codes are not defined in RS274 NGC M50 M53 overrides These codes are not defined in RS274 NGC M61 M66 These codes are not defined in RS274 NGC G43 G43 1 Negative Tool Lengths The RS274 NGC spec says it is expected that all tool lengths will be positive However G43 works for negative tool lengths Lathe tools G43 tool length compensation can offset the tool in both the X and Z dimensions This feature is primarily useful on lathes Dynamic tool lengths LinuxCNC allows specification of a computed tool length through G43 1 I K G41 1 G42 1 LinuxCNC allows specification of a tool diameter and if in lathe mode orientation in the G code The format is G41 1 G42 1 D L where D is diame
264. ol Change o sae ee EA BA EA OO E ee EE A eee E t 39 39 Oythonimowles cies ae S Seabee a A Bak he wht ee aoe ae a e 40 210 Using AXIS in Lathe Mode ee ha eee Pe an eee ee CESS dl ee 8 40 5 11 Advanced Conmieuraion s o eses we ea eee eee ee ea ee wae eae Se 41 SILIT Proprambllers cosas a a be a Ae ee a de AG eee a 41 S12 The X Resource Database sio eS Po eee ewer ea eh Lk eR ESB EE OE 42 SAL Physical jog WIECIE e ee ow eee ea ee ee ee ee ow ea ee oe 42 SADA RO nk oS aL a a be a A ee me a a AG ee ee de 42 SALES Exteel Pater 2 ceea o PEt bathed ebb es BES eee SS 42 5 116 Vitt al Control Panel e sves egi eee A ee ea ee ew de ee ee E 42 SAL ARIS Preview Conal o a e OR ER ORR A Ew eA Hote i 43 User Manual V2 6 11 34 gff59490 2015 12 16 iv 6 gmoccapy 44 OL VERON AAA RN 44 C gt REQUMEMENIA ioe A RARE KA Be A ee EA ee ER eee e da 45 Go DO Bel EMOL ee e E e ee BAAS A BBE SH HS 38 45 62 DANG COUMEWSNON es gan oe pw eR RE Ree ew wR pe SR A A eR ESS 46 GA The DISPLAY Sechon cec e coe ee Peewee ee ERAS ee eee ae Cea ee 47 DAZ The R52 NGC ECU usd eh a Pe A ws a ee e a 55 643 The MACRO Second ea ee ee 55 ote The TRA SHOW 2203408 A Base eee GI AAA Sages es 58 io TEAL DNS eresia reai Peer ee tbat ea bed ova a eee ewe dda De ea de a ee wre Gs 58 6 5 1 Right and bottom button lists lt s ce eR eR ee a Ea we 58 0632 VelociUER and ORT prostate 60 Ro TORNADOS e CRA A AS E Deere As 4 61 6 54 joe veloces and wrtlejog bal pin o
265. ommand to execute i e User Manual V2 6 11 34 gff59490 2015 12 16 50 253 gladevcp x XID dro glade includes a custom glade file called dro glade in the mentioned location The file must be placed in the config folder of your machine gladevcp h_buttonlist glade will just open a new user window called h_buttonlist glade note the difference this one is stand alone and can be moved around independent from gmoccapy window camview emc w XID will add a live image from a web cam to the location you specified take care that camview emc is installed as it is not by default You find detailed information for camview and linuxcnc at cam view gladevcp c gladevcp u hitcounter py H manual example hal manual example ui will add a the panel manual example ui include a custom python handler hitcounter py and make all connections after realizing the panel according to manual example hal here are some examples ntb_user_tabs with integrated camview program amaray dor listos EE User Manual V2 6 11 34 gff59490 2015 12 16 51 253 ntb_preview as maximized version gmoccapy for linuxcne 0 9 6 A Vorschau DRO Second user tab ABS REL x 0 0Q0 0 000 y 0 000 5 000 z 0 000 35 256 ur Y 0 000 0 000 0 000 s gt uusMmO ntb_preview User Manual V2 6 11 34 gff59490 2015 12 16 52 253 AA Preview 6 Button Second user tab Y Z imm x X 0 1mm 113 0 01
266. on ini file settings that can change how AXIS works see the INI File Sections DISPLAY Section of Configuration chapter in the Integrator manual 5 11 1 Program Filters AXIS has the ability to send loaded files through a filter program This filter can do any desired task Something as simple as making sure the file ends with M2 or something as complicated as generating G Code from an image The FILTER section of the ini file controls how filters work First for each type of file write a PROGRAM_EXTENSION line Then specify the program to execute for each type of file This program is given the name of the input file as its first argument and must write rs274ngc code to standard output This output is what will be displayed in the text area previewed in the display area and executed by LinuxCNC when Run The following lines add support for the image to gcode converter included with LinuxCNC FILTER PROGRAM_EXTENSION png gif Greyscale Depth Image png image to gcod ojala image to gcod It is also possible to specify an interpreter PROGRAM_EXTENSION py Python Script py python In this way any Python script can be opened and its output is treated as g code One such example script is available at nc_files holecircle py This script creates g code for drilling a series of holes along the circumference of a circle Circular Holes ix Units G20 in A Center 10 o Center
267. onal The G is optional if the current motion mode is G This will produce coordinated linear motion to the destination point at the current feed rate or slower if the machine will not go that fast G1 Example G90 set absolute distance mode Gl X1 2 Y 3 F10 linear move at a feed rate of 10 from current position to X1 2 Y 3 Z 2 3 linear move at same feed rate from current position to Z 2 3 Z1 F25 linear move at a feed rate of 25 from current position to Z1 M2 end program e See G90 amp F amp M2 sections for more information Tf cutter compensation is active the motion will differ from the above see the Cutter Compensation Section If G53 is programmed on the same line the motion will also differ see the G53 Section for more information It is an error if e No feed rate has been set e An axis letter is without a real value e An axis letter is used that is not configured User Manual V2 6 11 34 gff59490 2015 12 16 167 253 16 5 G2 G3 Arc Move G2 or G3 axes offsets center format G2 or G3 axes R radius format G2 or G3 offsets lt P gt full circles A circular or helical arc is specified using either G2 clockwise arc or G3 counterclockwise arc at the current feed rate The direction CW CCW is as viewed from the positive end of the axis about which the circular motion occurs The axis of the circle or helix must be parallel to the X Y or Z axis of the machine coordinate system The ax
268. onal rotational The A B and C axes produce angular motion rotation Typically A rotates around a line parallel to X B rotates around a line parallel to Y and C rotates around a line parallel to Z 12 1 2 Spindle A CNC machine typically has a spindle which holds one cutting tool probe or the material in the case of a lathe The spindle may or may not be controlled by the CNC software 12 1 3 Coolant If a CNC machine has components to provide mist coolant and or flood coolant they can be controlled by G codes 1 Tf the motion of mechanical components is not independent as with hexapod machines the RS274 NGC language and the canonical machining functions will still be usable as long as the lower levels of control know how to control the actual mechanisms to produce the same relative motion of tool and workpiece as would be produced by independent axes This is called kinematics User Manual V2 6 11 34 gff59490 2015 12 16 127 253 12 1 4 Feed and Speed Override A CNC machine can have separate feed and speed override controls which let the operator specify that the actual feed rate or spindle speed used in machining at some percentage of the programmed rate 12 1 5 Block Delete Switch A CNC machine can have a block delete switch See the Block Delete Section 12 1 6 Optional Program Stop Switch A CNC machine can have an optional program stop switch See the Optional Program Stop Section 12 2 Control and Data Compo
269. ool table to determine the offset needed The data can be set at run time with G10 L1 Programming Entry Moves Any move that is long enough to perform the compensation will work as the entry move The minimum length is the cutter radius This can be a rapid move above the work piece If several rapid moves are issued after a G41 42 only the last one will move the tool to the compensated position In the following figure you can see that the entry move is compensated to the right of the line This puts the center of the tool to the right of XO in this case If you were to program a profile and the end is at XO the resulting profile would leave a bump due to the offset of the entry move Figure 14 3 Entry Move Z Motion Z axis motion may take place while the contour is being followed in the XY plane Portions of the contour may be skipped by retracting the Z axis above the part and by extending the Z axis at the next start point Rapid Moves Rapid moves may be programed while compensation is turned on GOOD PRACTICES e Start a program with G40 to make sure compensation is off User Manual V2 6 11 34 gff59490 2015 12 16 142 253 14 3 2 Examples G Code F25 Set Feed Rate gt G40 Cancel Comp gt G16 L1 P1RO 25 Z1 Set Tool Table gt Ti M6 Load Tool gt G42 Start Comp Right G1 X1 Y1 Lead In Move X5 Cut Path 640 Cancel Comp GO X0 YO Exit Move MZ End Program gt Part Outline
270. orrssrs CoL V valve doy 03 meh Oe En ooooo G54 GO X 0 1 YO ZO center circle eal iil 2 025 GS XOL VO TOIL wo GO Z0 655 GO X 0 1 YD 20 first offset circle GL mil 40 25 GS x 0 1 XO TOLL wo GO Z0 ESG GO lt 07 YO 20 second offset circle il ail 40 25 GI AO LO wo GO Z0 ESTI GCO x OS ZO MENTES ser tser circle Gil wl 20 25 ES x 0 1 O RO GO Z0 User Manual V2 6 11 34 gff59490 2015 12 16 136 253 os CO K 01 O Dad rorem sotbkset G rele Sil Pl 20 25 SSA OOO PO G54 GO XO YO Z0 M2 Now comes the time when we might apply a set of G92 offsets to this program You ll see that it is running in each case at ZO If the mill were at the zero position a G92 Z1 0000 issued at the head of the program would shift everything down an inch You might also shift the whole pattern around in the XY plane by adding some X and Y offsets with G92 If you do this you should add a G92 1 command just before the m2 that ends the program If you do not other programs that you might run after this one will also use that G92 offset Furthermore it would save the G92 values when you shut down the LinuxCNC and they will be recalled when you start up again User Manual V2 6 11 34 gff59490 2015 12 16 137 253 Chapter 14 Tool Compensation 14 1 Tool Length Offsets 14 1 1 Touch Off Using the Touch Off Screen in the AXIS interface you can update the tool table automatically Typical steps for updating th
271. osition to 12 7 5 1 a rapid move parallel to the XY plane to X9 Y 12 Z4 8 2 move parallel to the Z axis at the feed rate to X9 Y12 Z4 2 3 arapid move parallel to the Z axis to X9 Y12 Z4 8 The third repeat consists of 3 moves The X position is reset to 13 9 4 and the Y position to 17 12 5 1 arapid move parallel to the XY plane to X13 Y17 Z4 8 2 move parallel to the Z axis at the feed rate to X13 Y17 Z4 2 3 arapid move parallel to the Z axis to X13 Y17 Z4 8 First Second Third repeat repeat repeat Preliminary more a NS Sa to intial Z 2 Z a ieee Final Z position 15 intial R Initial Postion 0 0 07 3 14 0 5 42 0 0 0 H 0 0 953 x0 yO 20 absolut home Fl A zZ solute Move mome Y 17 0000 na at AO 990 1 y2 23 94 pl m3 s3000 4 91 g81 998 x4 y5 20 611 813 zZ 4 8000 Ir m2 Example 3 Relative Position G81 Now suppose that you execute the first G81 block of code but from X0 YO Z0 rather than from X1 Y2 Z3 ENO CLS Erk KA VS OR ZAS Since OLD_Z is below the R value it adds nothing for the motion but since the initial value of Z is less than the value specified in R there will be an initial Z move during the preliminary moves User Manual V2 6 11 34 gff59490 2015 12 16 197 253 Preliminary motion XTY linear more to X and Y values Drilling cycle Ma Feedrate mare from R to Z Rapid retum to R Preliminary motion we Zon
272. ositive Start milling at a low X or Y axis value and move towards a high X or Y axis value e Negative Start milling at a high X or Y axis value and move towards a low X or Y axis value e Alternating Start on the same end of the X or Y axis travel that the last move ended on This reduces the amount of traverse movements e Up Milling Start milling at low points moving towards high points e Down Milling Start milling at high points moving towards low points 23 4 12 Depth units The top of material is always at Z 0 The deepest cut into the material is Z depth 23 4 13 Step Over pixels The distance between adjacent rows or columns To find the number of pixels for a given units distance compute distance pixel size and round to the nearest whole number For example if pixel size 006 and the desired step over distance 015 then use a Step Over of 2 or 3 pixels because 0 5 006 2 5 23 4 14 Tool Diameter The diameter of the cutting part of the tool 23 4 15 Safety Height The height to move to for traverse movements image to gcode always assumes the top of material is at Z 0 User Manual V2 6 11 34 gff59490 2015 12 16 239 253 23 4 16 Tool Type The shape of the cutting part of the tool Possible tool shapes are e Ball End e Flat End e 45 degree vee e 60 degree vee 23 4 17 Lace bounding This controls whether areas that are relatively flat along a row or column are skipped This option
273. ou might expect it to be a square pattern mio El 1 5 He COMICO O CoD 90 Cod ADO Coa 90 G90 GO XO YO M2 You can see from the following figure that the output is not what you might expect Because we added 0 5 to the distance each time the distance from the XY zero position increased with each line User Manual V2 6 11 34 gff59490 2015 12 16 156 253 Figure 15 1 Polar Spiral The following code will produce our square pattern FIO GL Gos 90 GIL OO NNO SO 90 G90 GO XO YO M2 As you can see by only adding to the angle by 90 degrees each time the end point distance is the same for each line User Manual V2 6 11 34 gff59490 2015 12 16 157 253 Figure 15 2 Polar Square It is an error if e An incremental move is started at the origin e A mix of Polar and and X or Y words are used 15 15 Modal Groups Modal commands are arranged in sets called modal groups and only one member of a modal group may be in force at any given time In general a modal group contains commands for which it is logically impossible for two members to be in effect at the same time like measure in inches vs measure in millimeters A machining center may be in many modes at the same time with one mode from each modal group being in effect The modal groups are shown in the following Table Table 15 4 G Code Modal Groups Modal Group Meaning Member Words Non modal codes
274. ove will be required at the entry unless the beginning of the thread is past the end of the material or an entry taper is used Unless using an exit taper the exit move is not synchronized to the spindle speed and will be a rapid move With a slow spindle the exit move might take only a small fraction of a revolution If the spindle speed is increased after several passes are complete subsequent exit moves will require a larger portion of a revolution resulting in a very heavy cut during the exit move This can be avoided by providing a relief groove at the exit or by not changing the spindle speed while threading The final position of the tool will be at the end of the drive line A safe Z move will be needed with an internal thread to remove the tool from the hole It is an error if e The active plane is not the ZX plane e Other axis words such as X or Y are specified e The R degression value is less than 1 0 e All the required words are not specified e P J K or H is negative e E is greater than half the drive line length HAL Connections The pins motion spindle at speed and the encoder n phase Z for the spindle must be connected in your HAL file before G76 will work See the Integrators Manual for more information on spindle synchronized motion Technical Info The G76 canned cycle is based on the G33 Spindle Synchronized Motion For more information see the G33 Technical Info The sample program g76 ngc shows the us
275. page named ttt Must follow the TKPKG Ngcgui item Item DISPLAY path_to_truetype tracer Example DISPLAY truetype tracer Note Optional if not specified attempt to use usr local bin truetype tracer Specify with absolute pathname or as a simple executable name in which case the user PATH environment will used to find the program Item DISPLAY _PREAMBLE preamble_filenam Example DISPLAY _PREAMBLE in_std ngc Note Optional specifies filename for preamble used for ttt created subfiles 7 5 5 INI File Path Specifications Ngcgui uses the linuxCNC search path to find files The search path begins with the standard directory specified by DISPLAY PROGRAM_PREFIX directory_name followed by multiple directories specfied by User Manual V2 6 11 34 gff59490 2015 12 16 91 253 RS274NGC SUBROUTINE_PATH directoryl_name directoryl_name directory3_name Directories may be specifed as absolute paths or relative paths Example DISPLAY PROGRAM_PREFIX home myname linuxcnc nc_files Example DISPLAY PROGRAM_PREFIX linuxcnc nce_files Example DISPLAY PROGRAM_ PREFIX nc_files An absolute path beginning with a specifies a complete filesystem location A path beginning with a specifies a path starting from the user s home directory A path beginning with username specifies a path st
276. path is shown in the following figure As you can see in the figure the programmed path and the desired cut path are one and the same as long as we are moving in an X or Z direction only Control Point Programmed Path Tool Tip Radius Figure 21 5 Ramp Entry Now as the control point progresses along the programmed path the actual cutter edge does not follow the programmed path as shown in the following figure There are two ways to solve this cutter comp and adjusting your programmed path to compensate for tip radius User Manual V2 6 11 34 gff59490 2015 12 16 231 253 Control Point Programmed Fath Actual Lut Figure 21 6 Ramp Path In the above example it is a simple exercise to adjust the programmed path to give the desired actual path by moving the programmed path for the ramp to the left the radius of the tool tip 21 7 3 Cutting a Radius In this example we will examine what happens during a radius cut without cutter comp In the next figure you see the tool turning the OD of the part The control point of the tool is following the programmed path and the tool is touching the OD of the part User Manual V2 6 11 34 gff59490 2015 12 16 232 253 Control Point Programmed Path Figure 21 7 Turning Cut In this next figure you can see as the tool approaches the end of the part the control point still follows the path but the tool tip has left the part and is cutting air You can also see
277. plot the line will be highlighted in both the graphical and text displays By left clicking on an empty area the highlighting will be removed By dragging with the left mouse button pressed the preview plot will be shifted panned By dragging with shift and the left mouse button pressed or by dragging with the mouse wheel pressed the preview plot will be rotated When a line is highlighted the center of rotation is the center of the line Otherwise the center of rotation is the center of the entire program User Manual V2 6 11 34 gff59490 2015 12 16 34 253 By rotating the mouse wheel or by dragging with the right mouse button pressed or by dragging with control and the left mouse button pressed the preview plot will be zoomed in or out By clicking one of the Preset View icons or by pressing V several preset views may be selected 5 3 4 Text Display Area By left clicking a line of the program the line will be highlighted in both the graphical and text displays When the program is running the line currently being executed is highlighted in red If no line has been selected by the user the text display will automatically scroll to show the current line File Machine View Help po O0 gt 2 1 dl e la Iz N Ix xe b Manual Control F3 MDI F5 Preview DRO x 0 2723 Y 0 0300 Z 0 0100 l Vel 0 0000 Axis ez Feed Override 100 Jog Speed 16 in min pa Max
278. pping spindle synchronized motion with return code G33 1 X Y Z K where K gives the distance moved for each revolution of the spindle A rigid tapping move consists of the following sequence Warning D If the X Y coordinates specified are not the current coordinates when calling G33 1 for tapping the move will not be along the Z axis but will rapid move from the current location to the X Y location specified 1 A move to the specified coordinate synchronized with the spindle at the given ratio and starting with a spindle index pulse 2 When reaching the endpoint a command to reverse the spindle e g from clockwise to counterclockwise 3 Continued synchronized motion beyond the specified end coordinate until the spindle actually stops and reverses 4 Continued synchronized motion back to the original coordinate 5 When reaching the original coordinate a command to reverse the spindle a second time e g from counterclockwise to clockwise 6 Continued synchronized motion beyond the original coordinate until the spindle actually stops and reverses 7 An unsynchronized move back to the original coordinate Spindle synchronized motions wait for spindle index so multiple passes line up G33 7 moves end at the original coordinate All the axis words are optional except that at least one must be used G33 1 Example G90 set absolute mode GO X1 000 Y1 000 20 100 rapid move to starting position S100 M3 turn on the spi
279. ram to get the coordinates and offsets Keep in mind the tolerance mentioned above you may have to change the precision of your cad program to get the desired results Another option is to calculate the coordinates and offset using formulas As you can see in the following figures a triangle can be formed from the current position the end position and the arc center In the following figure you can see the start position is X0 YO the end position is X1 Y1 The arc center position is at X1 YO This gives us an offset from the start position of 1 in the X axis and 0 in the Y axis In this case only an I offset is needed G2 Example Line GO XO YO G2 X1 Y1 Il F10 clockwise arc in the XY plane End Position x1 Y1 62 Direction Arc t Position Center Start x1 YO Position XO YO Figure 16 1 G2 Example In the next example we see the difference between the offsets for Y if we are doing a G2 or a G3 move For the G2 move the start position is XO YO for the G3 move it is XO Y1 The arc center is at X1 YO S for both moves The G2 move the J offset is 0 5 and the G3 move the J offset is 0 5 G2 G3 Example Line GO xO YO User Manual V2 6 11 34 gff59490 2015 12 16 170 253 G2 XO Yl 11 J0 5 F25 clockwise arc in the XY plane G3 XO YO 11 J 0 5 F25 counterclockwise arc in the XY plane J offset 0 5 x1 O 5 J offset 0 5 Figure 16 2 G2 G3 Example In the next example we show how the arc can make a helix in th
280. ram will always show the feedrate moves G1 G2 G3 in white But the display of rapid moves GO in cyan can be disabled if desired User Manual V2 6 11 34 gff59490 2015 12 16 31 253 Alpha blend Program This option makes the preview of complex programs easier to see but may cause the preview to display more slowly Show Live Plot The highlighting of the feedrate paths G1 G2 G3 as the tool moves can be disabled if desired Show Tool The display of the tool cone cylinder can be disabled if desired Show Extents The display of the extents maximum travel in each axis direction of the loaded G code program can be disabled 1f desired Show Offsets The selected fixture offset G54 G59 3 origin location can be shown as a set of three orthogonal lines one each of red blue and green This offset origin or fixture zero display can be disabled if desired Show Machine Limits The machine s maximum travel limits for each axis as set in the ini file are shown as a rectangular box drawn in red dashed lines This is useful when loading a new G code program or when checking for how much fixture offset would be needed to bring the G code program within the travel limits of your machine It can be shut off if not needed Show Velocity A display of velocity is sometimes useful to see how close your machine is running to its design velocities It can be disabled if desired Show Distance to Go Distance to go is a very handy ite
281. re running on a real machine User Manual V2 6 11 34 gff59490 2015 12 16 86 253 7 3 Library Locations In linuxCNC installations installed from deb packages the simulation configs for ngcgui use symbolic links to non user writable LinuxCNC libraries for e nc_files ngcgui_lib ngcgui compatible subfiles e nc_files ngcgui_liblathe ngcgui compatible lathe subfiles e nc_files gcmc_lib ngcgui gcmc compatible programs e nc_files ngcgui_lib utilitysubs Helper subroutines e nc_files ngcgui_lib mfiles User M files These libraries are located by ini file items that specify the search paths used by linuxCNC and ngcgui RS274NGC SUBROUTINE_PATH nc_files ngcgui_lib nc_files gemc_lib nc_files e ngcgui_lib utilitysubs USER_M_PATH ooh oo fine mies aos sto quest sens Note These are long lines not continued on multiple lines that specify the directories used in a search patch The directory names are separated by colons No spaces should occur between directory names A user can create new directories for their own subroutines and M files and add them to the search path s For example a user could create directories from the terminal with the commands mkdir home myusername mysubs mkdir home myusername mymfiles And then create or copy system provided files to these user writable directories For instance a user might create a ngcgui compatible subfile named home myusername mysubs e
282. red parameters but are easier to read All parameter names are converted to lower case and have spaces and tabs removed so lt param gt and lt P a R am gt refer to the same parameter Named parameters must be enclosed with lt gt marks lt named parameter here gt is a local named parameter By default a named parameter is local to the scope in which it is assigned You can t access a local parameter outside of its subroutine this is so that two subroutines can use the same parameter names without fear of one subroutine overwriting the values in another lt _global named parameter here gt is a global named parameter They are accessible from within called subroutines and may set values within subroutines that are accessible to the caller As far as scope is concerned they act just like regular numeric parameters They are not stored in files Examples e Declaration of named global variable lt _endmill_dia gt 0 049 e Reference to previously declared global variable lt _endmill_rad gt lt _endmill_dia gt 2 0 e Mixed literal and named parameters 0100 call 0 0 0 0 lt _inside_cutout gt lt _endmill_dia gt lt _Zcut gt lt _feedrate gt Named parameters spring into existence when they are assigned a value for the first time Local named parameters vanish when their scope is left when a subroutine returns all its local parameters are deleted and cannot be referred to anymore It is an error to
283. rface Speed uses the machine X origin modified by the tool X offset to compute the spindle speed in RPM CSS will track changes in tool offsets The X machine origin should be when the reference tool the one with zero offset is at the center of rotation For more information see the G96 Section Feed per Revolution Feed per revolution will move the Z axis by the F amount per revolution This is not for threading use G76 for threading For more information see the G95 Section 21 6 Arcs Calculating arcs can be mind challenging enough without considering radius and diameter mode on lathes as well as machine coordinate system orientation The following applies to center format arcs On a lathe you should include G18 in your preamble as the default is G17 even if you re in lathe mode in the user interface Axis Arcs in G18 XZ plane use I X axis and K Z axis offsets User Manual V2 6 11 34 gff59490 2015 12 16 229 253 21 6 1 Arcs and Lathe Design The typical lathe has the spindle on the left of the operator and the tools on the operator side of the spindle center line This is typically set up with the imaginary Y axis pointing at the floor The following will be true on this type of setup e The Z axis points to the right away from the spindle e The X axis points toward the operator and when on the operator side of the spindle the X values are positive Some lathes with tools on the back side have the imaginary
284. ride to 0 or feedhold e 0 0 open a program e r R run an opened program e p P pause an executing program e s S resume a paused program e a A step one line in a paused program 10 8 Misc One of the features of Mini is that it displays any axis above number 2 as a rotary and will display degree units for it It also converts to degree units for incremental jogs when a rotary axis has the focus User Manual V2 6 11 34 gff59490 2015 12 16 123 253 Chapter 11 KEYSTICK GUI 11 1 Introduction Keystick are Estop On Off Machine On OFF Manual Mode Auto Mode Override 100 Tool a 01 OC Offset Relative Act Post MDI Mode Reset Interp Mist On OFF Flood n OFF MANUAL LUBE OFF LUBE OK F9 gt Spndl Fud OFF F10 Spndl Rew OFF H Spndl Decrease Fi Spndl Increase SPIMDLE STOPPED BRAKE ON MIST OFF FLOOD OFF Figure 11 1 The Mini Graphical Interface Keystick is a minimal text based interface ESC borts Actions TAB Selects Params END Quits Display 7 Toggles Help HOHED SELECTED Speed Waters 60 0 continuous User Manual V2 6 11 34 gff59490 2015 12 16 124 253 11 2 Installing To use keystick change the DISPLAY setting in the ini file setting to DISPLAY keystick 11 3 Using Keystick is very simple to use In the MDI Mode you simply start typing the g code and it shows up in the bottom text area The key toggles help User Manual V2 6 1
285. rientation 7 Tool CL 0 deg User Manual V2 6 11 34 gff59490 2015 12 16 227 253 Tool Orientation 8 Tool CL 270 deg 21 4 Tool Touch Off When running in lathe mode in AXIS you can set the X and Z in the tool table using the Touch Off window If you have a tool turret you normally have Touch off to fixture selected when setting up your turret When setting the material Z zero you have Touch off to material selected For more information on the G codes used for tools see M6 Tn and G43 For more information on tool touch off options in Axis see Tool Touch Off 21 4 1 X Touch Off The X axis offset for each tool is normally an offset from the center line of the spindle One method is to take your normal turning tool and turn down some stock to a known diameter Using the Tool Touch Off window enter the measured diameter or radius if in radius mode for that tool Then using some layout fluid or a marker to coat the part bring each tool up till it just touches the dye and set it s X offset to the diameter of the part used using the tool touch off Make sure any tools in the corner quadrants have the nose radius set properly in the tool table so the control point is correct Tool touch off automatically adds a G43 so the current tool is the current offset A typical session might be 1 Home each axis if not homed 2 Set the current tool with Tn M6 G43 where n is the tool number 3 Select the X axis in the Manual Control w
286. riptor is a tcl compatible font specifier with items for fonttype fontsize fontweight Default is Helvetica 10 normal Smaller font sizes may be useful for small screens Larger font sizes may be helpful for touch screen applications Item DISPLAY NGCGUI_SUBFILE subfile filename Example DISPLAY NGCGUI_SUBFILE simp ngc Example DISPLAY NGCGUI_SUBFILE square gcmc Example DISPLAY NGCGUI_SUBFILE Note Use one or more items to specify ngcgui compatible subfiles or gcmc programs that require a tab page on startup A Custom tab will be created when the filename is A user Can use a Custom tab to browse the file system and identify preamble subfile and postamble files Item DISPLAY NGCGUI_PREAMBLE preamble_filenam Example DISPLAY NGCGUI_PREAMBLE in_std ngc Note Optional when specified the file is prepended to a subfile Files created with Custom tab pages use the preamble specified with the page User Manual V2 6 11 34 gff59490 2015 12 16 93 253 Item Example Note Item Example Note Item Example Note DISPLAY NGCGUI_POSTAMBLE DISPLAY NGCGUI_POSTAMBLE postamble_filename bye ngc Optional when specified the file is appended to a subfiles Files created with Custom tab pages use the postamble specified with the page DISPLAY NGCGU
287. rmats are allowed for specifying an arc Center Format and Radius Format It is an error if No feed rate has been set e The P word is not an integer 16 5 1 Center Format Arcs Center format arcs are more accurate than radius format arcs and are the preferred format to use The end point of the arc along with the offset to the center of the arc from the current location are used to program arcs that are less than a full circle It is OK if the end point of the arc is the same as the current location The offset to the center of the arc from the current location and optionally the number of turns are used to program full circles When programming arcs an error due to rounding can result from using a precision of less than 4 decimal places 0 0000 for inch and less than 3 decimal places 0 000 for millimeters Incremental Arc Distance Mode Arc center offsets are a relative distance from the start location of the arc Incremental Arc Distance Mode is default One or more axis words and one or more offsets must be programmed for an arc that is less than 360 degrees No axis words and one or more offsets must be programmed for full circles The P word defaults to and is optional For more information on Incremental Arc Distance Mode see the G91 1 section Absolute Arc Distance Mode Arc center offsets are the absolute distance from the current 0 position of the axis One or more axis words and both offsets must be programmed for arcs l
288. ro offset for the unspecified axis so one or both must be given For example to program a parabola through the origin from X 2 Y4 to X2 Y4 G5 1 Sample quadratic spline User Manual V2 6 11 34 gff59490 2015 12 16 173 253 G90 G17 GO X 2 Y4 Sei X2 UA wg It is an error if e both I and J offset are unspecified or zero e An axis other than X or Y is specified e The active plane is not G17 16 9 G5 2 G5 3 NURBS Block G5 2 lt P gt lt X Y gt lt L gt AR Vi SIDS Cores Warning G5 2 G5 3 is experimental and not fully tested G5 2 is for opening the data block defining a NURBS and G5 3 for closing the data block In the lines between these two codes the curve control points are defined with both their related weights P and the parameter L which determines the order of the curve The current coordinate before the first G5 2 command is always taken as the first NURBS control point To set the weight for this first control point first program G5 2 P without giving any X Y The default weight if P is unspecified is 1 The default order if L is unspecified is 3 G5 2 Example GO X0 YO rapid move F10 set feed rate GS 2 PI L3 XO vi PI KZ Na PL X2 VO PI x WO 12 GORS The rapid moves show the same path without the NURBS Block GO xO Yl X2 MZ KZ NO XO YO M2 User Manual V2 6 11 34 gff59490 2015 12 16 174 253 0 00 SLES pm Sample NURBS Output More information on NURBS ca
289. rride Y G8 G17 G21 G40 G49 G54 G64 G80 5 o G90 G91 1 G94 G97 G99 FO Program No Program loaded e o 9 O se a d 6 4 Basic configuration There is really not to much to configure just to run gmoccapy but there are some points you should take care off if you want to use all the features of the GUI You will find the following INI files included just to show the basics gmoccapy ini gmoccapy_4_axis ini gmoccapy_lathe ini gmoccapy_lathe_imperial ini gmoccapy_left_panel ini gmoccapy_right_panel ini gmoccapy_messages ini gmoccapy_pendant ini gmoccapy_sim_hardware_button ini gmoccapy_tool_sensor ini gmoccapy_with_user_tabs ini The names should explain the main intention of the different INI Files User Manual V2 6 11 34 gff59490 2015 12 16 47 253 If you use an existing configuration of your machine just edit your INI according to this document Important If you want to use MACROS don t forget to set the path to your macros or subroutines folder as described below So let us take a closer look to the the INI file and what you need to include to use gmoccapy on your machine 6 4 1 The DISPLAY Section DISPLAY DISPLAY gmoccapy PREFERENCE_FILE_ PATH gmoccapy_preferences DEFAULT_LINEAR_VELOCITY 166 666 AAX_LINEAR_VELOCITY 166 666 FEED_OVERRIDE 1 5 AX_SPINDLE_OVERRIDE 1 2 SPINDLE_OVERRIDE 0 5 LATHE 1 BACK _TOOL LATHE 1 PROGRAM_PREFIX nc_files
290. rst control point e J Y incremental offset from start point to first control point e P X incremental offset from end point to second control point e Q Y incremental offset from end point to second control point G5 creates a cubic B spline in the XY plane with the X and Y axes only P and Q must both be specified for every G5 command For the first GS command in a series of GS commands I and J must both be specified For subsequent G3 commands either both I and J must be specified or neither If I and J are unspecified the starting direction of this cubic will automatically match the ending direction of the previous cubic as if I and J are the negation of the previous P and Q For example to program a curvy N shape G5 Sample initial cubic spline G90 G17 GO XO YO CONTO TS HERO SI A second curvy N that attaches smoothly to this one can now be made without specifying I and J G5 Sample subsequent cubic spline GS PUCQ s Ke Ye It is an error if e P and Q are not both specified e Just one of I or J are specified e Tor J are unspecified in the first of a series of G5 commands e An axis other than X or Y is specified e The active plane is not G17 16 8 G5 1 Quadratic spline Gao k Ye TS w e I X incremental offset from start point to control point e J Y incremental offset from start point to control point G5 1 creates a quadratic B spline in the XY plane with the X and Y axis only Not specifying I or J gives ze
291. ry and In Between Motion Preliminary motion is a set of motions that is common to all of the milling canned cycles If the current Z position is below the R position the Z axis does a rapid move to the R position This happens only once regardless of the value of L In addition at the beginning of the first cycle and each repeat the following one or two moves are made 1 A rapid move parallel to the XY plane to the given XY position 2 The Z axis make a rapid move to the R position if it is not already at the R position If another plane is active the preliminary and in between motions are analogous User Manual V2 6 11 34 gff59490 2015 12 16 192 253 16 37 7 Why use a canned cycle There are at least two reasons for using canned cycles The first is the economy of code A single bore would take several lines of code to execute The G81 Example 1 demonstrates how a canned cycle could be used to produce 8 holes with ten lines of G code within the canned cycle mode The program below will produce the same set of 8 holes using five lines for the canned cycle It does not follow exactly the same path nor does it drill in the same order as the earlier example But the program writing economy of a good canned cycle should be obvious Note Line numbers are not needed but help clarify these examples Eight Holes 100 G90 GO XO YO ZO move coordinate home 110 Gl F10 XO G4 PO 1 120 G91 G81 X1 YO Z 1 R1 L4 canned drill cy
292. s use pydoc lt module name gt or read the source code These modules include e emc provides access to the LinuxCNC command status and error channels e gcode provides access to the rs274ngc interpreter e rs274 provides additional tools for working with rs274ngc files e hal allows the creation of userspace HAL components written in Python e _togl provides an OpenGL widget that can be used in Tkinter applications e minigl provides access to the subset of OpenGL used by AXIS To use these modules in your own scripts you must ensure that the directory where they reside is on Python s module path When running an installed version of LinuxCNC this should happen automatically When running in place this can be done by using scripts rip environment 5 10 Using AXIS in Lathe Mode By including the line LATHE 1 in the DISPLAY section of the ini file AXIS selects lathe mode The Y axis is not shown in coordinate readouts the view is changed to show the Z axis extending to the right and the X axis extending towards the bottom of the screen and several controls such as those for preset views are removed The coordinate readouts for X are replaced with diameter and radius Pressing V zooms out to show the entire file if one is loaded When in lathe mode the shape of the loaded tool if any is shown Lathe Tool Shape User Manual V2 6 11 34 gff59490 2015 12 16 41 253 5 11 Advanced Configuration For more information
293. s low cost Machine units The linear and angular units used for machine configuration These units are specified and used in the ini file HAL pins and parameters are also generally in machine units User Manual V2 6 11 34 gff59490 2015 12 16 244 253 MDI Manual Data Input This is a mode of operation where the controller executes single lines of G code as they are typed by the operator NIST National Institute of Standards and Technology An agency of the Department of Commerce in the United States NML Neutral Message Language provides a mechanism for handling multiple types of messages in the same buffer as well as simplifying the interface for encoding and decoding buffers in neutral format and the configuration mechanism Offsets An arbitrary amount added to the value of something to make it equal to some desired value For example gcode programs are often written around some convenient point such as XO YO Fixture offsets can be used to shift the actual execution point of that gcode program to properly fit the true location of the vise and jaws Tool offsets can be used to shift the uncorrected length of a tool to equal that tool s actual length Part Program A description of a part in a language that the controller can understand For LinuxCNC that language is RS 274 NGC commonly known as G code Program Units The linear and angular units used in a part program The linear program units do not have to be the same
294. s not changed by M6 use G43 after the M6 to change the tool length offset The tool change may include axis motion It is OK but not useful to program a change to the tool already in the spindle It is OK if there is no tool in the selected slot in that case the spindle will be empty after the tool change If slot zero was last selected there will definitely be no tool in the spindle after a tool change The tool changer will have to be setup to perform the tool change in hal and possibly classicladder 17 7 M7 M8 M9 Coolant Control e M7 turn mist coolant on e MS turn flood coolant on M9 turn all coolant off It is OK to use any of these commands regardless of the current coolant state 17 8 M19 Orient Spindle e M19 R Q P e R Position to rotate to from 0 valid range is 0 360 degrees e Q Number of seconds to wait until orient completes If motion spindle is_oriented does not become true within Q timeout an error occurs e P Direction to rotate to position 0 rotate for smallest angular movement default 1 always rotate clockwise same as M3 direction 2 always rotate counterclockwise same as M4 direction User Manual V2 6 11 34 gff59490 2015 12 16 206 253 M19 is cleared by any of M3 M4 M5 Spindle orientation requires a differential encoder with an index to sense the spindle shaft position and direction of rotation INI Settings in the RS274NGC section ORIENT_OFFSET 0 360
295. se 10 4 Control Button Bar Below the menu line is a horizontal line of control buttons These are the primary control buttons for the interface Using these buttons you can change mode from MANUAL to AUTO to MDI Manual Data Input These buttons show a light green background whenever that mode is active You can also use the FEEDHOLD ABORT and ESTOP buttons to control a programmed move 10 4 1 MANUAL This button or pressing lt F3 gt sets the LinuxCNC to Manual mode and displays an abbreviated set of buttons the operator can use to issue manual motion commands The labels of the jog buttons change to match the active axis Whenever Show_Mode_Full is active in in manual mode you will see spindle and lube control buttons as well as the motion buttons A keyboard lt i gt or lt I gt will switch from continuous jog to incremental jog Pressing that key again will toggle the increment size through the available sizes Figure 10 3 Manual Mode Buttons User Manual V2 6 11 34 gff59490 2015 12 16 113 253 From the Sherline CNC Operators Manual A button has been added to designate the present position as the home position We felt that a machine of this type Sherline 5400 would be simpler to operate if it didn t use a machine home position This button will zero out any offsets and will home all axes right where they are Axis focus is important here Notice in startup figure that in manual mode you see a li
296. se after the last error has been cleared Note Messages or user infos will not affect the gmoccapy error pin but the gmoccapy delete message pin will delete the last message if no error is shown 6 5 8 User Created Message HAL Pins gmoccapy may react to external errors using 3 different user messages All are HAL_BIT pin Status e gmoccapy messages statustest Yesnodialog e gmoccapy messages yesnodialog e gmoccapy messages yesnodialog waiting e gmoccapy messages yesnodialog responce Okdialog e gmoccapy messages okdialog e gmoccapy messages okdialog waiting 6 5 9 Spindle feedback pins There are two pins for spindle feedback e gmoccapy spindle_feedback_bar e gmoccapy spindle_at_speed_led gmoccapy spindle_feedback_bar will accept an float input to show the spindle speed gmoccapy spindle_at_speed_led is an bit pin to lit the GUI led if spindle is at speed User Manual V2 6 11 34 gff59490 2015 12 16 64 253 6 5 10 Pins to indicate program progress information There are three pins giving information over the program progress gmoccapy program length HAL_S32 showing the total number of lines of the program e gmoccapy program current line HAL_S32 indicating the current working line of the program e gmoccapy program progress HAL_FLOAT giving the program progress in percentage The values may not be very accurate if you are working with subroutines or large remap procedures also loops will ca
297. se the screen without an touch panel or protect it from excessive use by placing hardware buttons around the panel User Manual V2 6 11 34 gff59490 2015 12 16 60 253 Aewendungen One Synem Y Dew i So 25 Aug 10 26 ememess PA AA a a mery mre mr SY r E x y jog Geschw waite Verfahren Schrittweite w_button_0 Continuous Y z imm xX X 0 1mm w_button_1 0 0 l1mm Y Z 0 00 1mm 1 2345in w_button_2 Ignertere Grenzen cM w_button_3 ore mm w_butron 4 Werkzeug info Max Geschw K mung Spindel U min Werkzeuge Ourchen Offset Z Vel o 1 4 5000 0 000 so 100 4 5 mm 3 flute cutter 14040 A G Code 100 MO MS MG M9 M45 M33 F 0 VorschubUberst 14 A 68 G17 G21 040 G49 G54 G64 680 o 690 G91 1 G94 G97 G99 FO 100 B o B Programm 100 ji u m fesiiGmoccapy_2_toots_with_compensation n e 9 o e a Hirweise f 1 7 r t i Lo a y 5 a h_buttonlist h_button_ 0 h button 1 h_button_2 h buton 3 h butona h bunton 5 h bunton h bunion 7 h buntong h button 9 1001 OnE Toe raise T gt se True aceesa Linuxcnc dev configs sin gqeoccapy tool tbl t change False True 0 i m h buttonlist m ememesagGerx lt a Ookunente Dat D 9roccapy Ome y_burtonkst 6 5 2 Velocities and overrides All sliders from gmoccapy can be connected to hardware encoder or hardware potmeters To connect encoders t
298. set for the current axis is changed so that the current axis value will be the specified value Expressions may be entered using the rules for rs274ngc programs except that variables may not be referred to The resulting value is shown as a number Enter 7 coordinate relative to workpiece sqrt 2 0 707107 in Coordinate System P1 G54 OK Cancel Figure 5 4 Touch Off See also the Tool touch off to workpiece and Tool touch off to fixture options in the Machine menu Override Limits By pressing Override Limits the machine will temporarily be allowed to jog off of a physical limit switch This check box is only available when a limit switch is tripped The override is reset after one jog If the axis is configured with separate positive and negative limit switches LinuxCNC will allow the jog only in the correct direction Override Limits will not allow a jog past a soft limit The only way to disable a soft limit on an axis is to Unhome it The Spindle group The buttons on the first row select the direction for the spindle to rotate Counterclockwise Stopped Clockwise Counterclock wise will only show up if the pin motion spindle reverse is in the HAL file it can be net trick axis motion spindle reverse The User Manual V2 6 11 34 gff59490 2015 12 16 36 253 buttons on the next row increase or decrease the rotation speed The checkbox on the third row allows the spindle brake to be engaged or released Dependi
299. ssions before running LinuxCNC Make sure the parallel port pin is not connected to anything in a HAL file M101 Example File bin bash file to turn on parport pin 14 to open the collet closer halcmd setp parport 0 pin 14 out True exit 0 M102 Example File bin bash file to turn off parport pin 14 to open the collet closer halcmd setp parport 0 pin 14 out False exit 0 To pass a variable to a M1nn file you use the P and Q option like this MANOO WIZE Somos Ail Ose M100 Example file bin bash voltage 1 feedrate 2 halcmd setp thc voltage voltage halcmd setp thc feedrate S feedrat exit 0 To display a graphic message and stop until the message window is closed use a graphic display program like Eye of Gnome to display the graphic file When you close it the program will resume M110 Example file bin bash eog home john linuxcnc nc_files message png exit 0 To display a graphic message and continue processing the G code file suffix an ampersand to the command M110 Example display and keep going bin bash eog home john linuxcnc nc_files message png exit 0 User Manual V2 6 11 34 gff59490 2015 12 16 214 253 Chapter 18 O Codes O codes provide for flow control in NC programs Each block has an associated number which is the number used after O Care must be taken to properly match the O numbers O codes use the letter O not the number zero as the first character in the n
300. st one of the two words for the axes in the selected plane must be used The R number is the radius A positive radius indicates that the arc turns through less than 180 degrees while a negative radius indicates a turn of more than 180 degrees If the arc is helical the value of the end point of the arc on the coordinate axis parallel to the axis of the helix is also specified It is an error if e both of the axis words for the axes of the selected plane are omitted e the end point of the arc is the same as the current point G2 Example Line Gly CA 210 Yio R20 25 machts format with arc The above example makes a clockwise as viewed from the positive Z axis circular or helical arc whose axis is parallel to the Z axis ending where X 10 Y 15 and Z 5 with a radius of 20 If the starting value of Z is 5 this is an arc of a circle parallel to the XY plane otherwise it is a helical arc 16 6 G4 Dwell G4 P e P seconds to dwell floating point The P number is the time in seconds that all axes will remain unmoving The P number is a floating point number so fractions of a second may be used G4 does not affect spindle coolant and any I O G4 Example Line G4 P0 5 wait for 0 5 seconds before proceeding It is an error if e the P number is negative or not specified User Manual V2 6 11 34 gff59490 2015 12 16 172 253 16 7 G5 Cubic spline ES x We TA P O e J X incremental offset from start point to fi
301. start up just press the None button The file selection screen will use the filters you have set in the INI File if there aren t any filters given you will only see nge files The path will be set according to the INI settings in DISPLAY PROGRAM_PREFIX Jump to dir you can set here the directory to jump to if you press the corresponding button in the file selection dialog User Manual V2 6 11 34 gff59490 2015 12 16 73 253 gmoccapy for linuxcne 1 4 0 fe ix remap_lib 30_Chips n 3dtest ngc iE hu arespiraling b index ngc compage comp3lin comp311_ cone nge gc 2 nge g20sub ngc 976 ngc g881 ngc g881min n ge e e Boe geszngc gmoccapy_ gridprobe n hole holecirciep increment involutepy lathe 2 tools wit gc circle ngc y nge g76 ngc Themes and Sounds This lets the user select what desktop theme to apply and what error and messages sounds should be played By default Follow System Theme is set User Manual V2 6 11 34 gff59490 2015 12 16 74 253 6 7 2 Hardware gmoccapy for linuxcne 1 4 1 S fe EE Debug Settings Alarm History Hardware MPG Scale Scale max velocity 140 4 gt raonar Scale jog velocity 99 6 gt Scale feed override LOS Advanced Ta Settings Scale spindle override 1 0 5 Keyboard shortcuts Y Use keyboard shortcuts Unlock settings Use unlock code Do not use unlock code Use hal pin to unlock Spindle Starting RP
302. stem Origin Setting G10 L20 Coordinate System Origin Setting Calculated G17 G19 1 Plane Select G20 G21 Units of Measure G28 G28 1 Go to Predefined Position G30 G30 1 Go to Predefined Position G33 Spindle Synchronized Motion G33 1 Rigid Tapping G38 2 G38 5 Probing G40 Cancel Cutter Compensation G41 G42 Cutter Compensation G41 1 G42 1 Dynamic Cutter Compensation G43 Use Tool Length Offset from Tool Table G43 1 Dynamic Tool Length Offset G43 2 Apply additional Tool Length Offset G49 Cancel Tool Length Offset G53 Motion in Machine Coordinate System G54 G59 Select Coordinate System 1 6 G59 1 G59 3 Select Coordinate System 7 9 G61 G l 1 Path Control Mode G64 Path Control Mode with Optional Tolerance G73 Drilling Cycle with Chip Breaking G76 Multi pass Threading Cycle Lathe G80 Cancel Motion Modes G81 Drilling Cycle G82 Drilling Cycle with Dwell G83 Drilling Cycle with Peck G85 Boring Cycle No Dwell Feed Out G86 Boring Cycle Stop Rapid Out G89 Boring Cycle Dwell Feed Out G90 G91 Distance Mode G90 1 G91 1 Arc Distance Mode G92 Coordinate System Offset G92 1 G92 2 Cancel G92 Offsets G92 3 Restore G92 Offsets G93 G94 G95 Feed Modes G96 Constant Surface Speed G97 RPM Mode G98 G99 Canned Cycle Z Retract Mode 16 3 GO Rapid Move GO axes For rapid linear straight line motion program GO axes where all the axis words are optional The GO is optional if the current User Manual V2 6 11 34 gff59490 201
303. t 23 2 Integrating image to gcode with the AXIS user interface Add the following lines to the FILTER section of your ini file to make AXIS automatically invoke image to gcode when you open a png gif or jpg image PROGRAM_EXTENSION png image to gcod png gif jpg Grayscale Depth Image User Manual V2 6 11 34 gff59490 2015 12 16 237 253 gif image to gcod jpg image to gcod The standard sim axis ini configuration file is already configured this way 23 3 Using image to gcode Start image to gcode either by opening an image file in AXIS or by invoking image to gcode from the terminal as follows image to gcode torus png gt torus ngc Verify all the settings in the right hand column then press OK to create the gcode Depending on the image size and options chosen this may take from a few seconds to a few minutes If you are loading the image in AXIS the gcode will automatically be loaded and previewed once image to gcode completes In AXIS hitting reload will show the image to gcode option screen again allowing you to tweak them 23 4 Option Reference 23 4 1 Units Specifies whether to use G20 inches or G21 mm in the generated g code and as the units for each option labeled units 23 4 2 Invert Image If no the black pixel is the lowest point and the white pixel is the highest point If yes the black pixel is the highest point and the white pixel is the low
304. t Ctri k for Key bindings Max Velocity 72 in min l AXIS splash g code Not intended for actual milling 2 To run this code anyway you might have to Touch Off the Z axis 3 depending on your setup As if you had some material in your mill 4 Hint jog the Z axis down a bit then touch off 5 Also press the Toggle Skip Lines with to see that part If the program is too big or small for your machine change the scale 3 font usr share fonts truetype freefont FreeSerifBoldItalic ttf text EMC2 5 AXIS ESTOP No tool Position Relative Actual User Manual V2 6 11 34 gff59490 2015 12 16 84 253 7 1 Overview e NGCGUT is a tcl application for using LinuxCNC subroutines e NGCGUT can run as a standalone application or can be embedded in multiple tab pages in the axis gui e PYNGCGUT is an alternate python implementation of ngcgui e PYNGCGUI can run as a standalone application or can be embedded as a tab page with its own set of multiple subroutine tabs in any gui that supports embedding of gladevcp applications Example guis include axis touchy gscreen and gmoccapy Using NGCGUI or PYNGCGUL Tab pages are provided for subroutines specified in the INI file New subroutines tab pages can be added using Custom tab pages Each subroutine tab page provides entry boxes for all subroutine parameters The entry boxes can have a default value and an label that are identified by sp
305. t intended for actual milling To run this code anyway you might have to Touch Off the Z axis depending on your setup As if you had some material in your mill Hint jog the Z axis down a bit then touch off Also press the Toggle Skip Lines with to see that part If the program is too big or small for your machine change the scale 3 font usr share fonts truetype freefont FreeSerifBoldItalic ttf text EMC2 5 AXIS ESTOP 7 No tool Position Relative Actual Figure 2 2 Axis GUI e gmoccapy A industrial like GUI User Manual V2 6 11 34 gff59490 2015 12 16 8 253 jog Geschw Verfahren Schrittweite Durchgehend Imm x X 0 1mm 0 01mm E Z C 0 001mm d 1 2345in E ry Ignoriere Grenzen L yN s t Werkzeug Info Max Geschw K hlung Spindel U min Werkzeugnr Durchm Offset Z 1 4 5000 0 000 Vel o S 2500 100 4 5 mm 3 flute cutter 14040 G Code 100 A MO M3 M8 M48 M53 M61 F 475 Vorschub berst G8 G17 G21 G40 G49 G54 G64 G80 s 2500 a G90 G91 1 G94 G97 G99 F 475 100 D Pl Y 19 Programm 100 J J fn 01S_with_cutter_radius_compensation ngc B 6000 O Hinweise Figure 2 3 Gmoccapy e Touchy a touch screen GUI User Manual V2 6 11 34 gff59490 2015 12 16 9 253 Relative Absolute DTG Handwheel x 0 0000 xX 0 0000 Z 0 0000 YE 0 0000 e 0 0000 YE 0 0000 FO 100 Z 1 2063 Ze 0 0000 Z 0 0000 Power SO
306. t myfile gt sub code here o lt myfile gt endsub M2 Note The file names are lowercase letters only so o lt MyFile gt is converted to o lt myfile gt by the interpreter More information about the search path and options for the search path are in the INI Configuration Section 18 7 Subroutine return values Subroutines may optionally return a value by an optional expression at an endsub or return statement Return value example 0123 return 2 ss 0123 endsub 3 x 4 A subroutine return value is stored in the lt _value gt predefined named parameter and the lt _value_returned gt predefined pa rameter is set to 1 to indicate a value was returned Both paramters are global and are cleared just before the next subroutine call User Manual V2 6 11 34 gff59490 2015 12 16 219 253 Chapter 19 Other Codes 19 1 F Set Feed Rate Fx set the feed rate to x x is usually in machine units inches or millimeters per minute The application of the feed rate is as described in the Feed Rate Section unless inverse time feed rate mode is in effect in which case the feed rate is as described in the G93 G94 G95 Section 19 2 S Set Spindle Speed Sx set the speed of the spindle to x revolutions per minute RPM The spindle will turn at that speed when a M3 or M4 is in effect It is OK to program an S word whether the spindle is turning or not If the speed override switch is enabled and not set at 100 the sp
307. t start as window the spinboxes to set the position and size will get active One time set the GUI will start every time on the place and with the size selected Nevertheless the user can change the size and position using the mouse but that will not have any influence on the settings hide the cursor does allow to hide the cursor what is very useful if you use a touch screen User Manual V2 6 11 34 gff59490 2015 12 16 70 253 Keyboard The check boxes allows the user to select 1f he want the on board keyboard to be shown immediately when entering the MDI Mode when entering the offset page the tooledit widget or when open a program in the EDIT mode The keyboard button on the bottom button list will not been affected by this settings so you be able to show or hide the keyboard by pressing the button The default behavior will be set by the check boxes Default are e show keyboard on offset True show keyboard on tooledit False show keyboard on MDI True show keyboard on EDIT True show keyboard on load file False Note If this section is not sensitive you have not installed a virtual keyboard supported are onboard and matchbox keyboard If the keyboard layout is not correct ie clicking X gives Z than the layout has not been set properly related to your locale settings For onboard it can be solved with a small batch file with the following content bin bash setxkbmap model pcl05 layout de
308. t the beginning of the file e M30 exchange pallet shuttles and end the program Pressing cycle start will start the program at the beginning of the file Both of these commands have the following effects Change from Auto mode to MDI mode Origin offsets are set to the default like G54 Selected plane is set to XY plane like G 7 Distance mode is set to absolute mode like G90 Feed rate mode is set to units per minute like G94 Feed and speed overrides are set to ON like M48 Cutter compensation is turned off like G40 The spindle is stopped like M5 0 ON Dn Ur A N The current motion mode is set to feed like G o Coolant is turned off like M9 Note Lines of code after M2 M30 will not be executed Pressing cycle start will start the program at the beginning of the file 17 4 M60 Pallet Change Pause e M60 exchange pallet shuttles and then pause a running program temporarily regardless of the setting of the optional stop switch Pressing the cycle start button will restart the program at the following line 17 5 M3 M4 M5 Spindle Control e M3 start the spindle clockwise at the S speed e MA start the spindle counterclockwise at the S speed e MS stop the spindle It is OK to use M3 or M4 if the S spindle speed is set to zero If this is done or if the speed override switch is enabled and set to zero the spindle will not start turning If later th
309. ter 1t has made its own pins available for connection Touchy has several output pins that are meant to be connected to the motion controller to control wheel jogging e touchy jog wheel increment which is to be connected to the axis N jog scale pin of each axis N e touchy jog wheel N which is to be connected to axis N jog enable for each axis N e In addition to being connected to touchy wheel counts the wheel counts should also be connected to axis N jog counts for each axis N If you use HAL component ilowpass to smooth wheel jogging be sure to smooth only axis N jog counts and not touchy wheel counts 8 1 1 1 Required controls e Abort button momentary contact connected to the HAL pin touchy abort e Cycle start button momentary contact connected to touchy cycle start e Wheel MPG connected to touchy wheel counts and motion pins as described above e Single block toggle switch connected to touchy single block 8 1 1 2 Optional controls e For continuous jog one center off bidirectional momentary toggle or two momentary buttons for each axis hooked to touchy jog continuous x negative touchy jog continuous x positive etc e If a quill up button is wanted to jog Z to the top of travel at top speed a momentary button connected to touchy quill up 8 1 1 3 Optional panel lamps e touchy jog active shows when the panel jogging controls are live e touchy status indicator is on when the machine is executing G code and flashes
310. ter and L if specified is the lathe tool orientation G43 without H word In ngc this is not allowed In LinuxCNC it sets length offsets for the currently loaded tool If no tool is currently loaded it is an error This change was made so the user doesn t have to specify the tool number in two places for each tool change and because it s consistent with the way G41 G42 work when the D word is not specified U V and W axes LinuxCNC allows machines with up to 9 axes by defining an additional set of 3 linear axes known as U V and W User Manual V2 6 11 34 gff59490 2015 12 16 236 253 Chapter 23 Image to G Code X torus png AXIS File Machine View Help P gt OolBal gt gt ujm Iz N IX IY Manual Control F3 MOI FS As X BY G Y lll inv gyl Paz X torus png Image to gcode Units G20 in v Invert Image Yes Normalize Image Yes Tolerance units 0 001 Pixel Size 0 006 Feed Rate units per minute 12 0 Scan pattern Rows then Columns X Scan direction Down Milling v Depth units 0 25 Y step pixels 15 Ela Tool Diameter units 0 0625 Safety Height units 0 012 Tool Type Ball End X Lace bounding Secondary v A Conactengl z1 Maximum pixel value 198 OK Cancel ESTOP Filtering Position Relative Actual No tool 23 1 What is a depth map A depth map is a greyscale image where the brightness of each pixel corresponds to the depth or height of the object at each poin
311. terms and what they mean Some terms have a general meaning and several additional meanings for users installers and developers Acme Screw A type of lead screw that uses an Acme thread form Acme threads have somewhat lower friction and wear than simple triangular threads but ball screws are lower yet Most manual machine tools use acme lead screws Axis One of the computer controlled movable parts of the machine For a typical vertical mill the table is the X axis the saddle 1s the Y axis and the quill or knee is the Z axis Angular axes like rotary tables are referred to as A B and C Additional linear axes relative to the tool are called U V and W respectively Axis GUI One of the Graphical User Interfaces available to users of LinuxCNC It features the modern use of menus and mouse buttons while automating and hiding some of the more traditional LinuxCNC controls It is the only open source interface that displays the entire tool path as soon as a file is opened Gmoccapy GUD A Graphical User Interfaces available to users of LinuxCNC It features the use and feel of an industrial comtrol and can be used with touch screen mouse and keyboard It support embedded tabs and hal driven user messages it offers a lot of hal beens to be controled with hardware Gmoccapy is highly cusomizable Backlash The amount of play or lost motion that occurs when direction is reversed in a lead screw or other mechanical motion driving system It
312. that license notice the full lists of Invariant Sections and required Cover Texts given in the Document s license notice H Include an unaltered copy of this License I Preserve the section entitled History and its title and add to it an item stating at least the title year new authors and publisher of the Modified Version as given on the Title Page If there is no section entitled History in the Document create one stating the title year authors and publisher of the Document as given on its Title Page then add an item describing the Modified Version as stated in the previous sentence J Preserve the network location if any given in the Document for public access to a Transparent copy of the Document and likewise the network locations given in the Document for previous versions it was based on These may be placed in the History section You may omit a network location for a work that was published at least four years before the Document itself or if the original publisher of the version it refers to gives permission K In any section entitled Acknowledgements or Dedications preserve the section s title and preserve in the section all the substance and tone of each of the contributor acknowledgements and or dedications given therein L Preserve all the Invariant Sections of the Document unaltered in their text and in their titles Section numbers or the equivalent are not considered part of the section titles M Delete any sect
313. the ini file All axes defined in the ini file will be moved when a G28 is issued e G28 makes a rapid move from the current position to the absolute position of the values in parameters 5161 5166 e G28 axes makes a rapid move to the position specified by axes including any offsets then will make a rapid move to the absolute position of the values in parameters 5161 5166 for axes specified Any axis not specified will not move e G28 1 stores the current absolute position into parameters 5161 5166 G28 Example Line G28 22 5 rapid to 22 5 then to location specified in the G28 stored parameters It is an error if e Cutter Compensation is turned on 16 20 G30 G30 1 Go to Predefined Position Warning Only use G30 when your machine is homed to a repeatable position and the desired G30 position has been stored with G30 1 G30 functions the same as G28 but uses the values stored in parameters 5181 5186 as the X Y ZA B C U V W final point to move to The parameter values are absolute machine coordinates in the native machine units as specifed in the ini file All axes defined in the ini file will be moved when a G30 is issued Note G30 parameters will be used to move the tool when a M6 is programmed if TOOL_CHANGE_AT_G30 1 is in the EMCIO section of the ini file G30 makes a rapid move from the current position to the absolute position of the values in parameters 5181 5186 G30 axes makes a rapid move to
314. the last comment will be interpreted according to these rules Hence a normal comment following an active comment will in effect disable the active comment For example foo debug 1 will print the value of parameter 1 however debug 1 foo will not User Manual V2 6 11 34 gff59490 2015 12 16 159 253 A comment introduced by a semicolon is by definition the last comment on that line and will always be interpreted for active comment syntax 15 17 Messages e MSG displays message if MSG appears after the left parenthesis and before any other printing characters Variants of MSG which include white space and lower case characters are allowed The rest of the characters before the right parenthesis are considered to be a message Messages should be displayed on the message display device of the user interface if provided Message Example MSG This is a message 15 18 Probe Logging e PROBEOPEN filename txt will open filename txt and store the 9 number coordinate consisting of XYZABCUVW of each successful straight probe in it e PROBECLOSE will close the open probelog file For more information on probing see the G38 Section 15 19 Logging e LOGOPEN filename txt opens the named log file If the file already exists it is truncated e LOGAPPEND filename opens the named log file If the file already exists the data is appended e LOGCLOSE closes an open log file e LOG everything past th
315. the load exceeds the torque capability of the motor it will skip one or more steps causing position errors TASK The module within LinuxCNC that coordinates the overall execution and interprets the part program Tel Tk A scripting language and graphical widget toolkit with which several of LinuxCNCs GUIs and selection wizards were written Traverse Move A move in a straight line from the start point to the end point Units See Machine Units Display Units or Program Units Unsigned Integer A whole number that has no sign In HAL it is known as u32 An unsigned 32 bit integer has a usable range of zero to 4 294 967 296 World Coordinates This is the absolute frame of reference It gives coordinates in terms of a fixed reference frame that is attached to some point generally the base of the machine tool User Manual V2 6 11 34 gff59490 2015 12 16 246 253 Chapter 25 Legal Section 25 1 Copyright Terms Copyright c 2000 2015 LinuxCNC org Permission is granted to copy distribute and or modify this document under the terms of the GNU Free Documentation License Version 1 1 or any later version published by the Free Software Foundation with no Invariant Sections no Front Cover Texts and no Back Cover Texts A copy of the license is included in the section entitled GNU Free Documentation License 25 2 GNU Free Documentation License GNU Free Documentation License Version 1 1 March 2000 Copyright O 2
316. the machining This chapter introduces you to offsets as they are used by the LinuxCNC These include e machine coordinates G53 e nine fixture offsets G54 G59 3 e global offsets G92 13 2 The Machine Position Command G53 Regardless of any offsets that may be in effect putting a G53 in a block of code tells the interpreter to go to the real or absolute axis positions commanded in the block For example G53 GO XO YO Z0 will get you to the actual position where these three axes are zero You might use a command like this if you have a favorite position for tool changes or if your machine has an auto tool changer You might also use this command to get the tool out of the way so that you can rotate or change a part in a vice G53 is not a modal command It must be used on each line where motion based upon absolute machine position is desired User Manual V2 6 11 34 gff59490 2015 12 16 132 253 13 3 Fixture Offsets G54 G59 3 G53 G54 G55 XOYO X2Y0 C X0 YO X0 YO for for fixture 1 fixture 2 fixture 5 fixture 6 fixture 7 fixture 8 Fixture Offsets Work or fixture offset are used to make a part home that is different from the absolute machine coordinate system This allows the part programmer to set up home positions for multiple parts A typical operation that uses fixture offsets would be to mill multiple copies of parts on multiple part holders or vises The values for offsets are stored in the
317. ther makes a big difference in the way that the LinuxCNC control behaves There are User Manual V2 6 11 34 gff59490 2015 12 16 16 253 specific things that can be done in one mode that cannot be done in another An operator can home an axis in manual mode but not in auto or MDI modes An operator can cause the machine to execute a whole file full of G codes in the auto mode but not in manual or MDI In manual mode each command is entered separately In human terms a manual command might be turn on coolant or jog X at 25 inches per minute These are roughly equivalent to flipping a switch or turning the hand wheel for an axis These commands are normally handled on one of the graphical interfaces by pressing a button with the mouse or holding down a key on the keyboard In auto mode a similar button or key press might be used to load or start the running of a whole program of G code that is stored in a file In the MDI mode the operator might type in a block of code and tell the machine to execute it by pressing the lt return gt or lt enter gt key on the keyboard Some motion control commands are available and will cause the same changes in motion in all modes These include abort estop and feed rate override Commands like these should be self explanatory The AXIS user interface hides some of the distinctions between Auto and the other modes by making Auto commands available at most times It also blurs the distinction between Manual and
318. tion Displays The axis position displays work exactly like they do with tkLinuxCNC The color of the letters is important e Red indicates that the machine is sitting on a limit switch or the polarity of a min or max limit is set wrong in the ini file e Yellow indicates that the machine is ready to be homed e Green indicates that the machine has been homed The position can be changed to display any one of several values by using the menu settings The startup or default settings can be changed in the ini file so these displays wake up just the way that you want them User Manual V2 6 11 34 gff59490 2015 12 16 116 253 10 5 2 Feed rate Override Immediately below the axis position displays is the feed rate override slider You can operate feed rate override and feedhold in any mode of operation Override will change the speed of jogs or feed rate in manual or MDI modes You can adjust feed rate override by grabbing the slider with your mouse and dragging it along the groove You can also change feed rate a percent at a time by clicking in the slider s groove In auto mode you can also set feed override in 10 increments by pressing the top row of numbers This slider is a handy visual reference to how much override is being applied to programmed feed rate 10 5 3 Messages The message display located under the axis positions is a sort of scratch pad for LinuxCNC If there are problems it will report them there If you try to home or mov
319. to negative This view is best for looking at X amp Y Rotated Top View The Rotated Top View or rotated Z view also displays the G code looking along the Z axis from positive to negative But sometimes it s convenient to display the X amp Y axes rotated 90 degrees to fit the display better This view is also best for looking at X amp Y Side View The Side View or X view displays the G code looking along the X axis from positive to negative This view is best for looking at Y amp Z Front View The Front View or Y view displays the G code looking along the Y axis from negative to positive This view is best for looking at X amp Z Perspective View The Perspective View or P view displays the G code looking at the part from an adjustable point of view defaulting to X Y Z The position is adjustable using the mouse and the drag rotate selector This view is a compromise view and while it does do a good job of trying to show three to nine axes on a two dimensional display there will often be some feature that is hard to see requiring a change in viewpoint This view is best when you would like to see all three to nine axes at once Display Inches Set the AXIS display scaling for inches Display MM Set the AXIS display scaling for millimeters Show Program The preview display of the loaded G code program can be entirely disabled if desired Show Program Rapids The preview display of the loaded G code prog
320. umber like O100 Numbering Example 0100 sub notice that the if endif block uses a different number OLLO AE 572 env 5 some code here o110 endif some more code here o100 endsub The behavior is undefined if The same number is used for more than one block e Other words are used on a line with an O word Comments are used on a line with an O word Note Using the lower case o makes it easier to distinguish from a 0 that might have been mistyped For example 0100 is easier to see than 0100 that it is not a 0 The following statements cause an error message and abort the interpreter e a return or endsub not within a sub defintion e alabel on repeat which is defined elsewhere e a label on while which is defi ed elsewhere and not referring to a do e alabel on if defined elsewhere e a undefined label on else or elseif e alabel on else elseif or endif not pointing to a matching if e a label on break or continue which does not point to a matching while or do e a label on endrepeat or endwhile no referring to a corresponding while or repeat To make these errors non fatal warnings on stderr set bit 0x20 in the RS274NGC FEATURE mask ini option User Manual V2 6 11 34 gff59490 2015 12 16 215 253 18 1 Subroutines Subroutines extend from a O sub to an O endsub The lines between O sub and O endsub are not executed until the subroutine is called with O call Subroutine Examp
321. use different values 6 5 11 Tool related pin Tool Change Pin This pin are provided to use gmoccapy s internal tool change dialog similar to the one known from axis but with several modifications so you will not only get the message to change to tool number 3 but also the description of that tool like 7 5 mm 3 flute cutter The information is taken from the tool table so it is up to you what to display Manual Toolchange Please change to tool 3 7 5mm 3 flute cutter then click OK e gmoccapy toolchange number HAL_S32 The number of the tool to be changed e gmoccapy toolchange change HAL_BIT Indicate that a tool has to be changed e gmoccapy toolchange changed HAL_BIT Indicate toll has been changed usually they are connected like this for a manual tool change net tool change gmoccapy toolchange chang lt iocontrol 0 tool change net tool changed gmoccapy toolchange changed lt iocontrol 0 tool changed net tool prep number gmoccapy toolchange number lt iocontrol 0 tool prep number net tool prep loop iocontrol 0 tool prepare lt iocontrol 0 tool prepared Tool Offset Pins This pins allows you to show the active tool offset values for X and Z in the tool information frame You should know that they are only active after G43 has been send Tool information Tool no Diameter offset z offset x 1 0 4000 0 017 1 161 60 Grad vorn User Manual V2 6 11 34 gff59490 2015 12 16
322. use a non existent named paramater within an expression or at the right hand side of an assignment Printing the value of a non existent named parameter with a DEBUG statement like DEBUG lt no_such_parameter gt will display the string HHHHHE Global parameters as well as local parameters assigned to at the global level retain their value once assigned even when the program ends and have these values when the program is run again The EXISTS function tests whether a given named parameter exists User Manual V2 6 11 34 gff59490 2015 12 16 150 253 15 7 4 Predefined Named Parameters The following global read only named parameters are available to access internal state of the interpreter and machine state They can be used in arbitrary expressions for instance to control flow of the program with if then else statements Note that new predefined named parameters can be added easily without changes to the source code e lt _vmajor gt Major package version If current version was 2 5 2 would return 2 5 e lt _vminor gt Minor package version If current version was 2 6 2 it would return 0 2 e lt _line gt Sequence number If running a G Code file this returns the current line number e lt _motion_mode gt Return the interpreter s current motion mode Motion return mode value Gl 10 G2 20 G3 30 G33 330 G38
323. ut aS Cc w wie U e We ke E The G85 cycle is intended for boring or reaming but could be used for drilling or milling 1 Preliminary motion as described in the Preliminary and In Between Motion section 2 Move the Z axis only at the current feed rate to the Z position 3 Retract the Z axis at the current feed rate to the R plane if it is lower than the initial Z 4 Retract at the traverse rate to clear Z User Manual V2 6 11 34 gff59490 2015 12 16 199 253 16 44 G86 Boring Cycle Spindle Stop Rapid Move Out CEG OS Y w of We We R be The G86 cycle is intended for boring This cycle uses a P number for the number of seconds to dwell 1 Preliminary motion as described in the Preliminary and In Between Motion section 2 Move the Z axis only at the current feed rate to the Z position 3 Dwell for the P number of seconds 4 Stop the spindle turning 5 The Z axis does a rapid move to clear Z 6 Restart the spindle in the direction it was going It is an error if e the spindle is not turning before this cycle is executed 16 45 G87 Back Boring Cycle This code is currently unimplemented in LinuxCNC It is accepted but the behavior is undefined 16 46 G88 Boring Cycle Spindle Stop Manual Out This code is currently unimplemented in LinuxCNC It is accepted but the behavior is undefined 16 47 G89 Boring Cycle Dwell Feed Out GSM OS Y w of O We ite Re be E The G89
324. ve absolute G90 G91 feed mode G93 G94 G95 current coordinate system G54 G59 3 tool length compensation status G43 G43 1 G49 retract mode G98 G99 User Manual V2 6 11 34 gff59490 2015 12 16 210 253 spindle mode G96 css or G97 RPM arc distance mode G90 1 G91 1 lathe radius diameter mode G7 G8 path control mode G61 G61 1 G64 current feed and speed F and S values spindle status M3 M4 M5 on off and direction mist M7 and flood M8 status speed override M51 and feed override M50 settings adaptive feed setting M52 feed hold setting M53 Note that in particular the motion mode G1 etc is NOT restored current call level means either e executing in the main program There is a single storage location for state at the main program level if several M70 instructions are executed in turn only the most recently saved state is restored when an M72 is executed e executing within a G code subroutine The state saved with M70 within a subroutine behaves exactly like a local named parameter it can be referred to only within this subroutine invocation with an M72 and when the subroutine exits the paramter goes away A recursive invocation of a subroutine introduces a new call level 17 20 M71 invalidate Stored Modal State Modal state saved with an M70 or by an M73 at the current call level is invalidated cannot be restored from anymore A subsequent M72 at the same call leve
325. velocity and axis acceleration must be obeyed by the trajectory planner 3 1 2 Path Following A less straightforward problem is that of path following When you program a corner in G Code the trajectory planner can do several things all of which are right in some cases it can decelerate to a stop exactly at the coordinates of the corner and then accelerate in the new direction It can also do what is called blending which is to keep the feed rate up while going through the corner making it necessary to round the corner off in order to obey machine constraints You can see that there is a trade off here you can slow down to get better path following or keep the speed up and have worse path following Depending on the particular cut the material the tooling etc the programmer may want to compromise differently Rapid moves also obey the current trajectory control With moves long enough to reach maximum velocity on a machine with low acceleration and no path tolerance specified you can get a fairly round corner 3 1 3 Programming the Planner The trajectory control commands are as follows e G61 Exact Path Mode visits the programmed point exactly even though that means it might temporarily come to a complete stop in order to change direction to the next programmed point User Manual V2 6 11 34 gff59490 2015 12 16 18 253 G61 1 Exact Stop Mode tells the planner to come to an exact stop at every segment s end G64
326. watch v rG1zmeqXyZI 6 10 6 Tool_Measurement_Video English Auto Tool Measurement Simmulation http youtu be rrkMw6rUFdk English Auto Tool Measurement Screen http youtu be Z2ULDj9dzvk English Auto Tool Measurement Machine http youtu be larucCaDdX4 6 11 Known problems 6 11 1 Strange numbers in the info area If you get strange numbers in the info area of gmoccapy like UY Tool information Max Velocity Cooling Tool no Diameter offse Q O 0 0000 757 000 287174 3 EJ P EIAN AIR 21402529520281688928391402 G Code MO M5 M9 M48 M53 F o Feed Override vvy Nau Continuous 1 000 mm 0 001 mm Spindle rpm S 3500 100 1004 User Manual V2 6 11 34 gff59490 2015 12 16 82 253 You have made your config file using an older version of StepConfWizard It has made a wrong entry in the INI file under the TRAJ named MAX_LINEAR_VELOCITY xxx Change that entry to MAX_VELOCITY xxx User Manual V2 6 11 34 gff59490 2015 12 16 83 253 Chapter 7 NGCGUI File Machine View Help ela a gt Cia IZ 5 IX vie 4 Manual Control F3 MDI F5 Preview DRO simp xyz Axis r ngcgui 0 move gt a I simp simple subroutine example Ctrl U to edit _Home All _Touch Off Positional Parameters 1 6 Radius A 2 04 radius b 3 100 feedrate Create Feature Feed Override 100 mie z Jog Speed 16 in min M esta
327. when the machine is executing but is in pause feedhold 8 1 2 Recommended for any setup e Estop button hardwired in the estop chain 8 2 Setup 8 2 1 Enabling Touchy To use Touchy in the DISPLAY section of your ini file change the display selector line to DISPLAY touchy User Manual V2 6 11 34 gff59490 2015 12 16 102 253 8 2 2 Preferences When you start Touchy the first time check the Preferences tab If using a touchscreen choose the option to hide the pointer for best results The Status Window is a fixed height set by the size of a fixed font This can be affected by the Gnome DPI configured in System Preferences Appearance Fonts Details If the bottom of the screen is cut off reduce the DPI setting All other font sizes can be changed on the Preferences tab 8 2 3 Macros Touchy can invoke O word macros using the MDI interface To configure this in the TOUCHY section of the ini file add one or more MACRO lines Each should be of the format MACRO increment xinc yinc In this example increment is the name of the macro and it accepts two parameters named xinc and yinc Now place the macro in a file named increment ngc in the PROGRAM_PREFIX directory or any directory in the SUBROU TINE_PATH It should look like O lt increment gt sub G91 GO X 1 Y 2 G90 O lt increment gt endsub Notice the name of the sub matches the file name and macro name exactly including case When you invoke t
328. words The R usually meaning retract position is along the axis perpendicular to the currently selected plane Z axis for XY plane etc Some canned cycles use additional arguments 16 37 2 Sticky Words For canned cycles we will call a number sticky if when the same cycle is used on several lines of code in a row the number must be used the first time but is optional on the rest of the lines Sticky numbers keep their value on the rest of the lines if they are not explicitly programmed to be different The R number is always sticky In incremental distance mode X Y and R numbers are treated as increments from the current position and Z as an increment from the Z axis position before the move involving Z takes place In absolute distance mode the X Y R and Z numbers are absolute positions in the current coordinate system User Manual V2 6 11 34 gff59490 2015 12 16 191 253 16 37 3 Repeat Cycle The L number is optional and represents the number of repeats L 0 is not allowed If the repeat feature is used it is normally used in incremental distance mode so that the same sequence of motions is repeated in several equally spaced places along a straight line When L is greater than 1 in incremental mode with the XY plane selected the X and Y positions are determined by adding the given X and Y numbers either to the current X and Y positions on the first go around or to the X and Y positions at the end of the previous go around
329. ws the turtle the scale will reach only 1 20 of max velocity by default The used divider can be set on the settings page So using a touch screen it is much easier to select smaller velocities 6 5 5 jog increment hal pins The jog increments are selectable through hal pins so a select hardware switch can be used to select the increment to use There will be a maximum of 10 hal pin for the increments given in the INI File if you give more increments in your INI File they will be not reachable from the GUI as they will not be displayed If you have 6 increments in your hal you will get 7 pins e gmoccapy jog inc 0 e gmoccapy jog inc 1 e gmoccapy jog inc 2 e gmoccapy jog inc 3 gmoccapy jog inc 4 e gmoccapy jog inc 5 e gmoccapy jog inc 6 jog inc 0 is unchangeable and will represent continuous jogging 6 5 6 hardware unlock pin to be able to use a key switch to unlock the settings page the following pin is exported e gmoccapy unlock settings The settings page is unlocked if the pin is high To use this pin you need to activate it on the settings page User Manual V2 6 11 34 gff59490 2015 12 16 63 253 6 5 7 Error pins e gmoccapy error e gmoccapy delete message gmoccapy error is an bit out pin to indicate an error so a light can lit or even the machine may be stopped It will be reseted with the pin gmoccapy delete message gmoccapy delete message will delete the first error and reset the gmoccapy error pin to Fal
330. ws you to set the jog speed within the limits set in the ini file See the Integrator Manual for more information on the ini file Max Velocity which allows you to restrict the maximum velocity of all programmed motions except spindle synchronized motion A text display area that shows the loaded G Code A status bar which shows the state of the machine In this screen shot the machine is turned on does not have a tool inserted and the displayed position is Relative showing all offsets and Actual showing feedback position 5 3 1 Menu Items Some menu items might be grayed out depending on how you have your ini file configured For more information on configura tion see the Integrator Manual FILE MENU e Open Opens a standard dialog box to open a g code file to load in AXIS If you have configured LinuxCNC to use a filter program you can also open it up See the Integrator manual for more information on filter programs User Manual V2 6 11 34 gff59490 2015 12 16 29 253 Recent Files Displays a list of recently opened files Edit Open the current g code file for editing if you have an editor configured in your ini file See the Integrator Manual for more information on specifying an editor to use Reload Reload the current g code file If you edited it you must reload it for the changes to take affect If you stop a file and want to start from the beginning then reload the file The toolbar reload is the
331. xample ngc To use files in new directories the ini file must be edited to include the new subfiles and to augment the search path s For this example RS274NGC SUBROUTINE_PATH home myusername mysubs nc_files ngcgui_lib nc_files gcme_lib nc_files ngcgui_lib utilitysubs USER_M_PATH home myusername mymfiles nc_files ngcgui_lib mfiles DISPLAY NGCGUI_SUBFILE example ngc LinuxCNC and ngcgui use the first file found when searching directories in the search path With this behavior you can supersede an ngcgui_lib subfile by placing a subfile with an identical name in a directory that is found earlier in the path search More information can be found in the INI chapter of the Integrators Manual User Manual V2 6 11 34 gff59490 2015 12 16 87 253 7 4 Standalone Usage 7 4 1 Standalone NGCGUI For usage type in a terminal ngcgui help Usage ngcgui help 8 ngcgui Options D nc_files_directory_name ngcgui Options i LinuxCNC_inifile_name ngcgui Options Options S subroutine_file p preamble_fil P postamble_file o output_file a autosend_file autosend to axis default auto ngc noauto no autosend to axis N nom2 no m2 terminator use font big small fontspec default Helvetica 10 normal N XiZ wert defaults hoe riz cwidth comment_width width of comment field vwidth varna
332. y 0 0 Increment Angle 17 0 Radius 1 0 Hole Count J Feed Rate 60 Hole Depth 0 1 Dwell O no dwell 1 0 Retract Height 0 1 ORK Cancel Figure 5 8 Circular Holes User Manual V2 6 11 34 gff59490 2015 12 16 42 253 If the environment variable AXIS_PROGRESS_BAR is set then lines written to stderr of the form FILTER_PROGRESS d will set the AXIS progress bar to the given percentage This feature should be used by any filter that runs for a long time 5 11 2 The X Resource Database The colors of most elements of the AXIS user interface can be customized through the X Resource Database The sample file axis_light_background changes the colors of the backplot window to a dark lines on white background scheme and also serves as a reference for the configurable items in the display area The sample file axis_big_dro changes the position readout to a larger size font To use these files xrdb merge usr share doc emc2 axis_light_background xrdb merge usr share doc emc2 axis_big_dro For information about the other items which can be configured in Tk applications see the Tk man pages Because modern desktop environments automatically make some settings in the X Resource Database that adversely affect AXIS by default these settings are ignored To make the X Resource Database items override AXIS defaults include the following line in your X Resources AxisxoptionLevel widgetDefault this causes the
333. y the G92 command The effects work even though previous offsets are in So if the X axis is currently showing 2 0000 as its position a G92 XO will set an offset of 2 0000 so that the current location of X becomes zero A G92 X2 will set an offset of 0 0000 and the displayed position will not change A G92 X5 0000 will set an offset of 3 0000 so that the current displayed position becomes 5 0000 13 4 3 G92 Cautions Sometimes the values of a G92 offset will remain in the VAR file This can happen when a file is aborted during processing that has G92 offsets in effect When this happens reset or a startup will cause them to become active again The variables are named Variable Value 5211 0 000000 5212 0 000000 5213 0 000000 5214 0 000000 5215 0 000000 5216 0 000000 where 5211 is the X axis offset and so on If you are seeing unexpected positions as the result of a commanded move as a result of storing an offset in a previous program and not clearing them at the end then issue a G92 1 in the MDI window to clear the User Manual V2 6 11 34 gff59490 2015 12 16 135 253 stored offsets If G92 values exist in the VAR file when LinuxCNC starts up the G92 values in the var file will be applied to the values of the current location of each axis If this is home position and home position is set as machine zero everything will be correct Once home has been established using real machine switches or by
334. y the box surrounding the coordinate value The minimum X travel of the program is 1 95 the maximum X travel is 1 88 and the program requires 3 83 inches of X travel To move the program so it s within the machine s travel in this case jog to the left and Touch Off X again Figure 5 2 Soft Limit Tool Cone When no tool is loaded the location of the tip of the tool is indicated by the tool cone The tool cone does not provide guidance on the form length or radius of the tool When a tool is loaded for instance with the MDI command T7 M6 the cone changes to a cylinder which shows the diameter of the tool given in the tool table file Backplot When the machine moves it leaves a trail called the backplot The color of the line indicates the type of motion Yellow for jogs faint green for rapid movements red for straight moves at a feed rate and magenta for circular moves at a feed rate Grid Axis can optionally display a grid when in orthogonal views Enable or disable the grid using the Grid menu under View When enabled the grid is shown in the top and rotated top views when coordinate system is not rotated the grid is shown in the front and side views as well The presets in the Grid menu are controlled by the inifile item DISPLAY GRIDS if unspecified the default is 10mm 20mm 50mm 100mm lin 2in 5in 10in Specifying a very small grid may decrease performance Interacting By left clicking on a portion of the preview
335. y the copyright holder saying it can be distributed under the terms of this License The Document below refers to any such manual or work Any member of the public is a licensee and is addressed as you A Modified Version of the Document means any work containing the Document or a portion of it either copied verbatim or with modifications and or translated into another language A Secondary Section is a named appendix or a front matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document s overall subject or to related matters and contains nothing that could fall directly within that overall subject For example if the Document is in part a textbook of mathematics a Secondary User Manual V2 6 11 34 gff59490 2015 12 16 247 253 Section may not explain any mathematics The relationship could be a matter of historical connection with the subject or with related matters or of legal commercial philosophical ethical or political position regarding them The Invariant Sections are certain Secondary Sections whose titles are designated as being those of Invariant Sections in the notice that says that the Document is released under this License The Cover Texts are certain short passages of text that are listed as Front Cover Texts or Back Cover Texts in the notice that says that the Document is released under this License A Transparent
336. you to connect together just the parts you need to run your machine The Clarity rule is essential LinuxCNC is a work in progress it is not finished nor will it ever be It is complete enough to run most of the machines we want it to run Much of that progress is achieved because many users and code developers are able to look at the work of others and build on what they have done The Composition rule allows us to build a predictable control system from the many modules available by making them con nectable We achieve connectability by setting up standard interfaces to sets of modules and following those standards The Separation rule requires that we make distinct parts that do little things By separating functions debugging is much easier and replacement modules can be dropped into the system and comparisons easily made What does the Unix way mean for you as a user of LinuxCNC It means that you are able to make choices about how you will use the system Many of these choices are a part of machine integration but many also affect the way you will use your machine As you read you will find many places where you will need to make comparisons Eventually you will make choices I ll use this interface rather than that or I ll write part offsets this way rather than that way Throughout these handbooks we describe the range of abilities currently available As you begin your journey into using LinuxCNC we offer two cautionary notes
337. ystems This variable is named 5220 In the default files its value is set to 1 00000 This means that when the LinuxCNC starts up it should use the first coordinate system as its default If you set this to 9 00000 it would use the ninth offset system as its default for start up and reset Any value other than an integer decimal really between 1 and 9 or a missing 5220 variable will cause the LinuxCNC to revert to the default value of 1 00000 on start up 13 3 2 Setting coordinate fixture offsets from G code The G10 L2x command can be used to set coordinate fixture offsets these are just quick summaries see the G code section for full details e G10 L2 P fixture 1 9 Set offset s to a value Current position irrelevant see G10 L2 for details e G10 L20 P fixture 1 9 Set offset s so current position becomes a value see G10 L20 for details 13 4 G92 Offsets 13 4 1 The G92 commands This set of commands include User Manual V2 6 11 34 gff59490 2015 12 16 134 253 e G92 This command when used with axis names sets values to offset variables e G92 1 This command sets zero values to the G92 variables e G92 2 This command suspends but does not zero out the G92 variables e G92 3 This command applies offset values that have been suspended When the commands are used as described above they will work pretty much as you would expect To make the current point what ever it is have the coordinates X0
Download Pdf Manuals
Related Search
Related Contents
MegaRAID® Device Driver Installation User's Guide Vinicultura biológica vinha Documentation officielle TCM420 750 lb Flatbed Trailer E4D.1_Elenco prezzi - Mondo Acqua S.p.A. Manual De Usuario Manual De Usuario Please read manual carefully before starting JVC UX-S77 User's Manual BWF5810 Dental Laser User Manual User manual and parts handbook Verti Copyright © All rights reserved.
Failed to retrieve file