- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys i have a Topper lathe running an old fanuc o-t control.
It doesnt accept G53, only uses G28.
Is it possible to adjust the post so my tool change position is U0.0 W-8.O ( X0. Z-8.0 ), so it doesnt go all the way home each time?
I attempted to do it myself and changed the safe home position in the post, but it didnt work, just went to z-8.0 and then returned to home again.
I tried doing it in the user defined properties when posting as well, but it just posts out a 0.0
While im at it, I'll throw one more question in the loop.
I have a 12" chuck on the lathe, its oversized for the machine, so i cant ramp up from a dead stop.
Ive gotten around this by inputting a small manual pass through at the front of my program that ramps up slowly to speed. Not sure if there is a different solution, if that something that can be done in the post or not.
Appreciate your guys help or input.
Ive attached my post
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @Danvil9226
It's because of the default behavior in the post.
When using G28, it will by default uses Z0 X0 always.
If you edit the post with a text editor, and serach for the function writeRetract, you can this this code piece:
if (method == "G28") {
_xHome = toPreciseUnit(0, MM);
_yHome = toPreciseUnit(0, MM);
_zHome = toPreciseUnit(0, MM);
} else {
_xHome = machineConfiguration.hasHomePositionX() ? machineConfiguration.getHomePositionX() : getProperty("homePositionX");
_yHome = machineConfiguration.hasHomePositionY() ? machineConfiguration.getHomePositionY() : toPreciseUnit(0, MM);
_zHome = machineConfiguration.getRetractPlane() != 0 ? machineConfiguration.getRetractPlane() : getProperty("homePositionZ");
}
That means G28 is always X0 Y0 Z0.
You can replace all the code to this simpler version, allowing to define your home position in the properties and use it.
_xHome = machineConfiguration.hasHomePositionX() ? machineConfiguration.getHomePositionX() : getProperty("homePositionX");
_yHome = machineConfiguration.hasHomePositionY() ? machineConfiguration.getHomePositionY() : toPreciseUnit(0, MM);
_zHome = machineConfiguration.getRetractPlane() != 0 ? machineConfiguration.getRetractPlane() : getProperty("homePositionZ");
Regards
______________________________________________________________
If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
/** Output block to do safe retract and/or move to home position. */
var XZ = 4;
function writeRetract() {
var words = []; // store all retracted axes in an array
var singleLineRetract = false;
var retractAxes = []; // axes to retract
var method = getProperty("safePositionMethod");
// define home positions
var _xHome;
var _yHome;
var _zHome;
if (method == "G28") {
_xHome = toPreciseUnit(0, MM);
_yHome = toPreciseUnit(0, MM);
_zHome = toPreciseUnit(0, MM);
} else {
_xHome = machineConfiguration.hasHomePositionX() ? machineConfiguration.getHomePositionX() : getProperty("homePositionX");
_yHome = machineConfiguration.hasHomePositionY() ? machineConfiguration.getHomePositionY() : toPreciseUnit(0, MM);
_zHome = machineConfiguration.getRetractPlane() != 0 ? machineConfiguration.getRetractPlane() : getProperty("homePositionZ");
}
Thanks for the response Serge!
Above is my post what should I remove.
I tried deleting and keeping as you suggested but kept getting invalid post
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Okay that worked.
I'm able to modify the G28 in Post properties via preferences.
Its still not doing what i want though, I spent all day trying to Fiddle change and figure it out, Im missing something.
Is it possible to post G28 Just at the start of the Program and at the Very End, and then G00 to a defined Toolchange position instead of G28
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Oooookay what a learning curve
, First time editing a post, but I got it.
Here is the post, works great, but obviously use at your own caution.
Gives you an option in Preferences for a Tool change via G28 or G0 in X or Z.
G28 defaults to U0. W0.
G00 you can edit both distances.
I used the WriteRetract function as a template, re labelled it and made seperate functions for functions for X and Z
If anyone has a solution for my Big chuck problem that would be awesome haha
right now i Manual pass through the following code at the beginning of my program to help bring the chuck to speed.
(SPINDLE STARTUP)
G97 S300 M3
G04P1000
G97 S400 M3
G04P1000
G97 S500 M3
G04P1000
G97 S600 M3
G04P1000
G97 S700 M3
G04 P1000
G97 S750 M3
G04 P2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @Danvil9226
Open your post with a text editor.
Search for the startSpindle function.
Inside the startSpindle function, in the branch outputting the G97 command, we can change the code.
Piece of code before the change :
if (getSpindle(true) == SPINDLE_SECONDARY) {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
} else {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
}
Let's add some logic for gradually speed up the spindle.
After the change, the same piece of code is now:
. if (getSpindle(true) == SPINDLE_SECONDARY) {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
} else {
var startSpindleSpeed = 300;
var spindleIncrement = 100;
var tempSpindleSpeed = startSpindleSpeed;
while (tempSpindleSpeed < _spindleSpeed+spindleIncrement) {
writeBlock(
spindleMode,
sOutput.format(tempSpindleSpeed),
spindleDir
);
writeBlock(gFormat.format(4), "P" + milliFormat.format(1000));
tempSpindleSpeed +=spindleIncrement;
}
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
}
Regards.
______________________________________________________________
If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks Serge! Its all working ! nice not having to remember to input the manual lines.
It Drops the spindle speed down to 300 and ramps up on every tool change, is it possible to only ramp up only when the programmed Rpm is dropped, so its constant through out all tool changes? if that's out of reach I can understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @Danvil9226
Can you share a small gcode showing your intent?
Just the few lines around the tool change, with the ramp up or down showing?
Regards.
Fusion