Gcode Meta commands  where to find allowed expressions ?

sylvain
sylvain 8 Aug 2020, 15:30Hi everybody
I'm trying to play with conditionnal gcode. I looked at this page :
https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands
Where I found for example :
if !move.axes[0].homed  !move.axes[1].homed  !move.axes[2].homed G28
Where can I found allowed expressions ? By expression I mean in this case "move.axes[x].homed" ?
Is there a dozuki page about this ?
What I want to do today is :
if "Y axis position < 45" DO SOMETHING
Thanks !


I found this :
https://duet3d.dozuki.com/Wiki/Object_Model_of_RepRapFirmware
but it seems that position state is not implemented
Thanks

@sylvain said in Gcode Meta commands  where to find allowed expressions ?:
but it seems that position state is not implemented
its just not documented i believe. look at he M409 command to examine your current object model and maybe search the forum for examples?
move.axes[1].userPosition
should be your y position iirc

@bearer said in Gcode Meta commands  where to find allowed expressions ?:
move.axes[1].userPosition
Thanks for your help !

@bearer said in Gcode Meta commands  where to find allowed expressions ?:
@sylvain said in Gcode Meta commands  where to find allowed expressions ?:
but it seems that position state is not implemented
its just not documented i believe. look at he M409 command to examine your current object model and maybe search the forum for examples?
move.axes[1].userPosition
should be your y position iircBear in mind that userPosition is position commanded by GCode and is subject to modification by tool offsets, workplace coordinates. M579 coordinate scaling etc. Depending on what you want to do, it may be more appropriate to use move.axes[1].machinePosition.