It is currently Thu Jun 21, 2018 4:12 am

 

Mach3 THC off-THC on g code?

Mach 3 CNC from Artsoft questions or tips can be posted to this forum.
tm america
Posts: 149
Joined: Sat Feb 23, 2013 12:24 am

Mach3 THC off-THC on g code?

Postby tm america » Wed Dec 02, 2015 11:59 am

I have been looking everywhere for the answer to this question and coming up empty?Which g code is used to enable and disable the THC in mach3?I want to set it up so sheetcam writes the g code to turn the thc off and on when the cutting rules dictate..But i am not seeing anywhere in mach to set this up nor am i finding anything as far as documentation on the art soft website about it..I know it can and has been done..Is there are standard g code that is set for thc off?thc on? Or is there somewhere in mach to set it up? Thanks in advance ..

User avatar
acourtjester
Elite Contributing Member
Elite Contributing Member
Posts: 3010
Joined: Sat Jun 02, 2012 6:04 pm
Location: Pensacola, Fla

Re: Mach3 THC off-THC on g code?

Postby acourtjester » Wed Dec 02, 2015 2:37 pm

I think the main stumbling point is finding a post processor that would do it for you you would need Les to write one for you and then use that to control a relay to shut off power or the arc ok signal. Timing may also be an issue as to how quickly it could be done.
DIY 4X4 Plasma/Router Table
CandCNC DTHC-IV & Feather Touch
Hypertherm PM65 Machine Torch
Drag Knife and Scribe
Miller Mig welder
13" metal lathe
Small Mill
Everlast PM 256 tig

User avatar
SeanP
Elite Contributing Member
Elite Contributing Member
Posts: 770
Joined: Thu Aug 01, 2013 11:50 am
Location: Co Kerry, Ireland

Re: Mach3 THC off-THC on g code?

Postby SeanP » Wed Dec 02, 2015 5:04 pm

I am using S20 to turn on & S10 to turn off.

Clip_4.jpg

You do not have access to download this dxf file.
Become a Contributing Member to gain access to the thousands of files shared by our members. Click Here

Powermax 45 with Duramax torch.
Home built table, Candcnc DTHC 2, Dragoncut 620-4
R-Tech 210 Tig, Jasic 250 mig
Sheetcam, Scanything, Coreldraw X8, Solidworks
Table build gallery

tcaudle
Posts: 973
Joined: Tue Feb 28, 2012 6:47 pm

Re: Mach3 THC off-THC on g code?

Postby tcaudle » Wed Dec 02, 2015 8:18 pm

tm america wrote:I have been looking everywhere for the answer to this question and coming up empty?Which g code is used to enable and disable the THC in mach3?I want to set it up so sheetcam writes the g code to turn the thc off and on when the cutting rules dictate..But i am not seeing anywhere in mach to set this up nor am i finding anything as far as documentation on the art soft website about it..I know it can and has been done..Is there are standard g code that is set for thc off?thc on? Or is there somewhere in mach to set it up? Thanks in advance ..


There is no G code to turn THC on or off
Mach has a THC on and THC off function . You have to write a macro that calls the function. If you have a button on your screen that does it you can simply write two macros to turn the THC ON or the THC off.

Here is one that looks at the THC LED to see if its on or off then clciks the button if it needs to
Macro M101.m1s

'turn off THC
If GetOEMLED(24) Then
Call DoOEMButton(123)
END if

M102.m1s

'turn on THC
If GetOEMLED(24) = False Then
Call DoOEMButton(123)
END i

So those work a treat as long as you don't call the macro during motion. The probelm is that macros in G code in MACH get parsed like any other command line and get executed so motion stops until the code is executed . There is no practical way to do a dynamic THC ON/OFF in g-code with conventional macros.

The 's" code works with the fact that S commands are executed in a line of motion so they do not cause a pause . Before you get excited to make an S code do anything but change the RPM value in MACH you have to have a custom plugin that can translate a value and call a function internally. Even then there will be some delay . If you have a THC (hardware) that can enable or disable the UP /DOWN signals (basicaly turning it off , you can use an output to hardware disable the THC signals but you have to use a method that does not depend on a true macro.

There is one set of macros (M10 & M11) that are NOT handled by MACH the same way and get processed outside motion. The only probelm is that all you can do with M10 and M11 is turn an output one or off (example M10P1 turns off output1). With some fancy redirect you can map an output to a function in MACH . The other way is to have it mapped to a real output and have that disable the THC hardware rather thantrying to turn off the THC logic in MACH

tm america
Posts: 149
Joined: Sat Feb 23, 2013 12:24 am

Re: Mach3 THC off-THC on g code?

Postby tm america » Wed Dec 02, 2015 11:19 pm

