G84 without spindle feedback

More
10 years 1 month ago #80708 by terkaa
Replied by terkaa on topic G84 without spindle feedback
It is working. But I noticed that using Feed Speed and Max Velocity overrides affects feed while in G84 threading cycle. This should NOT be. There is a big risk of damaging something if feed is for some reason set to 50% or 200% percent before or while tap is in hole. Is it possible to go around this? Here is my quick hack:

CHKS((direction != CANON_CLOCKWISE),
NCE_SPINDLE_NOT_TURNING_CLOCKWISE_IN_G84);

cycle_feed(block, plane, x, y, bottom_z);
STOP_SPINDLE_TURNING();
START_SPINDLE_COUNTERCLOCKWISE();
DWELL(2);
cycle_feed(block, plane, x, y, clear_z);
STOP_SPINDLE_TURNING();
START_SPINDLE_CLOCKWISE();

#if 0
START_SPEED_FEED_SYNCH();
cycle_feed(block, plane, x, y, bottom_z);
STOP_SPINDLE_TURNING();
START_SPINDLE_COUNTERCLOCKWISE();
cycle_feed(block, plane, x, y, clear_z);
if (mode != CANON_SYNCHED)
STOP_SPEED_FEED_SYNCH();
STOP_SPINDLE_TURNING();
START_SPINDLE_CLOCKWISE();
#endif

It would be best to integrate Michaels work from git.mah.priv.at/gitweb?p=emc2-dev.git;a=...826d8ff000ff37a03fb3 but I still need to confirm it still works with current master since it was written 4 yrs ago.



Tero

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #80762 by terkaa
Replied by terkaa on topic G84 without spindle feedback
I will try to add that piece of code to current master within next few days. That would add both G74 & G84 threading cycles with optional P word for Dwell at bottom of thread. But I still would like to know how to make feeds during this cycle to ignore feed override switches?


Tero

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #80775 by terkaa
Replied by terkaa on topic G84 without spindle feedback
Hi,

I was able to get his code to build(after manual insertion of mods to few files). I have few questions:

Patch has a/src/emc/rs274ngc/interp_array.cc:

-/* 740 */ -1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 740 */ 1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

But currently this line has:

/* 740 */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

So it does not match original line above and I do not have a clue how to get this correct?

Also feature needs to be added so that when changing direction at bottom of thread motion wont wait for spindle_at_speed. Due to mods to taskintf.cc also this wont work:

int emcSpindleSpeed(double speed, double css_factor, double offset)
{

if (emcmotStatus.spindle.speed == 0)
return 0; //spindle stopped, not updating speed

return emcSpindleOn(speed, css_factor, offset, 1); <==
}

int emcSpindleOn(double speed, double css_factor, double offset, int wait_for_at_speed)
{

emcmotCommand.command = EMCMOT_SPINDLE_ON;
emcmotCommand.vel = speed;
emcmotCommand.ini_maxvel = css_factor;
emcmotCommand.acc = offset;
emcmotCommand.wait_for_spindle_at_speed = wait_for_at_speed;
return usrmotWriteEmcmotCommand(&emcmotCommand);
}

I got an error that emcSpindleSpeed passes too few arguments to function emcSpindleOn. I solved this by adding 1 to function call(so wait for at speed is on). But I do not believe it is correct way....

Below is same code from 2014:

int emcSpindleSpeed(double speed, double css_factor, double offset)
1373 {
1374
1375 if (emcmotStatus.spindle.speed == 0)
1376 return 0; //spindle stopped, not updating speed
1377
1378 emcmotCommand.command = EMCMOT_SPINDLE_ON;
1379
1380 if ((emcmotStatus.spindle.speed < 0) && (speed > 0)) {
1381 emcmotCommand.vel = speed * -1;
1382 emcmotCommand.ini_maxvel = css_factor * -1;
1383 emcmotCommand.acc = offset;
1384 return usrmotWriteEmcmotCommand(&emcmotCommand);
1385 } else if ((emcmotStatus.spindle.speed > 0) && (speed > 0)) {
1386 emcmotCommand.vel = speed;
1387 emcmotCommand.ini_maxvel = css_factor;
1388 emcmotCommand.acc = offset;
1389 return usrmotWriteEmcmotCommand(&emcmotCommand);
1390 }
1391
1392 return -1; //can't have negative speeds
1393 }

Also how can I get diff of modified files?



Tero
Last edit: 10 years 1 month ago by terkaa.

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #80778 by terkaa
Replied by terkaa on topic G84 without spindle feedback
I believe I was able to solve array correct for enabling G74 would be: /*740*/ 1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 1,-1,-1,-1,-1,-1,-1,-1,-1,-1, right? Now I still have to solve emcSpindleSpeed function call and how to get diff against current master so I can easily install this patch again. Also would be nice to know how to make these cycles to ignore feed override.

Tero
Last edit: 10 years 1 month ago by terkaa.

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #80782 by andypugh
I think you need to discuss this on the developers list.

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #80784 by clkeck1
There is a feature request open for this since 8/16/12. It would be nice to have it in the standard release by now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.162 seconds
Powered by Kunena Forum