Enhancements to Rotary Axis Positioning and Rewind Procedure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Coming in the HSM 2018 R3 release of HSM you will notice an improvement on how the starting angles of a multi-axis contouring operation are calculated. The new post kernel will now select the starting angles of the rotary axes based on the best possible solution to avoid rewind situations when one of the rotary axis crosses its limits. This is accomplished by scanning the entire operation to see if a rewind of the rotary axes is required due to limit violations and if so adjusting the starting angles of the rotary axes to see if the rewind can be avoided. If a solution to avoid the rewind cannot be found, then the solution that produces the most rotary movement prior to requiring a rewind will be used.
You should notice that the best possible solution for the rotary axes is always selected at the start of an operation and when a rewind is required due to a rotary axis crossing the limits, the tool will always stop on the exact limit of the machine, eliminating previous scenarios where a valid solution for the rewinding of the rotary axes could not always be found.
One setting that is now very important when defining a rotary axis is the cyclic parameter in the call to createAxis. Where in older versions of the post kernel you would set the cyclic parameter to true in order to enable the ability to rewind the rotary axes when the limits were reached, cyclic is now considered synonymous with continuous, meaning that this axis has no limits and will not be considered when determining if the rotary axes have to be repositioned to stay within limits. The range specifier used in conjunction with a cyclic axis defines the output limits of a rotary axis, for example specifying a range of [0,360] will cause all output angles for this axis to be output between 0 and 360 degrees. The range for a non-cyclic axis defines the actual physical limits of that axis on the machine and are used to determine when a rewind is required. Please note that the physical limits of the machine may be a numeric limit of the control instead of a physical limit, such as 9999.9999.
In conjunction with the post kernel updates we have added generic functions that handle the repositioning of the rotary axes when the limits are reached. This code can be found in various multi-axis post processors including the following.
- 5axismaker.cps
- cr onsrud fanuc 31i.cps
- haas next generation.cps
- haas umc-750.cps
- pocket nc.cps
You can copy the following code from one of these post processors to your custom post to implement logic that will retract the tool, position the rotary axes, and plunge the tool back into the part when a rotary axis limit is reached.
// Start of onRewindMachine logic … // End of onRewindMachine logic
This code is generic in nature and will work with all machine configurations; table/table, head/head, and head/table. Because of this most of the functions included in this code will not have to be modified by you. Any variables and functions that you may have to modify are conveniently located at the top of the code and include the following.
Variable |
Description |
performRewinds |
When set to false an error will be generated when a rewind of a rotary axis is required. Setting it to true will enable the rewind logic to be executed. |
safeRetractDistance |
Add this variable to the post property table at the start of the cps file if you want a distance to be added to the retract position. If this post property is not defined or is set to 0, then the tool will retract past the defined stock of the part. |
safeRetractFeed |
Specifies the feed rate to retract the tool prior to rewinding the rotary axis. |
safePlungeFeed |
Specifies the feed rate to plunge the tool back into the part after rewinding the rotary axis. |
stockAllowance |
The tool will retract past the defined stock by default. You can expand the defined stock on all sides by the stockAllowance value. |
Function |
|
onRewindMachineEntry |
Either overrides or supplements the standard rewind logic. It will simply return false when the standard rewind logic of retracting the tool, positioning the rotary axes, and repositioning the tool is desired. Code can be added to this function for controls that just require the encoder to be reset or to output the new rotary axis position when the control will automatically track the tool with the rotary axis movement. Returning a value of true designates that the onRewindMachineEntry function performed all necessary actions to position the rotary axes and the retract/position/plunge sequence will not be performed. Returning false will process the retract/position/plunge sequence normally. |
moveToSafeRetractPosition |
Controls the move to a safe position after the tool is retracted from the part and before the rotary axes are positioned. It will typically move to the home position in Z and optionally in X and Y using a G28 or G53 style block. |
returnFromSafeRetractPosition |
Positions the move back to the original retract position from the move to a safe position, after positioning the rotary axes. |
These should be all the areas of the rewind code that should be modified, the rest is generic for all machine configurations.

Bob Schultz
Sr. Post Processor Developer