I already have the sheetcam post processor set up to do this i have this function set up on my controllers along with being able to control 8 more relays. Les was super helpful getting me set up with the basic post processor..I have added alot to it. but with mach and most of the mach controllers there is just a spindle relay?So doing it with a relay would require a different controller..The machine i am trying to add the feature to has a tb6560 controller.. Super basic no extras..So i am looking at the THC off-on button on the screen thinking it must be possible to disable it in mach which i guess should be able to be done in mach..But the documentation sucks for this..I guess i need to do more research on setting up macros in mach?
This is an old mach machine i built before i started using my new controllers ..Now that i have the machines doing so much with the new set up it is really hard for me to use a mach machine..Cant believe the difference having the path rules dialed in with the right machine vs old technoligy ..What a difference in cut quality..Old set up you either get good circles or speed.. with the new set up everything is laser quality and almost zero dross..

vmax549
Posts: 399
Joined: Wed Oct 14, 2009 10:22 pm

Re: Mach3 THC off-THC on g code?

Postby vmax549 » Thu Dec 03, 2015 12:22 am

You may want to try a { Brain } to watch the S value and set the thcon/off according to S value S1000 = THCon S2000 = THCoff

OR possibly a { macropump } section to watch it.

(;-) TP

desmond
Posts: 3
Joined: Thu Apr 20, 2017 6:36 am

Re: Mach3 THC off-THC on g code?

Postby desmond » Thu Apr 20, 2017 7:14 am

Hi all,

I am struggling to get the thc disabled and enabled for hole cutting.

My setting are as tcaudle mentioned in his post, for the m101 and m102 codes and are stored in the macros folder. What bugs me is that when entered into the dmi the led switches on and off (using thc 300 screenset) but on actual cutting, the torch still dives into the plate (cutting @ 40%).

Mach-3
Sheetcam with mp1000-thc post
Cnc controls and thc from Leeuwinga.

Can someone please assit me with this...

User avatar
acourtjester
Elite Contributing Member
Elite Contributing Member
Posts: 3010
Joined: Sat Jun 02, 2012 6:04 pm
Location: Pensacola, Fla

Re: Mach3 THC off-THC on g code?

Postby acourtjester » Thu Apr 20, 2017 11:02 am

If the torch is diving at the start of cutting (after pierce) you may look to see if you have a delay you can add to allow the arc voltage to stabilize.
This will hold off the THC for about 1.5 to 2 seconds.
DIY 4X4 Plasma/Router Table
CandCNC DTHC-IV & Feather Touch
Hypertherm PM65 Machine Torch
Drag Knife and Scribe
Miller Mig welder
13" metal lathe
Small Mill
Everlast PM 256 tig

desmond
Posts: 3
Joined: Thu Apr 20, 2017 6:36 am

Re: Mach3 THC off-THC on g code?

Postby desmond » Thu Apr 20, 2017 1:09 pm

acourtjester wrote:If the torch is diving at the start of cutting (after pierce) you may look to see if you have a delay you can add to allow the arc voltage to stabilize.
This will hold off the THC for about 1.5 to 2 seconds.



Hi acourtjester,

Where will I be able to add/set that?

Thank you

tcaudle
Posts: 973
Joined: Tue Feb 28, 2012 6:47 pm

Re: Mach3 THC off-THC on g code?

Postby tcaudle » Thu Apr 20, 2017 4:51 pm

If you have no way to software control the THC ON/OFF then you cannot program in a delay unless your THC has that option. The Macro you talk about will not work because they create a motion pause as they execute so do not work embedded in a motion line. There are some ways to use M10 and M11 to do that but you have to have an input on the THC to disable / enable the THC function and assign the M10 off code to an ouput physically connected to that designated input.

User avatar
East German
Elite Contributing Member
Elite Contributing Member
Posts: 379
Joined: Sat Jan 05, 2013 8:21 am
Location: Stapelburg Germany

Re: Mach3 THC off-THC on g code?

Postby East German » Fri Apr 21, 2017 1:49 am

Hello


I make with relay works very well.

Peter

THC off.jpg

RelaisTHC.jpg

You do not have access to download this dxf file.
Become a Contributing Member to gain access to the thousands of files shared by our members. Click Here

Sorry for my language! The last English class was in 1982.

Homemade CNC Plasma-Watertable with Mach 3
Triple Beast + Leadschine Drive
Hypertherm Powermax 85
Machine Torch + PriceCNC THC
Hypertherm Powermax 1100
Machine Torch + Proma THC


Return to “Mach3 CNC”

Who is online

Users browsing this forum: No registered users and 1 guest

Easyscriber engrave attachment for Hypertherm torch's