Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Running Triggers in Macros and GCodes

    Scheduled Pinned Locked Moved
    General Discussion
    1
    1
    477
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PayTorundefined
      PayTor
      last edited by

      I have the following code in a macro called "Start" which runs perfectly fine when I run it on its own. Basically, I just want the printer to pause at a certain location and wait for an external signal to resume.

      G1 Y96 X68 F3000
      G1 Z5 F500
      M581 E5 S1 T2 ;Start the trigger (trigger2 file)
      M25 ;Pause and wait for a switch to be pressed to resume
      M581 E5 S-1 T2 ;Turn off the trigger

      I want to run this macro from a GCode file using this command: "M98 P/Macros/Start". The issue is that all other commands in the Start macro run just fine except for the trigger portion. The trigger doesn't work this way. I have to put the trigger commands inside the GCode file to run them.

      This is important for me because I have different machines and the setting is slightly different for each one. I want to have the same line (M98 P/Macros/Start) in all the gcodes and don't deal with creating a new GCode file for each machine.

      Is there a way around this?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Unless otherwise noted, all forum content is licensed under CC-BY-SA