View Full Version : Questions from a newby-(sort of)

06-09-2003, 12:57 AM
I've got some questions for you guy's that have built your machines.
1)Homing the machine. How do you send the machine home? Or where do you set machine "zero"? Do you let it limit out on the limit switch and then reset the zero's in the software? Do you set some kind of pin into the table and indicate it or the edge of the workpiece? If so, how do you "dial" the gantry over to the pin or edge?
Orrrrr, have I been a button pusher on a big machine for so long that I am over engineering a non-existant problem?
2)Speaking of limit switches, once you hit a L/S, doesn't it shut the stepper/servo drive travel down? If so, do you have to manually rotate the motor shaft to move the table away from the L/S to enable movement?:confused:
I've got a million more questions and hopefully you guys don't tell me to shut up too soon!
Thanks for shedding some light on this for me! DON

06-09-2003, 01:00 AM
When you home the machine will hit the limit switch, and 0 out all axies.

06-09-2003, 01:27 AM
I believe that some people have "home" limit switches, and max-travel limit switches. Hitting the home switches just tickles the software where hitting the travel limit switches actually cuts the power to the motors.

Can someone confirm/deny the above?


06-09-2003, 02:28 AM
That makes the most sense, but I wasn't sure. I haven't seen any hand-wheels on any of the home-built machine pictures. I guess you would jog it off the stop instead of dialing it?

06-09-2003, 02:34 AM
Nice sig TRC1:p :p


06-09-2003, 11:43 AM
I home the machine which sends it to the switches and thats it. It will be at 0,0,0 and you run the gcode from there. Yes you would jog it off the stop with the software.

You could use an indicator of some kind when your work piece is out on the table somewhere and you want to start at one corner. What I have done is moved the cutter to the edge of the workpiece and manually set my zero from there. Generally with a wood working machine a dial indicator is not required because it's wood you are cutting and usually you take material off all sides. +/- 1/32 is plenty close enough. I don't have hand wheels on my machine but I have reached in and turned the leadscrew by hand to tweak my start position against the work piece or whatever.

Ask any questions you like. We are a patient bunch.


06-09-2003, 01:45 PM

This is the way I run all my CNC machines. I have a CNC Mill as well as a CNC router. You must use fixed tooling for this to work. I use Home switches because this is one position that is somewhat repeatable. When you home your machine you are setting the machines coordinate system, which is G53. For the record a coordinate system is a spot that the DRO’s read 0,0,0 I always home in the far positive direction.

After I have the machine coordinate system defined, I then move to the material corner (I use Lower Left) and you can find this by edge finder or other methods. What you are doing here is finding the coordinate offset position as measured from the machines coordinate system. In Gcode standard you can have many different coordinate offsets defined. Machine 0 is G53. The first offset is G54, second is G55 and so on. By finding the edge of the material in X and Y you will have a negative number for both. Next I find the Z position of the stock. I do this with no tool in the spindle or router. I move the Z down until I touch the stock top. This will be a negative number as well. You now have three negative offset numbers for X, Y, and Z. If your Gcode controller is good it should have a place to enter the coordinate offset for G54. You enter the three numbers here.

I get my tool length by clamping a tool in the holder and placing it in the spindle. I move the Z down until I touch the top of the part. I read the Z dro and subtract this number from the Z offset number I got above. This will give you the tool length. You enter your tool numbers in the controllers tool offset database.

Now when you have this data you just make sure that your Gcode has a G54 at the start and a G43 for the tool length offset. When you switch your CNC from machine coordinate system and use the offset your DRO will now read 0,0 when your are at the corner of your part. When you turn on the tool offset and place the correct tool in the spindle your Z DRO will read 0 when you touch the top of the material.

The nice thing about doing it this way is: 1) if you machine off the top of the part you will still be able to do tool changes and not loose where the material was. 2) if you shut down the machine for the night you just home it again and you are ready to go.

06-09-2003, 03:32 PM
TRC1, I think the only thing that hasn't been covered is the logic used to get off the limit switch: Typically, this would allow movement only in the opposite direction when a given limit is hit, since it is known from what direction the machine must have moved to activate a given limit.

For more accurate homing, usually you would use an extra switch rather than the limits, but that is up to you. The advantage would be that different logic can apply to a dedicated input/output from the home switch, whereas a limit switch needs a different logic.

I am not sure how you would incorporate this homing logic in your controller software, but usually a very slow jog is used to trigger the home switch, and when the controller gets the signal that the switch has changed states, then the controller looks for the very next input pulse from the encoder's index position. This is a single pulse output from a special single line on the encoder's encoded disk. I am assuming you have an encoder on your screws.

06-09-2003, 04:28 PM
I haven't built my machine yet, I'm still working on getting everything together.I will probably start with 48x48 inches in structural aluminum.
I hope to have some new servos in 1 week and a day :D (wink,wink) if the subscription gods are looking favorably upon me :cool: :cool:
I think Hu's answer came closest to the question I was asking. I have past experience with cnc machines but none with hobby cnc's and I haven't seen anybody address these questions in the forums. Thanks for all the great answers, I'm taking notes!

