PDA

View Full Version : Setting steps



Mikes Planes
07-07-2023, 11:55 AM
I have at last got my CNC machine running. I spent hours setting the steps in motor tuning so the X and Y moved 50mm. But when I cut a pocket 40mm sq it measures only 37mm sq what have I done wrong or missed.

Mike

Muzzer
07-07-2023, 12:38 PM
You may be missing steps. If you slow down the max feed rates in your CAM / g code, does the problem go away?

Also check that the maximum step rate from the controller to the stepper driver does not exceed what the stepper driver can handle. You may be able to reduce that somewhere in the settings - values such as 100kHz, 200kHz etc are common. You could try a reduced step rate if you are losing steps.

You should be able to calculate the number of pulses per mm rather than use trial and error. You know the ballscrew pitch and the pulley reduction ratio (if you have one), so the pulses per mm should be fairly simple to calculate directly.

Neale
07-07-2023, 03:10 PM
How are you generating your gcode? Given that you have the same error in X and Y (although not sure how exact your measurements are!) it doesn't sound like a missing steps problem - although nothing can be ruled out at this point! But there can be issues with offsets and tool diameter settings in the CAM stage (gcode can be generated that allows for tool diameter at the gcode creation stage or makes no allowance which is done by the control software - Mach3 or whatever).

Can you post the gcode, assuming that it is something fairly short for just cutting a square?

I agree with Muzzer that you should be able to get very close to the correct "steps per" setting by calculation. On my own machine, this calculates as something like 400 steps per mm; accurate testing and measurement, at least as far as I could with my workshop facilities, meant changing this to something like 401 - presumably because of very slight errors in ballscrew pitch.

Mikes Planes
11-07-2023, 09:22 AM
How are you generating your gcode? Given that you have the same error in X and Y (although not sure how exact your measurements are!) it doesn't sound like a missing steps problem - although nothing can be ruled out at this point! But there can be issues with offsets and tool diameter settings in the CAM stage (gcode can be generated that allows for tool diameter at the gcode creation stage or makes no allowance which is done by the control software - Mach3 or whatever).

Can you post the gcode, assuming that it is something fairly short for just cutting a square?

I agree with Muzzer that you should be able to get very close to the correct "steps per" setting by calculation. On my own machine, this calculates as something like 400 steps per mm; accurate testing and measurement, at least as far as I could with my workshop facilities, meant changing this to something like 401 - presumably because of very slight errors in ballscrew pitch.

