Enhancements to Rotary Axis Positioning and Rewind Procedure

Enhancements to Rotary Axis Positioning and Rewind Procedure

bob.schultz
Alumni Alumni
9,991 Views
23 Replies
Message 1 of 24

Enhancements to Rotary Axis Positioning and Rewind Procedure

bob.schultz
Alumni
Alumni

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.

 

  1. 5axismaker.cps
  2. cr onsrud fanuc 31i.cps
  3. haas next generation.cps
  4. haas umc-750.cps
  5. 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

9,992 Views
23 Replies
Replies (23)
Message 2 of 24

abrownAG8YF
Advocate
Advocate

I'm assuming this will solve the "Retract required for machining" error I've been getting with my Fanuc Robodrill post. Before I go and edit my post with these changes though, when should we expect the posts in the HSMWorks library to be updated? Looking at the 5axismaker post I see some other great changes as well.

0 Likes
Message 3 of 24

bob.schultz
Alumni
Alumni

You are correct that implementing the code mentioned in this thread will resolve the "Retract required for machining" error.  You will need to check the output carefully to make sure the retract/position/plunge movements are what you are expecting for your machine.  This logic was put into post processors that are setup for multi-axis support by default and since the Robodrill post defaults to a 3-axis machine it was not implemented here.

 

I am curious on what features in the 5axismaker post drew your interest.



Bob Schultz
Sr. Post Processor Developer

Message 4 of 24

abrownAG8YF
Advocate
Advocate

I've copy and pasted into my post as instructed but I'm still receiving the same retract error when trying to post my wrapped part. I've attached the part and my post, can I get some help with getting past the error? Thanks in advance.

0 Likes
Message 5 of 24

Laurens-3DTechDraw
Mentor
Mentor

That is not a rewind issue,

But it says it can't rotate to the needed angle.

 

Can you tell us what your machine looks like because you might have set-up your axis wrong, or set the coordinate system in the part wrong.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 6 of 24

AchimN
Community Manager
Community Manager

You need to install the latest development version of HSM to get the latest post processor kernel:

http://cam.autodesk.com/download/hsmworks/

 



Achim.N
Principal Technology Consultant
Message 7 of 24

abrownAG8YF
Advocate
Advocate

Thanks for the link Achim. I updated to the latest dev version and reposted, then received the tool positioning error that Laurens received instead of the retract error.

 

@Laurens-3DTechDraw: My machine has a 5-axis rotary installed, see the attached pictures. When I apply the wrap option for the grooves in the part it seems to automatically set the part to rotate around the Z-axis, as it would be on a lathe. I instead want to wrap the grooves on the part and use the rotary rotation in place of the machine Y-axis, so the part should rotate around the X-axis. Basically the steps would be as follows:

 

-Rotate 4th axis (rotates around Y-axis) from 0 degrees to -90 degrees (second picture)

-Rotate 5th axis (rotates around Z-axis when rotary points up, X-axis when rotary points sideways) to mill grooves

 

Is there a way I can edit the post or adjust the tool orientation for the wrap to rotate around the X-axis instead of the Z-axis?

0 Likes
Message 8 of 24

Laurens-3DTechDraw
Mentor
Mentor

Pretty sure I understand why it gives the tool orientation error.

You load the part in with the B-axis at -90 or not?

And since the post doesn't know that everything goes wrong.

 

See the attached part with the Coordinate system so that the B and C are set at 0 when the program starts.

 

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 9 of 24

abrownAG8YF
Advocate
Advocate

The new coordinate system works, thank you Laurens. We load the part in with the B-axis at 0 degrees (pointing up), then it rotates to -90 degrees and the part locks in with a tailstock.

 

One thing to note: My post has useMultiAxisFeatures set to False, but my post still ended up with G43.5 (Fanuc RTCP) being used for the wrapped features. G43.5 is for 5-axis work, whereas wraps should only need four axes (G43). What should I edit in my post to change it to G43?

 

Thanks again.

0 Likes
Message 10 of 24

ArjanDijk
Advisor
Advisor

Hi @bob.schultz. Does this update also handle a leadin/leadout? On the previous retract it was really visible (marks) on the part where it retracted, don't read in in the notes, but I hope you found something fot this.


Inventor HSM and Fusion 360 CAM trainer and postprocessor builder in the Netherlands and Belgium.


0 Likes
Message 11 of 24

bob.schultz
Alumni
Alumni

Hello Arjan,

 

No, this does not include lead-in/lead-out moves.  The post would have to know what side of the part that the tool is on (it is not contained in the intermediate file) and would also have to look ahead at the next moves if you are wanting to angle off the part instead of moving at a 90 degree angle to the last move.  There is also no guarantee that the part can be avoided in this situation.  For these reasons, we did not include lead-in/lead-out moves.

 

It is something that a reseller or end-user could add to their post, but they would have to be careful in analyzing the retract motion since you would not see it in the HSM simulation.



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 12 of 24

Laurens-3DTechDraw
Mentor
Mentor

@ArjanDijk

The trick is that if you set one end of your tilting head/table to 0 you can avoid retracts.

That's what I do now. @bob.schultz made the system always go to the axis limit set in the machineconfig. This means that it will always go to 0 if that is your limit. And on 0 I just perform the rewind while the tool stays in contact. Set back is that you need a proper machine for this to not leave a mark.

Our Doosan 5-axis doesn't show a thing when I perform that move in feed, in rapid you can see a little mark.

 

Haven't checked if you can invoke @bob.schultz singularity problem fix for that as well. But when that would be the case perfect world in my opinion.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 13 of 24

