Points S0 and S1 must be in clockwise order...



  • So... I'm trying to get independent lead screw levelling working, which I did have working before, but on the new board... I get that message with the exact same macro that I was using before.

    Obviously, I've changed something.

    I can use the commands to report the relative distances, enough to tell me what I need, ,but I cannot get it to make the adjustments. I don't know what I've forgotten to set.

    I do have the M671 command for the motor positions defined.

    G30 ... S-1 will report the relative positions and deviation, but of course doesn't correct for it.

    Config.g:

    ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Tue Jun 26 2018 20:51:43 GMT-0600 (Mountain Daylight Time)
    ; Modified by DMG 09/2/2020
    
    ; General preferences
    G90                              ; Send absolute coordinates...
    M83                              ; ...but relative extruder moves
    
    ; Custom configuration
    M584 Z2:4 E3                     ; Set Z motors on drives 2 and 4 DMG 08/30/2018
    M671 X-43.0:309:0 Y137.5:137.5 S2; Set the Z motor relative locations DMG 08/30/2018
    
    ; Network
    M550 PDMG3D01                    ; Set machine name
    M552 S1                          ; Enable network
    M586 P0 S1                       ; Enable HTTP
    M586 P1 S1                       ; Enable FTP
    M586 P2 S0                       ; Disable Telnet
    M575 P1 B57600 S1                ; Enable PanelDue
    
    
    ; Drives
    M569 P0 S1                       ; Drive 0 goes forwards
    M569 P1 S1                       ; Drive 1 goes forwards
    M569 P2 S1                       ; Drive 2 goes forwards
    M569 P3 S1                       ; Drive 3 goes forwards
    ; DMG 08/30/2018 I think the following line need to be configured
    M569 P4 S1                       ; Drive 4 goes forwards
    M350 X16 Y16 Z16 E16 I1    ; Configure microstepping with interpolation
    M92 X400 Y400 Z400 E102.8        ; Set steps per mm
    M566 X900 Y900 Z12 E120          ; Set maximum instantaneous speed changes (mm/min)
    M203 X7500 Y7500 Z480 E1200      ; Set maximum speeds (mm/min)
    M201 X500 Y200 Z250 E250         ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30     ; Set motor currents (mA) and motor idle factor in per cent
    M572 D0 S0.16                    ; Set Pressure Advance to 0.16
    M84 S30                          ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                 ; Set axis minima
    M208 X248 Y285 Z190 S0           ; Set axis maxima
    
    ; Endstops
    M574 X2 Y2 S0                    ; Set active low endstops
    
    ; Z-Probe
    M574 Z1 S2                       ; Set endstops controlled by probe
    M558 P1 H5 F720 T6000            ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X-15 Y0 Z2.22            ; Set Z probe trigger value, offset and trigger height
    M557 X15:205 Y15:205 S20         ; Define mesh grid
    
    ; Heaters
    M305 P0 T100000 B4138 C0 R4700   ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120                     ; Set temperature limit for heater 0 to 120C
    M305 P1 X501 R4700               ; sensor 1 PT1000
    M143 H1 S300                     ; Set temperature limit for heater 1 to 300C
    
    ; Fans
    M106 P0 S0.0 I0 F500 H-1         ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45        ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S1 I0 F500 H1 T45        ; Set fan 2 value, PWM signal inversion and frequency. 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
    
    ; Automatic saving after power loss is not enabled
    
    ; Custom settings are not configured
    

    bed_level.g:

    G28 Z ; home
    M561 ; clear bed transform
    G30 P0 X20 Y137.5 Z-99999 ; probe near a leadscrew, half way along Y axis
    G30 P1 X180 Y137.5 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
    

    I haven't cleaned up the comments in that, but it's pretty close to the example in the wiki.

    I'm in the process now of updating to firmware 3.1.1, since I'm re-doing a lot of stuff anyway. The board has 2.05.1 installed now.


  • Moderator

    Based on your config, your first probe point should be for the motor connected to driver 2. Do you have your z motor cables swapped?



  • I've switched the probe points back and forth, this is where they're at now. I'll swap them again. I don't even remember which motor is currently connected to which drive.


  • Moderator

    Well to keep it straight forward connect the left motor to driver 2 and the right motor to driver 4, then your M584 Z2:4 will match the positions of M671 and then your points in bed.g should match as well.



  • Well, that didn't help.

    Macro now looks like:

    G29 S2 ; Clear and disable mesh compensation
    M561 ; clear any bed transform
    G28 Z
    G30 P0 X35.0 Y137.5 H0 Z-99999
    G30 P1 X185.0 Y137.5 H0 Z-99999 S2
    G28 Z
    

    I'd be willing to mae that line a diagonal if it would help, but I can't help but thin that I've just missed something in the configuration somewhere.


  • Moderator

    @SupraGuy said in Points S0 and S1 must be in clockwise order...:

    M671 X-43.0:309:0 Y137.5:137.5 S2

    You’ve got three points for X. Should be a . not a : between 309 and 0. I expect that’s messing it up.

    Ian


  • Moderator

    @droftarts Keen eye!



  • That would be a problem, yeah... No idea how the heck that got there, when I was copy/pasting the file from the one that worked before...

    So yeah, it works. You'd think that an old Fortran programmer would know to check punctuation.


  • Moderator

    @SupraGuy great, glad that fixed it! I should probably test what M671 reports when set like this...

    Ian


Log in to reply