HAAS A-Axis Keeps Counting Up

HAAS A-Axis Keeps Counting Up

area419jon
Advocate Advocate
789 Views
5 Replies
Message 1 of 6

HAAS A-Axis Keeps Counting Up

area419jon
Advocate
Advocate

Using Generic HAAS A-Axis (pre-NGC).  I do have the NGC, but no options for PP it seems.

 

This seems to be a new issue as I don't ever remembering it happening in 2017.  But by the end of my program the A-Axis is at some 4800 degrees.  No big deal right, well, when it calls A0 at the end of the program it has to fully unwind.  Luckily I have the HRC rotary, so its quick, and it does sling a lot of coolant off the parts which is nice, but Id still rather it not for rotary longevity purposes.  I am guessing that in 2017 the PP had some max value the rotary would go in one direction. 

 

Thanks

0 Likes
790 Views
5 Replies
Replies (5)
Message 2 of 6

jbthornhill
Enthusiast
Enthusiast

Check Setting 108 - turn it on, and when you call G28 A0, it should rewind within one turn.

Message 3 of 6

bob.schultz
Alumni
Alumni

@area419jon wrote:

Using Generic HAAS A-Axis (pre-NGC).  I do have the NGC, but no options for PP it seems.

 

This seems to be a new issue as I don't ever remembering it happening in 2017.  But by the end of my program the A-Axis is at some 4800 degrees.  No big deal right, well, when it calls A0 at the end of the program it has to fully unwind.  Luckily I have the HRC rotary, so its quick, and it does sling a lot of coolant off the parts which is nice, but Id still rather it not for rotary longevity purposes.  I am guessing that in 2017 the PP had some max value the rotary would go in one direction. 

 

Thanks


 

Let me expand a bit on the solution that @jbthornhill gave you.  First, the haas next generation post does have properties for enabling different rotary axis configurations.  In your case you would set the Has A-axis rotary property to true.  The next generation post will also output a G91 G28 C0 block at the end of the program if a C-axis is defined, unfortunately it does not do the same for the A-axis.  We will add this to the production version of the post, but for now you can make the change yourself.  Find the following code in the onClose function.

 

  // Unwind C axis at end
  if (properties.hasCAxis) {
    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "C" + abcFormat.format(0));
    writeBlock(gAbsIncModal.format(90));
  }

and change it to look like the following.

 

  // Unwind Rotary table at end
  if (properties.hasCAxis) {
    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "C" + abcFormat.format(0));
    writeBlock(gAbsIncModal.format(90));
  } else if (properties.hasBAxis) {
    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "B" + abcFormat.format(0));
    writeBlock(gAbsIncModal.format(90));
  } else if (properties.hasAAxis) {
    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "A" + abcFormat.format(0));
    writeBlock(gAbsIncModal.format(90));
  }

On a last note, the 2017 version of the post should behave in the same manner.  If it had a limit on how far the table could rotate, for example 360 degrees, and say it outputs moves from A360 to A5.  Since the Haas table moves on a linear (wind-up/wind-down) scale this would have caused the machine to rotate 355 degrees in the counter-clockwise direction rather than 5 degrees in the positive direction as expected.

 

You can see how Setting 108 applies to your case by watching the following video.

 

https://www.youtube.com/watch?v=vupmJflbAIE



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 4 of 6

area419jon
Advocate
Advocate

Ok, so I downloaded the next gen post, turned on "Has A-Axis Rotary".  Went to the config and all of the stuff you told me to add was already there, so it must have gotten changed already.  Problem is that even if you turn TCPC programming off, it still writes G254 and G255s.  Im not sure if that affects anything or not, but I dont really want to try and find out lol.  I dont want to use dynamic work offsets.  That being said, I couldnt test that program to see if the unwind was better.

 

I did, however, manually input a G28 A0 at the end of my existing program, setting 108 was already turned on in the control.  She still unwound about 8000 degrees at the end of the program.  Only thing I just noticed was a lack of a G91, maybe that is the key?

 

Anyway, thought Id let you know on the TCPC stuff as that seems like a big deal...unless Im missing something.

0 Likes
Message 5 of 6

bob.schultz
Alumni
Alumni

Yes, the G91 is definitely the key.  What you did is told the table to move its home position, but first move to A0 (rewind about 8000 degrees) since the control is in absolute mode.  The G91 enables incremental mode, so the A0 causes no movement prior to moving the A-axis to its nearest home position.  You can add the G91 G28 A0 block to the onClose function in the Haas with A-axis post so that it is always output.  Use the Next Generation post as a sample.



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 6 of 6

area419jon
Advocate
Advocate

I wanted to update this post with the fix I was looking for.  I forgot about it for awhile, then recently got annoyed again with the issue that I did some searching again.  Found another post where it was solved in the manner that I liked.

 

 

  if (true) {
    var aAxis = createAxis({coordinate:0, table:true, axis:[(properties.makeAAxisOtherWay ? -1 : 1) * -1, 0, 0], cyclic:true, preference:0});
    machineConfiguration = new MachineConfiguration(aAxis);

And it should be this with your desired range:

  if (true) {
    var aAxis = createAxis({coordinate:0, table:true, axis:[(properties.makeAAxisOtherWay ? -1 : 1) * -1, 0, 0], range:[-360, 360], cyclic:true, preference:0});
    machineConfiguration = new MachineConfiguration(aAxis);

 

The only change I made to the above is set the range to -359.999, 359.999.  This just causes it to use A0 instead of A360. 

0 Likes