Post processor output IJK instead of ABC for multiaxis operations

Post processor output IJK instead of ABC for multiaxis operations

Collin_Korver
Advocate Advocate
1,834 Views
11 Replies
Message 1 of 12

Post processor output IJK instead of ABC for multiaxis operations

Collin_Korver
Advocate
Advocate

I would like to have my post processor output IJK vectors for multiaxis operations instead of ABC angles. I have serendipitously found if the code is in IJK vector format the multi axis motion becomes significantly smoother resulting in faster cycle times better surface finish due to less jerky motion. I have my theories on why but that is beside the point.

 

I have been struggling to find documentation for modifying the post to output the code in IJK in the Post Processing Training Guide . From what I was reading the way to do this is to not have a machine configuration? However, I would like to have a machine configuration for catching machine limits. 

 

I tried replacing function onLinear5D() with some code (fig 1, 2) I found in another users post but the function unfortunately does not result in correct IJK vectors when posted.

 

For whatever reason, the forum is rejecting adding the post processor modification text file as an attachment (fig 3). 

 

I would like to get connected with someone who might be able to help with getting my post to output IJK. 

 

Fig 1

function onLinear5D 1of2.JPG

Fig 2

function onLinear5D 2of2.JPG

 

Fig 3

WTF.JPG

 

0 Likes
1,835 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable

Did you try to calculate vectors in procedure?

 

Please check your pm

 

Regards

0 Likes
Message 3 of 12

Lennart_Losjo
Advocate
Advocate

Hi.

I have the opposite problem, i get ijk instead of abc.

Any way i can change this?+

Senior Product Specialist
Fusion 360, Inventor.
0 Likes
Message 4 of 12

Collin_Korver
Advocate
Advocate

Check out the post processor training manual linked in the first post. It will walk you through defining a multi axis machine configuration.

Message 5 of 12

Anonymous
Not applicable

You have to add machine configuration, and then you will receive angles.

0 Likes
Message 6 of 12

will_1
Alumni
Alumni

Hi @Collin_Korver ,

 

You can get vectors while using a machine configuration using the getDirection() function. Something like this in onRapid5d and onLinear5d

 

var vec = machineConfiguration.getDirection(new Vector(_a, _b, _c);

 

https://cam.autodesk.com/posts/reference/classMachineConfiguration.html#a53f726348c9d368f037bafb20aa...

 

If you have moves greater that 180 degrees I think vectors will take the machine the short way around which is not what you want. I actually can't reproduce this behavior myself in my limited testing but I believe you can add some logic to the post to output intermediary moves.

 

Thanks,

Will

0 Likes
Message 7 of 12

Collin_Korver
Advocate
Advocate

@will_1 So this method converts it from vectors, to ABC using the machine configuration, and then converts it back to vectors? Is there rounding that happens when using getDirection()?

0 Likes
Message 8 of 12

tsmutz5
Contributor
Contributor

@Collin_Korver, Were you ever able to get machine configuration and vector output working?

I'm looking to do the same thing with one of my machines.

 

Hope you're doing well.

0 Likes
Message 9 of 12

rusty.bird
Advocate
Advocate

@tsmutz5,  I have successfully got vectors to output correctly in the heidenhain post using the method above if you need any help with this.

0 Likes
Message 10 of 12

tsmutz5
Contributor
Contributor

@rusty.bird, Yes please that would be super helpful, either the snippet from the onRapid5D/onLinear5D or the post itself would be great.

 

Thanks again,

0 Likes
Message 11 of 12

rusty.bird
Advocate
Advocate

Here is a Snippet of my OnRapid5D.  The OnLinear5D would be the same Idea.

 

 

 

 

function onRapid5D(x, y, z, a, b, c) {
  if (pendingRadiusCompensation >= 0) {
    error(localize("Radius compensation cannot be activated/deactivated for 5-axis move."));
    return;
  }

  if (currentSection.isOptimizedForMachine()) {
    //var xyzabc = xOutput.format(x) + yOutput.format(y) + zOutput.format(z) + aOutput.format(a) + bOutput.format(b) + cOutput.format(c);
    var pt = xOutput.format(x) + yOutput.format(y) + zOutput.format(z);
    var vec = machineConfiguration.getDirection(new Vector(a, b, c));
    var vecT = txOutput.format(vec.x) + tyOutput.format(vec.y) + tzOutput.format(vec.z);
    if (pt) {
      writeBlock("LN" + pt + vecT + radiusCompensationTable.lookup(radiusCompensation) + " FMAX");
    }
  } else {
    forceXYZ(); // required
    //var pt = xOutput.format(x) + yOutput.format(y) + zOutput.format(z) + txOutput.format(a) + tyOutput.format(b) + tzOutput.format(c);
    var pt = xOutput.format(x) + yOutput.format(y) + zOutput.format(z);    
    var vec = machineConfiguration.getDirection(new Vector(a, b, c));
    var vecT = txOutput.format(vec.x) + tyOutput.format(vec.y) + tzOutput.format(vec.z);
    if (pt) {
      pendingRadiusCompensation = -1;
      writeBlock("LN" + pt + vecT + radiusCompensationTable.lookup(radiusCompensation) + " FMAX");
    }
  }
  forceFeed(); // force feed on next line
}

 

 

 

 

0 Likes
Message 12 of 12

tsmutz5
Contributor
Contributor

Thanks so much @rusty.bird.
This is very helpful.

0 Likes