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

Multiple motion system homing malfunction

Scheduled Pinned Locked Moved Solved
Beta Firmware
5
16
459
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
    SANJR
    last edited by SANJR 2 Jul 2024, 15:54 7 Feb 2024, 15:01

    Hi Everyone,

    I am developing a customized machine using Multiple motion system. To brief the x,y,z axes are the first motion and the u axis is the second motion system. Previously when testing the asynchronous but a cordinated motion between the two motion axis i.e., between the x,y,z and u it was good.

    The U axis controlled by two macro files and the condition is monitored continuously by a daemon.g file

    When i wanted to do a complete trial like home and then do some motion trials. i started something unusal.

    1. On homing induvidual axis the u axis motor is rotating. This was not supposed to happen
    2. The u axis check the condition of pinrtheadstate in the daemon.g which has two conditions. u axis motor to rotate only when the printhead state is on and not when the printhead state is off. ---> The printheadstate ON or off is controlled by a 5v normal relay connected to OUT_9 5V pin. When i tried by disconnecting the relay connection the u axis still rotates when home x is done. And the X axis is not stopped when the endstop is triggered. Now the axis is almost damaged.......

    Hmm...... not sure what is happening? Any feedback or suggestions would really helpful to understand how to trouble shoot plz.....

    undefined undefined 2 Replies Last reply 8 Feb 2024, 08:34 Reply Quote 0
    • undefined SANJR marked this topic as a question 7 Feb 2024, 16:23
    • undefined
      T3P3Tony administrators @SANJR
      last edited by 8 Feb 2024, 08:34

      @SANJR please post your config.g, the homing files, daemon.g and the macros you refer to.

      www.duet3d.com

      undefined 4 Replies Last reply 8 Feb 2024, 09:48 Reply Quote 0
      • undefined
        o_lampe @SANJR
        last edited by 8 Feb 2024, 09:22

        @SANJR I believe you have to rethink the daemon.g code or the macros. They should only be active after x,y,z-axes are homed.
        You can check for homed axes in the object model.

        I'm not sure where the variables for homed axis can be found, maybe someone else can chime in?

        undefined 1 Reply Last reply 8 Feb 2024, 09:59 Reply Quote 1
        • undefined
          SANJR @T3P3Tony
          last edited by 8 Feb 2024, 09:48

          Hi

          Herewith pasting the config.g,

          ; General preferences
          G90 ; send absolute coordinates...
          M83 ; ...but relative extruder moves
          M550 P"CENIMAT WAAM" ; set printer name
          ; Network
          M551 P"SMARTWAAM" ; set password
          M552 P192.168.2.12 S1 ; enable network and set IP address
          M553 P255.255.255.0 ; set netmask
          M554 P192.168.2.14 ; set gateway
          M586 P0 S1 ; enable HTTP
          M586 P1 S0 ; disable FTP
          M586 P2 S0 ; disable Telnet
          ; Drives
          G4 S2 ; Wait for expansion boards to start
          M569 P0.0 S0 ; Main board.Z0 drive (Z1 Motor) 0.0 goes backward
          M569 P0.1 S0 ; Main board.Z1 drive (Z2 Motor) 0.1 goes backward
          M569 P0.2 S0 ; Main board.Z2 drive (Z3 Motor) 0.2 goes backward
          M569 P0.3 S0 ; Main board.Z3 drive (Z4 Motor) 0.3 goes backward
          M569 P0.4 S0 ; Main board.Z4 drive (U Feeder Motor) 0.4 goes backward
          M569 P1.0 S0 ; Expansion board.X drive (X Motor) 1.0 goes backward
          M569 P1.1 S0 ; Expansion board.Y1 drive (Y1 Motor) 1.1 goes backward
          M569 P1.2 S0 ; Expansion board.Y2 drive (Y2 Motor) 1.2 goes backward
          M584 X1.0 Y1.1:1.2 Z0.0:0.1:0.2:0.3 U0.4 ; set axes drive mapping, expansion board:X&Y axes,main board:Z axis, main board:U axis (feeder motor 1)
          M671 X5:5:545:545 Y80:455:455:80 S5.0 ; leadscrews at Front left, Rear Left, Rear Right and Front right
          M350 X16 Y16 Z16 U16 I1 ; configure microstepping with interpolation
          M92 X400.00 Y400.00 Z400.00 U400.00 ; set steps per mm
          M566 X300.00 Y300.00 Z180.00 U300.00 ; set maximum instantaneous speed changes (mm/min)
          M203 X3000.00 Y3000.00 Z600.00 U3000.00 ; set maximum speeds (mm/min)
          M201 X100.00 Y100.00 Z20.00 U100.00 ; set accelerations (mm/s^2)
          M906 X2520 Y2520 Z2520 U2520 I100 ; set motor currents (mA) and motor idle factor in per cent
          M84 S3600 ; Set idle timeout
          ; Axis Limits
          M208 X0 Y0 Z0 S1 ; set axis minima
          M208 X550 Y460 Z510 S0 ; set axis maxima
          ; Endstops
          M574 X1 S1 P"!1.io0.in" ; configure switch-type (microswitch) endstop for low end on X via pin io0.in via CAN address 1, Expansion board
          M574 Y1 S1 P"!1.io1.in+!1.io2.in" ; configure switch-type (microswitch) endstop for low end on Y1 & Y2 via pin io1.in & io2.in via CAN address 1, Expansion board
          M574 Z2 S1 P"!io0.in+!io1.in+!io2.in+!io3.in" ; configure switch-type (microswitch) endstop for High end on Z via pin io0.in,io1.in,io2.in,io3.in via Main board
          M574 U1 S1 P"0.io7.in" ; simple switch on high end
          ; Z-Probe
          M558 P5 C"!io8.in" H30 F300 T6000 ; enable Z probe sensor endstop io8.in (Main Board) set dive height, probe speed and travel speed
          G31 X0 Y0 Z15 ; set or report current probe status
          M557 X0:550 Y70:460 S100 ; define mesh grid
          ; Temperature Sensors
          M308 S10 Y"mcu-temp" A"MCU" ; defines sensor 10 as main board MCU temperature sensor
          M308 S11 Y"drivers" A"Duet stepper drivers" ; defines sensor 11 as stepper driver temperature sensor
          M308 S12 Y"mcu-temp" P"1.dummy" A"3HC MCU" ; defines sensor 12 as expansion board MCU temperature sensor via CAN address 1
          M308 S13 Y"drivers" P"1.dummy" A"3HC Steppers" ; defines sensor 13 as expansion board stepper driver temperature sensor via CAN address 1
          ; weldtorchstae
          global weldtorchstate = 0 ; assume initially OFF, change 1 to ON
          ; Fans
          M950 F1 C"out7" Q250 ; Create fan 4 pin OUT_7 (fan output) and set its frequency
          M106 P1 S0 H-1 ; Set fan 4 value. Thermostatic control is turned off
          M950 F2 C"out8" Q250 ; Create fan 5 pin OUT_8 (fan output) and set its frequency
          M106 P2 S0 H-1 ; Set fan 5 value. Thermostatic control is turned off
          M950 P3 C"out9" ; Allocate GPIO port 3 to OUT_9, Weld Torch Relay 5V normal relay
          M950 P4 C"out6" ; Allocate GPIO port 4 to OUT_6, U axis feeder motor 5V normal relay
          ; Custom settings are not defined
          M950 J1 C"io6.in" ; Configure pin J1 as input and assign input pin "io6.in"
          M581 P1 T0 S1 R0 ; Setup Pin 1 when trigger occurs S1 from High to Low State during any time R0 for Emergemcy Push Button, no trigger.g needed
          M581 P1 T2 S0 R0 ; Setup Pin 1 when trigger occurs S0 from Low to High State during any time R0 for Emergemcy Push Button, trigger2.g needed
          M950 J4 C"!1.io3.in" ; Configure pin J4 as X Max(High End) Trigger and assign input pin "io3.in" via CAN address 1
          M581 P4 T4 S1 R0 ; Setup Pin 4 when trigger occurs S1 from NO to NC during any time R0 - trigger4.g
          M950 J5 C"!1.io4.in" ; Configure pin J5 as Y Max(High End) Trigger and assign input pin "io4.in" via CAN address 1
          M581 P5 T5 S1 R0 ; Setup Pin 5 when trigger occurs S1 from NO to NC during any time R0-trigger5.g
          M950 J6 C"!0.io4.in" ; Configure pin J6 as Z Min(Low End) Trigger and assign input pin "io4.in" in Main Board
          M581 P6 T6 S1 R0 ; Setup Pin 6 when trigger occurs S1 from NO to NC during any time R0-trigger6.g
          M950 J7 C"!0.io5.in" ; Configure pin J7 as Z Min(Low End) Trigger and assign input pin "io.5.in" in Main Board
          M581 P7 T7 S1 R0 ; Setup Pin 7 when trigger occurs S1 from NO to NC during any time R0-trigger7.g
          ; Miscellaneous
          M501 ; load saved parameters from non-volatile memory
          1 Reply Last reply Reply Quote 0
          • undefined
            SANJR @T3P3Tony
            last edited by 8 Feb 2024, 09:52

            @T3P3Tony

            Homing files

            ; homex.g
            ; called to home the X axis
            ;
            G91 ; relative positioning
            G1 H1 X-550 F1800 ; move quickly to X axis endstop and stop there (first pass)
            G1 H2 X5 F6000 ; go back a few mm
            G1 H1 X-550 F360 ; move slowly to X axis endstop once more (second pass)
            G90 ; absolute positioning
            ; homey.g
            ; called to home the Y axis
            ;
            G91 ; relative positioning
            G1 H1 Y-460 F1800 ; move quickly to Y axis endstop and stop there (first pass)
            G1 H2 Y5 F1800 ; go back a few mm
            G1 H1 Y-460 F360 ; move slowly to Y axis endstop once more (second pass)
            G90 ; absolute positioning
            ; homez.g
            ; called to home the Z axis
            ;
            G91 ; relative positioning
            G1 H2 Z2 F6000 ; lift Z relative to current position
            G1 H1 Z510 F1800 ; move Z up until the endstop is triggered
            G92 Z510 ; set Z position to axis maximum
            ; homeall.g
            ; called to home all axes
            ;
            G91 ; relative positioning
            G1 H2 Z2 F6000 ; lift Z relative to current position
            G1 H1 X-550 Y-460 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
            G1 H2 X5 Y5 F6000 ; go back a few mm
            G1 H1 X-550 Y-460 F360 ; move slowly to X and Y axis endstops once more (second pass)
            G1 H1 Z510 F360 ; move Z up stopping at the endstop
            G90 ; absolute positioning
            G92 Z510 ; set Z position to axis maximum
            1 Reply Last reply Reply Quote 0
            • undefined
              SANJR @T3P3Tony
              last edited by 8 Feb 2024, 09:54

              @T3P3Tony

              daemon.g and macro files

              ;daemon.g
              while (true)
              M596 P1
              G91
              while (global.weldtorchstate == 1)
              G1 H4 U99999 F1000 ;selects the U axis & sets the feedrate
              G4 S0.2
              ; Weld Torch ON
              M42 P3 S0 ; turns on the relay to start welder
              M42 P4 S1 ; set U axis endstop to high
              ; set weldtorchstate to ON
              set global.weldtorchstate = 1
              ; Weld Torch OFF
              M42 P3 S1 ; turns off the relay
              M42 P4 S0 ; set U axis to low end
              ; set weldtorchstate to OFF
              set global.weldtorchstate = 0
              undefined 1 Reply Last reply 8 Feb 2024, 12:19 Reply Quote 0
              • undefined
                SANJR @T3P3Tony
                last edited by 8 Feb 2024, 09:55

                @T3P3Tony said in Multiple motion system homing malfunction:

                @SANJR please post your config.g, the homing files, daemon.g and the macros you refer to.

                Hi Tony pasted the filesplz take a look .......

                1 Reply Last reply Reply Quote 0
                • undefined
                  SANJR @o_lampe
                  last edited by 8 Feb 2024, 09:59

                  @o_lampe said in Multiple motion system homing malfunction:

                  @SANJR I believe you have to rethink the daemon.g code or the macros. They should only be active after x,y,z-axes are homed.
                  You can check for homed axes in the object model.

                  I'm not sure where the variables for homed axis can be found, maybe someone else can chime in?

                  Hi

                  Yes you are correct. The daemon and the macros needs to be active after homing the first motion X,Y,Z axis. I have pasted all the files plz take a look......

                  And about checking for the homed axes in the object model? Sorry not able to understand where and how to check the object model.... Apologies i am not able to understand.......

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    o_lampe @SANJR
                    last edited by o_lampe 2 Aug 2024, 12:22 8 Feb 2024, 12:19

                    @SANJR said in Multiple motion system homing malfunction:

                    ;daemon.g
                    while (true)
                    M596 P1
                    G91
                    while (global.weldtorchstate == 1) ; maybe an if-condition would be better here?
                    G1 H4 U99999 F1000 ;selects the U axis & sets the feedrate
                    G4 S0.2 ; this delay should be related to the while(true) loop
                    undefined 1 Reply Last reply 8 Feb 2024, 13:19 Reply Quote 0
                    • undefined
                      SANJR @o_lampe
                      last edited by 8 Feb 2024, 13:19

                      @o_lampe

                      Thanks

                      Modified the daemon file

                      Problem still exists.

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        OwenD
                        last edited by 8 Feb 2024, 22:20

                        You have no indentation in your second while statement.

                        undefined 2 Replies Last reply 8 Feb 2024, 22:26 Reply Quote 2
                        • undefined
                          SANJR @OwenD
                          last edited by 8 Feb 2024, 22:26

                          @OwenD said in Multiple motion system homing malfunction:

                          You have no indentation in your second while statement.

                          Hi Owen,

                          Is it the while (global.weldtorchstate == 1) refereing to?
                          And indentation meaning.....could u plz show it in the code plz

                          undefined 1 Reply Last reply 8 Feb 2024, 22:29 Reply Quote 0
                          • undefined
                            oliof @SANJR
                            last edited by 8 Feb 2024, 22:29

                            @SANJR

                            daemon.g
                            while (true)
                            M596 P1
                            G91
                            while (global.weldtorchstate == 1) ; maybe an if-condition would be better here?
                            G1 H4 U99999 F1000 ;selects the U axis & sets the feedrate
                            G4 S0.2 ; this delay should be related to the while(true) loop

                            <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                            undefined 2 Replies Last reply 8 Feb 2024, 22:31 Reply Quote 2
                            • undefined
                              SANJR @oliof
                              last edited by 8 Feb 2024, 22:31

                              @oliof

                              Thanks oliof

                              Will check with the indentation modified

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                SANJR @OwenD
                                last edited by 9 Feb 2024, 16:10

                                @OwenD said in Multiple motion system homing malfunction:

                                You have no indentation in your second while statement.

                                Thanks Owen

                                By changing the indentation was able to get it right

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  SANJR @oliof
                                  last edited by 9 Feb 2024, 16:10

                                  @oliof said in Multiple motion system homing malfunction:

                                  @SANJR

                                  daemon.g
                                  while (true)
                                  M596 P1
                                  G91
                                  while (global.weldtorchstate == 1) ; maybe an if-condition would be better here?
                                  G1 H4 U99999 F1000 ;selects the U axis & sets the feedrate
                                  G4 S0.2 ; this delay should be related to the while(true) loop

                                  Thanks Oliof

                                  Its good now

                                  1 Reply Last reply Reply Quote 0
                                  • undefined SANJR has marked this topic as solved 9 Feb 2024, 16:11
                                  7 out of 16
                                  • First post
                                    7/16
                                    Last post
                                  Unless otherwise noted, all forum content is licensed under CC-BY-SA