Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: plasmashine on April 11, 2020, 05:26:08 AM

Title: Collision detection on THC
Post by: plasmashine on April 11, 2020, 05:26:08 AM
Hello

Hope someone can point me in the right direction.

I have a Price Cnc THC and I would like to add collision detection when the digitize input is activated.

I'm not sure of the best route to take.

Title: Re: Collision detection on THC
Post by: TPS on April 11, 2020, 06:30:34 AM
you can do it via macropump macro.

you have to add some code in your digitze macro as well:

Code: [Select]
'put this as the first line in your digitize macro
SetOEMLED(1400,1) 'tell macropum it it a real digitze



'put this as the last line in your digitize macro
SetOEMLED(1400,0) 'tell macropum it it a real digitze is done


the the code for macropump

Code: [Select]
If ((GetOEMLED(1400) = False) and (GetOEMLed(825) = True)) Then
   MSGBox ("Probe hit during cut")
   DoOEMButton(1003) 'Stop machine
End If

something like this should work, code not tested, just written down

Title: Re: Collision detection on THC
Post by: plasmashine on April 14, 2020, 02:39:44 AM
Thanks, I haven't done any coding in my files, but I should be able to find my way through it.
Title: Re: Collision detection on THC
Post by: plasmashine on April 14, 2020, 05:28:08 AM
Could you tell me how to find these files?
Title: Re: Collision detection on THC
Post by: TPS on April 14, 2020, 12:10:23 PM
there should be a Folder c:\mach3\macros\your Profile Name.

there should be all your macro files, i think your probing will be in M3.m1s