Wrapped Rotary Axis Spec (draft)
This spec is based on behavior described on IRC by Stuart as being fairly
standard among other controls. (However, I've probably got the details wrong. --
JeffEpler)
1. Equivalent axis positions
All rotary axis positions of the form
a + k*360
(a any number, k an integer) are equivalent positions. For example, all the
following rotary axis positions are equivalent:
... -1050 -690 -330 30 390 750 1110 ...
2. inifile specification
[AXIS_#]WRAPPED=1
Specifies that this axis is wrapped. In this case, there are no soft
limits applied to the axis. Otherwise, the normal soft limits are applied as in emc2.2.
If unspecified, defaults to 0. Should only be specified for axes 3, 4, 5
(corresponding to A, B and C)
3. Enabling and disabling Wrapped Rotary Motion
To enable wrapped rotary motion for wrapped axes, program G91.2. To disable,
program G90.2. This setting affects all axes, not just those specified as
WRAPPED in the inifile.
When G91 is in effect, the G90.2/G91.2 modal code has no effect on rotary motion. When
G90 is in effect, then the G90.2/G91.2 modal code applies to rotary motion as described below.
4. Effect of rotary motion in wrapped rotary motion mode
When a rotary move is commanded, the sign ("+" or "-") of the axis
word recorded. Then, any offsets in effect are added to the absolute value of
this angle to give the commanded angle 'theta'.
- The motion is to an angle equivalent to theta
- If the sign of the axis-word is "+", then the motion is counterclockwise
- If the sign of the axis word is "-", then the motion is clockwise
- The motion is always greater than 0 degrees but never greater than 360 degrees
- The sign of a nonzero number (including the result of a calculation or a number takenf from a #-parameter) is "+" if the number is positive and "-" if it is negative.
- The sign of a literal "0" and "+0" is "+", and the sign of a literal "-0" is "-".
- If 0 is the result of a calculation or is taken from a #-parameter (not a literal "0", "+0" or "-0"), then the sign is undefined. The equivalent +360 and -360 can be used instead.
5. Open questions
- Can motions of more than 360 degrees be commanded? (answer: No -- irc conversation 2009/01/16)
- What does G10 L2 A- mean?
- Should G91.2 modify the behavior of non-wrapped axes (my impression from Stuart --JeffEpler) or not (ChrisRadek?'s opinion)
- what's shown on the DRO? (answer: position modulo 360, always nonnegative -- irc conversation 2009/01/16)
- (if you think something is underspecified above, add it here)