Problem with setting working coordinate systems



  • Hello,

    I'm using a duet wifi for controlling my cnc router which works fine so far. However I'm experiencing some problems when using WCS (working coordinate systems).

    I move my head to a certain position i.e.
    G1 X305 Y965 Z70 F12000
    The position I see in the web-interface is accordingly X=305, Y=965, Z=70
    Then I want to set my WKS to be zero at that point. Therefore I tried the following two commands
    G10 L2 P1 X305 Y965 Z70
    and
    G10 L20 P1 X0 Y0 Z0
    which both result in a position X=0, Y=0, Z=70. I would expect Z to be 0 as well.
    Now I issue the following command
    G1 Z0
    The machine does not move but the position display goes to Z=0 and the machine works as expected.
    If I don't issue this G1 Z0 my Z-axis is either offset or I get directly and out-of-limits error when issuing any G0/G1 commands result (I don't understand yet when which of these two scenarios happens).

    Further if I'm going from WCS1 two WCS2 by issuing G55 I get the position diplay X=305 Y=965 Z=70 as expected and everything is working fine. However when I go back wo WCS 1 (G54) then I get again the strange behavior from above having the position display showing X=0, Y=0, Z=70 with the same consequences as described above.

    For me this looks like an issue about how WCS are set for Z-values not equal to 0. However I might as well miss some of the concepts how WCS should work. I'm happy for any support.

    Best regards,

    Marc

    PS:
    Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
    Firmware Electronics: Duet WiFi 1.02 or later
    Firmware Version: 2.0(RTOS) (2018-06-05b3)
    WiFi Server Version: 1.21
    Web Interface Version: 1.21.1



  • 2.01 contained some fixes related to offsets, and the reporting of offsets to DWC. This MIGHT be related.

    Try upgrading to the very latest 2.02 RC2.



  • This post is deleted!


  • Hello,

    unfortunately the update to 2.02 RC2 did not solve the problem. Any other advise?

    Regards,

    Marc

    Now:
    Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
    Firmware Electronics: Duet WiFi 1.02 or later
    Firmware Version: 2.02RC2(RTOS) (2018-09-07b2)
    WiFi Server Version: 1.21
    Web Interface Version: 1.22.3



  • @mwinterm I'm the one partially to "blame" for having WCS support in more recent firmware. While I have not written the code, I'm one of the more vocal users of Duet boards with CNC routers/mills. So far, I can't see the problem that you are reporting, but there are two relatively minor differences. I'm on stable firmware:

    Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
    Firmware Electronics: Duet Ethernet 1.02 or later
    Firmware Version: 2.01(RTOS) (2018-07-26b2)
    Web Interface Version: 1.22

    and I use separate G10 L20 P1 macros for X/Y and Z.

    I have used the stable firmware quite a lot recently and had no issues, apart from my mistakes, with WCS.



  • @Catalin_RO You are not to blame at all as I'm happy about all the functionality for CNC that is already around.

    I first tried to separate the command for X,Y and Z as you do and then also downgraded to the stable 2.01. Both things unfortunately did not change anything of the described behavior.

    I'm wondering if this could be related to my configuration which however is pretty basic appart from joining two stepper for the Y axes:

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Wed Sep 12 2018 16:59:43 GMT+0200 (Central European Summer Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Network
    M550 PCNCrouter ; Set machine name
    M551 P******* ; Set password
    M552 S1 ; Enable network
    M587 S"mojito" P"*******" ; Configure access point. You can delete this line once connected
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S0 ; Drive 1 goes backwards
    M569 P2 S0 ; Drive 2 goes backwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1
    M584 X0 Y1 Z2 U3 V4 ; Map drives to axis
    M584 Y1:3 ; Map drive 1 and drive 3 to Y
    M350 Z16 I1 ; Configure microstepping without interpolation
    M350 X16 Y16 I1 ; Configure microstepping with interpolation
    M92 X53.333 Y53.333 Z685.712 ; Set steps per mm
    M566 X900 Y900 Z12 U900 ; Set maximum instantaneous speed changes (mm/min)
    M203 X24000 Y24000 Z1800 U24000 ; Set maximum speeds (mm/min)
    M201 X500 Y500 Z250 U500 ; Set accelerations (mm/s^2)
    M906 X2000 Y2000 Z2000 U2000 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 X610 Y1930 Z140 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z1 U1 S1 ; Set active high endstops
    M574 V1 S0 ; Set active low endstops

    ; Z-Probe
    M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed
    M557 X15:535 Y15:1835 S100 ; Define mesh grid

    ; Heaters
    M140 H-1 ; Disable heated bed

    ; Fans
    M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P2 S1 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off

    ; Tools
    M563 P0 D H ; 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
    M563 P1 D H ; Define tool 1
    G10 P1 X0 Y0 Z0 ; Set tool 1 axis offsets
    G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C
    M563 P2 D H ; Define tool 2
    G10 P2 X0 Y0 Z0 ; Set tool 2 axis offsets
    G10 P2 R0 S0 ; Set initial tool 2 active and standby temperatures to 0C
    M563 P3 D H ; Define tool 3
    G10 P3 X0 Y0 Z0 ; Set tool 3 axis offsets
    G10 P3 R0 S0 ; Set initial tool 3 active and standby temperatures to 0C
    M563 P4 D H ; Define tool 4
    G10 P4 X0 Y0 Z0 ; Set tool 4 axis offsets
    G10 P4 R0 S0 ; Set initial tool 4 active and standby temperatures to 0C
    M563 P5 D H ; Define tool 5
    G10 P5 X0 Y0 Z0 ; Set tool 5 axis offsets
    G10 P5 R0 S0 ; Set initial tool 5 active and standby temperatures to 0C

    ; Automatic saving after power loss is not enabled

    ; Custom settings
    M106 P0 I-1 ; Disable fan0
    M453 P20 R1 ; Set Pin 20 to run Spindle

    ; Miscellaneous
    T0 ; Select first tool


  • administrators

    I agree, the behaviour is wrong at present. I'll put a fix in the next 2.02RC.



  • Thanks! Looking forward to....

    Btw I modified the Fusion 360 Post for Mach3 to work with the Duet. Runs pretty smoothly for me.
    If useful for anyone the post can be found on
    https://github.com/mwinterm/fusion_post/tree/master/DuetCNC

    Best regards,

    Marc



  • I also would like to write a generic macro to set the current WCS i.e. doing something like

    G10 L20 P1 X0 Y0 Z0

    without having an explicit reference to WCS1 but instead just applying it to the current WCS. For setting the tool offset this possible by just calling

    G10 Z0 instead of G10 P1 Z0.

    However leaving the P1 away for the WCS gives me an error.

    Annother little thing is that the tool-numbering in the gcode calls as well as in the web-interface starts with 0 whereas on the PanelDue the first tool has the number 1.

    Regards,

    Marc


  • administrators

    @mwinterm said in Problem with setting working coordinate systems:

    I also would like to write a generic macro to set the current WCS i.e. doing something like
    G10 L20 P1 X0 Y0 Z0
    without having an explicit reference to WCS1 but instead just applying it to the current WCS. For setting the tool offset this possible by just calling
    G10 Z0 instead of G10 P1 Z0.

    This will be supported in the next 2.02RC.



  • @dc42 Thank you very much for the modifications! I've just tested them and they work perfectly for me 🙂


  • administrators

    Thanks for confirming this.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.