Microstep management

More
30 Apr 2020 19:44 #166245 by blockbuffer
I have .ini and .hal files that move the stepper motors on my Taig mill. I know that I need to work on my calibration, but am confused by microstep management.

I think my STEP_SCALE is the first thing I need to fix, as I didn't really understand what was going on in pncconf when it was generating that.

I think I now understand the calculation, and that it needs to include microsteps, if used, but for the life of me, I don't see how the number of microsteps is managed at run time.

How does linuxcnc decide to call for steps vs microsteps at run time? I can't see how or where the number of microsteps per step (even if '0') is defined.

Thanks!

Please Log in or Create an account to join the conversation.

More
30 Apr 2020 20:07 #166247 by tommylight
Replied by tommylight on topic Microstep management

How does linuxcnc decide to call for steps vs microsteps at run time? I can't see how or where the number of microsteps per step (even if '0') is defined.

It does not care about microsteps, that is something stepper drives do, not Linuxcnc, Linuxcnc only needs to know how many steps per unit (mm or inch) to send. That is only needed when using wizards as it makes it easier to just enter values and let the wizard do the calculations.
You can fix or tune the step scale from a working Linuxcnc, it is on the machine menu in "calibration", so you can enter a value, press "test", go to MDI and enter a known value in MM or Inch and measure if it did that exact distance. If not, change value, test again.
Just do not forget to click on "save to file" when you're done tuning.
Or,
Check the drives to what microstepping they are set, it is always written on their side and they have small DIP switches to set that and the current to the motors. Also check what is the reduction ratio between motor pulley and ballscrew or leadscrew and what is the pitch of that ball/lead screw. Most probably the motors are attached to the screws in your case so the ratio is 1:1.
Stepper motor usually need 200 steps per revolution, example screws of 5mm per turn, and by 4 microstepping:
that would be
200X4=800/5
or 160 steps per 1mm of movement.
The following user(s) said Thank You: blockbuffer

Please Log in or Create an account to join the conversation.

More
02 May 2020 15:57 #166414 by blockbuffer
Replied by blockbuffer on topic Microstep management
Turns out that my motors will support microsteps, but don't have dip switches, etc. to self-manage them. The control appears to be back in the G540, which supports 10 microsteps by default, and somehow decides that if the drives are moving quickly, then it should go to full steps. So it's automagic. :-)

That makes the STEP_SIZE value for my XYZ, at least, to be 40000.
(200 steps * 10 microsteps * 20TPI). Seems to work...
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum