v1.1a


Operating Instructions for the Sherline Vertical Milling Machine CNC System

P/N 8540

Version 1.1a

NOTE: This version of the instructions was developed to support the Redhat version (2.xx) of EMC distributed until January 1, 2005. For those using this system, these instructions have been updated for correctness but left unchanged as far as procedures relate to use of this version. For instructions relating to the Debian version (4.xx) distributed after that date, CLICK HERE. There is virtually no difference between the two in the way the EMC functions. The differences are mainly in the way Linux works and files are handled.

The most up-to-date version of these instructions can always be found on the Sherline web site at www.sherline.com/CNCinstructions.htm.

EMC-related updatesA list of known issues, changes and updates that have been made to the EMC program

PRECAUTIONS

1.  Do not connect or disconnect stepper motors when the driver box is powered up. Always turn off power to the driver box before plugging in or unplugging a stepper motor. Improperly connecting or disconnecting a motor can damage it.

2. Make sure the stepper motor power supply on/off switch is in the OFF position before turning on the computer and starting EMC. Turn on power to the stepper motors only after EMC is fully up and running.

An introduction to Programming and Operating Your Sherline CNC Vertical Mill

By Joe Martin

A quick history of CNC

I’ve been personally involved with CNC since the early seventies and soon realized that this was the way to make things. Back then all sorts of ideas were being tried to simplify the mass production of machined parts. Many manufacturers were using hydraulic power and came up with some interesting systems. The method of choice before NC (back then they were called Numerical Control (NC) because the storage device was a one inch wide paper tape) was a tracing system that duplicated parts by tracing them with a hydraulic system controlled by a really neat valve controlled by a stylus that the operator would move like a probe and the machine would duplicate their movements. Gigantic machines were built around this idea for the aircraft industry.

Hydraulic CNC systems?

It was only natural that this was the group of manufacturers would be the first to try this new field, and did they ever come up with some weird systems. You also have to realize that electronics were also pretty crude during that same time period. My first NC machine was a Cinematic manufactured by Cincinnati machine tool. It had ball lead screws driven by hydraulic motors and was fairly reliable and quite popular at the time. Tool changers were still in their infancy. I ran it until it was so out-dated that I gave it away when it still ran. Another interesting point is this machine had a “wire wrapped” control with few circuit boards. If a recent graduate of electronic engineering had ever looked into the control enclosure, I’m sure his first comment would be “impossible.”

I thought I bought a telephone company

My first machine that was controlled by electronics turned out to be a disaster. I bought it used and it had a stack of manuals 18 inches high. I never dreamed I was going to look at every page but I did. When I opened the control and looked in there, I thought I bought a telephone company. I believe there were 120 individual circuit boards and thousands of individual transistors. It was manufactured by Edlund. We used to call it a “Deadlund.” I 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 invented for commercial use. What this control did was feed a single block of code (a block of code contained the instructions the machine needed to make a single move) into a very long piece of Nichrome wire. The high resistance of the wire would delay the signal long enough so the signal could be amplified at the other end and sent back on the same wire without interference. The signal would then bounce back and fourth until the machine had moved to a location that corresponded to that block of code.

Sometimes I can be persistently stupid

New machines were thousands of dollars more than I could afford and not that reliable either. I remember a friend who had a three-year-old machine that cost over $100,000 that needed service. The first thing the technician said was, “I didn’t think they had any of these old bastards still running.” You can imagine how my friend felt when he made that $2500 payment each month.

You think I would have learned by then, but I can be persistently stupid at times. My next disaster was a MOOG milling machine. It used a Bridgeport base and didn’t have leadscrews. It was entirely controlled by hydraulics. Movement was controlled by thin plates that moved with the machine slides with accurate holes located at every inch. Pins about 0.187" (5mm) would engage the proper hole and then another plate with holes spaced at 0.200" would come into play, and the last 0.200" relied on a single turn of a lead screw. The machine finally arrived at a position within a 0.001" of accuracy. I didn’t realize it when I bought it, but I was horrified to find that this mother worked like a player piano. The one-inch wide paper tape wasn’t read with switching devices like other machines. It actually was more like a valve that allowed or prevented air to get to cylinders that controlled hydraulic valves. When it read a block of tape (around 10 lines of holes of 8 holes each) the SOB sounded like a steam engine. I chalked that one off to having more balls than brains; however, we actually made more parts with it than we did with the Deadlund.

It should also be noted that I’m sure that these early NC machines were the best that could be designed with what was available, and the solutions that they came up with were quite ingenious at the time. I’m looking back at it from a slightly humorous position and in no way infer that the designers of that era weren’t up to the task. They just didn’t have the tools to work with that we do today.

The course is set

At this time, NC machines could only cut straight paths, and as soon as the electronics were available to store just a small amount of memory the new rage became “look-ahead” control systems. This meant the cutting tools wouldn’t create machining problems when they hesitated as the next block of information was read. Stepper motors were used for a short period to drive the lead screws; however, within a few short years the entire industry switched to DC motors. Encoders or resolvers were used to keep track of 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, eliminating the brushes needed with DC motors. The latest innovation is linear motors that can move machine slides at incredible speeds.

A new way of thinking

The marvelous part of the CNC revolution wasn’t just the fact that it was eliminating workers from sometimes very strenuous and boring jobs; it was that there was finally a method of cranking these handles in unison to do things that the best machinist in the world couldn’t accomplish. By moving screws on the X- and Y-axes in unison, you could machine tapers, circles and, in fact, any shape you wanted. This allowed engineers to design parts with the shapes that they wanted, not just shapes that were possible to machine using the old methods. Machines that cost thousands of dollars suddenly became scrap iron. These new CNC machines didn’t care if they were cutting a complex shape or a straight line. Whether the tolerance was tight or not the machine was always “right on,” and the tools determined the tolerances.

Ball lead screws—the missing ingredient

The lead screws used on these machines should be mentioned. They are the interface between the computers and the mechanics. The problem of backlash was solved with “ball lead screws.” These screws have re-circulating balls that roll in a groove ground into a shaft at a pitch of two tenths of an inch. The pitch on these screws has increased over the years to achieve speeds over 1000 inches (25 meters) per minute. At a pitch of .200² (5mm), a lead screw would have to turn at 5000 RPM to accomplish this speed, which is why ball lead screws have as high as one inch in pitch. Even more amazing was the fact that they improved the accuracy as they increased the pitch. You can make a .0001² (.025mm) correction on a good CNC lathe. Think about that. A slide will accelerate to a speed of over 1000 inches a minute in less than a second, move a short distance and decelerate, stop and still be accurate to one ten thousandth of an inch. The ball screws must be very precise, because a lead screw would be useless if it had any backlash (the amount you have to rotate a lead screw before the slide moves).

Ball lead screws are very difficult to make, which makes them quite expensive—several thousand dollars for each axis. The people who solved the lead screw problem should be commended as much as the electronic geniuses who came up with the computer controls. At Sherline, we have CNC machines that have been running over ten years and still don’t have any noticeable backlash.

Carbide insert tooling changed the entire machine tool industry

At the same time, carbide insert tooling became available and took the market over like a storm. I don’t think I could have ever convinced a machinist in the fifties that some day he would be taking 0.300" cuts on cold rolled at a cutting speed around 400 to 600 fpm (200 meters/min) using a 40 hp lathe at 0.020" (.5mm) feed rate for each revolution with little carbide tools made using powdered metal technology and held in place with little screws and get marvelous finishes on gummy old cold rolled at the 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 expensive form tools were on there way out. This may not seem significant, but by generating shapes rather than forming shapes, shapes could be far more precise and at the same time machines didn’t have to be so massive to prevent tools from chattering. Hand scraped ways were replaced by frictionless ingenious slides that lasted for years with little maintenance. Because there is always the possibility of a crash, machines are no longer built where the headstock is an integral part of the base casting, and in most cases they can be realigned if one of these disastrous events should happen.

