Object model help please
-
@appjaws said in Object model help please:
@OwenD said in Object model help please:
G92 U{move.axis[0].machinePosition}
Thank you for your help but that didn't work, U remained at 0
What were you expecting it to be?
If you move X to the position and type move.axes[0].machinePosition into the console what do you get?
Are you sure all moves are finished before that command? M400 may be required prior. -
@OwenD said in Object model help please:
move.axes[0].machinePosition
I would have expected the U move position to be updated with the X position but your suggestion of G92 U{move.axis[0].machinePosition} didn't update U which remained ar 0.
This is what I get from the console
move.axes[0].machinePosition
Error: Bad command: move.axes[0].machinePosition
Error: Bad command: move.axes[0].machinePosition -
@appjaws
Apologies
Should be
echo move.axes[0].machinePositiion
It should return where X is at the time. If that's 0 then I'd expect G92 U... to set it thus -
@OwenD said in Object model help please:
echo move.axes[0].machinePositiion
echo move.axes[0].machinePositiion
Error: meta command: unknown value 'machinePositiion' -
@appjaws
can't win. Try without the extra "i" in position
One finger typing on a phone here.. gimme a break -
@appjaws theres too many i's in Position
-
@OwenD Thanks again.
Yes that worked but then why isn't G92 U{move.axis[0].machinePosition} working?just realised that axes is spelt axes not with an i
So G92 U{move.axes[0].machinePosition} works.
Will do some testing, thanks -
@appjaws if you are running at least DWC 3.2 then navigate to
Settings->general->plugins and turn on "Object Model Browser"
then you can explore the object model as it is on your board. (use refresh to update to see things change). use echo <object model key, value> as you have done with the move.axes[0].machinePosition to check you have a specific path correct. then you can use that in commands of meta commands as you need.
-
@appjaws said in Object model help please:
just realised that axes is spelt axes not with an i
You likely know this but I will mention it just to be sure. Axis is singular, Axes is plural.
Frederick
-
@appjaws said in Object model help please:
@deckingman Ha Ha. I don't have a stop.g or cancel.g so I assume the machine just uses whatever is the default.
What have you in your stop and cancel and where are they located?
Thanks for the helpHi Paul,
Looks like your getting the help you need with object model commands.
Ref pause.g, cancel.g etc. These macros all go in the sys folder (along with the homing macros, tool change macros etc). They might or might not be "auto generated" so they might or might not exist. They might also exist but be empty of any commands.
"pause.g" runs if you hit the pause button during a print in DWC (or otherwise send pause command). What you do inside that macro is entirely up to you. Similarly, cancel.g runs if you hit cancel (after already having paused the print).
Here is an example of my cancel.g
G10 ; retract M98 P"0:/macros/ToolTemps/ToolTemps0.g" ; set the tool temperatures to zero G91 ; set relative G1 Z5 F240 ; move bed down 5mm G90 ; back to absolute G1 X165 U165 A165 Y300 V300 B300 F9000 ; move to rear M140 S0 ; turn off bed M106 S0 ; turn off part fan
Note the additional UV commands that I had to add (and also AB commands in my case).
So check those files, and if they contain any XY moves, then make sure to add UV moves to those lines. It's not much work and will save you having nasty experiences like I had when I stupidly forgot about them.
-
@appjaws
Apologies again.
Yes, should be axes, not axis.
Not sure if that was me or autocorrect
As stated above, always check the exact syntax using the object model browser.
e.g. "machinePosition" would work, but "machineposition" would not. -
Thank you for all the help, everything is now working correctly and my printer has a lot less vibration.