Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need to modify lathe post to not go Z home at end of run (hits tailstock limit)

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
cmleschak
399 Views, 4 Replies

Need to modify lathe post to not go Z home at end of run (hits tailstock limit)

So I have a modified Fanuc turning post that I use on my Milltronics ML22 lathe. Normally it is just fine, but recently I have been running some shafts that require a live center. When the run finishes X and Z both go back to their home position.  This is completely fine on the X (diameter) but the Z runs right into the tailstock (luckily stopped by a soft limit switch)  Aparently the machine only knows to go home when it sees an x or a z after a g28. 

 

See below.. In bold red I tried first to change the value to .100" which would be a safe rapid to position. It still tried to go all the way home.. Then I tried to add two forward slashes // to try and just skip the zFormat since I dont really need it.  The post fails when I remove that Z.  What is the proper way to remove?

 

 

forceXYZ();
if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) {
writeBlock(gFormat.format(28), "X" + xFormat.format(10), conditional(yOutput.isEnabled(), "Y" + yFormat.format(0)); //"Z" + zFormat.format(0.1)); // return to home
} else {
var homeX;
if (machineConfiguration.hasHomePositionX()) {
homeX = xOutput.format(machineConfiguration.getHomePositionX());
}
var homeY;
if (yOutput.isEnabled() && machineConfiguration.hasHomePositionY()) {
homeY = yOutput.format(machineConfiguration.getHomePositionY());
}
if (properties.type == "A") {
writeBlock(gFormat.format(53), gMotionModal.format(0), homeX, homeY, zOutput.format(machineConfiguration.getRetractPlane()));
} else {
writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY, zOutput.format(machineConfiguration.getRetractPlane()));
}
}

onImpliedCommand(COMMAND_END);
onImpliedCommand(COMMAND_STOP_SPINDLE);
writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
writeln("%");

4 REPLIES 4
Message 2 of 5
ivan.stanojevic
in reply to: cmleschak

Could you attach your post so I can take a look at it?


Ivan Stanojevic


Message 3 of 5
cmleschak
in reply to: ivan.stanojevic

See attached post..

 

I re-enabled the part I tried to disable just so I can post again. At the end of my program after G28 I have to remove the Z manually

 

ex (these are the last 3 lines of processed code)

 

N114 M9
N115 G28 X20. Z0.1
N116 M30
%

 

Has to be changed to 

 

N114 M9
N115 G28 X20.
N116 M30
%

 

My machine sees G28 (return to reference point) and Z and just goes back to its home position disregarding the .1 coordinate I am posting out. 

Message 4 of 5
George-Roberts
in reply to: cmleschak

This kind of setting is dependant on what type of machine you have setup in the post. Is it defiantly the G28 line causing the issue? Or is it infact the G53 line?

 

You almost removed the Z value correctly, you're just missing one close bracket before the comments, it should be like this:

 

forceXYZ();
if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) {
writeBlock(gFormat.format(28), "X" + xFormat.format(10), conditional(yOutput.isEnabled(), "Y" + yFormat.format(0))); //"Z" + zFormat.format(0.1)); // return to home
} else {

Message 5 of 5
cmleschak
in reply to: George-Roberts

That did it, it was the missing bracket..  ugh. 

 

I program robots using a Java like language and that has bitten me before. I should have seen that one.. DOH!

 

The post works as it should now.

 

G53 does not post anywhere in my code, nor should it..

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report