Why I love CNC robots

In closing this section, I firmly believe that these machines that we call CNC are the robots of the future and I truly love them. They have allowed me, Joe Martin the designer, to design the parts that I’ve always wanted to design without dumping my problems on Joe Martin the machinist, who must produce parts for Joe Martin the businessman, who can supply you, the customer, a fairly priced quality product and at the same time allow Joe Martin the owner a reasonable profit to buy more of these marvelous CNC machines, of course. And so it goes.

Even though this doesn’t do the subject justice I thought you might find that interesting. It’s always wise to see at least a brief history of a subject before becoming part of it, even if it’s only statistical.

Here is something I wrote in my book that’s available online that you may find interesting.  See http://sherline.com/business.htm.

“THE NEW MANAGERS

CNC machines allow a smart worker to produce more work than ever. Rather than eliminating the need for intelligent workers, these machines require organizational skills that few managers have. The machines they control are very complex, and the employees who can control these machines are equally as valuable to a company as that of standard managers. In the past managers were considered people managers. The managers who control these machines are robot managers. When you consider how important these machines have become to the quality and efficiency of manufacturing a product, the group of workers that controls these machines will soon be equal to the managing staff of any company in prestige and wages. Today’s management still hasn’t grasped the concept of this point, but soon they will be forced to accept this condition when they find their million dollar machines operating at half speed.”

This CNC class is open to those willing to work hard

In order to make the following instructions more interesting for me to write and you to read I’m approaching the teaching of CNC programming the same as I would as if I were teaching a small class of students. The students who attend these specialized classes later in life have various reasons and expectations for being there, and I’m trying to address the whole class as I write. When I take off on a tangent I’m addressing individual 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 the spindle as an aircraft that you’re riding in. This may seem “far out there,” but CNC milling is a 3D world, and if you try to describe these movements in the movement of the table slides you’ll soon not know whether you are coming or going. You have to visualize the work staying still while the cutter moves. Again, bear with me and enjoy the flight.

An Introduction to the Sherline CNC System

A different way of learning

Long ago I became aware of the success rate of people who, when left alone with their video recorder and an instruction manual, failed to pass the test and had to stay up late to turn on their recorder to record a show they wanted to save. From their own statistics you would think manufacturers would have attempted to teach in a different manner, but they don’t. The products get more complex, making the instructions more complex, and the poor consumers of these products are at a loss. I don’t teach using these methods because they obviously don’t work. With my instruction you won’t be sure if you’re reading a novel or an instruction manual, but I’m sure you’ll be able to program and make a part when you get to the end.

The first instructions I completely wrote for my tools (I had written instructions about radio control equipment and rules for RC events in the past) were how to cut a screw thread using a rather crude device I designed (but which works well) for a Sherline lathe. I was surprised how few calls on how to use it came in after I sold my first 200, because it is a bit of a complicated thing to do. I then started to wonder if anyone was using it, and you’ll never know how relieved I was when a customer came in with a bunch of parts that he made with threads on them.

I knew I was on to something and have always written in this style ever since because it works. It had to work because at that time I was the only one at my company could answer questions of this type, and I didn’t have time. The fact that I’m a self taught person probably has something to do with it. I even went on to write a couple of books in this style that were well received. 

A new challenge

I remember getting a call from Sears about my folksy style of writing that didn’t follow Sears’ instruction guidelines about the screw cutting attachment. I asked him how many calls they had received about how to cut threads using it. He answered, “none.” I asked him who there could answer a technical question of this type. He answered, “nobody.” I said, “With this being the case, don’t you think you should leave well enough alone?” I never heard from him again. Right now, I’m looking at these instructions as one of the biggest challenges I’ve ever taken on as an author, and I don’t plan to fail. The average instruction manual written on this subject is two to three hundred pages of very technical reading. You’ll never crack a smile reading one of these manuals. I’ll do it in less than fifty.

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 was so broke after I bought my first NC I 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 attempting to teach their own students.

Sherline customers want to build components

I saw the customer who was going to read these instructions as a person who wasn't particularly interested in computers or gadgets and was only interested in making parts. I believed they were curious about CNC and wanted to learn about it without spending too much money. They probably haven't tried to learn how to do something this complicated in the last 20 years. Remember that CNC is a new way of doing and thinking about the machining process, and I believe I’ll help get your brain in tune with what you are about to learn with my ramblings.

Learning while you work

A student of this class could be already working at the trade. Words of advice for this group: You can’t afford to have idle thoughts as you load parts on machines that other people set up and wrote the programs for unless you are satisfied to load parts for the rest of your life.

First study the mechanical part of the setup; things like how the part is held and the type of cutting tools used and how long they last. You have to show some initiative and start analyzing the program you are running and ask intelligent questions. Notice, I said intelligent questions. Bosses are usually smarter than you think they are, and they easily know when some when clown is pulling their chain. Don’t ever make suggestions unless you are sure you are right. A better way to make a suggestion of this type is to ask them just why the job is set up or run the way it is rather than your way. That way you’re not threatening them with your question, and they’ll appreciate a chance to teach you if you are wrong. If you find out you were wrong, it gives you a way out by saying that you were sure that they must have had a good reason. It wouldn’t hurt to let that rule work its way into your personal life.

When you start studying their programs, you’ll find them written like a story. Just like a book, the better the author, the easier the program is to read. Each tool used will have its own chapter. (In the real world of machining you’ll run few machines without automatic tool changers.) Study these chapters one at a time and watch what the machine does as the program advances. In case you didn’t realize it, I’m also instructing all you hobbyist out there on how to organize your programs and setups. Plan them like someone else is going to run the job and pick apart your own work. If you don’t, you might find yourself trying to machine your vise off the table.

Getting you into the learning mode

I also felt that people of this type would want to read something about what they are in store for before they started. I wanted my customers to understand just how difficult CNC 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 marvelous new CNC machines. I know how easy it is for you to 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 a simple single system like a VCR, but instructions about controlling a very complicated device. You are not operators of these marvelous machines; you are masters telling your robot what to do, and you, the controller, have unlimited choices to make. I want to get this concept through to that average customer I mentioned, yet I know that only one out of five professional machinists I know seems to really understand this point.

I’m going to be a student in my own class

I was shocked at just how much I had forgotten about the process of CNC programming. I probably know as much as anybody of what you can do with CNC machines, because I own at least 20 modern machining centers, yet I haven’t really written any code in 15 years. After thinking about it for a couple of days while unsuccessfully attempting to write a simple program I decided this is a good thing. I also decided that I’d learn this from the Linux site on my own and not use the books that were available to me. I believed that if I wrote the instructions as I learned how to program EMC myself I’d write better instructions; after all, all you have to be is one page ahead of your students to teach. Just joking, teachers.

Something for nothing

Sherline Products Inc. is not charging you for this EMC program, and it is free because of work done by NIST (National Institute of Science and Technology), a government funded organization. The EMC (Enhanced Machine Controller) was written by the NIST and is a very sophisticated program. We all now have the benefit of millions of dollars of programming along with the source code, if needed, simply by asking.

We all owe thanks to the EMC group who donated their time

At the time this program was written it was thought that only very advanced programmers and scientists would be using a program such as this, and the average person stood little chance of making it functional. Fortunately for us, a lot of very smart people before us, donating their time, started developing a programming interface that allowed both businesses and hobbyists to take advantage of what they had done without being engineers. I’m very pleased with what they have done. This group still works together through the Internet, and help is available through Internet chat groups.

Many of the people who have donated much of their time to make this system “user friendly” have one thing in common. They are sick of a Microsoft dominated world. The EMC program operates under the Linux operating system, which is also a free system, and it would be wise to operate it from a dedicated computer for this task. A dual boot system can lead to problems, because Microsoft code has been purposely written to 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 customers or not. It will be my donation towards a 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.  http://www.linuxCNC.org/