On a side note, I found a guy who says he has about 1000 feet of structural alum., (45X45) that he wants to part with. I will post it in the For Sale forum in a couple of days if it works out.

06-09-2003, 06:30 PM
Don't know what kind of machine you use, but some machines have the solution built in.

On mine, the homing speed is user selectable, both high and low speed.

The head moves toward the home limit switches at the high speed, say 2000pps, all three axis moving at the same time.

As the limit switch on each axis is "made", the axis in question reverses at the low speed of 100pps until the micro switch just opens and the axis stops moving. This becomes the machine reference point.

The repeatable accuracy is determined by the type of switch used.

The driver box I use is by Ah-ha. Unfortunately, I don't think they are "active" in any meaningful way. They have moved to an undisclosed closet, their website hasn't been updated in months, but someone will come out of the woodwork and swear new boards are available. Support is non-existent. Except for the company being dead in the water, it is a good stepper system.

06-09-2003, 10:48 PM
Thats exactly what I needed to know, thank you! Are most machines set up like this?

06-10-2003, 01:53 AM
TurboCNC drives the axis' towards the switchs at the machines max start speed. Once it hits the switch it backs the axis away slowly until just off and then back to the switch slowly till just on. It then resets the axis' coordinates to the home position, which is user defineable in the settings. My home position is 0, 12, 2 for example. This allows for the easiest material placement and tool changes.


06-10-2003, 02:09 AM
Hi all
More questions from another newbie.
I'm still confused as to the different types of switches. I've built my own driver board around UCN5804 driver chips and I have three lines for the limit/home switches and one line for E-stop. I've assumed that each connection serves two purposes, that two switches wired in series (normally closed) and mounted at opposite ends of the axis would serve to function as home and limit switches.

I had supposed that when cutting, if either switch at the end of a particular axis was triggered that it would serve as a limit switch and stop the machine.

On the other hand while homing the switch(s) would function as a homing switch and let the other two axis continue movement even after the first axis was triggered. I've played around a little bit with Turbo CNC and will probably use it to drive my machine so I guess this question purtains to this software.

I've been following this board pretty closely and my hats off to all that have built their own machine, especialy Balsaman.


06-10-2003, 02:25 AM
Hey thanks!

Turbocnc does indeed use the 3 inputs for the axis' over travel limits and another 3 limits for the home switches. The 3 overtravel limits will stop the machine. Home switches are ignored unless you send the machine home. They work as described in the earlier post.

I personnaly don't use any over travel switches on my machine. I only have the 3 home switches. If my machine over travels, it just stalls. My new machine with servo's will include over travel switches so it doesn't bend when the axis crunches to the end of it's travel...:)

Where I work a large servo driven gantry made for moving heavy auto parts drove right through the mechanical stop, off the rails and 10 feet to the floor after someone "disabled" the overtravel switches. The gantry weighed about a ton. :eek:


06-17-2003, 10:46 PM
I have a question, I am wondering if there is charts on what size servos to use in relation to what ball screw to use.

I am going to build a cnc router that has a range of

x axis 24"
y axis 36"
z axis 12"

06-18-2003, 01:32 AM
I use the TLAR method. I would go with 3/4".


03-27-2004, 12:58 AM
I have Gecko's 201 and I'm trying to wire home switches. I have the wires run from the switches to the box...What do I do next? Do I have to have power on these(5V)? I have 2 wires brown/green and I know how to plug them in and assign ports. The grounding and power stuff I'm confused on. I'm using CNCPro.


03-27-2004, 11:09 AM
There are no provisions for home switches on G201's. You need to make a small circuit with pull up resistors to your LPT port for this.


03-27-2004, 01:39 PM
I'll add my 2c. I think controllers all approach this a bit differently, but with the same goals in mind. Here's what Flashcut does.

The switches for a 3 axis machine are setup with 2 switches each for the X and Y, and one for the Z, which defines the upper limit of motion. Into the setup dialog, you enter the stroke of each axis, in whatever units you are using, say inches. When you power up the system, you click a "SEEK HOME" button. The machine then sequentially moves each axis, traveling at a user specified rate, usually slow, until the switch is tripped. It then backs off until the switch opens. The axis then moves another small distance, again user defined, I use 0.100". At that point, the MACHINE ZERO is defined.

With machine 0 set, given that the controller knows the allowable envelope, it will prohibit motion outside that envelope. I'll use the X axis for example. My machine has a 10.000" X axis, and with machine 0 set, I can jog all day at 250ipm back and forth with no fear of crashing the X. It was disconcerting at first seeing the table slapping right and left in just a couple seconds, screaming towards the end of allowable motion... I was sure it would crash, but it never has. The FC software ramps nicely to a stop at X=0, and X=10", nothing beyond. Attempts to jog further produces a "Sorry Stupid, you are at the machine limits" dialog.

With MACHINE ZERO set, the controller now knows the envelope limits of motion. The next step is to define PROGRAM 0, which is where you'd execute the beginning of your G-code. You'll rarely mount your work so that PROGRAM 0 corresponds to MACHINE 0, rather you'll mount the work in the heart of the machine envelope. Metal-working machines will typically use a fixture, a vise jaw, or an edge-finder. You jog to get the spindle where you want it, then click a button labeled ZERO PROGRAM.

