Page 1 of 1

Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Sat Oct 22, 2016 10:53 pm
by Robertspark
Plasma Touch Off Macro for Ohmic and Floating Head, using a relay / optoisolator to isolate the ohmic probe input and allow for the use of an Ohmic probe offset AND floating head offset

Requires :
Single Probe Input for both Ohmic Probe, Floating Head and a single output interface with an Isolation Relay / Optoisolator for Ohmic Probe input to test which input is active.
Wire the floating head to the probe input pin. Wire the ohmic probe via a relay or optoisolator and then to the same shared probe input pin.

Mode of Operation:
The macro tests the probe input, if it's active at the start of the probing routine, the machine will stop and put a message in the status box.
If the initial probe input test is not active, the macro will enable the relay, and test the probe input again.
If the probe input is active then the ohmic probe has an issue (dirt / debris in the ohmic cap?), the macro will send a message to the status box, but continue the macro by opening the relay, and carrying on with the standard G31 probing routine, and once the probe input is tripped, it will set the G92 Z offset for the floating head.

If the probe input is inactive, then the probing routine will continue. When the probe input is tripped, the macro will open the relay, and test the probe input.
If the probe input is still active, it will set the G92 Z offset for the floating head, or else it will set the G92 Z offset for the ohmic probe offset.

Tried to upload the macro as a text file M1031.txt, and the the forum reported: "The extension txt is not allowed." :(

Cut, paste, edit however you see fit, hope you found something useful in it.

Code: Select all
// M1031
// Plasma Touch Off Macro for Ohmic and Floating Head, using a relay  / optoisolator to isolate the ohmic probe input
// and allow for the use of an Ohmic probe offset AND floating head offset
// Requires Ohmic Probe Input, Floating Head, Isolation Relay  for Ohmic Probe to test which input is active.
// Robertspark 22/10/2016

// <><><><><><><> SETUP SECTION
string FloatOffset = "1.4"; //  Ohmic offset (in units)
string OhmicOffset = "0.1"; // Ohmic offset (in units)
string Probefeedrate = "240"; // probing feedrate (in units / minute)
string ProbeDist = "100";  // probing travel distance (in units)
int ProbeInputLED = 37; //  probe input , could change to port & pin LED ref (check LED number table) , i.e. port2/pin11 = LED #79
int OhmIsoPort = 2; // Ohmic probe Isolation optoisolator / relay  output PORT
int OhmIsoPin = 17; // Ohmic probe Isolation optoisolator / relay output PIN


// <><><><><><><><> MACRO SECTION

// INITIAL PROBE INPUT CHECK  (IF FAIL, STOP MACHINE, & REPORT ERROR IN STATUS BOX))
if(exec.GetLED(ProbeInputLED) == false)
{
   exec.Setoutpin(OhmIsoPort, OhmIsoPin); // enable (ohmic probe input optoisolator  / relay input)
   exec.Wait(100);
   // check probe input , if enabled (ohmic cap fault), disable ohmic optoisolator / relay & run probling routine to set offset to floating head
   if(exec.GetLED(ProbeInputLED) == true) // test probe input, if true, ohmic cap fault  / ohmic setting error.
   {
   exec.Clroutpin(OhmIsoPort, OhmIsoPin); // disable ohmic isolator / relay
   exec.Wait(100);
   
   exec.AddStatusmessage( "Check Ohmic Probe / Torch" );  // Send Ohmic Probe Error to status messagebox
    
   exec.Code("G31 Z-" + ProbeDist + " F" + Probefeedrate); //  run probe routine
   while(exec.IsMoving()){}
   
   exec.Code("G92 Z-" + FloatOffset); // allow for floating head offset
   return;
   }

   if(exec.GetLED(ProbeInputLED) == false) // test probe input, if false, all is well.
   {
 
    exec.Code("G31 Z-" + ProbeDist + " F" + Probefeedrate); //  run probe routine
    while(exec.IsMoving()){}
   
    exec.Clroutpin(OhmIsoPort, OhmIsoPin); // disable ohmic isolator / relay
    exec.Wait(100);
 
      if(exec.GetLED(ProbeInputLED) == true)
      {
      exec.Code("G92 Z-" + FloatOffset); // allow for floating head offset
      return;
      }
      if(exec.GetLED(ProbeInputLED) == false)
      {
      exec.Code("G92 Z-" + OhmicOffset); // allow for ohmic head offset 
      return;      
      }
   }
}

// INITIAL PROBE INPUT CHECK  (IF FAIL, STOP MACHINE, & REPORT ERROR IN STATUS BOX))
if(exec.GetLED(ProbeInputLED) == true)
{
   exec.AddStatusmessage( "Touch Off Probe Error, Machine Stop" );  // Send Probe Error to status messagebox
   exec.Stop(); // stop / halt machine operation to inspect probe input and restart
   return;
}

// End of Macro


Re: Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Sat Oct 22, 2016 11:12 pm
by cncdrive
Hi Rob,

I've changed the attachments settings and now .txt files are attachable.

Re: Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Sat Apr 04, 2020 5:52 pm
by Werwelding
Hey Rob I am wondering if you could possibly help me out with my cnc plasma table. I am wanting to do the same thing you are doing here. I am running a uccnc axbb-e controller with sheetcam. I ordered a ohmic sensor from cnc router parts and somehow it allows to to run the ohmic sensor with a back up floating head on one signal wire. Because the ohmic will be set at zero and running anti collision torch with proxy sense as the back up so it will need an offset for the back up. I will include a pic of the ohmic wiring diagram. Cnc router parts use Mach 4 with there post processor which allows them to run ohmic and backup with 2 offsets on one input signal wire. Pics will be of wiring diagram and the Mach 4 where it shows 2 separate offsets. If you could help me get this set up or help with a post processor that would allow this to happen in uccnc I would be most great full.

Re: Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Thu Apr 16, 2020 9:03 am
by Robertspark
Hi Werwelding, sorry I'll respond to you next (I've got another query from someone else on the macro via PM)

