Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. burtonenator
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 12
    • Best 4
    • Controversial 0
    • Groups 0

    burtonenator

    @burtonenator

    4
    Reputation
    7
    Profile views
    12
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    burtonenator Unfollow Follow

    Best posts made by burtonenator

    • RE: Unable to make first print, Error: M32:

      @fcwilt very simple beginning code on the gcode, but even if I have a completely empty gcode file and tell it to run, it gives the same "file is already being printed" error. I don't believe any of it being run at all.

      G90
      M82
      M106 S0
      M140 S60
      M190 S60
      M104 S190 T0
      M109 S190 T0
      G28 ; home all axes
      G32
      ; process Process1
      ; layer 1, Z = 0.200
      T0
      G92 E0.0000
      G1 E-1.0000 F1800

      posted in Using Duet Controllers
      burtonenatorundefined
      burtonenator
    • RE: External Pause/Resume Button

      @nightowl999

      I have the initial M42 in the config.g because it does actually start with that on, so this sets it off, and then after that its in the pause and resume to set it correctly when pressed.

      Yea, the out on the io's is 3.3v, I needed a transistor to bring it up to 5v for my LED, which in that one I showed above lists as 12v but looks great at 5v

      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • RE: External Pause/Resume Button

      So far this has worked well for me, the only issue is I do have to push the button until the command is recognized, so if the printer is doing a long line, it won't catch unless I have the button down at the end of the line before the next command goes in. This is probably expected and its not that big an issue in practice.

      @nightowl999

      This is all the magic from the config.g side, its the "T2" that sets it to run the second trigger file (trigger2.g) when the button is pushed.

      ;Pause Button
      M950 J9 C"io8.in" 
      M581 P9 T2 S1
      ;if !exists global.PausePress ; if it's not created we do so now
      global PausePress = false
      

      trigger2.g, its the M24 and M25 that actually call the pause and resume files :

      ;echo "called at " ^ state.time
      G4 P1 ; delay 10ms to debounce
      if sensors.gpIn[9].value=1
      	;echo "debounce"
      	M99 ; break out if sensor value is zero again (bouncing)
      
      if job.file.fileName !=null ; if there's a job filename then it's reasonably safe to say we are printing
      	if global.PausePress == false ; the button hasn't been pressed so we'll pause
      		;echo "Pause"
      		M25
      	else
      		;echo "resume"	
      		M24
      	
      	
      

      turning the light on and off was the easy part, just turn the pin for that on or off:

      M42 P8 S0 ;LED off
      set global.PausePress = !global.PausePress ; toggle the value from whatever it was before use "not"
      

      and its magic in config.g:

      ;output for pause LED
      M950 P8 C"io8.out"
      M42 P8 S0 ; off by default 
      
      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • RE: External Pause/Resume Button

      @owend
      This seems to work, although I don't understand why it does and what I had before doesn't:

      ;echo "called at " ^ state.time
      G4 P1 ; delay 1ms to debounce
      if sensors.gpIn[9].value=1
      	;echo "debounce"
      	M99 ; break out if sensor value is zero again (bouncing)
      
      if job.file.fileName !=null ; if there's a job filename then it's reasonably safe to say we are printing
      	if global.PausePress == false ; the button hasn't been pressed so we'll pause
      		;echo "Pause"
      		M25
      	else
      		;echo "resume"	
      		M24
      	
      	set global.PausePress = !global.PausePress ; toggle the value from whatever it was before use "not"
      

      Even with the delay debounce 1ms it now works as expected, So Thank you!

      As for the 2 buttons debate, these buttons are way to cool, and lend themselves to the "One button Pause/Resume" idea:

      Lit Indicator Buttons

      I light and dim the LED in the pause and resume macros so the button is a correct indicator. You can even put a label behind the plastic to mark what its for. The LED is a bit dim on the 3.3v from the output, but I think I can deal with that now that I have this working

      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator

    Latest posts made by burtonenator

    • RE: External Pause/Resume Button

      @nightowl999

      I have the initial M42 in the config.g because it does actually start with that on, so this sets it off, and then after that its in the pause and resume to set it correctly when pressed.

      Yea, the out on the io's is 3.3v, I needed a transistor to bring it up to 5v for my LED, which in that one I showed above lists as 12v but looks great at 5v

      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • RE: External Pause/Resume Button

      So far this has worked well for me, the only issue is I do have to push the button until the command is recognized, so if the printer is doing a long line, it won't catch unless I have the button down at the end of the line before the next command goes in. This is probably expected and its not that big an issue in practice.

      @nightowl999

      This is all the magic from the config.g side, its the "T2" that sets it to run the second trigger file (trigger2.g) when the button is pushed.

      ;Pause Button
      M950 J9 C"io8.in" 
      M581 P9 T2 S1
      ;if !exists global.PausePress ; if it's not created we do so now
      global PausePress = false
      

      trigger2.g, its the M24 and M25 that actually call the pause and resume files :

      ;echo "called at " ^ state.time
      G4 P1 ; delay 10ms to debounce
      if sensors.gpIn[9].value=1
      	;echo "debounce"
      	M99 ; break out if sensor value is zero again (bouncing)
      
      if job.file.fileName !=null ; if there's a job filename then it's reasonably safe to say we are printing
      	if global.PausePress == false ; the button hasn't been pressed so we'll pause
      		;echo "Pause"
      		M25
      	else
      		;echo "resume"	
      		M24
      	
      	
      

      turning the light on and off was the easy part, just turn the pin for that on or off:

      M42 P8 S0 ;LED off
      set global.PausePress = !global.PausePress ; toggle the value from whatever it was before use "not"
      

      and its magic in config.g:

      ;output for pause LED
      M950 P8 C"io8.out"
      M42 P8 S0 ; off by default 
      
      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • RE: External Pause/Resume Button

      @owend
      This seems to work, although I don't understand why it does and what I had before doesn't:

      ;echo "called at " ^ state.time
      G4 P1 ; delay 1ms to debounce
      if sensors.gpIn[9].value=1
      	;echo "debounce"
      	M99 ; break out if sensor value is zero again (bouncing)
      
      if job.file.fileName !=null ; if there's a job filename then it's reasonably safe to say we are printing
      	if global.PausePress == false ; the button hasn't been pressed so we'll pause
      		;echo "Pause"
      		M25
      	else
      		;echo "resume"	
      		M24
      	
      	set global.PausePress = !global.PausePress ; toggle the value from whatever it was before use "not"
      

      Even with the delay debounce 1ms it now works as expected, So Thank you!

      As for the 2 buttons debate, these buttons are way to cool, and lend themselves to the "One button Pause/Resume" idea:

      Lit Indicator Buttons

      I light and dim the LED in the pause and resume macros so the button is a correct indicator. You can even put a label behind the plastic to mark what its for. The LED is a bit dim on the 3.3v from the output, but I think I can deal with that now that I have this working

      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • RE: External Pause/Resume Button

      @owend
      So I gave this a try, but it now triggers the pause, and then immediately the resume.

      I don't see your "Button wasn't pressed long enough" error, even if I push very quickly, and it always does the pause resume, even when I did a longer dwell.

      G4 S5				 ; put a delay in as your first line,  The button must be held longer than this.
      if sensors.gpIn[9].value != 1 ; the button isn't still pressed so we'll abort the macro
      	echo "Button wasn't pressed long enough" ; remove this line when done testing
      	M99 ; cancel macro
      
      if job.file.fileName !=null ; if there's a job filename then it's reasonably safe to say we are printing
      	if global.PausePress == false ; the button hasn't been pressed so we'll pause
      		echo "Pause"
      		M25
      	else
      		echo "resume"	
      		M24
      	
      	set global.PausePress = !global.PausePress ; toggle the value from whatever it was before use "not"
      

      important parts of config.g:

      ;Pause Button
      M950 J9 C"io8.in" 
      M581 P9 T2 S1
      global PausePress = false
      

      and the console:

      5/7/2022, 6:01:39 PM	Printing resumed
      5/7/2022, 6:01:35 PM	resume
      5/7/2022, 6:01:29 PM	Printing paused at X207.1 Y192.9 Z6.6
      5/7/2022, 6:01:24 PM	Resume state saved
      5/7/2022, 6:01:24 PM	Pause
      
      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • External Pause/Resume Button

      I'm trying to setup an external physical button that will pause and resume a job. I currently can pause from the button as expected, but I cannot resume.

      I've setup a trigger and a file so that I can add logic, but my basic attempt seems to have failed, is there anyway to get the printing state from a macro, I've seen that it'll always show busy, but that didn't seem to match either.

      My current trigger:

      if 	state.status == "Paused" 
      	M24
      if 	state.status == "Printing" 
      	M25
      

      I pause by just replacing that with M25

      posted in Gcode meta commands
      burtonenatorundefined
      burtonenator
    • RE: Unable to make first print, Error: M32:

      @geon-han_kang I had to upgrade the duet3 to 3.4, there is a script that can help you downgrade the DSF, but I didn't use it, I wanted something from 3.4 anyways.

      https://github.com/DanalEstes/DuetVersions

      posted in Using Duet Controllers
      burtonenatorundefined
      burtonenator
    • RE: Unable to make first print, Error: M32:

      @resam

      Yes!, that seems to be it I got the board to upgrade to 3.4 and now its accepting a file, thank you.

      posted in Using Duet Controllers
      burtonenatorundefined
      burtonenator
    • RE: Unable to make first print, Error: M32:

      @resam
      I did the update on the pi, is there more I should do, everything seems to imply all I have to do is:

      sudo apt update
      sudo apt upgrade

      posted in Using Duet Controllers
      burtonenatorundefined
      burtonenator
    • RE: Unable to make first print, Error: M32:

      @fcwilt

      Board: Duet 3 MB6HC (MB6HC)
      DSF Version: 3.4.0
      Firmware: RepRapFirmware for Duet 3 MB6HC 3.3 (2021-06-15)

      I can now confirm it will print if I upload the Gcode as a Macro, just not as a "job"

      posted in Using Duet Controllers
      burtonenatorundefined
      burtonenator
    • RE: Unable to make first print, Error: M32:

      @fcwilt very simple beginning code on the gcode, but even if I have a completely empty gcode file and tell it to run, it gives the same "file is already being printed" error. I don't believe any of it being run at all.

      G90
      M82
      M106 S0
      M140 S60
      M190 S60
      M104 S190 T0
      M109 S190 T0
      G28 ; home all axes
      G32
      ; process Process1
      ; layer 1, Z = 0.200
      T0
      G92 E0.0000
      G1 E-1.0000 F1800

      posted in Using Duet Controllers
      burtonenatorundefined
      burtonenator