You will be learning the CNC language of the robot world

The standard “G” code method of programming is to simply replace the manual inputs into a machine (cranking the handles) with the commands that have become industry standards. This is the method you should learn before learning any other method of programming. It is the basic way that CNC machines “talk” to other CNC machines. Even if a simpler system were available today I still wouldn’t teach it. It would be similar 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 that allow you to do contouring quickly become very complex. Today there are some affordable programs available for sophisticated hobbyists. These programs can create as many problems as they solve, because of the complexity of each program. Each program has to work with other programs, and each program has its own set of complex rules. If you think you can learn these programs easier than you can solve a couple of trig problems you’re in store for a rude awakening; however, if you already know how to use 3D CAD programs you could quickly find these programs very useful. It should also be stated that it is the only way available to create contoured machined shapes.

What it costs in the industrial world

The basic method that these programs work together in the industrial world and the cost of these programs is: 1) The part is designed using a modeling program ($5000 to $10,000), 2) The modeling program is converted to a CNC program (another $5000 to $6,000) and 3) the resulting code is run on a CNC machine starting at ($25,000) that makes the part. The people who can operate these systems are carefully chosen, trained and well paid. The fact is that any business has no choice except to use the program they purchased, because the programs cost so much and are so very necessary to remain competitive in today’s world. They have to spend a great deal of money to accomplish this, while the hobbyist has a choice.

Today’s low-cost programs were once complex, expensive programs

The business world understands how complex it is to implement these procedures; the hobbyist doesn’t. Because the hobbyist may be purchasing a program that cost thousands of dollars just a few short years ago for a few hundred dollars, the programs themselves haven’t become less complicated. They only cost less! In your mind you may be having visions of complex shapes being machined with little effort on your part while your two thousand-dollar investment turns out parts that the old masters of the machine trades would envy. Well my friend it’s possible, but it’s time to come down to earth and again think about the complexities of doing so.

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 to make complex parts in an efficient manner, 4) The cost saved by not having to pay for this marvelous programming system will allow you to purchase a separate dedicated computer to drive your mill and 5) There’s great bunch of smart people working on EMC to constantly improve the system and make it easier to use in the future and remain current.

This is going to be easy if you do it my way

The Linux operating system is similar to use to all others, and I’ll try and mention things that are a little different in using the EMC program. To start with, you don’t have to double click to enter a program, so a single click on the big red “S” (Sherline, not Superman) with the file name “inch_freq” underneath, and after a few seconds you’ll get the graphical interface to the EMC. Well, that was easy. Now, after BS-ing you to death on how hard this was to do I’m going to show you how easy this can be, but only if you do it my way.

Computers have the patience of a saint

If you’ve had little computer experience the first thing you will learn is that computers have the patience of a saint. If computers were more human they would probably like to toss their operators out the window as much as frustrated operators want to do the same to them. The only way you can keep a computer from giving you an error message is to not give it errors. The tricky part is computers don’t always tell you the error to fix or how to fix it. Computers just tell you that there is an error of a certain type. This can become maddening, and you have to know when to take a break and walk away. Things of this nature are the worst when, for the sake of your own sanity, they should be the best. In many ways, learning programming is similar to learning machining. You can’t take short cuts. If you find yourself going in the wrong direction, back up immediately.

Learn machining first

If you know little about machining and little about computers I’d suggest you first concentrate on learning about machining. How can you expect a machine tool and a computer to carry out your commands if you don’t know the commands to give? Above all, don’t start with a project so complex you don’t stand a chance in hell of succeeding.  Let each simple problem solved have its own rewards in knowing you just traveled another block further down the CNC machining super highway, route EMC.

NOTE: Joe Martin has written a book called Tabletop Machining that is an introduction to metalworking at the small end of the size scale. Details can be found at www.sherline.com/bookplug.htm. If you are new to machining, you will find the information in this book quite helpful.

Cutter compensation—what makes CNC work in a machining environment

I could have sneaked out the back door and only wrote instructions for a couple of simple moves without cutter compensation and let it go at that; but deep down inside, I’d have known I was cheating you out of the real benefits of CNC. I believed that if I started teaching you to use this marvelous programming tool right at the very start it will soon be second nature, and our class will leap-frog ahead of our competition with those thick boring books being taught by instructors I wouldn’t let near the least expensive CNC machine in my shop.

If you take the effort to learn this method of programming at the start along with a little simple trig, you’ll find it well worth the effort. Cutter offsets are the way you control size with modern CNC machines. When you start making more complex parts and you don’t use cutter comp you’ll have to change the basic numbers of your programs to make a part 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

Back in ancient times the great mathematician Euclid told a Pharaoh who wanted to learn geometry the easy way that Pharaohs had to walk down the same road as scholars to education. In a sense I’m also stating to you that you will have to learn programming the same way as I’m about to, and at this time I’m only a couple of pages ahead of you. I am certain that if I sat by the phone and answered questions twenty-four hours a day, and I don’t plan to, I couldn’t help those who aren’t willing to put forth the effort it takes on their own to learn to work with these marvelous tools.

Route EMC

This road that you are beginning to travel can become one of the most interesting roads you have every traveled; however, you must take the time to gather the facts that can make a trip so interesting. Instead of seeing great ancient cites on this road we’ll be gaining the knowledge that will make our next stop even more interesting and more complex. We’ll study a little and then apply these rules to your machine. We will first make simple moves that become more and more complex and at the same time more interesting as we travel on. Eventually we will reach Martinsville, a city on this road, where you will have so many choices as to the direction to travel that you’ll be leaving me and heading out on your own to design and build things that you never thought possible in the past. The rules and facts that you will learn on this road will allow you to have a machine at your control that home machinists a few short years ago couldn’t dream of. Take the time to enjoy this trip because you’re on a road with no end if you have set your goals correctly.

You may want to consider a CAD program in the future

I’m going to close this section off by inserting something I wrote about learning and using AutoCad®. The ease with which many of the programming problems can be solved has to be mentioned at this time; however, I wouldn’t recommend dropping what you are doing. From what I understand there are several excellent programs available at very reasonable cost, but I don’t want to recommend any particular program.

The following paragraph is from my book “Tabletop Machining.” It covers some of my comments about learning to use a CAD program.

“Learning AutoCAD®

The first task I took on to learn the program was to lay out and design a set of bevel gears that could be cut on a Sherline mill using a rotary table mounted on an angle plate. By drawing the cross sectional view accurately, the angles needed to cut this gear could be taken directly off the drawing without using a trig table or a calculator. I was beginning to see the light.

I’m getting pretty good at using the program now and it has put a lot of the fun back in designing for me. Looking over my partner Carl’s shoulder at an assembly designed by computer was of no help for me, and I would need a standard full 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 fascinated with the program because it does a drawing without errors when used properly. The program eliminates much of the boredom of adding and subtracting numbers as you go. Accuracy isn’t attained by the precision of your lines but rather by the accuracy of the information the program is given. Angles are not derived from a protractor and using divider points but from calculations by a computer to as many decimal places as needed.

I learned drafting in high school back in the fifty’s. My problem was I was a “slob” when it came to drafting a pretty drawing. My numbers and views would be correct, but my lettering and lines weren’t neat enough. Things have changed now with the aid of this program and my lettering is just as good as the best. I can no longer spill gobs of ink on an almost completed drawing and have to start over. I can change my mind as much as I want without irritating anyone. I’m a happy man.”

-------------------------------------

Operating Instructions

Part 1

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 workmanship, Sherline will repair or replace it free of charge. In addition, it has always been our policy to replace at no cost all parts, regardless of age, which are determined to have been incorrectly manufactured or assembled and have failed due to this cause rather than because of improper use or excessive wear caused by continuous use in a production environment. In cases such as this, Sherline will inspect the machine or part and will be the sole judge of the merit of the claim.

