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

    M500 Always Fails

    Scheduled Pinned Locked Moved Solved
    Duet Web Control
    6
    27
    1.6k
    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.
    • GoremanXundefined
      GoremanX
      last edited by GoremanX

      I'm trying to do initial setup and calibration on my home-built Delta. Every time I try to issue an M500 command, I get this error message:

      M500
      Error: Operation failed (Reason: NullReferenceException in SimpleCode: Object reference not set to an instance of an object.)

      This is on a Duet 3 6HC with RPi4 and the latest stable updates. Everything else is working fine, and I can modify files manually to add the parameters, but M500 would save a whole ton of time through this tedious process. Searching Google yielded no results. I get the same error message whether I try to do it directly on the RPi4 (through the attached RPi display) or remotely from a web interface over the network.

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

        It would help to know what firmware version. If you're running from the pi running sudo apt update and sudo apt upgrade would be in order. Please send M122 and post the results to verify firmware version and some other info.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • GoremanXundefined
          GoremanX
          last edited by

          I did that. That's what I meant when I said "the latest s6able updates".

          M122
          === 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-G43S8-6J9D2-3SJ6P-1A0LG
          Used output buffers: 1 of 40 (13 max)
          === RTOS ===
          Static ram: 154604
          Dynamic ram: 162536 of which 44 recycled
          Exception stack ram used: 224
          Never used ram: 75808
          Tasks: NETWORK(ready,1972) HEAT(blocked,1188) CanReceiv(suspended,3820) CanSender(suspended,1488) CanClock(blocked,1436) TMC(blocked,204) MAIN(running,4552) IDLE(ready,76)
          Owned mutexes:
          === Platform ===
          Last reset 00:04:48 ago, cause: power up
          Last software reset at 2020-10-10 20:23, reason: User, spinning module LinuxInterface, available RAM 75696 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 30.6, current 32.7, max 32.8
          Supply voltage: min 26.9, current 27.0, max 27.1, under voltage events: 0, over voltage events: 0, power good: yes
          12V rail voltage: min 12.0, current 12.0, max 12.1, under voltage events: 0
          Driver 0: standstill, reads 60081, writes 0 timeouts 0, SG min/max not available
          Driver 1: standstill, reads 60081, writes 0 timeouts 0, SG min/max not available
          Driver 2: standstill, reads 60081, writes 0 timeouts 0, SG min/max not available
          Driver 3: standstill, reads 60081, writes 0 timeouts 0, SG min/max not available
          Driver 4: standstill, reads 60081, writes 0 timeouts 0, SG min/max not available
          Driver 5: standstill, reads 60081, writes 0 timeouts 0, SG min/max not available
          Date/time: 2020-10-10 22:04:47
          Slowest loop: 3.94ms; fastest: 0.21ms
          === 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: 375, MaxWait: 0ms
          Bed compensation in use: none, comp offset 0.000
          === MainDDARing ===
          Scheduled moves: 0, completed moves: 0, 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 = 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 3 -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.47ms; 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 901, longest wait 0ms for type 0
          === Linux interface ===
          State: 0, failed transfers: 0
          Last transfer: 17ms ago
          RX/TX seq numbers: 8255/8256
          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: 31.83
          
          1 Reply Last reply Reply Quote 0
          • GoremanXundefined
            GoremanX
            last edited by

            No help with this? It's still plaguing me.

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

              Waiting for @chrishamm to take a look.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • Thaliosundefined
                Thalios
                last edited by Thalios

                2 things i see from the m122.

                I could be totally wrong as I don't have a RPI4 to test. I run mine in standalone.

                First, in the initial line, it says SBC mode. Should it not show the other mode? RPI mode?)

                Second, it says SD Card 0 not detected. Isn't M500 trying to write configoverride.g on the SD card? (again, could be wrong in the RPI mode)

                Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
                Heavily modified Ender 3 Pro (Duet 3 6HC)
                Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
                CR-10S Pro V2 (Duet 3 Mini 5+)
                and a bunch of SLA printers..

                1 Reply Last reply Reply Quote 0
                • Thaliosundefined
                  Thalios
                  last edited by Thalios

                  nevermind, I just read some more and SBC (I thought SBC standed for single board computer aka standalone mode, I was wrong) is the RPi mode and the SD card isn't supposed to be in for the RPi mode.

                  Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
                  Heavily modified Ender 3 Pro (Duet 3 6HC)
                  Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
                  CR-10S Pro V2 (Duet 3 Mini 5+)
                  and a bunch of SLA printers..

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

                    I tried re-imaging the micro SD card with a downloaded image of the OS (rather than the one that came pre-loaded on the card). The OS from the downloaded image looks very different. It uses a different desktop environment, and it presents me with a setup wizard on first boot for configuring location, networking, password and initial updates. The pre-loaded image never did that.

                    However I still can't run M500 without getting the error message listed above. I'm not sure what I'm doing wrong.

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

                      Yes the latest image is based of an updated version of the recent pi image, so it's a bit more polished.

                      Did you do a sudo apt update sudo apt upgrade after?

                      Can you try capturing some extended debug information?

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

                      Z-Bot CoreXY Build | Thingiverse Profile

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

                        @Thalios said in M500 Always Fails:

                        I thought SBC standed for single board computer

                        that bit is correct, but its the Pi and not the Duet that is an SBC.

                        (I suppose you could argue PanelDue is a graphics port and the Duet is a single board computer, but its commonly used for more general purpose computers like the Raspberry Pi, with the Duet being a specialized embedded computer

                        1 Reply Last reply Reply Quote 0
                        • GoremanXundefined
                          GoremanX @Phaedrux
                          last edited by

                          @Phaedrux Yes, I made sure all packages were up to date and I rebooted. Here's a log output when I try to run M500:

                          Oct 16 18:05:08 duet3 DuetControlServer[1464]: [error] Code M500 has thrown an exception
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    System.NullReferenceException: Object reference not set to an instance of an object.
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Files.ConfigOverride.WriteModelParameters(StreamWriter writer) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/ConfigOverride.cs:line 77
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Files.ConfigOverride.Save(Code code) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/ConfigOverride.cs:line 34
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Codes.MCodes.Process(Code code) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Codes/MCodes.cs:line 652
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.ProcessInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 479
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 400
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 336
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]: [error] IPC#46: Failed to execute SimpleCode
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    System.NullReferenceException: Object reference not set to an instance of an object.
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Files.ConfigOverride.WriteModelParameters(StreamWriter writer) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/ConfigOverride.cs:line 77
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Files.ConfigOverride.Save(Code code) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/ConfigOverride.cs:line 34
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Codes.MCodes.Process(Code code) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Codes/MCodes.cs:line 652
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.ProcessInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 479
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 400
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 336
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 383
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.Code.<Execute>b__27_0(Task`1 task) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 277
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.Commands.SimpleCode.Execute() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/SimpleCode.cs:line 136
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetAPI.Commands.Command`1.Invoke() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetAPI/Commands/BaseCommand.cs:line 67
                          Oct 16 18:05:08 duet3 DuetControlServer[1464]:    at DuetControlServer.IPC.Processors.Command.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/IPC/Processors/Command.cs:line 63
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • GoremanXundefined
                            GoremanX
                            last edited by

                            Is there some other kind of official support medium than this forum? Because I spent a lot of money on these control boards and I really don't think I'm trying to do anything fancy or outside of reasonable use. It's literally been over a week now.

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

                              @GoremanX said in M500 Always Fails:

                              Is there some other kind of official support medium than this forum?

                              This is "it", the developers do frequent the forum, but what you seem to be after seems to be "officially" not supported

                              https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_M500

                              GoremanXundefined 1 Reply Last reply Reply Quote 0
                              • GoremanXundefined
                                GoremanX @A Former User
                                last edited by

                                @bearer Thank you!

                                That would've been nice to know right off the bat. Especially since none of the guides take it into account. Seems like I could've saved a whole lot of head-banging if that had been cleared up immediately.

                                Phaedruxundefined 1 Reply Last reply Reply Quote 0
                                • GoremanXundefined
                                  GoremanX
                                  last edited by

                                  Also, that's a super bizarre omission that makes no sense at all. I hope it gets rectified soon. Having only M500 and M501 not work in SBC mode is seriously odd

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

                                    It boils down to differences in the virtual sd card used on the pi which isn't fully compatible with the code that uses the real sd card when in stand alone mode.

                                    I think it was scheduled for 3.2 but haven't kept up with stuff lately (also, its possible the Wiki is out of date, but it doesn't work odds are its still at thing)

                                    Edit: Calling it an omission isn't quite fair, is clearly been on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying โ€˜Beware of the Leopard.โ€

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

                                      Do you need any of the features the Pi offers? Might be better to switch to stand alone mode where M500 is supported while they implement the filesystem support for the SBC mode? The Pi/SBC doesn't really offer much at the present?

                                      GoremanXundefined 1 Reply Last reply Reply Quote 0
                                      • GoremanXundefined
                                        GoremanX @A Former User
                                        last edited by

                                        @bearer The main thing it gives me right now is the ability to have the Pi 4 outside of the electronics enclosure, which gives me functional wifi without requiring any additional adapters (the base of my delta printer is all aluminum). I also have it hooked up to a Pi touchscreen, which gives me a much more complete interface at the printer itself, rather than the limited interface of a PanelDue. Plus I have a Bluetooth keyboard and touchpad paired, which has been convenient. And having the Pi 4 right there makes it super simple to have a camera hooked up for monitoring progress and/or capturing time lapses. Honestly, I'm loving the SBC thing compared to my other Duet-powered setups. If it's only the lack of M500, I'll deal with that until it's fixed. I just wish I hadn't wasted a week on trying to resolve this.

                                        I haven't seen any mention of M500 or M501 in the recent 3.2 beta fixes and changes, so it doesn't look like it'll be making it into this release.

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

                                          If you replace the ribbon cable with ethernet and stick an sd-card in the duet, you can use the pi to bridge ethernet to wifi and keep using the screen to access DWC running on the duet's ethernet interface. Should -give you the same-ish functionality + M500 while the devs fix the file system stuff that is missing

                                          (edit: suppose you don't have to remove the ribbon cable actually, it can supply power or just sit there unused as long as the Duet has a sd-card with a config file it will ignore the SBC interface afaik)

                                          1 Reply Last reply Reply Quote 0
                                          • GoremanXundefined
                                            GoremanX
                                            last edited by

                                            I don't want to spend more money on an ethernet bridge. Pi4s and touchscreens I have littered about the workshop practically for free ๐Ÿ˜‚ All I need to do is put my heater autotune parameters and delta auto-configure results manually in config.g. I run auto-config before every print anyways. I can't think of anything else I use M500 for. It's only tedious initially because of the initial configuration which requires adjusting those settings multiple times until I zero in on the right ones.

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