Reklamlar

reklam reklam

Gönderen Konu: BİLİNMEYEN MACRO  (Okunma sayısı 3515 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı birkan66

  • Şef
  • *****
  • İleti: 761
  • +44/-8
  • Cinsiyet: Bay
BİLİNMEYEN MACRO
« : Ekim 31, 2010, 12:35:59 ÖS »
ELİME BOYLE BİR SEY DENK GELDİ DEGİŞKEN ATYIP DENEYEBİLRMİYİZ ARKADASLARBELKİ İŞE YARAR BİŞİDİR
%
O1234(NUMBER ENGRAVING MACRO)
(DEVELOPED BY N. GIBBS)
(FOR GLOBAL PRECISION INDUSTRIES)
(9/16/2010)
(MACRO SETUP PREP SECTION)
#32=#4003(STORE ABS-INC)
#30=#5001(STORE ABS X POS)
#31=#5002(STORE ABS Y POS)
#33=#4005(STORE IPR-IPM)
IF[#3EQ#0]GOTO20(CHECK FOR CLEARANCE INPUT)
GOTO21(SKIP DEFAULT SETTING)
N20#3=0.05(SET DEFAULT CLEARANCE)
N21(YOU SKIPPED A LINE)
IF[#1EQ#0]GOTO20(CHECK FOR G08 INPUT)
GOTO21(SKIP DEFAULT SETTING)
N20#1=1.(SET DEFAULT TO USE G08 P1)
N21(YOU SKIPPED A LINE)
IF[#26EQ#0]GOTO20(CHECK FOR Z PLANE INPUT)
GOTO21(SKIP DEFAULT SETTING)
N20#26=0.(SET DEFAULT TO TO Z0.)
N21(YOU SKIPPED A LINE)
IF[#7EQ#0]GOTO20(CHECK FOR ENGRAVING DEPTH)
GOTO21(SKIP DEFAULT SETTING)
N20#7=0.005(SET DEFAULT TO -0.005)
N21#7=ABS[#7](YOU SKIPPED A LINE AND FIXED THE DEPTH #7)
IF[#9EQ#0]GOTO20(CHECK FOR FEEDRATE)
GOTO21(SKIP DEFAULT SETTING)
N20#9=45.(SET DEFAULT TO 45. IPM)
N21(YOU SKIPPED A LINE)
IF[#11EQ#0]GOTO20(CHECK FOR FEEDRATE)
GOTO21(SKIP DEFAULT SETTING)
N20#11=0.1(SET DEFAULT HEIGHT TO 0.1")
N21#11=#11/0.1(YOU SKIPPED A LINE AND FIXED #11)
(SAFETY CHECKS)
IF[#22EQ#0]GOTO991(MAKE SURE NUMBER WAS SPECIFIED)
IF[#7GT0.05]GOTO992(ENGRAVING DEPTH TOO DEEP)
IF[[#3+#7]LT[#7+0.025]]GOTO993(NOT ENOUGH CLEARANCE)
IF[#5003NE[#26+1.]]GOTO994(SAFE Z START HEIGHT CHECK)
IF[#4008EQ0.0]GOTO995(CHECK FOR TOOL OFFSET)
IF[#1EQ0.]GOTO20(CHECK INPUT FOR PRE PROCESS G08)
IF[#1EQ1.]GOTO20(CHECK INPUT FOR PRE PROCESS G08)
GOTO996(BRANCH FOR ALARM)
N20(SKIPPED LINE)
#15=#22(PUT #22 INTO #15 FOR USAGE)
#16=#0
#18=#0
#13=#0
N100WHILE[#16NE#15]DO1 (MAIN ENGRAVING LOOP)
IF[#8GT0.0]GOTO108 (LEADING ZEROS BRANCH)
#16=#15
IF[#16EQ0.0]GOTO109
IF[#16LT10.0]GOTO109
#17=#0
N101WHILE[#16GE10.0]DO2 (COUNT NUMBER OF SIGNIFICANT PLACES)
#16=FIX[[#16/10.0]]
#17=FIX[[#17+1.0]]
#13 =#17-1 (NUMBER OF SIGNICANT PLACES FOR SAFE KEEPING MINUS 1 FOR NEXT ROUND)
END2
#19=#16
WHILE[#17GT0.0]DO2
#19=#19*10.0
#17=#17-1.0
END2
#15=[#15-#19]
GOTO110
N108 #8=FIX[#8-1.0]
N109(SET TO ENGRAVE A ZERO)
#16=FIX[#16]
#15=#16
#13=FIX[#13-1.0]
N110GOTO#16(BRANCH TO ENGRAVING PORTION)
END1
G#33(REPLACE IPR-IPM)
G#32(REPLACE ABS-INC)
M99
(TEXT MOTION SECTION)
N0(ENGRAVE NUMBER ZERO)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[[.0059*#11]+#30]Y[[.0163*#11]+#31]
Z[#3+#26]
G1Z[#26-#7]F#9
G91G2Y[.0674*#11]R[.0986*#11]
X[.0467*#11]R[.0248*#11]
Y[-.0674*#11]R[.0985*#11]
X[-.0467*#11]R[.0247*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0586*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N1(ENGRAVE NUMBER ONE)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[0.+#30]Y[[.0857*#11]+#31]
Z[#3+#26]
G1Z[#26-#7]F#9
G91X[.0143*#11]Y[.0143*#11]
Y[-.1*#11]
G90Z[#3+#26]
G91X[-.0143*#11]
G90Z[#26-#7]
G91X[.0286*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0286*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N2(ENGRAVE NUMBER TWO)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[[.0021*#11]+#30]Y[[.0857*11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G2G91X[.0248*#11]Y[.0143*#11]R[.0286*#11]
G1X[.0022*#11]
G2X[.0285*#11]Y[-.0273*#11]R[.0286*#11]
X[-.0073*#11]Y[-.0179*#11]R[.0285*#11]
X[-.0257*#11]Y[-.0192*#11]R[.2373*#11]
G3X[-.0246*#11]Y[-.0356*#11]R[.0482*#11]
G1X[.0598*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0576*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N3 (ENGRAVE NUMBER THREE)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89 G0 G90 X[0.+#30] Y[[.0143*#11]+#31]
Z[#3+#26]
G1 G94 Z[#26-#7] F#9
G3 G91 X[.0249*#11] Y0. I[.0249*#11] J[.0145*#11]
G1 X[.0314*#11]
G3 X[.0522*#11] Y[.0078*#11] I0. J[.0315*#11]
X[.06*#11] Y[.025*#11] I[-.0151*#11] J[.0172*#11]
X[.0373*#11] Y[.0501*#11] I[-.0252*#11] J0.
G1 X[.0302*#11]
X[.0373*#11]
G3 X[.0586*#11] Y[.075*#11] I[-.004*#11] J[.0249*#11]
X[.0508*#11] Y[.0922*#11] I[-.0229*#11] J0.
X[.03*#11] Y[.1*#11] I[-.0208*#11] J[-.0237*#11]
G1 X[.0263*#11]
G3 X[.0014*#11] Y[.0857*#11] I0. J[-.0288*#11]
G1 G90 Z[#3+#26]
G08P0
#30=#30+[.06*#11]+[.02*#11]
GOTO100 (RETURN TO ENGRAVING LOOP)
N4(ENGRAVE NUMBER FOUR)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[[.0518*#11]+#30]Y[0.+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G91Y[.1*#11]
X[-.0518*#11]Y[-.0764*#11]
X[.0664*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0664*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N5(ENGRAVE NUMBER FIVE)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[0.+#30]Y[[.0142*#11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G3G91X[.0056*#11]Y[-.0064*#11]R[.0318*#11]
X[.021*#11]Y[-.0079*#11]R[.0318*#11]
G1X[.0045*#11]
G3X[.0272*#11]Y[.0158*#11]R[.0314*#11]
X[-.0012*#11]Y[.0343*#11]R[.0326*#11]
X[-.0116*#11]Y[.0103*#11]R[.0303*#11]
X[-.0169*#11]Y[.004*#11]R[.0378*#11]
X[-.0286*#11]Y[-.0086*#11]R[.0461*#11]
G1Y[.0443*#11]
X[.0605*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0626*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N6(ENGRAVE NUMBER SIX)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[[.0037*#11]+#30]Y[[.0226*#11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G2G91X[.0578*#11]Y[.014*#11]R[.0297*#11]
X[-.0006*#11]Y[-.016*#11]R[.0297*#11]
X[-.0572*#11]Y[.002*#11]R[.0297*#11]
X[.002*#11]Y[.0571*#11]R[.0891*#11]
X[.no tel*#11]Y[.0054*#11]R[.0297*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0623*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N7(ENGRAVE NUMBER SEVEN)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[0.+#30]Y[[.1*#11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G91X[.06*#11]
G3X[-.03*#11]Y[-.1*#11]R[.1817*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.060*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N8(ENGRAVE NUMBER EIGHT)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[[.0268*#11]+#30]Y[[.0536*#11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G91X[.0064*#11]
G3X[.0232*#11]Y[.0232*#11]R[.0232*#11]
X[-.0232*#11]Y[.0232*#11]R[.0232*#11]
G1X[-.0064*#11]
G3X[-.0108*#11]Y[-.0026*#11]R[.0232*#11]
X[.0108*#11]Y[-.0438*#11]R[.0233*#11]
G1X[.0064*#11]
G2X[.0268*#11]Y[-.0268*#11]R[.0268*#11]
X[-.0268*#11]Y[-.0268*#11]R[.0268*#11]
G1X[-.0064*#11]
G2X[-.022*#11]Y[.0115*#11]R[.0268*#11]
X[.022*#11]Y[.0421*#11]R[.0268*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.060*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N9(ENGRAVE NUMBER NINE)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[[.0023*#11]+#30]Y[[.0149*#11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G3G91X[.no tel*#11]Y[.0054*#11]R[.0297*#11]
X[.002*#11]Y[.0571*#11]R[.0891*#11]
X[-.0571*#11]Y[.002*#11]R[.0297*#11]
X[.0566*#11]Y[-.018*#11]R[.0297*#11]
X[.0005*#11]Y[.016*#11]R[.0297*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.0623*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
N10(ENGRAVE DECIMAL POINT)
IF[FIX[#1]EQ1.0]GOTO88
GOTO89
N88G08P01
N89G0G90X[0.+#30]Y[[.005*#11]+#31]
Z[#3+#26]
G1G94Z[#26-#7]F#9
G2G91X[.01*#11]R[.005*#11]
X[-.01*#11]R[.005*#11]
G1G90Z[#3+#26]
G08P0
#30=#30+[.01*#11]+[.02*#11]
GOTO100(RETURN TO ENGRAVING LOOP)
(ALARMS)
N991#3000=1(NO NUMBER OR VARIABLE NUMBER SPECIFIED TO ENGRAVE)
N992#3000=2(ENGRAVING DEPTH TOO DEEP)
N993#3000=3(NOT ENOUGH CLEARANCE)
N994#3000=4(NOT AT SAFE Z START HEIGHT - POSITION TOOL 1" ABOVE PART)
N995#3000=5(NO TOOL HEIGHT OFFSET CALLED UP)
%

Çevrimdışı sefine16

  • Operatör
  • **
  • İleti: 46
  • +12/-5
Ynt: BİLİNMEYEN MACRO
« Yanıtla #1 : Ekim 31, 2010, 07:09:09 ÖS »
bu makro 1den 9 a kadar rakam yazmak için üretilmiş. lakiin başlangıç satırları olmadığından

N991#3000=1(NO NUMBER OR VARIABLE NUMBER SPECIFIED TO ENGRAVE)

üstteki satır otomatik olarak hata mesajı veriyor yani numara yazılmamış diyor... bunun üst komut satırını bulabilirsen sana nasıl kullanacağını anlatırız, eğer yoksa o zaman doğrusunu inceleyip çıkartırız....

Çevrimdışı birkan66

  • Şef
  • *****
  • İleti: 761
  • +44/-8
  • Cinsiyet: Bay
Ynt: BİLİNMEYEN MACRO
« Yanıtla #2 : Ekim 31, 2010, 10:24:48 ÖS »
Bende ust komut satırını bulamadım deger atayabiliriz diye dusunerek alıp kopyaladım zaten belki simule edebiliriz yinede tesekkurler ilgilendigin icin.

Çevrimdışı sefine16

  • Operatör
  • **
  • İleti: 46
  • +12/-5
Ynt: BİLİNMEYEN MACRO
« Yanıtla #3 : Kasım 01, 2010, 02:22:42 ÖS »
üst satır yoksa tek tek bulmaktan başka çare kalmıyor. bulabilirsem cevap atarım