Please find attached the schematic that I use to run BOTH a floating head AND and an ohmic sensor with my macro I created a long time ago below.


It makes the presumption that YOUR ohmic sensor is an PNP normally open sensor (if you have a normally closed sensor Just flip the relay contacts that it drives from NC (normally closed) to NO (normally open).

Your ohmic sensor may be different as there are a few about + home brew ones......

The ones I know of:

MiniTHC Ohmic Probe (this is the one I use) https://minithc.com/ http://minithc.com/pub/Ohmic_Sensor_EN.pdf
Neuron THC Ohmic Probe (the above circuit will work fine with this one too) https://neuroncnc.com/products/004

And a water switch KEMO M158 https://www.google.com/search?q=Kemo+Wa ... e&ie=UTF-8

The water switch is actually a VERY good + cheap option and had I known about it at the time would have bought and used one.

I am aware of CandCNC have one but note they will not provide you any support as to how to wire it up to anything other than their controllers..... and it costs more than everyone elses..... why would you buy one I have no idea...

Re: Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Thu Apr 16, 2020 9:42 am
by Robertspark
Werwelding

I've had a look at the schematic. I'm sorry I cannot see any way that Mach3 will KNOW which input has been triggered..... I mean it only has one sensor wire coming back to the machine from 2 inputs so there is no way to know or to test which input has been triggered and apply the correct input.

The macro that is posted earlier requires either 1 input (for the G28 probe) and 1 output to test which input (OHMIC or FLOATING) has been triggered..... without a means to test which input was triggered or by using two seperate inputs (as when I created the macro UCCNC only had ONE PROBE input....... now UCCNC has the option fro 2 PROBE inputs..... so you could check which one was triggered and apply the correct input.....)

If it were me..... I'd modify the circuit so that the ohmic is done by the sensor.... and just use a swich input to UCCNC for the floating head that way you could determine (automatically via MACRO) which input had been triggered and (automatically via MACRO) which Z Offset to apply..... normally zero for Ohmic and a negative value for the floating head given the switch is triggered by driving the torch onto the metal plate and then driving the z below that level to trigger the switch.

Sheetcam can apply an offset within the gcode file but it cannot determine which input was triggered..... that requires the use of a macro to automatically set the correct input.


Sometimes I have crud build up on the cap and the Ohmic will be always triggered (until I clean the cap....)..... if this happened during a cut then UCCNC (via the macro posted above / earlier) will test the input to see if the probe was already triggered and just ignore the ohmic input and run with the floating head...... if the floating head was triggered then it would stop the job and wait for me to manually investigate and sort out the issue.

Re: Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Fri Apr 17, 2020 12:32 am
by jcoldon
im looking at this print i dont see how the lower relay does any thing pushing a test. connection on top relay still has probe to ground

and if ohmic is triggered it will energize the top relay. but the bottom relay still has connection to probe input ground threw the bottom relay

how can this work ? seams to me the the lower relay should be breaking the probe input in front of the top relay .

that way pushing test switch would send a probe input from output . and ohmic triggers top relay relay

either way i dont see how this will change the ohmic offset setting or put the float switch offset in

Re: Plasma Touch Off Macro for Ohmic and Floating Head

PostPosted: Fri Apr 17, 2020 9:22 am
by Robertspark
The bottom relay should be wired as normally open.