otomatik takım değiştirme

harunk38

Üye
Katılım
29 Haz 2018
Mesajlar
3
Puanları
1
Yaş
41
arkadaşlar merhaba ben siteye yeni üye oldum akşam beride baya konu okudum emeğinize sağlık ancak otomatik takım değiştirme makrosuna ihtiyacım var lütfen yardımcı olun

makinam 6 tane takıma göre y üzerinde 3 sağda 3 solda takım tutucular y de hareket ediyor
ilk 1 takım kordinatı X 176 Y 0 Z 112
2 TAKIM KORDİNATI X 349 Y 0 Z 112
LÜTFEN YARDIMCI OLURMUSUNUZ
 
Kod:
Sub Probe(CurrentToolNum)                                                                'The tool change and probing sub-routine
XPos = 12                                                                                'X-M.C. of the fixed touch plate
YPos = 612
ZPos = 154                                                                                'Y-M.C. of the fixed touch plate
ZProbeStart = -100.00                                                                    'Z-M.C. Height above fixed touch plate, where the probing starts
ZProbeMax = -165.00                                                                        'Z-M.C. The probe is supposed to touch, before this depth is reached. If if does it's an error, or tool is not in spindle.
ZRetract = 2.00                                                                            'Must be a positive value! Number of units to retract the Z-axis between 1.st and 2.nd probe sequence
ProbeFeed1 = 300                                                                        'Feed of the first probe run
ProbeFeed2 = 50                                                                            'Feed at the second probe run, to get a more precise measurement
XYZFeed = 850

CurrentFeedRate = GetOEMDRO(818)                                                        'Read the current feed rate

Code "G01 F" & XYZFeed
Code "G53 G00 Z" & ZPos
Code "G53 G00 X" & XPos & "Y" & YPos                                                    'Move tool over the touch plate location
While IsMoving
Sleep(100)
Wend

SetOEMDRO(802, 0.0000)                                                                    'Reset the Z-axis Work DRO to 0.0, now both M.C. and work coordinates are 0.0
Sleep (250)                                                                                'Wait for DRO to update

'---First probe run---
Code "G53 G00 Z" & ZProbeStart                                                            'M.C. Rapid down to probe starting position
While IsMoving
Sleep(100)
Wend
Code "G01 F" & ProbeFeed1                                                                'Change the feedrate
Code "G31 Z" & ZProbeMax                                                                'Do the actual probing, at 1.st feed rate.
While IsMoving()                                                                        'Wait for probing to finish.
Wend                                                                                    'End of while loop
ProbeDist = GetVar(2002)                                                                'Read the z-axis value of probe touch point

'---2.nd probe run with reduced speed---
Code "G00 Z" & ProbeDist + ZRetract                                                        'Retract "ZRetract" units before starting 2.nd probe
Code "G01 F" & ProbeFeed2                                                                'Change the feedrate
Code "G31 Z" & ZProbeMax                                                                'Do the actual probing, at 2.nd feed rate.
While IsMoving()                                                                        'Wait for probing to finish.
Wend                                                                                    'End of while loop
ProbeDist2 = GetVar(2002)                                                                'Read the z-axis value of probe touch point

SetToolParam(CurrentToolNum,2,ProbeDist2+150)                                            ' Set Current Tool number, with parameter 2 = Z offset, to the ProbeDist + 150)

End Sub

Açıklamalar yazıyor gerekli parametreleri cnc ye göre değiştir
Bu kod Yusuf SEYHAN tarafından yazıldı bn sadece aktarıyorum
 
Moderatör tarafında düzenlendi:
Makinamın takım degiştirme sekli böyle buna uygun macro arıyorum lütfen yardımcı olun

DB6A8AA5-C856-4349-A5F5-2E936F98AD41.jpeg
 
Hazır kod olmaz. O kodu makine göre editleyeceksin. Haliyle bindirmemen için biraz kodu öğrensen iyi edersin. Çok zor değil.
 

Forum istatistikleri

Konular
129,090
Mesajlar
923,156
Kullanıcılar
451,395
Son üye
ozer4

Yeni konular

Geri
Üst