macro grubośc płytki

Dyskusje dotyczące najpopularniejszego programu sterującego maszynami CNC

Autor tematu
lukon
Stały bywalec (min. 70)
Stały bywalec (min. 70)
Posty w temacie: 4
Posty: 75
Rejestracja: 06 maja 2009, 19:53
Lokalizacja: Żurowa

macro grubośc płytki

#1

Post napisał: lukon » 27 kwie 2017, 21:03

Witam
Sciągnąłem macro wszystko chodzi bardzo ładnie tylko gdzie wpisac grubośc płytki (czujnika wysokości narzedzia) ?


CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded!) " 'this goes in the status bar if aplicable
Exit Sub
End If


człowiek całe życie się uczy! NUTOOL:)

Tagi:

Awatar użytkownika

k-m-r1
ELITA FORUM (min. 1000)
ELITA FORUM (min. 1000)
Posty w temacie: 1
Posty: 1417
Rejestracja: 23 cze 2008, 10:38
Lokalizacja: OOL lub DW
Kontakt:

#2

Post napisał: k-m-r1 » 27 kwie 2017, 22:01

Kod: Zaznacz cały

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = 2.00   ' 2.00mm grubość   GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded!) " 'this goes in the status bar if aplicable
Exit Sub
End If
[b]MACH3 cnc[/b]Tworzenie Makr do palników magazynków THC OHC inne[b]EKRANY dla firm producentów maszyn[/b] Budowa sprzedaż wypalarki plazma gaz obrotnice Elektrodrążarki Frezarki Tokarki Giętarki3D inne wg zlecenia 888 708 196 Tomek Komor [email protected]


Autor tematu
lukon
Stały bywalec (min. 70)
Stały bywalec (min. 70)
Posty w temacie: 4
Posty: 75
Rejestracja: 06 maja 2009, 19:53
Lokalizacja: Żurowa

#3

Post napisał: lukon » 28 kwie 2017, 19:51

Super śmiga aż miło pozdrawiam
człowiek całe życie się uczy! NUTOOL:)


Autor tematu
lukon
Stały bywalec (min. 70)
Stały bywalec (min. 70)
Posty w temacie: 4
Posty: 75
Rejestracja: 06 maja 2009, 19:53
Lokalizacja: Żurowa

#4

Post napisał: lukon » 06 maja 2017, 19:18

A może ktoś posiada macro co by robiło tak jak w tym filmie

człowiek całe życie się uczy! NUTOOL:)


kubomanik
Sympatyk forum poziom 2 (min. 50)
Sympatyk forum poziom 2 (min. 50)
Posty w temacie: 1
Posty: 63
Rejestracja: 28 paź 2015, 21:13
Lokalizacja: Kraków

#5

Post napisał: kubomanik » 06 maja 2017, 22:39

Lukon. Makro wysłałem na priva


Autor tematu
lukon
Stały bywalec (min. 70)
Stały bywalec (min. 70)
Posty w temacie: 4
Posty: 75
Rejestracja: 06 maja 2009, 19:53
Lokalizacja: Żurowa

#6

Post napisał: lukon » 07 maja 2017, 06:52

Dzieki wielkie

(oczywiście pomógł)
człowiek całe życie się uczy! NUTOOL:)

Awatar użytkownika

KAPaGo
Specjalista poziom 1 (min. 100)
Specjalista poziom 1 (min. 100)
Posty w temacie: 1
Posty: 172
Rejestracja: 04 sie 2004, 14:45
Lokalizacja: EU

#7

Post napisał: KAPaGo » 17 maja 2017, 22:22

Czy ja mógłbym też prosić o makro?

ODPOWIEDZ Poprzedni tematNastępny temat

Wróć do „Mach 2 / 3 / 4 (ArtSoft software)”