Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Pronterface for debugging?

    Firmware developers
    2
    9
    324
    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.
    • jazbaatbadalgaye
      jazbaatbadalgaye last edited by

      How (assuming we can) can I use pronterface to display the clocksNeeded? I have added a print statement however I have no idea how to print it on the console?

      petriheino 2 Replies Last reply Reply Quote 0
      • petriheino
        petriheino @jazbaatbadalgaye last edited by

        @jazbaatbadalgaye
        Taking example from case 118
        https://github.com/Duet3D/RepRapFirmware/blob/a1b2f3a78bc198129a03df2e87c9b594edf7fd6b/src/GCodes/GCodes2.cpp#L1593
        Could you try to print it out in similar format such as M118 P1 S"Layer change"; that works well with Pronterface?

        1 Reply Last reply Reply Quote 0
        • petriheino
          petriheino @jazbaatbadalgaye last edited by

          @jazbaatbadalgaye Other way may be from M111 which then usesDebugPrintAll If you enable both P4 & P6

          M111 S1 P4 ;Move debugging
          M111 S1 P6 ;DDA debugging
          

          Or just

          M111 S1 P3 ;GCode debugging
          

          I guess there could be a meaningful point to display the clocksNeeded together with other info somewhere among these.

          jazbaatbadalgaye 3 Replies Last reply Reply Quote 0
          • jazbaatbadalgaye
            jazbaatbadalgaye @petriheino last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • jazbaatbadalgaye
              jazbaatbadalgaye @petriheino last edited by

              @petriheino I added

              M111 S1 P4 ;Move debugging
              M111 S1 P6 ;DDA debugging
              

              to the config.g file but when I send a move command, lets say G0 X20 Y30 I don't really see any data on the console. I also tried to send M111 S1 P4 & M111 S1 P6 in the console but no avail

              petriheino 1 Reply Last reply Reply Quote 0
              • jazbaatbadalgaye
                jazbaatbadalgaye @petriheino last edited by jazbaatbadalgaye

                @petriheino Here is my config.g

                ; Configuration file for SKR v1.4 (firmware version 3)
                ; executed by the firmware on start-up
                ;
                ; generated by RepRapFirmware Configuration Tool v3.3.0-LPC-STM32+03 on Tue Sep 21 2021 13:33:53 GMT-0400 (Bolivia Time)
                
                ; General preferences
                G90                                            ; send absolute coordinates...
                M83                                            ; ...but relative extruder moves
                M550 P"MyPrinter"                             ; set printer name
                
                ; Network
                M551 P"jajajaja"                                 ; set password
                M552 S1                                        ; enable network
                M586 P0 S1                                     ; enable HTTP
                M586 P1 S0                                     ; disable FTP
                M586 P2 S0                                     ; disable Telnet
                
                ; Drives
                M569 P0 S1                                     ; physical drive 0 goes forwards using default driver timings
                M569 P1 S1                                     ; physical drive 1 goes forwards using default driver timings
                M569 P2 S1                                     ; physical drive 2 goes forwards using default driver timings
                M569 P3 S1                                     ; physical drive 3 goes forwards using default driver timings
                M584 X0 Y1 Z2 E3                               ; set drive mapping
                M350 X16 Y16 Z16 E16 I1                        ; configure microstepping with interpolation
                M92 X93.50 Y93.50 Z400.00 E96.10               ; set steps per mm
                M566 X480.00 Y480.00 Z60.00 E120.00            ; set maximum instantaneous speed changes (mm/min)
                M203 X6000.00 Y6000.00 Z180.00 E1200.00        ; set maximum speeds (mm/min)
                M201 X1000.00 Y1000.00 Z20.00 E250.00          ; set accelerations (mm/s^2)
                M906 X400 Y400 Z500 E400 I30                   ; set motor currents (mA) and motor idle factor in per cent
                M84 S30                                        ; Set idle timeout
                
                ; Axis Limits
                M208 X0 Y0 Z0 S1                               ; set axis minima
                M208 X230 Y150 Z200 S0                         ; set axis maxima
                
                ; Endstops
                ; WARNING: No endstops configured
                
                ; Z-Probe
                M558 P0 H5 F120 T6000                          ; disable Z probe but set dive height, probe speed and travel speed
                M557 X15:215 Y15:145 S20                       ; define mesh grid
                
                ; Heaters
                M308 S0 P"bedtemp" Y"thermistor" T100000 B4092 ; configure sensor 0 as thermistor on pin bedtemp
                M950 H0 C"bed" T0                              ; create bed heater output on bed and map it to sensor 0
                M307 H0 B0 S1.00                               ; disable bang-bang mode for the bed heater and set PWM limit
                M140 H0                                        ; map heated bed to heater 0
                M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
                M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
                M308 S1 P"e0temp" Y"thermistor" T100000 B4092  ; configure sensor 1 as thermistor on pin e0temp
                M950 H1 C"e0heat" T1                           ; create nozzle heater output on e0heat and map it to sensor 1
                M307 H1 B0 S1.00                               ; disable bang-bang mode for heater  and set PWM limit
                M143 H1 S280                                   ; set temperature limit for heater 1 to 280C
                
                ; Fans
                M950 F0 C"fan0" Q500                           ; create fan 0 on pin fan0 and set its frequency
                M106 P0 S0 H-1                                 ; set fan 0 value. Thermostatic control is turned off
                
                ; Tools
                M563 P0 D0 H1 F0                               ; 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
                
                ; Custom settings are not defined
                
                ; Miscellaneous
                M575 P1 S1 B115200                             ; enable support for tft
                
                ; Debugging 
                M111 S6 P4 ;Move debugging
                M111 S6 P6 ;DDA debugging
                
                
                
                
                1 Reply Last reply Reply Quote 0
                • petriheino
                  petriheino @jazbaatbadalgaye last edited by

                  @jazbaatbadalgaye

                  it may require running a series of codes from a gcode file to start outputting,

                  I havent tried debug without running gcode file, so you might need to start a file.

                  I think once you get debug working, the cks output gives the clocksNeeded.

                  jazbaatbadalgaye 1 Reply Last reply Reply Quote 0
                  • jazbaatbadalgaye
                    jazbaatbadalgaye @petriheino last edited by

                    @petriheino Hey! I was able to get the number of clocks needed by just adding

                    debugPrintf("Clocks needed : %lu",(unsigned long)clocksNeeded);

                    And then when I send a command G0 X22 Y32, it displays the no of clocks needed on the G code terminal on pronterface. But when I try to do the same for the number of steps by adding

                    debugPrintf("Total Steps : %ld",labs(delta));

                    I don't get anything. Any idea how to go about this? My last resort would be to install putty and read the incoming serial debugging data

                    petriheino 1 Reply Last reply Reply Quote 0
                    • petriheino
                      petriheino @jazbaatbadalgaye last edited by

                      @jazbaatbadalgaye
                      Maybe printing uint32_t totalSteps from DriveMovement.h could work?

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