Quindi prima di tutto devo far fare l'azzeramento dell'utensile.
avvio -> homing -> inserisco l'utensile -> clicco sul pultante "azzera utensile" -> al G38.2 azzero l'offset e imposto le coordinate del sistema all'altezza (nota) del sensore.
Giusto?
Codice: Seleziona tutto
O<azzeramento_utensile> SUB
(MSG, Macro per l'azzeramento dell'utensile su probe da 50 mm)
#<_UseInches> = 0 ( set to 1 to use inches here, or 0 to use millimeters; should match units on tool.tbl dimensions )
#<_TravelZ> = #<_ini[TOOLSENSOR]Z> ( machine Z coordinate for travelling, typically near max Z to avoid ever hitting the work )
#<_TravelFeed> = 1000.0 ( feedrate used for general Z moves when avoiding G0 )
#<_ProbeX> = #<_ini[TOOLSENSOR]X> ( machine X coordinate of switch/touch-off plate )
#<_ProbeY> = #<_ini[TOOLSENSOR]Y> ( machine Y coordinate of switch/touch-off plate )
#<_ProbeFastZ> = 100.0 ( machine Z coord to move to before starting probe, longest tool should not touch switch at this Z )
#<_ProbeHeight> = #<_ini[TOOLSENSOR]SENSOR_HEIGHT> ( probe height )
#<_ProbeMinZ> = 10.0 ( machine Z coord to stop probe, shortest tool must touch switch at this Z, must be > min Z )
#<_ProbeRetract> = 1.5 ( small distance to retract before approaching switch/touch-off plate second time )
#<_ProbeFastFeed> = #<_ini[PLATESENSOR]FASTFEED> ( feed rate for moving to _ProbeFastZ )
#<_ProbeFeed1> = #<_ini[PLATESENSOR]FASTFEED> ( feed rate for touching switch/touch-off plate first time )
#<_ProbeFeed2> = #<_ini[PLATESENSOR]SLOWFEED> ( feed rate for touching switch/touch-off plate second time )
#< Probe_System> = #5220
G49 ( clear tool length compensation prior to saving state if this is first time )
M70 ( save current modal state )
M5 ( turn off spindle, cannot be on during the probe )
G21 ( use millimeters )
G30.1 ( save current position in #5181-#5183... )
G49 ( clear tool length compensation )
G90 ( use absolute positioning here )
G94 ( use feedrate in units/min )
G40 ( compensation Off)
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ( go to high travel level on Z )
G53 G0 X[#<_ProbeX>] Y[#<_ProbeY>] ( to probe switch )
G54 G1 F[#<_ProbeFeed1>] G91 ( use relative positioning )
(PROBEOPEN dimension_tools.txt)
G38.3 Z[#<_ProbeMinZ> - #<_ProbeFastZ>] F[#<_ProbeFeed1>] ( trip switch slowly )
G0 Z[#<_ProbeRetract>] ( go up slightly )
G0 X1 ( go X+1 slightly )
G38.3 Z[#<_ProbeRetract>*-1.25] F[#<_ProbeFeed2>] ( trip switch very slowly )
(PROBECLOSE)
G90 ( use absolute positioning )
G10 L20 P#< Probe_System> Z#<_ProbeHeight>
G43.1 Z0
O150 if [#5403 NE 0]
(DEBUG, TOOL OFFSET = #5403])
O150 endif
M61 Q0
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ( return to safe level )
O200 if [#1]
G53 G0 X[#1] Y[#2] ( return to where we were in X Y)
O200 else
G53 G0 X[#5181] Y[#5182] ( return to where we were in X Y)
O200 endif
M72 ( restore modal state )
O<azzeramento_utensile> ENDSUB [1]
M2
Codice: Seleziona tutto
O<azzeramento_pezzo> SUB
(MSG, Macro per l'azzeramento sul PEZZO con plate da 1.50 mm)
#<_UseInches> = 0
#<_TravelZ> = #<_ini[PLATESENSOR]SECUR_Z>
#<_TravelFeed> = 1000.0
#<_ProbeFastZ> = #<_ini[PLATESENSOR]SECUR_Z>
#<_ProbeHeight> = #<_ini[PLATESENSOR]THICKNESS>
#<_ProbeMinZ> = [#<_ini[PLATESENSOR]SECUR_Z> - #<_ini[PLATESENSOR]MAXPLATE>]
#<_ProbeRetract> = 1
#<_ProbeFastFeed> = #<_ini[PLATESENSOR]FASTFEED>
#<_ProbeFeed1> = #<_ini[PLATESENSOR]FASTFEED>
#<_ProbeFeed2> = #<_ini[PLATESENSOR]SLOWFEED>
#< Probe_System> = #5220
G92.1
;G49
M70
M5
G21
G28.1 ;(ABSOLUTE Z = #5163)
G90
G40
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G54 G1 F[#<_ProbeFeed1>] G91
(PROBEOPEN dimension_block.txt)
G38.2 Z[#<_ProbeMinZ> - #<_ProbeFastZ>] F[#<_ProbeFeed1>]
G0 Z[#<_ProbeRetract>]
G0 X1
G38.2 Z[#<_ProbeRetract>*-1.25] F[#<_ProbeFeed2>]
(PROBECLOSE)
G90
; Azzero la Z rispetto al sensore
G10 L20 P#< Probe_System> Z#<_ProbeHeight>
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ( return to safe level )
M72
O<azzeramento_pezzo> endsub [#5070]
M2