A customer recently sent us an email asking about a discrepancy between his DRO and his g-code.“I put your updates into my line of code but still have the Z-axis position discrepancy. I zeroed my DRO to the same spot as the LinuxCNC program to monitor it. And the DRO reads something completely different from what LinuxCNC reads.”
The problem lies with the feed rates (See Figure 1 below).
We added this section to the original instructions because it covers an area of programming for our size machine that was lacking. Because our machine is a scaled down version of a full-size machine, the feed rates and depth of cuts need to be scaled down too. The following section will explain feed rates, stepper motors, stalling and missed steps, and some insight for programming feeds. The maximum feed rate that you can use on a Sherline machine is 32 in/min. Looking at the program shown above (See Figure 1), it has feed rates showing 60 in/min and 120 in/min. When you put in feed rates that exceed the maximum feed rate of the machine, the machine will default to the highest feed rate possible. This means that regardless of what your programmed feed is, the machine is feeding at 32 in/min throughout your entire program.
Next, the way stepper motors work is that they have the most torque at the slowest speeds (feed rates). As you increase the feed rate, the torque drops down. In our CNC instructions, we state that the maximum feed rate (32 in/min) is for rapid moves only (these are positioning moves) and that the lower feed rates are for cutting.
What will happen if you try to cut your parts using higher feed rates (or the rapid feed of 32 in/min), is your stepper motor will stall or miss steps while it is cutting. The reason why this is happening is that you are trying to cut material when your stepper motor has the least amount of torque available. Because these are stepper motors, they do not send a position signal back to the computer to verify that they actually moved to the position that was sent by the computer. Your computer tells an axis to move a specific distance and then assumes that your stepper motor made it to that location when it stops. If your stepper motor stalls for a split second due to excessive feeds and it misses a step or two, your computer doesn’t know that. If you have DRO on your machine, the DRO will show exactly how far the axis moved, so when your stepper motor stalls during a cut, the DRO is going to show a lower amount than the computer. (Notice the difference in the XYZ positions between Figures 2 and 3 below.)
Figures 2 and 3
If your machine is missing steps, you need to slow down your feed rates (and/or take lighter cuts). Depending on your cutter size and your depth of cut, you may need to be as low as 4 or 5 in/min, or as high as 10 in/min.
As a standard practice, you should always write down the numbers on your handwheel when the machine is at its home position (X__,Y__,Z __). When the program ends, your machine should be back at the home position, and the numbers on your handwheels should be correct. If the numbers are different, then your motors are stalling and missing steps. To check this, run another part and watch the stepper motors while it runs. You should notice a slight jerking motion of the handwheels on the stepper motors when they are stalling due to excessive feed rates, and your machine will not return to its original home position because of those missed steps.
This is a small machine and it can’t take the same cuts that you can take on a full-size mill. The rule-of-thumb for slot cuts, as an example, is that your depth of cut when cutting a full-width slot should be 1/2 of the cutter diameter. On our machines, it should be 1/4 to 1/3 of the cutter diameter. If you are using a 1/4” end mill, your depth of cut would be between .060 and .080. The same holds true for your step-over amount. If you are milling off an entire top surface, each pass should be 1/3 to 1/2 of the cutter diameter (1/3 is better). It is better to use multiple smaller cuts.
If you see the stepper motors struggling, or if they are missing steps, lower the feed rates (and or depth of cut). You will also need to watch your cutters. As your cutters get dull, there is more force on your stepper motors to make the same cut as they were making without issue when the cutters were sharp.
Don’t get discouraged. You are learning an entire trade from scratch. The more you work with the machine the better your understanding and knowledge will be.