Hello Guest it is October 23, 2019, 10:42:12 PM

Author Topic: Macro for zero Piece not run... probably need of your help.  (Read 980 times)

0 Members and 1 Guest are viewing this topic.

Macro for zero Piece not run... probably need of your help.
« on: April 03, 2018, 03:36:14 AM »
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

Offline TPS

*
  •  1,391 1,391
    • View Profile
Re: Macro for zero Piece not run... probably need of your help.
« Reply #1 on: April 03, 2018, 03:41:52 AM »
load it into VB Scriper Window use the green >|| button to step
through and see what is Happening.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Macro for zero Piece not run... probably need of your help.
« Reply #2 on: April 03, 2018, 03:58:13 AM »
I try it... the results is the same :(

Offline TPS

*
  •  1,391 1,391
    • View Profile
Re: Macro for zero Piece not run... probably need of your help.
« Reply #3 on: April 03, 2018, 04:15:15 AM »
so what is Happening if you excecute the

M6T8 line?

i have tryed it here, it is jumping into M6 but then i can't test more,
because i dont have the same physics.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Macro for zero Piece not run... probably need of your help.
« Reply #4 on: April 03, 2018, 04:19:41 AM »
When execute m6t8 in the macro for zero pièce, the machine run directly to find the indicize but not wait the toolchange and In the screen of mach3 the tool is update to 8.
I don't know why!

Offline Tweakie.CNC

*
  • *
  •  7,958 7,958
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Macro for zero Piece not run... probably need of your help.
« Reply #5 on: April 03, 2018, 04:29:49 AM »
To avoid duplication this topic continues here; http://www.machsupport.com/forum/index.php/topic,36943.0.html

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.