Classification Gcode par sujet
Ce sujet avec la bonne information ce trouve dans la classification: General Discussion
Classification Gcode par sujet
Ce sujet avec la bonne information ce trouve dans la classification: General Discussion
I start with the forum. I put my problem in the wrong place
I solved my problem,
See: config, home -> CNC, Post-Processor (Fusion360, Vectric)
For the "emergency stop" see also "manual emergency stop".
https://duet3d.dozuki.com/Wiki/Connecting_an_Emergency_Stop.
If it can help a beginner then fine.
I start to write a summary to help others. Probably today.
I resolve my problem, Thank you ALL.
Together we go faster.
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
@Clement-B
Clarify, I going to home by the button Home
and only after it is not possible to moving X & Y in positif place, X+100 Y+100 (example)
@Phaedrux
ok, I see this,
thank
I think I don't understand the M208 command well.
I think the commands in homex and homey are due to my misunderstanding of M208 ... G92
There are a few things that I don't quite understand.
The lengths of the axes of my CNC are: X = 280 Y = 347 Z = 137mm
For the LSW to be touched by the Z axis by command G1 Z180 H1 F1800.
X G1 X-300 H1 F1800.
Y G1 Y-360 H1 F1800.
After these 3 commands, my router is at the left limit on the X axis (at the X- limit)
base limit on the Y axis (at the Y- limit)
high limit on the Z axis (at the Z + limit)
I want my Home position to be there for the X and Y axes.
But for Z, I want the position to be 120mm below the Z limit. So Z-120mm.
I want my movements work only within the limits of my CNC.
How I write this in Gcode in my config.g and home_.g files
And then, if possible, translate my RRF2.03 version into RRF3 version.
;============================================================
;============================================================
;============================================================
; This my code + commentary *****************************************************************
; Duet2 Firmware RRF2.03
; ---Generales---
G90 ; Absolue (A space is needed before an E parameter)
M669 K0 ; Knnn Kinematics type: 0=Cartesian
M453 S0 ; S0=CNC S0=default spindle (S0-S3 spindle max)... Here: M3/M4/M5 control the pins defined for the milling device
; ---Network---
M550 P"CBeam" ; Machine name
M551 P" " ; Set password
M552 S1 P172.16.1.74 ; S1=Enable network -> Ethernet - Change IP Address to suit
M586 P0 S1 ; Enable HTTP S1=enable
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet
M540 PBE:64:4B:54:52:5C ; MAC Address (Use when more 1 duet on the same network). Change only last byte: 00..FF BE:64:4B:54:52:5C -> 172.16.1.74
; ---Drives---
M569 P0 S1 ; Drive P0.1 DIR: S0=Backwards - S1=Forwards +
M569 P1 S1 ; Drive P0.2
M569 P2 S1 ; Drive P0.3 Zdn=- Zup=+
M584 X0 Y1 Z2 ; Associer Driver & Axe
; ---Axis_Config---
M350 X16 Y16 Z16 I1 ; Microstepping (16=with interpolation)
; C_Beam -> leadscreew=diameter=8mm, pitch=2mm. 8mm!=diameter->(8mm/rev)/pitch=4starts 4starts=kind of screw
M92 X800.00 Y800.00 Z800.00 ; steps/mm 0.9degre/step=400step/rev 400*16ustep=6400 6400/4=800step/mm
M566 X300.00 Y300.00 Z300.00 ; Speed change 500mm/min Speed start at 300 = minimum speed
M203 X2000.00 Y2000.00 Z2000.00 ; Speed max <-G0 2520mm/min
M201 X150.00 Y150.00 Z150.00 ; Acceleration 150mm/s^2
M906 X800 Y800 Z800 I30 ; 2400mA max, 800mA/bobine & motor idle 30%) StepMotor: JUGETEK_57H56M-2804A=1.68A(85%=good) 0.9degre 1.2N.m Nema23
;M906 X2400 Y2400 Z2400 I100 ; Current https://blog.prusaprinters.org/calculator/
M84 S10 ; Idle->I30 After 10sec of inactivity -> current 30%
;M579 X0.988 Y0.988 Z0.988 ; Calibration 300mm=demand size/303.6mm=reel size -> M579 Cartesian mode
M18 ; Motor->OFF G0-G3 Motor->ON
; ---Axis_Limits---
M208 X0:280 Y0:347 Z0:137 ; Xmin:max X->279.4mm=11" Y->346.075mm=13 5/8" Z->136.525mm=5 3/8"<-CBeam z0->LSW Limit min=S1 max=S0 Zup=+ Zdn=-
M564 S1 H1 ; S1=use LSW S0=not use LSW H1=set Home before move H0=no set Home
; ---Fans---
;M950 F0 C"out7" Q500 ; Create fan 0 on pin out7 and set its frequency
;M106 P0 S0 H-1 ; Set fan 0 value. Thermostatic control is turned off
; ---Endstops---
M574 X2 Y2 Z2 S0 ; Set active low endstops. X0=none X1=low_end X2=high_end S0=active_LOW_enstop_input S1=active_HIGH_enstop_input
; ---Probes---
M558 P0 H5 F120 T2160 ; P0=no probe. Disable Z probe but set la hauteur de plonger, probe speed & travel speed
; ---Heaters---
M140 H-1 ; Negative value = disable heater_1 bed
; ---Lasers---
;M452 ; If M452 -> G0 G1:S=0-255 Value power Laser: 0-255
; ; H0=no_action H1=LSW+M208->limite H3=LSW+position_axe->limite H2=individuel axe (no_CNC)
; ---Tools---
M563 P0 ; P0= Tool0 Need defind allway
;G10 P0 X0 Y0 Z0 ; Set Tool0 axis offsets
;G10 P0 R0 S0 ; Set initial Tool0 active and standby temperatures to 0C
; ---Others---
M911 S21.0 R23.0 P"G91 G1 Z3 F1000" ; Save info if power loss. PowerSupply:24V 21V=stop 23V=restart (Z up de 3mm en relatif)
;M501 ; Load config-override.g (Stored Parameters)
;M98 P"customconfig.g" ; Execute custom config settings
;=================================================================================
; X->279.4mm=11" Y->346.075mm=13 5/8" Z->136.525mm=5 3/8"<-CBeam X=300 Y=360 Z=150
; 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 Position
; 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 Position
; homeall.g
G91 ; Relative
G21 ; Units to mm
G1 Z170 H1 F1800 ; Move to LSW Z & stop Zup=+
G1 Z-5 F300 ; Go back for ajuste precisely at LSW
G1 Z9 H1 F300 ; Move to LSW Z & stop
G1 X-300 Y-360 H1 F1800 ; Move to LSW X & stop
G1 X-5 Y-5 F300 ; Go back for ajuste more precisely X at LSW
G1 X10 Y10 H1 F300 ; Move to LSW X & stop
G1 Z-120 F1400 ; Go Home
G90 ; Absolute
G92 X0 Y0 Z-120 ; Set Home Position
Here, I don't use macro file but the button homeX which calls the "homex.g" file,
I apologize for not being clear enough.
@Danal said in Why in home XY different G1 is not execute in my code?:
Using dashboard "homex" button, or G28 X command, does the X axis show as homed after all this executes?
Using dashboard "homex" button, or G28 X command, does the X axis show as homed after all this executes?
I use DuetPanel,
Control | I execute "homex.g" . The command G1 X-10 and G1 Z-20 is not execute, but for Z this not in the limit place?
G1 X-10 H1 F300
G1 Z-20 H1 F500
With command G28 X, this work correctly.
You appear to be missing a space after M92
Thank for your answer, but
Are spaces required between commands?
This is a question.
One problem is you could be trying to move Z before it is homed.
No, because home is before the problem.