Hello Guest it is December 07, 2024, 12:29:53 PM

Author Topic: THC not working properly  (Read 9366 times)

0 Members and 1 Guest are viewing this topic.

Re: THC not working properly
« Reply #10 on: February 13, 2011, 05:53:38 PM »
I wrote this little bit of code in a button to determine if the THC mode was actually on...

If isActive(THCON) Then
   MsgBox("THC is ON")
Else
   MsgBox("THC is OFF")
End If

When I press this button, even with the THC LED on, it tells me that the THC is off.  I'm at a loss.  There has to be something telling Mach to ignore THC commands even though THC is on.
Re: THC not working properly
« Reply #11 on: February 13, 2011, 06:21:18 PM »
Problem solved..and everything works through the modbus.  More testing will tell whether the modbus is fast enough to keep up with the height changes, but for now it works.

In the M3 macro you have...

DoSpinCW()

I replaced that with...

SetModOutput( 2, 1 )

Evidently Mach3 does something in regards to enabling THC commands when it executes, DoSpinCW() because after changing it to this...

DoSpinCW()
SetModOutput( 2, 1 )

Everything works.  DoSpinCW() does whatever it does to enable THC and the torch is fired via the modbus.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: THC not working properly
« Reply #12 on: February 14, 2011, 04:54:20 AM »
Good you've made some progress. Looks to me as if some of the modio is done in the PP driver as well then. The thing with DoSpinCW is weird though because I use activateSignal(OUTPUT1) instead in M3, not a doSpinCW in sight and THC works just fine and dandy.

I wrote this little bit of code in a button to determine if the THC mode was actually on...

If isActive(THCON) Then
   MsgBox("THC is ON")
Else
   MsgBox("THC is OFF")
End If

When I press this button, even with the THC LED on, it tells me that the THC is off.  I'm at a loss.  There has to be something telling Mach to ignore THC commands even though THC is on.

The reason this doesn't work as you might have expected is... (and you're going to love this after your walk on water comment earlier)  ;D

what you're testing here is whether ArcOK is on or off - not whether THC is on or off. THCON is actually the signal name for ArcOK. But then that's what it's called in ports n pins too so it shouldn't be that surprising perhaps.

Please get back with whether modbus is fast enough for THC UP/DOWN -  I'd be interested. Personally I think THC via PP is only just keeping up - but then if some of the modio is done in the PP driver, it may be no different - who knows.

Ian

Re: THC not working properly
« Reply #13 on: February 14, 2011, 09:51:00 AM »
I think it will be on par with the PP.  Of course, the best option is a stand alone THC with PID control of the Z axis drive.