Navigation

  • Page 1

    Sherline Linux (Ubuntu) Version 6.0 with EMC2, updated 10/12/12 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...

  • Page 2

    NOTE: Effective January 2009, Sherline computers no longer come with a floppy drive. A USB flash drive is included instead to facilitate file transfers.Finding the most current instructions The most up-to-date version of these instructions can always be found on the Sherline website actionURI(htt...

  • Page 3

    Safety Rules for Power Tools 1. Know your power tool—Read the owner’s manual carefully. Learn its application and limitations as well as the specific potential hazards peculiar to this tool. 2. Ground all tools—If a tool is equipped with a three-prong plug, it should be plugged into a three...

  • Page 4

    do the job. Overtightening may damage threads or warp parts, thereby reducing accuracy and effectiveness. 20. Don’t use your lathe for grinding—The fine dust that results from the grinding operation is extremely hard on bearings and other moving parts of your tool. For the same reason, if the...

  • Page 5

    wired, grounded connector cord for your source, the machine will operate anywhere in the world without a transformer. This has been true for all Sherline machines built since 1994. Electronic Filter for CE Approval Sherline now offers an in-line electronic filter between the DC motor and speed co...

  • Page 6

    will not complain and will always work with the instructions that you gave it. You tell it to run, and it will die trying to please you. The Y- and Z-axis screws can be easily oiled; however, the X-axis screw needs special attention. You can’t see it because it is located under the mill table. ...

  • Page 7

    expect a Sherline machine to stand up to the rigors of continuous production use. Continuous use of stepper motor driven leadscrews in a production environment can introduce wear that would be impossible to produce manually. Therefore, slides, gibs, leadscrews, leadscrew nuts and bearings that ar...

  • Page 8

    and understanding the EMC2 interface and Part 2, which provides workbook examples to walk you through the basics of using g-code. Part 1 A different way of learningLong ago I became aware of the success rate of people who, when left alone with their video recorder and an instruction manual, faile...

  • Page 9

    was out of choices. I learned by staying up late, working my ass off and making costly mistakes. I would have given my left you-know-what if I had something like this to read rather than reading the junk written by professors trying to prove how smart they were to other professors rather than att...

  • Page 10

    go back to the way you already know or forget the whole idea. I don't want customers who think it'll be easy to learn because they'll be unsatisfied from the beginning and take out their anger on Sherline. You’re about to learn how to control your robot These aren't instruction about operating...

  • Page 11

    successful system available to all. I’m learning how to program EMC by using the internet site put together by dedicated EMC users, so you can also fall back to their site for help. See actionURI(http://www.linuxcnc.org/):http://www.linuxCNC.org/actionURI(http://www.linuxcnc.org/): . This is go...

  • Page 12

    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 that allow you to do contouring quickly become very complex. Today there are some aff...

  • Page 13

    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 Back in ancient times the great mathematician Euclid told a Pharaoh who wanted to learn ge...

  • Page 14

    Sherline CNC computer from the main menu at Applications>CNC or on-line at actionURI(http://linuxcnc.org/docs/EMC2_User_Manual.pdf):http://linuxcnc.org/docs/EMC2_User_Manual.pdf. System Components and Connections NOTE: Computer styles and specifications change often. The photos that follow are...

  • Page 15

    9) Computer with keyboard, and mouse 10) On/Off switch for stepper motor power supply 11) USB drive ports (front) 12) CD-RW drive 13) DC spindle motor 14) Included USB Flash Drive 15) Power On/Off (Smaller button below is “Restart” button) FIGURE 1.2 Connections on back of your co...

  • Page 16

    *NOTE: Sherline attempts to ship machines with the voltage setting preset to the proper voltage for the customer’s location. Confirm this setting before turning the computer on for the first time. If the setting is not correct, note that there are two switches that need to be changed. The switc...

  • Page 17

    connection is external and we connect the driver box to the computer through this connector whether the box is mounted externally or built into the computer. EMC or EMC2 will not run with a USB connection. You can also plug in a printer if need be. Now that most printers use a USB connection, thi...

  • Page 18

    loaded and running, power to the stepper motors can be turned on. Do not turn on power to the stepper motors unless the EMC program is running. Controls within the EMC prevent overloading of the power supply when multiple motors are powered up at the same time, but without this safeguard motors o...

  • Page 19

    2. Insert the CD, DVD or USB device into your Sherline Linux computer. When you do, an icon for the device will appear on your desktop. When you double click on the icon, a window will be opened showing the contents of that device. 3. On the desktop of your Sherline Linux computer, double click o...

  • Page 20

    You can also save a file directly to a CD, DVD or USB flash drive by navigating to the appropriate drive instead of the “g-code” folder (as in step 4 above) and then naming and saving as in step 5. NOTE: In the Ubuntu version of Linux it is no longer necessary to unmount the drive when you ar...

  • Page 21

    diag.ngc—Tests movement of each axis using small incremental moves. Hint—You will want to rapid to 0,0,0 before you start this program or have something else to do. skeleton.ngc —A sample of code used to create a standard starting and ending condition for a program. This does not show much ...

  • Page 22

    • Click the “X” in the upper right corner of the USB drive window to close it. • Remove the drive from the USB port Familiarizing yourself with the control panel The Sherline Graphical Interface By Ray Henry and Joe Martin Start your en...

  • Page 23

    FIGURE 1.4—The control panel screen The screen is laid out in sections. The first row is the menu bar across the top. Here you can configure the screen to display additional information. The small buttons that are located left center of the command indicate that they control the large blank se...

  • Page 24

    Directly below the pop-in area on the right side of the screen is the area that is controlled by the chosen mode. In [MANUAL] mode it’s configured so that you manually control the slide movements. You’ll have your choice of “jog” or “incremental” moves using the same big buttons. In [...

  • Page 25

    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 26

    [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 27

    them is the window that shows the part of the program currently being executed. As the program runs, the active line shows in white letters on a red background. The first three buttons, [Open], [Run], and [Pause] do about what you’d expect. [Pause] will stop the run right where it is. The next...

  • Page 28

    [Restart] button. A restart is a good time to use feed rate override and the pause key on your keyboard. MDI MDI mode allows you to enter single blocks and have the interpreter execute them as if they were part of a program—kind of like a one line program. You can execute circles, arcs, lines a...

  • Page 29

    clicking the file name will also open it.) If you highlight a section of text and use the Edit>Copy commands you can then open another program and use the Edit>Paste commands from the menu to paste the lines of code into the new program. This editor does not have the ability to automaticall...

  • Page 30

    optional 18" mill table (P/N 54182) with about 13.65" to 14" of X-axis travel and an optional 15" mill column (P/N 45260) that adds 4 more inches to Z-axis travel. Programming and Operating Your Sherline CNC Vertical Mill By Joe Martin Manual vs. CNC Let’s think about what w...

  • Page 31

    3) Now that we have a program loaded and the Backplot program running, let’s take a break and test our setup. Make sure that [ESTOP] is active with the button highlighted and execute [Run]. 4) Observe that the programmed moves can be viewed in the Backplot box and the viewing area can be contro...

  • Page 32

    This will remind you to only use the 0-new program to set yourself up for creating a new program. Use the File>Save command. Remember, to make any changes permanent you must save the changes before closing the program. 2) We’ll now use the [Save As] command to save the 0-new file with the n...

  • Page 33

    FIGURE 2.2—Mill axis directions in relation to the operator. Directions of axis movement on a mill Before we go on, let’s be sure we understand the directions of movement of the three axes of a milling machine. When programming g-code you will use the Cartesian coordinate system. In relation...

  • Page 34

    operations like milling a large round part or drilling circular hole patterns easier to program. It also allows you to do operations like milling threads or helical gears that would not be possible without CNC because a rotary axis and a linear axis must move at the same time and in the proper re...

  • Page 35

    Your Linux computer already has a program installed that will allow you to read .pdf files by clicking on them. To view .pdf files on your Windows® computer, a copy of the free program Acrobat Reader will need to be installed if it isn’t already. Clicking on a .pdf file should cause that progr...

  • Page 36

    reading them now. They are quite simple. Remember that modal g-codes remain in effect until the control receives a new g-code that over-rides the present code. Modal g-codes control function, direction or speed and, in general, cannot be used in the same line of code with other modal g-codes for ...

  • Page 37

    with some fonts and are located close together on any keyboard. You are not writing a letter when you program, and it has to be accurate. 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 ...

  • Page 38

    D) g49–Cancels any unwanted tool length compensation that may have been left active from previous run programs E) g90–Orders the machine to use the absolute coordinate system where the position will always be referenced from a zero point. Again, you can zero the axis by going to [Pop In] [O...

  • Page 39

    7) m2-Informs the computer the computer the program has come to an end. 8) % -The standard format of EMC or EMC2 is to start and the entire program with a percentage sign. 9) Now we have to load this program for your machine to run. [File] [Save and Load] In this case we are not ready for prime t...

  • Page 40

    Don’t ever press the green [Start] button on a CNC machine unless you know exactly what the machine will do BEFORE you PRESS IT! Now let’s take a closer look at that minus change we made and we’ll see what happened is really obvious. By changing the “i” to a positive number the center ...

  • Page 41

    I’m buying I’m a little bored with this exercise myself so let’s drop over to route g41 and see what’s going on. The programmers that reside on g41 are a little on the snobby side because they think they have some special talent that us regular guys can never learn. That was probably true...

  • Page 42

    This allows you to measure the tool length directly with calipers by measuring the overall length of the holder with the tool mounted. Also remember that the home stopping position for the z-axis shouldn’t be zero. It should be a positive number that allows you to change the tool if necessary. ...

  • Page 43

    Figure 2 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...

  • Page 44

    The coming programming examples don’t use this method of bringing the cutter up to the part because it wasn’t necessary in my examples. In the real world, this will be a problem that you’ll regularly encounter, and you’ll have to use every trick in the book to produce the parts that are n...

  • Page 45

    10) g40 x1 y1 z1 –And home. 11) m2 – End program. 12) % –Park it and have a coffee. Good flight! The diameter was generated as before, but this time the final size of this diameter will be controlled by the diameter entered in to the d1 location. By entering a diameter larger than the actua...

  • Page 46

    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 m2 % Nothing worth commenting about in that program except that my final move before canceling cutter comp was to eliminate a burr that would have formed if I had gone straight out, and you should be ...

  • Page 47

    Here is an interesting little program I wrote: The atomic circle program Figure 4 The entire program: % (atomic circle) g90 g17 g40 g00 x0 y0 z0 g03 x0 y0 i0 j1 f100 g02 x0 y0 i0 j-1 g03 x0 y0 i1 j0 g03 x0 y0 i-1 j0 g18 g03 x0 z0 i0 k1 g02 x0 z0 i0 k-1 g03 x0 z0 i1 k0 g02 x0 z0 i-1 k0 g19 g03 y0...

  • Page 48

    step this program through and again be sure you are positive that you can understand every move made so well that you can explain to someone what the move is and why it is going to make it this or that way before going on. Our class is very understanding and we are all going to wait for you while...

  • Page 49

    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 start the race you’ll have to use [Resume] button because the [Run] button will not restart the ...

  • Page 50

    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 x-3.7 z0 g03 x-3.7 y-.9 i0 j-.2 g01 g90 x-1 f25 g03 x-.5 y-.4 i0 j.5 f1...

  • Page 51

    (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 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) –We won g40 x-3.5 z1 –Turn off the navigational aid and climb out...

  • Page 52

    x-3.7 z-.01 –I think I dented their runway z0 g03 x-3.7 y-.9 i0 j-.2 –Let’s get out of here before they remember me for that lousy landing g01 g90 x-1 f25 –A nice fast taxi home g03 x-.5 y-.4 i0 j.5 f15 g01 y.5 g03 x-1 y1 i-.5 j0 g40 g90 g00 x-1 y1 z0 –Home at last. I wonder if they’...

  • Page 53

    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 great adv...

  • Page 54

    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 solving for the start and stop points. The hardest part of this part of the course isn’t solving a right triangle...

  • Page 55

    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 ...

  • Page 56

    Figure 11 This program is just an exercise, and I’m not going to write any Z-axis code. The 0 starting point is located in the upper right-hand corner. Of course, we’ll also use cutter comp to generate this shape. Now, read the code I wrote and examine Fig. 11 again and visualize where the s...

  • Page 57

    x.5 g00 g40 g90 x0 y1 z0 m2 % With comments % g00 g40 g90 x0 y1 z0 g41 d1 x0 y.5 g01 y0 f16 Last time, I started at y1 position so I could enter into the cutter comp mode in two moves and coming in from the correct direction (remember—gear down-touch down). y-2.000 x-1.7032 g03 x-2.2013 y-2.45...

  • Page 58

    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 differences betwee...

  • Page 59

    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 60

    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 61

    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 62

    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 63

    m2 % 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 ar...

  • Page 64

    g01 x-1.6844 g03 x-1.5638 y.1858 r.15 g02 x-1 y0 r.3125 g01 y-.1 g00 g40 x-.5 x0 y0 z0 m2 % EMC Tip—Pausing a cut during a long program If for some reason you have to stop your machine while it's running a long program and you are planning to complete the part the next day, the safest way to ac...

  • Page 65

    3. Machining the same shape in different locations. Sub programs can be short and simple or very long and intricate. EMC2 uses “o” codes (this is the letter o, it is not Zero) for programming sub programs. Sub programs should be written in a g91 incremental format. If g90 was used the sub pro...

  • Page 66

    g00 z.3 y.25 g01 z-.3 g00 z.3 x-.25 g01 z-.3 g00 z.3 o200 endsub g90 g00 g40 g80 x1.0 y1.0 z0 (move into position for the starting point of the sub program) o200 call (call up sub program o200) g90 g00 x1.0 y-1.0 z0 (A g90 must be entered in the line of code calling for its ...

  • Page 67

    g01 z-.3 g00 z.3 o300 call (x move) o200 endsub o300 sub (mill shape) (mill shape g-code) o300 endsub (Main Program with a Sub Program Nesting Sample) g90 g00 g40 g80 g54 g17 x0 y0 z0 g90 g00 x1.0 y1.0 (move into position for the starting point of the sub program) o200 call (4 hole pattern) ...

  • Page 68

    the time to become more proficient with the skills you have learned up to now. Although these remaining commands are easier to learn than the ones you have been using, I’d suggest you take a look at my last two programs at the end of this section and read my closing comments before going on. Th...

  • Page 69

    g40 g20 g90 g00 g80 z2 x0 y0 g81 x2 y1 z-0.50 r0.010 f3 x3 x4 g00 g80 x0 y0 % The g82 command G82 is intended for drilling when you want a dwell at the bottom of the hole. (I find this a bad idea when drilling, because some of the more exotic metals like stainless steel may work harden and cause...

  • Page 70

    1. Move the z-axis only at the current feed rate downward by delta or to the z-position, whichever is less deep. 2. Retract at traverse rate to clear z 3. Repeat steps above until the z-position is reached. 4. Retract the z-axis at traverse rate to clear z. Example using a ¼" drill and p...

  • Page 71

    The g89 command G89 is intended for boring and uses a p value, where p specifies the number of seconds to dwell at the end of the hole. The problem with dwelling at the bottom of a bored hole, especially with a machine as light as a Sherline, is that tools have a tendency to chatter. I usually do...

  • Page 72

    Example using a ¼" drill and putting 3-holes in a row 1/4" deep: % g00 g20 g40 g80 g90 z0.50 x0.50 y0 g91 g81 g98 x1 y0 z-0.30 r-0.45 L3 f3 g00 g90 g80 x0.50 y0 % Example using a ¼" drill and putting 12-holes ¼ " deep: % g00 g20 g40 g80 g90 z0.50 x0.50 y0 g91 g81 g98 x1 y0 ...

  • Page 73

    More on the “L” command… Sherline’s shop foreman Karl Rohlin offers this sample "L" program, which is based on one we used in our own factory. It uses a standard g81 canned cycle with the "L" added to the canned cycle. (Note: Again, the letter “L” is capitalized he...

  • Page 74

    Change n10 to (g91 g81 x0 y0 z-.3 r-.1) (No "L" on this line. Now it will drill one hole at x0,y0). Now insert n12 (x.25 y0 r0 L4) (Now it will move to x.25, x.5, x.75, & x1.0 and drill to z-.40 at each place.) Note: Because the next move on line n15 is in incremental, the tool will...

  • Page 75

    The g99 command G99 avoids retracting a drill all the way up to the original z-position between moves, thus saving valuable time on a project that involves hundreds of holes. Example using a ¼" dia. drill and putting 8 holes ¼ " deep: % g00 g20 g40 g90 g80 z0.50 g91 g81 g99 x0 y0 z-0...

  • Page 76

    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 m2 % Now consider how much programming labor these canned cycles can save once you learn them. Twenty-eight lines of code was reduced to nine lines; however, I spent far more time just learning w...

  • Page 77

    immediate practical need for small precision parts, you are on your way to joining the leading edge of today’s modern machinists. Again, you should remember that Sherline hasn’t charged you a penny for the custom EMC2 program even though we have spent many thousands of dollars designing a sys...

  • Page 78

    FIGURE 20—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. Definitions and Codes The word definitions listed below were copied from the Linux CNC website. It’s where I gathered the infor...

  • Page 79

    I have highlighted in red bold face the main words we’ll be working with when using a Sherline machine, and, although many of these words we will not directly use, I wanted you to be aware of the codes used in industry. A CNC program “word” is defined as an acceptable letter followed by a r...

  • Page 80

    Table 3—g-code List g0 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 ...

  • Page 81

    There is some question about the reasons why some codes are included in the modal group that surrounds them. But most of the modal groupings make sense in that only one state can be active at a time. Note: It isn’t necessary to try to remember the words I highlighted. You’ll learn these as we...

  • Page 82

    Frequently Asked Questions The “Instructions and Utilities” CD that came with your computer or driver box contains a “Frequently Asked Questions” file called CNCfaq.pdf. An up-to-date version is also available on the Sherline website actionURI(http://www.sherline.com/CNCfaq.htm):at www.sh...

x