Home
USBCNC manual
Contents
1. USBCNC Manual Parameter number Meaning 1 4999 Free to use note that 4996 4999 are used by the tool length measurement function under user button 2 4000 4999 Free to use persistent 5001 5006 POS X C interpreter position work position 5008 Actual TOOL 5009 Actual TOOL Radius 5010 Actual TOOL Z offset 5011 New tool during tool change 5012 Actual tool X offset 5013 Actual G43 Z offset 5014 Actual G43 X offset 5015 5050 Used in tool change sub routine 5051 5056 Probe position X C in machine coordinates 5061 5066 Probe position X C in work coordinates 5067 1 if probe is triggered after G38 2 0 otherwise 5068 Actual Probe value 5069 Handwheel counter 5071 5076 POS X C interpreter position without offsets Machine position 5161 5166 G28 home X C 5181 5186 G30 home X C 5211 5216 G92 offset X C 5220 Coord System number 5221 5226 Coord System 1X C 5241 5246 Coord System 2 X C 5261 5266 Coord System 3 X C 5281 5286 Coord System 4 X C 5301 5306 Coord System 5 X C 5321 5326 Coord System 6 X C 5341 5346 Coord System 7 X C 5361 5366 Coord System 8 X C 5381 5386 Coord System 9 X C 5230 Reserved for rotation coordinate system 1 5250 Reserved for rotation coordinate system 2 5270 Reserved for rotation coordinate system 3 5290 Reserved for rotation coordinate s
2. TOOL DIR OUT 0 PWM 10UT 0 PWM 20UT alo PWM 3 OUT HOMEX IN HOMEZ IN Pd V HOMEY IN m 7 HOMEA IN HOMEB IN v HOMEC IN v V PROBE IN E AUX4 OUT V SYNC IN AUXS OUT V RUN IN AUX6 OUT PAUSE E aux7 out E Auxs OUT E auxs ouT V HW1A IN V HW1B IN V HW2A IN V HW28 IN AUX4 IN AUXS IN AUX6 IN AN4 ANS AN7 PWM1 PWM2 Manual O O 13 33 57 Reset cnccommand cpp 928 Info 0 System reset done m At this page you can monitor and set the I O signals The page shows only the I O that are applicable for the attached hardware The Advantronix part is only available when you have an Advantronix USB I O card connected 08 March 2012 Release 4 00 11 48 USBCNC Manual 2 7 HOMING AND COORDINATE SYSTEMS As am like most people and don t want to read a comprehensive manual but start right away So have written this little tutorial it explains how to home the machine and use the coordinate systems in a simple way This part is very important to read you will enjoy operating the machine more if you use the coordinate systems the right
3. 08 March 2012 Release 4 00 11 108 USBCNC Manual Figure A 4 Cutter radius compensation entry moves C 1 5 5 programmed path actual path Cutter radius compensation is turned on after the first pre entry move and before the second pre entry move including G41 on the same line as the second pre entry move turns compensation on before the move is made In the code above line N0010 is the first pre entry move line N0020 turns compensation on and makes the second pre entry move and line N0030 makes the entry move A 4 PROGRAMMING ERRORS AND LIMITATIONS The Interpreter will issue the following error messages involving cutter radius compensation In addition to these there are several bug messages related to cutter compensation but they should never occur Cannot change axis offsets with cutter radius comp Cannot change units with cutter radius comp Cannot probe with cutter radius comp on Cannot turn cutter radius comp on out of xy plane Cannot turn cutter radius comp on when on Cannot use g28 or g30 with cutter radius comp Cannot use g53 with cutter radius comp Cannot use xz plane with cutter radius comp Cannot use yz plane with cutter radius comp 10 Concave corner with cutter radius comp 11 Cutter gouging with cutter radius comp 12 D word with no g41 or g42 13 Multiple d words on one line 14 Negative d word tool radius index used 15 Tool radius index too big 16 Tool radius not less than a
4. 08 March 2012 Release 4 00 11 36 USBCNC Manual 2 2 5 Operate page tasks 2 2 5 1 STARTUP When you just started the application you have to press reset F1 This will enable the drives the machine on button left will be green flashing this means the machine is ready but must be homed first 2 2 5 2 HOMING Homing is the next step to perform this can be done via main gt f2 There you can do individual axis homing or home all axes art once For homing setup see homing and coordinate systems chapter All axes home at once can also be done using ctrl h or the home all button beside the status Feed Speed G M Code Tijd 0 60 300 0 0 0 2 2 5 3 LOAD AND RUN A G CODE FILE After homing we a ready to run a program we have to load a g code file for doing that From the main menu press F4 Auto then F2 load g code file Go to the cnc jobs directory and load demo cnc graphic window Machine Work X 0 000 Y 0 000 Z 0 000 F 0 60 100 S 0 100 0 X98 642Y32 740 X96 850Y32 090 X95 784Y30 692 X95 022Y 27 384 X95 332Y 24 003 X98 436Y 24 772 X98 547Y24 400 X98 658Y24 028 X99 060Y25 149 X99 619Y27 333 X98 603Y29 346 Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 X98 198Y27 071 a 23 39 42 Info Loading done nrOflines 1195 gt 12KB a X98 436Y 24 772 z Start rendering G0Z5 000 Done range gt X 3 000 197 000 Y 3 000 97 000 Z 1 000 1 00
5. Manual Your action Machine message Open MDI and type close mdi check correct calibration tool nr 16 dat gosub calibrate _tool_setter 17 50 47 m Homey gt 17 50 47 Info Home A 17 53 41 Info Job started 17 53 41 Warning dose mdi check correct calibration tool nr 16 data in tool table m Close the MDI window Tooltable saved using F6 17 50 47 Info Home A a Go to the tools tab and check 17 53 41 Info Job started the tool length of tool 16 17 53 41 Warning dose mdi check correct calibration tool nr 16 data in tool table ae 17 57 51 Info Tooltable saved For me it is 0 because I use the tool chuck without calibration tool 4 lee 1i The program is still inside jog to toolchange safe height when done press run subroutine 17 53 41 Warning dose mdi check correct calibration tool nr 16 data in tool table a calibrate_tool_setter 17 57 51 Info Tooltable saved 18 01 18 Info Job started 18 01 18 Warning jog to toolchange safe height when done press run 2 m r Do what the message says 18 01 18 Info Job started a In my case this is completely 18 01 18 Warning jog to toolchange safe height when done press run 18 04 34 Info Job started E 18 04 34 Warning insert calibrationtool 16 length 0 jog just above tool setter when done press run E i 3 4 W 08 March 2012 Release 4 00 11 56 USBCNC Manual Do what the messages says
6. Here is an example of a center format command to mill an arc G17 G2 x10 y16 i3 j4 z9 That means to make 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 16 and Z 9 with its center offset in the X direction by 3 units from the current X location and offset in the Y direction by 4 units from the current Y location If the current location has X 7 Y 7 at the outset the center will be at X 10 Y 11 If the starting value of Z is 9 this is a circular arc otherwise it is a helical arc The radius of this arc would be 5 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 3 5 4 Dwell G4 For a dwell program G4 P This will keep the axes unmoving for the period of time in seconds specified by the P number It is an error if e the P number is negative 3 5 5 Set Coordinate System Data G10 To set the coordinate values for the origin of a coordinate system program G10L2P X Y Z A where the P number must evaluate to an integer in the range 1 to 9 corresponding to G54 to G59 3 and all axis words are optional The coordinates of the origin of the coordinate system specified by the P number are reset to the coordinate values given in terms of the absolute coordinate system Only those coordinates for
7. Ny Nx ArcF 100 F6 F7 ej Fir F12 08 March 2012 Release 4 00 11 33 USBCNC Manual 2 2 4 5 IOMENU ka Ea F3 F1 F2 F4 F1 Reset F2 drivers on off F3 spindle on off F4 spindle direction left right F5 flood coolant on off F6 mist coolant on off F7 aux output on off F9 Speed F10 Speed F12 back to main menu RESET al i aua F9 F10 F12 r y JA Ms M7 AUX F5 F6 F7 2 2 4 6 GRAPHIC MENU 2D m ronan aoon BrE pana FA F5 F6 F7 r omni E EF an _ Fast Render e F1 reset e F5 switch between 2D X Y plane and 3D iso metric view e F6 zoom fit e F7 zoom out e F8 zoom in e F9 zoom machine e F10 clear e F11 redraw re render whole program through interpreter The graph view shows a grid of 50mm in mm mode or 2 Inch in inch mode projected on the machine bed X Y surface For a representative view it is important that the axes limits are correctly filled in and that the machine is homed manually or automatic The current work coordinate system origin is shown as a cyan colored cross in the x y plane When you press the preview update button a preview is shown of the loaded G Code program The preview is created by running the entire g code file through the interpreter So when interpreter errors occur it shows in the log window and in the operate view the program li
8. PC BASED CNC CONTROL gogdaCNC software amp interface USBCNC User Manual Document Release 4 00 11 Published by Bert Eding Eindhoven The Netherlands Title USBCNC Manual Author Bert Eding Date Thursday 08 March 2012 Document History Version Date Author Comment 1 2006 03 10 Bert Eding Initial version 4 00 2011 09 19 Bert Eding Modified UI OpenGL Nesting Gotoline gt start and Pause gt start completely redesigned 4 00 2011 10 23 Bert Eding Added G68 R_ X_ Y_ rotation 4 00 2011 11 05 Bert Eding Added trafic light support ussable on AUX ouputs of CPU card Only CPUSB can support all 3 colors Extended dlgmsg 12 parameters picture Users pay attention the behavior of the cancel button has changed the program will continue with 5390 1 so after dlgmsg please use if 5398 1 User pressed OK do your stuff here endif 4 00 2011 11 13 Bert Eding Some modifications for added UI buttons in variable window 4 00 2011 12 11 Bert Eding Corrected a few mistakes 4 00 11 2012 03 03 Bert Eding Removed V1 xx V2 xx V3 xx document history because this table became too long Synced version number with actual software version number Removed unnecessary text Corrected mistakes and added missing descriptions reported by customers Updated the hardware tips appendix with more detailed information about good EMC practices Copyright USBCNC All rights reserve
9. e Any number of words parameter settings and comments 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 g0 x 0 1234 y7 for example Blank lines are allowed in the input They are to be ignored Input is case insensitive 3 3 1 Line Number A line number is the letter N followed by an integer with no sign between 0 and 99999 written with no more than five digits 000009 is not OK for example Line numbers may be repeated or used out of order although normal practice is to avoid such usage 08 March 2012 Release 4 00 11 63 USBCNC Manual 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 3 3 2 Word A word is a letter other than N followed by a real value Words may begin with any of the letters shown in Table 3 2 The table includes N for completeness even though as defined above line numbers are not words Several letters I J K L P and R may have different meanings in different contexts Letter Meaning A A axis of machine D Tool radius compensation number F Feed rate G General function see Table 3 4 H Tool length offset index X
10. National Institute of Standards and Technology Gaithersburg MD November 1995 K amp T Kearney and Trecker Co Part Programming and Operating Manual KT CNC Control Type C Pub 687D Kearney and Trecker Corp 1980 NCMS l National Center for Manufacturing Sciences The Next Generation Controller Part Programming Functional Specification RS 274 NGC Draft NCMS August 1994 Proctor Proctor Frederick M Kramer Thomas R Michaloski John L Canonical Machining Commands NISTIR 5970 National Institute of Standards and Technology Gaithersburg MD January 1997 08 March 2012 Release 4 00 11 102 USBCNC Manual A Cutter Radius Compensation This appendix discusses cutter radius compensation It is intended for NC programmers and machine operators See Section 3 5 10 for additional information on cutter radius compensation A 1 INTRODUCTION The cutter radius compensation capabilities of the Interpreter enable the programmer to specify that a cutter should travel to the right or left of an open or closed contour in the XY plane composed of arcs of circles and straight line segments Cutter radius compensation is performed only with the XY plane active All the figures in this appendix therefore show projections on the XY plane Where the adjacent sides of remaining material meet at a corner there are two common ways to handle the tool path The tool may pass in an arc around the corner or the tool path may conti
11. e Keep all GND cables especially short and use thick flexible cable e If not possible to keep it short then connect it to the metal GND plate 08 March 2012 Release 4 00 11 112 USBCNC Manual Schematic drawing of a possible good layout in the cabinet Keep Cables Motor Power Motor Out Near Mains In Z H Cabinet H i Edge FILTER STAR GROUND M6 SCREW aa MOTOR POWER Keep Cables N Near Cabinet CPU POWER Edge 230U 24U S SOLPD STATE RELAY SPINDLE SENSOR POWER Peete nnn nnn nn en nn nn nn ee eee lm eee een Mator Connectors Spindle 230U Home Sensors Here a picture of my own system it contains various EMC problem makers like 2 Switched mode power supplies S gt S gt gt z SS USBCNC CPU ee rrr worn nnn nn en nn nnn nn nnn nn nnn nnn nnn 4 r E PUR f f f L USB or ETHERNET and a frequency inverter for a HF spindle Check the routing of the Motor and drive supply wires Also there a 4 stepper motor drives working at 75 Volt motor currents 4 2 Amp Drive Step Dir Enable Steel or ALU Cabinet 08 March 2012 Release 4 00 11 113
12. g Software Security Token gt Sound video and game controllers gt gt Storage controllers b gill System devices gt jg Universal Image Mounter b Universal Serial Bus controllers If you see this the USB driver is correctly installed The COM17 number may be different on your system 1 4 2 Ethernet For Ethernet you need a free Ethernet connection on the PC Add a 2nd network card if needed Connect the CPU using a 100 MBit UTP Cross cable Then setup the Ethernet adapter Go to the windows network settings the network adapter with No network access is one for the CPU 08 March 2012 Release 4 00 11 11 USBCNC Manual k y All Control Panel Items Network and Sharing Center n File Edit View Tools Help Control Panel H 7 x f a View your basic network information and set up Change adapter settings connections Change advanced sharing A z A bed See full map settings a USBCNC PC Multiple networks Internet This computer View your active networks Connect or disconnect Access type Internet a Netwerk 4 HomeGroup Joined Home network Connections Q LAN verbinding 2 Access type No network Onbekend netwerk access Public network Connections LAN verbinding 4 Change your networking settings Es Set up a new connection or network Set up a wireless broadband dial up ad hoc or VPN connection or set up a router or access point Connect to
13. if Probe start state is 1 waiting for 0 you have one or just leave 18 04 34 Info Job started a 18 04 34 Warning insert calibrationtool 16 length 0 jog just above tool setter when done press run the tool chuck empty oil s pty 18 08 53 Info Job started 118 08 53 Info Probe start state is 1 waiting for 0 4 m b When done jogging press The machine will move down to touch the tool setter The measured tool chuck height is stored into 4999 Then the Z is moved up to safe height 18 08 53 Info Job started Fl 18 08 53 Info Probe start state is 1 waiting for 0 18 09 43 Info calibration done safe height 267 15 x 30 6625 y 67 125 chuck height 55 3094 18 09 43 Info Job Finished 4 m r Calibration DONE We need to do this only once You need to do this again if you have changed something that influences the calibrated data When all calibrated the user button F2 can be used to measure the tool length Make sure the correct tool is loaded before you start Press USER BUTTON 2 The machine moves to safe height The dialog is shown enter tool dimensions tool number J approx toollength 9 tool diameter 0 Type correct values for tool number tool length and The machine moves to the correct X Y diameter The machine moves 10 mm above the tool setter Press OK So make sure the approx tool length above is OK The machine does the move towards the tool setter Then c
14. outside diameter 15 inside diameter 14 10 passes GO X20 Z20 G76 P1 0 Z10 115 JO 1 K1 0 It is an error if The active plane is not the ZX plane Other axis words such as X or Y are specified The R degression value is less than 1 0 All the required words are not specified P J K or H is negative E is greater than half the drive line length The drive line is a safe line outside the thread material The drive line goes from the initial location to the Z value specified with G76 The Z extent of the thread is the same as the drive line The thread pitch or distance per revolution is given by the P value The thread peak is given by the I value which is an offset from the drive line Negative values indicate external threads and positive values indicate internal threads Generally the material has been turned to this size before the G76 cycle The initial cut depth is given by the J value The first threading cut will be J beyond the thread peak position J is positive even when I is negative The full thread depth is given by the K value The final threading cut will be K beyond the thread peak position K is positive even when l is negative The depth degression is given by the R value R1 0 selects constant depth on successive threading passes R2 0 selects constant area Values between 1 0 and 2 0 select decreasing depth 08 March 2012 Release
15. the Y number is 5 the Z number is 0 6 and the R number 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 move is a traverse along the Z axis to 1 2 4 8 since old Z lt clear Z The first repeat consists of 3 moves 1 a traverse parallel to the XY plane to 5 7 4 8 2 a feed parallel to the Z axis to 5 7 4 2 3 a traverse parallel to the Z axis to 5 7 4 8 The second repeat consists of 3 moves The X position is reset to 9 5 4 and the Y position to 12 7 5 1 a traverse parallel to the XY plane to 9 12 4 8 2 a feed parallel to the Z axis to 9 12 4 2 3 a traverse parallel to the Z axis to 9 12 4 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 a traverse parallel to the XY plane to 13 17 4 8 2 a feed parallel to the Z axis to 13 17 4 2 3 a traverse parallel to the Z axis to 13 17 4 8 3 5 20 3 G82 CYCLE The G82 cycle is intended for drilling Program G82 X Y Z A R L P 1 Preliminary motion as described above 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 traverse rate to clear Z 3 5 20 4 G83 CYCLE The G83 cycle often called peck drilling is intended for deep drilling or milling with chip breaking The
16. 2012 Release 4 00 11 98 USBCNC Manual 4 2 3 An example SUS CO Circle holes 1 0 gO zil x0 yo while 1 lt gt 360 we 10 gt siaki 3 10 cos 1 gO x 3 yl 2 gil z Gil wil 1 1 30 if 1 360 mse Deine else msg processing at angle 1 endif endwhile endsub GoOsuils clo CaiecilS Imolles m30 This example drills holes at a circle with a radius of 10 each 30 degrees The code that performs this is put in a subroutine which can be called as many times as needed in the main program 4 2 4 Special interpreter commands non G Code Messages Msg Hello there the value of 1 1 and the value of 2 2 ErrMsg Same as Msg but this one generates an error Store position SP lt filename gt 0 or 1 This command stores the actual position in given file name The extra parameter 0 means create the file 1 means add to existing file If only file name is given the position is added to existing file DigMsg Gives a dialog message for an interactive g code program DlgMsg lt dialog message gt lt parlName gt lt parlParNumber gt lt parl2Name gt lt parl2ParNumber gt Example DigMsg Give parameters par 100 par2 101 The dialog woll have an OK and a Cancel button When the user selects OK variable 5398 is set to 1 and the program automatically continues When the user selects CANCEL variable 5398 is set to 1 program continues Just try and yo
17. 754 X98 436Y24 772 755 X98 547Y24 400 756 X98 658Y24 028 757 X99 060Y25 149 758 X99 619Y27 333 759 X98 603Y29 346 760 X98 198Y27 071 L9 MCA Collision G1 X190 0000 761 X98 436Y24 772 Start rendering 762 G0Z5 000 Done range gt X 1 927 195 927 Y 31 838 125 838 Z 1 000 1 000 763 GOXx0 000Y0 000 Done Delta s gt XD 194 000 YD 94 000 2D 0 000 765 G0Z5 000 lt lt Auto F S Arc Feed Soana _ pe 100 z as z Fast RT Graph F9 F10 F12 Fast Rendering w r wr D D IE a 2 lls LOAD REDRAW fif START EDIT GOTO REPOS F3 F4 F5 F2 F6 F7 F8 We see that the tool path fits without collision and we see the delta s in X Y Z which is the size of the tool path Control F3 is also possible this redraws and zooms to fit 08 March 2012 Release 4 00 11 39 USBCNC amp USBCNC V3 53 Beta 6 Operate Program Tools Variables 10 Machine Work X 0 000 Y 0 000 Z 0 000 FS GMT T f 5 Delta s gt XD 194 000 YD 94 000 ZD 0 000 Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 Start rendering 357 Done range gt X 1 927 195 927 Y 31 838 125 838 Z 1 000 1 000 23 57 10 Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 e Ea X98 642Y32 740 X96 850Y32 090 X95 784Y30 692 X95 022Y27 384 X95 332Y24 003 X98 436Y 24 772 X98 547Y24 400 X98 658Y 24 028 X99 060Y25 149 X99 619Y27 333 X98 603Y 29 346 X98 198Y27 07
18. G40 G21 G90 G94 G54 G49 G99 G64P0 1 G96 TO G0X0 000Y0 000 G0Z5 000S15000M3 GOX5 050Y5 050Z5 000 G1Z 1 000F360 0 G1X7 321Y3 533F6000 0 X10 000Y3 000 L lt lt s o Single Gi ka Ed B u Se Gz au Zia EO _ p ooNx 100 2 aaa pee F2 F3 F4 F5 F6 F7 Fo F10 Fil F12 Fast Rendering Material size set the material size in X and Y it is shown in the graph Start offset set an offset for starting play with it and you will see what it does Pitch the distances in X Y of the products Number Specify the number of products Max USBCNC will determine the max number of products App Apply the current setting to the program Can Cancel nesting back to only one product The Nest button F11 can be pressed to show hide the nesting dialog Nesting internally uses coordinate system offset G59 3 the coordinate system offsets may not be used in the program otherwise nesting will not work so no G54 G59 3 allowed in the program G92 is allowed but if changed must be set back to the original value at the end of the program The program must end with M30 otherwise nesting will not work The values above can also be set in the G Code file like so mx 200 Material size X my 200 Material size Y odx 200 the delta X or pitch X dy 200 the delta Y or pitch Y ox 200 the offset X oy 200 the offset Y 08 March 2012 Release 4 00 11 32 USBCNC Operate Program After pressing the A
19. Rendering F1 Reset F2 Load G Code file F3 redraw re render whole program through g code interpreter F4 run pause 08 March 2012 Release 4 00 11 30 USBCNC Manual F5 rewind job F6 start editor F7 set start line of job store current position of job after pause F9 Feed Override F10 Feed Override F11 Show Nesting options F12 back to main menu F7 set start line will give next popup dialog SEARCH If you have stopped while Paused the line number will show the current line of the job This happens also when you have pressed reset when paused hiie Not that reset when pause is needed when you need to do e g a tool change During Pause only jog movements are allowed You can store and retrieve the stored line number using the Store Get Stored buttons Press search to run the interpreter in Search mode up to the given line number The graphic shows the search Store Line amd Get Line When you press the RUN button F4 after a search or pause the following popup dialog appears Z gt gt gt The Z gt gt gt button will start move Z completely up mereen The M6 T1 button shows the tool according to the interpreter Se This button is not visible at a start after Pause only at start after search if the color is green the current tool matches the tool from the search status x20000 If the color is red the tool doesn t match and you can start a tool change by pressing the butt
20. Traffic light setup Red Specify output for RED color Yellow Specify output for YELLOW color Green Specify output for GREEN color CPUSB is required to view all colors because other CPU s do not have enough amount of outputs 2 1 15 Interpreter settings DiameterProgramming Check if you want diameter programming for turning all X axis values are interpreted as diameter The effect is that all movements in the X axis are divided by 2 AbsoluteCenterCoords If Checked the I J K value is interpreted as absolute value Incremental is used mostly LongFileModeCriterion Specify a number of Kbytes here When the loaded job file is larger the UI switches to long file mode The program listbox changes and the graphics will show only outlines when a program is loaded This is al needed to preserve memory and speed for large files In this mode the file itself is still executed from memory and allows complex G Code constructs While If then else sub routines SuperLongFileModeCriterion Specify a number of KBytes here where super long file mode starts This number should be equal or bigger as LongFileModeCriterion For very long files from 20MByte and UP to 4G this mode is required It also puts the GUI in the same mode as with LongFileMode but as extra the file itself is no longer executed from memory The means that complex G Code constructs are no longer possible These type of files generally contain only G1 sometimes G2 G3
21. X Y and Z words are all missing during a canned cycle 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 rotational axis motion is used during a canned cycle inverse time feed rate is active during a canned cycle cutter radius compensation is active during a canned cycle When 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 the R number is less than the Z number When the XZ plane is active the Y number is sticky and it is an error if e the Y number is missing and the same canned cycle was not already active e the R number is less than the Y number When the YZ plane is active the X number is sticky and it is an error if e the X number is missing and the same canned cycle was not already active e the R number is less than the X number 3 5 20 1 PRELIMINARY AND IN BETWEEN MOTION At the very beginning of the execution of any of the canned cycles with the XY plane selected if the current Z position is below the R position the Z axis is traversed 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 straight traverse parallel to the XY plane to the given XY position 2 a straight traverse of the Z axis only to the R position if
22. a collision error this means that the tool path does not fit on the machine so a shift of the work coordinate system is needed a USBCNC V3 53 Beta 6 USBCNC SI k k 58 M Q data work trunk sw bin_release cnc jobs demo cnc Operate Program Tools Variables 10 Setup Help Machine Work 60 100 100 0 GOx0 000Y0 000 G0Z5 000S15000M3 GOXS 050Y5 050Z5 000 G1Z 1 000F360 0 G1X7 321Y3 533F3000 0 x10 000Y3 000 X190 000 X193 423Y3 894 X196 106Y6 577 X197 000Y10 000 Y90 000 X196 106Y93 423 X193 423Y96 106 X190 000Y97 000 X10 000Y97 000 m 1195 _ gt 2 Wx EO a eae EO 1 LOAD REDRAW START EDIT GO FS F6 F7 F3 F4 L9 MCA Collision G1 X190 0000 23 48 18 Info Loading job 23 48 18 Info Loading done nrOflines 1195 gt 12KB 23 48 18 Info Start rendering 23 48 18 Stop L9 MCA Collision G1 X190 0000 N EEEE NQUSBWNKHO Single lt lt lt Auto Bodoa lo F 5 Arc Feed ii m 100 F10 F12 J Fast RT Graph Fast Rendering The yellow rectangle shows the first place where the collision is discovered We see here clearly that a part of the tool path is outside the machine area a message is given showing the line number L9 in this case where the collision occurred The easiest way to shift now is to jog to the place where you want to have the origin the actual place of the work coordinate system origin is shown as the cy
23. a network Connect or reconnect to a wireless wired dial up or VPN network connection Choose homegroup and sharing options Access files and printers located on other network computers or change sharing settings See also HomeGroup Troubleshoot problems Internet Options Diagnose and repair network problems or get troubleshooting 3 information Windows Firewall Click on the adapter with no network access here LAN verbinding 4 here the text in your PC may be different 08 March 2012 Release 4 00 11 12 USBCNC Manual IPv4 Connectivity No network access IPv6 Connectivity No network access Media State Enabled Duration 1 day 00 44 33 Speed 100 0 Mbps Press Properties LAN verbinding Intel PRO 100 PCl adapter This connection uses the following items C 0 Client for Microsoft Networks O E QoS Packet Scheduler C B Fie and Printer Sharing for Microsoft Networks C 4 Intemet Protocol Version 6 TCP IPv6 Ee O 4 Link Layer Topology Discovery Mapper 1 0 Driver CO Link Layer Topology Discovery Responder _Unintat Description Transmission Control Protocol Intemet Protocol The default wide area network protocol that provides communication across diverse interconnected networks Switch on only TCP IP V4 and uncheck the rest 08 March 2012 Release 4 00 11 13 USBCNC Manual Now press properties of the TCP IP settings In
24. approx tool length 10 g00 g53 z2 4999 10 5017 measure tool length and pull 5mm back up g38 2 g91 2 20 30 g90 back to safe height g0 g53 z 4996 Store tool length diameter in tool table 5400 5016 5053 4999 5500 5016 5018 5600 5016 0 Tool X offset is 0 msg tool length measured 5400 5016 stored at tool 5016 endif endif endsub 08 March 2012 Release 4 00 11 58 USBCNC Manual 3 Input the RS274 NGC Language This section describes the input language RS274 NGC 3 1 OVERVIEW The RS274 NGC language is based on lines of code Each line also called a block may include commands to a machining center 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 G1 X3 is a valid line of code with two words G1 is acommand meaning move in a straight line at the programmed feed rate and X3 provides an argument value the value of X should be 3 at the end of the move Most RS274 NGC commands start with either G or M for miscellaneous The words for these commands are called G codes and M codes The RS274 NGC language has no indicator for the start of a
25. as normal the axes move one step ata time The work position however remains the same This is accomplished by modifying the active G92 offset It is useful when e g during engraving you want to run the G Code program again but a little deeper in Z E g you want to run the program 0 1 mm deeper select jog step 0 1 and check shift coordinate system Now press de arrow down button to move Z 0 1 mm down Notice that the axis moves down but that the position remains the same When you run your engraving program again the engraving will be 0 1 mm deeper into the material This option is also very handy during turning Your program has run and you measure the work piece and see its diameter is still a bit too big So now use the X button to compensate the diameter Run the program again and your work piece diameter will be correct The amount of shift is shown at the right side To reset the value to 0 which has no influence on the active offset nor machine position uncheck and then check shift coordinate system 2 2 4 9 USER MENU zean naaa nann e F1 Reset e F2 Zero the Z coordinate using a flexible toolsetter positioned on top of the material see ZERO TOOL MACRO chapter e F3 measure the tool length and put the length in the tool table using a fixed toolsetter see TOOL MEASUREMENT MACRO chapter e F4 F11 user function user_3 user_10 user defined functions in macro cnc e F12 return to main menu
26. axis offset for arcs X offset in G87 canned cycle Y axis offset for arcs Y offset in G87 canned cycle Z axis offset for arcs Z offset in G87 canned cycle number of repetitions in canned cycles key used with G10 miscellaneous function see Table 3 6 line number dwell time in canned cycles dwell time with G4 key used with G10 feed increment in G83 canned cycle arc radius clear_z distance in canned cycle spindle speed tool selection X axis of machine Y axis of machine Z axis of machine A axis of machine B axis of machine OII PIN lt K Al O DIO VIZ Fzi TFyAILco C axis of machine A real value is some collection of characters that can be processed to come up with a number A real value may be an explicit number Such as 341 or 0 8807 a parameter value an expression or a unary operation value Definitions of these follow immediately Processing characters to come up with a number is called evaluating An explicit number evaluates to itself 3 3 2 1 NUMBER The following rules are used for explicit numbers In these rules a digit is a single character between 0 and 9 08 March 2012 Release 4 00 11 64 USBCNC Manual e Anumber 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 digi
27. lt lt I F8 l Fil F12 With F2 F4 the X Z axes can be homed individually With F8 the home sequence can be started to home all axes in a sequence F11 is the same as the button besides the 100 feedOverride display What happens is that a few subroutines are called The subroutines are in the macro cnc file in your USBCNC installation folder They look like this Homing per axis Sub home_x home x Endsub 08 March 2012 Release 4 00 11 49 USBCNC Manual Sub home_y home y Endsub Sub home_z home z Endsub Home all axes uncomment or comment the axes you want sub home_all gosub home_z gosub home_x gosub home_y endsub A good reader has seen that the order of homing is defined by the home_all subroutine and can be customized to your own needs 2 7 1 Manual homing the machine Homing is the first thing you always do after switching on the machine recommend making a habit of it Suppose your machine limits are X 300 mm and 300 mm Y 200 mm and 200 mm Z 100 mm and 0 0 is the bottom surface of the bed Set the Home velocity to 0 for all axes that have no EOS switch Mark a point somewhere on the machine that you want to use as home reference point let s say X 200 0mm which is 100 0mm from the left edge and Y 150 which is 50 0 mm from the lower edge For Z we take to bottom of the bed at Z 0 mm This position x 250 Y 150 Z 0 is entered in the Home Position value
28. menu F6 manual data input ctrl f6 works always too for MDI F7 machine I O functions for spindle and coolants F8 graphic manipulation functions F9 jog with keyboard or hand wheel mode F10 jog pad for jogging by mouse or touch screen F11 user menu Lew M MACHINE B cooe CNC software amp interface Fil 2 2 4 2 HOME MENU 2000 F1 reset F2 F7 Home X Home C F8 Home all axes F10 go to g28 park position F11 go to g30 park position e F12 return to main menu For homing setup see homing and coordinate systems chapter Fl F2 F3 F4 F5 F8 F9 F1 Reset F2 F7 zero x zero c F8 zero all F9 measure rotation and apply G68 R F12 back to main menu OOo Ge F7 F8 F10 F11 F12 2 2 4 3 ZERO MENU F12 F9 measure rotation is a feature that makes life easy It automatically corrects your work piece clamp for rotation This means that you no longer have to spend time to setup your clamp material very accurately USBCNC will automatically correct for you 2 2 4 4 AUTO MENU Single Ny ArcF BlockDel p O ue Q g 4 aa BONx 9 100 z al Al EDRAV STOP EDIT GOTO D n LOAD ji REDRAW 400 Fast RT Graph F1 F2 F3 F4 FS F6 F7 F9 F10 Fil Fi2 Fast
29. or 0 002 millimeter if millimeters are being used When the XY plane is selected program G2 X Y Z A I J or use G3 instead of G2 The axis words are all optional except that at least one of X and Y must be used and J are the offsets from the current location in the X and Y directions respectively of the center of the circle and J are optional except that at least one of the two must be used It is an error if e Xand Y are both omitted e and J are both omitted When the XZ plane is selected program G2 X Y Z A 1 K or use G3 instead of G2 The axis words are all optional except that at least one of X and Z must be used and K are the offsets from the current location in the X and Z directions respectively of the center of the circle and K are optional except that at least one of the two must be used It is an error if e Xand Z are both omitted e and K are both omitted When the YZ plane is selected program G2 X Y Z A B C J K or use G3 instead of G2 The axis words are all optional except that at least one of Y and Z must be used J and K are the offsets from the current location in the Y and Z directions respectively of the center of the circle J and K are optional except that at least one of the two must be used It is an error if e Y and Z are both omitted e Jand K are both omitted 08 March 2012 Release 4 00 11 73 USBCNC Manual
30. park position 1 setup on variable page G30 move to park position 2 setup on variable page G33 Lathe motion synchronized to spindle G38 2 straight probe G40 cancel cutter radius compensation G41 start cutter radius compensation left G42 start cutter radius compensation right G43 tool length offset plus tool X offset for lathe G49 cancel tool length offset G53 motion in machine coordinate system G54 use preset work coordinate system 1 G55 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 G59 1 use preset work coordinate system 7 G59 2 use preset work coordinate system 8 G59 3 use preset work coordinate system 9 G61 set path control mode exact path G61 1 set path control mode exact stop G64 set path control mode continuous G68 XY rotation G76 Lathe threading G80 cancel motion mode including any canned cycle G81 canned cycle drilling G82 canned cycle drilling with dwell G83 canned cycle peck drilling G84 canned cycle right hand tapping G85 canned cycle boring no dwell feed out G86 canned cycle boring spindle stop rapid out G87 canned cycle back boring G88 canned cycle boring spindle stop manual out G89 canned cycle boring dwell feed out G90 absolute distance mode G91 incremental distance mode G92 offset coordinate systems and set parameters G92 1 cancel offset coordinat
31. program The RS274 NGC language has two commands M2 or M30 either of which ends a program 3 2 RS274 NGC LANGUAGE VIEW OF A MACHINING CENTER The RS274 NGC language is based on a particular view of what a machining center to be controlled is like The view is as described in Section 2 1 with the changes described below The RS274 NGC language view includes one mechanical component not known to the canonical machining functions a cycle start button The use of the button is described in Section 3 6 1 The RS274 NGC language contains commands that change the way subsequent commands are to be interpreted but do not tell the machining center to do anything These are not covered in this section but are dealt with as they arise in Section 3 5 17 Section 3 5 19 and Section 3 5 20 3 2 1 Parameters Variables In the RS274 NGC language view a machining center maintains an array of 5400 numerical parameters Many of them have specific uses The parameter array should persist over time even if the machining center is powered down USBCN stores the parameters that have specific use only This is performed when the user presses the Save Fixtures button in the variable view The specific parameters are listed in the table below Other parameters in range of 1 5400 are free to use in your G Code program 08 March 2012 Release 4 00 11 59 USBCNC Manual 08 March 2012 Release 4 00 11 60
32. ramped down this means that there is no position loss 2 1 4 Backlash setup Backlash Set the amount of backlash for each axis that the software should compensate Experiment with velocities and acceleration the backlash compensation demands more from your motors than without backlash compensation Do not try to compensate more than 0 1 millimeters If there is more backlash try to reduce it mechanically first The backlash compensation superimposes a second movement the backlash on top of the normal movement when the direction reverses You can see the impact on the motion profile in the figures below Here you can see the extra demands on the motors Especially look at the extra acceleration that is caused by the backlash compensation A non micro step drive in combination with a relative good motor may not be able to follow the profile po 10 po w vo ee acc 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129 sins iC backlash backlash 9 17 33 41 49 57 65 73 81 89 97 105 113 121 129 13 oS SF o A movement from 0 to 10 mm without direction The next figure shows the same movement with reversal It is a beautiful 3rd order profile as you direction reversal The compensation value is can see The numbers on the X axis are 10 ms 0 25 mm for this measuremen
33. 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 Program G83 X Y Z A R L Q 08 March 2012 Release 4 00 11 89 USBCNC Manual Preliminary motion as described above Move the Z axis only at the current feed rate downward by delta or to the Z position whichever is less deep Rapid back out to the clear_z Rapid back down to the current hole bottom backed off a bit Repeat steps 1 2 and 3 until the Z position is reached at step 1 Retract the Z axis at traverse rate to clear Z hp OPO GO It is an error if e the Q number is negative or zero 3 5 20 5 G85 CYCLE The G85 cycle is intended for boring or reaming but could be used for drilling or milling Program G85 X Y Z A B C R L Preliminary motion as described above Move the Z axis only at the current feed rate to the Z position Retract the Z axis at the current feed rate to clear Z 3 5 20 6 G86 CYCLE The G86 cycle is intended for boring This cycle uses a P number for the number of seconds to dwell Program G86 X Y Z A B C R L P Preliminary motion as described above Move the Z axis only at the current feed rate to the Z position Dwell for the P number of seconds Stop the spindle turning Retract the Z axis at traverse rate t
34. same Using real values which are not explicit numbers as just shown in the examples is rarely useful If L is written in a prototype the will often be referred to as the L number Similarly the in H may be called the H number and so on for any other letter 08 March 2012 Release 4 00 11 69 USBCNC Manual 3 5 1 Rapid Linear Motion GO For rapid linear motion program GO X Y Z A where all the axis words are optional except that at least one must be used The GO is optional if the current motion mode is GO This will produce coordinated linear motion to the destination point at the current traverse rate or slower if the machine will not go that fast It is expected that cutting will not take place when a GO command is executing It is an error if All axis words are omitted If cutter radius compensation is active the motion will differ from the above see Appendix A If G53 is programmed on the same line the motion will also differ see Section 3 5 12 08 March 2012 Release 4 00 11 70 USBCNC Manual Table 3 4 G Codes GCode Meaning GO rapid positioning G1 linear interpolation G2 circular helical interpolation clockwise G3 circular helical interpolation counterclockwise G4 dwell G10 coordinate system origin setting G17 XY plane selection G18 XZ plane selection G19 YZ plane selection G20 inch system selection G21 millimeter system selection G28 move to
35. 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 3 8 ORDER OF EXECUTION The order of execution of items on a line is critical to safe and effective machine operation Items are executed in the order shown in Table 3 7 if they occur on the same line 08 March 2012 Release 4 00 11 96 USBCNC Manual Table 3 7 Order of execution comment includes message set feed rate mode G93 G94 inverse time or per minute set feed rate F set spindle speed S select tool T change tool M6 spindle on or off M3 M4 M5 coolant on or off M7 M8 M9 ojo Nj gt On yoo PO enable or disable overrides M48 M49 dwell G4 set active plane G17 G18 G19 set length units G20 G21 cutter radius compensation on or off G40 G41 G42 cutter length compensation on or off G43 G49 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 home G28 G30
36. to the current position and Z as an increment from the Z axis position before the move involving Z takes place when the YZ or XZ plane is selected treatment of the axis words is analogous In absolute distance mode the X Y R and Z numbers are absolute positions in the current coordinate system 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 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 The L number is not sticky 08 March 2012 Release 4 00 11 87 USBCNC Manual When L gt 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 on the repetitions The R and Z positions do not change during the repeats 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 if that is above the R position and the retract mode is G98 OLD_Z or otherwise to the R position See Section 3 5 20 It is an error if e
37. tool does not fit Figure A 5 Two cutter radius compensation errors In both examples the line represents a contour and the circle represents the cross section of a tool following the contour using cutter radius compensation tangent to one side of the path A 4 2 Cannot Turn Cutter Radius Comp on When On 5 If cutter radius compensation has already been turned on it cannot be turned on again It must be turned off first then it can be turned on again It is not necessary to move the cutter between turning compensation off and back on but the move after turning it back on will be treated as a first move as described below It is not possible to change from one cutter radius index to another while compensation is on because of the combined effect of rules 5 and 12 It is also not possible to switch compensation from one side to another while compensation is on A 4 3 Cutter Gouging 11 If the tool is already covering up the next XY destination point when cutter radius compensation is turned on the gouging message is given when the line of NC code which gives the point is reached In this situation the tool is already cutting into material it should not cut More details are given in Section A 6 A 4 4 Tool Radius Index Too Big 15 If a D word is programmed that is larger than the number of tool carousel slots this error message is given In the SAI the number of slots is 68 A 4 5 Two G Codes Used from Same Modal Group 17 T
38. which an axis word is included on the line will be reset It is an error if e the P number does not evaluate to an integer in the range 1 to 9 If origin offsets made by G92 or G92 3 were in effect before G10 is used they will continue to be in effect afterwards The coordinate system whose origin is set by a G10 command may be active or inactive at the time the G10 is executed Example G10 L2 P1 x 3 5 y 17 2 sets the origin of the first coordinate system the one selected by G54 to a point where X is 3 5 and Y is 17 2 in absolute coordinates The Z coordinate of the origin and the coordinates for any rotational axes are whatever those coordinates of the origin were before the line was executed G10 L20 P X Y Z A Set coordinate system given by P number relative to actual machine position Working is similar to G92 Jog to any position then apply e g G10 L20 P1 XO YO to set G54 coordinate system zero point at current machine position 08 March 2012 Release 4 00 11 74 USBCNC Manual 3 5 6 Plane Selection G17 G18 and G19 Program G17 to select the XY plane G18 to select the XZ plane or G19 to select the YZ plane The effects of having a plane selected are discussed in Section 3 5 3 and Section 3 5 16 3 5 7 Length Units G20 G21 and G70 G71 Program G20 to use inches for length units Program G21 to use millimeters It is usually a good idea to program either G20 or G21 near the beginning of a prog
39. 0 763 G0X0 000Y0 000 23 39 43 Info Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 A 765 GOZ5 000 lt Mm 1195 gt gt gt Single lt lt puma S ane BlockDel RESET 2 D O Ey la F F b Arc Feed 2 ua ELLS seared mou EDIT GOTO Hi REPOS _ _ 100 a J x Y Fast RT Graph Fr F2 F3 F4 FS F6 F7 F8 F9 F10 F12 Fast Rendering Using the mouse ctrl left mouse you can rotate the tool path and see it 3D Using the left mouse you can PAN Using the right mouse you can ZOOM 08 March 2012 Release 4 00 11 37 USBCNC Manual USBCNC V3 53 Beta 6 Operate Program Tools Variables 10___ Setup Help _ 60 100 EStop 0 0 0 X98 642Y32 740 X96 850Y32 090 X95 784Y30 692 X95 022Y 27 384 X95 332Y24 003 X98 436Y24 772 X98 547Y24 400 X98 658Y 24 028 X99 060Y25 149 X99 619Y27 333 X98 603Y29 346 Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 X98 198Y27 071 23 39 42 Loading done nrOflines 1195 gt 12 KB X98 436Y 24 772 23 39 43 Start rendering G0Z5 000 23 39 43 Done range gt X 3 000 197 000 Y 3 000 97 000 Z 1 000 1 000 7 GOx0 000Y0 000 23 39 43 Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 A EDIT GOTO F5 F6 F7 GO0Z5 000 lt CIS S gt gt Single Auto BlockDel p gt Arc Feed Sim Bj F FastRT Graph F12 Fast Rendering It can be that while loading you get
40. 1 X98 436Y24 772 G0Z5 000 G0X0 000Y0 000 G0Z5 000 E Ss 6 3 EES Single Auto BlockDel b Arc Feed Sim 100 2 J Fast RT Graph RESETII la F F LOAD REDRAW EDIT GOTO REPOS p F5 F6 F7 F8 F9 F10 Fl F2 F3 Now we can press run F4 to run the program We have no automatic tool changer so the program stops when F12 Fast Rendering a tool change is encountered asking us to put in the tool a USBCNC V3 53 Beta 6 US 5D 3 58 M Q data work trunk sw b elease cnc jobs demo cnc Operate Program Tools Variables 10 Machine Work 0 ae a POLS T1M6 GOx0 000Y0 000 G0Z5 000S15000M3 GOX5 050Y5 050Z5 000 G1Z 1 000F360 0 G1X7 321Y3 533F3000 0 X10 000Y3 000 x190 000 10 X193 423Y3 894 11 X196 106Y6 577 12 X197 000Y10 000 Done range gt X 1 927 195 927 Y 31 838 125 838 Z 1 000 1 000 a 13 Y90 000 ys Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 14 X196 106Y93 423 00 01 06 Info Job started 15 X193 423Y96 106 00 01 06 Action Please load tool 1 16 X190 000Y97 000 z 17 X10 000Y97 000 4 m E Single 21 gt REDRAW START EDIT F5 F6 F3 F4 F7 F8 The tool is already in so we press F4 again the program will continue and our machine is working We see the tool path being drawn real time on the screen Auto Arc Feed BlockDel Sim V Fast RT Graph Fast Rendering Manual 08 Mar
41. 1 x 20 z10 g3 x0 z0 i10 kO g1 x20 g2 x40 z 10 i0 k 10 g1 z 20 g3 x60 z 30 i10 kO g40 m30 Radius programming Use I K programming for arc s gO x 10 220 g41 1 d5 g1 x 10 210 g3 x0 z0 i10 kO g1 x10 g2 x20 z 10 i0 k 10 g1 z 20 g3 x30 z 30 i10 kO g40 m30 3 5 12 Tool Length Offsets G43 G43 1 and G49 To use a tool length offset from the tool table program G43 H where the H number is the desired index in the tool table It is expected that all entries in this table will be positive The H number should be but does not have to be the same Manual as the slot number of the tool currently in the spindle It is OK for the H number to be zero an offset value of zero will be used If the H number is omitted the actual tool in the spindle is used It is an error if 08 March 2012 Release 4 00 11 80 USBCNC Manual e the H number is not an integer is negative or is larger than the number of carousel slots To use dynamic tool compensation not from the tool table use G43 1 I K where l gives the tool X offset turning and K gives the tool Z offset for turning and milling To use no tool length offset program G49 It is OK to program using the same offset already in use It is also OK to program using no tool length offset if none is currently being used 5401 5416 is the tool Z length offset 5501 5516 is the tool diameter length 5601 561
42. 274 NGC program Using the probe with rotational axes not set to zero is also feasible Doing so is more complex than when rotational axes are at zero and we do not deal with it here 08 March 2012 Release 4 00 11 76 USBCNC Manual 3 5 10 3 EXAMPLE CODE As a usable example the code for finding the center and diameter of a circular hole is shown in Table 3 5 For this code to yield accurate results the probe shank must be well aligned with the Z axis the cross section of the probe tip at its widest point must be very circular and the probe tip radius i e the radius of the circular cross section must be known precisely If the probe tip radius is known only approximately but the other conditions hold the location of the hole center will still be accurate but the hole diameter will not In Table 3 5 an entry of the form lt description of number gt is meant to be replaced by an actual number that matches the description of number After this section of code has executed the X value of the center will be in parameter 1041 the Y value of the center in parameter 1022 and the diameter in parameter 1034 In addition the diameter parallel to the X axis will be in parameter 1024 the diameter parallel to the Y axis in parameter 1014 and the difference an indicator of circularity in parameter 1035 The probe tip will be in the hole at the XY center of the hole The example does not include a tool change to put a probe in the sp
43. 3 5 6 Plane Selection G17 G18 and G19 75 3 5 7 Length Units G20 G21 and G70 G71 75 3 5 8 Return to Home G28 and G30 75 08 March 2012 Release 4 00 11 5 USBCNC Manual 3 5 9 G33 G33 1 Spindle Synchronized Motion 75 3 5 10 Straight Probe G38 2 76 3 5 10 1 The Straight Probe Command 76 3 5 10 2 Using the Straight Probe Command 76 3 5 10 3 Example Code 77 3 5 11 Cutter Radius Compensation G40 G41 G41 1 G42 G42 1 78 3 5 11 1 Example code for milling 79 3 5 11 2 Example code for turning 80 3 5 12 Tool Length Offsets G43 G43 1 and G49 80 3 5 13 Move in Absolute Coordinates G53 81 3 5 14 Select Coordinate System G54 to G59 3 81 3 5 15 Set Path Control Mode G61 and G64 or G64 Px 81 3 5 16 Look Ahead feed 83 3 5 17 Coordinate system rotation G68 85 3 5 18 Threading Lathe G76 85 3 5 19 Cancel Modal Motion G80 87 3 5 20 Canned Cycles G81 to G89 87 3 5 20 1 Preliminary and In Between Motion 88 3 5 20 2 G81 Cycle 89 3 5 20 3 G82 Cycle 89 3 5 20 4 G83 Cycle 89 3 5 20 5 G85 Cycle 90 3 5 20 6 G86 Cycle 90 3 5 20 7 G87 Cycle 90 3 5 20 8 G88 Cycle 91 3 5 20 9 G89 Cycle 91 3 5 21 Set Distance Mode G90 and G91 91 3 5 22 Coordinate System Offsets G92 G92 1 G92 2 G92 3 92 3 5 23 Set Feed Rate Mode G93 and G94 92 3 5 24 Set Canned Cycle Return Level G98 and G99 93 3 6 Input M Codes 93 3 6 1 Program Stopping and Ending MO M1 M2 M30 M60 93 3 6 2 Spindle Control M3 M4 M5 94 3 6 3 Tool Change M6 9
44. 4 3 6 4 Coolant Control M7 M8 M9 94 3 6 5 Override Control M48 and M49 95 3 6 6 10 M Functions 95 3 6 7 Standard CNC IO M3 M9 M80 M87 95 3 6 8 General purpose IO of CPU5B M54 M55 and M56 95 3 7 Other Input Codes 96 3 7 1 Set Feed Rate F 96 3 7 2 Set Spindle Speed S 96 3 7 3 Select Tool T 96 3 8 Order of Execution 96 4 Language extensions 97 4 1 Flow control 97 4 2 supported operations on expressions 97 4 2 1 unary operations 97 4 2 2 binary operations 98 4 2 3 An example 99 4 2 4 Special interpreter commands non G Code 99 4 2 5 Special interpreter MDI commands 100 4 3 Macro file and automatic tool change 100 08 March 2012 Release 4 00 11 6 USBCNC Manual A Cutter Radius Compensation 103 A 1 Introduction 103 4 3 1 Data for Cutter Radius Compensation 104 A 2 Programming Instructions 104 4 3 2 Turning Cutter Radius Compensation On 104 4 3 3 Turning Cutter Radius Compensation Off 105 4 3 4 Sequencing 105 4 3 5 Use of D Number 105 4 3 6 Material Edge Contour 105 4 3 7 Programming Entry Moves 105 A 2 1 1 General Method 105 A 2 1 2 Simple Method 106 A 3 Nominal Path Contour 107 A 4 Programming Errors and Limitations 109 A 6 Hardware installation tips 112 08 March 2012 Release 4 00 11 7 USBCNC Manual 1 Introduction This manual describes the usage of the CNC control system Most hardware details can be found in the hardware documentation on the Eding CNC download page 1 1 CONTEXT AND SCOPE This se
45. 4 00 11 85 USBCNC Manual and increasing area Values above 2 0 select decreasing area Beware that unnecessarily high degression values will cause a large number of passes to be used The compound slide angle Q 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 The number of spring passes is given by the H value Spring passes are additional passes at full thread depth If no additional passes are desired program HO Tapered entry and exit moves can be programmed using E and L E gives a distance along the drive line used for the taper E0 2 will give a taper for the first last 0 2 length units along the thread L is used to specify which ends of the thread get the taper Program LO for no taper the default L1 for entry taper L2 for exit taper or L3 for both entry and exit tapers The tool will pause briefly for synchronization before each threading pass so a relief groove 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 traverse to original X is not synchronized to the spindle speed With a slow spindle the exit move might take only a small fraction o
46. 5161 X 2 000 5181 0 000 cet 5002 R 0 000 5009 1 5220 Y 0 000 5222 5212 Y 1000 5162 Y 10 000 5182 0 000 Dz 5003 L 0 5010 z 0 000 5223 5213 304 000 5163 10 000 5183 0 000 5063 5004 A 0 000 5224 5214 0 000 5164 0 000 5184 G68 Rotation 5005 B 0 000 5225 5215 0 000 5165 0 000 5185 0 000 R 0 00000 5006 c 0 000 5226 5216 0 000 5166 0 000 5186 Set to current Set to current Set to current position position position 0 000 5064 0 000 Show Machine Status Loading macro file Loading done nrOfLines 466 CPU at lt 172 22 2 100 gt used Welcome to USBCNC Press Reset F 1 to enable drives m The G68 rotation can be reset with the reset button under G68 Rotation This is the same as entering G69 in MDI The G54 G59 3 offsets can be set by entering values and pressing enter The G54 G59 3 X Y values can be defined as zero at current machine position by pressing the button This works similar to G92 offset The MDI equivalent for setting G55 offsets is G10 L20 P2 X0 YO G92 is normally used for zeroing the machine at work piece coordinates you can reset all offsets here to zero The G28 and G30 positions can be defined at current location by pressing the associated button 08 March 2012 Release 4 00 11 47 USBCNC 2 6 IO PAGE DRIVE ENABLE OUT TOOL OUT COOLANT 1 OUT COOLANT2 OUT
47. 6 is the tool X width for turning offset The variables can be modified runtime in the G Code file if needed to compensate for tool wear 3 5 13 Move in Absolute Coordinates G53 For linear motion to a point expressed in absolute coordinates program G1 G53 X Y Z A or use GO instead of G1 where all the axis words are optional except that at least one must be used The GO or G1 is optional if it is the current motion mode G53 is not modal and must be programmed on each line on which it is intended to be active This will produce coordinated linear motion to the programmed point If G1 is active the speed of motion is the current feed rate or slower if the machine will not go that fast If GO is active the speed of motion is the current traverse rate or slower if the machine will not go that fast It is an error if e G53 is used without GO or G1 being active e G53 is used while cutter radius compensation is on 3 5 14 Select Coordinate System G54 to G59 3 To select coordinate system 1 program G54 and similarly for other coordinate systems The system number G code pairs are 1 G54 2 G55 3 G56 4 G57 5 G58 6 G59 7 G59 1 8 G59 2 and 9 G59 3 Itis an error if e one of these G codes is used while cutter radius compensation is on 3 5 15 Set Path Control Mode G61 and G64 or G64 Px Some work pieces require absolute accuracy and some other require nonstop milling for best surface qua
48. 60 686 X v Save G Code 13 38 48 CCncDK SetParameters CncDK cpp 990 Info 2 Enter I X 276 808 Y 260 686 Select Participating DXF Layer vjo ViLayer 1 Set DXF Origin m L M UR ML MM MR 4L 4M 4R Connect Tolerance Calculation Accuracy Close Path s Show Arrows V Boundary Offset Pocket Open ends Points 0 00100000 0 00000 100 Manual A USBCNC uses a build in CAD CAM library for these advanced import functions You can load a file and then perform one of these operations Loads a DXF or HPGL file Select engraving this is milling over the lines from the drawing Select profiling this is for milling out objects and taking the tool diameter into account This is for pocketing to mill out the complete object Drilling draw points in the DXF file to use this 08 March 2012 Release 4 00 11 42 USBCNC Manual After loading a DXF file all layers will be visible You can unselect layers at the right side such that you see only the part that you want to use You also can change the origin of the drawing by pressing the appropriate button under the layer selection list box The positions of the buttons give the positions of the origin So e g when you press the upper right button then the most upper right position of the dr
49. A should be tangent to DA at A Figure A 3 Simpler cutter radius compensation entry move for material edge contour Figure A 3 Simpler compensation entry move AG33 programmed path actual path o Cutter A 3 NOMINAL PATH CONTOUR When the contour is a nominal path contour the path a tool with exactly the intended diameter would take the tool path is described in the NC program It is expected that except for during the entry moves the path is intended to create some part geometry The path may be generated manually or by a post processor considering the part geometry which is intended to be made For the Interpreter to work the tool path must be such that the tool stays in contact with the edge of the part geometry as shown on the left side of Figure A 1 If a path of the sort shown on the right of Figure A 1 is used in which the tool does not stay in contact with the part geometry all the time the Interpreter will not be able to compensate properly when undersized tools are used A nominal path contour has no corners so the simple method just described will not work 08 March 2012 Release 4 00 11 107 USBCNC Manual For a nominal path contour the value for the cutter diameter in the tool table will be a small positive number if the selected tool is slightly oversized and will be a small negative number if the tool is slightly undersized If a cutter diameter value is negative the Interpreter compensa
50. C code while compensation is on When compensation is off these both are set to a very small number 10 20 whose symbolic value is unknown The Interpreter world model uses the data items current_x and current_y to represent the position of the center of the tool tip in the currently active coordinate system at all times A 2 PROGRAMMING INSTRUCTIONS 4 3 2 Turning Cutter Radius Compensation On To start cutter radius compensation keeping the tool to the left of the contour program G41 D The D word is optional see Use of D Number just below To start cutter radius compensation keeping the tool to the right of the contour program G42 D 08 March 2012 Release 4 00 11 104 USBCNC Manual In Figure A 1 for example if G41 were programmed the tool would move clockwise around the triangle so that the tool is always to the left of the triangle when facing in the direction of travel If G42 were programmed the tool would stay right of the triangle and move counter clockwise around the triangle 4 3 3 Turning Cutter Radius Compensation Off To stop cutter radius compensation program G40 It is OK to turn compensation off when it is already off 4 3 4 Sequencing If G40 G41 or G42 is programmed on the same line as tool motion cutter compensation will be turned on or off before the motion is made To make the motion come first the motion must be programmed on a separate previous line of code 4 3 5 Use of D N
51. DK cpp 990 Info 2 Enter Save G Code Zoom Fit Zoom Manual Note The offset and pocket calculation might not always work this is usually because of small errors in the drawing like lines over each other or not connecting lines Experimenting with the Calculation Accuracy might help Also check correction of your drawing may help The engraving function is robust and will always work 08 March 2012 Release 4 00 11 44 USBCNC Manual 2 4 TOOLS PAGE 2 4 1 Milling USBCNC V4 00 RC 12 USB Operate Program Tools Variables 10 Setup Help ZOffset Diameter Description Machine Work o 0 0000 0 0000 NOTOOL 1 0 0000 0 0000 T2 2 10 0000 0 0000 T3 3 10 0000 0 0000 T4 4 10 0000 0 0000 T5 5 10 0000 6 0000 T6 6 10 0000 7 0000 7 7 10 0000 8 0000 T8 8 10 0000 9 0000 79 Feed Speed G M Code Time 9 10 0000 10 0000 T10 F 100 10 10 0000 11 0000 T11 S 0 0 11 10 0000 12 0000 12 12 10 0000 13 0000 T13 l G17 G40 G21 G90 G94 G54 G49 G99 G64 G96 G69 T1 13 10 0000 14 0000 T14 14 10 0000 15 0000 T15 arg 2 This is file macro cnc aag 10 0000 16 0000 T16 3 It is automatically loaded 16 9 0000 0 0000 4 Customize this file yourself iS It contains ill ei 6 subroutime change_tool this is called 18 0 0000 0 0000 7 subroutime home_x home_z called 19 0 0000 0 0000 8 subroutine home_all called when ho
52. PM K 5 RPMSensor _ Trivial Kinematics V Tangential Knife Safety Input ExtErrInputSenseLevel 2 ae tanknifeangle 3 0 Safety Input Selection MistIsSpindleDirection Kinematics Setup tarinife Zup dst 5 000 SAFETY INPUT OFF v Auto detect polarity SafeFeed 0 5 10 49 11 Info Loading done nrOfLines 426 10 49 09 Info CPU at lt SIM gt used 10 49 09 Warning SIMULATION MODE Press reset to start 10 49 11 Info Welcome to USBCNC Press Reset F 1 to enable drives Ti 08 March 2012 Release 4 00 11 16 USBCNC Manual 2 1 1 Ul and Connection Connection to CPU If you have 1 board connected to your PC leave the setting at AUTO the Ethernet Language setup Password INCH MM software will find the board automatically Otherwise choose the here the CPU you want to work with For CPU s with USB you see the COMx ports here in case of a CPU5 with Ethernet you will see the IP Address here If you have a CPU with Ethernet check the Ethernet checkbox Speaks for itself After it is set save the changes then close USBCNC and restart so that everything will be in the correct language The translations are in 2 files cncgui lang txt and cncserver lang txt if you find translation mistakes you can correct this here Please send the corrected file to Eding CNC the corrections will then be incorporated into new versions You can protect the setup parameters from be
53. Table A 1 the first three lines are the entry moves just described Table A 1 NC program for figure A 2 N0010 G1 X1 Y5 make first pre entry move to C N0020 G41 G1 Y4 turn compensation on and make second pre entry move to point B N0030 G3 X2 Y3 l1 make entry move to point A N0040 G2 X3 Y2 J 1 cut along arc at top N0050 G1 Y 1 cut along right side N0060 G2 X2 Y 2 l 1 cut along arc at bottom right N0070 G1 X 2 cut along bottom side N0080 G2 X 2 6 Y 0 2 J1 cut along arc at bottom left N0090 G1 X1 4 Y2 8 cut along third side N0100 G2 X2 Y3 10 6 J 0 8 cut along arc at top of tool path N0110 G40 turn compensation off Cutter radius compensation is turned on after the first pre entry move and before the second pre entry move including G41 on the same line as the second pre entry move turns compensation on before the move is made In the code above line N0010 is the first pre entry move line N0020 turns compensation on and makes the second pre entry move and line N0030 makes the entry move A 2 1 2 SIMPLE METHOD If there is a convex sticking out not in corner somewhere on the contour a simpler method of making an entry is available See Figure A 3 First pick a convex corner There is only one corner in Figure A 3 It is at A and it is convex Decide which way you want to go along the contour from A In our example we are keeping the tool to the left of the remaining material and going clockwise Extend the sid
54. al interpreter MDI commands M6 TX which is a tool change will call the subroutine change_tool This subroutine can be customized to match your machine Gosub subname moves the interpreter to the first line off the subroutine allowing you to execute the subroutine without calling it from the main program This is good for testing subroutines In combination with DligMsg you can give your own input parameters 4 3 MACRO FILE AND AUTOMATIC TOOL CHANGE Whenever a G Code file is loaded also the file macro cnc is loaded In this file you may put your frequently used subroutines these can be invoked by the G Code file through GOSUB subroutineName The file contains default one special subroutine called change_tool this function is called automatically when a M6 Tx command Tool change is encountered in the G Code file With this it is possible to define your own tool change especially useful when you have an automatic tool changer You can put moves and I O actions there as well as automatic tool length measurement using the probe with G38 2 The tool change area can be guarded for collision if it is defined the rendering process will detect eventual collisions and report it So a normal workpiece program is not allowed to go through the Tool change Area The tool change itself is allowed to go to this area Therefor the change_tool subroutine contains the statement 08 March 2012 Release 4 00 11 100 USBCNC Manual TCAGuard
55. alculates and stores the values Then machine moves Z to safe height Tool Length measurement Complete 08 March 2012 Release 4 00 11 57 USBCNC Manual Sub calibrate tool setter warnmsg close MDI check correct calibration tool nr 16 data in tool table warnmsg jog to toolchange safe height when done press RUN 4996 5073 Store toolchange safe height machine coordinates warnmsg insert calibrationtool 16 length 5416 jog just above tool setter when done press RUN store x y in non volatile parameters 4000 4999 4997 5071 machine pos X 4998 5072 machine pos Y Determine minimum toochuck height and store into 4999 prices g91 27 20 30 4999 5053 5416 probepos Z calibration tool length toolchuck height g90 g0 g53 z 4996 msg calibration done safe height 4996 X 4997 Y 4998 Chuck height 4999 endSub sub m tool Check if toolsetter is calibrated if 4996 0 and 4997 0 and 4998 0 and 4999 0 errmsg calibrate toollsetter first open mdi enter gosub calibrate tool setter else g0 g53 z 4996 move to safe z dlgmsg enter tool dimensions tool number 5016 approx tool length 5017 tool diameter 5018 if 5398 1 user pressed OK XE 5016 lt 1 OR 50165 gt 15J ErrMsg Tool must be in range of 0 15 endif ymove to toolsetter coordinates g00 g53 x 4997 y 4998 move to 10mm above chuck height
56. an lines for X and Y 08 March 2012 Release 4 00 11 38 USBCNC Manual We jog about 200 mm to the left X and the Z axis about 10mm up so that our first attempt will be milling in the air a USBCNC V3 53 Beta 6 USBCNC Operate Program Tools Variables 10 Setup _ Help Machine Work G0X0 000Y0 000 G0Z5 000S15000M3 GOX5 050Y5 050Z5 000 G1Z 1 000F360 0 G1X7 321Y3 533F3000 0 x1 x 000 X193 423Y3 894 X196 106Y6 577 L9 MCA Collision G1 X190 0000 x197 000Y10 000 23 48 18 Info Loading job Y90 000 23 48 18 Info Loading done nrOflines 1195 gt 12KB X196 106Y93 423 23 48 18 Info Start rendering X193 423Y96 106 23 48 18 Stop L9 MCA Collision G1X 190 0000 X190 000Y97 000 X10 000Y97 000 RESET 4 la F GOTO REPOS L F8 F9 Singe E Auto F gt weree ides ee Sim t z F FastRT Graph F12 F10 EMAI gt F1 ET Fast Rendering The we press the zero buttons beside the coordinate display for X and Y this sets the coordinate system to the current position Now we need to press redraw to show the tool path again now with shifted coordinate system a USBCNC V3 53 Beta 6 USBCN Operate Program Tools Variables 10 Machine Work X 0 000 M 0 000 Z 0 000 F 0 60 100 S 0 100 0 749 X98 642Y32 740 750 X96 850Y32 090 751 X95 784Y30 692 752 X95 022 27 384 753 X95 332 24 003
57. and Tool changes M6Tx The toolchanges are still executed from the macro cnc file so full automatic toolchange is still available Files with up to 100 000 000 lines of G Code have been tested with this Macro Filename Name of the macro file it can be changed the default is macro cnc 2 1 16 JobTimeEstimation During the Render phase after loading the job the job time is estimated But this is just a quick estimation because a real calculation of time would take too much time therefore these parameters CorrectionFactor Correction factor for the time calculations you can change this if you see that your type of jobs require a correction 08 March 2012 Release 4 00 11 24 USBCNC Manual RestimateRunTime When checked you will see the remaining estimated time of job based on the average speed measured and the total distance to go 2 1 17 Hand wheel Setup Cnt Rev Count V l A X1 X100 Vel Mode FeedOverride The number of counts of the hand wheel for one revolution usually 400 for most CNC hand wheels Shows the actual Hand wheel count value try to turn the hand wheel and see it change Percentage of velocity from selected axis this is the maximum velocity the axis will move when using the hand wheel Percentage of acceleration from selected axis this is the maximum acceleration the axis will move when using the hand wheel In velocity mode the most important is that the movement st
58. angential knife is switched on by interpreter command tanknife on and switched off by tanknife off interpreter command If you wish you can assigne those commands to user buttons 08 March 2012 Release 4 00 11 20 USBCNC Manual TanKnife Z up distance Specifies the distance to lift up Z when detected angle is greater than Tan Knife Angle 2 1 9 Safety Input Safety Input Selection Select one of the AUX inputs to act as safety input when active only low speeds are possible and the running g code goes to pause Feedhold spindle off This can only be configured for CPU5B Safety Feed Feed in mm s to be applied when the safety input is active and when the machine is not homed and homing is mandatory is set 2 1 10 Spindle and PWM setup MaxS The speed of your PWM controlled spindle when the PWM signal is at 100 Mins The lowest possible speed for you spindle If a command for a lower S values is used then this minimum value is applied Ramp up Time The software waits this time between switching on the spindle and starting the further machining Proportional Ramp up Time Ramp up time is proportional with requested speed Suppose your Maximum speed is 24000 and ramp up time 10 second The a speed command of 12000 will give a ramp up time of 5 second ShowRPM Check this when you want to see the RPM s this works also if you have no RPM sensor a calculated value is displayed in this case RPMSensor Check if y
59. anguage view a machining center has an absolute coordinate system and nine program coordinate systems You can set the offsets of the nine program coordinate systems using G10 L2 Pn n is the number of the coordinate system with values for the axes in terms of the absolute coordinate system You can select one of the nine systems by using G54 G55 G56 G57 G58 G59 G59 1 G59 2 or G59 3 see Section 3 5 13 It is not possible to select the absolute coordinate system directly You can offset the current coordinate system using G92 or G92 3 This offset will then apply to all nine program coordinate systems This offset may be cancelled with G92 1 or G92 2 See Section 3 5 18 You can make straight moves in the absolute machine coordinate system by using G53 with either GO or G1 Data for coordinate systems is stored in parameters see the previous section During initialization the coordinate system is selected that is specified by parameter 5220 A value of 1 means the first coordinate system the one G54 activates a value of 2 means the second coordinate system the one G55 activates and so on It is an error for the value of parameter 5220 to be anything but a whole number between one and nine 3 3 FORMAT OF A LINE A permissible line of input RS274 NGC code consists of the following in order with the restriction that there is a maximum currently 256 to the number of characters allowed on a line e An optional line number
60. anned Cycles G81 to G89 The canned cycles G81 through G89 have been implemented as described in this section Two examples are given with the description of G81 below All canned cycles are performed with respect to the currently selected plane Any of the three planes XY YZ and ZX may be selected Throughout this section most of the descriptions assume the XY plane has been selected The behavior is always analogous if the YZ or XZ plane is selected Rotational axis words are allowed in canned cycles but it is better to omit them If rotational axis words are used the numbers must be the same as the current position numbers so that the rotational axes do not move All canned cycles use X Y R and Z numbers in the NC code These numbers are used to determine X Y R and Z positions The R usually meaning retract position is along the axis perpendicular to the currently selected plane Z axis for XY plane X axis for YZ plane Y axis for XZ plane Some canned cycles use additional arguments 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 when the XY plane is selected X Y and R numbers are treated as increments
61. aptured and used to set your machine position correctly 2 7 3 Tandem axes homing Tandem axes one main axis has 2 motors the correct rotation axis option is set to be slave of X Y or Z If the TANDEM axis has individual home sensors for master and slave the home sequence can be customized such that the TANDEM sets itself straight after homing For tandem axes these special interpreter commands exist PrepareTandemHome MoveStaveToMaster HomeTandem For the explanation assume that the master axis is X and the Slave axis is A 1 PrepareTandemHome X Both slave and master are moved towards the home sensor The axes stop when both axes are on the sensor When one 08 March 2012 Release 4 00 11 51 USBCNC Manual axis reaches the home sensor first this one is stopped and the other moves further This movement is done when both axes have reached 2 Home X home the X the slave will just follow Because the axes are on the sensor the move will be off the sensor The position is latched at the moment the sensor de activates Then the movement stops and then the correct position is calculated end set for the X 3 Home A exactly the same but now the A is master temporarily and X will follow At the end the position is calculated and set for the A 4 At this point both master and slave have a correct known position It is very important that the home position in the setup matches the actual machine Now we can straighten the
62. arc near point B unless the tool diameter is exactly the size intended The figure shows the second pre entry move but not the first since the beginning point of the first pre entry move could be anywhere First pick a point A on the contour where it is convenient to attach an entry arc Specify an arc outside the contour which begins at a point B and ends at A tangent to the contour and going in the same direction as it is planned to go around the contour The radius of the arc should be larger than the maximum radius difference Then extend a line tangent to the arc from B to some point C located so that the length of line BC is more than the maximum radius difference After the construction is finished the code is written in the reverse order from the construction The NC code is shown in Table A 2 the first three lines are the entry moves just described Table A 2 NC program for Figure A 4 N0010 G1 X1 5 Y5 make first pre entry move to C N0020 G41 G1 Y4 turn compensation on and make second pre entry move to point B N0030 G3 X2 Y3 5 10 5 make entry move to point A N0040 G2 X3 5 Y2 J 1 5 cut along arc at top N0050 G1 Y 1 cut along right side NO060 G2 X2 Y 2 5 I 1 5 cut along arc at bottom right N0070 G1 X 2 cut along bottom side N0080 G2 X 2 9 YO 2 J1 5 cut along arc at bottom left N0090 G1 X1 1 Y3 2 cut along third side N0100 G2 X2 Y3 5 10 9 J 1 2 cut along arc at top of tool path N0110 G40 turn compensation off
63. ary motion as described above Move the Z axis only at the current feed rate to the Z position Dwell for the P number of seconds Stop the spindle turning Stop the program so the operator can retract the spindle manually Restart the spindle in the direction it was going aPon 3 5 20 9 G89 CYCLE The G89 cycle is intended for boring This cycle uses a P number where P specifies the number of seconds to dwell program G89 X Y Z A R L P 1 Preliminary motion as described above 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 3 5 21 Set Distance Mode G90 and G91 To make the current point have the coordinates you want without motion program G92 X Interpretation of RS274 NGC code can be in one of two distance modes absolute or incremental To go into absolute distance mode program G90 In absolute distance mode axis numbers X Y Z A B C usually represent positions in terms of the currently active coordinate system Any exceptions to that rule are described explicitly in this Section 3 5 To go into incremental distance mode program G91 In incremental distance mode axis numbers X Y Z A B C usually represent increments from the current values of the numbers and J numbers always represent increments regardless of the distance mode setting K numbers represent incremen
64. awing will become x 0 y 0 when milling The DXF import supports Lines Arcs Circles Poly lines with arcs Points for drilling The workflow of using these features is 1 Load drawing 2 Select the correct layers Apply origin offset if wanted Set correct parameters Calculate tool path Save tool path and optionally immediately load it for milling o1R WO Parameters involved Save Z When moving from one region to another the machine goes to this height Start Z Z value where the tool touches the material to be machined Final Z Z value specifying the milling depth lowest Z value Final Z must be lower than Start Z Z Increment This specifies the step size when machining in passes Feed rate Milling feed F in mm min Plunge rate Feed F that the Z moves down into the material also mm min Spindle S value for spindle speed CW CCW Spindle direction M3 M4 Tool number This is only used for the M6 tool change command Tool Diameter of the tool for the offset and pocketing calculations Diameter Method Outside inside clockwise counterclockwise operation Finish Material that is left for the finishing pass when pocketing This allowance finishing pass is at full depth for getting a clean edge Step size Step oversize for pocketing this value should be lower than the tool diameter Laser mode For profiling when switched on the tool will be switch
65. bridge by the command MoveSlaveToMaster A The slave will move to the same position as the master The bridge is set straight and we are done If the bridge is not straight the home positions in the setup are not correct To make this whole sequence more easy the HomeTandem X can be used to do it all at once When testing with the individual commands PrepareTandemHome Home master Home slave MoveSlaveToMaster is done the HomeTandem command can be used So if X has a slave Axis then modify the macro cnc so that subroutine home_x contains Sub home_x homeTandem X Endsub For anormal non tandem it would contain Sub home_x home x Endsub 2 7 4 Work versus Machine coordinate system and zeroing The machine coordinate system does not change however we want to be able to do the milling of our part anywhere we want on the machine We will normally use the work coordinate system we can shift it anywhere we want This can be done with several G Codes which are explained in chapter 3 it can also be done using the preset button on the operator screen we ll see this in a minute Suppose our g code file containing the work piece is created with an origin of X 0 Y 0 Z 0 This is because you have drawn your part in a CAD program beginning from these coordinates and then converted to G Code Now you have put your raw material somewhere on the machine probably not at coordinates X 0 Y 0 Z 0 By the way prefer to d
66. center of hole N260 G38 2 X 1021 1005 probe X side of hole N270 1031 5061 save results N280 GO X 1021 Y 1022 back to center of hole N290 G38 2 X 1021 1005 probe X side of hole N300 1041 1031 5061 2 0 find very good X value of hole center N310 1024 1031 5061 2 1004 find hole diameter in X direction N320 1034 1014 1024 2 0 find average hole diameter N330 1035 1024 1014 find difference in hole diameters N340 GO X 1041 Y 1022 back to center of hole N350 M2 that s all folks 08 March 2012 Release 4 00 11 71 USBCNC Manual 3 5 11 Cutter Radius Compensation G40 G41 G41 1 G42 G42 1 To turn cutter radius compensation off program G40 It is OK to turn compensation off when it is already off Cutter radius compensation may be performed only if the XY plane is active To turn cutter radius compensation on left i e the cutter stays to the left of the programmed path when the tool radius is positive program G41 D To turn cutter radius compensation on right i e the cutter stays to the right of the programmed path when the tool radius is positive program G42 D The D word is optional if there is no D word the radius of the tool currently in the spindle will be used If used the D number should normally be the slot number of the tool in the spindle although this is not required It is OK for the D number to be zero a radius value of zero w
67. ch 2012 Release 4 00 11 40 USBCNC a USBCNC V3 53 Beta 6 j Operate Program Tools Variables 10 _ Setup Help Machine Work FS GMT T F 1500 3000 100 E GEE EStop 6 s 10000 10000 100 a T1M6 ARA 2 G64 P0 1 x 3 G0X0 000Y0 000 4 G0Z5 000S15000M3 tae d 5 GOX5 050Y5 050Z5 000 Home z amp 6 G1Z 1 000F360 0 7 G1X7 321Y3 533F3000 0 8 X10 000Y3 000 KE 9 X190 000 10 X193 423Y3 894 11 X196 106Y6 577 J 12 X197 000Y 10 000 n 23 57 10 Info Done Delta s gt XD 194 000 YD 94 000 ZD 0 000 13 Y90 000 00 01 06 Info Job started 14 X196 106Y93 423 00 01 06 Action Please load tool 1 15 X193 423Y 96 106 00 02 53 Info Job started 16 X190 000Y97 000 aR 17 X10 000Y97 000 m lt lt lt gt gt gt gt oes e lockDel g Arc Feed z ee fi STOP 100 J E Ei Graph F1 F2 F3 F4 F5 Fast Rendering Manual 08 March 2012 Release 4 00 11 41 USBCNC 2 3 PROGRAM PAGE DXF AND HPGL IMPORT Pocketing Area dearance Safe Z 3 000 Start Z 0 000 Final Z 1 000 ZIncrement 1 000 FeedRate 400 000 PlungeRate 100 000 SpindleSpeed 10000 000 SpindleDirection CW ccw ToolNumber ToolDiameter 2 000 Method Spiral CCW Finish allowance 0 100 StepSize 2 Show Leftover material Calculate Toolpath Load Also Operate Program Tools Variables 10 Setup Help LE X 79 930 Y 2
68. comp entry move 1 delete on this is the blue curve g2 x0 y10 r5 cutter comp entry move 2 Then the program is run with block delete off gi z 3 plunge down resulting in the yellow curve g3 x10 yO r10 g1 x70 It is clear to see what the entry move does g3 x80 y10 r10 gi y90 g3 x70 y100 r10 gi x10 g3 x0 y90 r10 gi x0 y10 g40 g0 z3 gO x30 y30 g41 1 d6 g1 x20 g3 x10 y20 r10 gi z 3 g3 x20 y10 r10 g1 x60 g3 x70 y20 r10 g1 y80 g3 x60 y90 r10 g1 x20 g3 x10 y80 r10 g1 y20 g40 g0 z3 m30 08 March 2012 Release 4 00 11 79 USBCNC 3 5 11 2 EXAMPLE CODE FOR TURNING Diameter programming Use R word for Arcs gO x 20 220 g41 1 d5 g1 x 20 210 g3 x0 z0 r10 g1 x20 g2 x40 z 10 r10 g1 z 20 g3 x60 z 30 r10 g40 m30 The movement starts at the right upper corner The blue line is the programmed contour The yellow is the contour with tool radius compensation G41 The first G1 line is the tool comp entry move You can get this figure by putting a character in front of the G41 G40 codes The load the program with block delete on and execute it with block delete off With block delete on the tool comp is skipped Radius programming Use R word for arc s gO x 10 220 g41 1 d5 g1 x 10 210 g3 x0 z0 r10 g1 x10 g2 x20 z 10 r10 g1 z 20 g3 x30 z 30 r10 g40 m30 Diameter programming Use I K programming for arc s gO x 20 z20 g41 1 d5 g
69. cter takes precedence over other operations so that for example 1 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 3 3 2 3 EXPRESSIONS AND BINARY OPERATIONS 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 may be 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 Binary operations appear only inside expressions Nine binary operations are defined 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 08 March 2012 Release 4 00 11 65 USBCNC Manual modulus operation MOD The ninth operation is the power operation of raising the number on the left of the operation to the power on the right The binary operations are divided into three groups The first group is power Th
70. ction describes the context hardware and software of a USBCNC controlled Machine 4 Operator 2 PC connected via USB or Ethernet to electronic cabinet which contains the USBCNC CPU The PC runs the USBCNC Control Software 3 Electronics cabinet with power supplies drives and USNCNC CPU 4 USBCNC CPU 5 CNC Machine j The connection from CPU to the PC is USB or Ethernet depending on the CPU model The CPU delivers STEP Direction signals to the power stage of each motor drive the motor connections of the drive go to the motors inside the machine Other connections like home sensor switches go directly from CPU to the machine For detailed info on all IO signals see the info in the technical flyers of the CPU available on the download page The Scope of the USBCNC product is the USBCNC software on the PC and the USBCNC CPU 08 March 2012 Release 4 00 11 8 USBCNC 1 2 DEFINITIONS ACRONYMS AND ABBREVIATIONS CNC Computerized Numerical Control CPU Central Processor Unit a PCB board with a Processor on it DXF Drawing Exchange Format is a CAD data file format developed by Autodesk FIFO First In First Out Buffer HPGL Hewlet Packard Graphical Language GUI UI Graphical User Interface INTERPRETER A software function that is able to read a text file and execute the commands contained therein JOBFILE A job is the text file G code that will be executed by the interpr
71. d Reproduction in whole or in part prohibited without the prior written consent of the copyright owner ACKNOWLEDGEMENTS The G Code part of this user manual has been derived from the full report of the RS274 NGC language Parts that are less relevant to USBCNC users or parts that are not supported are left out USBCNC Manual Table of contents Table of contents 4 1 Introduction 8 1 1 Context and scope 8 1 2 Definitions acronyms and abbreviations 9 1 3 Minimum PC requirements 9 1 4 Installation of USBCNC 10 1 4 1 USB 10 1 4 2 Ethernet 11 1 4 3 Set admin mode 15 2 The user interface 16 2 1 Setup Page s 16 2 1 1 Ul and Connection 17 2 1 2 Motor setup 17 2 1 3 Homing and ESTOP setup 18 2 1 4 Backlash setup 19 2 1 5 Trajectory setup 20 2 1 6 Kinematic Setup 20 2 1 7 Tool change Area 20 2 1 8 Tangential knife setup 20 2 1 9 Safety Input 21 2 1 10 Spindle and PWM setup 21 2 1 11 Ul setup items 22 2 1 12 Load Run Automatically 23 2 1 13 1O setup 23 2 1 14 Traffic light setup 24 2 1 15 Interpreter settings 24 2 1 16 JobTimeEstimation 24 2 1 17 Hand wheel Setup 25 2 1 18 Probing Setup 25 2 1 19 CPUOPT 26 2 2 Operate Page 28 2 2 1 Operate page introduction 28 2 2 2 Reset Button F1 29 2 2 3 Escape Button 29 2 2 4 The menu s 30 2 2 4 1 Main Menu 30 2 2 4 2 Home menu 30 2 2 4 3 Zero menu 30 2 2 4 4 Auto menu 30 2 2 4 5 10 menu 34 2 2 4 6 Graphic menu 34 2 2 4 7 Jog menu 35 2 2 4 8 Jog pad 35 2 2 4 9 User menu 36 2 2 5 Opera
72. e ets V Enable USB Enable Ethernet _ Enable axis 4 EdingCNC Put your name here l Get Request Code Send this code to Eding CNC Enter the activationn code here Activate These are the steps to follow In the dialog check the enable axis 4 checkbox enter tour name and press get request code Option Dialog e 7 Enable USB Enable Ethernet V Enable axis 4 Your Name here Put your name here Get Request Code Send this code to Eding CNC 1CF 1AFF2C 1581731D46 147A 1534F 147BEA670F4736D6BBC983AEEDE 1F5572283057BB2C292F 146AFD57BB2C292F 146AFD57BB2C292F 146AFD57BB2C292F 146AF Enter the activationn code here Activate x cance Send the request code to the supplier Copy and paste it into an email and send it to your USBCNC supplier To do this double click the code press ctrl c in your e mail press control v Your suplier will send you a activation code Copy and paste this into the activation code area then press activate 08 March 2012 Release 4 00 11 26 USBCNC Manual Option Dialog _ lt V Enable USB Enable Ethernet Enable axis 4 Your Name here Get Request Code Send this code to Eding CNC Enter the activation code here 270FEDF 2CFF6D85238538039BE2CE93A9 200778F 5D9DB969A 20 Do what the dialog tells you press ok twice press sav
73. e second group is multiplication division and modulus The third group is addition subtraction logical non exclusive or logical exclusive or and logical and If operations are strung together for example in the expression 2 0 3 1 5 5 5 11 0 operations in the first group are to be performed before operations in the second group and operations in the second group before operations in the third 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 simplifies to 1 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 3 3 2 4 UNARY OPERATION VALUE A unary operation value is either ATAN followed by one expression divided by another expression for example ATAN 2 1 3 or any other unary operation name followed by an expression for example SIN 90 The unary operations are ABS absolute value ACOS arc cosine ASIN arc sine ATAN arc tangent COS cosine EXP e raised to the given power FIX round down FUP round up LN natural logarithm ROUND round to the nearest whole number SIN sine SQRT square root and TAN tangent Arguments to unary operation
74. e changes and restart When you press the CPU OPT button again you will see that the 4th axis is enabled and that it is registered with your name ee E e H V Enable USB Enable Ethernet iviEnabie axis 4 a Jarres Get Request Code Send this code to Eding CNC Enter the activationn code here 08 March 2012 Release 4 00 11 27 USBCNC Manual 2 2 OPERATE PAGE This is the operate page in menu Auto TT USBCNC V400B 1 SIMULATION O data work trunk cw bin release cne jobe wax ring cne Operate Program Tools Variables 10 Setup Help FS GMT TIME IF 99 600 100 s 5000 5000 50 G1 G17 G40 G21 G90 G94 G54 G49 G99 G64P0 1 G96 T1 gt LONG FILE MODE lt LINE 0000094 0 2 n847 x0 06 y 0 33 Job started 11 03 49 Warning PAUSED 11 03 49 Warning READY 11 03 50 Info Job started 4 w Seren Single i H z4 y Arc F BlockDel H H RESET gt F i Onell O sim _Loap Hfreoraw fi stop f EDIT GOTO w j a oo 100 L x Fast RT Graph Ex F2 F3 F4 Fo F10 Fil F12 Fast Rendering 2 2 1 Operate page introduction From this screen all machine operation like jogging running etc can be executed The Operate screen is designed such that it is mouse mouse less and touch screen friendly In the middle we see the graphics showing the tool path Blue Red when loaded and rendered Yello
75. e systems and set parameters to zero G92 2 cancel offset coordinate systems but do not reset parameters G92 3 apply parameters to offset coordinate systems G93 inverse time feed rate mode G94 units per minute feed rate mode G98 initial level return in canned cycles G99 R point level return in canned cycles 08 March 2012 Release 4 00 11 71 USBCNC Manual 3 5 2 Linear Motion at Feed Rate G1 For linear motion at feed rate for cutting or not program G1 X Y Z A where all the axis words are optional except that at least one must be used The G1 is optional if the current motion mode is G1 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 It is an error if e All axis words are omitted If cutter radius compensation is active the motion will differ from the above see Appendix A If G53 is programmed on the same line the motion will also differ see Section 3 5 12 3 5 3 Arc at Feed Rate G2 and G3 A circular or helical arc is specified using either G2 clockwise arc or G3 counterclockwise arc The axis of the circle or helix must be parallel to the X Y or Z axis of the machine coordinate system The axis or equivalently the plane perpendicular to the axis is selected with G17 Z axis XY plane G18 Y axis XZ plane or G19 X axis YZ plane If the arc is circular it lies in a plane parallel to the selected pla
76. e to another and the mode stays active until some other command changes it implicitly 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 are available on the line unless an explicit command is given on that next line using the axis words or cancelling motion Non modal codes have effect only on the lines on which they occur For example G4 dwell is non modal 3 4 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 Table 3 3 Table 3 3 Modal Groups The modal groups for G codes are group 1 GO G1 G2 G3 G38 2 G76 G80 G81 G82 G83 G84 G85 G86 G87 G88 G89 motion group 2 G17 G18 G19 plane selection group 3 G90 G91 distance mode group 5 G93 G94 feed rate mode group 6 G20 G21 units group 7 G40 G41 G42 cutter radius compensation
77. e to be cut 08 March 2012 Release 4 00 11 106 USBCNC Manual DA in the figure to divide the area outside the material near A into two regions DA extended is the dotted line AC on the figure Make a pre entry move to anywhere in the region on the same side of DC as the remaining material point B on the figure and not so close to the remaining material that the tool is cutting into it Anywhere in the diagonally shaded area of the figure or above or to the left of that area is OK If the tool is already in region no pre entry move is needed Write a line of NC code to move to B if necessary Then write a line of NC code for a straight entry move that turns compensation on and goes to point A If Bis at 1 5 4 the two lines of code for the pre entry and entry moves would be N0010 G1 X1 5 Y4 move to B N0020 G41 G1 X3 Y3 turn compensation on and make entry move to A These two lines would be followed by four lines identical to lines N0050 to N0080 from Table A 1 but the end of the program would be different since the shape of remaining material is different It would be OK for B to be on line AC In fact B could be placed on the extension outside the part of any straight side of the part B could be placed on EF extended to the right but not to the left for going clockwise for example If DA were an arc not a straight line the two lines of code above would still be suitable In this case the dotted line extending D
78. ed Rate Mode G93 and G94 Two feed rate modes are recognized units per minute and inverse time Program G94 to start the units per minute mode Program G93 to start the inverse time mode In units per minute feed rate mode an F word no not that F word we mean feed rate 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 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 traverse motions 08 March 2012 Release 4 00 11 92 USBCNC Manual It is an error if e inverse time feed rate mode is active and a line with G1 G2 or G3 explicitly or implicitly does not have an F word 3 5 24 Set Canned Cycle Return Level G98 and G99 When the spindle retracts during canned cycles there is a choice of how far it retracts 1 retract perpendicular to the selected plane to the position indicated by the R word or 2 retract perpendicular to the selected plane to the
79. ed off when moving from one region to another Make bridges Leave small pieces of material that prevent you object from falling out and get damaged when profiling 08 March 2012 Release 4 00 11 43 USBCNC Bridge Approx distance the exact distance is calculated such that all distance bridges have equal distance BridgeFinalZ Lowest Z value for bridge this value should be between startZ and finalZ BridgeWidth The width of a bridge When the parameters are set press calculate tool path it will be visualized on the screen Here an example of profiling with bridges a USBCNC V3 50 RC 6 SIMULA Operate Program Tools Variables 10 Setup Help eu d Offset Cut out Dn cae z Select Participating DXF Layer Safe Z 3 000 ae 1 Start Z 0 000 Final Z 1 000 ZIncrement 1 000 FeedRate 400 000 aa 200 000 Set DXF Origin Show SpindleSpeed 10000 000 pE Be z SpindleDirection CW ccw UL UM UR V Boundary LaserMode Ir V offset ToolNumber 1 sia ha A Pocket ToolDiameter 5 Open ends 4l 4M 4R Points Method Outside CCW w MakeBridges Connect Tolerance 0 00100000 BridgeDistance 30 000 Calculation Accuracy 9 00000100 BridgeFinalZ 2 000 BridgeWidth 2 000 Calculate _ tip R X 79 930 808 aai Y 69 890 69 890 Close Path s Load Also v 13 37 06 CCncDK SetParameters Cnc
80. een 2 4 3 Automatic user defined Tool change ATC When you want to define you own tool change cycle you can edit the file macro cnc in the USBCNC directory When an M6 Tx is encountered this is translated to a GOSUB of subroutine change_tool in the macro cnc file This 08 March 2012 Release 4 00 11 45 USBCNC Manual suproutine then calls further subroutines drop_tool_x and pick_tool_x if you have a toolchanger you can add extra movements to the right tool position and control I O for actually changing the tool 2 4 4 Turning Operate Program Tools Variables 10 Setup Help ZOffset XOffset Diameter Orientation Description 0 0000 0 0000 0 0000 9 NOTOOL 1 0000 0 0000 0 0000 10 0000 0 0000 0 0000 T2 T3 10 0000 0 0000 0 0000 T4 10 0000 0 0000 0 0000 T5 10 0000 0 0000 6 0000 10 0000 0 0000 7 0000 T6 7 T8 T9 10 0000 0 0000 8 0000 10 0000 0 0000 9 0000 oo Noun AUNBO GM Code Time 0 60 100 10 0000 0 0000 10 0000 10 0000 0 0000 11 0000 0 0 0 G18 G40 G21 G90 G34 G54 G49 G99 G64 G96 G69 T1 Oo eee 10 0000 0 0000 12 0000 10 0000 0 0000 13 0000 10 0000 0 0000 14 0000 10 0000 0 0000 15 0000 7 This is file macro cnc It is automatically loaded 7 Customize this file yourself It contains subroutime change_tool this is called subroutime home_x home_z called subroutine home_all called wh
81. efine the upper surface of the material as Z 0 such that a negative Z value goes into the material 08 March 2012 Release 4 00 11 52 USBCNC Manual Just move to the zero point of the work piece and there press the zero buttons in the operate screen besides the position display For the advanced users The zeroing can also be done using a measuring probe connected to the probe input An example is provided in the standard macro cnc file Under user_1 you find automatic zeroing Under user_2 you find interactive tool length measurement If you want to do it a more advanced way look at G55 G59 3 and also at the G92 variants When homing and zeroing is performed the milling can start When the program is loaded go to the graphics screen Alt g and press update preview you will now see exactly where the part is going to be milled at the surface of you machine bed Now press the F4 key or the run button to start milling go to the graphic screen and switch real time graph on to see what the machine is doing That s all for this tutorial happy milling 08 March 2012 Release 4 00 11 53 USBCNC Manua 2 8 KEYBOARD SHORTCUTS Besides the already explained keys for jogging etc there are a few extra these are special for pendant builders Control shift A Handwheel on A Con
82. egardless of the setting of the optional stop switch program MO or M1 If a program is stopped by an MO M1 or M60 pressing the cycle start button will restart the program at the following line so the program will continue To end a program program M2 program M30 for next effects e Selected plane is set to CANON_PLANE_XY like G17 e Distance mode is set to MODE_ABSOLUTE like G90 e Feed rate mode is set to UNITS_PER_MINUTE like G94 08 March 2012 Release 4 00 11 93 USBCNC Manual Feed and speed overrides are set to ON like M48 Cutter compensation is turned off like G40 The spindle is stopped like M5 The current motion mode is set to G_1 like G1 Coolant is turned off like M9 Note that the coordinate system are no longer reset modified this behavior because have broken a lot of bits due to this so modified it No more lines of code in an RS274 NGC file will be executed after the M2 or M30 command is executed Pressing cycle start will start the program back at the beginning of the file 3 6 2 Spindle Control M3 M4 M5 To start the spindle turning clockwise at the currently programmed speed program M3 To start the spindle turning counterclockwise at the currently programmed speed program M4 To stop the spindle from turning program M5 It is OK to use M3 or M4 if the spindle speed is set to zero If this is done or if the speed override switch is enabled and set to zero the spindle
83. en hoi subroutime user_1 user_11 called user_1 contains an example of zeroin x user_2 cintains an example of measu 10 0000 0 0000 16 0000 0 0000 0 0000 0 0000 0 0000 0 0000 0 0000 0 0000 0 0000 0 0000 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 wes 0 0000 0 0000 0 0000 ee wes vs 7 You may also add frequently used mac peste eeSeSSSESESSESSSSSESSESESY Loading macro file User functions F1 F11 in user menu Loading done nrOfLines 466 i CPU at lt 172 22 2 100 gt used Zero tool tip example Sub user_1 msg user_1 Zero Z G92 using tool gt gt gt Welcome to USBCNC Press Reset F 1 to enable drives As you can see there are 2 additional parameters for turning X Offset and Orientation 08 March 2012 Release 4 00 11 46 USBCNC Manual 2 5 THE VARIABLE PAGE This page shows the standard variables used by the G Code interpreter It also contains 4 watches to show your own variables if you are going to use the extended programming features You will understand the meaning of this window after reading the G Code interpreter functions and extended programming with variables a USBCNC 4 00 RC 12 USBC 06 E 5 Operate Program Tools Variables 10 Setup Help _ Probe Trigger Position Tool Coordinate system offset 0 5067 1 G54 G10L2P1 X 5 E 5001 1 5008 act x 0 000 5221 5211 X 15 660
84. entry moves A 2 1 1 GENERAL METHOD The general method includes programming two pre entry moves and one entry move See Figure A 2 The shaded area is the remaining material It has no corners so the simple method cannot be used The dotted line is the programmed path The solid line is the actual path of the tool tip Both paths go clockwise around the remaining material A cutter one unit in diameter is shown part way around the path The black dots mark points at the beginning or end of programmed or actual moves The figure shows the second pre entry move but not the first since the beginning point of the first pre entry move could be anywhere 08 March 2012 Release 4 00 11 105 USBCNC Manual Figure A 2 Cutting radius compensation entry moves for material edge contour CU1 5 B 1 4 A 2 3 programmed path actual path First pick a point A on the contour where it is convenient to attach an entry arc Specify an arc outside the contour which begins at a point B and ends at A tangent to the contour and going in the same direction as it is planned to go around the contour The radius of the arc should be larger than half the diameter given in the tool table Then extend a line tangent to the arc from B to some point C located so that the line BC is more than one tool radius long After the construction is finished the code is written in the reverse order from the construction The NC code is shown in
85. 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 08 March 2012 Release 4 00 11 75 USBCNC Manual 3 5 10 Straight Probe G38 2 3 5 10 1 THE STRAIGHT PROBE COMMAND Program G38 2 X Y Z A to perform a straight probe operation The rotational axis words are allowed but it is better to omit them If rotational axis words are used the numbers must be the same as the current position numbers so that the rotational axes do not move The linear axis words are optional except that at least one of them must be used The tool in the spindle must be a probe It is an error if e the current point is less than 0 254 millimeter or 0 01 inch from the pro grammed point e G38 2 is used in inverse time feed rate mode e any rotational axis is commanded to move e noX Y or Z axis word is used In response to this command the machine moves the controlled point which should be at the end of the probe tip in a straight line at the current feed rate toward the programmed point If the probe trips the probe is retracted slightly from the trip point at the end of command execution If the probe does not trip even after overshooting the programmed point slightly an error is signaled After successful probing parameters 5061 to 5066 will be set to the program coordinates of the location of the c
86. eter GUI Graphical User Interface PWM Pulse Width Modulation G Code CNC specific language to control the movements and IO of a milling machine LAF Look Ahead Feed advanced motion algorithm that ensures minimal machining time 1 3 MINIMUM PC REQUIREMENTS 1 4 GHz Atom Pentium duo core recommended for Ethernet 1024 MB RAM for XP 4G for Windows 7 Windows XP or Windows 7 32 or 64 bit Minimum Screen resolution 1024 x 768 Graphic card with Open GL support is preferred USB 2 connection Ethernet connection for Ethernet CPU s Intel 100Mbit Ethernet card for Ethernet CPU s Windows XP and Windows 7 is proven to work fine with USBCNC Windows Vista is not USBCNC requires soft real time behavior of your PC Sometimes a bad driver of your video card sound etc may be the cause of problems with USBCNC USBCNC requires a USB communication speed of about 150 times second to and from the USBCNC CPU There are PC s with bad USB chipset on which cannot handle this One of such PC s is the ACER notebook time line series From the better brand notebooks like Dell HP Sony Toshiba have not Manual yet heard problems When you encounter this you may be able to solve it by adding a PCI USB card 08 March 2012 Release 4 00 11 USBCNC Manual 1 4 INSTALLATION OF USBCNC Download the installation executable from the website download page Click on it to install the software Follow the screens On Windows 7 c
87. f 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 sample program g76 ngc shows the use of the G76 canned cycle and can be previewed and executed on any machine using the sim lathe ini configuration Q Final Pa i j i Se Fir Pa x H k l D rive ne _ lt F baw Figure G76 canned cycle 08 March 2012 Release 4 00 11 86 USBCNC Manual This is how it works 1 Before the start the spindle rate is measured 2 The feed for de z axis is calculated F pitch spindleRate 3 The CPU programmed such that a movement is started on the spindle pulse 4 The movement is calculated and send to the CPU 5 The movement is started when the spindle pulse passes 6 Before the treading starts the spindle rate is measured averaged and the feed is calculated from this Not that the inside and outside thread diameter are determined by the start position the position before G76 and the I K parameters 3 5 19 Cancel Modal Motion G80 Program G80 to ensure no axis motion will occur It is an error if e Axis words are programmed when G80 is active unless a modal group 0 G code is programmed which uses axis words 3 5 20 C
88. f checked the zero buttons beside the position display will simply set the work position to zero If this item is not checked a dialog will be shown in which you can set the position Default it shows a value which is tool radius of the current tool This is handy when zeroing from the lower left corner with the endmill against the material If checked the running job will not stop when a toolchange is encountered Use this when you have a ATC or if you simply always have the tool already in 08 March 2012 Release 4 00 11 22 USBCNC Manual ShutDownOrFatal If checked software will shutdown automatically when a fatal error such as disconnected CPU occurs This may be used when the electrical power is switched of and connection to the CPU gets lost Favorite Editor Specify your favorite editor here recommend notepad it is freely downloadable at internet E g for notepad specify c program files notepad notepad exe The advantage of notepad is that the editor jumps to the actual G Code line immediately very handy when programming G Code IconDirectory The name of the directory where the GUI icons are located nu means not used If you want to change the Icons on the buttons you can make first a copy of the entire icons and name that directory to mylcons Make your changes an place the directory name in this field OpenGL Check to use OpenGL graphics This allows smooth panning zooming and rotation us
89. g 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 speed will be different from what is programmed It is OK to program S0 the spindle will not turn if that is done The CPU s that support PWM output will have its PWM value set conform the requested spindle speed if the spindle is turned on It is an error if e the S number is negative As described in Section 3 5 16 5 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 3 7 3 Select Tool T To select a tool program T where the T number is the carousel slot for the tool The tool is not changed until an M6 is programmed see Section 3 6 3 The T word may appear on the same line as the M6 or on a previous line It is OK but not normally useful if T words appear on two or more lines with no tool change The carousel may move a lot but only the most recent T word will take effect at the next tool change It is OK to program TO no tool will be selected This is useful if you want the spindle to be empty after a tool change It is an error if e anegative T number is used e aT number larger than the number of slots in the carousel is used On
90. group 8 G43 G49 tool length offset group 10 G98 G99 return mode in canned cycles group 12 G54 G55 G56 G57 G58 G59 G59 1 G59 2 G59 3 coordinate system selection group 13 G61 G61 1 G64 path control mode group 14 G68 G69 XY plane rotation 08 March 2012 Release 4 00 11 68 USBCNC Manual The modal groups for M codes are group 4 MO M1 M2 M30 M60 stopping group 5 54 M55 M56 M64 M65 M66 AUX and general purpose I O group 6 M6 tool change group 7 M3 M4 M5 spindle turning group 8 M7 M8 M9 coolant special case M7 and M8 may be active at the same time group 9 M48 M49 enable disable feed and speed override switches In addition to the above modal groups there is a group for non modal G codes group 0 G4 G10 G28 G30 G53 G92 G92 1 G92 2 G92 3 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 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 im
91. he variable window set G28 home positions to the same value as the home positions in the set up window Now you have to type only g28 to go to the home position 2 7 2 Automatic homing the machine and HomelsEstop The machine needs a homing sensor or switch for each axis connected the its home input on the CPU board The homing switch is placed at a small distance of the mechanical end of the machine This distance is needed to ramp down the velocity after the switch is activated The sensor should be mounted such that it remains active until the mechanical limit of the machine For automatic homing the home velocity needs to be set to another value than zero use an equal or lower speed than the axis maximum speed The axis should start to move in the direction where your homing switch is mounted when it is needed to reverse the direction add a minus sign to the homing velocity Setup the HomelnputSenseLevel correctly When the led s are green when the input is not activated put a 1 here when the led s are red when the switch is not activated put a 0 This depends whether you have used normally open or normally closed switch recommend normally closed switches here Use the homing sub menu to home your axes 1 Move The machine first moves until the switch activates then ramps down and stops 24 Move Then the direction reverses and ramps down when the switch releases At the moment of the release of the switch the position is c
92. his is a generic message used for many sets of G codes As applied to cutter radius compensation it means that more than one of G40 G41 and G42 appears on a line of NC code This is not allowed A 5 First Move into Cutter Compensation The algorithm used for the first move after cutter radius compensation is turned on when the first move is a straight line is to draw a straight line from the programmed destination point which is tangent to a circle whose center is at the current point and whose radius is the radius of the tool The destination point of the tool tip is then found as the center of a circle of the same radius tangent to the tangent line at the destination point If the programmed point is inside the initial cross section of the tool the circle on the left an error is signaled as described in Section A 5 3 The concept of the algorithm is shown in Figure A 6 08 March 2012 Release 4 00 11 110 USBCNC Manual The function that locates the destination point actually takes a computational shortcut based on the fact that the line not drawn on the figure from the current point to the programmed point is the hypotenuse of a right triangle having the destination point at the corner with the right angle Figure A 6 First cutter radius compensation move Straight current pant destination gant of ool be pel of toad lip Seon const tris ine te detenmine the destination port progamme point First c
93. i 9 subroutime user_1 user_11 called 10 user_1 contains an example of zeroin lt gt Save Changes 11 user_2 cintains an example of measu 12 Fag 13 You may also add frequently used mac 14 seteSESeSASSAESSSSESAESSESSSE SS 15 16 20 32 56 Info Loading macro file 17 User functions F1 F11 in user menu 20 32 56 Info Loading done nrOflines 466 18 3 20 32 55 Info CPU at lt 172 22 2 100 gt used 19 _ Zero tool tip example 20 32 56 Info Welcome to USBCNC Press Reset F 1 to enable drives 20 Sub user_1 21 msg user_1 Zero Z G92 using tool p lt lt lt 466 gt gt gt In this view you can define 99 tools with a length diameter and description For Lathe operation there is additional and X Offset and tool Orientation parameter The tool information is used when you use the tool radius and or tool length compensation functions of the G Code interpreter commands G40 G43 See chapter 3 6 and further 2 4 2 Tool change A tool change is performed in G Code by M6 Tx where Tx is the new tool number Tool number 0 means no tool Normally the program is stopped on a tool change with a user message to change the tool pressing run again will continue the program If you don t want the program to stop check AutoToolChange in the automatic menu bar This setting is saved when you press save INI file in the setup scr
94. ill be used It is an error if e the D number is not an integer is negative or is larger than the number of carousel slots e the XY plane is not active or for turning the ZX plane is not active e cutter radius compensation is commanded to turn on when it is already on The behavior of the machining center when cutter radius compensation is on is described in Appendix A With G41 1 D is the same as G41 D except now the D number is not a tool number but a tool diameter With G42 1 D is the same as G42 D except now the D number is not a tool number but a tool diameter 08 March 2012 Release 4 00 11 78 USBCNC Manual 3 5 11 1 EXAMPLE CODE FOR MILLING This example mills out a rectangular object from the outside and inside On the outside we use G42 tool radius compensation right and for the inside G41 tool radius compensation left is used For both contours a tool radius compensation entry move is programmed consisting of a line which must be longer than the tool radius used and a circle of which also the radius is bigger than the tool By the way all arc radii should be bigger than the tool radius If you have inside corners there should be always an arc so that the tool fits g0 z3 The G42 G41 and G40 codes are g0 x 15 y15 programmed with a block delete sign in f500 front This makes it easy to debug tool comp g42 1 D6 programs The program is loaded with block g1 x 5 cutter
95. inate systems those designated by G54 G59 3 Thus all nine coordinate systems are affected by G92 Being in incremental distance mode has no effect on the action of G92 Non zero offsets may already be in effect when the G92 is called If this is the case the new value of each offset is A B where A is what the offset would be if the old offset were zero and B is the old offset For example after the previous example the X value of the current point is 7 If G92 x9 is then programmed the new X axis offset is 5 which is calculated by 7 9 3 To reset axis offsets to zero program G92 1 or G92 2 G92 1 sets parameters 5211 to 5216 to zero whereas G92 2 leaves their current values alone To set the axis offset values to the values given in parameters 5211 to 5216 program G92 3 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 5216 Do not use G92 1 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 If other programs are to run between the program that sets the offsets and the one that restores them make a copy of the parameter file written by the first program and use it as the parameter file for the second program 3 5 23 Set Fe
96. indle Add the tool change code at the beginning if needed Table 3 5 Code to Probe Hole N010 probe to find center and diameter of circular hole NO020 This program will not run as given here You have to NO30 insert numbers in place of lt description of number gt N040 Delete lines NO20 NO30 and N040 when you do that N050 GO Z lt Z value of retracted position gt F lt feed rate gt NO060 1001 lt nominal X value of hole center gt N070 1002 lt nominal Y value of hole center gt N080 1003 lt some Z value inside the hole gt NO090 1004 lt probe tip radius gt N100 1005 lt nominal hole diameter gt 2 0 1004 N110 GO X 1001 Y 1002 move above nominal hole center N120 GO Z 1003 move into hole to be cautious substitute G1 for GO here N130 G38 2 X 1001 1005 probe X side of hole N140 1011 5061 save results N150 GO X 1001 Y 1002 back to center of hole N160 G38 2 X 1001 1005 probe X side of hole N170 1021 1011 5061 2 0 find pretty good X value of hole center N180 GO X 1021 Y 1002 back to center of hole N190 G38 2 Y 1002 1005 probe Y side of hole N200 1012 5062 save results N210 GO X 1021 Y 1002 back to center of hole N220 G38 2 Y 1002 1005 probe Y side of hole N230 1022 1012 5062 2 0 find very good Y value of hole center N240 1014 1012 5062 2 1004 find hole diameter in Y direction N250 GO X 1021 Y 1022 back to
97. ing modified by unauthorized persons by using a password Leave empty if no password is desired Machine setup is in inch mode Machine setup is in mm mode 2 1 2 Motor setup Visible Mode Steps AppUnit Positive limit Negative limit Vel Acc Check if the axis should be visible in the GUI Select mode for rotation axes slave or special function ROT default axis behaves as a normal rotation axis SLAVE X SLAVE Y or SLAVE Z axis is slave of X or Y or Z axes for Gantry machines with two independent Tandem motors on the main axes See also the Homing chapter for details on Slave axes FOAM CUT for A Axis if used as a Foam cutter with 4 linear axes X is the left horizontal axis Y is the left vertical axis A is the right horizontal axis and Z is the right vertical axis Feed calculation are based on the X Y or A Z combination which ever makes the biggest distance 4 MILL if used in 4 axes milling Feed calculations are optimized such that the tooltip gets the correct speed relative to the material Tangential Knife this option is available for the C Axis only The Knife will rotate in the movement direction of X Y See also trajectory setup 7 Kod 2 Fill in number of steps per millimeter for millimeter mode or number of steps per inch for inch mode Fill in a negative number to reverse the motor direction Example Suppose your driver is set to 1600 steps revolution 1 8 micro step and y
98. ing the mouse Left mouse key Pan Right mouse key Zoom Control Left mouse key Rotate openGLPenZise Set PEN size shown in graphic size is in milimeter 2 1 12 Load Run Automatically watchFileChanged If checked USBCNC will watch the loaded g code file for changes on disk if USBCNC is not running When it is changed e g by an editor or because it is saved by a CAM software then USBCNC will ask you to reload the file load automatically If this is checked the file is automatically loaded when it changes on disk no dialog will appear run automatically If this is checked and also the load automatically check then the file will be loaded and immediately start running when changed on disk fileName This is the name of the file that USBCNC watches at startup So if USBCNC is started and this file time date changes on disk it will be loaded If manually another g code file is loaded then USNCNC will watch that one 2 1 13 10O setup Invert IO Check if you want to invert the output e g the PICSTEP 4 card amp is enabled when the signal is low Goto the main operate window and press reset the amplifiers should be enabled Try to jog by pressing the arrow key s If there is 08 March 2012 Release 4 00 11 23 USBCNC Manual no movement go back to the setup screen and check the Amp Enable inversion Press save go back to Operate press reset and try again to move If still not moving check your hardware 2 1 14
99. ircles or are semicircles or nearly semicircles because a small change in the location of the end 08 March 2012 Release 4 00 11 72 USBCNC Manual 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 Nearly full circles are outrageously bad semicircles and nearly so are only very bad Other size arcs in the range tiny to 165 degrees or 195 to 345 degrees are OK Here is an example of a radius format command to mill an arc G17 G2 x 10 y 15r 2025 That means to make 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 3 5 3 2 CENTER FORMAT ARC In the center format the coordinates of the end point of the arc in the selected plane are specified along with the offsets of the center of the arc from the current location In this format it is OK if the end point of the arc is the same as the current point It is an error if 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 0 0002 inch if inches are being used
100. it is not already at the R position If the XZ or YZ plane is active the preliminary and in between motions are analogous 08 March 2012 Release 4 00 11 88 USBCNC Manual 3 5 20 2 G81 CYCLE The G81 cycle is intended for drilling Program G81 X Y Z A R L 1 Preliminary motion as described above 2 Move the Z axis only at the current feed rate to the Z position 3 Retract the Z axis at traverse rate to clear Z Example Suppose the current position is 1 2 and 3 and the XY plane has been selected and the following line of NC code is interpreted G90 G81 G98 X4 Y5 21 5 R2 8 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 number and X position are 4 The Y number and Y position are 5 The Z number and Z position are 1 5 The R number and clear Z are 2 8 Old Z is 3 The following moves take place 1 a traverse parallel to the XY plane to 4 5 3 2 a traverse parallel to the Z axis to 4 5 2 8 3 a feed parallel to the Z axis to 4 5 1 5 4 a traverse parallel to the Z axis to 4 5 3 Example Suppose the current position is 1 2 and 3 and the XY plane has been selected and the following line of NC code is interpreted G91 G81 G98 X4 Y5 Z 0 6 R1 8 L3 This calls for incremental distance mode G91 and OLD_Z retract mode G98 and calls for the G81 drilling cycle to be repeated three times The X number is 4
101. le after a tool change The tool change command will call the change_tool subroutine inside macro cnc You can adapt the behavior for your own needs in this function e g e Perform automatic tool length measurement e Perform tool change with an automatic tool changer For a non functional example of how to implement automatic tool change for a 16 tool changer see the contents of the default_macro cnc file at the end of this document It checks whether current tool is already in the spindle It check that the tool number is in range of 1 4 Then it first drops current tool and picks the new tool 3 6 4 Coolant Control M7 M8 M9 To turn mist coolant on program M7 To turn flood coolant on program M8 To turn all coolant off program M9 It is always OK to use any of these commands regardless of what coolant is on or off 08 March 2012 Release 4 00 11 94 USBCNC Manual 3 6 5 Override Control M48 and M49 To enable the speed and feed override switches program M48 To disable both switches program M49 See Section 2 2 1 for more details It is OK to enable or disable the switches when they are already enabled or disabled 3 6 6 IO M Functions 3 6 7 Standard CNC IO M3 M9 M80 M87 To control the outputs these functions have been added besides the standard M Functions Standard according to NIST M3 PWM according S value TOOLDIR on M4 PWM according S value TOOLDIR off M5 PWM off TOOLDIR off M7 Mist o
102. le in a specific orientation Move the Z axis only at traverse rate downward to the Z position Move at traverse rate parallel to the XY plane to the X Y location Start the spindle in the direction it was going before Move the Z axis only at the given feed rate upward to the position indicated by K Move the Z axis only at the given feed rate back down to the Z position Stop the spindle in the same orientation as before 10 Move at traverse rate parallel to the XY plane to the point indicated by and J 11 Move the Z axis only at traverse rate to the clear Z 12 Move at traverse rate parallel to the XY plane to the specified X Y location O O IO GIBE TO E 08 March 2012 Release 4 00 11 90 USBCNC Manual 13 Restart the spindle in the direction it was going before When programming this cycle the and J numbers must be chosen so that when the tool is stopped in an oriented position it will fit through the hole Because different cutters are made differently it may take some analysis and or experimentation to determine appropriate values for and J Figure 3 G87 Cycle toot aE IE ule 3 hole 5 A tool courterbore E m 6 b 7 8 9 10 The cight subfieures are tadelied with the steps froen the description above 3 5 20 8 G88 CYCLE The G88 cycle is intended for boring This cycle uses a P word where P specifies the number of seconds to dwell Program G88 X Y Z A R L P Prelimin
103. lick with the right mouse button start as administrator For setup of the hardware check the hardware technical flyers for your CPU type They are on the download page of the website 1 4 1 USB During installation be sure to check Install USB drivers G Setup USBCNC4Bet Completing the USBCNC4Beta Setup Wizard Setup has finished installing USBCNC4Beta on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup 7 Install USB drivers View the ReleaseNotes txt file After installation reboot the PC when it is rebooted connect the CPU after 10 60 seconds you will see that windows has found an USBCNC COM port if you are using and USB based CPU board You can check that the USB driver is correctly installed in windows device manager press Windows start button gt my computer click with right mouse button and select properties Select Device Manager 08 March 2012 Release 4 00 11 10 USBCNC Manual Files Action Help m B mlt 2 Ga USBCNC PC gt 9 Computer gt Disk drives MM Display adapters gt 3 DVD CD ROM drives gt 3 Human Interface Devices gt 4g IDE ATA ATAPI controllers gt IEEE 1394 Bus host controllers gt 23 Imaging devices gt aD Keyboards gt A Mice and other pointing devices b ME Monitors gt P Network adapters b Portable Devices 4 IF Ports COM amp LPT gt 0 Processors gt
104. lity One must understand that it is physically impossible to move around sharp corners without a standstill at the corner This isn t possible with a car and also not with a CNC machine since that would require infinite acceleration The user can make a choice here absolute accuracy with standstill at 08 March 2012 Release 4 00 11 81 USBCNC Manual every corner G61 or no standstill and corner round off with specified accuracy G64Px x G61 puts the machining center into exact path mode In G61 the motion velocity between motion segments goes to zero the end position in corners is exactly reached use this if you require maximum accuracy When a work piece consists of many small lines this gives a quite vibrating machine because of the continuous acceleration deceleration stop behavior G64 Px x for continuous mode In G64 subsequent moves are blended when previous move starts to decelerate and reaches a velocity such that the specified accuracy isn t violated the next move starts to accelerate the two motions are added The result is smooth motion with highest possible speed to achieve required accuracy The corners however are rounded specifies the distance reached to the corner while blending The next move is blended with current such that the tool path remains no more than P from the corner The figure below is a rectangle of 10x10 milled with F 2000 This is done with P values from 0 1 to 1 you can see the impact Thi
105. melnputSenselevel 1 apup 125000 000 v z 0 000 0 000 5 EStopInputSenseLevell 0 Proportional Ramp Up Time _ ZDown Tool Length 9 000 enableZCollisionGuard F EStopinputSenseLevel2 2 Nri E MSensor Trivial Kinematics 7 Tangential Knife Safety Input ExtErrInputSenseLevel 2 NAT tanknife ange 3 0 SAFETY INPUT OFF MetisspndieDaection I Kinematics Setup i tanknife Zup dist 5 900 SafeFeed 1 0 gurto detect polarity l 20 32 56 Info Loading macro file 20 32 56 20 32 55 20 32 56 Info Loading done nrOfLines 466 Info CPU at lt 172 22 2 100 gt used Info Welcome to USBCNC Press Reset F 1 to enable drives m a 2 1 11 Ul setup items Invert JogKeys IsTurningMachine Inverts the movement of the keyboard keys for moving bed machines the bed moves in the direction you press the arrow ShowStartupScreen HomingMandatory SimpleZeroing AutoToolChange Check if your machine is a Lathe this effects mainly the 3D display which shows the X Z plane for turning Also the jog keys operate differently Futher the working plane is set to G18 X Z When checked the startup screen is shown when USBCNC starts When checked running a job and mdi is not allowed before the machine is homed Also the jog speed is limited to 5 speed This feature prevents damage to your machine because when the machine isn t homed the limit guards are not working So advise to leave this item checked always I
106. n M8 Flood on M9 Mist Flood off Additional to support the features of the USBCNC CPU s M80 drive enable on M81 drive enable off M82 M61 Aux1 on M83 M62 Aux1 off M84 TOOLDIR on M85 TOOLDIR off M86 PWM according S value s s max from setup 100 M87 PWM off 3 6 8 General purpose IO of CPU5B M54 M55 and M56 M54 Px Set output x M54 Ex Qy Set PWM output x to value y 0 lt y lt 100 M55 Px Clear output x M56 Px Read input x M56 Px Ly Qx xx Read digital input and specify wait mode Px x is input number LO do not wait L1 L3 Wait mode High L2 L4 Wait mode Low Qx x is timeout M56 Ex Ly Qx xx Read analogue input and specify wait mode Ex x is input number LO do not wait L1 L3 Wait mode High 08 March 2012 Release 4 00 11 95 USBCNC Manual L2 L4 Wait mode Low Qx x is timeout For all M56 variants the input value is stored into 5399 For the general purpose I O of CPU5 use M54 M55 M56 in stead of M64 M65 M66 3 7 OTHER INPUT CODES 3 7 1 Set Feed Rate F To set the feed rate program F The application of the feed rate is as described in Section 2 1 2 5 unless inverse time feed rate mode is in effect in which case the feed rate is as described in Section 3 5 19 3 7 2 Set Spindle Speed S To set the speed in revolutions per minute rpm of the spindle program S The spindle will turn at that speed when it has been programmed to start turnin
107. n milli seconds Minimum ms Maximum ms Average Gms C Users Bert gt 08 March 2012 Release 4 00 11 14 USBCNC Manual When connection Failed you will see G dministrator Co Promp CG Wsers NBert gt ping 172 22 2 100 Pinging 172 22 2 100 with 32 bytes of data Request timed out Request timed out iRequest timed out Request timed out Ping statistics for 172 22 2 10 Packets Sent 4 Received Lost 4 168 loss C Users Bert gt _ If you have this check you cable and your network settings again Also check that the yellow led on the CPU is flashing at approximately 1Hz 1 4 3 Set admin mode After the install you will have the program ICON on your desktop Do not start it yet read further The first This can be done by right clicking the mouse on the USBCNC Icon and then select run as Administrator on Windows 7 The second must be done in the user account settings On XP this is generally not needed because most of the time you are already Administrator The Admin rights are needed because USBCNC needs real time priority To avoid having to do this every time you can change the properties of the ICON by right clicking on the ICON and set the check Run this program as Administrator DT W USBCNCV3 Properti Securty Details Previous Versions General Shortcut Compatibility f you have problems with this program and it worked correctly on an earlie
108. ne If a line of RS274 NGC code makes an arc and includes rotational axis motion the rotational axes turn at a constant rate so that the rotational motion starts and finishes when the XYZ motion starts and finishes Lines of this sort are hardly ever programmed If cutter radius compensation is active the motion will differ from what is described here See Appendix A Two formats are allowed for specifying an arc We will call these the center format and the radius format In both formats the G2 or G3 is optional if it is the current motion mode 3 5 3 1 RADIUS FORMAT ARC 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 X Y Z A R or use G3 instead of G2 R is the radius The axis words are all optional except that at least 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 180 degrees or less while a negative radius indicates a turn of 180 degrees to 359 999 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 It is not good practice to program radius format arcs that are nearly full c
109. nue straight in the direction it was going along the first side until it reaches a point where it changes direction to go straight along the second side Figure A 1 shows these two types of path On Figure A 1 e Uncut material is shaded in the figures Note that the inner triangles have the same shape with both tool paths e The white areas are the areas cleared by the tool e The lines in the center of the white areas represent the path of the tip of a cutting tool e The tool is the cross hatched circles Both paths will clear away material near the shaded triangle and leave the shaded triangle uncut When the Interpreter performs cutter radius compensation the tool path is rounded at the corners as shown on the left in Figure A 1 In the method on the right the one not used the tool does not stay in contact with the shaded triangle at sharp corners and more material than necessary is removed There are also two alternatives for the path that is programmed in NC code during cutter radius compensation The programmed path may be either 1 the edge of the material to remain uncut for example the edge of the inner triangle on the left of Figure A 1 or 2 the nominal tool path for example the tool path on the left side of Figure A 1 The nominal tool path is the path that would be used if the tool were exactly the intended size The Interpreter will handle both cases without being told which one it is The two cases are very similar b
110. o clear Z Restart the spindle in the direction it was going The spindle must be turning before this cycle is used It is an error if the spindle is not turning before this cycle is executed 3 5 20 7 G87 CYCLE The G87 cycle is intended for back boring Program G87 X Y Z A R L be J K The situation as shown in Figure 3 1 is that you have a through hole and you want to counter bore the bottom of hole To do this you put an L shaped tool in the spindle with a cutting surface on the UPPER side of its base You stick it carefully through the hole when it is not spinning and is oriented so it fits through the hole then you move it so the stem of the L is on the axis of the hole start the spindle and feed the tool upward to make the counter bore Then you stop the tool get it out of the hole and restart it This cycle uses and J numbers to indicate the position for inserting and removing the tool and J will always be increments from the X position and the Y position regardless of the distance mode setting This cycle also uses a K number to specify the position along the Z axis of the controlled point top of the counter bore The K number is a Z value in the current coordinate system in absolute distance mode and an increment from the Z position in incremental distance mode Preliminary motion as described above Move at traverse rate parallel to the XY plane to the point indicated by I and J Stop the spind
111. off at the beginning and TCA Guard on at the end 08 March 2012 Release 4 00 11 101 USBCNC References Albus Allen Bradley Manual Albus James S et al NIST Support to the Next Generation Controller Program 1991 Final Technical Report NISTIR 4888 National Institute of Standards and Technology Gaithersburg MD July 1992 Allen Bradley RS274 NGC for the Low End Controller First Draft Allen Bradley August 1992 EIA Electronic Industries Association EIA Standard ElIA 274 D Interchangeable Variable Block Data Format for Positioning Contouring and Contouring Positioning Numerically Controlled Machines Electronic Industries Association Washington DC February 1979 Fanuc Fanuc Ltd Fanuc System 9 Model A Operators Manual Pub B 52364E 03 Fanuc Ltd 1981 Kramer1 Kramer Thomas R Proctor Frederick M Michaloski John L The NIST RS274 NGC Interpreter Version 1 NISTIR 5416 National Institute of Standards and Technology Gaithersburg MD April 1994 Kramer2 Kramer Thomas R Proctor Frederick M The NIST RS274KT Interpreter NISTIR 5738 National Institute of Standards and Technology Gaithersburg MD October 1995 Kramer3 Kramer Thomas R Proctor Frederick M The NIST RS274 NGC Interpreter Version 2 NISTIR 5739 National Institute of Standards and Technology Gaithersburg MD October 1995 Kramer4 Kramer Thomas R Proctor Frederick M The NIST RS274 VGER Interpreter NISTIR 5754
112. ome sensors work as EStop when activated This option will work after homing is complete The reason is that otherwise homing itself will generate an E Stop EStopInputSenseLevel use this if you have an external emergency button connected HomelnputSenseLevel Defines EStop input behavior 0 low active normally open switch 1 high active normally closed switch set the level of your end of stroke switches these are used for homing the machine First check that the home sensors or switches are working activate them and look at the home LED s at the lower left side of the main Operate screen If you see it working take care that the machine axes are at the working area so that none of the sensors are activated Look at GUI LEDs Home x Home y Home z Home a 08 March 2012 Release 4 00 11 18 USBCNC Manual EStopInputSenseLevel1 Defines EStop input behavior 0 low active normally open switch 1 high active normally closed switch 2 OFF EStopInputSenseLevel2 Defines EStop input behavior for second EStop input CPU5B only 0 low active normally open switch 1 high active normally closed switch 2 OFF ExtErrinputSenseLevel CPU5B ONLY Defines External Error input behavior CPU5B only 0 low active e stop normally open switch 1 high active e stop normally closed switch 2 OFF 3 low active smoothstop 4 high active smoothstop With smoothstop the axes speed is
113. on 08 March 2012 Release 4 00 11 111 USBCNC Manual A 6 HARDWARE INSTALLATION TIPS Building a reliable CNC system is not just making the right connections EMC plays an important role here We have several components that generate a lot of EMC noise the drivers the power supplies if they are switched mode supplies the VFD if we have a HF spindle The CPU and the communication to the PC especially USB is very sensitive for EMC and may stop functioning when we make spaghetti wiring and no good functional Earth So the routing of the cabling must be done in a right way Very important is making a good EMC functional Earth using a star point GND To prevent this miss function due to EMC the USBCNC CPU should be build in correctly according these general EMC rules e Mount all electronics in a metal cabinet or on a metal plate in a plastic cabinet e Use a mains filter e Create a central GND point near the filter and connect the PE Protective Earth as well as the GND from all power supplies to this point e Route motor cables nicely along the cabinet edge as far as possible away from the CPU This way the cables noise radiation can flow away to the cabinet e Use shielded cables for the motor connections both inside the cabinet and outside the cabinet Connect the shield at one side to the central ground point leave the other side un connected e Use a professional USB2 cable double shielded with ferrites like this
114. on The Axis button show the position according to the interpreter on the searched line green is match red is no match press the button to move the axis to the correct position you can do this for all axes If any axis isn t synchronized it will be done automatically when the start button is pressed r r S The M8 M7 On buttons allow to switch on the Coolants The S button switches the spindle On with correct S value from the Search status F F Plunge rate is the feed rate for the movement towards the work piece you can change this to r a good value you want As last the Run button this will start a G1 with F towards the search positions then restore the Feed to the search feed and start machining from there This way you are able to easily start half way in a g code program 08 March 2012 Release 4 00 11 31 USBCNC Manual F11 Nesting Nesting is a feature that allows to produce a product multiple times in X Y ROWS Nesting is reachable if the machine is in READY state you can always press RESET to get it in ready state if it isn t USBCNC V4 00 B 1 SIMULATION _ Q data work trunk sw bin_release cnc jobs demo cnc Operate Program Tools Variables 10 Setup Help _ Material Size Machine Work x 197 000 Y 300 000 Z 0 000 FS GMT TIME G1 G17 G40 G21 G90 G94 G54 G49 G99 G64P0 1 G96 M5 M9 TO READY x 500 0 y 40 0 Sa Start Offset oO cE G1 G17
115. on a line will be very rare 3 3 6 Item order The 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 08 March 2012 Release 4 00 11 67 USBCNC Manual line 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 g1 3 15 g40 foo for the five items 3 3 7 Commands and Machine Modes In RS274 NGC many commands cause a machining center to change from one mod
116. onstruct this line If the first move after cutter radius compensation has been turned on is an arc the arc which is generated is derived from an auxiliary arc which has its center at the programmed center point passes through the programmed end point and is tangent to the cutter at its current location If the auxiliary arc cannot be constructed an error is signaled The generated arc moves the tool so that it stays tangent to the auxiliary arc throughout the move This is shown in Figure A 7 Figure A 7 First cutter radius compensation move Arc programmed computed center point destination point of tool tip programmed end point current point Second construct this arc which is the path taken ae construct this auxiliary arc Figure A 7 shows the conceptual approach for finding the arc The actual computations differ between the center format arc and the radius format arc see Section 3 5 3 After the entry moves of cutter radius compensation the Interpreter keeps the tool tangent to the programmed path on the appropriate side If a convex corner is on the path an arc is inserted to go around the corner The radius of the arc is half the diameter given in the tool table When cutter radius compensation is turned off no special exit move takes place The next move is what it would have been if cutter radius compensation had never been turned on and the previous move had placed the tool at its current positi
117. ontrolled point at the time the probe tripped The variables 5051 to 5056 will contain the machine coordinates Useful for measuring tools in absolute machine positions G53 G38 2 will move in machine coordinates 3 5 10 2 USING THE STRAIGHT PROBE COMMAND Using the straight probe command if the probe shank is kept nominally parallel to the Z axis i e any rotational axes are at zero and the tool length offset for the probe is used so that the controlled point is at the end of the tip of the probe e without additional knowledge about the probe the parallelism of a face of a part to the XY plane may for example be found e if the probe tip radius is known approximately the parallelism of a face of a part to the YZ or XZ plane may for example be found e if the shank of the probe is known to be well aligned with the Z axis and the probe tip radius is known approximately the center of a circular hole may for example be found e if the shank of the probe is known to be well aligned with the Z axis and the probe tip radius is known precisely more uses may be made of the straight probe command such as finding the diameter of a circular hole If the straightness of the probe shank cannot be adjusted to high accuracy it is desirable to know the effective radii of the probe tip in at least the X X Y and Y directions These quantities can be stored in parameters either by being included in the parameter file or by being set in an RS
118. ool setter and put it on top of the workpiece Start this function and when done the Z coordinate is set to 0 at the surface of the workpiece The feed is set slow F30 A probe move G38 2 is started towards Z when the tool setter is touched the position is stored and the movement is stopped The machine moves exactly to the touch point G92 is used with a Z value that specifies the height of you tool setter 43 mm in this case Change to match your tool setter An incremental movement is started 5 mm upwards so you can remove the tool setter The machine goes back to absolute mode and is done OOO 08 March 2012 Release 4 00 11 55 USBCNC 2 10 TOOL MEASUREMENT MACRO Under user menu button 2 you ll see this Tool length measurement example Sub user 2 goSub m_tool See sub m_tool Endsub The user 2 button calls subroutine m_tool This subroutine needs a few values that are stored 4996 Z coordinate at tool change safe height 4997 X coordinate for tool change 4998 Y coordinate for tool change 4999 Z coordinate at tool length equals zero or calibration tool height Tool 16 is used as reference tool and should have filled in its tool length before you start This tool length can be 0 if you use the tool chuck itself instead of a calibration tool The values 4996 4999 are to be determined once This can be done using the calibrate_tool_setter function below Make sure the machine is homed before you start this
119. ops immediately when the rotation of the hand wheel stops The position of the hand wheel will not be maintained if velocity mode is on The position of the handheld is maintained if velocity mode is off This also means that the axis may not immediately stop if the hand wheel rotation stops When turning beyond the limits of the axis you have to turn back the hand wheel the same amount before the axis starts moving again My own experience is that it works best to use velocity mode at X100 only Jus play with it to experience the behavior and make your own choice When checked hand wheel is used to control the FeedOverride The feed override can be controlled from 0 Stop to 300 The maximum velocity and acceleration specified for the motors will not be violated 2 1 18 Probing Setup StoreProbePoints Use Home input 4 The touch points are stored in a file when this is checked This is used for digitizing If checked home input 4 is used instead of the standard probe input File The file name for storing the touch points The file is opened at the first probe touch en closed when a M30 command is encountered usually at the end of the G Code program Camera Select Camera if used 08 March 2012 Release 4 00 11 25 USBCNC Manual 2 1 19 CPUOPT This is special for CPU5A This button allows to add the 4th axis function on a CPU5AS3 So it upgrades from 5A3 to 5A4 Option Dialog _ N lt lt
120. or change coordinate system data G10 or set axis offsets G92 G92 1 G92 2 G94 perform motion GO to G3 G80 to G89 as modified possibly by G53 _ stop M0 M1 M2 M30 M60 4 Language extensions To provide additional flexibility created some extensions in the language that allow for programming 4 1 FLOW CONTROL You can use the following flow control commands in a job IF x ELSE ENDIF constructs to define x dependent execution WHILE x ENDWHILE constructs to define x dependent repeated execution SUB lt name gt ENDSUB constructs to define a subroutine GOSUB lt name gt construct to call a subroutine 4 2 SUPPORTED OPERATIONS ON EXPRESSIONS 4 2 1 unary operations abs acos asin atan cos exp fix fup int In absolute value arc cosine arc sine arc tangent cosine e raised to round down round integer part natural log of 08 March 2012 Release 4 00 11 97 USBCNC round round sin sine sqrt square root tan tangent not logical not 4 2 2 binary operations divided by mod modulo b power 7 times and logic and xor logic exclusive or minus or logic non exclusive or plus gt greater then gt greater than or equal lt less then lt less than or equal is equal lt gt not equal band bitwise and bxor bitwise exclusive or bor bitwise non exclusive or lt lt shift left gt gt shift right See also B 2 for examples on expressions Manual 08 March
121. ot be nested it is an error if a left parenthesis is found after the start of a comment and before the end of the comment Here s an example of a line containing a comment G80 M5 stop motion Comments do not cause a machining center to do anything A comment contains a 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 Comments not containing messages need not be displayed there 3 3 5 Item Repeats A line may have any number of G words but two G words from the same modal group see Section 3 4 may not appear on the same line 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
122. ou have connected a spindle speed sensor to the Sync input of the CPU The sensor should give 1 pulse revolution minimum pulse width 0 5ms MistlsSpindleDirection Special for CPU5A use mist output for spindle direction if you need it CPU5A has no separate spindle direction output that is why 08 March 2012 Release 4 00 11 21 USBCNC Manual wow lt Setup Page 2 press gt button on first setup page to get here USBCNC V4 00 RC 12 C Program File JSBCNC o cn Smm Operate Program Tools Variables 10 Setup Help UI and Connection Connection to CPU AUTO X INCH chert o C mz Motor setup Visible SlaveMode Steps AppUnit Positive limit Negative limit Vel AU S Acc AU S 2 Home Vel Dir Home Position Backlash xE 50 0000 1250 000 300 000 550 0 950 0 0 0 0 000 0 0000 YE 50 0000 620 000 300 000 550 0 950 0 0 0 0 000 0 0000 z W 50 0000 300 000 330 000 550 0 950 0 0 0 0 000 0 0000 KA ROT X 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 e E ROT v 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 c ROT X 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 Trajectory Setup Toolchange Area Collision Homing and E Stop Spindle LookAheadFeed Axes Positive iit Negative imit Use Only Home X for all axes F Maxs 10000 0 Home min angle 12 000 x 0 000 0 000 Sensorisestop A Mns 0 0 2 Disable 1 Normally dosed 0 Normally open Max step freq 0 000 0 000 R Time 2 0 K Ho
123. ou have coupled the motor directly to a spindle with 5mm pitch The number to be filled in here 1600 5 320 If the movement direction is wrong change it to 320 Maximum machine position Minimum machine position Maximum axis velocity all velocities whether jogging GO G1 G2 G3 are limited to this value Maximum acceleration 08 March 2012 Release 4 00 11 17 USBCNC Manual 2 1 3 Homing and ESTOP setup Home Vel Dir Homing velocity a negative number reverses the homing direction When the velocity is set to 0 the axis is homed manually see the homing and coordinate systems chapter Home Position Machine position at the moment the home switch activated This determines the machine coordinates It is not really relevant where the machine zero point lies it should only match with the MIN MAX position Homing sensors should be setup such that they remain active until the mechanical end of the machine The space from home sensor activation to mechanical end is required to ramp down the movement Machine Mechanical Range Home Sensor behavior good Home Sensor behavior WRONG Use only home X for all axes Check this option if you have all home sensors wired to one input HomeSensorIsEStop The home sensors can also be used as limit switch which generate an E Stop when activated When this function is required the sensors should be mounted outside the normal machine area Check this option if the h
124. p parameter The theoretical ideal value would be very small so that no acceleration value occurs More practical values are in the range of 1 to 4 degrees the experience learns that most machines can handle acceleration spikes up to a certain limit The value can be set up to 180 degrees in this case you must know what you are doing it can be useful during e g foam cutting wing profiles Be aware however that if the curve contains real sharp angles that step pulse loss may be the result when using large minimum LAF angles In practice we have seen that milling times of complex 3D work pieces can be done in 50 of the time compared to competitors who do not have LAF 08 March 2012 Release 4 00 11 84 USBCNC Manual 3 5 17 Coordinate system rotation G68 G68 R X Y R Rotation angle in degrees positive is counter clockwise negative is clockwise X Y Rotation point in current coordinate system 3 5 18 Threading Lathe G76 G76 P Z l J R K Q H E L Pitch driveline endpoint Outside thread diameter always positive First cut is J beyond I always positive Depth regression use 1 0 for constant cutting depths or leave parameter away Full thread depth beyond thread peak always positive Compound slide angle typical 30 Additional spring passes at full depth use 0 for none Taper distance along drive line Taper place none enter exit both CmMmMIOADSTNTU Create a thread from z 20 to z 10
125. plicitly 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 3 5 G CODES G codes of the RS274 NGC language are shown in Table 3 4 and described in this Section The descriptions contain command prototypes set in bold type In the command prototypes three dots stand for a real value As described earlier a real value may be 1 an explicit number 4 for example 2 an expression 2 2 for example 3 a parameter value 88 for example or 4 a unary function value acos 0 for example In most cases if axis words any or all of X Y Z A B C are given 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 have their current value Any items in the command prototypes not explicitly described as optional are required It is an error if a required item is omitted In the prototypes 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
126. position that axis was in just before the canned cycle started unless that position is lower than the position indicated by the R word in which case use the R word position To use option 1 program G99 To use option 2 program G98 Remember that the R word has different meanings in absolute distance mode and incremental distance mode 3 6 INPUT M CODES M codes of the RS274 NGC language are shown in Table 3 6 Table 3 6 M Codes M Code Meaning MO program stop M1 optional program stop M2 program end M3 turn spindle clockwise M4 turn spindle counterclockwise M5 stop spindle turning M6 tool change M7 mist coolant on M8 flood coolant on M9 mist and flood coolant off M30 program end spindle and coolants off and rewind M48 enable speed and feed overrides M49 disable speed and feed overrides M60 program stop use this with nesting in stead of M60 so that the spindle coolants remain on during transition from one to the next run M64 set general purpose output for Advantronix USB IO card support is depricated M65 clear general purpose output for Advantronix USB IO card support is depricated M66 read general purpose input for Advantronix USB IO card support is depricated M54 set general purpose output for CPUSB M55 clear general purpose output for CPU5B M56 read general purpose input for CPU5B 3 6 1 Program Stopping and Ending MO M1 M2 M30 M60 To stop a running program temporarily r
127. pp button the nesting is applied to the program and shown E usscnc v4 00 1 Tools _ variables 10 Material Size 4 gt x 500 0 y 40 0 Start Offset gt x 10 n Y 20 T 8 READY 12 04 38 12 04 38 12 04 38 12 04 38 RenderJob UpdateRender UpdateRender ProcessRequests w cnccommand cpp 1882 Warning 0 RENDERING COpenGLvView cpp 850 Info 2 Done range gt X 296 000 98 COpenGLView cpp 854 Info 2 Done Delta s gt XD 394 000 YC cnccommand cpp 4266 Warning 0 READY gt e REDRAW Machine Work x 197 000 Y 300 000 Z 0 000 G1 G17 G40 G21 G90 G G59 3 G49 G99 GE4P0 1 G96 seal OT me G1 G17 G40 G21 G90 G94 G59 3 G49 G99 G64P0 1 G96 M9 TO READY 761 762 763 764 765 766 767 768 769 770 771 772 773 i774 775 X95 332Y24 003 X98 436Y24 772 X98 547Y24 400 X98 658Y 24 028 X99 060Y25 149 X99 619Y27 333 X98 603Y29 346 X98 198Y27 071 X98 436Y24 772 G0Z5 000 GOx0 000Y0 000 G0Z5 000 GO X0 000 YO 000 M30 Manual OOO kok kok kk kok ak kok ffi ak a 7 lt lt lt 1339 F2 Recommended is to create the g code file for the product such that X0 YO is at the lower left side If you like to start not at the beginning use the goto line function and apply the NX NY values Happy production with Nesting F3 lt lt A LOAD Ly START F4 FS
128. r version of Windows select the compatibility mode that matches that earlier version Help me choose the settings Compatibility mode Run this program in compatibility mode for Settings Run in 256 colors Run in 640x 480 screen resolution Disable visual themes i Disable desktop composition E Disable display scaling onfigh DPI settings S Privilege Level V Run this program as an administrator Change settings for all users Al You can start USBCNC now by clicking the shortcut and begin setting the connection parameters 08 March 2012 Release 4 00 11 15 USBCNC Manual 2 The user interface There are several views Operate Program Tools Variables Setup and Help Using control tab you can tab through them It is important that USBCNC is started started as administrator On windows 7 this is not automatically done like in XP Click on the right mouse button and select Run As administrator You can also set this in the ICON properties compatibility When you start USBCNC for the first time you will get the Terms Guarantee page click the language you read the text Then click agree if you agree The operate page is shown This is the main screen to do all machine operation s from But first some settings must be filled in before you can start so go to the setup page Running a program and fast jogging is only possible after the machine is correctly homed so this mus
129. ram before any motion occurs and not to use either one anywhere else in the program It is the responsibility of the user to be sure all numbers are appropriate for use with the current length units G70 G71 is added for CAM software compatibility 3 5 8 Return to Home G28 and G30 Two home positions are defined by parameters 5161 5166 for G28 and parameters 5181 5186 for G30 The parameter values are in terms of the absolute coordinate system but are in unspecified length units To return to home position by way of the programmed position program G28 X Y Z A or use G30 All axis words are optional The path is made by a traverse move from the current position to the programmed position followed by a traverse move to the home position If no axis words are programmed the intermediate point is the current point so only one move is made 3 5 9 G33 G33 1 Spindle Synchronized Motion For spindle synchronized motion in one direction program G33 X Y Z K where K gives the distance moved in XYZ for each revolution of the spindle For instance if starting at Z2 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 A move to the specified coordinate synchronized with the spindle at the given ratio and starting with a spindle index pulse All the axis words are optional except that at least one must be used It is an
130. rc radius with comp 17 Two g codes used from same modal group 0 00 NO OT ONS Most of these are self explanatory For those that require explanation an explanation is given below Changing a tool while cutter radius compensation is on is not treated as an error although it is unlikely this would be done intentionally The radius used when cutter radius compensation 08 March 2012 Release 4 00 11 109 USBCNC Manual was first turned on will continue to be used until compensation is turned off even though a new tool is actually being used A 4 1 Concave Corner and Tool Radius Too Big 10 and 16 When cutter radius compensation is on it must be physically possible for a circle whose radius is the half the diameter given in the tool table to be tangent to the contour at all points of the contour In particular the Interpreter treats concave corners and concave arcs into which the circle will not fit as errors since the circle cannot be kept tangent to the contour in these situations See Figure A 5 This error detection does not limit the shapes which can be cut but it does require that the programmer specify the actual shape to be cut or path to be followed not an approximation In this respect the NIST RS274 NGC Interpreter differs from interpreters used with many other controllers which often allow these errors silently and either gouge the part or round the corner concave corner concave arc too small tool does not fit
131. s 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 The FIX operation rounds towards the left less positive or more negative ona 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 3 and FUP 2 8 2 for example 3 3 3 Parameter Setting A parameter setting is the following four items one after the other 1 a pound character 2 a real value which evaluates to an integer between 1 and 5399 3 an equal sign and 4 a real value For example 3 15 is a parameter setting meaning 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 G1 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 08 March 2012 Release 4 00 11 66 USBCNC Manual 3 3 4 Comments and Messages Printable characters and white space inside parentheses is a comment A left parenthesis always starts a comment The comment ends at the first right parenthesis found thereafter Once a left parenthesis is placed on a line a matching right parenthesis must appear before the end of the line Comments may n
132. s gives the best compromise between accuracy and smooth motion To make a move from stand still we need to accelerate then have a certain cruising speed and after decelerate Short moves typically never reach the requested velocity the accelerate and then at half the distance the decelerate This table shows the distance traveled so that the given speed is reached When the line segments generated by the CAD CAM program are shorter the actual speed on the machine will be lower than requested value Example you want a milling speed of 900 mm minute then the segments generated by the CAD CAM program must be smaller than 1 88 mm If the lines are only 0 21 mm the feed will go down to 300 Velocity Feed Accel Distance 48 2880 120 19 20 30 1800 120 7 50 25 1500 120 5 21 20 1200 120 3 33 08 March 2012 Release 4 00 11 82 USBCNC Manual 17 1020 120 2 41 15 900 120 1 88 12 720 120 1 20 10 600 120 0 83 9 540 120 0 68 8 480 120 0 53 7 420 120 0 41 6 360 120 0 30 5 300 120 0 21 4 240 120 0 13 3 180 120 0 08 If you machine has higher accelerations which requires bigger motors also higher milling velocities are possible The values given here are for a moderate hobby machine This illustrates that when the G Code file exists of small segments e g 0 08 mm that with an acceleration of 120 a feed can be reached of 180 mm minute at most 3 5 16 Look Ahead feed To explain this will compare a running CNC machine with dri
133. s in the set up screen this need to be done once Using the arrow keys jog the X Y axes to the marked position on the bed and move the Z completely up to the surface of the machine When the machine is at the position press the Home button in the Home submenu F2 F7 for X C Be sure that you have set the home velocities of the axes to zero otherwise the axes will start to move Now click the buttons X Y Z and A if you have an A axis That is all the axes are now homed and the software now knows the machine position As a side effect now also the software limit switches are enabled which protect you from jogging further than the machine can go Also the Software limit guard is on that will stop a running program when going beyond the limits You may also have noticed that the position mode is set to machine this is because homing directly affects the machine coordinate system From this point the machine coordinate system is not changed any more it stays as is HINT Move your machine always back to the home position if you are done with the machine You don t have to move manually to this point next time when you switch back on the machine You can do a fast move in machine coordinates like this g53 gO x0 yO ZO or first undo the preset preset dialog undo preset and then do a regular GO 08 March 2012 Release 4 00 11 50 USBCNC Manual Another possibility to move quickly to the home positions is using g28 In t
134. speed will be set to 100 rev minute Feed Speed G M Code Tijd 60 300 0 0 Pressing control v will give Feed Speed GM Code Tid G80 G17 G40 G21 G90 G94 G54 G49 G99 G64 G96 G69 M5 M9 T1 READY This shows the actual G code and M code status as well as the actual tool number and the machine state READY RUNNING etc control v again gives Feed Speed G MCode Tid Here you see the actual running time of a job and also the estimated TOTAL time 2 2 2 Reset Button F1 This button has to be used after starting the software to enable the drives The amplifiers are switched on when pressing the reset button Try this you can feel at the motor shaft if the amplifier is on if you can still turn the motor by hand you probably need to reverse the amplifier enable polarity in the setup But the reset button does more e Enable the amplifier e Recover from Error after you get one e Stop a running program 2 2 3 Escape Button This button pauses the current job execution if running This is just there for convenience not for safety emergency stop For safety use a real E STOP button 08 March 2012 Release 4 00 11 29 USBCNC Manual 2 2 4 The menu s 2 2 4 1 MAIN MENU The Main menu looks like this and has a user selectable logo at the right ry y F10 AUTO MDI FE F2 F3 F4 F6 F7 F8 F1 reset this key comes back un every sub menu F2 to home menu F3 to zero menu F4 to auto
135. st box shows the wrong line in red color Note that there can be inaccuracy in what the display shows this is there because of performance and memory usage limitation reasons Zooming rotate pan 2D 3D view and other possibilities are found in the graph sub menu see the example below With OpenGL activated in the setup real time pan rotate and zoom is possible with the mouse also pan left mouse button rotate left mouse button control zoom right mouse button 08 March 2012 Release 4 00 11 34 USBCNC Manual 2 2 4 7 JOG MENU ry ry ry ry ry Continuous JogMode C J gii er a iis v v v v v 0 001 1 10 100 1500 0 JogFeed F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 Fil F12 F1 Reset F2 jog mode continuous F3 jog mode step 0 01 F4 jog mode step 0 05 F5 jog mode step 0 1 F6 jog mode step 0 5 F7 jog mode step 1 F8 jog mode step user value F9 jog mode hand wheel mpg X1 F10 jog mode hand wheel mpg X10 F11 jog mode hand wheel mpg X100 F12 return to main menu 2 2 4 8 JOG PAD gt X Cont o E e gt cont PH REIG BORELI DEARG REELI ee Un ee ue gt Jog by mouse F12 return to main menu The function is similar to the jog menu but it has some extra functionality with jog step i 0 01 A A A A 50 40 05P 140 1 PIRI 0 5 gt 08 March 2012 Release 4 00 11 35 USBCNC Manual When Shift Coordinate System is checked jog step functions
136. t this is a relative units total move is about 1 37s large value 08 March 2012 Release 4 00 11 19 USBCNC Manual 2 1 5 Trajectory setup MAXFREQ The maximum step frequency that the CPU will generate It is sometimes required to lower the maximum frequency e g in case because the drive is unable to handle the high step rate For instance when you build the PICSTEP driver and want to use it do not set the max frequency to 50 KHz because the PICSTEP driver cannot handle frequencies above 50 KHz LAF minimum angle Look Ahead Feed calculations Motion segments that are connected with a smaller angle as specified in min angle will accelerate through which will give higher speeds especially with programs consisting of small motion segments This is a unique feature which you don t find easily on low cost CNC controllers Be carefully with the min angle setting because this cause acceleration spikes it depends on your machine and the speed up till what extend this is possible suggest performing tests with en check whether you get step pulse loss A value of 0 1 3 degrees is generally safe Segments that are really tangential connected will move fast that way An example of what use When using CorelDraw a circle is drawn of 100mm in diameter and exported as HPGL CorelDraw generates small line segments of approximately 6 degrees Now have set the min angle to 6 this gives the possibility to mill
137. t be setup first The reason is that collision prevention is not active when the machine isn t homed so damage to the machine may happen when homing is not performed 2 1 SETUP PAGE S Before the system is actually used we have to setup the system to accommodate the machine we do that in the setup page s There a two main setup pages Setup Page 1 E T USBCNC V4 00B 1 Operate Program Tools Variables 10 setup Help UI and Connection Connection to CPU AUTO X INCH E Phere F wi Motor setup SlaveMode Steps AppUnit Positive limit Negative limit Vel AU S Acc AU S 2 Home Vel Dir Home Position Backlash 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 O ROT 320 0000 300 000 300 000 25 0 50 0 0 0 0 000 0 0000 Trajectory Setup Toolchange Area Collision Homing and E Stop Spindle LookAheadFeed Geay pes e Use Only Home X for all axes Maxs 10000 0 min ange 3 000 x 0 000 0 000 Fees E ES ES Mins 100 0 2 Disable 1 Normally dosed 0 Normally open Max step freq Y 0 000 0 000 Ramp UpTime 0 2 HomelnputSenseLevel 0 16666 667 z 0 000 0 000 i E EStopInputSenseleveli 2 Proportional Ramp Up Time ZDownToolLength 0 000 enableZColisionGuard F EStopInputSenseLevel2 2 ShowR
138. t 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 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 3 3 2 2 PARAMETER VALUE A parameter value is the pound character followed by a real value The real value must evaluate to an integer between 1 and 5399 The integer is a parameter number and the value of the parameter value is whatever number is stored in the numbered parameter The chara
139. te page tasks 37 2 2 5 1 Startup 37 08 March 2012 Release 4 00 11 USBCNC Manual 2 2 5 2 Homing 37 2 2 5 3 Load and run a g code file 37 2 3 Program Page DXF and HPGL import 42 2 4 Tools Page 45 2 4 1 Milling 45 2 4 2 Tool change 45 2 4 3 Automatic user defined Tool change ATC 45 2 4 4 Turning 46 2 5 The variable Page 47 2 6 IO Page 48 2 7 homing and coordinate systems 49 2 7 1 Manual homing the machine 50 2 7 2 Automatic homing the machine and HomelsEstop 51 2 7 3 Tandem axes homing 51 2 7 4 Work versus Machine coordinate system and zeroing 52 2 8 Keyboard shortcuts 54 2 9 Zero tool macro 55 2 10 Tool measurement Macro 56 3 Input the RS274 NGC Language 59 3 1 Overview 59 3 2 RS274 NGC Language view of a Machining Center 59 3 2 1 Parameters Variables 59 3 2 2 Tool data 62 3 2 2 1 Tool Orientation for lathes 62 3 2 3 Coordinate Systems 63 3 3 Format of a Line 63 3 3 1 Line Number 63 3 3 2 Word 64 3 3 2 1 Number 64 3 3 2 2 Parameter Value 65 3 3 2 3 Expressions and Binary Operations 65 3 3 2 4 Unary Operation Value 66 3 3 3 Parameter Setting 66 3 3 4 Comments and Messages 67 3 3 5 Item Repeats 67 3 3 6 Item order 67 3 3 7 Commands and Machine Modes 68 3 4 Modal Groups 68 3 5 G Codes 69 3 5 1 Rapid Linear Motion GO 70 3 5 2 Linear Motion at Feed Rate G1 72 3 5 3 Arc at Feed Rate G2 and G3 72 3 5 3 1 Radius Format Arc 72 3 5 3 2 Center Format Arc 73 3 5 4 Dwell G4 74 3 5 5 Set Coordinate System Data G10 74
140. ternet Protocol Version 4 Ti CRANS Properties is x _ General You can get IP settings assigned automatically if your network supports this capability Otherwise you need to ask your network administrator for the appropriate IP settings Obtain an IP address automatically Use the following IP address IP address AF2 22 QZ A Subnet mask 255 255 255 0 Default gateway Use the following DNS server addresses Preferred DNS server Alternate DNS server Validate settings upon exit Advanced Candiana te x j cae The PC LAN adapter gets IP Adress 172 22 2 101 The USBCNC CPU network is setup for 172 22 2 100 Press OK now you can test if the network is working click the Windows Start button select all programs gt accessories gt command prompt In the command prompt enter ping 172 22 2 100 when connection OK you sh Administrator Comm romp C Microsoft Windows Version 6 1 760i1 Copyright c gt 2009 Microsoft Corporation AlL rights reserved ould see gny C Users Bert gt ping 172 22 2 100 Pinging 172 22 2 1900 with 32 bytes of data Reply from 172 22 2 100 bytes 32 time lt ims TTL 100 172 22 2 100 bytes 32 time lt ims TTL 166 172 22 2 100 bytes 32 time lt ims TTL 166 Reply from 172 22 2 100 bytes 32 time lt ims TTL 160 Ping statistics for 172 22 2 108 Packets Sent 4 Received 4 Lost z loss gt D Approximate round trip times i
141. tes on the other side of the contour from the one programmed and uses the absolute value of the given diameter If the actual tool is the correct size the value in the table should be zero Suppose for example the diameter of the cutter currently in the spindle is 0 97 and the diameter assumed in generating the tool path was 1 0 Then the value in the tool table for the diameter for this tool should be 0 03 The nominal tool path needs to be programmed so that it will work with the largest and smallest tools expected to be actually used We will call the difference between the radius of the largest expected tool and the intended radius of the tool the maximum radius difference This is usually a small number The method includes programming two pre entry moves and one entry moves See Figure A 4 The shaded area is the remaining material The dashed line is the programmed tool path The solid line is the actual path of the tool tip Both paths go clockwise around the remaining material The actual path is to the right of the programmed path even though G41 was programmed because the diameter value is negative On the figure the distance between the two paths is larger than would normally be expected The 1 inch diameter tool is shown part way around the path The black dots mark points at the beginning or end of programmed moves The corresponding points on the actual path have not been marked The actual path will have a very small additional
142. the circle with a speed of F6000 while without LAF the speed would be approx F1300 on my machine 2 1 6 Kinematic Setup Trivial kinematics It is not needed for normal Cartesian machines leave the Trivial 1 1 kinematics checked Please contact Eding CNC if you have a special machine or robot with non Cartesian axes 2 1 7 Tool change Area XYZ Limits Z DownToolLength By setting the limits here to a value different from zero the TCA Tool Change Area guard will be activated Using the values here you define an area on the machine which is restricted to tool change A normal work piece program is not allowed to enter this area For machine configurations where the tool chuck does not touch the machine bed when the machine is at its lowest Z position Here you specify the tool length of the tool that fits when Z is at its lowest position This information is important for collision guarding 2 1 8 Tangential knife setup TanKnife Angle Tangential Knife is a rotation motor the C Axis around Z Tangential Knife works with normal G1 G2 G3 without tool radius compensation G41 G42 The knife is rotated automatically in the direction of the X Y move This parameter determines the angle which 2 lines Arcs can make without lifting the Z If the angle is greater as this value the Z will move up GO rotate the knife GO then move down again G1 If the angle is lower the rotation will take place without moving Z up The t
143. trol B Toggle Blockdelete Control shift B Handwheel on B Control shift C Handwheel on C Control D Control shift D Spindle On right Spindle Off Control E Control shift D Spindle On left Spindle Off Control F shift Feed Feed Control G shift Run Pause Control H Home all Control I Load g code file Control J shift J Jog mode up jog mode down Control K Toggle Flood Control L Toggle Mist Control M Toggle Aux1 Control N Control shift N Handwheel X1 jog continue Control O Handwheel X10 Control P Handwheel X100 Control Q Quit program Control R Reset Control S Control shift S Speed Speed Control T Toggle Single line Control U Control V Control shift V Status tab next previous Control W Toggle Work Machine coordinates Control shift X Handwheel on X Control shift Y Handwheel on Y Control shift Z Handwheel on Z Control F1 control F12 reserved Control TAB Control shift TAB mode Control F6 toggle MDI Control 1 Zero x Control 2 Zero y Control 3 Zero Zz Control 4 Zero a Control 5 Zero b Control 6 Zero c Alt 1 User macro 1 Alt 2 User macro 2 Alt 3 User macro 3 Alt 4 User macro 4 Alt 5 User macro 5 Alt 6 User macro 6 Alt 7 User macro 7 Alt 8 User macro 8 Alt 9 User macro 9 Alt User macro 10 08 March 2012 Release 4 00 11 54 USBCNC Manual 2 9 ZERO TOOL MACRO User button 1 contains The idea is to use a flexible position t
144. ts in all but one usage see Section 3 5 16 8 where the meaning changes with distance mode 08 March 2012 Release 4 00 11 91 USBCNC Manual 3 5 22 Coordinate System Offsets G92 G92 1 G92 2 G92 3 To make the current point have the coordinates you want without motion program G92 X Y Z A 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 It is an error if e all axis words are omitted When G92 is executed the origin of the currently active coordinate system moves To do this origin offsets are calculated so that the coordinates of the current point with respect to the moved origin are as specified on the line containing the G92 In addition parameters 5211 to 5216 are set to the X Y Z A B and C axis offsets The offset for an axis is the amount the origin must be moved so that the coordinate of the controlled point on the axis has the specified value Here is an example Suppose the current point is at X 4 in the currently specified coordinate system and the current X axis offset is zero then G92 x7 sets the X axis offset to 3 sets parameter 5211 to 3 and causes the X coordinate of the current point to be 7 The axis offsets are always used when motion is specified in absolute distance mode using any of the nine coord
145. u will see what this is about if lt dialog message gt png picture exist it will be show 08 March 2012 Release 4 00 11 99 USBCNC Manual EXAMPLE of dlg msg For this example we created a subroutine associated with user_3 button in the UI Sub user _3 Example of dlgmsg 1 0 2 3 4 5 6 7 8 9 10 11 12 bob be ded ow nea Scocco 0 0 0 ou ou dlgmsg will pop up a dialog with picture usbcnc png from c program files usbcnc4 dialogPictures directory dlgmsg usbenc A 1 B 2 C 3 D 4 E 5 P 6 G 7 HY 8 I 9 J 10 K 11 L 12 if 5398 1 msg OK 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 else msg CANCEL 1 1 2 2 3 4 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 endif Endsub LogFile LogMsg Log anything to a file LogFile lt fileName gt lt l append O open new gt LogMsg your message Example LogFile text txt 1 LogMsg Hi the current position of X is 5001 Now check the contents of file text txt TCAGuard on off Switches on or off the tool change area guard This is used during the rendering process where the job file is checked for collisions with the machine area and tool change area HomelsEstop on off This allows to control the homelsEstop feature When on a EStop is generated when one of the home sensors activate 4 2 5 Speci
146. umber Programming a D word with G41 or G42 is optional If a D number is programmed it must be a non negative integer It represents the slot number of the tool whose radius half the diameter given in the tool table will be used or it may be zero which is not a slot number If it is zero the value of the radius will also be zero Any slot in the tool table may be selected The D number does not have to be the same as the slot number of the tool in the spindle although it is rarely useful for it not to be If a D number is not programmed the slot number of the tool in the spindle will be used as the D number 4 3 6 Material Edge Contour When the contour is the edge of the material the outline of the edge is described in the NC program For a material edge contour the value for the diameter in the tool table is the actual value of the diameter of the tool The value in the table must be positive The NC code for a material edge contour is the same regardless of the actual or intended diameter of the tool 4 3 7 Programming Entry Moves In general two pre entry moves and one entry move are needed to begin compensation correctly However if there is a convex corner on the contour a simpler method is available using zero or one pre entry move and one entry move The general method which will work in all situations is described first We assume here that the programmer knows what the contour is already and has the job of adding
147. ut different enough that they are described in separate sections of this manual To use the material edge method read Section A 3 To use the nominal path method read Section A 4 08 March 2012 Release 4 00 11 103 USBCNC Manual Figure A 1 Thterpreter does it this way NOT this way Toul go 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 following the contour to the next point at which machining should be done and re extending the Z axis These skip motions may be performed at feed rate G1 or at traverse rate GO The Z motion will not interfere with the XY path following The sample NC code in this appendix does not include moving the Z axis In actual programs include Z axis motion wherever you want it Rotational axis motions A B and C axes are allowed with cutter radius compensation but using them would be very unusual Inverse time feed rate G93 or units per minute feed rate G94 may be used with cutter radius compensation Under G94 the feed rate will apply to the actual path of the cutter tip not to the programmed contour 4 3 1 Data for Cutter Radius Compensation The Interpreter world model keeps three data items for cutter radius compensation the setting itself right left or off program_x and program_y The last two represent the X and Y positions which are given in the N
148. ving a race car The road maximum velocity signs have to be obeyed and you have to drive your car exactly over the white line in the middle of the road You will try to reach the maximum allowed velocity where possible When you see a curve coming up ahead you will brake so that you will not drift off the road You will try to look ahead as far as you can see and you take care that you can stop in time if the road suddenly stops When you would maintain your speed in sharp curves you will drift off the road resulting possibly into a car accident When the road has many short curves then you will not be able to reach the desired speed The more PS you have in the car the higher speed you will reach because you can accelerate faster think this is a good comparison with a CNC machine the same issues apply A machine cannot suddenly change velocity to reach a velocity the motors must accelerate first for a certain time to reach the velocity LAF behaves like the ideal racecar driver it will reach the highest possible velocity without violating the maximum motor accelerations 08 March 2012 Release 4 00 11 83 USBCNC Manual There is one additional problem while running CNC programs some programs consists of short line pieces When the line pieces connect tangentially are in line then LAF will accelerate through over the lines reaching the maximum allowed speed The angle to which LAF considers the segments in line is a setu
149. w Green when actually running So it shows the tool path real time At the left side there are buttons for common used IO e Spindle on off Flood Mist Coolant on off and AUX on off e g for the machine light MACHINE ON Button Below Home C led This one has a few colors with different meaning o Grey means machine is off drives switched off Green flashing machine is on but not all axes are homed homing required Green machine ON Red flashing E Stop button on machine is active Red E Stop button released but reset home required Pressing the button switches off the drives OOO OO The right part of the screen shows the axes positions when homing you use the machine coordinates and for all other operations the work coordinates 08 March 2012 Release 4 00 11 28 USBCNC Manual The buttons beside the axes positions are for zeroing the work position on the background a G92 command is executed to perform this The zero buttons can also be found in the zero submenu especially for people who do not like using the mouse at the machine below the machine positions we see the general status window You can select FS Feed Speed GMT G Code M Code Tool and T time estimation for running job There is a shortcut key ctrl v to change the selection here Feed Speed You see the actual value set value and percentage If you do a G1 in this example the feed will be 60 If you switch on the spindle with M3 the spindle
150. way When your machine is switched on all axes can be at any position these positions are unknown by the software The software however needs to know the position to show a correct graphic in the graph screen and also for preventing damage to your machine by running beyond the machine limits The process to match the machine position with the software is called homing Homing can be done either manually or automatic if end of stroke switches are mounted This tutorial describes homing Here are the homing buttons F2 from the main menu a USBCNC V3 53 Beta 6 SIMULATION C Program Files x86 USBCNCV3 macro cnc lt n i i i Operate Program Tools Variables 10 Setup Help Machine Work X 1 073 Y 28 837 Z 0 001 F 0 60 100 S 0 100 0 This is file macro cnc It is automatically loaded Customize this file yourself It contains subroutime change_tool this is called subroutime home_x home_z called subroutine home_all called when hoi subroutime user_1 user_11 called D aga user_1 contains an example of zeroin 11 user_2 cintains an example of measu INI file saved 12 11 40 57 Info Drives enabled 13 You may also add frequently used mac E 5Q 14 SPRLESESESELESSSLESSELSESSAESTTR ESS 11 59 07 Info INI file saved i 16 17 User functions F1 F11 in user menu gt gt gt lt
151. will not start turning If later the 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 3 6 3 Tool Change M6 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 3 7 3 program M6 When the tool change is complete e The spindle will be stopped e 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 The T number is an integer giving the changer slot of the tool not its id e 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 in its changer slot e The coordinate axes will be stopped in the same absolute position they were in before the tool change but the spindle may be re oriented e 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 The tool change may include axis motion while it is in progress 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 spind
152. ystem 4 5310 Reserved for rotation coordinate system 5 5330 Reserved for rotation coordinate system 6 5350 Reserved for rotation coordinate system 7 5370 Reserved for rotation coordinate system 8 5390 Reserved for rotation coordinate system 9 08 March 2012 Release 4 00 11 61 USBCNC Manual Parameter number Meaning 5398 Return value for digmsg 1 OK 1 Cancel 5399 Return value for M55 M56 5401 5416 Tool z offset Length Tool 1 Tool 16 5501 5516 Tool diameter Tool 1 Tool 16 5601 5616 Tool x offset for Turning Tool 1 Tool 16 5701 5716 Tool orientation for Turning Tool 1 Tool 16 Currently supported only Tool 0 Tool 16 3 2 2 Tool data Tool ID zOffset Length xOffset For Diameter orientation turning 1 1 9 2 1 9 16 1 9 3 2 2 1 TOOL ORIENTATION FOR LATHES When the G18 plane X Z is selected special LATHE tool radius compensation can be used G41 G42 Depending on the tool orientation and tool radius an extra offset is applied The blue crosses show the radius center of the tool The green crosses show the controlled point depending on the tool orientation For orientation 9 there is no offset compensation For orientation 2 the compensation in X is tool radius in Z also tool radius 08 March 2012 Release 4 00 11 62 USBCNC Manual 3 2 3 Coordinate Systems In the RS274 NGC l
Download Pdf Manuals
Related Search
Related Contents
o seu telefone - Support Sagemcom User Manual StarTech.com 15 ft IEEE-1394 Firewire Cable 4-6 M/M When troubleshooting Mercury Outboards with NGS Viper Mouse Multiscan15sfII Multiscan17sfII Philips AZ6833/05 User's Manual Optoma HD600X Copyright © All rights reserved.
Failed to retrieve file