G84 without spindle feedback

More
19 Sep 2016 07:59 #80594 by terkaa
Hi,
Is it possible to use G84 without spindle feedback ? Floating holder is used. Now when
"M03 S100
G84 X100. Y100. F300 R3 Z-40
"

is issued machine moves to R3 but that is it Z-40 is not done.


Tero

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

More
19 Sep 2016 21:09 #80635 by andypugh
It looks like the majority of the useful code is #if-0-ed out:
github.com/LinuxCNC/linuxcnc/blob/master...nterp_cycles.cc#L236
That isn't going to work without recompiling, and then there would be no guarantees that it would do the right thing.

Might be interesting to try it. Perhaps the chap who wrote it just don't have a tapping head?

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

More
20 Sep 2016 04:20 #80654 by terkaa
Replied by terkaa on topic G84 without spindle feedback
I will try it. Is it possible to add this feature to Master?

Tero

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

More
20 Sep 2016 11:49 - 20 Sep 2016 12:14 #80664 by terkaa
Replied by terkaa on topic G84 without spindle feedback
I did try releasing G84 of comments but I got this:

File Attachment:


It seems thread pitch is not brought into funtion convert_cycle_g84 at all. It is defined with F300 in G84 function. And it should produce 3mm/rev for START_FEED_SPEED_SYNCH. Or should I comment that line out? We have 100 Rpm and feed of 300mm/min that should be enough for floating tapping.

Tero
Last edit: 20 Sep 2016 12:14 by terkaa.

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

More
20 Sep 2016 12:42 #80668 by terkaa
Replied by terkaa on topic G84 without spindle feedback
I tried:

START_FEED_SPEED_SYNCH(3, 0);

And now machine moves to position and remains at R-level no alarm but no Z-40 movement either. How to go forward?


Tero

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

More
20 Sep 2016 15:50 - 20 Sep 2016 16:24 #80676 by terkaa
Replied by terkaa on topic G84 without spindle feedback
This should be in form:
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();
cycle_feed(block, plane, x, y, clear_z);
STOP_SPINDLE_TURNING();
START_SPINDLE_CLOCKWISE();

I will try to get it working tomorrow. It seems someone has worked on this years ago but it is not yet merged in master:

git.mah.priv.at/gitweb?p=emc2-dev.git;a=...826d8ff000ff37a03fb3

Tero
Last edit: 20 Sep 2016 16:24 by terkaa.

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

More
21 Sep 2016 05:23 #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
22 Sep 2016 05:20 #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
22 Sep 2016 15:54 - 22 Sep 2016 16:03 #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: 22 Sep 2016 16:03 by terkaa.

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

More
22 Sep 2016 16:26 - 22 Sep 2016 16:40 #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: 22 Sep 2016 16:40 by terkaa.

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

Time to create page: 0.171 seconds
Powered by Kunena Forum