Hi Guys,
I need of your support for a problem with my macro that I use for my machine.
In this macro there is the comand M6T8 that load the probe in 8 position on my carousel..
But when the macro is started the z axis muove directly without wait the charge 8 tool.
In this macro is there necessity to write anything code for wait total charge after M6T8 code?
Following my macro and thanks on Advance
Amove = -300 ' massimo movimento per ricerca probe verso Z-
speed = 300 ' velocità di ricerca
lo_speed = 30 ' velocità di ricerca low
Aret = 25 ' di quanto arretra l'asse dopo il sensing per il secondo approccio
Amove1 = -(Aret * 5) ' massimo movimento per ricerca probe on Z- per il secondo punto
curr_tool = GetCurrentTool() ' tool nel mandrino
If GetOemLed (825) <> 0 Then ' sente se il probe è triggerato o scollegato
Code "(Il probe è triggerato o scollegato o il modulo MP1 è spento)"
End
Else
Code "M5" ' ferma il mandrino
Code "M8" ' ferma il refrigerante
GotoSafeZ() ' porta in posizione di sicurezza Z
While IsMoving() ' completa il percorso
Wend
Code "M6 T8" ' carica il probe dalla posizione 8 del carosello
Code "G91" ' spostamento relativo
CurrentFeed = GetOemDRO(818) ' legge il feedrate corrente
' primo trigger Z
Code "F" & speed ' porta il feedrate alla velocità di approccio
Code "G31 Z " & Amove
While IsMoving() ' completa il percorso a meno che si triggeri il probe
Wend
' secondo trigger Z
Code "G01 Z " & Aret
While IsMoving() ' completa il percorso a meno che si triggeri il probe
Wend
Code "F" & lo_speed ' porta il feedrate alla velocità di approccio low
Code "G31 Z " & Amove1
While IsMoving() ' completa il percorso a meno che si triggeri il probe
Wend
SetOemDRO(802,0) ' offset asse Z
Code "F" & speed ' porta il feedrate alla velocità iniziale
Code "M6 T0" & curr_tool ' ricarica il tool che era nel caroselo
Code "F" & CurrentFeed ' ripristina il feedrate originale
Code "G90" ' rimette lo spostamento assoluto
GotoSafeZ() ' riporta in posizione di sicurezza Z
While IsMoving() ' completa il percorso
Wend
End If