Hello Guest it is May 25, 2019, 01:41:08 AM

Author Topic: THC controls in Mach  (Read 3612 times)

0 Members and 1 Guest are viewing this topic.

THC controls in Mach
« on: July 03, 2011, 07:45:59 AM »
Can anyone enlighten me as to what Mach3 does with the Torch up and Torch down inputs in the plasma screen set.
Is it possible to map them to step and direction outputs, preferably on the Z.
I have written a THC brain that does everything I want it to, except cause Mach to move the axis.

Re: THC controls in Mach
« Reply #1 on: July 03, 2011, 10:22:01 AM »
Look at "THC Up" and "THC Down" as inputs.  Like any input, they can be set as active high or low.  When THC Up is activated Mach moves the Z up at the feedrate defined by THC Feedrate.  In your brain, just activate the appropriate input and Mach will move the Z.  THC Up and Down are already mapped to the Z axis.  I don't think you can actually change that.
Re: THC controls in Mach
« Reply #2 on: July 04, 2011, 07:08:09 AM »
Thanks for the input, I thought that was how it was until it didn't work.
First I terminated the two lobes with THC up and THC down. I viewed the brain and had THC up lit, but nothing from the Zaxis.
Then I tried terminating with a jog Z+/- but no movement while running code.
Next I tried an imaginary port/pin output, and mapped it to THC input by using the same port/pins for input. Still nothing.
Kick me to the brain discussion if you think that's where I ought to be.

For some reason code will run if either THC led is lit, or Torch on led but not both at once, which is a bugga because I wanted to use both these as brain inputs.
Also Mach seems to be ignoring the limit/home switches by activating manual override, and output 6 is on most of the time even though it is mapped to nothing.
This is all getting a bit much for my poor little brain( the one in my head) I would love to buy a THC and plug 'n' play but that's not the way I roll. I'll do it the hard way and hopefully learn a bit along the way.



Offline stirling

  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: THC controls in Mach
« Reply #3 on: July 04, 2011, 07:48:18 AM »
You don't need a brain - Just setup your THC hardware to activate the THC up/down and arc-OK inputs and M3 to trigger your torch via OUTPUT1 and Mach will do the rest.
Re: THC controls in Mach
« Reply #4 on: July 04, 2011, 04:02:51 PM »
I tried a while back to do a THC brain and couldn't get it working.  The brain wouldn't trigger THC UP/DOWN.  I don't know why.  I just went a different route rather than put too much effort into it.
Re: THC controls in Mach
« Reply #5 on: July 04, 2011, 05:28:46 PM »
Hi Stirling I don't actually have THC hardware. My plasma has a built in voltage divider and I plan to feed this analogue signal into Mach3 via a ModIO, and compare this to the analogue input from a pot for tuning eg. A<B = THCdown A>B = THCup.

Thanks for the contribution rrc1962. I'm far from whipped on this one, just need an idea on how Machs insides work, and where they connect.
Will post the brain and ModIO wiring when I get it sorted.
Re: THC controls in Mach
« Reply #6 on: July 04, 2011, 06:00:44 PM »
I think the problem is that the THC commands are inputs, not outputs.  You can monitor them in a brain and do something when they are activated, but because Mach sees them as inputs, you can't manipulate them like you can an output.  IE: Turn them on and off.
Re: THC controls in Mach
« Reply #7 on: July 05, 2011, 06:03:18 AM »
I think you are correct in all aspects, but since I am using the ModIO to control and send the I/O signals, I can tell it to produce an output signal (looped into an input) depending on the input signals, and other states and formulas from DRO's in Mach using a brain, and that's when the magic happens and Mach receives a THC up or down input, and performs the Z + or - move (I hope).
Nice to have someone to bang ideas against,


Re: THC controls in Mach
« Reply #8 on: July 05, 2011, 09:47:43 AM »
Don't forget about Modbus scan times.  The speed of a system using the THC commands in Mach is marginal using the PP, which will give you the fastest response time.  Looping the signals like that will at least double the response time.
Re: THC controls in Mach
« Reply #9 on: July 06, 2011, 05:46:49 AM »
I guess the only way to tell if this will be an issue is to get it up and running. I think there is room for some adjustment of the scan rate on the serial port.
Unfortunately I won't be able to tinker with it this weekend, I'll just have to console myself with alcoholic beverages while I watch the V8 Supercars trackside.