Meta Commands problem



  • I have an Automatic tool brush that needs the Z position to be greater than 75mm to clear the Brush motion.
    but once the print height is greater than 75mm tall, than it can simply deploy the arm without any Z movement.

    here is what I'm trying to create.
    If the Z position is <=75 than,
    G90
    G1 Z75 F1000 ;move z bed for clearance
    G1 B65 F4000 ; deploy tool brush

    Else,
    G1 B65 F4000 ;deply tool brush

    I've looked at the wiki but so far my attempts to make this work have been unsuccessful.
    can someone point me in the right direction?


  • administrators

    I've not tested this, but try:

    if move.axes[2].userPosition <= 75
      G90
      G1 Z75 F1000 ;move z bed for clearance
      G1 B65 F4000 ; deploy tool brush
    else
      G1 B65 F4000 ;deply tool brush
    


  • Thank you dc42,

    That worked perfectly!
    I understand the composition of the code now with your example.


Log in to reply