Freight charges for returning a machine are not covered. Save the original packaging material to use if the machine or computer must be returned to the factory for service. Sherline will not participate in insurance claims where the sender didn’t make an honest effort to package the items to prevent damage caused by normal shipping stresses or repair said damage without charging the sender.

Merchandise that has been abused, misused, improperly maintained or insufficiently lubricated is not subject to warranty protection. Proof of date of purchase and dealer name may be required for service under this warranty.

Specific exclusion for wear due to production use

Although many Sherline tools have found there way into production environments, they have been designed for intermittent use in home shops. It would be unreasonable to 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 are subject to high wear due to continuous usage are not covered under this one-year warranty.

Non-warranty service and machine tune-ups

Sherline machines are easy to service, and all replacement parts are available from the factory. However, if in the future you wish to return your machine for any reason to have Sherline repair or adjust it, we will be glad to do so. Our shop rates are very reasonable and our production people have all the proper tools and fixtures to repair or service your machine quickly and return it to factory new condition.

Returning machines or parts for warranty or non-warranty repair

Before returning any tools or parts for repair, please call first and obtain a Return Authorization (RA) number so that we can process your order immediately upon receipt. Remove all non-essential parts from the machine to save shipping weight and return only the portion to be repaired. Wrap and package all parts securely so they cannot move around in shipment. We recommend that heavy parts be double-boxed. Include a brief written description of the desired repair and your return address and phone number or e-mail address inside the box so we can contact you if questions arise. Repairs are normally return-shipped the next workday after they are received.

Safety Rules for Power Tools

1. Know your power toolRead the owner’s manual carefully. Learn its application and limitations as well as the specific potential hazards peculiar to this tool.

2. Ground all toolsIf a tool is equipped with a three-prong plug, it should be plugged into a three-hole receptacle. If an adapter is used to accommodate a two-prong receptacle, the adapter wire must be attached to a KNOWN GROUND. Never remove the third prong.

3. Keep guards in placeand in working order.

4. Remove adjusting keys and wrenchesForm a habit of checking to see that keys and adjusting wrenches are removed from the tool before turning on any machine.

5. Keep work area clearCluttered areas and benches invite accidents.

6. Avoid a dangerous work environmentDo not use power tools in damp or wet locations. Keep your work area well illuminated.

7. Keep children awayAll visitors should be kept a safe distance from the work area.

8. Make your workshop “kid-proof” with padlocks, master switches or by removing starter keys.

9. Do not force a toolDo not force a tool or attachment to do a job for which it was not designed. Use the proper tool for the job.

10. Wear proper apparelAvoid loose clothing, neckties, gloves or jewelry that could become caught in moving parts. Wear protective headgear to keep long hairstyles away from moving parts.

11. Use safety glassesAlso use a face or dust mask if a cutting operation is dusty.

12. Secure the workUse clamps or a vise to hold work when practicable. It is safer than using your hand and frees both hands to operate the tool.

13. Do not overreachKeep your proper footing and balance at all times.

14. Maintain tools in top conditionKeep tools sharp and clean for best and safest performance. Follow instructions for lubrication and changing accessories.

15. Disconnect toolsUnplug tools before servicing and when changing accessories such as blades, bits or cutters.

16. Avoid accidental startingMake sure the switch is “OFF” before plugging in a power cord.

17. Use only recommended accessoriesConsult the owner’s manual. Use of improper accessories may be hazardous.

18. Turn the spindle by hand BEFORE switching on the motorThis ensures that the workpiece or chuck jaws will not hit the lathe bed, saddle or crosslide, and also ensures that they clear the cutting tool.

19. Check that all holding, locking and driving devices are tightenedAt the same time, be careful not to over-tighten these adjustments. They should be just tight enough to do the job. Over-tightening 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 lathe or any other precision tool is kept near an operating grinder, it should be kept covered when not in use.

21. Don’t let long, thin stock protrude from the back of the spindle—Long, thin stock that is unsupported and turned at high RPM can suddenly bend and whip around.

22. Wear your safety glassesForesight is better than NO SIGHT! The operation of any power tool can result in foreign objects being thrown into the eyes, which can result in severe eye damage. Always wear safety glasses or eye shields before commencing power tool operation. We recommend a Wide Vision Safety Mask for use over spectacles or standard safety glasses.

23. Disconnect the computer from all power sources before opening case—With the computer power switch off, some of the internal components of your computer are still electrical hazards and can provide a severe electrical shock. Disconnect the computer from the power source before opening the case to eliminate this possibility of an electrical shock.

24. Static electricity can damage your computerBefore touching any components inside your computer, be sure you are properly grounded. A spark of static electricity can damage delicate circuits in some components in your computer. Either wear an approved static electricity grounding strap around your wrist or touch the case of the computer with one hand before touching any components with your other hand.

25. Be sure you know what will happen BEFORE pushing the [START] buttonRun your program in [BACKPLOT] mode before running the actual part to make sure it will run the path your are expecting. Make sure your machine is in the proper home position before starting the operation.

Electrical Connections

The power cord supplied is equipped with a 3-prong grounding plug that should be connected only to a properly grounded receptacle for your safety. Should an electrical 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 receptacle cover screw.

NOTE: The electrical circuit designed into the speed control of your lathe or mill reads incoming current from 100 to 240 volts AC and 50 or 60 Hz and automatically adapts to supply the correct 90 volts DC to the motor. As long as you have a properly 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.

Lubrication

CNC machines require more attention to keeping the leadscrews properly “oiled” than manual machines. When you crank the handles by hand you can quickly realize that a slide is going dry because you can sense the results of the extra drag. A CNC machine 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. The best way I have found to lubricate it is to move the mill table all the way to the right, put some oil on your fingertips and transfer it to the leadscrew. As the table is moved back to the left, oil will find its way to the internal brass nuts. Remember, that any type oil is far better than none. The slides also require constant oiling. I believe these oiling procedures should be done after every four hours of operation. For more on lubrication see page 5 of the Sherline Miniature Machine Tools Assembly and Instruction Guide that came with your mill.

Machining Tip—Use multiple end mill holders as a quick way to change tools

Sherline 3/8" end mill holders P/N 3079 offer a quick and accurate way to change tools. If just one tool holder is used, the cutter height must be adjusted each time it is changed. If multiple holders are used, each with its own tool pre-adjusted to the correct height, tools can be interchanged quickly with excellent repeatability on their height setting.

Linux/EMC Technical Help

If you have technical questions that cannot be answered by Sherline, you should consult with the developer's of Linux and EMC through their web site at www.linux.org. Linux developer and expert Ray Henry is available for consultation at $60.00 per hour. Ray is an expert in the many phases of the Linux EMC CNC program including Installation, CNC programming, the Sherline CNC mill and the Linux operating system. You’ll find Ray a very pleasant and knowledgeable person to deal with. Use your time wisely by making every attempt to solve your particular problem yourself by re-reading the instructions and working through the program before calling. Ray can be contacted at rehenry@up.net or (906) 875-6692, 9 AM-9 PM (Central Time Zone).

Remember that Sherline hasn’t charged you a single penny for the Sherline version of the EMC program even though we have spent a considerable amount of money and time adapting the EMC program to the Sherline mill. We also don’t have anyone available at Sherline with Ray’s expertise to answer programming and installation questions. However, if you have a problem with a defective machine or accessory manufactured by Sherline, please feel free to contact us.

System Components and Connections

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-axis stepper motor

7) X-axis stepper motor

8) Cable for optional A-axis connection

9) Computer with CD-ROM and Floppy drives, keyboard and mouse

10) On/Off switch for stepper motor power supply

Connections on back of your computer:

