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
      last edited by

      Hello. I stated using duet3 conected to raspberry pi and using octoprint. Following recommendations from the forum, I decided to move into using the duet raspi and the duet control app.
      My problem is: how can I copy the config.g and the other config files I already created into the new duet raspi config? If I see inspect the sd card in windows, I can only see a boot folder with the sys and the other folders inside, I tried to put there my config files but when I turn on the system, connection to the duet3 is done ok, but no heaters, motion, anything works, like if there is no configuration at all.
      It looks like the config.g file I did is not being read.
      How can I migrate my old config.g file into the new setup?
      Thanks in advance

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

        You can't view the raspberry pi file system on the SD card from windows.

        The best way to get your config into the Duet + SBC is to download your config files and then access the Duet web control and upload your config files from there.

        Does that make sense?

        Z-Bot CoreXY Build | Thingiverse Profile

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

          You can get 3rd party tools to mount the ext4 filesystem under windows, but scp/sftp is probably easier if you have network access to the pi.

          (and if you have network access then the web interface as suggested is even easier)

          like if there is no configuration at all.

          run M98 P"config.g" from the usb console to verify if there is a problem with the config? Could be some of the old network specific config that isn't supported on the SBC is causing config to not be parsed?

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

            hm, I just looked at the latest image and the files in /boot/sys/ aren't the same as in /opt/dsf/sd/sys?

            not sure whats what; getting the network running and using duet web control is probably the safest bet.

            dhusoloundefined 1 Reply Last reply Reply Quote 0
            • dhusoloundefined
              dhusolo @A Former User
              last edited by

              @bearer I can confirm this. When I re-imaged my Pi I copied my config files and macros to /boot/sys/ but I still had to either upload through DWC or use VNC to copy them to the pi

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

                I don't know if the intention has been to have a firstboot like script to copy the files from /boot to /opt/dsf/sd or if the intention was to symlink from /opt/dsf/sd/sys to /boot/sys etc or what but seems it still needs some work whatever the intention.

                edit seems there is a config option to choose the sd directory and its still "BaseDirectory": "/opt/dsf/sd" on the 2020-08-22-DuetPi-lite.img image.

                incidentally if anyone wanna poke the image from windows before writing it to a card or something, qemu is your friend.
                mini how-to: installer, kernel, dtb file, launch script and this link to enable ansi colours in cmd.exe

                oliofundefined 1 Reply Last reply Reply Quote 1
                • oliofundefined
                  oliof @A Former User
                  last edited by

                  @bearer Windows10 with WSL2 is also an option: https://devblogs.microsoft.com/commandline/access-linux-filesystems-in-windows-and-wsl-2/

                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

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

                    @oliof said in migrate config.g:

                    @bearer Windows10 with WSL2 is also an option: https://devblogs.microsoft.com/commandline/access-linux-filesystems-in-windows-and-wsl-2/

                    haven't tried, but hear good things. i used quemu because i wanted run the image to look for symlinks or overlays etc at runtime.

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

                      (hm, come to think of it, qemu is a good way to put ssh keys into image for headless and passwordless installs, mess with static ip setting and so on)

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

                        @Phaedrux makes sense but it is not working. go to "SYSTEM" and there I can see the config files. I uploaded my files using the UPLOAD SYSTEM FILES button, and after that did a reboot as requested. ANd the duet still is booting from some config file that is not the one being shown in the DUET CONTROL PANEL

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

                          sounds unlikely, what is the output if you run the gcode M98 P"config.g" ?

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

                            @bearer it reports some errors:

                            ![0_1605874708756_18f4831c-e02f-4985-bcd1-f63603745d58-image.png](Uploading 100%)

                            Im trying to SSH to the raspi, but default user pi, passed raspberry is not working, has it been changed?

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

                              Please try uploading picture again, or better, copy/paste the text.

                              As for ssh, no, its still the default pi / raspberry for the images i have tried at least.

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

                                @bearer I uloaded the config.g file using the interface. Something is going wrong there because Im receiving errors. I fixed most of them, but for example Im getting:
                                M307: error bad model parameters

                                But this is the same config I was using and printing with with my previous duet3/octoprint.
                                What is the meaning of this error?
                                The only M307 commands I have in my config.g is:
                                M307 H0 B1 S1.00 ; enable bang-bang mode for the chamber heater and set PWM limit
                                M307 H1 B0 S1.00 ; disable bang-bang mode for heater 1 and set PWM limit
                                M307 H2 B0 S1.00 ; disable bang-bang mode for heater 2 and set PWM limit

                                And all heaters were working ok.

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

                                  Hard to say without seeing the config file tbh.

                                  But if you can fix the errors you're clearly editing the correct file no?

                                  Tinchusundefined 1 Reply Last reply Reply Quote 0
                                  • 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
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA