Navigation

  • Page 1

    Version 4e (Linux v4.51), updated 5/5/08 Operating Instructions for the Sherline Vertical Milling Machine CNC System P/N 8540/8541, 8020/8021, 8600/8601, 8620/8621 PRECAUTIONS 1. Do not connect or disconnect stepper motors when the driver box is powered up. Always turn off power to the driver bo...

  • Page 2

    CNC for Lathe Users Purchasers of Sherline CNC lathe systems can also use these instructions, as the basics of CNC apply regardless of the machine being run. Keep in mind that lathe operations will require somewhat different g-code simply because of the way parts are made on a lathe. Use of Non-S...

  • Page 3

    15. Disconnect tools—Unplug tools before servicing and when changing accessories such as blades, bits or cutters. 16. Avoid accidental starting—Make sure the switch is “OFF” before plugging in a power cord. 17. Use only recommended accessories—Consult the owner’s manual. Use of impro...

  • Page 4

    failure occur in the motor, the grounded plug and receptacle will protect the user from electrical shock. If a properly grounded receptacle is not available, use a grounding adapter to adapt the 3-prong plug to a properly grounded receptacle by attaching the grounding lead from the adapter to the...

  • Page 5

    operation. For more on lubrication see page 5 of the Sherline Miniature Machine Tools Assembly and Instruction Guide that came with your mill. CNC System Warranty If within one year from the date of purchase of a new Sherline CNC system any tool or component fails due to a defect in material or w...

  • Page 6

    Technical Support If you have a physical or electrical problem with a machine, component or accessory manufactured by Sherline, please feel free to contact us at 1-800-541-0735, 1-760-727-5857 actionURI(mailto:sherline@sherline.com):or sherline@sherline.com. If you have technical questions regard...

  • Page 7

    wasted more time and money on that machine than I care to admit, and I felt relived as it was loaded on a truck for its final journey to the junkyard. Problems with no memory storage The way this machine stored memory was interesting. At this time there weren’t any memory storage devices invent...

  • Page 8

    position. The DC motors controlled by fast computers and working in unison with accurate ball lead screws created a system that was very close to where we are today; however, they were slower and very expensive. Today, servo drives use AC motors controlled by varying the frequency to the windings...

  • Page 9

    same time. They do, and we at Sherline do all these things that give our customers a lot of bang for the buck. The consumers of products that manufacture using this technology benefit as much as the manufactures that use them. Because lathes could also produce these types of moves, the large and ...

  • Page 10

    students with a different background who I visualize sitting in the class and answering a question that I believe may be asked in a similar class, so please bear with me. I don’t want any of my students left behind. Enjoy the flight In many of the coming examples I also describe the movement of...

  • Page 11

    The only students I hired who learned CNC had good teachers, not good training manuals. In fact, I can’t think of any employee in the last 30 years that I’ve ever hired who learned CNC programming and how to run these complex machines on his own. You will! I had to learn on my own because I ...

  • Page 12

    programming can be to learn at the start and just how interesting it can be at the same time. In other words, I felt “Joe home machinist” doesn't stand a chance unless he's inspired to do so, and in my own way I’m trying right now to inspire you to learn how to program and use these marvelo...

  • Page 13

    be the dominant control of your computer whether you want it or not. I like the Linux concept of people working together where all have the benefit of any single person’s work. For example, these instructions will have a Sherline link placed on the EMC for all to read whether they are Sherline ...

  • Page 14

    to teaching a language that few citizens of the world spoke. Programs written using g-codes can be read throughout the world. g-code standards came about very early in the game because this game was controlled by engineers rather that marketing people. Contouring programs—another world Programs...

  • Page 15

    on size. Sounds simple enough until you find that every time you correct a number here you end up screwing up another number there. Take my thirty-five years of experience in dealing with CNC and accept this cutter offset stuff as a fact. I can’t help anyone who isn’t willing to work hard Bac...

  • Page 16

    size or larger layout to design with. I’ve since found that doing the design totally myself, it has become the perfect way for me to work. I love the program. It has become the perfect program for a designer and manufacturer like myself and has made me more productive than ever. I’m fascinat...

  • Page 17

    Operating Instructions Part 1 Instructions: Mill vs. Lathe These instructions were written primarily for using the CNC system with a mill. A CNC-ready Sherline lathe can also be controlled using the same computer and driver system. You would simply plug the crosslide stepper motor to the X-axis c...

  • Page 18

    System components: 1) 1-5/8" manual handwheel 2) Z-axis stepper motor 3) Stepper motor mount 4) Sherline vertical mill with drill chuck, headstock spacer block, hex adjustment keys and spindle bar 5) Backup Linux/EMC installation CD, Sherline instructions CD and Vector32 CAD program CD 6) Y...

  • Page 19

    3) Computer power switch 4) Connector from driver board to parallel printer port 5) Power cord 6) Connect your monitor here (blue) 7) On/Off switch for driver power supply 8) Output cables to stepper motors for A-, Z-, Y- and X-axes 9) Stepper motor driver power on indicator light NOTE: The 115V...

  • Page 20

    EMC—Still the latest and greatest I chose the EMC program to work with because: 1) EMC uses coding standards that are used in the modern machine tool world, 2) You will not be dealing with an outdated programming system, 3) EMC can deal with the cutter compensation (cutter comp) that is needed ...

  • Page 21

    on the backup CD that came with your system. Included along with the PDF and HTML versions is a MS Word (.doc) version should you wish to open it on a Windows® machine that has Microsoft Word® installed. The most current version of the instructions can always be found on the Internet at www.she...

  • Page 22

    The Desktop with two windows open for transferring files. Above is the desktop with both the “gcode” folder window and the floppy drive window open. Using the mouse, put the cursor on the file you wish to transfer. Click the left mouse button and keep it held down and the file will be highli...

  • Page 23

    Transferring a file from your “gcode” folder to a floppy 1. On the desktop, click on the “HOME” icon and then the “gcode” folder to open a window showing the contents of the “gcode” folder. 2. On the desktop, click on the icon for your floppy drive. This mounts the drive and opens...

  • Page 24

    bbxz.ngc— bbxz.ngc is the same as bbxy above except that it makes circles in other planes. bbyz.ngc—bbyz.ngc is the same as bbxy and bbxz above except that it makes circles in other planes. cds.ngc—Circle Diamond Square (cds) is the original proof that the EMC interpreter could run a millin...

  • Page 25

    • From the Welcome menu, there are four options to choose from. Click on New Data CD Projects and a new configuration screen will appear. • In the upper left corner from directories select Home > g-code. Next, click on any file in the upper right corner. • Press [CTRL] + [A] to select al...

  • Page 26

    the features of the standard EMC program were removed for the Sherline interface because they didn’t apply for a mill of this size and type to keep things as simple as possible. Sherline machines do not have limit or home switches and do not have direct control of spindle speeds and such. It is...

  • Page 27

    There are two columns below the control line. The left side of the screen shows axis position, feedrate override, and any messages that are sent by the EMC to the operator. You can add things like current tool number and length, type of position shown, and offsets in effect by looking under the &...

  • Page 28

    drawn on the screen. While viewing your tool path from beneath, for example, the movements may appear to be opposite of how you have defined them in your program. Feedhold and Feedrate Override You can operate feedrate override and feedhold in any mode of operation. Override will change the speed...

  • Page 29

    [Y] or [y] will shift the focus to the Y-axis. [A] or [a] will shift the focus to the A-axis. To help you remember which axis will jog when you press the jog buttons, the active axis name is displayed on them. Jog Mode The EMC can jog (move a particular axis) as long as you hold the button down w...

  • Page 30

    reading ahead and running the program. The combination of [Pause] and [Step] work a lot like single block mode on many controllers. The difference is that [Pause] does not let motion continue to the end of the current block. Feedrate Override and Auto Mode The number buttons along the top of the...

  • Page 31

    arcs, lines and such. You can even test sets of program lines by entering one block, waiting for that motion to end, and then enter the next block. Below the entry window, there is a listing of all of the current modal codes. You can also write this list to the message box in any mode if you loo...

  • Page 32

    pop-in. If you are in the middle of a cut when you press one of these control buttons the machine will pause long enough to re-compute the view. Along the right side of Backplot is the pop-in that you can display with the [SETUP] button. This will show a small graphic that tries to show the angl...

  • Page 33

    2) Write a program. 3) Test it for errors using the Backplot program. 4) Dry run the program with the spindle well out of the way so it can’t possibly crash. 5) Accurately align the machine with the work so they work in unison when the program is run. Push the button and have a cup of coffee wh...

  • Page 34

    How to make a file for our programs It’s possible to create a new file and have them end up in the wrong folder never to be seen again, and if you use this method you will always have your new programs in the proper folder. If you are using a computer supplied by Sherline, you’ll find the fil...

  • Page 35

    3) You have to get the new program loaded into the control (machine) in order to use it. 4) To accomplish this first use [File] [Open] to open your new “test-g02” program. The program will now be loaded in the control panel with the program name displayed. All of this BS isn’t as bad as it ...

  • Page 36

    Part Two Programming Sherline CNC Machines with EMC Although there is quite a bit of well-written instruction on how to program on the Linux CNC site, I believe you should only go there to learn beyond the limits of my instructions. Having too many instructors on a subject that you know nothing a...

  • Page 37

    Inch vs. metric dimensions in G-Code Because my instructions have been written using the inch dimension system, work with the inch version of EMC when using my examples at this time. This will slightly decrease actual table movements on metric machines. The g20 and g21 conversion command will onl...

  • Page 38

    control function, direction or speed and, in general, cannot be used in the same line of code with other modal g-codes for obvious reasons. g00 rapid positioning g01 linear interpolation g02 circular/helical interpolation (clockwise) g03 circular/helical interpolation (c-clockwise) g04 dwell ...

  • Page 39

    Circle program Note: In these instructions, the code you should retype into your program will always shown in bold face red type. The entire program: % (g02 circle program) g01 g20 g40 g49 g90 x0 y0 z0 f2 g02 x0 y0 i-.5 j0 g01 g90 x0 y0 z0 f2 % 1) % –Always start a new program with a % sign. T...

  • Page 40

    F) X0, y0, z0 is self evident. If the slides weren’t in the 0 position they would have moved to it. This is the basic information that all programs should start with. If I had entered a g00 command to start with (orders the machine to move to the programmed position at fastest speed) it would b...

  • Page 41

    9) One more check –the program should look like this: % (circle g02) g01 g90 x0 y0 z0 f2 g02 x0 y0 i-.500 j0 g01 g90 x0 y0 z0 f2 % 10) Go for it, click on [Run]. The backplot program should start tracing the path the spindle will travel in relation to the work. If you got one of those little m...

  • Page 42

    that the circle was generated on the positive side of the X plane. Are you up for your first test? You better be because I didn’t write all this stuff for my own enjoyment. From what I explained to this point, you should be able generate a 4-leaf clover on the backplot screen. Don’t forget to...

  • Page 43

    usually have the zero points in the same location as they are on the drawing, which makes the program easier to write without errors; however, it is seldom the actual position you’d want your machine to be in to load or unload parts or check dimensions. The best way I’ve found to determine th...

  • Page 44

    on the edge on the part. Your computer will be making thousands of calculations a second to do this, and old Millie will just bust her hump for you to make this happen if you follow their rules. If you don’t, they’ll start sending you those nasty little messages again, but look at it as a ble...

  • Page 45

    Safety first I believe you shouldn’t approach the work at this time in a rapid g00 mode for safety reasons; therefore, all my examples will include a short section of controlled feed rates before the point of contact is reached. My program examples will always be complete and will run on the ba...

  • Page 46

    g40 x1 y1 z1 % Now I’ll go through the program one line at a time Note: Before this program can be run the tool offset has to be entered. Go to [TOOLS] and enter 0.250" (6.4 mm) for the tool length, and 0.375" (8.4 mm) for the tool diameter. You must use the [Enter] key after entering...

  • Page 47

    Figure 3 The entire program: % (cut rectangle with cutter comp) g00 g90 g40 x1 y0 z1 z-.140 y.090 g41 d1 x.5 g01 x0 f10 x-1.910 y1.910 x-.090 y.100 z-.150 x-1.900 y1.900 x-.100 y.100 x-.200 y-.200 g00 g40 z1 x1 y0 z1 % Nothing worth commenting about in that program except that my final move bef...

  • Page 48

    This isn’t a bad idea to use throughout these problems to help you better understand the process. Planes that don’t fly In the CNC world there are three different planes. They come into play when we want our computer to do circular interpolation in a vertical plane. With this being the case, ...

  • Page 49

    g02 x0 z0 i-1 k0 g19 g03 y0 z0 j0 k1 g03 y0 z0 j0 k-1 g02 y0 z0 j1 k0 g03 y0 z0 j-1 k0 g90 g17 g40 g00 x0 y0 z0 % Run it on the backplot program. Millie could also run it, but you’ll have to change the f100 feed program to f12 so Millie can handle it. Be sure the slides are located in a positio...

  • Page 50

    % (EMC race course) (Set tool diameter D1 to .600) g00 g17 g40 g90 x-1 y1 z0 g01 y.5 f100 z.5 z0 x-4 y1 z.5 z0 x-1 y1.5 z.5 z0 y.5 g00 x-1.6 y.8 g01 y1.8 f100 (course complete) (Taxi to starting line) x-1.6 y1.3 f15 m00 This will pause the program while you get ready to set your stop watch. To s...

  • Page 51

    y1.373 (lap 4) x-3.862 y.961 x-1.123 y.578 y1.373 (lap 5) x-3.862 y.961 x-1.123 y.578 y1.373 x-1.6 (race over) g40 x-3.5 z1 x-4 y1.5 g03 x-4 y.5 i0 j-.5 g01 g90 x-2 g18 g02 x-2 z1 i0 k1.5 g01 g90 g17 x2 g02 x2 y-.5 i0 j-.5 g01 x-2 z0 f20 x-2.5 z.15 f15 x-3 z0 f10 x-3.2 z.1 f5 x-3.4 z0 x-3.6 z.05...

  • Page 52

    (lap 2) x-4 y1 f25 –More speed and back to turn 1 x-1 y.5 –Turn 2 point y1.5 –Turn 3 point (lap 3) x-4 y1 f30 –We’re at top speed headed for 1 (top speed) x-1.123 y.578 –We tighten up the course for the rest a race Figure 6 I cheated and used AutoCad®… y1.373 (lap 4) x-3.862 y.961...

  • Page 53

    g01 x-2 z0 f20 –Throttle back, oops, dam it (bounce) x-2.5 z.15 f15 –Flare it out, dummy x-3 z0 f10 –Damn, right in front of everyone x-3.2 z.1 f5 –I give up. I never did like tail-draggers x-3.4 z0 x-3.6 z.05 –At least I’m still alive x-3.7 z-.01 –I think I dented their runway z0 ...

  • Page 54

    Figure 7 I want you to write a complete program on your own to profile this part. To pass the test, you must use cutter comp. I have taught you all the fundamentals to write this program, and the only suggestion I will make is to test the program a segment at a time as you write it. That’s the...

  • Page 55

    Basic Trigonometric Functions Also: c²=a²+b² c=√(a²+b²) a=√(c²-b²) b=√(c²-a²) Figure 8 When programmers solve for tangent points, they usually start off knowing the hypotenuse of the triangle they are working with, because it is the radius of the arc of which they are solvin...

  • Page 56

    Figure 9 Rectangle, arc and tangent program The first example I’m going to explain looks deceivingly simple and is typical of what you have to start with, and believe me it isn’t easy, so pay attention. I started off this drawing by putting a circle in a rectangle in no particular position o...

  • Page 57

    Figure 10 First, what two things do we have to solve this triangle? We have the hypotenuse because it is the radius of the arc and the 5° angle. From our tables we see that the 0.0436 was derived by multiplying the hypotenuse (0.5) times the sin 5°; and the 0.4981 was the product of 0.5 x cos 5...

  • Page 58

    The entire program: % (rectangle, arc and tangent) g00 g40 g90 x0 y1 z0 g41 d1 x0 y.5 g01 y0 f16 y-2.000 x-1.7032 g03 x-2.2013 y-2.4564 i0 j-.5 g01 x-2.2488 y-3.000 x-4.000 y0 x0 x.5 g00 g40 g90 x0 y1 z0 % With comments % g00 g40 g90 x0 y1 z0 g41 d1 x0 y.5 g01 y0 f16 Last time, I started at y1 p...

  • Page 59

    Figure 12 In this problem all we know is the radii of both circles and the distance between them, yet we have to arrive at the tangent points. Figure 13 Here is the real problem. The seemingly obvious way of solving this problem would be to solve the angle that can be generated with the differe...

  • Page 60

    Figure 14 Believe me, I studied this problem for a long time before I was able to solve it. I also came up with unusually simple way to arrive at the second side of the right triangle so the problem was solvable. I don’t want to blow my own horn, but it is extremely rare that an individual lik...

  • Page 61

    Figure 16 Let’s write the code for this simple yet not-so-simple shape. One thing I must state again is that I’m having a terrible time with careless errors. I think the problem is that I’m more worried about how I’m going to explain each problem than I am in entering the correct numbers...

  • Page 62

    I believe that you should be able to follow the pulley program without comments now that you have calculated the tangent points. Our next problem is linking to arcs together, and in this case the arcs are going in opposite directions. What I want you to notice in this particular program is the fa...

  • Page 63

    Figure 18 Don’t just look at my answers and assume they are right. In the real world you don’t solve problems you know the answers for. I’m writing this stuff for you to teach you how to do it. I already know. Be original and change a few basic dimensions and see if you can be confident th...

  • Page 64

    Figure 19 The rod program adds a useful new tool to our collection. The “r” letter designates “radius” when it’s used in the same block as the circle command g02 or g03. This simplifies code writing because it eliminates the need to calculate the “I” and “j” points that are alw...

  • Page 65

    g02 x-1 y0 r.3125 g01 y-.1 g00 g40 x-.5 x0 y0 z0 % This concludes your basic course on CNC g-code programming. You’ll know if you passed this course as soon as you attempt to write your own code to make a particular part that you need. You now have the knowledge to produce a very complex part. ...

  • Page 66

    home position. By placing the home position values after the g92 it will reset your axis readouts to the home position (no movement of tool along any of the axes will occur) when you hit [Run] and begin the program. Example: % g92 x1 y0 z2 g00 g90 g20 g40 z2 x1 y0 (home position) g89 x2 y1 z0.50 ...

  • Page 67

    Example: % g90 g40 g20 g00 g80 z2 x0 y0 g81 x2 y1 z-0.50 r0.010 f3 g00 g80 x0 y0 % (Consider the top of your part to be the 0 position.) % An explanation, line by line: g90 g40 g20 g00 g80 z2 – It’s a good idea to get the z-axis up out of the way before moving the x- or the y-axis. For examp...

  • Page 68

    Example: % g90 g40 g20 g80 g00 z2 x0 y0 g82 x4 y5 z-0.50 r0.010 p0.2 f3 g00 g80 x0 y0 % The new command to learn is command is p. The g83 command G83 is intended for deep drilling because you’ll break the drill if you don’t retract it periodically. When you retract the drill it allows the ch...

  • Page 69

    The g84 command G84 is intended for right-hand tapping. The Sherline CNC system doesn’t have any provision to accomplish this. The g85 command G85 is intended for boring, which is a motion very similar to G81 except it adds feed out. Usually you use a feed rate around 0.001" per revolution...

  • Page 70

    g00 g80 x0 y0 % For boring more than one hole, add the needed x, y positions for each hole. The L and the g91 command NOTE: Although I recommend using lower case letters in your programs because I believe it makes the code easier to read, the letter l is a special case because it is easily mistak...

  • Page 71

    for number of holes (number of repetitions L is set to L4). The g98 command is required to have the z-axis at its original starting position, which is 0.500" above the part because we are in incremental (g91). x0 y1 – 1st hole in the second row, increments are x=0, y=1; therefore, the tool...

  • Page 72

    x0 y0 g92.2 This leaves you exactly back where you started and back under the g90 command. To eliminate confusion it’s also important to note that the EMC position display also resets to whatever is called for when the g92 command is given. The g98 and g99 commands These commands are needed whe...

  • Page 73

    x2.500 g01 z-0.250 g00 z0.050 x3.500 g01 z-0.250 g00 z0.050 y1 g01 z-0.250 g00 z0.050 x2.500 g01 z-0.250 g00 z0.050 x1.500 g01 z-0.250 g00 z0.050 x.500 g01 z-0.250 g00 z0.050 z0.500 x0 y0 % Now consider how much programming labor these canned cycles can save once you learn them. Twenty-eight line...

  • Page 74

    The Sherline 8730 CNC Rotary Table with stepper motor can be plugged directly into the A-Axis cord pre-wired into your computer to operate as a 4th axis. Conclusion You’re ready to take off on your own The next stop on the EMC highway is to visit Linux-CNC. The road to this town requires a ho...

  • Page 75

    respect they deserve in this world. Check actionURI(http://sherline.com/jmfound.htm):out http://sherline.com/jmfound.htmactionURI(http://sherline.com/jmfound.htm): and be sure to visit the Joe Martin Foundation’s Internet Craftsmanship Museum at actionURI(http://www.craftsmanshipmuseum.com/):ht...

  • Page 76

    Table 2—M Word List M0 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 M26 enable automatic b-axis clampi...

  • Page 77

    Table 4—G- and M-Code Modal Groups Group 1 = {g0, g1, g2, g3, 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} - spindle speed mode Group 6 = {g20, g21} - units Group 7 =...

  • Page 78

    • What is Linux? • What is EMC? • What programming language does the EMC system use? • What other programs are included on the CD that comes with my system? • What do I do if I don’t know how to use Linux or cnc? • I’m ready to start writing the G-code to make my part. How do I ge...

  • Page 79

    I already have a computer. Can I use mine and save some money? You can, but you might want to consider your options before you decide. Basically you have two ways to go: 1) Buy a new cnc-ready Sherline machine or retrofit your existing mill, add stepper motors (P/N 67127, $75.00 each), buy a driv...

  • Page 80

    volts. You will need to flip this switch to 230. You can easily switch it with a small screwdriver or any other small flat device. Secondly, you will need to switch the driver board’s power supply so that it will be set to use 230 volt power. There is a switch that is basically identical to the...

  • Page 81

    What is EMC? EMC is the Enhanced Machine Controller originally developed by National Institute of Standards and Technology (NIST). It is released under the General Public License (GPL). Currently NIST does very little work on the project, and it has been taken over by average Linux users and a ha...

  • Page 82

    members can be found actionURI(http://www.yahoogroups.com/):at www.yahoogroups.com by typing "sherlinecnc" in the query box. Be sure to research your question before posting to these lists. Some list members get frustrated when people ask questions before doing a bit of research first. ...

  • Page 83

    desktop or into your G-code programs folder which is called “gcode.” When you are in the EMC, you can open this file by browsing to it. To save a file to the floppy from your computer, just drag the file from the “gcode” folder to the floppy window. Close the browser window for the floppy...

  • Page 84

    How do I use my inch CNC system in metric mode? You can toggle between metric and inch modes by using a g20 or g21 code. A line of code beginning with "g21" tells the machine that all numbers you enter after the g21 are now in millimeters instead of inches. The software will make the ca...

  • Page 85

    complex books and documentation on G-code available at your favorite book store or library. For some reason my axes are going in the wrong direction when I Jog. What am I doing wrong? This means that your ini file is improperly set. To fix it you will need to open the file called mill_inch_freq...

  • Page 86

    Changing the Axis Scale Changing the axis scale (for leadscrews with a thread count other than 20 TPI or 1 mm for example) can be achieved by editing the input and output scale values in the EMC ini files (mill_inch_freq.ini or mill_mm_freq.ini for the Standard and Metric versions of the EMC, res...

  • Page 87

    that is supported by our instructions. If you choose to download a later version, you do so at your own risk. The newer version may fix a fault that we did not consider a problem when using it on a Sherline machine, and other fixes may cause previously unknown malfunctions. If you have problems w...

  • Page 88

    exit and press [Enter] (this command will end the Terminal Program.) · To leave the root directory and go back to the sherline directory: Click on the K-icon, select Logout > End session only > OK Type, username: sherline, password: sherline. · On the Linux desktop, right clic...

  • Page 89

    Are these instructions updated periodically? Yes, we are constantly trying to improve the instructions. You can find the most up-to-date version of these instructions actionURI(http://www.sherline.com/CNCinstructions.htm):at http://www.sherline.com/CNCinstructions.htm. Compare the version number...

  • Page 90

x