Hi Les,
I got the M03 code to work,but I had to edit allot of this to make it work the way I want,Here is the code that I use in the M03,Bob’s website had one but don’t know how it would have worked for anyone right,since his code didn’t read the probe position it just went back up the switch travel and the cutheight,since my z axis had a 10:1 gear reduction it took longer to come to a stop and over shot the switch well bob’s didn’t add this in to move back up to so it left the torch on the plate :)Here is my Revised version which should work for most people Using the THC300 Boards,I Comment my code so anyone can read it without any question as to what it does.
'M03 Code
'THC300 Users With Floating Head Running The M03 G31 Probe Cycle,By Erik Pecchi CNCINMOTION.COM(Rev 1) 4-23-07
'Note found out if you have a spindle DWELL other than 0 it will not add the correct PierceDelay after turning on the Torch
'Users should use the P&F SET File for proper DRO’S and Leds on the screen,But you just need the right ones on any screen Set,See below
'DRO’S (1000,1001,1002,1003)
CurrentFeed = GetOemDRO(818) 'Get The Current Feedrate
ProbeFeed = 20 '(testing for now) GetUserDRO(1152) 'You Could Put A Probing Feedrate Here Instead
CutHeight = GetUserDRO(1003) 'This Reads The THC300.Set Screens Intinal Cut Height DRO
SwitchTravel = GetUserDRO(1002)'This Reads The THC300.Set Screens Switch Travel DRO
PierceDelay = GetUserDRO(1001)'This Reads The PierceDelay DRO
PierceHeight = GetUserDRO(1000)'This Reads The PierceHeight DRO
'Code “G90 F” &ProbeFeed
If GetOemLed (825)=0 Then ’ This Is The Digitize Input Pin
Code “G31Z-8 F” &ProbeFeed’This Moves Z Axis Down 8" This Is A User Defined Travel
While IsMoving()
Wend
Code “G4 P0.25”'Pause For Dro To update,don’t really need these tho
ZProbePos = GetVar(2002)'This Is The Probe Positions DRO
Code “G0 Z” &ZProbePos 'Move Back To Where The Switch Was Closed
While IsMoving ()
Wend
Code “G92Z0” 'Zero’s The Z To 0.0 -Another Way Is To Insert This Code To Update The DRO “Call SetDro (2, 0.0)”
Code “G4 P0.25” 'Pause For Dro To Update.
Code “G0 Z” &(PierceHeight + SwitchTravel) 'Change The Z To Pierce Height + SwitchTravel,see below Pierce up high
Code “F” &CurrentFeed
While IsMoving ()
Wend
DoSpinCW()
Code “G4 P” & (PierceDelay)
Code"G0Z"&CutHeight ’ Pierced up high then go to cut height
Code “F” &ProbeFeed
Else
Code “(Torch Is On Surface Hit STOP Button,& Fix Torch Tip)”
Exit Sub
End If
Now here is another thing that i need to get resolved,Since i don’t need SheetCam to worry about the Piercedelay,EndDelay,CutHeight,or PierceHeight,I’m not sure what post to use so i’m starting with the simplest one mach2plasma.post, How can i get rid of the PierceHeight when using the Mach2.Post,Running this post it inserts the PierceHeight of 0.00 which makes the torch go to the surface,then it runs the M03,Here is a example from the mach2 plasma .Post,not sure if this is where it is or not to be looking?
function pendown()
if (preheat > 0.001) then
modaltext (" G00")
modalnumber (" Z", cutheight * scale, “0.0000”)
text (“\n G04 P”)
number (preheat,“0.###”)
eol()
end
modaltext (" G00")
modalnumber (" Z", pierceheight * scale, “0.0000”)
text (“\n M03\n”)
if (piercedelay > 0.001) then
text (" G04 P")
number (piercedelay,“0.###”)
eol()
end
end
I opened the Mach2plasma.post file and under the Pendown i see there you check to see if Preheat is Greater then 0.001 then do something but under PierceHeight there is no if statement checking if it is Greater then 0.001 then don’t insert the code ,
Modaltext(“G00”)
Modalnumber(“z”,PierceHeight*scale.“0.000”)
text(“\nM03\n”)
I’m not sure how this code is being used,but looks close to VB
I Just need sheetcam to check the PierceHeight and see if it is 0.000 then Don’t insert the Pierceheight line of code.
Here is a small shape that i have been working on,and the Gcode it creates:
N0000 (Filename: leg plate.tap)
N0010 (Post processor: P&F.post)
N0020 (Date: 4/23/2007)
N0030 G20 (Units: Inches)
N0040 G53 G90 G40
N0050 F1
N0060 S500
N0070 (Part: leg plate)
N0080 (Process: Plasma, 1, 1\2" Steel .060Kerf)
N0090 G00 Z0.5000
N0100 M06 T2 F35 (1\2" Steel .060Kerf)
N0110 G00 Z0.5000
N0120 X0.2973 Y0.3145
N0130 Z0.0000 -------------------------------------------This is where i don’t need this line of code
N0140M03
N0150 G02 X0.1550 Y0.5000 I0.0497 J0.1855 F35.0
N0160 X0.1550 Y0.5000 I0.3450 J0.0000
N0170 X0.1906 Y0.5464 I0.0480 J0.0000
N0180 M05
N0190 G00 Z0.5000
N0200 X0.2973 Y4.3145
N0210 Z0.0000 -------------------------------------------This is where i don’t need this line of code
N0220M03
N0230 G02 X0.1550 Y4.5000 I0.0497 J0.1855
N0240 X0.1550 Y4.5000 I0.3450 J0.0000
N0250 X0.1906 Y4.5464 I0.0480 J0.0000
N0260 M05
N0270 G00 Z0.5000
N0280 X4.2973 Y4.3145
N0290 Z0.0000 -------------------------------------------This is where i don’t need this line of code
N0300M03
N0310 G02 X4.1550 Y4.5000 I0.0497 J0.1855
N0320 X4.1550 Y4.5000 I0.3450 J0.0000
N0330 X4.1906 Y4.5464 I0.0480 J0.0000
N0340 M05
N0350 G00 Z0.5000
N0360 X4.2973 Y0.3145
N0370 Z0.0000 -------------------------------------------This is where i don’t need this line of code
N0380M03
N0390 G02 X4.1550 Y0.5000 I0.0497 J0.1855
N0400 X4.1550 Y0.5000 I0.3450 J0.0000
N0410 X4.1906 Y0.5464 I0.0480 J0.0000
N0420 M05
N0430 G00 Z0.5000
N0440 X-0.1723 Y4.9355
N0450 Z0.0000 -------------------------------------------This is where i don’t need this line of code
N0460M03
N0470 G02 X-0.0300 Y4.7500 I-0.0497 J-0.1855
N0480 G01 Y0.2500
N0490 G03 X0.2500 Y-0.0300 I0.2800 J0.0000
N0500 G01 X4.7500
N0510 G03 X5.0300 Y0.2500 I0.0000 J0.2800
N0520 G01 Y4.7500
N0530 G03 X4.7500 Y5.0300 I-0.2800 J0.0000
N0540 G01 X0.2500
N0550 G03 X-0.0300 Y4.7500 I0.0000 J-0.2800
N0560 G02 X-0.0656 Y4.7036 I-0.0480 J0.0000
N0570 M05
N0580 G00 Z0.5000
N0590 M05 M30
I guess i could set the pierceHeight to match my Rapid clearence it might work,just thinking about it now,but not sure.
So will you need to make a new post,or is there one i can use that will work,i figured you would know the best.
This machine is going to Egypt so i need it to work perfect here before i ship it.
Thanks Les
Erik Pecchi
----- Original Message -----
From: Leslie Newell
To: sheetcam@yahoogroups.com
Sent: Friday, April 13, 2007 5:56 PM
Subject: Re: [sheetcam] Re: G28.1 problems THC300 setup Mach3
I have to admit I also think probe is better than home. Home should be
for the machine’s physical limits, not the position of the work.
Probably very few people bother to use soft-limits. Without soft-limits
it doesn’t really matter where the Z home is. ISTR that the earlier THC
posts did use probe but there were reliability problems. It may well be
that the problems have now been solved with the later versions of Mach.
You should either use a Mach M03 macro to do the probe and use a non-THC
post or let SheetCam take care of all of the work. Trying to mix the two
is likely to cause more problems than it solves.
Erik, if you work out the correct G-code sequence for a probe-zero
cycle, I’ll write a post that will generate it for you. I can’t test the
code myself as I don’t have THC. In fact my plasma isn’t even working at
the moment…
Les
Erik wrote:
Yes im using the latest version of Mach3,I think my problem is with
the g28.1 routine which is a reference home command,i don’t see how
this would ever work for someone!From what i got from it,is that it
moves a axis toward the ref switch,and sets the machine cords to o.oo
so if i set my z axis up so it homes toward the table(which is wrong)
this will go down and touch off the plate and then next line of code
set 0.00 it would kinda work ,but now the machine mech limits are
ref off of the plate surface and not the physical min and max
travels of the that axis.This way seems all wrong and the g31 probe
comand should be the way to go,but i will have to find the right
post processor for sheetcam to add the right m03,m05 to the code in
the right place,and change the m03 in thc300 folder for the code
from bob cambells pdf,but there is the problem i can’t find that m03
file anywhere ,can anyone help me on this,I got a headache from this
one,looking at the code in the pdf its all wrong and looks like it
won’t work there is (wendif),
I would think i’m not the only person running the THC300 kit and the
THC300 setup files,But bob’s Websits is missing the m03 file for
everything to work,and the sheetcam post processor also to work
along with the m03.
Any help would be nice.
Thanks Erik
[Non-text portions of this message have been removed]