- Posts: 6
- Thank you received: 0
Current Feed F-code in Active G Codes
In both, entering an F feed speed in MDI does result in the F speed being displayed correctly.
I see that Axis gets this value from stat.settings[1]. I am working on a custom GUI, and I need to keep track of the current F. Is there a reason that stat.settings[1] is not updated while running in version 2.8.0? Thanks.
Please Log in to join the conversation.
n81641 wrote: In version 2.7.0~pre0 The F would reflect the current feed in the g-code as the program was running. .
I just checked in 2.7.11 and it doesn't appear to update there if the program is ended with an M2, but shows the last value is the program starts and ends with %. This is because it is showing the feedrate in "interpreter" space and the interpreter has already parsed the G-code and queued the moves.
I think that there might be a fundamental problem that the motion controller has no concept of the current feedrate, that is part of the interpreter state while the program is being parsed, and each queued command has an embedded speed element that is derived from the F-command active at the time that is was queued, but is in different units. (especially in feed-per-rev mode or inverse-time)
github.com/LinuxCNC/linuxcnc/blob/c1affd...motion/motion.c#L361
Is the HAL pin motion.current-vel any help?
(I don't see why a GUI needs to know the F-command that was active at the point that the currently executing move was queued)
Please Log in to join the conversation.
You brought up a key issue for my purposes, though. The F reported, even without the M2, is not the current running motion line, but the last F read by the interpreter, probably the last one in the program. All the Current Codes are probably this way too.
What I'm trying to do is record the state and Abort a running program, go to MDI mode, update the state with the current feed and codes, then feed subsequent lines in as MDI commands.
Why I'm doing this: the machinists don't like Step, it isn't acting like Single Block on non-motion lines.
That's OK, I will have to pre-parse the file and determine the active codes, feed, etc. I had a feeling this was going to be necessary.
Again, Thanks for your help.
--Karl
Please Log in to join the conversation.
- skunkworks
- Offline
- Platinum Member
-
- Posts: 351
- Thank you received: 0
github.com/LinuxCNC/linuxcnc/tree/feature/state-tags-master
If we could have some people test this - maybe we could get it into master.
Please Log in to join the conversation.
Please Log in to join the conversation.
skunkworks wrote: There is a state tags branch that supposedly helps this.
github.com/LinuxCNC/linuxcnc/tree/feature/state-tags-master
If we could have some people test this - maybe we could get it into master.
I too would be very interested in state tags in master.
I keep hearing about needing testers yet never have heard what in particular needs tested.
Are we shaking out a few bugs or seeing if it works at all?
Chris M
Please Log in to join the conversation.
github.com/machinekit/machinekit/blob/ma...c/motion/state_tag.h
Although anything called "massive overhaul" seems scary:
github.com/LinuxCNC/linuxcnc/commit/1dda...9e6bfef7bad8ae368532
But if it's been running on Tormach machines for a few years now, then maybe it's OK?
Please Log in to join the conversation.
n81641 wrote: github.com/LinuxCNC/linuxcnc/commit/1dda...9e6bfef7bad8ae368532
But if it's been running on Tormach machines for a few years now, then maybe it's OK?
What makes you think it has been running on Tormach? I think that they are still on 2.6.
Please Log in to join the conversation.
I looked for state_tag.h, and it is in there. Written by Robert W. Ellenberg, (c) 2015.
/********************************************************************
* Description: state_tag.h
*
* A "tag" struct that is used to add interpreter state information to
* a given motion line. This state info isn't actually used by motion
* directly, but indicates the motion state.
*
* Author: Robert W. Ellenberg
* License: GPL Version 2
* System: Linux
*
* Copyright (c) 2015 All rights reserved
********************************************************************/
Please Log in to join the conversation.
