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

    Possible RRF3 FW bug?

    Scheduled Pinned Locked Moved Solved
    General Discussion
    2
    4
    262
    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.
    • cheeseandhamundefined
      cheeseandham
      last edited by

      I've been investigating the object model and found that the following script resets my Duet.

      Board: Duet WiFi 1.02 or later + DueX5
      Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.01-RC3 (2020-02-29b4)
      Duet WiFi Server Version: 1.23

      (also tested on Duet 2 3.01 RC1 and RC2)

      echo "fans[0].name :",fans[0].name
      echo "fans[1].name :",fans[1].name
      echo "fans[2].name :",fans[2].name
      echo "fans[3].name :",fans[3].name
      

      M122 report is

      M122
      === Diagnostics ===
      RepRapFirmware for Duet 2 WiFi/Ethernet version 3.01-RC3 running on Duet WiFi 1.02 or later + DueX5
      Board ID: 08DGM-95BLL-N6PSS-6JKD2-3SJ6M-10UMJ
      Used output buffers: 3 of 24 (14 max)
      === RTOS ===
      Static ram: 27916
      Dynamic ram: 93976 of which 44 recycled
      Exception stack ram used: 272
      Never used ram: 8864
      Tasks: NETWORK(ready,732) HEAT(blocked,1240) DUEX(suspended,136) MAIN(running,1924) IDLE(ready,76)
      Owned mutexes: WiFi(NETWORK)
      === Platform ===
      Last reset 00:00:36 ago, cause: software
      Last software reset at 2020-02-29 22:51, reason: Hard fault, spinning module GCodes, available RAM 8536 bytes (slot 3)
      Software reset code 0x0063 HFSR 0x40000000 CFSR 0x00000001 ICSR 0x0041f803 BFAR 0xe000ed38 SP 0x20004f04 Task 0x4e49414d
      Stack: 004043f7 b2c96804 000f0000 00000000 a5a5a5a5 200051b8 0042cad9 00000001 20001408 00000001 00000000 
      Error status: 0
      Free file entries: 9
      SD card 0 detected, interface speed: 20.0MBytes/sec
      SD card longest block write time: 3.3ms, max retries 0
      MCU temperature: min 41.1, current 42.5, max 43.1
      Supply voltage: min 23.9, current 24.1, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes
      Driver 0: standstill, SG min/max not available
      Driver 1: standstill, SG min/max not available
      Driver 2: standstill, SG min/max not available
      Driver 3: standstill, SG min/max not available
      Driver 4: standstill, SG min/max not available
      Driver 5: standstill, SG min/max not available
      Driver 6: standstill, SG min/max not available
      Driver 7: standstill, SG min/max not available
      Driver 8: standstill, SG min/max not available
      Driver 9: standstill, SG min/max not available
      Date/time: 2020-02-29 22:52:02
      Cache data hit count 64014950
      Slowest loop: 46.43ms; fastest: 0.12ms
      I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
      === Move ===
      Hiccups: 0(0), FreeDm: 169, MinFreeDm: 168, MaxWait: 546ms
      Bed compensation in use: none, comp offset 0.000
      === MainDDARing ===
      Scheduled moves: 1, completed moves: 1, 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 = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
      === GCodes ===
      Segments left: 0
      Movement lock held by null
      http is idle in state(s) 0
      telnet is idle in state(s) 0
      file is idle in state(s) 0
      serial 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
      daemon is idle in state(s) 0
      autopause is idle in state(s) 0
      Code queue is empty.
      === Network ===
      Slowest loop: 81.29ms; fastest: 0.00ms
      Responder states: HTTP(2) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
      HTTP sessions: 1 of 8
      - WiFi -
      Network state is running
      WiFi module is connected to access point 
      Failed messages: pending 0, notready 0, noresp 0
      WiFi firmware version 1.23
      WiFi MAC address 2c:3a:e8:0b:09:f7
      WiFi Vcc 3.41, reset reason Turned on by main processor
      WiFi flash size 4194304, free heap 24080
      WiFi IP address 192.168.0.26
      WiFi signal strength -51dBm, reconnections 0, sleep mode modem
      Socket states: 4 0 0 0 0 0 0 0
      

      M409 K"fans" is

      {"key":"fans","flags":"","result":[{"actualValue":0,"blip":0.10,"max":1.00,"min":0.10,"name":"","requestedValue":0,"rpm":-1,"thermostatic":{"control":false}},{"actualValue":0,"blip":0.10,"max":1.00,"min":0.10,"name":"","requestedValue":0,"rpm":-1,"thermostatic":{"control":false}},{"actualValue":0,"blip":0.10,"max":1.00,"min":0.10,"name":"Part","requestedValue":0,"rpm":-1,"thermostatic":{"control":false}},null,null,null,{"actualValue":0,"blip":0.10,"max":1.00,"min":0.10,"name":"Hotend","requestedValue":1.00,"rpm":-1,"thermostatic":{"control":true,"heaters":[1],"highTemperature":45.0,"lowTemperature":45.0}},{"actualValue":0.38,"blip":0.10,"max":1.00,"min":0.10,"name":"Elec.Cab.1","requestedValue":1.00,"rpm":-1,"thermostatic":{"control":true,"heaters":[10],"highTemperature":55.0,"lowTemperature":35.0}},{"actualValue":0.38,"blip":0.10,"max":1.00,"min":0.10,"name":"Elec.Cab.2","requestedValue":1.00,"rpm":-1,"thermostatic":{"control":true,"heaters":[10],"highTemperature":55.0,"lowTemperature":35.0}}]}
      
      1 Reply Last reply Reply Quote 0
      • cheeseandhamundefined
        cheeseandham
        last edited by

        I don't know if this is useful additional information but I asked someone with Duet Ethernet 1.02 or later + DueX5 and RepRapFirmware for Duet 2 WiFi/Ethernet 3.01-RC1 (2020-02-08b3) to run

        echo "fans[0].name :",fans[0].name
        echo "fans[1].name :",fans[1].name
        echo "fans[2].name :",fans[2].name
        echo "fans[3].name :",fans[3].name
        echo "fans[4].name :",fans[4].name
        echo "fans[5].name :",fans[5].name
        echo "fans[6].name :",fans[6].name
        echo "fans[7].name :",fans[7].name
        echo "fans[8].name :",fans[8].name
        

        They reported that they got "Error: in file macro, line 7 column 23: array index out of bounds"

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by dc42

          I confirm this is a bug. It occurs when there are gaps in the fan numbering. I will fix it in 3.01 release. Meanwhile I suggest you use this instead:

          if fans[0] != null
            echo "fans[0].name :",fans[0].name
          if fans[1] != null
            echo "fans[1].name :",fans[1].name
          if fans[2] != null
            echo "fans[2].name :",fans[2].name
          if fans[3] != null
            echo "fans[3].name :",fans[3].name
          

          or why not:

          while iterations < #fans
            if fans[iterations] == null
              echo "Fan",iterations,"not configured"
            else
              echo "Fan",iterations,"name:",fans[iterations].name
          echo "That''s all"
          

          While writing that I found another bug: you need another command after the end of a while block before end of file, otherwise when end of file is reached the while block is terminated. I'll fix that too in 3.01 release.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • cheeseandhamundefined
            cheeseandham
            last edited by

            Great news. Thanks dc42!

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