Hello Guest it is March 29, 2024, 11:08:32 AM

Author Topic: CNC Plasma THC surface contact finder with Mach4..  (Read 2414 times)

0 Members and 1 Guest are viewing this topic.

CNC Plasma THC surface contact finder with Mach4..
« on: May 11, 2017, 04:42:29 PM »
Hello everybody..

CNC Plasma THC surface contact finder with Mach3..

I use this script to THC Surface Contact Finder with Mach3, work excellent, Now im using Mach4 with ESS Card but this script doesn't work. anybody help me please, i want change the code to use it in Mach4.

Here is the code (M Function, M25)
Works perfect in Mach3, but doesn't work in Mach4

CurrentFeed = GetOemDRO(818)
PierceHight = -10.0
ProbeFeed = 1300.0

Code "G90 F" &ProbeFeed

If GetOemLed(825) = 0 Then
Code "G31 Z-117 F" &ProbeFeed

While IsMoving()
Wend

Code "G4 P0.25"

ZprobePos = GetVar(2002)

Message "ProbePos is " &ZprobePos


Code "G0 Z" &ZprobePos
While IsMoving()
Wend

Call SetDRO(2,PierceHight)

While IsMoving()
Wend


Code "G4 P0.6"
Code "G0 Z 0"
Code "G92 Z0.0"

Message "Z at Pierce Hight " & ZprobePos

Code "F" & CurrentFeed
StartTHC()
ZeroTHC()
Else
Code "(ERROR. Plate is Grounded)"
GotoSafeZ()
Exit Sub
End If
Re: CNC Plasma THC surface contact finder with Mach4..
« Reply #1 on: May 12, 2017, 09:35:26 AM »
M4 doesn't use VB Script.  You have to re-write the macro in Lua.
Re: CNC Plasma THC surface contact finder with Mach4..
« Reply #2 on: May 12, 2017, 11:20:06 AM »
How did you get this to work in mach3 I tried it an won't work. I found that I need to put in the code how do you do this.
Re: CNC Plasma THC surface contact finder with Mach4..
« Reply #3 on: May 12, 2017, 01:17:36 PM »
How did you get this to work in mach3 I tried it an won't work. I found that I need to put in the code how do you do this.

Hi CMARONEY...

You need copy this file to your Profile Macro folder in Mach3 (Attached file M25.M1S)

When you create your NC or TXT file to cut your part, in your plasma cnc machine just add before turn on the torch one line wit the me code M25

This is a NC File sample

%
O00380(M25 SCRIPT TEST MACH3)
N100 G21
N110 G0 G17 G40 G49 G80 G90
N120 T1 M6
N130 G0 G90 G54 X1.43 Y.452 A0.
N140 G43 H1 Z25.
N142 M25 (HERE IS THE M CODE TO LOAD THE SCRIPT FOR THC)
N144 M3
N150 G1 Z2. F400.
N160 X-23.884 Y80.614
N170 X-88.707 Y190.761
N180 G3 X-90. Y191.5 I-1.293 J-.761
N190 G1 X-120.
N200 G3 X-121.5 Y190. I0. J-1.5
N210 X-121.447 Y189.605 I1.5 J0.
N220 G1 X-91.463 Y79.664
N230 X-76.474 Y-.276
N240 G3 X-75. Y-1.5 I1.474 J.276
N250 G1 X0.
N260 G3 X1.5 Y0. I0. J1.5
N270 X1.43 Y.452 I-1.5 J0.
N272 M5
N280 G0 Z25.
N290 X-.453 Y394.779
N292 M25 (HERE IS THE M CODE TO LOAD THE SCRIPT FOR THC)
N294 M3
N300 G1 Z2.
N310 X-71.956 Y372.146
N320 G3 X-73.004 Y370.716 I.452 J-1.43
N330 X-72.993 Y370.535 I1.5 J0.
N340 G1 X-63.16 Y289.798
N350 X-58.569 Y175.934
N360 G3 X-57.071 Y174.495 I1.498 J.06
N370 X-56.618 Y174.564 I0. J1.499
N380 G1 X-28.017 Y183.617
N390 G3 X-27.007 Y184.712 I-.452 J1.43
N400 G1 X1.556 Y309.285
N410 X1.5 Y393.35
N420 G3 X0. Y394.849 I-1.5 J-.001
N430 X-.453 Y394.779 I0. J-1.5
N432 M5
N440 G0 Z30.
N480 M30
%

Try please and let me know if it works..

(PD. Sorry for my english)
Re: CNC Plasma THC surface contact finder with Mach4..
« Reply #4 on: May 16, 2017, 04:00:01 AM »
I tried it and still didn't work just don't know. Up for suggestions