Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Shoki
    3. Posts
    • Profile
    • Following 3
    • Followers 0
    • Topics 15
    • Posts 67
    • Best 4
    • Controversial 0
    • Groups 0

    Posts made by Shoki

    • Duet3D Offline Documentation

      Hi !

      Is there a way to download the Duet documentation offline, that is to view https://docs.duet3d.com on a computer not connected to the internet, or at least the page https://docs.duet3d.com/en/User_manual/Reference/Gcodes

      I'm working on computers and machines that are not connected to the internet (and never will be), and I often need access to the documentation when I work on the machines. Additionnaly, I can't have my phone with me at work so everytime I need access to the documentation I have to go back to my desk which is on the other side of the building.

      I tried to "print to pdf" the duet documentation but it does not come out nicely and the link are not clickable anymore.

      Is there a way to compile or download cleanly some pages of the documentation so I can have them on these offline computer ? I do not mind having to update these file regularly manually.

      I did not find any previous topic about this so there are two reasons:

      • it already exists and I just don't know where it is available
      • I'm the only one that need something like this
      posted in Documentation
      Shokiundefined
      Shoki
    • RE: Adapting a printer (expansion board heater control)

      @dc42
      Your solution worked.
      However there is a behavior I don't really like.
      When the printer is off both bed and chamber are off.

      When the printer is on and duet is running, both chamber and bed are controled by the duet and can be on and off depending on temperatures and control values.

      The problem is while turning on the machine (while config.g loading) or when I restart the machine using the emergency stop button, the machine is turning on both the bed and the chamber heater.
      For me this is a problem as if the duet where to fail (bad SD or something else) while powered, both heaters would turn on uncontrolled...

      Any way for the default state to be low ?

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • RE: Connecting external steppers - Going from 1XD to a 6XD mainboard

      @Shoki I have another solution since I had to install a 3HC, it's just to connect the motor directly to the 3HC board...
      The motor is this one, and it's rated for 3A so I can use a current of 75% of this rated current so around 2200 : M906 Z2200
      https://cpdxkcnc.com/products/stepper-motor-nema23-76mm-30a-2nm-57hs76-3004a08-d21-05-569

      But I'm still interested in the solution to the TB6600 since I could use a free motor slot on my 3HC, and I don't want to have to buy a 1HCL or a second 3HC for it...

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • RE: Connecting external steppers - Going from 1XD to a 6XD mainboard

      @droftarts Hi

      Thank you very much for your reply.
      I had time this week to test your solutions.

      For X and Y, everything is working perfect. I realised the connector on the motor sides could be disassembled so it in the end it was quite easy to modify it there.

      Regarding the Z motor driven by the TB6600, I tried your solution and it does not seem to work.

      • I checked my wiring multiple times and everything seems like on your diagram.
      • I checked the value of my resistor, they are 10k.
      • I tried to change the M569 R parameter, no difference.
      • I checked what I was getting on the EN/DIR/CLK at the TB6600 terminal : almost everything seems fine, signal goes from low to high on EN when I turn motor on (with the correct M569 R parameter), and signal switches on DIR when I switch the direction command. Only problem is : signal is not at 5V but at 1.4V which is probably my problem... I also checked what I was getting on the other side of the resistors and I did have 5V as expected.
      • I tried to connect the X motor to this driver (to check if wasn't a config problem), and once I switched the M569 R parameter, X was working (when moving in Z), which is what I expected.

      Any guess on why are my signals too low with this wiring ?
      5V lane from the 6XD is not strong enough to pull the signal higher ?

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • Connecting external steppers - Going from 1XD to a 6XD mainboard

      Hey everyone.

      I'm working on converting a new printer to a Duet.
      The printer is a Creatbot D600 Pro that uses two different kinds of stepper driver for Z and for X/Y.

      I already did the conversion once, but I previously used a 6HC (which was stupid) with three 1XD. And now I moved to a 6XD board but i'm having problems with making the motor moves.

      This is the input for the Z stepper driver which is a TB6600 :
      ca02e527-f893-4d02-9292-05c953e0be7c-image.png

      And this is the input for the X and Y stepper driver which are this reference. Note that the connections from factory are made with common grounds (to PUL-, DIR- and EN-) and the signal are passed to the PUL+ DIR+ and EN+.
      81d0f36c-e87d-4a7e-89e5-162fda3ecb74-image.png

      I managed to make it work with my previous machine and the 1XD boards with connections like these :

      External stepper for Z TB6600 -> 1XD Board
      CLK -> D0_STEP (+)
      DIR -> D0_DIR (+)
      EN -> D0_EN (-)
      GND - > GND (on the IO0)

      External stepper for X and Y -> 1XD Board
      PUL+ -> D0_STEP (+)
      DIR+ -> D0_DIR (+)
      EN+ -> D0_EN (-)
      PUL-, DIR- and EN- > GND (on the IO0)

      Now I moved to a 6XD board and there are no longer the DIR+ and STEP+ pins on the 6XD board. So I did this :

      External stepper for Z TB6600 -> 6XD Board
      CLK -> D0_STEP (-)
      DIR -> D0_DIR (-)
      EN -> D0_EN (-)
      GND - > GND

      External stepper for X and Y -> 6XD Board
      PUL+ -> D0_STEP (-)
      DIR+ -> D0_DIR (-)
      EN+ -> D0_EN (-)
      PUL-, DIR- and EN- > GND (on the IO0)

      It does not work. Nothing moves. I understand the problem that I have is that I only have low signals (-) and no 5V in my wiring, but I don't know how to do it differently...

      I checked with a multimeter and the EN signal (from EN- to 5V) and DIR signal (from DIR- to 5V) are working as expected (going from 0 to 5V, when I turn motor on or when I switch direction in the moves). So I don't think it's a firmware issue.

      I have a few question :

      • There is a bridge that can be set in the firmware, is it the same as changing the R parameter in the M569 command ?
        6ed35bc1-27a6-4b78-9611-8a0528526acd-image.png

      • In the 6XD documentation here, there is this sentence :
        "To connect a Pololu/StepStick/similar driver to the 6XD a 10K pullup resistor is needed from the Step/Dir/En lines to +5V"
        This might be what I need to do, but I don't understand what a "pullup resistor" is and how I should connect them.
        I also found this sentence :
        "The Step and Dir outputs from the 6XD are either low (when "on") or floating/high-impedance when "off""
        From my understanding, it's related to above so the step and dir outputs are at GND when low (on) and are just "whatever" when off ? And the "pullup resistor" would make the "whatever" be 5V when off ? Did I understood that correctly ?

      • For the X and Y motors which have all poles (DIR+/DIR-, STEP+/STEP-, EN+/EN-), I see on the same 6XD documentation that it's recommended to have the common 5V to the DIR+ STEP+ and EN+. It's different from the wiring that I have from factory and I'd rather keep them that way if possible as the motor are very hard to access and would recquire a lot of disassembly to modify this wiring... Is it possible to make it work with a 6XD without changing these cables ? Maybe with the same pull up resistor trick ?

      0c9c93d9-2a17-4d6e-ad70-cec3ecc69f4f-image.png

      Thanks in advance for your help.

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • RE: 1XD not working

      @chrishamm the mainboard is installed with 3.5.0-rc.1. Same as the Duet Web Control.
      I don't see a line with 1XD (not the same as on my other printer, where there is one)

      Nothing is connected to the 1XD for now. Only power and CAN.

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • 1XD not working

      Hi,

      I'm facing a problem with a new 1XD.
      I can't seem to make it work.
      I replaced it in my system with a 3HC and it worked flawlessly, no problem with CAN communication.
      I replaced it with an old 1XD I took from an other printer and it's working no problem (but I need the old printer so i had to put it back !)

      I tried to fit a jumper to reset the board, as recommended in the documentation. It did not change anything.

      The thing that worries me the most is the fact that the status led is always off.
      The 5V red led and the blue VIN led are both turned on.

      It's a 1XD V1.1

      Is this a sign of dead board ? How can I diagnose/solve the problem ?

      Thanks in advance.

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • RE: Adapting a printer (expansion board heater control)

      @dc42 Thank you very much this will work !

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • Adapting a printer (expansion board heater control)

      Hey

      I'm trying to adapt a semi-industrial printer to a duet board.

      There are two electronic cards on the printer for now :

      • One is a regular marlin printer
      • The other is handling all the power (bed, chamber, 220V input, emergency stop, etc).

      I would like to replace the first one with a Duet and keep the second one so I don't have to redo all the mains wiring, order some relays etc...

      There is only a 5 pin cables between the two cards. And it's the only part i'm unsure about the transition to Duet.

      The pins are labeled like this :
      B -> Bed -> which goes from 0 to 3.3V when bed is turned on
      C -> PTC -> which goes from 0 to 3.3V when chamber is turned on
      G -> GND which for me is just the ground (and i used it to measure the other)
      V -> 5V which is just 5V
      P -> ACCK I have no idea what this one is/does and it's just always at 3.3V

      Here are my questions :

      1 - Any idea what ACCK means ?
      2 - The original board seems to be switching the 3.3V and not the ground since there is only one ground for both the bed and the chamber conrol. From my understanding of Duet boards, it's switching the GND and not the 3.3V (Vin).
      Any idea how I can wire this secondary board on a duet to make the two heaters (bed and chamber) work ?

      Thanks in advance for the help.

      posted in Duet Hardware and wiring
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @edsped I have added an on/off switch on my PanelDue so I turn it off when I don't use it. Hardware solution to a software problem.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Probing gcode G38 VS G30

      Found the answer to my own question, should have searched the forum first.

      @dc42 said in EndStop Accuracy Test:

      @Nazar in RRF 3.5.x the machine position is read during moves instead of only at the end of a move, and at most every 250ms. So if you read the machine position immediately after the G1 H4 or G38.2 move has completed, you may gat a value that is up to 250ms out of date.

      I suggest you insert command G4 P260 after the G1 or G38.2 command, before you read the machine position.

      This solved the repetability problem with the G38.2 command.

      I also found this post :

      @dc42 said in EndStop Accuracy Test:

      @Nazar I think G1 H4 will do exactly what you need.

      Will the G1 H4 command work for my application of XYZ probing too ?
      In the gcode dictionary fo the documentation, i found this on G1 H4 :

      G1 Xnnn Ynnn Znnn H4 Sense endstops while moving, update the current position at which the endstop switch triggers (supported in RRF 3.2-b4 or newer).

      But which endstop does it sense while moving ? All of them ? I did not find a parameter to tell him which probe it needs to monitor ?

      posted in General Discussion
      Shokiundefined
      Shoki
    • Probing gcode G38 VS G30

      Hi,

      I have some questions about probing.

      I have an E3D Toolchanger with a Duet3, running RRF3.5rc2. It is equiped with 3 tools : 2 printing and one probe (this one).

      I'm trying to setup probing procedures to probe printed parts and other parts, for measurement and calibration.

      **My question are simple :

      • Which command should be used for general probing in XYZ ?
      • Why are the results from G38 different from the results from G30 ?**

      In the gcode dictionnary, i have found the G38 command which seems perfectly suitable for this.
      However, i'm noticing that there is no precision at all with it.

      I made some simple tests, starting with just the Z switch which i know is very precise.

      The simple script I used is this below. Everything is probed at the same slow speed of 6mm/s in Z.

      var number = 10
      var xpos = 0
      var ypos = -7
      
      ;Z switch
      M558 K0 P8 C"io1.in"  H5 F360 ; Set Z probe
      
      G1 X{var.xpos} Y{var.ypos}
      
      ;Probing using G30 with Z switch
      while iterations<var.number-1
          G30 K0 P{iterations} X{var.xpos} Y{var.ypos} K0 Z-9999
          G1 Z5 F360
      G30 K0 P{var.number-1} X{var.xpos} Y{var.ypos} Z-9999 S-1
      G1 Z5 F360
      G1 Z10 F360
      
      ;Probing using G38 with Z switch
      M558 K0 F360 ; Set probe speed
      while iterations<var.number
          G38.2 K0 X{var.xpos} Y{var.ypos} Z-5
          echo "Right:"^move.axes[2].machinePosition
          G1 Z5 F360
      G1 Z10 360
      

      The results are the following :

      For the G30 command :
      -0.686,-0.686,-0.688,-0.686,-0.686,-0.686,-0.686,-0.686,-0.686,-0.686
      So it's very good, a single value is different and only 0.002.

      For the G38 command :
      1.158, 0.014, 0.014, 0.014, 0.014, 0.014, 0.614, 1.080, 0.014, 0.024
      So, the value is not the same and they range a full millimeter !

      I tried to do the same thing with my CNC probe. I managed to do it using the G38.2 command and also had a wide range of measurements.
      For the G30 command, the probed crashed into the bed because it was using the machine coordinates and not the active tool coordinates... I will fix it and try again.

      So G38 seems very unprecise compared to G30 ? Why is that ? I can use G30 when probing in Z but it does not work for other direction.

      Thanks in advance for the help.

      posted in General Discussion
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @dc42 I just tried it.
      This did not make a difference for me.
      The firmware was correctly installed and the name displayed on the Paneldue corresponds to the one you provided.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @dc42 I will try it when coming back after Formnext. See you there.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @Phaedrux I will not be able to try this before mid november as I have vacation and then I will see you at Formnext.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @dc42 I don't need to do anything for it to reconnect. It comes back on it's own after a few seconds. It's just very annoying and sometimes the disconnection are so frequent I don't have time to send gcode commands manually in the console of the DWC, which is very annoying.

      So you think it's something that can't be fixed : too much information displayed on the PanelDue because it's a Toolchanger ?
      I tried to disable all my tools except one in my config.g. So that only a single tool was displayed on the PanelDue and I still had the problem...

      I guess if it can't be fixed I will just add an on/off switch next to the screen so that I can power it on when I need it and leave it off when I don't.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @edsped I erased the firmware and updated it again via Bossa and USB, it did not solve anything. The IP adress was showing both before and after the update.

      @dc42 This is a PanelDue 7i, running now firmware version 3.5.0-rc7-7.0i.

      @Phaedrux

      This is the result of a M122 command after a print where the error appeared multiple time, no reboot of the Duet after the print :

      M122
      === Diagnostics ===
      RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.0-rc.1 (2023-08-31 16:16:15) running on Duet Ethernet 1.02 or later + DueX5v0.11
      Board ID: 0JD2M-9F8TA-GJ4TN-6J1F8-3SN6P-K7UY5
      Used output buffers: 1 of 26 (26 max)
      === RTOS ===
      Static ram: 23076
      Dynamic ram: 75432 of which 0 recycled
      Never used RAM 11132, free system stack 124 words
      Tasks: NETWORK(1,ready,22.3%,196) HEAT(3,nWait,0.1%,308) Move(4,nWait,0.3%,261) DUEX(5,nWait,0.0%,26) MAIN(1,running,77.2%,625) IDLE(0,ready,0.0%,29), total 100.0%
      Owned mutexes:
      === Platform ===
      Last reset 01:04:56 ago, cause: power up
      Last software reset at 2023-10-23 13:49, reason: User, Gcodes spinning, available RAM 10996, slot 1
      Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
      Error status: 0x04
      Aux0 errors 0,0,0
      MCU temperature: min 30.1, current 36.2, max 42.5
      Supply voltage: min 24.1, current 24.3, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes
      Heap OK, handles allocated/used 99/32, heap memory allocated/used/recyclable 2048/1320/912, gc cycles 0
      Events: 0 queued, 0 completed
      Driver 0: standstill, SG min 0
      Driver 1: standstill, SG min 0
      Driver 2: standstill, SG min 0
      Driver 3: standstill, SG min 0
      Driver 4: standstill, SG min 0
      Driver 5: standstill, SG min n/a
      Driver 6: standstill, SG min n/a
      Driver 7: standstill, SG min n/a
      Driver 8: standstill, SG min 251
      Driver 9: standstill, SG min n/a
      Driver 10: 
      Driver 11: 
      Date/time: 2023-10-25 12:55:42
      Cache data hit count 4294967295
      Slowest loop: 220.50ms; fastest: 0.15ms
      I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
      === Storage ===
      Free file entries: 10
      SD card 0 detected, interface speed: 20.0MBytes/sec
      SD card longest read time 2.1ms, write time 0.0ms, max retries 0
      === Move ===
      DMs created 83, segments created 27, maxWait 6179ms, bed compensation in use: none, height map offset 0.000, ebfmin -0.92, ebfmax 1.00
      no step interrupt scheduled
      Moves shaped first try 1301, on retry 100, too short 1539, wrong shape 35, maybepossible 19
      === DDARing 0 ===
      Scheduled moves 3233, completed 3233, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
      === Heat ===
      Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
      Heater 0 is on, I-accum = 0.0
      === GCodes ===
      Movement locks held by null
      HTTP is idle in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger is idle in state(s) 0
      Queue is idle in state(s) 0
      LCD is idle in state(s) 0
      Daemon is idle in state(s) 0
      Autopause is idle in state(s) 0
      Q0 segments left 0
      Code queue 0 is empty
      === DueX ===
      Read count 0, 0.00 reads/min
      === Network ===
      Slowest loop: 84.28ms; fastest: 0.04ms
      Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
      HTTP sessions: 1 of 8
      Interface state active, link 100Mbps full duplex
      

      This is my config.g

      ; Configuration file for Duet WiFi / Ethernet running RRF3 on E3D Tool Changer
      ; executed by the firmware on start-up
      
      ;########################
      ;  General preferences
      ;########################
      
      M111 S0 				; Debugging off
      G21 					; Work in millimetres
      G90 					; Send absolute coordinates...
      M83 					; ...but relative extruder moves
      M555 P2 				; Set firmware compatibility to look like Marlin
      M669 K1 				; Select CoreXY mode	
      
      ;########################
      ;        Network
      ;########################
      
      M550 P"ToolChanger" 	; Set machine name
      M553 P***     ; Ethernet Settings - Mask
      M554 P***     ; Ethernet Settings - Passerelle
      M552 P***     ; Ethernet Settings - Adresse
      M552 S1					; Enable Networking
      M586 P0 S1 				; Enable HTTP
      M586 P1 S0 				; Disable FTP
      M586 P2 S0 				; Disable Telnet
      
      ;########################
      ;         Drive
      ;########################
      	
      ;Drive directions
      M569 P0 S0 											; Drive 0 (X)
      M569 P1 S0 											; Drive 1 (Y)
      M569 P2 S1 											; Drive 2 (Z)
      M569 P3 S0 											; Drive 3 (C)
      M569 P4 S0 											; Drive 4 (E0)
      M569 P5 S0 											; Drive 5 (E3)
      M569 P6 S0											; Drive 6 (E2)
      M569 P7 S0 											; Drive 7 (E1)
      M569 P8 S1 											; Drive 8 (W)
      M569 P9 S0 											; Drive 9 UNUSED Future 5 axes
      
      ;Drive mapping and control
      M584 X0 Y1 Z2 C3 W8 E4:7:6:5 						; Stepper motor connection points, see C:\Users\YN14386\Documents\Documentation\Toolchanger for wiring diagram
      M208 X-25:338.5 Y-49:243 Z-0.2:300 C-45:360 W-3:65 	; Set axis maxima & minima
      M92  X100 Y100 Z800 C91.022 W360 E392:392:392:392	; Set steps per mm assuming x16 microstepping 
      M350 X16 Y16 Z16 I1									; Configure microstepping with interpolation for the extruders
      M350 E16:16:16:16 I1 								; Configure microstepping with interpolation for the XYZ movements
      M350 C16 I1  										; Configure microstepping with interpolation for the coupler
      M350 W16 I1											; Configure microstepping with interpolation for the pebble wiper
      
      ;Drive speeds and acceleration
      M203 X35000 Y35000 Z1200 C5000 W2400 E5000:5000:5000:5000	; Set maximum speeds (mm/min)
      M201 X2000 Y2000 Z400 C500 W800 E2500:2500:2500:2500		; Set maximum accelerations (mm/s^2) was X6000 Y6000
      M566 X300 Y300 Z20 C2 W100 E400:400:400:400					; Set the jerk : maximum instantaneous speed changes  (mm/min)
      ; reset this to 400 400
      
      
      ; Motor current
      M906 X1800 Y1800 Z1330 I30   						; Idle motion motors to 30%
      M906 E1000:1000:1000:1000 C500 I10     				; Idle extruder and cooupler motors to 10%
      M906 W600 I20										; Idle pebble wiper to 20%
      
      
      ;########################
      ;        Endstops
      ;########################
      
      ;X and Y axis
      M574 X1 Y1 S3 					; Set X / Y endstop stall detection
      M915 X Y S3 F0 H400 R1   		; Stall Detection for the X and Y Axes ;
      
      ; Coupler Axis
      M574 C0 Z0  				    ; No C Z endstop, it just crashes
      
      ;P axis
      M574 W1 S3 						; Set W endstop stall detection
      
      ;Z axis
      M558 P8 C"zstop" H3 F360 I0 T20000 	; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
      G31 P200 X0 Y0 Z0	 				; Set Z probe trigger value, offset and trigger height
      M557 X10:290 Y20:180 S40 			; Define mesh grid
      ;M557 X10:290 Y20:180 S280:160		; Define mesh grid to test quickly
      ;M376 H15							; bed compensation taper
      
      ;########################
      ;         Heaters
      ;########################
      
      ;Tool 0
      M308 S1 P"e1temp"      Y"thermistor" A"Heater 0" T100000 B4725 C7.06e-8 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC)
      M950 H1 C"e1heat" T1													; Set heater number (H) and connection point (C)
      M143 H1 S285															; Set temperature limit for heater to 285C
      
      ;Tool 1
      M308 S2 P"duex.e2temp" Y"thermistor" A"Heater 1" T100000 B4725 C7.06e-8 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC)
      M950 H2 C"duex.e2heat" T2												; Set heater number (H) and connection point (C)
      M143 H2 S290															; Set temperature limit for heater to 285C
      
      ;Tool 2
      M308 S3 P"duex.e3temp" Y"thermistor" A"Heater 2" T100000 B4725 C7.06e-8 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC)
      M950 H3 C"duex.e3heat" T3												; Set heater number (H) and connection point (C)
      M143 H3 S285 															; Set temperature limit for heater to 285C
      
      ;Tool 3
      M308 S4 P"duex.e4temp" Y"thermistor" A"Heater 3" T100000 B4725 C7.06e-8 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC)
      M950 H4 C"duex.e4heat" T4												; Set heater number (H) and connection point (C)
      M143 H4 S285 															; Set temperature limit for heater to 285C
      
      ;Heated bed
      M308 S0 P"bedtemp" Y"thermistor" A"Bed" T100000 B4138 C0 				; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC)
      M950 H0 C"bedheat" T0													; Set heater number (H) and connection point (C)
      M143 H0 S115 															; Set temperature limit for bed heater to 110C
      M140 H0																	; Bed heater is heater 4
      
      ;########################
      ;        Fans
      ;########################
      
      ;Tool 0
      M950 F4 C"fan1"					; Set hotend fan number (F) and connection point (C)
      M106 P4 S255 H1 T60				; Link fan to Heater (H) and turn it for temperature above 60C (T)
      M950 F0 C"fan2"					; Part cooling fan connection point
      M106 P0 S0 C"Tool 0"			; Turn off the part cooling fan.
      
      ;Tool 1
      M950 F5 C"duex.fan3"			; Set hotend fan number (F) and connection point (C)
      M106 P5 S255 H2 T60 			; Link fan to Heater (H) and turn it for temperature above 60C (T)
      M950 F1 C"duex.fan4"			; Part cooling fan connection point
      M106 P1 S0 C"Tool 1"			; Turn off the part cooling fan.
      
      ;Tool 2
      M950 F6 C"duex.fan5"			; Set hotend fan number (F) and connection point (C)
      M106 P6 S255 H3 T60 			; Link fan to Heater (H) and turn it for temperature above 60C (T)
      M950 F2 C"duex.fan6"			; Part cooling fan connection point
      M106 P2 S0 C"Tool 2"			; Turn off the part cooling fan.
      
      ;Tool 3
      M950 F7 C"duex.fan7"			; Set hotend fan number (F) and connection point (C)
      M106 P7 S255 H4 T60				; Link fan to Heater (H) and turn it for temperature above 60C (T)
      M950 F3 C"duex.fan8"			; Part cooling fan connection point
      M106 P3 S0 C"Tool 3"			; Turn off the part cooling fan.
      
      ;########################
      ;         Tools
      ;########################
      
      ;Tool 0
      M563 P0 S"Tool 0" D0 H1 F0 				; Define the tool : its number (P), its name (S), its extruder drive (D), its heater (H) and its part cooling fan (F)
      G10 P0 X0 Y0 Z0 						; Reset tool axis offsets
      G10 P0 R0 S0 							; Reset initial tool active and standby temperatures to 0C
      
      ;Tool 1
      M563 P1 S"Tool 1" D1 H2 F1 				; Define the tool : its number (P), its name (S), its extruder drive (D), its heater (H) and its part cooling fan (F)
      G10 P1 X0 Y0 Z0 						; Reset tool axis offsets
      G10 P1 R0 S0 							; Reset initial tool active and standby temperatures to 0C
      
      ;Tool 2
      M563 P2 S"Tool 2" D2 H3 F2 				; Define the tool : its number (P), its name (S), its extruder drive (D), its heater (H) and its part cooling fan (F)
      G10 P2 X0 Y0 Z0 						; Reset tool axis offsets
      G10 P2 R0 S0 							; Reset initial tool active and standby temperatures to 0C
      
      ;Tool 3
      M563 P3 S"Tool 3" D3 H4 F3 				; Define the tool : its number (P), its name (S), its extruder drive (D), its heater (H) and its part cooling fan (F)
      G10 P3 X0 Y0 Z0 						; Reset tool axis offsets
      G10 P3 R0 S0 							; Reset initial tool active and standby temperatures to 0C
      
      ;########################
      ;       PID tune 
      ;########################
      
      ; run M303 T0 S230 with the tool you want to autotune (T) and the target temperature (S)
      ; for the bed, run M303 H4 S80 with the target temperature (S)
      
      ;Tool 0
      M307 H1 R4.405 K0.459:0.607 D1.76 E1.35 S1.00 B0 V24.3  ;PID parameter for a heater (H)
      
      ;Tool 1
      M307 H2 R4.395 K0.424:0.670 D1.72 E1.35 S1.00 B0 V24.3
      
      ;Tool 2
      M307 H3 R4.902 K0.455:0.686 D1.64 E1.35 S1.00 B0 V24.3  ;PID parameter for a heater (H)
      
      ;Tool 3 
      M307 H4 R5.197 K0.520:0.759 D1.42 E1.35 S1.00 B0 V24.3  ;PID parameter for a heater (H)
      ;Bed
      M307 H0 R1.286 K0.265:0.000 D3.49 E1.35 S1.00 B0 ; PID parameter for the bed heater (H) for magnetic + PEI
      
      ;########################
      ;     tool offsets
      ;########################
      ; !ESTIMATED! offsets for:
      ; V6-tool: X-9 Y39 Z-5
      ; Volcano-tool: X-9 Y39 Z-13.5
      ; Hemera-tool: X20 Y43.5 Z-6
      
      
      global xmicroscope = 338.4  ;
      global ymicroscope = 98.3   ;
      
      
      ; for the XY calibration, major divisions are 0.1 mm and minor are 0.05 mm
      ;G1 X336.8  Y99.5 F6000
      
      ;G10 P0 X20.00 Y43.50				    ; Tool 0 is the reference
      ;G10 P1 X19.65 Y43.55					; Tool 1 was Y 43.25
      ;G10 P2 X19.70 Y43.60        			; Tool 2 was X 19.55 Y 43.50
      ;G10 P3 X19.75 Y43.45        			; Tool 3 was Y 43.30
      
      ; X and Y offsets are set in the toolXYoffset files
      M98 P"0:/sys/toolXYoffset0.g"
      M98 P"0:/sys/toolXYoffset1.g"
      M98 P"0:/sys/toolXYoffset2.g"
      M98 P"0:/sys/toolXYoffset3.g"
      
      ; Z (and W) offsets are set in the toolZoffset files
      M98 P"0:/sys/toolZoffset0.g"
      M98 P"0:/sys/toolZoffset1.g"
      M98 P"0:/sys/toolZoffset2.g"
      M98 P"0:/sys/toolZoffset3.g"
      
      ;########################
      ;    Pressure advance
      ;########################
      
      ;Default pressure advance for PLA, different values should be set in the slicer
      
      M572 D0 S0.025 						; pressure advance T0
      M572 D1 S0.025 						; pressure advance T1
      M572 D2 S0.025 						; pressure advance T2
      M572 D3 S0.025 						; pressure advance T3
      
      
      ;########################
      ;         Others
      ;########################
      
      M593 F42.2						; cancel ringing at 42.2Hz (https://forum.e3d-online.com/threads/accelerometer-and-resonance-measurements-of-the-motion-system.3445/)
      
      ; Pebble wiper servo motor
      M950 S0 C"duex.pwm5" Q500
      
      
      M575 P1 S1 B57600				; Enable LCD
      G29 S2							; disable mesh
      T-1								; deselect tools
      
      ;******************************
      ;*******Macro parameters*******
      ;******************************
      
      global homingSpeed = 4800
      global movementSpeed = 18000
      global zmovementSpeed = 900
      
      global centerX = 155
      global centerY = 100
      
      global backX = 155
      global backY = 210
      
      global centerProbeX  = {global.centerX - sensors.probes[0].offsets[0]}
      global centerProbeY  = {global.centerY - sensors.probes[0].offsets[1]}
      
      
      
      global toolSafeY     = 150
      global notoolSafeY   = 210
      global toolapproachY = 217
      
      
      global tool0X = -3.4
      global tool0Y = 227.0
      
      global tool1X = 87.2
      global tool1Y = 227.2
      
      global tool2X = 221.8
      global tool2Y = 227.9
      
      global tool3X = 312.4
      global tool3Y = 227.9
      

      homeall.g

      ; homeall.g
      ; called to home all axes
      T-1
      
      M98 P"homey.g"			; Home Y
      
      M98 P"homex.g"			; Home X
      
      M98 P"homez.g"			; Home Z
      
      M98 P"homeW.g"			; Home W (Pebble Wiper)
      
      M98 P"homec.g"			; Home C (ToolHead)
      
      M98 P"0:/macros/Utility/Move to back"
      

      homec.g

      ; homec.g
      ; called to home the C axis (coupler)
      
      M291 P" " R"Homing C" S0 T1
      
      G91
      M913 C70					; XY MOTORS TO 60% CURRENT
      G1 H2 C-500 F5000
      G92 C-45
      G90
      M913 C100					; XY MOTORS TO 100% CURRENT
      
      ;Open Coupler
      M98 P"0:/macros/Utility/Coupler - Unlock"
      M300 P100 S440 			
      

      homew.g

      ; called to home the W axis (Pebble)
      
      M291 P" " R"Homing W" S0 T1
      
      G91 							; use relative positioning
      G1 H2 W-0.5 F600		   		; energise motors to ensure they are not stalled
      M400 							; make sure everything has stopped before we change the motor currents
      M913 W40 					    ; drop motor currents to 40%
      M915 H200 W S3 R0 F0 			; set W sensitivity to 3, do nothing when stall, unfiltered
      
      G1 H1 W-80 F1200				; move to the top stopping at the endstop
      M300 P100 S440 					; play beep sound
      
      M400 							; make sure everything has stopped before we reset the motor currents
      M913 W100 						; motor currents back to 100%
      
      G90 							; back to absolute positioning
      G1 W0 F2400 					; move away from end
      

      homex.g

      ; homex.g
      ; called to home the x axis
      
      if state.currentTool ==-1
          M291 P" " R"Homing X" S0 T1
          G91                                ; relative positioning
      
          G1 H2 X0.5 Y-0.5 F6000   		; energise motors to ensure they are not stalled
          M400 							; make sure everything has stopped before we change the motor currents
          M913 X20 Y20 					; drop motor currents to 20%
          M915 H200 X Y S3 R0 F0 			; set X and Y to sensitivity 3, do nothing when stall, unfiltered
      
          G1 Z5 F{global.zmovementSpeed} H2  ; lift Z relative to current position
          G1 H1 X-1000 F{global.homingSpeed} ; move quickly to X axis endstop and stop there (first pass)
          M300 P100 S440 					   ; play beep sound
          G1 H1 X2 F{global.movementSpeed}					; move away from end
          G1 Z-5 F{global.zmovementSpeed} H2 ; go back to the previous Z
      
          G90                                ; absolute positioning
          M400 							; make sure everything has stopped before we reset the motor currents
          M913 X100 Y100 					; motor currents back to 100%
      else
          M291 P" " R"Function not available when tool selected" S0 T2
      

      homey.g

      ; homey.g
      ; called to home the y axis
      
      if state.currentTool ==-1
          M291 P" " R"Homing Y" S0 T1
          G91                                ; relative positioning
      
          G1 H2 X0.5 Y-0.5 F6000             ; energise motors to ensure they are not stalled
          M400                               ; make sure everything has stopped before we change the motor currents
          M913 X20 Y20                       ; drop motor currents to 20%
          M915 H200 X Y S3 R0 F0             ; set X and Y to sensitivity 3, do nothing when stall, unfiltered
      
          G1 Z5 F{global.zmovementSpeed} H2  ; lift Z relative to current position
          G1 H1 Y-1000 F{global.homingSpeed} ; move quickly to X axis endstop and stop there (first pass)
          M300 P100 S440                     ; play beep sound
          G1 H1 Y2 F{global.movementSpeed}   ; move away from end
          G1 Z-5 F{global.zmovementSpeed} H2 ; go back to the previous Z
      
          G90                                ; absolute positioning
          M400                               ; make sure everything has stopped before we reset the motor currents
          M913 X100 Y100                     ; motor currents back to 100%
      else
          M291 P" " R"Function not available when tool selected" S0 T2
      

      homez.g

      ; homez.g
      ; called to home the Z axis
      if state.currentTool ==-1
          M291 P" " R"Homing Z" S0 T1
          G91                                                                      ; relative positioning
          G1 Z5 F{global.zmovementSpeed} H2                                        ; lift Z relative to current position
          G90                                                                      ; absolute positioning
          G1 X{global.centerProbeX} Y{global.centerProbeY} F{global.movementSpeed} ; go to first probe point
          G30                                                                      ; home Z by probing the bed
          M300 P100 S440 					   										 ; play beep sound
      else
          M291 P" " R"Function not available when tool selected" S0 T2
      

      tfree0.g

      ; tfree0.g
      ; called when tool 0 is freed
      
      ;retract nozzle
      M98 P"retract_quick.g"
      
      ;Move In
      G53 G1 X{global.tool0X} Y{global.toolSafeY} F12000
      G53 G1 Y{global.toolapproachY} F6000
      G53 G1 Y{global.tool0Y} F3000
      
      ;retract nozzle
      M98 P"retract.g"
      
      ;Open Coupler
      M98 P"0:/macros/Utility/Coupler - Unlock"
      
      ;Move Out
      G53 G1 Y{global.toolapproachY} F6000
      G53 G1 Y{global.notoolSafeY} F{global.movementSpeed}
      

      tpost0.g

      ; tpost0.g
      ; called after tool 0 has been selected
      
      ;heatup
      M116 P0
      
      ;retract nozzle
      M98 P"retract_recover.g"
      
      ;restore to correct height  
      G0 R2 Z0 F5000
      ;restore brush to correct height 
      G0 R2 W0 F1200 
      
      ;Move Out
      G53 G1 Y{global.toolSafeY} F6000
      
      M106 R2	; restore print cooling fan speed
      

      tpre0.g

      ; tpre0.g
      ; called before tool 0 is selected
      
      ;Unlock Coupler
      M98 P"0:/macros/Utility/Coupler - Unlock"
      
      ;Move to location
      G1 X{global.tool0X} Y{global.notoolSafeY} F{global.movementSpeed}
      
      ;Move in
      G1 Y{global.toolapproachY} F{global.movementSpeed}
      
      ;Collect
      G1 Y{global.tool0Y} F3000
      
      ;Close Coupler
      M98 P"0:/macros/Utility/Coupler - Lock"
      

      And these two are separated but called from the config.g as they are set by macros.

      toolZoffset0.g

      ; Offset for tool 0
      ; Smaller negativ values means closer to bed - Z and W must have the same value
      G10 P0 Z-7.930 W-7.930
      

      toolXYoffset0.g

      ; Offset for tool 0
      G10 P0 X21.0 Y43.45
      
      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @edsped Thanks for replying with your solution. I will try it tomorrow and post the result here.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @Phaedrux I will download them and send them when I'm back to work on thurday !
      Thanks a lot for taking the time to help me figure it out.

      posted in PanelDue
      Shokiundefined
      Shoki
    • RE: Duet 2 Ethernet disconnect when printing and paneldue connected

      @Phaedrux Not after a reboot of the Duet. Just when I can have access back to the DWC.
      As I said, while this happen, the printer is printing and continuing like nothing happened.

      The thing is, I don't need to switch to the setup screen to get the DWC to connect back, it comes back on its own after 3-5 seconds.

      posted in PanelDue
      Shokiundefined
      Shoki