Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Haas Post Mod - Position Table @ Center of Machine

daniel.vidakovich
Alumni

Haas Post Mod - Position Table @ Center of Machine

daniel.vidakovich
Alumni
Alumni
At the end of each program the Generic Haas Post positions the table on the far left side of the machine (Machine home X0, Y0, Z0).  Instead of jogging the machine each time to retrieve your part (in the negative X direction) it was kinda fun to modify the Post and automatically position the table in the center at the end of each program. 

Here's how to do it:

1. Click Post Process
2. From the Post Configuration drop down select "HAAS - MILLING.cps - HAAS factory"
3. Click Open config
4. Scroll down to line 1633
5. Change the "X" value from 0. to -18. (see red arrow in attached picture)

This inserts G53 X-18. Y0. at the end of each program!  Sweetness. Attached is the modified post processor, but way it's cooler if you do it yourself and learn JavaScript.
0 Likes
Reply
2,704 Views
15 Replies
Replies (15)

Steinwerks
Mentor
Mentor
You might want to make that X-18.
Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes

skidsolo
Alumni
Alumni
Numbers that originate from within the post are not converted for inch/metric. You should also use toPreciseUnit to convert the number to metric. If someone ever makes apart in metric that would be 18 mm.
Andrew W. Software engineer (CAM Post Processors)
0 Likes

daniel.vidakovich
Alumni
Alumni
Thanks, Andrew!

As Andrew mentions above, hard coding a value of -18. will not return an equivalent value if machining in millimeters.

Use the function toPreciseUnit(value, unit) to return the proper value in the opposite unit.

Please see attached screenshot and update post.
0 Likes

Greg_Haisley
Collaborator
Collaborator
I'm with you Lonnie on this one.  ;D 

The machine configuration is the place for this setting. As Lonnie stated ~ this way the post may be run on other same brand/controls with out modification. I think all machine specific settings should be in the machine configuration, not special posts. The user calls up the machine configuration for the job, posts the file.
0 Likes

Anonymous
Not applicable
I agree on the use of machine configuration, but it still doesn't handle the units correctly for me...and some of the support guys are recommending hard coded changes...


I had a bit of an issue with the above piece of code to change my end of cycle position. I fixed it, but forgot to update the thread. Upon taking it a step further, I ran into another little glitch...

First, the above did not work because it was just trying to change the 'intermediate position' that G28 (return to machine home) uses as it is a 2-step routine. It moves to a specified intermediate position before continuing on the the machine home. Of course, that was not what we were getting at.

The other way is to use the G53 command to shift to machine coordinates, and then specify the desired end of cycle position. Upon digging into the post, I found that it is certainly already set up to do so. It was just waiting on some variables to be defined to initiate the alternate output...

  if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) {
    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0)); // return to home
  } else {
    var homeX;
    if (machineConfiguration.hasHomePositionX()) {
      homeX = "X" + xyzFormat.format(machineConfiguration.getHomePositionX());
    }
    var homeY;
    if (machineConfiguration.hasHomePositionY()) {
      homeY = "Y" + xyzFormat.format(machineConfiguration.getHomePositionY());
    }
    writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY);
  }


So I went in and made some edits for my machine and got it passing things through and posting the output that I was after:

N1300 G28 G91 Z0.
N1305 G90 G53 X-15. Y0.


...But the issue is that in order for my to get the above to output X-15, I had to divide that by 25.4 as it is passing the millimeter equivalent into my output file (X-381.). This seems to be a bug as everything else is specified in inches and I've seen no other metric values. The value that I needed to enter to get X-15 is shown in the dialog box. Note it says inches in both places on that screen also...



So I have things outputting great otherwise, without having to manually edit right now, which is wonderful. So I am not sure if the above issue is user error or not; at my competency level with HSMExpress it is difficult to discern.

