Hello Guest it is May 26, 2019, 09:44:59 AM

Author Topic: Pierce delay for plasma  (Read 17914 times)

0 Members and 1 Guest are viewing this topic.

Re: Pierce delay for plasma
« Reply #10 on: February 17, 2011, 05:49:30 PM »
This is how I do it...

Do While Not isActive(THCON)
   x = x + 1
   sleep 1000
   If x = 3 then
      MsgBox("OK To Move Timed Out")
      code "M30"
      Exit Do
   End If
Loop


This will stall until either a good arc is seen or the loop times out.  I have it set for 3 seconds.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Pierce delay for plasma
« Reply #11 on: February 18, 2011, 04:46:24 AM »
Unfortunately this doesn't improve the situation. No offence intended but it potentially makes it worse.

Just as one example, compare the resultant pierce delay if arcok activates just before the sleep, with what it would be if arcok activates just a few microseconds later after the sleep begins.

Ian

EDIT: I've just thought of another issue about this whole problem but I'll check it out first.
« Last Edit: February 18, 2011, 04:56:55 AM by stirling »
Re: Pierce delay for plasma
« Reply #12 on: February 18, 2011, 04:59:35 AM »
Morning,

I tried the modification to the m3 macro and it seems to work for me............

Matt

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Pierce delay for plasma
« Reply #13 on: February 18, 2011, 05:04:44 AM »
which one Matt?
Re: Pierce delay for plasma
« Reply #14 on: February 18, 2011, 05:48:43 AM »
Do While Not isActive(THCON)
   x = x + 1
   sleep 1000
   If x = 3 then
      MsgBox("OK To Move Timed Out")
      code "M30"
      Exit Do
   End If
Loop

Re: Pierce delay for plasma
« Reply #15 on: February 18, 2011, 08:16:19 AM »
I can see how it could get trapped after the sleep and before the x comparison if x = 3.  It's probably never been an issue because it has never taken longer than 3 seconds to light the arc.  If it takes longer than that, there is a problem and the arc is not going to light at all, which times it out.  If THCON goes on before the sleep and x < 3, you would just see a slightly longer delay worse case.  That could be happening, but I haven't really noticed it.  Changing it to this should solve both...

Do While Not isActive(THCON)
   x = x + 1
   sleep 1
   If x = 3000 then
      MsgBox("OK To Move Timed Out")
      code "M30"
      Exit Do
   End If
Loop

Virtually removes any possible delay where arc lights before the sleep and x < 3000 and reduces the gap to where it could get stuck between sleep and x = 3000 to only 1ms.  Still a remote chance it could happen.  You could bump the time to 5000.  If the arc doesn't light in 5000ms you can rest assured that it's not going to light for some reason.

You could remove the sleep completely, but that you'd have to experiment with the timeout number to get a suitable timeout.  I think when I tried it I was using something like 12000.

I actually use this in a separate macro that I insert just after the M3.
Re: Pierce delay for plasma
« Reply #16 on: July 03, 2014, 06:45:27 AM »
Hi, I am setting up my cnc plasma table, everything ok except the trigger switching is reversed ie it comes on when it should be off and goes off when it should be on ,any help please,