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

Auto Bed Compensation Javascript Error

Scheduled Pinned Locked Moved
Duet Web Control wishlist
5
22
1.9k
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.
  • undefined
    esserr
    last edited by 31 Oct 2018, 01:40

    Re: Height Map Javascript Error

    I am seeing the following message after running the auto bed compensation and the only way I am able to remove such error is to remove saving of the height map as the final line in bed.g file (M374) .

    0_1540947524056_93d846a9-4cb9-4ff3-a6f1-69d0b8605d3e-image.png

    1 Reply Last reply Reply Quote 0
    • undefined
      Phaedrux Moderator
      last edited by 31 Oct 2018, 03:11

      Perhaps give this new release a try.

      https://github.com/chrishamm/DuetWebControl/blob/dev/DuetWebControl-1.22.4.zip

      Z-Bot CoreXY Build | Thingiverse Profile

      undefined 2 Replies Last reply 31 Oct 2018, 13:55 Reply Quote 0
      • undefined
        dc42 administrators
        last edited by 31 Oct 2018, 07:14

        Please tell us what version of main firmware you are using, and share your bed.g file. If you can do that today then I may be able to fix this in the 2.02 firmware release, if it hasn't been fixed already.

        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
        • undefined
          esserr
          last edited by 31 Oct 2018, 13:54

          Thank you,

          I am running 2.01 with web control 1.22.3 and server 1.21. All from latest stable release.

          undefined 1 Reply Last reply 31 Oct 2018, 14:13 Reply Quote 0
          • undefined
            esserr @Phaedrux
            last edited by 31 Oct 2018, 13:55

            @phaedrux thank you I will give this a try tonight!

            1 Reply Last reply Reply Quote 0
            • undefined
              dc42 administrators @esserr
              last edited by 31 Oct 2018, 14:13

              @esserr said in Auto Bed Compensation Javascript Error:

              Thank you,

              I am running 2.01 with web control 1.22.3 and server 1.21. All from latest stable release.

              And your bed.g file? Specifically, are you using just M374 at the end, or are you using a P parameter to name the height map file - and if so, what name are you using?

              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

              undefined 1 Reply Last reply 31 Oct 2018, 16:29 Reply Quote 0
              • undefined
                esserr @dc42
                last edited by 31 Oct 2018, 16:29

                @dc42

                ; bed.g
                ; called to perform automatic bed compensation via G32
                ;
                ; generated by RepRapFirmware Configuration Tool on Wed Oct 31 2018 12:24:34 GMT-0400 (Eastern Daylight Time)
                M561 ; clear any bed transform
                G28 ; home all axes
                ; Probe the bed at 5 points
                G30 P0 X15 Y15 H0 Z-99999
                G30 P1 X15 Y220 H0 Z-99999
                G30 P2 X220 Y220 H0 Z-99999
                G30 P3 X220 Y15 H0 Z-99999
                G30 P4 X117.5 Y117.5 H0 Z-99999 S

                M374

                or

                M374 P"MyAlternateHeightMap.csv"

                I've done either one of the M374 with the same issue.

                Thanks

                1 Reply Last reply Reply Quote 0
                • undefined
                  esserr @Phaedrux
                  last edited by 31 Oct 2018, 21:56

                  @phaedrux I updated to 1.22.4 and the issue still persists

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    esserr
                    last edited by 31 Oct 2018, 22:02

                    Also updated to firmware 2.02 with same issue...very strange

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators
                      last edited by 31 Oct 2018, 22:02

                      The M374 command won't do anything useful there, because it's only mesh bed probing (G29) that generates a height map that can be saved to SD card. But putting M374 there shouldn't cause a disconnection.

                      Please post your config.g file so that I can try to replicate the issue.

                      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
                      • undefined
                        esserr
                        last edited by 31 Oct 2018, 22:12

                        0_1541023774302_config.g

                        Oh I see, I guess what I am trying to do is save the height map once then reference it on startup so I do not have to probe every time because I have solid bed mounts and no z-probe at this time. I plan on adding the z-probe soon. Should I just run the G29 once and use the results instead of the 5 probe points generated from the configurator? Would I delete these G30 probe points from the bed.g file?

                        Thank you again

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          dc42 administrators
                          last edited by 31 Oct 2018, 22:17

                          Yes, use G29 instead. If 5-point probing was good enough for you before, then you should find a 3 x 3 mesh sufficient.

                          I'll try to replicate the problem tomorrow.

                          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

                          undefined 1 Reply Last reply 8 Nov 2018, 09:26 Reply Quote 1
                          • undefined
                            richardmckenna @dc42
                            last edited by richardmckenna 11 Aug 2018, 09:27 8 Nov 2018, 09:26

                            @dc42 did you manage to replicate this. I now see this same error and no height map file being saved after upgrading. I'm using G29 in my bed file. and see it in both Chrome and Edge.

                            A JavaScript error has occurred so the web interface has closed the connection to your board. It is recommended to reload the web interface now. If this happens again, please contact the author and share this error message:
                            
                            Version: 1.22.4-b1
                            Message: JSON.parse Error: Invalid character at position:107
                            URL: http://10.0.0.10/js/dwc.js
                            Line: 1065:9
                            Error object: {}
                            

                            Software Information
                            Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
                            Firmware Electronics: Duet WiFi 1.0 or 1.01
                            Firmware Version: 2.02RC3(RTOS) (2018-10-17b2)
                            WiFi Server Version: 1.21
                            Web Interface Version: 1.22.4-b1

                            I've attached my bed.g and config.g.

                            Any thoughts?

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              dc42 administrators
                              last edited by dc42 11 Aug 2018, 10:31 8 Nov 2018, 10:30

                              I was unable to replicate it.

                              Please can you update DWC to the 1.22.4 release and check whether it still occurs. If it does, then it would be most helpful if you can get a Wireshark trace of the transaction that produces the error message. You can either save the trace and make the .pcap file available to me, or search for the faulty transaction. It will be an HTTP 200 OK response with the data type reported as JSON, but when you expand it, instead of displaying the JSON object it will offer "Line based text data". That's the data I need; so right click on it, select Copy, and then paste it into a post.

                              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

                              undefined 2 Replies Last reply 8 Nov 2018, 16:09 Reply Quote 0
                              • undefined
                                richardmckenna @dc42
                                last edited by 8 Nov 2018, 16:09

                                @dc42 yes of course I will get that this evening.

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  richardmckenna @dc42
                                  last edited by 8 Nov 2018, 20:12

                                  @dc42 ok I'm getting this response first and then following that I get the disconnect response. I assume because it's not catching the error.

                                  GET /rr_reply HTTP/1.1
                                  Host: 10.0.0.10
                                  Connection: keep-alive
                                  Accept: text/html, */*; q=0.01
                                  X-Requested-With: XMLHttpRequest
                                  User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
                                  Referer: http://10.0.0.10/
                                  Accept-Encoding: gzip, deflate
                                  Accept-Language: en-GB,en;q=0.9,es;q=0.8
                                  
                                  HTTP/1.1 200 OK
                                  Cache-Control: no-cache, no-store, must-revalidate
                                  Pragma: no-cache
                                  Expires: 0
                                  Access-Control-Allow-Origin: *
                                  Content-Type: text/plain
                                  Content-Length: 183
                                  Connection: close
                                  
                                  Bed equation fits points [15.0, 15.0, 0.547] [15.0, 180.0, 0.097] [170.0, 180.0, -0.255] [170.0, 15.0, 0.102] [80.0, 97.5, 0.102]
                                  Error: G29: Height map file heightmap.csv not found
                                  
                                  GET /rr_disconnect HTTP/1.1
                                  Host: 10.0.0.10
                                  Connection: keep-alive
                                  Accept: application/json, text/javascript, */*; q=0.01
                                  X-Requested-With: XMLHttpRequest
                                  User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
                                  Referer: http://10.0.0.10/
                                  Accept-Encoding: gzip, deflate
                                  Accept-Language: en-GB,en;q=0.9,es;q=0.8
                                  
                                  HTTP/1.1 200 OK
                                  Cache-Control: no-cache, no-store, must-revalidate
                                  Pragma: no-cache
                                  Expires: 0
                                  Access-Control-Allow-Origin: *
                                  Content-Type: application/json
                                  Content-Length: 9
                                  Connection: close
                                  
                                  {"err":0}
                                  

                                  Is this because I am running G29 S1 instead of G29 S0? What should be used to probe the bed, save the file and activate bed compensation or if file exists load the file?

                                  This is what the configuration tool gave me.

                                  M561 ; clear any bed transform
                                  G28  ; home all axes
                                  ; Probe the bed at 5 points
                                  G30 P0 X15 Y15 H0 Z-99999
                                  G30 P1 X15 Y180 H0 Z-99999
                                  G30 P2 X170 Y180 H0 Z-99999
                                  G30 P3 X170 Y15 H0 Z-99999
                                  G30 P4 X80 Y97.5 H0 Z-99999 S
                                  
                                  G29 S1 ; Detailed Z-Probe. Load the height map from file and activate bed compensation.
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators
                                    last edited by 8 Nov 2018, 22:32

                                    Those are not the responses that cause the error message from DWC.

                                    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

                                    undefined 1 Reply Last reply 9 Nov 2018, 09:38 Reply Quote 0
                                    • undefined
                                      richardmckenna @dc42
                                      last edited by 9 Nov 2018, 09:38

                                      @dc42 The only calls I can see before that were to GET /rr_status?type=2 HTTP/1.1 and GET /rr_status?type=1 HTTP/1.1. Here is the network trace the printer is at 10.0.0.10 and the PC is at 10.0.0.187.

                                      My previous post is after I changed from DWC 1.22.4-b1 from your Git repo to 1.22.4 from Chris Hamm https://github.com/chrishamm/DuetWebControl. I was already running 1.22.4-b1 when you asked me to upgrade to 1.22.4 and Chris's version was the only one I could find that was specifically 1.22.4. So I don't know if there are any differences.

                                      So I tried some other stuff last night if I run "Perform automatic mesh compensation (G29)" from the drop down menu. It proceeds to probe the bed in 20mm grid completes, saves the heightmap.csv and displays it.

                                      If I then run Auto Bed Compensation it probes the bed at the 5 points defined in the map.g file then displays the height map.

                                      So to me that seems like if there isn't an existing heightmap.csv and G29 S1 is run, it throws the error on the GET /rr_reply call. Then immediately after that GET /rr_disconnect is called.

                                      Thanks

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        dc42 administrators
                                        last edited by 9 Nov 2018, 10:58

                                        Thanks for providing the network trace. I was expecting to see an invalid JSON response, but there isn't one. So I suspect it is a DWC issue, not a firmware issue. I have asked chrishamm to take a look.

                                        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

                                        undefined 1 Reply Last reply 9 Nov 2018, 18:06 Reply Quote 0
                                        • undefined
                                          richardmckenna @dc42
                                          last edited by 9 Nov 2018, 18:06

                                          @dc42 that’s great thanks!

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