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

    How to configure drivers 10 and 11 on CONN_LCD?

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    7
    26
    986
    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.
    • catalin59undefined
      catalin59
      last edited by

      Hi,

      I have a Duet2WiFi in CoreXY configuration with 3 Z motors so I am using all 5 on board drivers. I want to use drivers 10 and 11 on the CONN_LCD connector for two external extruder drivers with STEP/DIR/ENABLE interfaces. I am using the following configuration:

      M584 X0 Y1 Z2:3:4 E10:11
      M563 P0 D10
      M563 P1 D11

      but I get this message:

      Error: M563: Tool creation: bad drive number

      What are the correct G-Code commands to describe this configuration?

      Thanks

      1 Reply Last reply Reply Quote 0
      • timcurtis67undefined
        timcurtis67
        last edited by

        Check out this page, maybe it will help you?

        https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers

        catalin59undefined 1 Reply Last reply Reply Quote 0
        • timcurtis67undefined
          timcurtis67
          last edited by

          Also see https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping

          You may have to unmap your existing extruder drives before assigning new ones.

          catalin59undefined 1 Reply Last reply Reply Quote 1
          • catalin59undefined
            catalin59 @timcurtis67
            last edited by

            @timcurtis67 I have read this page already, it tells you how to connect the external drivers to the CONN_LCD pins, which I have done, but not what G-Code commands to use to actually enable drivers 10 and 11.

            1 Reply Last reply Reply Quote 0
            • catalin59undefined
              catalin59 @timcurtis67
              last edited by

              @timcurtis67 This is what I think I am doing with M584 X0 Y1 Z2:3:4 E10:11 - doesn't this map the first two extruders to drives 10 and 11? How do you unmap existing extruder drives? There is no mention in the wiki anywhere about driver unmapping. The M584 documentation only mentions setting the drive mapping and gives one example which is very similar to what I am using but does not work.

              1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator
                last edited by

                To unmap a driver, it's number is simply left out of the M584 command.

                Z-Bot CoreXY Build | Thingiverse Profile

                catalin59undefined 1 Reply Last reply Reply Quote 0
                • catalin59undefined
                  catalin59 @Phaedrux
                  last edited by

                  @Phaedrux That's exactly what I am doing when I use M584 X0 Y1 Z2:3:4 E10:11 but then M563 P0 D10 still reports "Error: M563: Tool creation: bad drive number" - there must be something else that needs to be done to be able to use driver 10 as an extruder and this is not documented anywhere

                  1 Reply Last reply Reply Quote 0
                  • droftartsundefined
                    droftarts administrators
                    last edited by

                    @catalin59 said in How to configure drivers 10 and 11 on CONN_LCD?:

                    @Phaedrux That's exactly what I am doing when I use M584 X0 Y1 Z2:3:4 E10:11 but then M563 P0 D10 still reports "Error: M563: Tool creation: bad drive number" - there must be something else that needs to be done to be able to use driver 10 as an extruder and this is not documented anywhere

                    From https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M563_Define_or_remove_a_tool

                    D The 'D' field specifies the drive(s) used by the tool ... Drive 0 is the first drive in the machine after the movement drives (usually X, Y and Z).

                    You've defined the stepper driver you're using already with M584, and as you don't have any other extruder drives, it should just be:
                    M563 P0 D0
                    M563 P1 D1

                    Ian

                    Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                    catalin59undefined 1 Reply Last reply Reply Quote 1
                    • catalin59undefined
                      catalin59 @droftarts
                      last edited by

                      @droftarts OK, so drive 10 in M584 is drive 0 in M563, I did not see that one coming, I really appreciate the help. M563 P0 D0 does not issue any errors so it's a step forward, however I still cannot move the extruder motor. I enabled cold extrusion with M302 P1 (I do not have a hotend yet, I am just moving X, Y, Z and E axes for now) but the Retract/Extrude buttons in the Extruder Control panel of Duet Web Control are greyed out and G1 Ennn does nothing.

                      I see the tool in Web Control, I enable it but I cannot move it. There is still something missing to enable the external motor driver on CONN_LCD and it's like finding a needle in a haystack. I had the XYZ movements (CoreXY with three Z motors) working like a charm, it was nothing compared with this extruder thing.

                      deckingmanundefined 1 Reply Last reply Reply Quote 0
                      • nhofundefined
                        nhof
                        last edited by nhof

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • deckingmanundefined
                          deckingman @catalin59
                          last edited by

                          @catalin59 I'm a bit late coming to this thread or I might have been able to help. The extruder drive number thing has bitten my in ar#e twice - the second time I knew about it but it still caught me out. In a nutshell, for M563 the "D" parameter refers to the extruder drive, not the motor drive (but you know that now).

                          Ref the inability to move the extruder, it might just be that you need to make the tool active (even though it has no heater) so try sending a T0 first. Then M302 P1. Then G1 Enn

                          Ian
                          https://somei3deas.wordpress.com/
                          https://www.youtube.com/@deckingman

                          catalin59undefined 1 Reply Last reply Reply Quote 0
                          • catalin59undefined
                            catalin59 @deckingman
                            last edited by

                            @deckingman I am doing both M302 P1 (allow cold extrusion) and T0 already and I can see the tool status change in the Web Interface accordingly. But the two Retract and Extrude buttons are always greyed out and the extruder motor never moves.

                            94619b08-25b9-4169-bccb-f123306ff3d6-image.png

                            droftartsundefined 1 Reply Last reply Reply Quote 0
                            • droftartsundefined
                              droftarts administrators @catalin59
                              last edited by

                              @catalin59 said in How to configure drivers 10 and 11 on CONN_LCD?:

                              @deckingman I am doing both M302 P1 (allow cold extrusion) and T0 already and I can see the tool status change in the Web Interface accordingly. But the two Retract and Extrude buttons are always greyed out and the extruder motor never moves.

                              Can you post your whole config.g?

                              Ian

                              Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                              catalin59undefined 1 Reply Last reply Reply Quote 0
                              • catalin59undefined
                                catalin59 @droftarts
                                last edited by

                                @droftarts This is a work in progress (no endstops, no extruder heaters, no fans yet) but CoreXY, 3-motor axis Z and bed heater are working already:
                                ; Configuration file for Duet WiFi (firmware version 2.03)
                                ; executed by the firmware on start-up
                                ;
                                ; generated by RepRapFirmware Configuration Tool v2.0.4 on Fri Sep 20 2019 21:45:29 GMT-0400 (Eastern Daylight Time)

                                ; General preferences
                                G90 ; send absolute coordinates...
                                M83 ; ...but relative extruder moves
                                M550 P"My Printer" ; set printer name

                                M667 S1 ; select CoreXY mode

                                ; Network
                                M552 S1 ; enable network
                                M586 P0 S1 ; enable HTTP
                                M586 P1 S0 ; disable FTP
                                M586 P2 S0 ; disable Telnet

                                ; Drives
                                M569 P0 S0 ; physical drive 0 goes backwards
                                M569 P1 S0 ; physical drive 1 goes backwards
                                M569 P2 S1 ; physical drive 2 goes forwards
                                M569 P3 S1 ; physical drive 3 goes forwards
                                M569 P4 S1 ; physical drive 4 goes forwards
                                M569 P5 S1 ; physical drive 5 goes forwards
                                M569 P6 S1 ; physical drive 6 goes forwards
                                M569 P7 S1 ; physical drive 7 goes forwards
                                M569 P8 S1 ; physical drive 8 goes forwards
                                M569 P9 S1 ; physical drive 9 goes forwards
                                M584 X0 Y1 Z2:3:4 E10 ; set drive mapping
                                M563 P0 D0 ; set tool 0 to driver 10 (first extruder on CONN_LCD)
                                M350 X16 Y16 Z16 E16:16:16:16:16:16:16 I1 ; configure microstepping with interpolation
                                M92 X80.00 Y80.00 Z800.00 E800.00:800.00:420.00:420.00:420.00:420.00:420.00 ; set steps per mm
                                M566 X900.00 Y900.00 Z12.00 E12.00:12.00:120.00:12.00:12.00:12.00:12.00 ; set maximum instantaneous speed changes (mm/min)
                                M203 X60000.00 Y60000.00 Z1200.00 E1200.00:1200.00:1200.00:1200.00:1200.00:1200.00:1200.00 ; set maximum speeds (mm/min)
                                M201 X500.00 Y500.00 Z250.00 E250.00:250.00:250.00:250.00:250.00:250.00:250.00 ; set accelerations (mm/s^2)
                                M906 X1600 Y1600 Z1600 E1600:1600:1600:1600:1600:1600:1600 I30 ; set motor currents (mA) and motor idle factor in per cent
                                M84 S30 ; Set idle timeout

                                ; Axis Limits
                                M208 X0 Y0 Z0 S1 ; set axis minima
                                M208 X230 Y210 Z200 S0 ; set axis maxima

                                ; Endstops
                                M574 X0 Y0 Z0 S0 ; set active low and disabled endstops

                                ; Z-Probe
                                M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
                                M557 X15:215 Y15:195 S20 ; define mesh grid

                                ; Heaters
                                M140 H0 ; enable heated bed
                                M305 P0 X500 R4700 ; set PT1000 for heater 0
                                M143 H0 S120 ; set temperature limit for heater 0 to 120C

                                ; Fans
                                M106 P0 S0 I0 F500 H-1 ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
                                M106 P1 S1 I0 F500 H1 T45 ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

                                ; Tools
                                M563 P0 D0 H1 F0 ; define tool 0
                                G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
                                G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C

                                ; Custom settings are not defined

                                After startup, on top of this I execute manually:

                                M302 P1
                                M564 S0 H0
                                M563 P0 D0
                                T0

                                I can move on XYZ as expected, I can control the bed heating but I cannot move the extruder motor connected to driver 10 on CONN_LCD. I know that the extruder driver and motor are working because the STEP/DIR/ENABLE interface works when tested separately. The Extrude and Retract buttons on the Web Interface are greyed out.

                                Thanks a lot for the offer to help with this issue. It looks like I am the first one using all 5 onboard drivers for XYZ and the two CONN_LCD extra interfaces for extruders, I have found the documentation on how to connect this but nothing on the required G-Code comands to set this up.

                                infiniteloopundefined 1 Reply Last reply Reply Quote 0
                                • Phaedruxundefined
                                  Phaedrux Moderator
                                  last edited by Phaedrux

                                  M563 P0 D0 H1 F0 ; define tool 0

                                  Your tool definition references a heater that doesn't exist. Perhaps it doesn't like that. Perhaps try adding a dummy heater definition for H1. Even if it doesn't actually exist, it shouldn't matter as long as you're allowing cold extrudes.

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  1 Reply Last reply Reply Quote 0
                                  • infiniteloopundefined
                                    infiniteloop @catalin59
                                    last edited by

                                    @catalin59 These are just some annotations to your config.g, perhaps you will give them a try?

                                    • You define tool0 (M563) a bit too often: first in section "Drives“, then under "Tools“ where the M563 G-code belongs, and on top of that, you execute it manually. As you use different parameters with M563, I really can’t tell you which of them RRF applies. Please stay with the tool definition in the section "Heaters“.

                                    • There, you should remove H1 from M563, as for now, you don’t have specified that heater yet. Also in that section, you should comment-out the line "G10 P0 R0 S0“. - No heater = no temperatures to be set.

                                    • Then, I’m puzzled with your assignments in "Drives“: with M569, you tell the board to control 10 steppers (P0-P9)? Remove the lines who have no physical counterpart. On the other hand, there is no M569 entry for P10 - the drive you assign to the first extruder in M584 … E10. Maybe you should add this.

                                    • To be safe, you should move the Entry M584 … from „Drives“ way up, according to the docu, it should come earlier than some other G-codes in the config.g. I’m not sure whether or not your extruder assignment is counted as a new axis, but it is better to take no risk:

                                    M584 must come earlier in config.g than any M350 and M906 commands. If it creates new axes, it must also be earlier than any M92, M201, M203, M208, M350, M566, M574 , M667 and M669 commands.

                                    catalin59undefined 1 Reply Last reply Reply Quote 1
                                    • droftartsundefined
                                      droftarts administrators
                                      last edited by

                                      @catalin59 I tend to agree with all of @infiniteloop suggestions above! You'll also want an M569 for each of drives 10 and 11, to define which way they turn.

                                      To check that the motors on drivers 10 and 11 actually work, rather than go to the effort of defining heaters and tools, define these two motors as extra axes. Then you'll get simple jog controls in the DWC, rather than having to define the heater etc. Change your M584 to:

                                      M584 X0 Y1 Z2:3:4 U10 V11 E5 ; set drive mapping
                                      

                                      (The E5 is just a temporary mapping)

                                      Add the U and V motor settings to M92, M566, M203, and M201. M350 and M906 are set by the stepper driver, the Duet cannot control these.

                                      Depending on which external stepper driver you are using (what are you using?) you may need to change the length of the pulse that tells the stepper driver to move; see the T parameter of M569.

                                      Finally, you won't be able to move the axes without homing. The easiest way to do this is to give the motors a position. Send G92 U100 V100, then you should be able to jog the axes.

                                      Ian

                                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                      droftartsundefined 1 Reply Last reply Reply Quote 0
                                      • catalin59undefined
                                        catalin59 @infiniteloop
                                        last edited by

                                        @infiniteloop All these are good suggestions. I tried to implement them and also cleaned up config.g which now looks like this:

                                        ; Configuration file for Duet WiFi (firmware version 2.03)
                                        ; executed by the firmware on start-up
                                        ;
                                        ; generated by RepRapFirmware Configuration Tool v2.0.4 on Fri Sep 20 2019 21:45:29 GMT-0400 (Eastern Daylight Time)

                                        ; General preferences
                                        G90 ; send absolute coordinates...
                                        M83 ; ...but relative extruder moves
                                        M550 P"My Printer" ; set printer name

                                        M667 S1 ; select CoreXY mode

                                        ; Network
                                        M552 S1 ; enable network
                                        M586 P0 S1 ; enable HTTP
                                        M586 P1 S0 ; disable FTP
                                        M586 P2 S0 ; disable Telnet

                                        M584 X0 Y1 Z2:3:4 E10 ; set drive mapping

                                        ; Drives
                                        M569 P0 S0 ; physical drive 0 goes backwards
                                        M569 P1 S0 ; physical drive 1 goes backwards
                                        M569 P2 S1 ; physical drive 2 goes forwards
                                        M569 P3 S1 ; physical drive 3 goes forwards
                                        M569 P4 S1 ; physical drive 4 goes forwards
                                        M569 P10 S1 ; physical drive 10 goes forwards
                                        M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
                                        M92 X80.00 Y80.00 Z800.00 E800.00 ; set steps per mm
                                        M566 X900.00 Y900.00 Z12.00 E12.00 ; set maximum instantaneous speed changes (mm/min)
                                        M203 X60000.00 Y60000.00 Z1200.00 E1200.00 ; set maximum speeds (mm/min)
                                        M201 X500.00 Y500.00 Z250.00 E250.00 ; set accelerations (mm/s^2)
                                        M906 X1600 Y1600 Z1600 E1600 I30 ; set motor currents (mA) and motor idle factor in per cent
                                        M84 S30 ; Set idle timeout

                                        ; Axis Limits
                                        M208 X0 Y0 Z0 S1 ; set axis minima
                                        M208 X230 Y210 Z200 S0 ; set axis maxima

                                        ; Endstops
                                        M574 X0 Y0 Z0 S0 ; set active low and disabled endstops

                                        ; Z-Probe
                                        M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
                                        M557 X15:215 Y15:195 S20 ; define mesh grid

                                        ; Heaters
                                        M140 H0 ; enable heated bed
                                        M305 P0 X500 R4700 ; set PT1000 for heater 0
                                        M143 H0 S120 ; set temperature limit for heater 0 to 120C

                                        ; Fans
                                        M106 P0 S0 I0 F500 H-1 ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
                                        M106 P1 S1 I0 F500 H1 T45 ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

                                        ; Tools
                                        ;M563 P0 D0 H1 F0 ; define tool 0
                                        M563 P0 D0 ; define tool 0
                                        G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
                                        ;G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C

                                        ; Custom settings are not defined

                                        I execute manually T0 and M302 P1 but nothing has changed, the Extrude/Retract are still greyed out and G1 Ennn does nothing.

                                        infiniteloopundefined 1 Reply Last reply Reply Quote 0
                                        • infiniteloopundefined
                                          infiniteloop @catalin59
                                          last edited by

                                          @catalin59 Well, when moving M584 upwards, you overlooked one command it should precede - hint: M667 in the “General“ section. After that, you should follow @droftarts’ advice… Forget Extrude/Retract in DWC for a moment, the primary objective is not to paint it black (hm, why does this remind me of one of my favourite tunes?), but to convince the stepper to do what he’s built for. With @droftarts’ proposal, it’s easy to test the drive mappings - first things first.

                                          1 Reply Last reply Reply Quote 0
                                          • catalin59undefined
                                            catalin59
                                            last edited by

                                            I moved M584 before M667 and changed it to M584 X0 Y1 Z2:3:4 U10 V11 E5. I see now two more axes U and V in the web interface. Movement commands on X, Y and Z work as expected. Movement comands on U are ignored and it takes a couple of seconds for something to time out before the next move command is processed. For example, if I move U and immediately X, nothing happens for about 3 seconds then the X move gets executed.

                                            I have tested the STEP/DIR driver interface by manually creating STEP pulses with an external 3V/2mA source and the extruder motor does move so I am pretty sure this is not some connectivity problem but still a G-Code issue. Drivers 10 and 11 on CONN_LCD are special and something different must be done compared with the 5 onboard ones.

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