# WrappedRotaryAxes

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

# 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_ROTARY=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. 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 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 "-".

## 4. FAQs

• Can motions of more than 360 degrees be commanded? [Yes use G91]
• what's shown on the DRO? (answer: position modulo 360, always nonnegative -- irc conversation 2009/01/16)

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org