1) Keyboard connector cable (purple)

2) Mouse connector cable (green)

3) Computer power switch

4) Connector from driver board to parallel printer port

5) Connect your monitor here (blue)

6) Power cord

7) On/Off switch for driver power supply

8) Output cables to stepper motors for A-, Z-, Y- and X-axes

 

Assembling your system

Getting your system up and running is a simple task. It consists of assembling your mill and connecting it to the computer as follows:

Mill

Unpack and assemble your machine according to the instructions included in the Sherline Assembly and Instruction Guide packed with the mill.

Computer

Unpack the computer and enclosed components. Connect the stepper motor cables leading from the back of the computer to each of the three stepper motors. A fourth cable is unused unless you have purchased an optional rotary table that can be connected here as a 4th (A) axis. Plug the purple keyboard cable and the green mouse cable into their receptacles. Plug your monitor to the blue monitor receptacle. Insert the female end of the power cord into its receptacle in the computer and plug the male end into a properly grounded wall socket or surge protected power strip. Turn on the computer and monitor but leave the power switch to the stepper motors in the “off” position for now.

Opening the instructions file on the computer

If you are not familiar with Linux, you will find the desktop that opens when your computer starts up to be comfortingly similar to the Windows® or Mac® desktop you are used to. On the desktop you will see images for several files. Using your mouse, click on the file labeled “EMC Instructions” to open it. The instructions can also be found on the enclosed CD as well as at Sherline’s web site at www.sherline.com/CNCinstructions.htm.

Please read all the instructions before attempting to use the EMC program to run your mill. CNC machining is a complicated process, and you will be directed at the proper time to run a program on the machine once you have gained the knowledge you need to do so.

Familiarizing yourself with the control panel


The Sherline Graphical Interface

By Ray Henry and Joe Martin

Start your engines

After having connected everything as shown in the reference photos above you will need to turn on the computer but not the motor drivers (the drivers are the individual circuitry that control the stepper motors) to see how this system runs. The power switch for the computer is located on the front of the computer; it is the large round button in the center. The driver power switch is located on the left side of the computer as indicated in the above photo. Up is on, and down is off.

When the computer is turned on, text will start scrolling on your monitor. After a short period of time a box or window will appear that asks for a login and password. The login will be “root” and the password will be left blank. Left click the [Go] button with your mouse and the desktop (the basic opening screen of a program) will appear with many icons (small pictures representing a variety of different programs). Next, single click on the large red “S” icon that is labeled “Inch_freq.*” This will initiate the start of the Sherline EMC system. It will take several moments to start—sometimes up to 30 seconds to a minute.

*This assumes your mill has inch leadscrews with 20 threads per inch. Should you be using this control with a Sherline machine that is equipped with 1-mm pitch metric leadscrews, choose the MM_step” icon instead.

Inch vs. metric dimensions

By default your Sherline CNC system works in inch dimensions. Should you wish to use metric dimensions to program your machine, even though it has an inch leadscrew, you can do so by entering the code g21 in place of the g20 code when writing the program for your part. G20 indicates inch increments, while entering g21 indicates you will be using metric increments. The program will automatically make the translation for you. You can also use inch dimensions on a machine with metric leadscrews by using the g20 code instead of g21 once the proper version of the EMC has been opened.

I had Ray Henry put together the interface specifically for the Sherline CNC. He also wrote much of “The Sherline Graphical Interface” section of the instructions. Many of 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 a general motion interface to the EMC. With it you can jog any axis. You can set coordinate systems and tools. You can verify and view the spindle path and motion in a built in program called “Backplot” and dry-run a program before running the machine. The panel is laid out in a sensible manner and is easy to understand.

 

FIGURE 1—The control panel

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 section of the control panel that is sometimes called a “pop-in.” This will allow you to view the editor, plotter, tool page and coordinate page. If more than one pop-in is active (button shown as red) you can “toggle” between these pop-ins by right clicking your mouse.

Below the menu line is a line of control buttons. These are the primary control buttons for the interface. Using these buttons you can change mode from [MANUAL] [AUTO] [MDI] (manual data input). You can also use [FEEDHOLD] or [ABORT] to stop or abort a programmed move. When you press the [FEEDHOLD] button it changes color and becomes a [CONTINUE] button.  It toggles between running and pausing.  Feedhold has the advantage of being able to restart the program from where you stopped it. When all else fails press a software E-Stop.

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

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 [AUTO] mode it displays a set of buttons that allow you to load a part program, view the current location and [Run] it. In [MDI] mode it displays a line where you can enter your command in standard programming code.

 

FIGURE2—The screen with BACKPLOT displayed

If you compare the second screen shot with the first you can see that we are in now auto mode, a program has been run, and the tool path is being displayed using Backplot.

Notice that the display position numbers have changed color. When you start first load the EMC program, the slide location position will be displayed in gold. This means that a homing routine has not been done yet. Once an axis has been homed, the numbers turn dark green.

Feedhold and Feedrate Override

You can operate feedrate override and feedhold in any mode of operation. Override will change the speed of jogs or feedrate in manual or MDI modes. A feedhold will be initiated if you click the [FEEDHOLD] button or if you press the pause button on the keyboard. Once in feedhold, the same actions will return you to the speed the machine was moving before the feedhold.

You can adjust feedrate override by grabbing the slider with your mouse and dragging it along the groove. You can also change feedrate a percent at a time by clicking in the slider’s groove. In auto mode you can also set feed override in 10% increments by pressing the top row of numbers on your keyboard. The number 1 will set feed rate override to 10 percent of programmed or jog speed.  The number 9 will set 90 percent.

Messages

The message display located under the axis positions is a sort of scratch pad for the EMC. If there are problems it will report them there. If you try to home or move an axis when the [ESTOP] button is pressed, you’ll get a message that says something about commanding motion when the EMC is not ready. If an axis faults out for something like falling behind, the message pad will show what happened.

