ola pessoal estou com problema no meu thc uso o thc da macrol ,pois funciona bem o problema acho que esta na macro pois o probe no macha3 ele da sinal na tela diagnostico uso o sheetcan para gerar o gcodo processador (mach3 frame with THC G-31) quando roda ele para no G-31 (Probe called but not turned on )
?
função OnAbout(evento) ctrl = evento:GetTextCtrl() ctrl:AppendText("pós-processador plasma THC300\n") ctrl:AnexarTexto("\n") ctrl:AppendText("Códigos G modais e coordenadas\n") ctrl:AppendText("Comentários entre ( e )\n") ctrl:AppendText("M03/M05 liga/desliga a tocha\n") ctrl:AppendText("IJ incremental\n") ctrl:AppendText("A tocha é referenciada no início do corte e a cada 500 mm de movimento posteriormente\n") ctrl:AppendText("Projetado para uso com Mach2 e Campbell Designs THC300\n") ctrl:AppendText("Variáveis de postagem:\n") ctrl:AppendText("refdistance - define a distância entre cada referência\n")fim-- revisão 02/03/07-- Movimento de segurança final removido. Isso agora é feito no SheetCam-- revisão 10/07/05-- Adicionado novo tratamento de arco-- criado em 27/10/04-- Baseado em plasma1.postfunção OnInit() post.SetCommentChar s ("()", "[]") --certifique-se de que os caracteres ( e ) não apareçam no texto do sistema post.Text (" (Nome do arquivo: ", nome do arquivo, ")\n") post.Text (" (Pós-processador: ", postName, ")\n") post.Text (" (Data: ", data, ")\n") if(escala == métrica) então post.Text (" G21 (Unidades: Métrica)\n") --modo métrico outro post.Text (" G20 (Unidades: Polegadas)\n") --modo de polegadas fim post.Text (" G53 G90 G40\n F1\n S500\n") dist = 9999999 refdistance = 500 * escala desvio = -0,08 bigarcs = 1 --costura segmentos de arco juntos minArcSize = 0.05 --arcos menores que isso são convertidos em movimentosfimfunção OnNewLine() post.Texto ("N") post.Number (lineNumber, "0000") lineNumber = lineNumber + 10endfunction OnFinish() post.Text (" M05 M30\n")endfunction OnRapid() if(math.hypot(endX-currentX , endY-currentY) < 0.001 and endZ < currentZ) then return end dist = dist + math.hypot(endX-currentX , endY-currentY) post.ModalText (" G00") post.ModalNumber (" X", endX * scale, "0.0000") post.ModalNumber (" Y", endY * scale, "0.0000") post.ModalNumber (" Z", endZ * scale, "0.0000") post.Eol()endfunction OnMove() dist = dist + math.hypot(endX-currentX , endY-currentY) post.ModalText (" G01") post.ModalNumber (" X", endX * scale, "0.0000") post.ModalNumber (" Y", endY * scale, "0.0000") post.ModalNumber (" Z", endZ * scale, "0.0000") post.ModalNumber (" F", feedRate * scale, "0.###") post.Eol()endfunction OnArc() dist = dist + math.hypot(endX-currentX , endY-currentY) if(arcAngle <0) then post.ModalText (" G03") else post.ModalText (" G02") end post.NonModalNumber (" X", endX * scale, "0.0000") post.NonModalNumber (" Y", endY * scale, "0.0000") post.ModalNumber (" Z", endZ * scale, "0.0000") post.Text (" I") post.Number ((arcCentreX - currentX) * scale, "0.0000") post.Text (" J") post.Number ((arcCentreY - currentY) * scale, "0.0000") post.ModalNumber (" F", feedRate * scale, "0.0###") post.Eol()endfunction OnPenDown() if(dist >= (refdistance/scale)) then dist = 0 post.ModalText(" G31 Z -100") post.ModalNumber (" F", 500 * scale, "0.0###") post.Eol() post.ModalText(" G92") post.NonModalNumber(" Z", switchoffset, "0.0000") post.Eol() post.CancelModalNum bers() end--[[ post.ModalText (" G00") post.ModalNumber (" X", endX * scale, "0.0000") post.ModalNumber (" Y", endY * scale, "0.0000") post.Eol()]] if (preheat > 0) then post.ModalText (" G00") post.ModalNumber (" Z", cutHeight * scale, "0.0000") post.Eol() post.Text(" M801\n G04 P 0.5\n M802\n G04 P0.1\n M902") post.Text ("\n G04 P") post.Number (preheat,"0.###") post.Eol() end post.ModalText (" G00") post.ModalNumber (" Z", pierceHeight * scale, "0.0000") post.Text ("\n M03\n") if (pierceDelay > 0) then post.Text (" G04 P") post.Number (pierceDelay,"0.###") post.Eol() endendfunction OnPenUp() post.Text (" M05\n") if (endDelay > 0) then post.Text (" G04 P") post.Number (endDelay,"0.###") post.Eol() endendfunction OnNewOperation() post.Text (" (Operation: ", operationName, ")\n") if (plungeRate <= 0) then post.Warning("WARNING: Plunge rate is zero") end if (feedRate <= 0) then post.Warning("WARNING: Feed rate is zero") endendfunction OnComment() post.Text(" (",commentText,")\n")endfunction OnToolChange() post.Text (" M06 T") post.Number (tool, "0") post.Text (" (", toolName, ")\n")endfunction OnNewPart() post.Text(" (Part: ",partName,")\n");endfunction OnDrill() OnRapid() OnPenDown() endZ = drillZ OnMove() OnPenUp() endZ = safeZ OnRapid()endN0010 (Nome do arquivo: suporte4.tap)
N0020 (Pós-processador: Mach3 chama com THC - G31.scpost)
N0030 (Data: 01/05/2021)
N0040 G21 (Unidades: Métrico)
N0050 G53 G90 G40
N0060 F1
N0070 S500
N0080 (Peça: suporte)
N0090 (Operação: Sem offset, 0, T1: Plasma, 1,5 mm Largura de corte)
N0100 M06 T1 (Plasma, 1,5 mm Largura de corte)
N0110 G00 X91.0098 Y21.4106 Z10.0000
N0120 G31 Z -100 F500.0
N0130 G92 Z-0.0800
N0140 G00 Z3.0000
N0150 M03
N0160 G04 P0.5
N0170 G01 X91.0098 Y21.4106 Z1.5000 F100
N0180 G02 X91.0098 Y21.4106 I-1.4142 J-1.4142 F400.0
N0190 M05
N0200 G00 Z10.0000
N0210 Y46.4106
N0220 Z3.0000
N0230 M03
N0240 G04 P0.5
N0250 G01 Z1.5000 F100
N0260 G02 X91.0098 Y46.4106 I-1.4142 J-1.4142 F400.0
N0270 M05
N0280 G00 Z10.0000
N0290 X82.0956 Y58.9964
N0300 Z3.0000
N0310 M03
N0320 G04 P0.5
N0330 G01 Z1.5000 F100
N0340 Y54.9964 F400
N0350 X97.0956
N0360 Y9.9964
N0370 X82.0956
N0380 Y8.6872
N0390 M05
N0400 G00 Z10.0000
N0410 X20.0000 Y5.1977
N0420 Z3.0000
N0430 M03
N0440 G04 P0.5
N0450 G01 Z1.5000 F100
N0460 Y9.1977 F400
N0470 X5.0000
N0480 Y54.1977
N0490 X20.0000
N0500 Y55.5069
N0510 M05
N0520 G00 Z10.0000
N0530 X13.9142 Y42.7835
N0540 Z3.0000
N0550 M03
N0560 G04 P0.5
N0570 G01 Z1.5000 F100
N0580 G02 X13.9142 Y42.7835 I-1.4142 J1.4142 F400.0
N0590 M05
N0600 G00 Z10.0000
N0610 Y17.7835
N0620 Z3.0000
N0630 M03
N0640 G04 P0.5
N0650 G01 Z1.5000 F100
N0660 G02 X13.9142 Y17.7835 I-1.4142 J1.4142 F400.0
N0670 M05
N0680 G00 Z10.0000
N0690 M05 M30
'*************************************************************' MACRO M3'*************************************************************CODE "G92 Z0" ' Zera o eixo Z
CODE "G31 Z-100 F550" ' Manda o eixo Z descer 100mm com velocidade de 550mm/s até encostar na chapa
While ISMOVING() ' aguarda
WendCODE "G92 Z0" ' Zera eixo Z
While ISMOVING()Wendresetthc() ' Reset valores do THC no mach3
CODE "G1 Z4 F550" ' Sobe a tocha para 4mm com velocidade de 550mm/s
While ISMOVING()WendDoSpinCW() ' Liga a tocha
'*************************************************************