First G-code motion; MPEG video
5 Bears Home Homebrew CNC bench mill

If the last few installments to the CNC project seem boring and not especially motivating, I apologize. I am trying to keep the updates coming, and while fitting limit switches isn't exactly the height of engineering, I thought I'd use this page as a means to get an MPEG up which shows the potential speed of the X-axis. I was very pleased with how everything went, and especially so with the Flashcut software, which has been excellent. No worries, some serious machining to come soon in the design and fabrication of the column and Z-axis. Unlike the other portions of the mill which were completed before I began to serialize to the web, the Z-axis is still "in my head", and needs to be machined. This should provide for some good stuff to be posted.

Before we get to the MPEG, I thought I'd show how I made some nice swarf guards for the X-axis. When I milled out the bottom of the cast iron table for the motion hardware, I took the time to drill and tap 6 ea. 8-32 holes near the side edges in anticipation for just this task. Using common hardware store aluminum 90-degree angle stock, I fashioned what you see here with just a bit of trimming and hole-drilling for the hold-down cap screws.
From the outside, we now have a well-protected set of rails and ballscrew. I thought about painting or anodizing a lot of these aluminum parts, but for mill mark1, I decided to plow ahead and simply get something going. With Mark 2, I hope to get an anodizing setup bubbling away, along with some dyes. That should make for some interesting posts.
On the rear swarf guard, I mounted a pair of limit switches. Two adjustable trips on the X-axis sandwich plate will engage these levers. The Flashcut signal generator looks for normally closed limit switches, but will work with normally open as well. I decided to wire for both configurations, hence three wires to each switch. The wire is common 26 guage telephone line, six conductor.
Not shown is the pair of 4-40 SHCS which are the "trips" for these stwitches. A row of 4-40 holes on the other side of the plate allows me to install the trip at different axial locations as needed.

Click for full-sized picture of Flaschcut interface showing this test, and a link to the MPEG


While mindlessly installing the swarf guards and switches, I thought about the simple jog motion I had executed a couple of weeks ago, and realized that there was nothing keeping me from firing up Flashcut and doing some single-axis G-code to test the speed and accuracy of this axis. 10 minutes of study (I've never written G-code in my life!) produced some excellent motion, and allowed me to get the feel of this system. The code executes some simple back and forth table motion at feeds of 180 and 220 in/min, one high-speed reposition (the G00 Y-3 line), and a pause (G04 X0.3), called twice from the first line (M98).

It was a hoot to play around with the speeds and ramps. The motor certainly had no problems, and being closed loop, every measurement made was dead-on! Flashcut comes with a servomotor autotuning program called DCN, which I will later execute to let the finished system find its own parameters. The G-code was executed without limit switch protection; not recommended and a bit scary as I didn't want to crash the axis. Each code change was checked with the offline simulation to be sure it didn't exceed the axis hardware envelope. At the same time, I also gained some insight into setting up flashcut for a specific hardware axis. Once the axis hardware is set on the configuration page, the axis viewport kindly portrays the machine tool envelope for you , and the extent of the motion, as defined by your G-code, is overlayed over the machine tool envelope, so that you may see exactly where your G-code is going! Very cool.

Oh yes, even though this is the X-axis hardware, the servo cable was plugged into the Y-axis socket on the back of the servo driver box, so that is why the G-code references the Y-axis, not the X.