The home position I am defining also keeps resetting. Is there a 'master' machine config because it appears as though my edits only affect that particular job. How do you access it otherwise? Can I just define these parameters on the post somewhere?


So either my post is messed up or there is something else going on here...
0 Likes

skidsolo
Alumni
Alumni
You can use the machine config, but you still have to use "toPreciseUnit" because the numbers are not coming from the CAM kernel. Problem is the machine config is only available in HSMworks, neither InventorHSM or Fusion has a machine config ...
Andrew W. Software engineer (CAM Post Processors)
0 Likes

Anonymous
Not applicable
AndrewWard wrote:

You can use the machine config, but you still have to use "toPreciseUnit" because the numbers are not coming from the CAM kernel. Problem is the machine config is only available in HSMworks, neither InventorHSM or Fusion has a machine config ...


Maybe I'm missing something, but why would the standard/generic post not handle this without modification. Am I not doing this in the prescribed way? I don't mind making post modifications, but that seems like it should just be out of the box standard functionality. I am using a generic Yasnac post with very little modifications for reference. It seems odd that I have to 'trick' the system to convert units...
0 Likes

skidsolo
Alumni
Alumni
The generic post did not have the conversion in to start with, it was missed ....Not many people use it because they have G28 etc.
Andrew W. Software engineer (CAM Post Processors)
0 Likes

Anonymous
Not applicable
I have G28 working as normal, but it is not capable of positioning the table at a position other than machine home. G28 takes a position parameter, but it is only an intermediate stop on its way to machine home. It cannot be used to end at any other position--it is just how G28 is designed to work, at least on Yasnac (and likely others) controls.

G53 is required to actually end at a pre-defined home position, which is what most people are after.

Again, I'm not sure what the issue is with including the conversion in the generic post. You have set things up to work a certain way, and then only implemented 75% of it so it can't be used as it was meant to be.

If it is a lack of resources and being low on the to do list, then I guess I understand, but it seems like a trivial addition that would fix a broken piece of your software.
0 Likes

AchimN
Community Manager
Community Manager
Did you try to set the property "homePositionCenter" in the generic haas post to YES?
That should move your table (X) in front of the door at the end of your program instead of sending the machine to home. We never did get a feedback on this so if you want to be the first one, go ahead  😉


Achim.N
Principal Technology Consultant
0 Likes

Anonymous
Not applicable
If that question was directed to me, then no, I have not set that property in the Yasnac post that I am using because it is not currently in there. What is the specific line of code and where should it be added?

The OP was specific to HAAS post, but the same issues/questions were relevant to me using a Yasnac post regarding a prescribed program end position. We may now be talking about differences between the two posts. I am trying to stay on topic without deviating to any issues specific to my case.

I would be happy to insert the proper code changes and test for you, so you can then implement into the generic post.

Or if someone could tell me how to resolve the units issue without 'tricking' the program, I could test and verify that.
0 Likes

AchimN
Community Manager
Community Manager
You can compare your post with the generic haas post and copy all relevant code with "homePositionCenter" to yours.
Its all in onClose().


Achim.N
Principal Technology Consultant
0 Likes

Steinwerks
Mentor
Mentor
Bringing this one back... so I seem to get a random number: X20.4375

Now this will alarm out the control, because in G53 there is no positive quadrant, just -X,-Y quadrant. This is with my machine setup set as X maximum 0 minimum -64. I can edit the post, but if we get another Haas, it won't likely be another VF-6SS and will be different. The post I'm using is the generic Haas post supplied with HSMXpress with a very minor tweak to take advantage of our "custom" air blast solution (M51,M61).

Suggestions? All I really want is a line before M30 that is G53X-32.Y0
Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes

Steinwerks
Mentor
Mentor
Boy do I feel silly. Positions the part in front of the doors!  :-X
Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes

elavake
Participant
Participant

Hello, 

Would you be able to do the same to my post ?  I would like a table position of  G53 X-25. Y0.  at the end of each program.

0 Likes