ArjanDijk
Advisor
Advisor

Hi @Laurens-3DTechDraw, I don't really know what you mean by a rewind while the tool is in contact with the material. It sounds kinda dangerous.


Inventor HSM and Fusion 360 CAM trainer and postprocessor builder in the Netherlands and Belgium.


0 Likes
Message 14 of 24

Laurens-3DTechDraw
Mentor
Mentor

@ArjanDijk

See in the second video: https://www.instagram.com/p/BYL5f75HpmC/

When A=0 you can just rotate the C-axis to any rotation you want. Because there is no tilt.

Which means that with the current post engine you can check if the tilting axis(Usually A or B) is at 0, the tool doesn't need to lose contact with the part to go from A=0 C=0 to A=0 C=180. (Before the rewind would have been A-0.4 C0.589 to A+0.8 C179.0 for example and that would need a retract)

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 15 of 24

ArjanDijk
Advisor
Advisor

Hi @Laurens-3DTechDraw. With the rewindissues that passed I've never seem A0/B0 passing (it is possible of course). Most of the time A or B were more of less solid 30/45 degrees and C did all rotations. C could be either in Head of Table, A or B are in the machinehead. Lets see if I see applications for this.

 

 


Inventor HSM and Fusion 360 CAM trainer and postprocessor builder in the Netherlands and Belgium.


0 Likes
Message 16 of 24

Laurens-3DTechDraw
Mentor
Mentor

@ArjanDijk wrote:

Hi @Laurens-3DTechDraw. With the rewindissues that passed I've never seem A0/B0 passing (it is possible of course). Most of the time A or B were more of less solid 30/45 degrees and C did all rotations. C could be either in Head of Table, A or B are in the machinehead. Lets see if I see applications for this.

 

 


That's why you need to set 1 of the A/B limits to 0. That's what I said.

A or B can just as easy be in the table. But as long as there is no tilt, and the C-axis is in the table there is no issue to rotate the C-axis freely.(Ask Roel to show you this on the Machine)

 

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 17 of 24

Anonymous
Not applicable

Hello @bob.schultz do you also have the "onrewindmachine" section in Heidenhain language. 

 

I`ve tried the current section by copie/paste, but I get a fualt message:

 

Warning: Work offset has not been specified.
Warning: REWIND: Tool is retracting due to rotary axes limits.
Error(C:\Users\Public\Documents\Autodesk\Inventor HSM\Posts\heidenhain-test.cps:2369): ReferenceError: gMotionModal is not defined
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Stack dump:
moveToSafeRetractPosition(false)@C:\Users\Public\Documents\Autodesk\Inventor HSM\Posts\heidenhain-test.cps:2368
onRewindMachine(0,0,64.62517505179204)@C:\Users\Public\Documents\Autodesk\Inventor HSM\Posts\heidenhain-test.cps:2586

Failed while processing onLinear5D() for record 1288.
Error: Failed to invoke function 'onRewindMachine'.
Error: Failed to invoke 'onRewindMachine' in the post configuration.
Error: Failed to execute configuration.
Stop time: Monday, January 22, 2018 1:40:44 PM
Post processing failed.

 

It`s this part of the "onrewindmachine"section;

 

/** Retract to safe position before indexing rotaries. */
function moveToSafeRetractPosition(retracted) {
if (properties.useG28) {
if (!retracted) {
writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(0));
zOutput.reset();
}
if (properties.forceHomeOnIndexing) {
writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0));
xOutput.reset();
yOutput.reset();
}
writeBlock(gAbsIncModal.format(90));
} else {
if (!retracted) {
gMotionModal.reset();
writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), "Z" + xyzFormat.format(machineConfiguration.getRetractPlane()));
zOutput.reset();
}
if (properties.forceHomeOnIndexing) { // e.g. when machining very big parts
writeBlock(
gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0),
"X" + xyzFormat.format(machineConfiguration.hasHomePositionX() ? machineConfiguration.getHomePositionX() : 0),
"Y" + xyzFormat.format(machineConfiguration.hasHomePositionY() ? machineConfiguration.getHomePositionY() : 0)
); // Safe tool position
xOutput.reset();
yOutput.reset();
}
}
}

 

it`s all G-code related language and our machine is heidenhain language.

5-axis is working till it hits the b-axis limiter, so i need the onrewindmachine logic in Heidenhain language. then it will probably work.

 

Waiting for your advice,

 

Thanks in advance.

 

 

0 Likes
Message 18 of 24

bob.schultz
Alumni
Alumni

Yes, the "moveToSafePosition" function is machine specific and needs to be modified for your specific machine.  For the Heidenhain your implementation should look something like the following.

 

/** Retract to safe position before indexing rotaries. */
function moveToSafeRetractPosition(retracted) {
  writeRetract(Z);   //  retract the z-axis
  // include the following code only if you want to move XY to their home position
  if (machineConfiguration.hasHomePositionX() && machineConfiguration.hasHomePositionY()) {
    writeRetract(X, Y);
  }
}


Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 19 of 24

Anonymous
Not applicable

Thanks @bob.schultz , after some tweeking it finally works!

 

gr,

 

Martijn.

0 Likes
Message 20 of 24

gazmann
Enthusiast
Enthusiast

Hi All,

I have a HAAS UMC750 And having trouble with a rewind. I have the latest post and running HSM Inventor build 6.4.016913. I am running a contour cycle with Multi-Axis tilting enabled to allow for tool and holder clearance. The toolpath calculates out correctly in HSM but when I try to post I get the following message

Capture.PNGWhat do I need to do to get this to work 

0 Likes