Why in home XY different G1 is not execute in my code?
-
The minima value from M208 is set as the axis position when the endstop is triggered. So in your homex and homeY files you don't need to use the G92 X0 and G92 Y0 because those values are already set as soon as the endstop is triggered.
For your Z axis, your M208 says the Z minima is 0 and maxima is 137, and then in your homing file you home to z max and the position is set as 137, then you move it down by -120, which would place the Z axis at (137-120=17) and then set the position to be actually as -120, which tells the firmware it's below the minima.
It's not super clear to me yet from your description what you actually want to happen. Perhaps a picture of the machine marked up with your intention?
-
@Clement-B said in Why in home XY different G1 is not execute in my code?:
; homez.g
G91 ; Relative
G21 ; Units to mm
G1 Z180 H1 F1800 ; Move to LSW Z & stop Zup=+
G1 Z-5 F300 ; Go back for ajuste precisely at LSW
G1 Z-120 F1400 ; Go Home
G90 ; Absolute
G92 Z-120 ; Set Home PositionAlso, your homez file differs from your homeall file. In homez you move to the endstop, back off 5mm, then back off another 120, putting the actual position at -125.
But in homeall you hit the endstop, back off 5mm, hit the endstop again, and then move down 120. You'll get an unintentionally different position between homez and homeall because of that.
-
@Phaedrux
ok, I see this,
thank -
-
@Clement-B said in Why in home XY different G1 is not execute in my code?:
; homex.g
G91 ; Relative
G21 ; Units to mm
G1 Z20 H1 F500 ; Zup (protect break bit)
G1 X-300 H1 F1800 ; Move to LSW X & stop
G1 X5 F300 ; Go back for ajuste more precisely X at LSW
G1 X-10 H1 F300 ; Move to LSW X & stop
G1 Z-20 H1 F500 ; Zdn
G90 ; Absolute
G92 X0 ; Set Home Position
; homey.g
G91 ; Relative
G21 ; Units to mm
G1 Z20 H1 F500 ; Zup (protect break bit)
G1 Y-360 H1 F1800 ; Move to LSW Y & stop
G1 Y5 F300 ; Go back for ajuste more precisely Y at LSW
G1 Y-10 H1 F300 ; Move to LSW Y & stop
G1 Z-20 H1 F500 ; Zdn
G90 ; Absolute
G92 Y0 ; Set Home PositionIt was mentioned earlier, but I don't think you changed it. The Z moves to raise the bit by 20mm have the H1 switch, which should be H2 instead. H1 is used to seek the endstop, H2 is to allow movement before the axis is homed.
Since the Z move is so short, it may not hit the endstop and that may be why your other moves are not executing?
Your photos are very helpful in understanding your setup. I'm not totally sure what else to do. CNC isn't really my wheelhouse. But please try changing H1 to H2 for the Z moves to see if that helps.
-
Thank for your interet for helping me.
I just changed H1 to H2.
By your explanation, I understand what H2 is doing.
But that doesn't solve one of my problems.; The X and Y axes cannot move: example G1 X-30 Y-30. Nothing is moving here?
; I suspect M208. I reversed the values, but it doesn't work better?; M208 X-280: 0 Y-347: 0 Z0: 137 ; G1 X-30 Y-30. Nothing is moving here?
; or
; M208 X0: 280 Y0: 347 Z0: 137 ; G1 X-30 Y-30. Nothing is moving here?
; M208 X0: 280 Y0: 347 Z0: 137 ; I think this is the good way, but nothing work?
;=============================================================
;homex.g
G91 ; Relative
G21 ; Units to mm
G1 Z20 H2 F500 ; Zup (protect break bit) H2 is to allow movement before the axis is homed.
G1 X-300 H1 F1800 ; Move to LSW X & stop
G1 X5 F300 ; Go back for ajuste more precisely X at LSW
G1 X-10 H1 F300 ; Move to LSW X & stop
G1 Z-20 H2 F500 ; Zdn
;G92 X0 ; Don't need, because min M208 set the axis position when the endstop is triggered (click)
G90 ; Absolute
;=============================================================
; homey.g
G91 ; Relative
G21 ; Units to mm
G1 Z20 H2 F500 ; Zup (protect break bit) H2 is to allow movement before the axis is homed.
G1 Y-360 H1 F1800 ; Move to LSW Y & stop
G1 Y5 F300 ; Go back for ajuste more precisely Y at LSW (Y5 & Y-10)
G1 Y-10 H1 F300 ; Move to LSW Y & stop
G1 Z-20 H2 F500 ; Zdn
;G92 Y0 ; Don't need, because min M208 set the axis position when the endstop is triggered (click)
G90 ; Absolute -
I resolve my problem, Thank you ALL.
Together we go faster. -
Glad to hear. What did you change?
-
I start to write a summary to help others. Probably today.
-
I solved my problem,
See: config, home -> CNC, Post-Processor (Fusion360, Vectric)