`move.rotation` not updated in Object Model browser
-
@chrishamm this may be more of a RRF question but I thought I'd ask first as I don't fully understand the ins and outs of the object model / DWC interaction.
I noticed that when applying rotation compensation with, for example
G68 X10 Y10 R4
, the object model valuemove.rotation
updates to show theangle
andcentre
values, and these changes show up automatically when viewing the object model via the DWC plugin.However - cancelling the rotation using
G69
is successful (as proved by machine moves), but the object model values do not change at all in the object model plugin (or when displayed in my own DWC plugin) - but they are up to date if queried usingM409 K"move.rotation"
.I was under the impression that clicking "Refresh" in the Object Model plugin would cause all values to be refreshed but this is not the case.
Could this be because the rotation values are not considered "live"? Any other ideas as to why this might be happening?
-
@NineMile Thanks for reporting this, it looks like
G69
does not notify DSF/DWC about a change in themove
key. We're going to fix this in the next versions. -
@chrishamm Ah! - I just had a lightbulb moment based on your reply that the
reprap.MoveUpdated()
call inHandleG68
is saying that the Object Model has been updated. For some reason I thought it was unrelated - at least now I know the fix is simple -
@chrishamm Just saw your fix for this (and the changes for my
M291 J2
PR, thanks )Just thinking about this, it might also make sense to add
g68Centre[0] = g68Centre[1] = 0.0;
as well where the angle is reset inG69
- it is not possible to specifyG68
withoutX
andY
axis co-ordinates so keeping the centre defined and visible in the object model doesn't make much sense. -
@NineMile thanks for your suggestion. I have implemented it.
-
PS - I have been wondering whether each workplace should have its own rotation angle and origin values, however I can't find any indication that any CNC machines support this.
-
@dc42 said in `move.rotation` not updated in Object Model browser:
PS - I have been wondering whether each workplace should have its own rotation angle and origin values, however I can't find any indication that any CNC machines support this.
My usage of rotation compensation has been to probe a work piece, set the workplace origin, calculate the center position and then rotate it around the centre to align the workpiece with the axes. This is to account for the stock not being held perfectly in alignment with the machine. Different workplaces can refer to different work pieces being machined at the same time or different orientations of the same workpiece that are machined in sequence.
In both of these cases, the rotation value is specific to the workplace so personally I do think activating it on a per workplace basis makes sense.
Right now I track the probed rotation value in a global indexed by workplace and there's a gcode called by the postprocessor after switching workplace that activates the rotation from the stored value.