Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 03:16:26 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Pierce delay for plasma
Pages: « 1 2   Go Down
Print
Author Topic: Pierce delay for plasma  (Read 1124 times)
0 Members and 3 Guests are viewing this topic.
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« 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.
Logged
stirling
Global Moderator
*
Online Online

Posts: 1,190

UK


View Profile WWW
« 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 » Logged
matttargett4
Active Member

Offline Offline

Posts: 78


View Profile
« 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
Logged
stirling
Global Moderator
*
Online Online

Posts: 1,190

UK


View Profile WWW
« Reply #13 on: February 18, 2011, 05:04:44 AM »

which one Matt?
Logged
matttargett4
Active Member

Offline Offline

Posts: 78


View Profile
« 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

Logged
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« 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.
Logged
Pages: « 1 2   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!