( Made using CamBam - http://www.cambam.co.uk )
( Untitled 7/9/2023 1:46:45 PM )
( Post processor: Mach3 )
( T4 : 4.0 )
G21 G90 G64 G40
G91.1
G0 Z3.0
( T4 : 4.0 )
T4 M6
( Pocket1 )
G17
M3 S1000
G0 X19.8646 Y19.7323
G0 Z1.0
G1 F300.0 Z-1.0
G1 F900.0 Y20.5323
G1 X20.6646
G1 Y19.7323
G1 X19.8646
G1 F300.0 Y18.1323
G1 F900.0 X18.2646
G1 Y22.1323
G1 X22.2646
G1 Y18.1323
G1 X19.8646
G1 F300.0 Y16.5323
G1 F900.0 X16.6646
G1 Y23.7323
G1 X23.8646
G1 Y16.5323
G1 X19.8646
G1 F300.0 Y14.9323
G1 F900.0 X15.0646
G1 Y25.3323
G1 X25.4646
G1 Y14.9323
G1 X19.8646
G1 F300.0 Y13.3323
G1 F900.0 X13.4646
G1 Y26.9323
G1 X27.0646
G1 Y13.3323
G1 X19.8646
G1 F300.0 Y11.7323
G1 F900.0 X11.8646
G1 Y28.5323
G1 X28.6646
G1 Y11.7323
G1 X19.8646
G1 F300.0 Y10.1323
G1 F900.0 X10.2646
G1 Y30.1323
G1 X30.2646
G1 Y10.1323
G1 X19.8646
G1 F300.0 Y8.5323
G1 F900.0 X8.6646
G1 Y31.7323
G1 X31.8646
G1 Y8.5323
G1 X19.8646
G1 F300.0 Y6.9323
G1 F900.0 X7.0646
G1 Y33.3323
G1 X33.4646
G1 Y6.9323
G1 X19.8646
G1 F300.0 Y5.3323
G1 F900.0 X5.4646
G1 Y34.9323
G1 X35.0646
G1 Y5.3323
G1 X19.8646
G1 F300.0 Y3.7323
G1 F900.0 X3.8646
G1 Y36.5323
G1 X36.6646
G1 Y3.7323
G1 X19.8646
G1 F300.0 Y2.1323
G1 F900.0 X2.2646
G1 Y38.1323
G1 X38.2646
G1 Y2.1323
G1 X19.8646
G0 Z3.0
G0 Y19.7323
G0 Z0.0
G1 F300.0 Z-2.0
G1 F900.0 Y20.5323
G1 X20.6646
G1 Y19.7323
G1 X19.8646
G1 F300.0 Y18.1323
G1 F900.0 X18.2646
G1 Y22.1323
G1 X22.2646
G1 Y18.1323
G1 X19.8646
G1 F300.0 Y16.5323
G1 F900.0 X16.6646
G1 Y23.7323
G1 X23.8646
G1 Y16.5323
G1 X19.8646
G1 F300.0 Y14.9323
G1 F900.0 X15.0646
G1 Y25.3323
G1 X25.4646
G1 Y14.9323
G1 X19.8646
G1 F300.0 Y13.3323
G1 F900.0 X13.4646
G1 Y26.9323
G1 X27.0646
G1 Y13.3323
G1 X19.8646
G1 F300.0 Y11.7323
G1 F900.0 X11.8646
G1 Y28.5323
G1 X28.6646
G1 Y11.7323
G1 X19.8646
G1 F300.0 Y10.1323
G1 F900.0 X10.2646
G1 Y30.1323
G1 X30.2646
G1 Y10.1323
G1 X19.8646
G1 F300.0 Y8.5323
G1 F900.0 X8.6646
G1 Y31.7323
G1 X31.8646
G1 Y8.5323
G1 X19.8646
G1 F300.0 Y6.9323
G1 F900.0 X7.0646
G1 Y33.3323
G1 X33.4646
G1 Y6.9323
G1 X19.8646
G1 F300.0 Y5.3323
G1 F900.0 X5.4646
G1 Y34.9323
G1 X35.0646
G1 Y5.3323
G1 X19.8646
G1 F300.0 Y3.7323
G1 F900.0 X3.8646
G1 Y36.5323
G1 X36.6646
G1 Y3.7323
G1 X19.8646
G1 F300.0 Y2.1323
G1 F900.0 X2.2646
G1 Y38.1323
G1 X38.2646
G1 Y2.1323
G1 X19.8646
G0 Z3.0
G0 Y19.7323
G0 Z-1.0
G1 F300.0 Z-3.0
G1 F900.0 Y20.5323
G1 X20.6646
G1 Y19.7323
G1 X19.8646
G1 F300.0 Y18.1323
G1 F900.0 X18.2646
G1 Y22.1323
G1 X22.2646
G1 Y18.1323
G1 X19.8646
G1 F300.0 Y16.5323
G1 F900.0 X16.6646
G1 Y23.7323
G1 X23.8646
G1 Y16.5323
G1 X19.8646
G1 F300.0 Y14.9323
G1 F900.0 X15.0646
G1 Y25.3323
G1 X25.4646
G1 Y14.9323
G1 X19.8646
G1 F300.0 Y13.3323
G1 F900.0 X13.4646
G1 Y26.9323
G1 X27.0646
G1 Y13.3323
G1 X19.8646
G1 F300.0 Y11.7323
G1 F900.0 X11.8646
G1 Y28.5323
G1 X28.6646
G1 Y11.7323
G1 X19.8646
G1 F300.0 Y10.1323
G1 F900.0 X10.2646
G1 Y30.1323
G1 X30.2646
G1 Y10.1323
G1 X19.8646
G1 F300.0 Y8.5323
G1 F900.0 X8.6646
G1 Y31.7323
G1 X31.8646
G1 Y8.5323
G1 X19.8646
G1 F300.0 Y6.9323
G1 F900.0 X7.0646
G1 Y33.3323
G1 X33.4646
G1 Y6.9323
G1 X19.8646
G1 F300.0 Y5.3323
G1 F900.0 X5.4646
G1 Y34.9323
G1 X35.0646
G1 Y5.3323
G1 X19.8646
G1 F300.0 Y3.7323
G1 F900.0 X3.8646
G1 Y36.5323
G1 X36.6646
G1 Y3.7323
G1 X19.8646
G1 F300.0 Y2.1323
G1 F900.0 X2.2646
G1 Y38.1323
G1 X38.2646
G1 Y2.1323
G1 X19.8646
G0 Z3.0
G0 Y19.7323
G0 Z-2.0
G1 F300.0 Z-4.0
G1 F900.0 Y20.5323
G1 X20.6646
G1 Y19.7323
G1 X19.8646
G1 F300.0 Y18.1323
G1 F900.0 X18.2646
G1 Y22.1323
G1 X22.2646
G1 Y18.1323
G1 X19.8646
G1 F300.0 Y16.5323
G1 F900.0 X16.6646
G1 Y23.7323
G1 X23.8646
G1 Y16.5323
G1 X19.8646
G1 F300.0 Y14.9323
G1 F900.0 X15.0646
G1 Y25.3323
G1 X25.4646
G1 Y14.9323
G1 X19.8646
G1 F300.0 Y13.3323
G1 F900.0 X13.4646
G1 Y26.9323
G1 X27.0646
G1 Y13.3323
G1 X19.8646
G1 F300.0 Y11.7323
G1 F900.0 X11.8646
G1 Y28.5323
G1 X28.6646
G1 Y11.7323
G1 X19.8646
G1 F300.0 Y10.1323
G1 F900.0 X10.2646
G1 Y30.1323
G1 X30.2646
G1 Y10.1323
G1 X19.8646
G1 F300.0 Y8.5323
G1 F900.0 X8.6646
G1 Y31.7323
G1 X31.8646
G1 Y8.5323
G1 X19.8646
G1 F300.0 Y6.9323
G1 F900.0 X7.0646
G1 Y33.3323
G1 X33.4646
G1 Y6.9323
G1 X19.8646
G1 F300.0 Y5.3323
G1 F900.0 X5.4646
G1 Y34.9323
G1 X35.0646
G1 Y5.3323
G1 X19.8646
G1 F300.0 Y3.7323
G1 F900.0 X3.8646
G1 Y36.5323
G1 X36.6646
G1 Y3.7323
G1 X19.8646
G1 F300.0 Y2.1323
G1 F900.0 X2.2646
G1 Y38.1323
G1 X38.2646
G1 Y2.1323
G1 X19.8646
G0 Z3.0
G0 Y19.7323
G0 Z-3.0
G1 F300.0 Z-5.0
G1 F900.0 Y20.5323
G1 X20.6646
G1 Y19.7323
G1 X19.8646
G1 F300.0 Y18.1323
G1 F900.0 X18.2646
G1 Y22.1323
G1 X22.2646
G1 Y18.1323
G1 X19.8646
G1 F300.0 Y16.5323
G1 F900.0 X16.6646
G1 Y23.7323
G1 X23.8646
G1 Y16.5323
G1 X19.8646
G1 F300.0 Y14.9323
G1 F900.0 X15.0646
G1 Y25.3323
G1 X25.4646
G1 Y14.9323
G1 X19.8646
G1 F300.0 Y13.3323
G1 F900.0 X13.4646
G1 Y26.9323
G1 X27.0646
G1 Y13.3323
G1 X19.8646
G1 F300.0 Y11.7323
G1 F900.0 X11.8646
G1 Y28.5323
G1 X28.6646
G1 Y11.7323
G1 X19.8646
G1 F300.0 Y10.1323
G1 F900.0 X10.2646
G1 Y30.1323
G1 X30.2646
G1 Y10.1323
G1 X19.8646
G1 F300.0 Y8.5323
G1 F900.0 X8.6646
G1 Y31.7323
G1 X31.8646
G1 Y8.5323
G1 X19.8646
G1 F300.0 Y6.9323
G1 F900.0 X7.0646
G1 Y33.3323
G1 X33.4646
G1 Y6.9323
G1 X19.8646
G1 F300.0 Y5.3323
G1 F900.0 X5.4646
G1 Y34.9323
G1 X35.0646
G1 Y5.3323
G1 X19.8646
G1 F300.0 Y3.7323
G1 F900.0 X3.8646
G1 Y36.5323
G1 X36.6646
G1 Y3.7323
G1 X19.8646
G1 F300.0 Y2.1323
G1 F900.0 X2.2646
G1 Y38.1323
G1 X38.2646
G1 Y2.1323
G1 X19.8646
G0 Z3.0
M5
M30
Here is my GCode.
Were do I fimd what Microsteps to use I am set at128?? Asl were do I find the formula for the setps. A friend sent me one but that came out at 5000 and the machine would not move. Thank you for your help Mike

Neale
11-07-2023, 10:29 PM
Had a quick look through the code and it moves the cutter around a 36mm square, cleaning out the interior of the pocket. So the resulting pocket should measure 36+cutter dia. So it sounds like the steps/per is wrong, or it's missing steps. If the pocket is accurately square, it is unlikely to be missing exactly the same number of steps on each axis, and the pocket sides would be stepped as it loses more and more steps on each depth pass. So it's looking like steps/per is wrong...

My best guess, anyway - but this is all long-distance diagnosis so could have missed something!

- Brian