Rotary axis/spinny thing with no limits
-
Hello,
currently working on a new iteration of what the TC world calls a "PebbleWiper" and for that I have a rotating disk as sort of a "print bed" for my pebbles.
Now, that disk is driven by a stepper as a rotary axis (letter "D") and that works perfectly fine. However, I have a few questions:- How can I tell RRF that this axis has no limits? It's a constantly spinning disk with no concept of "position", I don't care where it is at any given moment, I just need it to advance a certain angle on command and it can do that for however long it wants to. If I don't define any axis limits, it seems to default to 0-200 which is not ideal. The M208 documenation does not seem to give me any info about how to not apply any limits... I could possibly work around this by simply resetting its position to 0 any time I need it, but that seems like a hack.
- I don't quite know how to work out the math so that G91 G1 D1 advances the disk by 1°, it's a 0.9°/step stepper, but I'm not sure what steps/mm I would need to tell RRF so that I can use angles rather than mm ( I kinda would have expected this to be case with it being a rotary axis, but does not seem so)
Duet 3 6HC on RRF 3.5b1+
Thank you
-
@Diamondback
Did you try to define axis "D" being rotary instead of hoping it is by default?The formula for steps/degree is:
steps_per_turn = 400 * microstepping ; 16 or 256 or whatever steps_per_degree = steps_per_turn / 360
-
@o_lampe Yep I did:
M584 D100.5 R1 ; set drive mapping (Wiper disk, rotary)
Makes no difference vs relying on the default.
-
@Diamondback You can set M208 to an insanely high value. It could probably spin for days without reaching the max.
Not sure if the absolute limits for M208 are HW dependent, or if they are listed in the Wiki somewhere?
Also not sure if M208 is interpreted in degrees for a rotary axis, but I guess so. -
@Diamondback the simplest solution I can think of is to send G92 D0 each time before you move it.
You can choose whatever units you want for M92. Steps/degree is a popular choice for rotary axes.
-
@dc42 Ok cool, if that's the solution most in line with how this sort of stuff is supposed to be handled, that works for me, thank you
-
-
-
@o_lampe said in Rotary axis/spinny thing with no limits:
@Diamondback You can set M208 to an insanely high value. It could probably spin for days without reaching the max.
Not sure if the absolute limits for M208 are HW dependent, or if they are listed in the Wiki somewhere?My polar sand table is set up as cartesian kinematics with
M208 S0 X300 Y3600000
andM208 S1 X300 Y-3600000
, ie it can go 10,000 revolutions in either direction.Also, you can use this to unwind it to a value of 0 to 360:
G92 Y{mod(move.axes[1].userPosition,360.0)} if move.axes[1].userPosition < 0 G92 Y{move.axes[1].userPosition+360.0}
This is useful in end gcode, I find.
I think motor steps are in a signed 32 bit variable (at least on Duet 3). My mechanism has 320 steps per degree, there are 360 degrees per rotation, so the limit would actually be 2^31/320/360 = about 18,641 complete revolutions.
At normal operating speeds I could rotate continuously for about a week.
-
@achrn said in Rotary axis/spinny thing with no limits:
I think motor steps are in a signed 32 bit variable
Correct (that's motor microsteps, not full steps). Bear in mind that absolute positions are stored as 32-bit floating point numbers, so accuracy will suffer when the number of microsteps doesn't fit in about 24 bits.