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

    migrate config.g

    Scheduled Pinned Locked Moved
    General Discussion
    6
    31
    1.5k
    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.
    • Tinchusundefined
      Tinchus @A Former User
      last edited by

      @bearer
      ; Configuration file for Duet 3 (firmware version 3) ORIGINAL
      ; executed by the firmware on start-up
      ;

      ; General preferences
      G90 ; send absolute coordinates...
      M83 ; ...but relative extruder moves
      ; M550 P"Printer" ; set printer name
      M669 K1 ; select CoreXY mode

      ; Network
      ; M552 S0 disable network

      ; Drives
      M569 P0.0 S0 D2 ; physical drive 0.0 goes forwards X Se invirtieron los cables tambien. Se agrego D3 para stealhtchop3
      M569 P0.1 S1 D2 ; physical drive 0.1 goes forwards Y Ultimo cambio: de S0 a S1. Se agrego D3 para stealhtchop3
      M569 P0.2 S1 D2 ; physical drive 0.2 goes forwards
      M569 P0.3 S1 D2 ; physical drive 0.3 goes reverse
      M569 P0.4 S0 D2 ; physical drive 0.4 goes forwards
      M569 P0.5 S1 D2 ; physical drive 0.5 goes backwards

      M584 X0.0 Y0.1 Z0.2:0.3 E0.4:0.5 ; set drive mapping
      M350 X16 Y16 Z32 E16:16 I1 ; configure microstepping with interpolation
      ; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
      M92 X80.16 Y80.16 Z3200.00 E428.25:428.25 ; set steps per mm
      M566 X900.00 Y900.00 Z300.00 E450:450 ; set maximum instantaneous speed changes (mm/min)
      M203 X18000.00 Y18000.00 Z240.00:240.00 E2400.00 ; set maximum speeds (mm/min)
      M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)
      M906 X1500 Y1500 Z900:900 E1000:1000 I30 ; set motor currents (mA) and motor idle factor in per cent
      M84 S300 ; Set idle timeout

      ; Axis Limits
      M208 X0 Y0 Z0 S1 ; set axis minima
      M208 X400 Y350 Z400 S0 ; set axis maxima

      ; Endstops
      M574 X1 S3 ; configure sensorless endstop for low end on X
      M574 Y1 S3 ; configure sensorless endstop for low end on Y
      M574 Z2 S2 ; configure Z-probe endstop for low end on Z

      ; Z-Probe
      M558 P5 C"^!io3.in" H5 F120 T18000 ; set Z probe type to switch and the dive height + speeds
      G31 P500 X0 Y28.5 Z0.245 ; set Z probe trigger value, offset and trigger height
      ; M557 X25:310 Y27:312 S57:57 define mesh grid for beta 3
      M557 X50:340 Y29:329 S82:30 ; define mesh beta4

      ; Heaters
      M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
      M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
      ;M307 H0 B0 D30 S1.00 ; enable PID para camara, deadtime en 30 segundos
      M307 H0 B1 S1.00 ; enable bang-bang mode for the chamber heater and set PWM limit
      ;M140 H0 ; map heated bed to heater 0
      M141 H0 ; map chamber to heater 0
      M143 H0 S130 ; set temperature limit for heater 0 to 130C
      M308 S1 P"temp1" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 1 as thermistor on pin temp1
      M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
      M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
      M308 S2 P"temp2" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 2 as thermistor on pin temp2
      M950 H2 C"out2" T2 ; create nozzle heater output on out2 and map it to sensor 2
      M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit

      ; Fans
      ;M950 F0 C"out3" Q500 ; create fan 0 on pin out3 and set its frequency
      ;M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
      ;M950 F1 C"out4" Q500 ; create fan 1 on pin out4 and set its frequency
      ;M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on

      ; Tools

      M563 P0 D0 H1 ; 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
      M563 P1 D1 H2 ; define tool 1
      G10 P1 X-61 Y0 Z-2.05 ; set tool 1 axis offsets
      G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C

      ; Custom settings are not defined
      M915 X Y S1 R0 F0 ; sensroless sensitivity 1 for beta 4 and 2 beta3

      ; movments without homing
      M564 H0

      ; Miscellaneous
      M207 S6 R0.2 F1800 ;firmware retraction
      M83 ; relative extrusion
      M950 S0 C"0.out9" ; servo "0" in pin out9
      M280 P0 S92 ; move servo to rest position
      M376 H30 ; cancell mesh levelling at 30 mm
      M143 S450 ; set max temp to 450 degrees for T0
      M143 H2 S450 ; set max temp to 450 for T1
      M950 J0 C"^io8.in" ; Definition of emervengy stop pin
      M581 P0 R0 T0 ; Assigment of the emergency stop
      M950 P5 C"out3" ; assign gpio port 5 to out3 for buzzer. control win M42 P5 SX range 0 to 1
      M501 ; load saved parameters from non-volatile memory
      ;T0 ; select first tool

      I had to comment that last T0 line, it was complaining about not being able to select tool...

      1 Reply Last reply Reply Quote 0
      • Vetiundefined
        Veti
        last edited by

        @Tinchus said in migrate config.g:

        M350 X16 Y16 Z32 E16:16 I1 ; configure microstepping with interpolation
        ; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
        M92 X80.16 Y80.16 Z3200.00 E428.25:428.25 ; set steps per mm

        there is no point going for x32 interpolation on the z axis
        x16 is more than fine.

        even without interpolation you are at 0.01mm per step

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

          @Tinchus said in migrate config.g:

          The only M307 commands I have in my config.g is:

          Do you also have a config-override.g present with M307 commands in it?

          @Tinchus said in migrate config.g:

          M501 ; load saved parameters from non-volatile memory

          You can an M501 command at the end of config.g, which loads config-override.g, perhaps it's from an older version though?

          Are you able to edit the config.g now? or are you still having problems with that?

          Can you tell us what point you're currently at?

          Z-Bot CoreXY Build | Thingiverse Profile

          Tinchusundefined 1 Reply Last reply Reply Quote 0
          • Tinchusundefined
            Tinchus @Phaedrux
            last edited by Tinchus

            @Phaedrux yes, I found these lines in config-override:

            M307 H0 A26.3 C284.7 D3.5 S1.00 V23.9 B0
            M307 H1 A657.9 C255.6 D5.8 S0.95 V23.9 B0
            M307 H2 A340.0 C140.0 D5.5 S1.00 V0.0 B0

            I guess they were created after automatic tunning of heaters
            Im able to edit config.g directly from the duet web control.
            My actual state is kind of bad. Im getting many different errors, it is a mess actually. Im updating all software from scratch to be sure there is nothing corrupt.
            My question is: my config.g file was working ok with duet3+octoprint. I was printing with on problems.
            The config.g file I trying to use with duet web control is the same file, I uploaded it from the interface, why Im having these problems?

            This is what I did:
            .- my duet came with an SD card, that is the one Im using.
            .- I updated the firmware to 3.1.1 using the windows USB connection method
            .- I connected the ribbon cable.
            .- Then I ran the sudo aptget update instructions I found in duet website tutorial, no errors reported.
            Is this OK? do I need to update DWC too?

            For example, my Z motors are not moving at all with the DWC, there was no problem with them using the same config.g and octoprint
            Ideas?

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

              Can you please send M122 in the gcode console and post the results?

              I suggest getting a fresh image of DuetPi from here and reflashing your Pi SD card.

              https://duet3d.dozuki.com/Wiki/Getting_Started_With_Duet_3#Section_DuetPi

              Then doing a sudo apt update sudo apt upgrade

              Z-Bot CoreXY Build | Thingiverse Profile

              Tinchusundefined 1 Reply Last reply Reply Quote 0
              • Tinchusundefined
                Tinchus @Phaedrux
                last edited by

                @Phaedrux Im super confused. I downloaded the new raspi image, I did the upgrades (they are launched in the we interface at the first boot, nice!)
                After reboot I uploaded my config files.
                1.- problem: I noticed there is no ssh connection available
                2.- I tried to do a homeing: HOME ALL

                I get this error:
                Error: G0/G1: insufficient axes homed

                My homeall.g was working ok before:

                ; homeall.g
                ; called to home all axes
                ;
                M280 P0 S92
                T0 P0

                ; Calibration of motor currents etc
                G91
                G1 H2 Z0.02 F500
                G4 P150
                G1 H2 X0.02 F2000
                G4 P150
                G1 H2 Y0.02 F2000
                G4 P150

                M400
                M913 X60 Y60 ; drop motor current to 60%
                M400

                ; HOME X/Y
                G1 H1 Y-400 X-400 F10000 ;
                G1 Y175 X175 F5000 ;
                M400
                G1 H1 Y-400 F10000
                G1 Y175

                G1 H1 X-400 F10000
                G1 X175
                M400

                G90 ; absolute positioning
                M400
                M913 X100 Y100 ; drop motor current to 100%
                M400

                ; Z HOMING
                ; G1 X175 Y175 F5000 go to first bed probe point and home Z for beta3
                G1 X135 Y100 F5000 ; for beta4
                G30

                Home X and Y reports the same error. The files were also working ok.

                the files:

                ; homex.g
                ; called to home the X axis
                ;

                M280 P0 S92
                T0 P0

                ; Calibration of motor currents etc

                G91
                G1 H2 Z0.02 F500
                G4 P150
                G1 H2 X0.02 F2000
                G4 P150
                G1 H2 Y0.02 F2000
                G4 P150
                G1 X50 F5000
                M400
                M913 X60 Y60
                G1 H1 X-400 F10000
                G90
                M913 X100 Y100
                G1 X175 F4000
                M400

                M280 P0 S92
                T0 P0

                G91
                G1 H2 Z0.02 F500
                G4 P150
                G1 H2 X0.02 F2000
                G4 P150
                G1 H2 Y0.02 F2000
                G4 P150
                M400
                G1 Y50 F5000
                M400
                M913 X60 Y60
                G1 H1 Y-400 F10000
                G90
                M913 X100 Y100
                G1 Y175 F4000
                M400

                The M122 reports this:

                === Diagnostics ===
                RepRapFirmware for Duet 3 MB6HC version 3.1.1 running on Duet 3 MB6HC v1.01 or later (SBC mode)
                Board ID: 08DJM-956L2-G43S4-6JTD2-3SJ6J-1A6GG
                Used output buffers: 1 of 40 (10 max)
                === RTOS ===
                Static ram: 154604
                Dynamic ram: 162568 of which 68 recycled
                Exception stack ram used: 412
                Never used ram: 75564
                Tasks: NETWORK(ready,1972) HEAT(blocked,1188) CanReceiv(suspended,3820) CanSender(suspended,1460) CanClock(blocked,1436) TMC(blocked,204) MAIN(running,4952) IDLE(ready,76)
                Owned mutexes:
                === Platform ===
                Last reset 00:07:48 ago, cause: power up
                Last software reset at 2020-11-20 19:38, reason: User, spinning module LinuxInterface, available RAM 75160 bytes (slot 2)
                Software reset code 0x0010 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0444a000 BFAR 0x00000000 SP 0xffffffff Task MAIN
                Error status: 0
                MCU temperature: min 34.3, current 39.6, max 39.7
                Supply voltage: min 23.9, current 23.9, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes
                12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0
                Driver 0: standstill, reads 10286, writes 22 timeouts 0, SG min/max 0/92
                Driver 1: standstill, reads 10287, writes 22 timeouts 0, SG min/max 0/90
                Driver 2: standstill, reads 10289, writes 20 timeouts 0, SG min/max 0/1023
                Driver 3: standstill, reads 10290, writes 20 timeouts 0, SG min/max 0/1023
                Driver 4: standstill, reads 10295, writes 15 timeouts 0, SG min/max 0/0
                Driver 5: standstill, reads 10296, writes 15 timeouts 0, SG min/max 0/0
                Date/time: 2020-11-21 00:31:26
                Slowest loop: 4.03ms; fastest: 0.14ms
                === Storage ===
                Free file entries: 10
                SD card 0 not detected, interface speed: 37.5MBytes/sec
                SD card longest read time 0.0ms, write time 0.0ms, max retries 0
                === Move ===
                Hiccups: 0(0), FreeDm: 375, MinFreeDm: 374, MaxWait: 98508ms
                Bed compensation in use: none, comp offset 0.000
                === MainDDARing ===
                Scheduled moves: 13, completed moves: 13, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 CDDA state: -1
                === AuxDDARing ===
                Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 CDDA state: -1
                === Heat ===
                Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 0 -1 -1 -1
                Heater 1 is on, I-accum = 0.0
                === GCodes ===
                Segments left: 0
                Movement lock held by null
                HTTP* is ready with "M122" 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
                SBC is idle in state(s) 0
                Daemon* is idle in state(s) 0
                Aux2 is idle in state(s) 0
                Autopause is idle in state(s) 0
                Code queue is empty.
                === Network ===
                Slowest loop: 0.82ms; fastest: 0.01ms
                Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
                HTTP sessions: 0 of 8

                • Ethernet -
                  State: disabled
                  Error counts: 0 0 0 0 0
                  Socket states: 0 0 0 0 0 0 0 0
                  === CAN ===
                  Messages sent 1785, longest wait 0ms for type 0
                  === Linux interface ===
                  State: 0, failed transfers: 0
                  Last transfer: 17ms ago
                  RX/TX seq numbers: 14410/14411
                  SPI underruns 0, overruns 0
                  Number of disconnects: 0
                  Buffer RX/TX: 0/0-0
                  === Duet Control Server ===
                  Duet Control Server v3.1.1
                  Code buffer space: 4096
                  Configured SPI speed: 8000000 Hz
                  Full transfers per second: 25.35

                Thanks in advance

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

                  When connected to the DWC, the system tab on the left side is used to show you your config and homing files. Is that where you are editing your files?

                  Your homing files isn't quite right for corexy.

                  ; HOME X/Y
                  G1 H1 Y-400 X-400 F10000 ;
                  G1 Y175 X175 F5000 ;

                  This section will home both x and y but will stop both axis when either one hits. So the second move at least one of the axis will not yet be homed.

                  Use something like this instead for corexy

                  https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCoreXYPrinter#Section_homeall_g_file

                  G91 ; relative mode
                  G1 H1 X-240 Y-240 F3000 ; coarse home X or Y
                  G1 H1 X-240 ; coarse home X
                  G1 H1 Y-240 ; coarse home Y
                  G1 X4 Y4 F600 ; move away from the endstops
                  G1 H1 X-10 ; fine home X
                  G1 H1 Y-10 ; fine home Y
                  ''' Z homing section follows'''
                  

                  Z-Bot CoreXY Build | Thingiverse Profile

                  Tinchusundefined 1 Reply Last reply Reply Quote 0
                  • Tinchusundefined
                    Tinchus @Phaedrux
                    last edited by Tinchus

                    @Phaedrux
                    I did foloowed those instructions:
                    "On a CoreXY printer, the whole move will be terminated when the first homing switch is triggered. Therefore, to do simultaneous XY homing, your homeall.g file needs to first home X and Y together, then home them separately. " My homeall.g is the same, I just changed the number:

                    ; HOME X/Y
                    G1 H1 Y-400 X-400 F10000 ; Home at the same time as the instructions says
                    G1 Y175 X175 F5000 ; Dont remember why but I added this just to move the carriage to the "center"
                    M400; this is not necessary I guess
                    G1 H1 Y-400 F10000 ; and from here it is as instructed
                    G1 Y175
                    G1 H1 X-400 F10000
                    G1 X175
                    M400

                    But this is not the problem, question and problems remains: this config works OK when I use it on the duet as stand alone or with octiprint. What Im doing wrong that nothing is working ok with the DWC? All my tool change routines also don't work at all. The servo is not being activated, or it actives and moves to a position and immediately returns to the old position all by itself while the printer is doing nothing.A faulty board can be the reason for this? (I guess no, because as I said, in stand alone or with octoprint it is working ok)
                    Z motors don't work for example. I tried switching back to the duet+octoprint just to discard hardware issues, and the Z motors work ok

                    More info: if I do a manual tool change, To > T1 the head should move to a position, activate servo to position 47 (lowers the tool).
                    When I try to do that, the servo moves, then by itself goes back to original position and then the board resets. These are the messages I see in console when that happens:

                    11/21/2020, 7:46:08 AM Warning: Controller has been reset
                    11/21/2020, 7:46:08 AM Connection to Duet established
                    11/21/2020, 7:46:08 AM Warning: Lost connection to Duet (Board is not available (no header))

                    Phaedruxundefined 1 Reply Last reply Reply Quote 0
                    • Tinchusundefined
                      Tinchus
                      last edited by

                      I found many solutions to my problems, I post my findings, it might be useful for somebody:

                      .- The ribbon cable used for the SPI connection, it handles high frequency signals, and it is a source os strong "noise". My servo motor is passing just on top of the ribbon cable, and the noise was getting into this cable and making my servo to have this "ghost" movements. I shielded the cable and the problem is gone. This was not happening with the USB connection so the source of the noise comes from the ribbon cable. I will test and watched more closely this flat cable, probably I will shield it too just in caso in order to not get noise in other cables.

                      .- The Z motors not working: the same exact config I was using with DUET3 connected by USB to raspberry is not working with duet3 connected through SPI to raspberry and using DWC. I guess the problem is with DWC, because I changed my original config to this:
                      350 X16 Y16 Z16 E16:16 I1 ; configure microstepping with interpolation. Changed Z to 16 from 32
                      ; M92 X160.32 Y160.32 Z3200 E827.22 set steps per mm
                      M92 X80.16 Y80.16 Z1600 E428.25:428.25 ; set steps per mm changed Z from 3200 to 1600
                      M566 X900.00 Y900.00 Z300.00 E450:450 ; set maximum instantaneous speed changes (mm/min)
                      M203 X18000.00 Y18000.00 Z340.00 E2400.00 ; set maximum speeds (mm/min)
                      M201 X1000.00 Y1000.00 Z20 E500.00 ; set accelerations (mm/s^2)
                      M906 X1500 Y1500 Z900 E1000:1000 I30

                      Notice that I removed the Z configuration. Correct or not, the original configuration was working, on the same duet board, so the problem must bu DWC?

                      I hope it helps somebody. I will keep solving issues

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

                        @Tinchus said in migrate config.g:

                        ; HOME X/Y
                        G1 H1 Y-400 X-400 F10000 ; Home at the same time as the instructions says
                        G1 Y175 X175 F5000 ; Dont remember why but I added this just to move the carriage to the "center"

                        The first move will only ever home one of the axis, therefore, the following move will provoke the error message because at least one of those axis are not yet homed.

                        That's why in the example the following two moves home the axis individually again to ensure that whichever one was missed gets homed.

                        It really sounds like the config you're looking at isn't the same as what the duet is executing.

                        How are you viewing and editing these files? When you make a change does it actually take effect?

                        Z-Bot CoreXY Build | Thingiverse Profile

                        Tinchusundefined 1 Reply Last reply Reply Quote 0
                        • Tinchusundefined
                          Tinchus @Phaedrux
                          last edited by

                          @Phaedrux Just to be sure Im ONLY using the duet web interface for editing. And believe it or not... the conf I posted above is working now perfectly.
                          I have one not related question: I'm trying to create my own combination of colors for the interface (since I have some color distinctions problems jajaja.... where do I find the CSS file, the ones located at boot/www seems not to be the ones being used

                          A Former User? 1 Reply Last reply Reply Quote 0
                          • A Former User?
                            A Former User @Tinchus
                            last edited by

                            @Tinchus said in migrate config.g:

                            boot/www

                            /opt/dsf/sd/www but they should be minimized and less than usefull?

                            https://github.com/Duet3D/DuetWebControl might be more apropriate

                            Tinchusundefined 1 Reply Last reply Reply Quote 1
                            • Tinchusundefined
                              Tinchus @A Former User
                              last edited by

                              @bearer You I should rebuild the DWC from scratch? Im a little afraid of doing that after having to do such a work to have my config running.
                              The sd card that came with the board seems to have a 3.2 version of the DWC because I can see that have plugins wich in theory are not suppose to be in 3.1.1 version. After I did a sudo apt updete/upgrade, the DWC seems to be downgraded, but plugins were still working, but everything was very unstable (for example after doing a homing the status remained in "busy" for ever": Installing a fresh duetpi image and doing the upgrade seems to work much better)
                              So in your opinion I can upgrade manually the DWC ? I can see wich version ti is the one available in that github

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

                                What version of DWC does it report in the interface itself?

                                Z-Bot CoreXY Build | Thingiverse Profile

                                Tinchusundefined 1 Reply Last reply Reply Quote 0
                                • Tinchusundefined
                                  Tinchus @Phaedrux
                                  last edited by

                                  @Phaedrux Duet Web Control 3.1.1

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

                                    For the time being stick with 3.1.1. The next release 3.2 is around the corner and should improve the Pi experience.

                                    There is a dark theme in DWC. I'm kind of hoping for a return of multiple themes in future updates.

                                    Z-Bot CoreXY Build | Thingiverse Profile

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