You are not logged in.
I have a custom G-code to set work coord.
Works fine if I just program a G70 ( sets all axis' work coord positions)
If I want to pass arguments to macro, it doesn't work. G70X0R55, or anything like it does not work. Not only does it not pass the argument, it wont even process the macro.
I would add a image snippit of my G-code processing window, but attachment option doesn't seem to work on the forum?
G70(set work coord)
**
variable:4012 <---dont know what this does?
variable:4212 <---dont know?
varsUpdateMacroVars
Call SubName
Offline
For each parameter you wish to pass, you must go to the register and add a condition for the G70 code.
In simple terms for the X register, check for G70 and if it is a G70 line, then define what you want to do with the X value.
Same with the R.
To code the G70X0R55, The G "70" code would need to be defined as well as the X and R registers.
This is an example of what to do with the "P" on a G10 line. This shows just 3 of the many options for the "P" register, depending on if L11 or 13, L21 or some other setting was used along with G10.
Sorry picture upload wont work so this is the code, not the pretty interface.
<ConditionMacro>
<CondWord Logical="and" Name="G" Range="10"/>
<CondWord Logical="and" Name="L" Range="11 13"/>
<Macro Name="TableIndex" Scan="no" AfterMotion="no">
<Override Type="expression" Value="$ +1000"/>
</Macro>
</ConditionMacro>
<ConditionMacro>
<CondWord Logical="and" Name="G" Range="10"/>
<CondWord Logical="and" Name="L" Range="21"/>
<Macro Name="WorkCoordIndex" Scan="no" AfterMotion="no">
<Override Type="expression" Value="$ +60"/>
</Macro>
</ConditionMacro>
<ConditionMacro>
<CondWord Logical="and" Name="G" Range="10"/>
<Macro Name="WorkCoordIndex" Scan="no" AfterMotion="no">
</Macro>
<Macro Name="TableIndex" Scan="no" AfterMotion="no">
</Macro>
</ConditionMacro>
Order is important, If I had put the "L" checks after the G10 only check in the register, they would not have been found since the "first match" wins when processing for a register.
Offline
Thanks vhubbard for your responce.
Offline