- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys, I have recently with the help of this forum been able to post sub spindle/part handling code to our DMG CLX450 mill turn machine.
The last couple problems I have that I can't seem to make work is the fact that when the sub spindle moves under G01 conditions no feed rate is output and also I don't want the turret to be moved in sub spindle cycles as I will be working close in between chucks on small parts.
Post attached.
Thank you.
Example of code:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Andy,
I’ve reviewed the issue with the “getfeed” function. It appears that the section for part transfer isn’t detecting a movement. To resolve this quickly, we need to define a separate format statement and update the code as shown in the image. Please let me know if this solution works for you.
The Format statement :
The Code :
Regarding the removal of the G53 section, I have a few follow-up questions. Could you please elaborate on the specific scenarios where the G53 section is currently being used? Additionally, I assume that the G53 section is not needed only in the case of “secondary-spindle-grab.” Is this correct? Please provide more details so we can ensure the solution is comprehensive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @rushikesh_nagalkar thank you for the reply.
I can confirm that in the case of a sub spindle grab this is now working for me, thank you very much, however I cannot get it to work on a "bar pull" or "sub spindle return" I still get a G01 with no feed rate in those cases.
I have tried editing a copy of the post in a similar way using the new format statement but I am just guessing at the solution and it does not work.
Sub spindle return.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have edited the post similarly to your first trial for “bar pull” or “sub spindle return.” It is working fine for me, as shown in the image below.
Regarding the second method you tried, I believe it is also acceptable as long as we do not interfere with the formatting of other statements. The name should be unique for format statements, so please be mindful of the placement. However, it seems unnecessary to define this many format statements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
That's strange that it didn't work for me, I can only guess that I didn't input the code correctly in the "bar pull" & "sub spindle return" areas, could you possibly share your code with me so I can compare the 2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
well I have just taken the codes form your script and give it a try. The code looks ok to me and working as well. Just for sake of Trial here is
The problem here is you have "FEED_MODE_UNIT_REV" as "ON" i.e mm/rev. Is it necessary to have feed in mm/rev for part transfer operation ??? Let me know your thoughts on it. May be we could try another way to fix this from roots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I don't need feed/rev for part transfer but I tried changing "FEED_MODE_UNIT_REV" to "FEED_MODE_UNIT_MIN" , it didn't make any difference to the outputted code.
I think I am going to leave this now, I have the feed rates outputted correctly using this method:
var SSGrabfeedOutput = createVariable({prefix:"F"}, feedFormat);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hiii @AndyDHarlow ,
I have worked on proper solution for you. Kindly refer this and make the necessary changes to your post. Kindly undo/remove all previous changes mentioned above from Post.
Update the getfeed Function as per code below.
function getFeed(f) {
// This lime of code makes sures that value is passed on s_Spindle in case of Part Transfer
//START--------------------------------------------------------------------------------------------------------------
var s_Spindle = spindleSpeed;
var strategies = ["turningSecondarySpindleReturn", "turningSecondarySpindlePull", "turningSecondarySpindleGrab"];
if (strategies.indexOf(getParameter("operation-strategy")) != -1) {
s_Spindle = cycle.spindleSpeed;
}
//END---------------------------------------------------------------------------------------------------------------
_f = (currentSection.feedMode != FEED_PER_REVOLUTION && machineState.feedPerRevolution) ? f / s_Spindle : f;
if (activeMovements) {
var feedContext = activeMovements[movement];
if (feedContext != undefined) {
if (!feedFormat.areDifferent(feedContext.feed, _f)) {
if (feedContext.id == currentFeedId) {
return ""; // nothing has changed
}
forceFeed();
currentFeedId = feedContext.id;
return "F=R" + (firstFeedParameter + feedContext.id);
}
}
currentFeedId = undefined; // force Q feed next time
}
return feedOutput.format(_f); // use feed value
}
Also remove the below line of code from these cases case " secondary-spindle-grab" , case "secondary-spindle-return" and case "secondary-spindle-pull"
writeBlock(getCode("FEED_MODE_UNIT_REV")); // mm/rev ##REMOVE THIS LINE and Replace with the code below :
gFeedModeModal.reset();
writeBlock(getCode("FEED_MODE_UNIT_MIN"));
Note : Take care about the positioning of "G94". Adjust to it as per requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI @rushikesh_nagalkar , I have done as instructed.
I can confirm that this is now working, once again thank you very much, it goes without saying I will be testing very carefully on the machine.
Fusion