Is there a Halpin for the current feedrate

More
01 Jun 2020 07:11 #169623 by Aciera
I'm using master branch and I'm trying to calculate cutting parameters in HAL for a glade display.
For this calculation I need the current feed rate but can't find it in the HAL pins. I found motion.current-vel but that is not ideal because its only useful when there is actual movement and does not allow for a distinction between rapid moves and moves where the feed rate applies.

Is there really no access to the feed value in HAL?

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

More
01 Jun 2020 07:53 #169624 by rodw
Thats right, the feed rate is thrown away once the gcode is tokenised. current-vel is for that segment only and may or may not be the feedrate.
Cmorely has recently published an experimental branch that publishes it on a pin. I have tried it. I thought it found its way into master. I'll try and look for it tomorrow when I am at my machine as I just compiled master today.

The other pin I would really like to see is the radius of arcs.

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

More
01 Jun 2020 07:57 #169625 by rodw
look for motion.fcode is it there?

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

More
01 Jun 2020 08:00 #169626 by rodw
oops, doe snot seem to be there. This is the fcode branch

github.com/LinuxCNC/linuxcnc/tree/feedcode_message
The following user(s) said Thank You: Aciera

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

More
01 Jun 2020 08:33 - 01 Jun 2020 08:34 #169633 by Aciera
Ah, I just realized I'm actually on the switchkins-branch and this puts me out on a limb so to speak.
I guess I'll have to manage with the current-vel.

Thanks
Last edit: 01 Jun 2020 08:34 by Aciera.

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

More
01 Jun 2020 12:38 #169661 by cmorley
My feedrate work was not accepted into 2.8 and statetags was merged into master so I have lost track if the work is useful/compatible.

Chris
The following user(s) said Thank You: Aciera

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

More
01 Jun 2020 18:51 #169697 by rodw

My feedrate work was not accepted into 2.8 and statetags was merged into master so I have lost track if the work is useful/compatible.

Chris


At least you motivated the release of state tags!

NOW we just need some documentation on how to acess the state tags data (which includes the feedrate) by resolving the known issues where the docs refer to state tags stating it will fix it.....
linuxcnc.org/docs/devel/html/gui/GStat.html#_known_issues

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

More
02 Jun 2020 05:14 #169770 by Aciera
So I could use statetags with a python script but the feedrate might not be the current feedrate because the interpreter looks at the code ahead?

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

More
02 Jun 2020 05:37 #169772 by rodw

So I could use statetags with a python script but the feedrate might not be the current feedrate because the interpreter looks at the code ahead?


It will be the real feedrate for the currently executing segment! so it will be accurate for right now! The read ahead has no effect as this is at a a deeper level.

When you work it out, please share how you did it.

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

More
02 Jun 2020 16:05 - 02 Jun 2020 16:09 #169816 by Aciera
Ok, I've played around with gstat a bit:

So I changed the example script in the doc to create a HAL pin called feedrate.current:
Warning: Spoiler!


I then called this script from my postguihal as given in the doc and the pin got created:



And the value also changes as expected.

So this was successful.

However, I noticed that it also gives the feedrate of G0 moves which is what I don't want. This is what I already have by using "current-vel".

I'm actually looking for the "F" value, preferably the one as used in "Feed Override":



This does not change with G0 moves and also does not go to zero when the movement stops.
Attachments:
Last edit: 02 Jun 2020 16:09 by Aciera.

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

Time to create page: 0.202 seconds
Powered by Kunena Forum