New pin motion.base-feedrate in master branch

More
24 Mar 2020 23:15 #161376 by phillc54
Replied by phillc54 on topic New pin motion.base-feedrate in master branch
As I said, I need to think a lot more about it. It works OK as is so there is no need to rush.

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

More
25 Mar 2020 08:14 #161400 by fixer
Cmorley, thank you!
This is great addition, even for milling and turning. It should be possible to show real feed value on user interface now.
It does, however only work with G94. With G93 and G95 it reports 0.0.

rtapi_print( "SET_Fcode status: %f\n", emcmotCommand->fcode) executes only when G94 is called. Do you think you could fix for G95 to show correctly?

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

More
25 Mar 2020 08:16 #161401 by cmorley
Replied by cmorley on topic New pin motion.base-feedrate in master branch
I'll look into it.
Thanks for testing

Chris

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

More
25 Mar 2020 08:25 - 25 Mar 2020 08:25 #161403 by fixer
Already found it, here in emccanon.cc:
void SET_FEED_RATE(double rate)
{

    if(feed_mode) {
	START_SPEED_FEED_SYNCH(rate, 1);
	currentLinearFeedRate = rate;
    send_code_status_msg(rate);  //G95
    } else {
	/* convert from /min to /sec */
	rate /= 60.0;


	/* convert to traj units (mm & deg) if needed */
	double newLinearFeedRate = FROM_PROG_LEN(rate),
	       newAngularFeedRate = FROM_PROG_ANG(rate);

	if(newLinearFeedRate != currentLinearFeedRate
		|| newAngularFeedRate != currentAngularFeedRate)
	    flush_segments();

	currentLinearFeedRate = newLinearFeedRate;
	currentAngularFeedRate = newAngularFeedRate;
	send_code_status_msg(rate*60.0);  //G94
    }
}
Last edit: 25 Mar 2020 08:25 by fixer.

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

More
25 Mar 2020 08:27 #161404 by cmorley
Replied by cmorley on topic New pin motion.base-feedrate in master branch
Thanks I'll fix that right away :)

Chris

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

More
25 Mar 2020 08:51 #161405 by cmorley
Replied by cmorley on topic New pin motion.base-feedrate in master branch
I ended up with:
void SET_FEED_RATE(double rate)
{
	// send a code status NML message with the F word setting
	send_code_status_msg(rate);

    if(canon.feed_mode) {
	START_SPEED_FEED_SYNCH(canon.spindle_num, rate, 1);
	canon.linearFeedRate = rate;
    } else {
	/* convert from /min to /sec */
	rate /= 60.0;


	/* convert to traj units (mm & deg) if needed */
	double newLinearFeedRate = FROM_PROG_LEN(rate),
	       newAngularFeedRate = FROM_PROG_ANG(rate);

	if(newLinearFeedRate != canon.linearFeedRate
		|| newAngularFeedRate != canon.angularFeedRate)
	    flush_segments();

	canon.linearFeedRate = newLinearFeedRate;
	canon.angularFeedRate = newAngularFeedRate;
    }
}

Which seemed to work the same.
Pushed to the testing branch.

Thanks for the fast code review!

Chris

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

More
25 Mar 2020 10:34 #161413 by fixer
Great, thank you! I applied changes to 2.7 and it also works there.

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

More
25 Mar 2020 16:25 #161470 by fixer
Chris,

Could you add feed per revolution value to this pin when in spindle synchronized motion (G33, G76)?

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

More
26 Mar 2020 07:59 - 26 Mar 2020 07:59 #161543 by cmorley
Replied by cmorley on topic New pin motion.base-feedrate in master branch
Pushed an enhancement for this - please let me know if it's working for you

Chris
Last edit: 26 Mar 2020 07:59 by cmorley.

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

More
26 Mar 2020 15:16 #161573 by fixer
Works for me, exactly what I had in mind!
Thank you!

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

Moderators: snowgoer540
Time to create page: 0.080 seconds
Powered by Kunena Forum