Hello Guest it is April 19, 2024, 04:49:30 AM

Author Topic: V3.0 crash with Sleep  (Read 5243 times)

0 Members and 1 Guest are viewing this topic.

Offline Bodini

*
  •  216 216
    • View Profile
V3.0 crash with Sleep
« on: January 12, 2008, 10:18:46 PM »
After upgrading to v3.0, this portion of a macro code below crashed mach:

systemwaitfor (start)
While IsMoving()
Sleep 100
   Wend
g55x = getuserdro(1079) + getoemdro (800)


VB Editor opened and said the error was on the Sleep 100 line (this was part of a much longer macro).  Then VB Editor froze up and I had to reset with the button on the pc.  This happened 3 times and I re-installed v2.60... and then the problem was gone.

Yes, the macro starts off with Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long).  Yes, I have used this macro 100's of times before with no problems in versions up to and including v2.60.

Full macro available to admin/mods.

-Nick
« Last Edit: January 12, 2008, 10:24:51 PM by Bodini »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: V3.0 crash with Sleep
« Reply #1 on: January 13, 2008, 06:23:25 AM »
Brian always discouraged me from using the Declare Sub Sleep.....   Dont think he  actually said why but just it was not a good way to do it. I am terrible at VB but I think I just use G4 P*** now.
Hood

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: V3.0 crash with Sleep
« Reply #2 on: January 13, 2008, 08:08:01 AM »
Looks like Mario had the same issue:

Yahoo forum:
http://groups.yahoo.com/group/mach1mach2cnc/message/84954
Mario
From Mach3 R3 I had the same issue. I removed the Declare sub Sleep
line from my code and it works fine. I think Art add support in R3 so
you can call Sleep without the declare.

Graham

Offline Bodini

*
  •  216 216
    • View Profile
Re: V3.0 crash with Sleep
« Reply #3 on: January 13, 2008, 10:28:08 AM »
Aha, I see.  Ok, when I get a chance I will try it again with v3 and no sleep or sans the declare.  I HAD to add the sleep because Mach was blowing past the "g55x = getuserdro(1079) + getoemdro (800)" command without it.

Thanks.

-Nick

Offline Bodini

*
  •  216 216
    • View Profile
Re: V3.0 crash with Sleep
« Reply #4 on: January 13, 2008, 10:30:30 AM »
Looks like Mario had the same issue:

Yahoo forum:
http://groups.yahoo.com/group/mach1mach2cnc/message/84954
Mario
From Mach3 R3 I had the same issue. I removed the Declare sub Sleep
line from my code and it works fine. I think Art add support in R3 so
you can call Sleep without the declare.

Graham


Wow, that is nearly the SAME message I posted, isn't it.  I always forget about that Yahoo message area. ;-)

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: V3.0 crash with Sleep
« Reply #5 on: January 13, 2008, 01:12:05 PM »
Yeah it would be great if we could all merge to one forum and have one central location. It would make thing easer to keep up with updates and changes.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: V3.0 crash with Sleep
« Reply #6 on: January 13, 2008, 01:52:26 PM »
Ha ha, Jason that is never going to happen. Personally I cant see the attraction of the Yahoo style groups, in fact I think they are really awkward and this style of forum is brilliant.  BUT I know there are lots of people that say exacty the opposite.
Hood

Offline Bodini

*
  •  216 216
    • View Profile
Re: V3.0 crash with Sleep
« Reply #7 on: January 14, 2008, 02:46:24 PM »
Ha ha, Jason that is never going to happen. Personally I cant see the attraction of the Yahoo style groups, in fact I think they are really awkward and this style of forum is brilliant. BUT I know there are lots of people that say exacty the opposite.
Hood

Agreed 100%... and those other people are wrong. LOL. :-p

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: V3.0 crash with Sleep
« Reply #8 on: January 14, 2008, 03:01:24 PM »
Agreed 100%... and those other people are wrong. LOL. :-p


Hush now, you cant say that Art is one of the ones that prefers Yahoo :)

Hood