If you want to remind yourself to change a tool for example, you can add a line of code to your program that will display in the message box. Example: (msg, change to tool #3 and press resume) will display “change to tool #3 and press resume” in the message box. The “msg,” comma included is the command to make this happen; without “msg,” the message wouldn’t be displayed in the message box.

To erase messages simply click the message button at the top of the pad or hold down [Alt] and press [m].

Manual Mode

Manual mode shows a set of buttons along the bottom of the right-hand column. A green button labeled “ALL ZERO” has been added to designate the present position as the home position. I felt that a machine of this type would be simpler to operate if it didn’t use a machine home position. This button will zero out any offsets and will home all axes right where they are.

Axis Focus (Active)

Axis focus is important in manual mode. Notice that in Figure 1 above you can see a line or “groove” around the X-axis position display. This groove says that X is the active axis. It will be the target for jog moves made with the plus and minus jog buttons. You can change axis focus by clicking on any other axis display. You can also change axis focus in manual mode if you press its name key on your keyboard. Case is not important here. [Y] or [y] will shift the focus to the Y-axis. [A] or [a] will shift the focus to the A-axis. To help you remember which axis will jog when you press the jog buttons, the active axis name is displayed on them.

Jog Mode

The EMC can jog (move a particular axis) as long as you hold the button down when it is set for “continuous,” or it can jog for a preset distance when it is set for “incremental.” You can also jog the active axis by pressing plus [+] or minus [-] keys on the keyboard. Again, case is not important for keyboard jogs.

The two small buttons between the large jog buttons let you set which kind of jog you want. When you are in incremental mode, the distance buttons come alive. You can set a distance by pressing it with the mouse. You can toggle between distances by pressing [i] or [I] on the keyboard.

Incremental jog has an interesting and often unexpected effect. If you press the jog button while a jog is in progress, it will add the distance to the position it was at when the second jog command was issued. Two one-inch jog presses in close succession will not get you two inches of movement. You have to wait until the first movement is complete before jogging again.

Jog speed is displayed above the slider. It can be set using the slider, by clicking in the slider’s groove on the side you want it to move toward, or by clicking on the [Default] or [Rapid] buttons. This setting only affects the jog move while in manual mode. Once a jog move is initiated, jog speed has no effect on the jog. As an example of this, say you set jog mode to incremental and the increment to 1 inch. Once you press the [Jog] button it will travel that inch at the rate it started.

Keyboard Jogging

When the control is in manual mode you can also control the slides using the keyboard cursor control arrows. The slides will move in the direction the arrows point, and the Z-axis can be raised or lowered using the [Page Up] or [Page Down] keys. The speed the slides move at will be determined by the manual feed rate setting.

Auto Mode

Yes, you can move the machine around in manual mode. You can even do some tolerable milling in manual mode, so long as you work a single axis at a time and set jog speed for the feedrate that your tool, machine, and material need. The real heart of CNC machine tool work is the auto mode.

Sherline’s auto mode displays the typical functions that people come to expect from the EMC. Along the top are a set of buttons which control what is happening in auto. Below them is the window that shows the part of the program currently being executed. As the program runs, the active line shows in white letters on a red background.

The first three buttons, [Open], [Run], and [Pause] do about what you’d expect. [Pause] will stop the run right where it is. The next button, [Resume], will restart motion. They are like “feedhold” if used this way. Once [Pause] is pressed and motion has stopped, [Step] will resume motion and continue it to the end of the current block. Press [Step] again to get the motion of the next block. Press [Resume] and the interpreter goes back to reading ahead and running the program. The combination of [Pause] and [Step] work a lot like single block mode on many controllers. The difference is that [Pause] does not let motion continue to the end of the current block.

Feedrate Override and Auto Mode

The number buttons along the top of the main keyboard will change feed rate whenever you are in auto mode. Pressing the gravé [`] gets you zero percent feed rate. One through zero gets you ten through 100 percent feed rate. These keys can be very handy as you approach a first cut. Move in quickly at 100 percent, throttle back to 10% and toggle between [Feedhold] and 10% using the keyboard’s pause key. When you are satisfied that you’ve got it right, hit the zero to the right of nine and go.

Verify

The [Verify] button runs the interpreter through the code without initiating any motion. If verify finds a problem it will stop the read near the problem block and put up some sort of message. Most of the time you will be able to figure out the problem with your program by reading the message given and looking in the program window at the highlighted line. Some of the messages are not real helpful. Sometimes you will need to read a line or two ahead of the highlight to see the problem. Occasionally the message will refer to something well ahead of the highlight line. This often happens if you forget to end your program with a %, m2, m30 or m60.

Restart

To the right of the program window is a space that will show a set of restart functions. These pop in whenever a program is aborted or an EStop happens while the interpreter is running or paused. You can also display or hide these using the view menu.

I’ve got to warn you that [Restart] can be risky. [Restart] reads down through the program to the restart line. While it does this it sets up its “world model” so that it can resume right where it stopped, but only if the tool is right where it was. Most of the time, when we abort or EStop it’s because something went wrong. Perhaps we broke a tool and want to change it. We switch to manual mode and raise the spindle, change tools, and assuming that we got the length the same, get ready to go on. If we return the tool to the same place where the abort was issued, the EMC will work perfectly.

It is possible to move the restart line back or ahead of where the abort happened. If you press the [Back] or [Ahead] buttons you will see a blue highlight that shows the relationship between the abort line and the one on which the EMC stopped. By thinking through what is happening at the time of the restart you can place the tool tip where it will resume work in an acceptable manner. You will need to think through things like tool offsets, barriers to motion along a diagonal line, and such before you press the [Restart] button. 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 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 look under the info menu and select active g-codes. This listing can be very handy. I often forget to enter a g00 before I command a motion. If nothing happens I look down there to see if g80 is in effect. G80 stops any motion. If it’s there I remember to issue a block like g00 x0 y0 z0. In MDI you are entering text from the keyboard so none of the main keys work for commands to the running machine. [F1] will Estop the control.

Pop-in Editor

The editor is rather limited compared to many modern text editors. It does not have “undo” nor “paste” between windows with the clipboard. These were eliminated because of interaction with a running program. Future releases will replace these functions so that it will work the way you’ve come to expect from a text editor. Beware that you could lose the portion of your program that is highlighted by pressing any key. Use the save command often.

It is included because it has the rather nice feature of being able to number and renumber lines in the way that the interpreter expects of a file. It will also allow you to cut and paste from one part of a file to another. It will also allow you to save your changes and submit them to the EMC interpreter with the same menu click. You can work on a file in here for a while and then save and load if mini is in auto mode. If you have been running a file and find that you need to edit it, that file will be placed in the editor when you click on the editor button on the top menu.

Backplot

[Backplot] will show the tool path that can be viewed from a chosen direction. “3-D” is the default. Other choices and controls are displayed along the top and right side of the pop-in. If you are in the middle of a cut when you press one of these control buttons the machine will pause long enough to re-compute the view.

Along the right side of Backplot is the pop-in that you can display with the [SETUP] button. This will show a small graphic that tries to show the angle you are viewing the tool path from. Below it are a series of sliders that allow you to change the angle of view and the size of the plot. You can rotate the little position angle display with these. They take effect when you press the [Refresh] button. The [Reset] button removes all of the paths from the display and readies it for a new run of the program but retains your settings for that session.

Pop-in Tool

The tool page is pretty much like the others. You can set values here and they become effective when you press the [Enter] key*. You can’t change tool offsets while the program is running or when the program is paused. The [Add Tools] and [Remove Tools] buttons work on the bottom of the tool list. Once a new tool has been added, you can use it in a program with the usual commands.

*Always use the [Enter/Return] key at the right side of the normal alpha keyboard, not the [Enter] key at the bottom right of the numeric keypad.

Limit switches

I felt that limit switches were unnecessary when using stepper motors with limited torque such as these. The switches have to be mounted in areas where they are exposed to chips, oil and coolant creating more problems than they eliminate. The Sherline mill is fitted with “Hard Stop” screws on the X and Y axes that limit travel. These stops are the heads of cap screws fitted to the table and base and positioned to stop a runaway axis without damage. If you make a programming error that would drive the table into a crash situation by over-traveling, the table will encounter these hard stops before damaging the leadscrews and nuts.

You could also locate a home position from these hard stops by stalling the stepper motors against them. Of course you should do this in manual mode and by bringing the table against the hard stop carefully in slow speed and "buzz" the motor against it. I personally would find a different way of locating a home position, using the dials on the handwheels for example, but it is an option for unusual situations.

It should also be noted that the hard stop screw would have to be removed from the left underside of the table in order to have the full nine inches of advertised X-axis travel. With the stop screw in place travel is about 8.65".

 Manual vs. CNC

Let’s think about what we have to do to write a program for CNC:

1) Create a spot on your storage system.

2) Write a program.

3) Make sure it doesn’t have any errors using the Backplot system

4) Dry run the program with the spindle well out of the way so it can’t possibly crash.

5) Now, 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 while your little Sherline just works its butt off for you making good parts.

When you think about this, it has the same steps as to do it manually. Compare:

1) Make some special tooling to hold the special shape. With CNC you can hold raw stock in a vise and machine the shape you need.

2) We’d have to store the special tools in case we wanted to make another one.

3) You’ll make a lot of scrap with a manual machine if you don’t double check your work before making the first cut, and you will not have a computer to help you as you do with EMC.

4) No matter how you do it, you always have to line up the work to the machine.

5) Don’t put the coffee on yet because your real work has just begun while our boy with the CNC is pouring a second cup and making 7th part of ten pieces. (Oh, how I wish it could be this easy at the start!)

How to make a file for our programs and use “Backplot” to check them

1) To create a new file or work with any existing programs we have to be in the [AUTO] mode. Notice that a new line of commands appears along the bottom in this mode. The [Open] button is located in the along this row. Note: the method I’m describing in A) to E) below is to set up your computer for future use and isn’t the necessary steps you’ll use in the future. It’s possible to create files in the wrong folders, and if you use this method you will always have your new programs in the proper folder.

A) With power to the stepper motors turned off [Open] the existing program called “3dtest.ngc.”*

*This file comes with EMC. If you are using a computer supplied by Sherline, you should instead open the file called “0-new.” The instructions in sections D) and E) below describe how to change “3dtest.ngc” to “0-new.” Since Sherline owners will have this file already provided for them, they can skip sections D) and E) when they come to them and go on to section 2).

B) Go to the Pop-in [Editor] command and open along the top row.

C) The window will display the entire program.

1) Before we go any farther I want you to open the [BACKPLOT] program that can be found on the upper line and a blank section will appear in the Pop-in section. The [Backplot] feature will allow you to visually check a program without actually running the stepper motors. Right clicking your mouse controls the program that is viewed in this section of the control panel. You can toggle between the editor and the backplot easily. We now have the perfect setup to learn CNC and it all fits on a single desktop. You can view and edit your program or view the moves the spindle will make while your program is running.

2) 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].

3) Observe that the programmed moves can be viewed in the backplot box and the viewing area can be controlled with a variety of controls. This is very useful in checking out the programs you’ll be writing in the upcoming lessons. The line of the program that is highlighted in red in the lower area of the control panel is the line of code that is being processed by the control as the computer runs the program. Note that the EMC program is processing more than a single line of code at the same time; therefore, this line should only be considered "approximate."

D) For those of you who do not have a Sherline-supplied computer we are now going to create a file we will call “0-new.” (If you have a Sherline computer with the “0-new” file already on it, open it and go to section 2) below.) First go back to the [Editor] window by right-clicking your mouse. By having a “0” as the first character of the file name it will always keep this file at the beginning of the program list. This makes it easy to find, because you are going to use it again and again. From the [Edit] window, use [File] then [Save as] (located along the top of the edit window) to save our existing program as “0-new.”

E) Next, highlight (with the mouse button held down drag the cursor across the entire area you wish to highlight) and delete (press enter) the existing program with your mouse. Replace that program by typing “Save as another file name.” 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 new name “test-g02”. By using the [Save As] command you also leave the “0-new” program as is to use again. You can create your own files and name these files as you wish from this point on. Note: “test-g02” is the first program you’ll write.

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 seems and you will quickly create programs using this information along with “0-new”

Linux Tip—Saving a program to a floppy:

To save a program to a floppy disk, open the program you wish to save within the editor in EMC. Go to “File”, and “Save As.” Double click the “floppy” directory, then click on “Save.” Make sure that you have the correct name in the "File Name" field.

Maintaining your EMC programs directory

Many times you will create a number of programs that are similar or for testing use. After a while these programs can accumulate into a large repository that makes it difficult to find the program you are looking for. If you wish to delete a program the easiest way to do so is to double click the folder icon on the desktop that says "programs". Find the program(s) you wish to delete. Right click on them and then left click on the [Delete] option. This will permanently delete the program selected. Take great caution when deleting programs! You do not want to accidentally delete a valued program.

Linux Tip—If you're familiar with Linux you can navigate to your programs directory manually by using the following command:

# cd /usr/local/emc/programs

If you wish to delete a program, you can do so by using the following command:

# rm programname.ngc

--------------------------------------------------

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 about isn’t a good idea at this time. At the end of my instructions there are lists of the many words and commands available to you taken from the Linux EMC site; however, there isn’t any reason to remember them now. I want you to learn them as you use them. The commands and words that I’ll be using are so basic to writing code that they’ll soon become a new language.

Print a copy of these instructions

Although you could jump between the control screen on your monitor and the instructions, it would be a cumbersome way to work. You can print a copy of these instructions from the CD using any computer with a printer hooked up to it, or you can print a copy from your Linux computer by unplugging the servo driver connector from the parallel port and plugging in a printer instead.

To make it easier and to save paper, we have saved just the portion of the instructions that refers to the programming as a separate file you can print out. You have your choice of three formats: They are called CNCprint.doc (MS Word), CNCprint.pdf (Adobe Acrobat*) and CNCprint.html (opens in any web browser).

*Your Linux computer already has a program installed that will allow you to read .pdf files by clicking on them. In case you need to install Adobe Acrobat Reader on your Windows® computer, a copy is included on the Sherline Instructions CD.

Let the BS end and the programming begin

From this point on, you have to learn programming at your CNC system. You can’t learn how to control these systems in your favorite easy chair; therefore, you should take a printed copy of “Part Two” to your system and enter, test and understand each sample program before going on to the next. Write several similar programs, with each being different enough to make it challenging and constantly test yourself as you go. No shortcuts!

Are you ready?

About now I’d be “chomping at the bit” to see something happen so lets do something the best manual machinist couldn’t do to start. Hell, anyone can cut a straight a straight line so let’s make a circle. With the servo controller power off, manually crank the handles and approximately center the X-, Y- and Z-axes. Leave the power off to the servos until we get the program all checked out with Ray Henry’s backplot command. Ray Henry has been a sparkplug for the EMC group for some time now and we all owe him a debt of gratitude.

G-code programming

These are the basic g-codes that you’ll be working with. There is a complete listing of them at the end of this section copied from the www.linuxCNC.org  site. There isn’t any reason for you to remember them all at this time, because I want you to thoroughly learn them as you use them; however, you can get a general idea of how the system works by 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 obvious reasons.

g00 rapid positioning 

g01 linear interpolation 

g02 circular/helical interpolation (clockwise) 

g03 circular/helical interpolation (c-clockwise) 

g04 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 

g40 cancel cutter diameter compensation 

g41 start cutter diameter compensation left 

g42 start cutter diameter compensation right

g90 absolute distance mode 

g91 incremental distance mode 

There are no erasers in the machine trades

One other quick thing to note, it should be obvious that I could have provided a disk with all the examples typed in or to be downloaded, but accurately typing in a program is as much a part of learning CNC as making chips. When you misspell a word in a letter, the reader of the letter usually knows what you were trying to say and will not even notice it. In the world of robots, our robots can self-destruct trying to carry out your foolish typing error. This kind of typing requires them same precision as machining. There are no erasers in the machine trades. Only people who express themselves with their mouths and writings have the use of this marvelous tool. Machinists express themselves with their work, and that’s the way I like it.

In this exercise the home position is going to be where the tables were located when the EMC program was turned on, which is why I had you center the machine slides and is called x0,y0 and z0. The X-axis is the table that will move to your left when it moves in a positive direction. The x0, y0 and z0 is also designated in the backplot box with arrows pointing towards the positive direction away from this position. No more excuses, we’re going to program that circle I promised you. Note: Although the EMC program doesn’t need the “0” after the “g” in g00 or g01 I’ll use them because they are the designations all popular CNC systems use.  Also, I prefer lower case letters because you are less likely to make errors and mix them with numbers. The capital letter O and the number 0 can be difficult 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 circle program)

g01 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. This informs our robot that a program is coming in. Each time you press [Enter], the program will start a new line, so [ENTER] it is, and we’re off and running.

2)      (g02 circle program) –Words in parentheses are not part of program and are used to help the operators quickly understand the program. You can enter notes into a program at any point to remind yourself or another operator in the future why the upcoming code was entered.

3)      g01 g90 x0 y0 z0 f2 –What we just ordered our robot to do is go to the home position if it’s not already there.

A)    g01–Enters a mode where the feed (speed) is controlled by “f” which can be entered. Also note that the slow feed of f2 was entered so you could fully appreciate just what the machine slides do to generate a circle. The feed could be set for a faster rate for the backplot test and slowed down for the machine test if desired.)

B)     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] [Offset].

C)    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 be a quicker but one that can be more risky to start with. Modern CNC machines can perform g00 moves at speeds of 1400 inches a minute (35mpm), and you’re making a mistake by not taking advantage of this fact, but we’re not pros at this time and I want you to learn about feeds. Hit the [ENTER] key.

4)      g02 x0 y0 z0 i-.5 j0 – This line is the code that is going to actually produce the x y movements to create that circle we have been talking about. In this case, all the previous commands are still in effect except the g02 is replacing the g01.

A)    g02 is ordering our robot to cut a circle or start an arc with a clockwise (CW) move. For our faithful robot to carry out this order it needs more information or it’s going to start complaining and sending you nasty little notes and refuse to work. Remember that the g02 will remain in effect until a g01 is called for.

B)     The g02 the program needs the x, y position entered as to where this arc will end, and since we are creating a circle it obviously will end where it started so the present position is entered.

C)    Here are a couple of new commands; i and j, and they are used to describe the center location of our circle. These dimensions are given as the actual distance the center is located from the present position. It is very important to understand that our present position is not the center of this circle and only a starting point for this circle to be created. The i represents where the center of the circle falls on the x-axis and the j represents the y-axis.

I would also like to add at this time that the distances calculated and entered for computer generated shapes have to be extremely accurate, and a 0.0002″ error could stop your program from running. This doesn’t have anything to do with the accuracy you need; it pertains to the accuracy the computer needs to calculate the many points it creates to generate the x y movements for this one circle. This shouldn’t be any problem because of the low cost calculators we all have today that figure things to many decimal places.  Hit [ENTER]. (This is the last time for the [ENTER] command to be instructed. From now on you will hit [Enter] at the end of each line of code.)

5)      g01 g90 x0 y0 z0 f2I always add a line of code with a g01 or g00 and a x,y,z to return to the home position. The “g” commands stay in effect until they are overwritten by another g command. In this case it would have left the control in a circle command if we didn’t add this line of code which wouldn’t be a good practice.

6)      % -To inform our robot that this is the end of our simple program to do a very complex thing we enter a % just as we did to start the program.

7)      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 time, and we are going to check our program with [Pop In] [Backplot].

8)      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

%

9)      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 messages and it didn’t run, check for typing errors and correct them. Right-click [Editor] [file] then [Save and Load] [Run] until it works.

10)  The time has finally come to watch this little beauty in action, so turn on the machine control and “let her rip.” Notice how the slides are constantly changing speeds as each axis reaches its apex and changes direction. The circle is also being generated in the CW direction as the g02 requires. Run this little program several times and take the time to really understand what’s going on. From the control panel you can single step the program through and run things until you’re bored. 

You had your fun and it’s time to go to school again.

Now guys and girls, it’s time to go back as many times as it is necessary until you are absolutely positive you know exactly what every letter of your program does. I’m not looking over your shoulder, and the only way you can act foolish is by being on page 10 when you should be on page 3.

What a difference a minus sign can make

The first thing I want you to learn is how important that minus sign can be. (Also, a misplaced decimal point can easily cause a catastrophic machine event.) First, turn off the machine because there isn’t any sense in having it run while we’re doing this exercise. It’d also be distracting. Run your existing program through once again and generate the circle you started with. Leave the circle there and don’t [Reset] until we are done with this entire exercise. Right-click to Edit your program and the only thing I want you to do is remove the minus sign from the i value in the g02 command. [Save and Load] and [Run]. I’ll bet you didn’t think it was going to do that! Just think what could have happened to that expensive fixture if you were controlling a 30HP mill. A quick way to the unemployment line. I’m now going to give you the golden rule #1 of any CNC shop.

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 of the radius is now moved to the positive side of our zero starting point, which in this case is a total distance of 1". The g02 command still went in a CW direction and the only difference is 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 use save and reload as you make these changes. You’re on your own.

Figure 1

If you’re reading this, I’ll assume you passed the test, so now take your second test by erasing your program with the backspace key and doing the entire exercise over from memory.

Meet Millie

Think about what you accomplished at this point. You’re beginning to understand how we humans can order our robot around. I think we should give our little robot a name. Seeing it’s a mill we’re working with and I’m a male, I think I’ll call mine Millie. It will be the only thing with a female name in my lifetime that I stand a chance of controlling. I really want you to know the stuff I taught you blindfolded because we are heading for the hard, oops, I mean interesting part.

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 when they learned it, but they didn’t have Joe Martin teaching them. In Joe’s class no one is left behind, and let me promise you this guys, we are going move into their neighborhood so fast they will think we always lived there. But for the hell of it, let’s stop by their fancy cocktail lounge and have a beer so they can get used to us. I’m buying.

Time to get serious

Let’s think about just what g40, g41 and g42 does. To begin with g41 (g42 is the opposite of g41) will locate the spindle to the left of the programmed edge that you want to machine according to the d (tool dia.) amount entered into the tool data table. G40 simply cancels the g41 or g42 commands.

Computers can keep you from ruining your part

These commands allow you to put the actual dimensions of the part you want directly into the program and then it will take the diameter that you entered into a [Tools] file and automatically correct the path of the cutter so that the edge of the cutter is always located 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 blessing. They’ll keep you from wrecking your part.

Another thing to keep in mind is that one of the great benefits of the tool offset commands is being able to use end mills with slightly different diameters without having to calculate all new tangent points. Before CNC, when NC was the only system available, there was a surplus of used, non-resharpened end mills on the market because it was cheaper to scrap out dull end mills without resharpening them than rewriting long complex programs.

Don’t ask for impossible

The first thing you have to learn about using the g41 or g42 cutter comp commands is that you can’t ask your machine to do the impossible. What is impossible is cutting an inside “V” with an end-mill.

Figure 2

If you firmly imbed this into your mind, you’ll save the many hours of wasted time that I spent learning it. Of course I knew that this is impossible, but I kept asking my computer to do it when I was entering the cutter offset mode. As soon as a g41 or g42 is entered into the program you can’t ask your machine to cut “V” shapes without an arc being programmed that is at least the radius of the cutter you are using. What confused me was the cutter diameter that was retrieved with the d-command had an effect on whether you would or would not have an error. I believe I truly understand it now and had to rewrite several pages of garbage I wrote with confusing rules.

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 backplot program that comes with your system. I have yet to find a program that checks out with this program that wouldn’t run on the Sherline mill if the slides were located in the proper position before the program was run. The more I work with the EMC program the more I like it. 

Flying Sherline Airlines requires you to learn how to land before flying

The whole trick in using g41 or g42 is getting to the starting point in a very specific manner. Also, remember that our computer is very smart and looks ahead at what you plan to do when you enter cutter comp. If you ask it to do the impossible, it will send you a message. What we want to accomplish is approach the starting point in two separate moves so that we are coming into the part like a plane on final approach to an airport. The plane flies to the first point, where it lowers it landing gear (g41—a move where the cutter comp is entered during the move) and feeds (g01) to the final landing point with its wheels (cutter) in position to land. Come in too steep and you’ll create a deep V cut that is impossible to machine. (See Figure 2.)

You can overcome this error by programming a 90° radius cut to the part. Of course, the programmed radius must be larger than the radius of your cutter. To think of a programmed move in aircraft terms you are “flaring out” for touchdown. This has a second advantage from a machining standpoint of not leaving a slight undercut that’s created when a cutter is brought up to edge and immediately makes a sharp turn. This undercut is caused by cutter deflection.  

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

For the time being, remember that the closer you align your cutter (aircraft) with the directional edge that you want to machine (runway) the better the landing. Remember, in the world of CNC there is no gravity, and you can touch down any way you please.

Let’s go back and add g41 to the circle program. Modify your circle program to read like this