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

Using PrusaSlicers M73 progress to run macro ?

Scheduled Pinned Locked Moved
General Discussion
duet ethernet duet wifi duet web control duet firmware gpio
5
5
1.0k
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.
  • undefined
    Marius Breuer
    last edited by 1 Mar 2020, 00:24

    I was wondering if it's possible to use the M73 code generated by PrusaSlicer to run a macro based on the print progress. I'm asking because i had the idea to add neopixels to my printer and light them in red/green according to print progress (ie 60% done means the left side 60% of the led strip are lit green/white/..., the 40% on the right side are out/red/...).

    All of the led stuff is done on a seperate board, I only need the duet to tell me the print progress (ie as duty cycle of a PWM output, I2C, or anything alike). PrusaSlicer can include the print progress in the gcode, so i wouldn't have to rely on DWC. However that would suffice too, because the led-based visual indicator isn't accurate to the minute.

    The M73 code is looking like this:

    M73 P17 R22

    The P-value is the print progress in %, R-value is the remaining print time in Minutes

    Thanks in advance!

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by 1 Mar 2020, 00:30

      Are you targeting the new RRF3 or the old RRF2?

      1 Reply Last reply Reply Quote 0
      • undefined
        Danal
        last edited by Danal 3 Jan 2020, 02:12 1 Mar 2020, 02:08

        You could use a post-processor to change the M73 to an M42 and therefore signal on a pin with PWM for your separate board. Prusa slicer will call the post processor automatically, if you wish.

        https://manual.slic3r.org/advanced/post-processing

        There are many things you could do. One of the easiest would be to use the percentage as a 0 to 1 value:

        M73 P17 R22 might become M42 Px F0.17

        This would slowly increase the PWM from 0 to 100% as the print progressed. You could light up more and more of the neopixels. There are many other things you could do...

        Delta / Kossel printer fanatic

        1 Reply Last reply Reply Quote 1
        • undefined
          dc42 administrators
          last edited by 1 Mar 2020, 09:50

          You can put a macro file M73.g in /sys on the SD card and it will be run whenever M73 occurs in the GCode stream. Currently you can't access the parameters, but that facility will be provided in RRF 3.02.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          undefined 1 Reply Last reply 2 Apr 2020, 00:20 Reply Quote 1
          • undefined
            arhi @dc42
            last edited by 2 Apr 2020, 00:20

            @dc42 any way we can actually inform the firmware or DWC about the estimated finish time? something like, read data from M73 and send it to firmware? (if firmware is not supporting M73 on it's own)

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