At this moment, the controller has TWO sets of zero's, PROGRAM and MACHINE. It analyzes the G-code before you even start, and ensures that the commanded cutting motion will not exceed the machine envelope. If it does, it lets you know and won't execute.

One further set of zero's is RELATIVE 0. You can do a relative 0 anytime, it is for your use and is identical to simply zeroing a manual machines DRO. One final set of XYZ coords flashcut uses is DISTANCE TO GO. When a line of G-code is run, it looks ahead, and shows the DTG of the G-code line.

Many controllers allow you to predefine coordinates and name them or use them in G-code. For example, if you have more than one vise, vise #1 has it's own XYZ coord, Vise #2 another, and with a button click or G-code command, the system will rapid move to that vise's zero.

Overall, a good software/controller will do several things, it will prevent the machine from exceeding its own operating envelope, it will check your G-code for you and display the toolpath relative to the machine envelope, and it will allow numerous zeros to make repeatability and fixturing and ATC easy. Finally, the limit switches are there "just in case". If struck, the axis is powered down and the system halts to prevent nasty damage to costly components. Most crashes occur when a tool is slammed into a vise, clamp, or fixture that is not programmed into the machine. Having a 1/4" carbide end mill attempt to mill 1/2" deep in a hardened steel gooseneck clamp at 20 ipm will have you ducking for cover, your friends laughing, and your boss (if you have one) in a lather.

Long and rambling but I hope this helps.

03-27-2004, 09:34 PM
"All of the Above" have covered just about everything....except..
and I know this thread is for routers, but I have to comment for users of the 3 in 1 mill/lathe type machines that also serve as routers when so equipped.

I'm currently setting up at least "home" switches on mine.
The problem is how to make the switches easily mobile to accomodate the different "envelopes" that the two modes(lathe/mill) require.

Imagine you have just completed an operation with the milling/routing function using a broad envelope...ie no lathe chuck, no tail stock. and you had limit or home switches set up for this working area.

Now you need to change to the lathe function which requires a four-jaw chuck and possibly a tailstock. After setting this up you see that the machine axes could easily ram the spinning chuck before contacting the "limit/home" switches and send bits and parts of tooling, fixtures, etc out into a more fleshy environment.

Ballendo has commented that he keeps a small stereo jack in series with the switches so that a switch can be mounted anywhere temporaily to accomodate a "change" in the working envelope.

As for the "home" switches, I'm still working on how to make them adjustable....maybe a slide for the switch/switches to be repositioned.

For now, I have the servo motors/drives setup to fault should any unusual resistance be encountered...but this may not always work if the operation requires greater force and the faults occur prematurely. And for lathe work, it doesn't take any resistance at all for a tool bit or boring bar to travel into hostile territory!

P.S. using Mach2 controller and Gecko 320 drives

09-09-2004, 02:19 PM
Bloy, would it be possible to position your switches to where they cover all bases. Maybe finding a common location for all limit and/or home switches that would not be in the way. Just one of those what-iffs

09-21-2004, 11:40 PM
What does DRO mean?
Thanks. :)

09-21-2004, 11:42 PM
Also, how does your machine know where to move to get to the home switches? Left untill it hits, or right? Know what I mean? Do you need encoders?
Thanks for the help.
I really appreciate it. :):):):rainfro:

09-22-2004, 02:29 PM
DRO = Digital Read Out - uses an encoder on the axis and reads out position.

The controller software should have a setup item for which end the home switch is on. I use turbocnc, and on it, you set whether the home switch is at the positive or negative direction.

09-25-2004, 12:11 AM
Thanks for the reply. I don't have a machine yet, so how do you know if it is the positive or negative side? Also, what is the main purpose for a dro, I don't think that you absolutely need one right? Is it just to let the computer know where the stepper is?
Thanks for the help.
I really appreciate it. :) :)

Graham S
09-25-2004, 06:29 AM
You define the positive and negative when you set up the mill. If all else fails you try it one way and then the other just make sure the speed it set quite slow. I normally test the home switches with them removed, I wait for the motor to start moving and then press the switch manually, if nothing happens I press escape to stop the machine. Most of this info will be in the manual of the software you choose, it is not really a problem.

A DRO is normally used for manual machining, it tells you where the tool is. I often use one on a manual mill, once you find a few edges on the workpeice with a wobbler or similar then you know exactly where you are and can mill and drill very quickly.

In the case of a normal CNC system the computer tells the stepper to step and that is it. You have to ensure the machine is used within its capabilities so that the motor does not stall and "loose steps". The DRO is just the computer saying where it thinks the motors are. Genrally it will be correct!


07-05-2005, 04:12 AM
Hi all,
I am kind of new here. I have bought a Salem Control to start on build a CNCmill with Taig mile. My problem is that when Salem Control send the board to me they did not include any instruction of schematic of how to hook it up. I have try to contact Salem Control so many time but I have get nothing from them. I am trying my luck in here so maybe someone know how to hook up this board. It is there first 3 axis board I think it is SC1125 model.
Thank you in advance