Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 09:34:51 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  why won't this macro work??
Pages: 1   Go Down
Print
Author Topic: why won't this macro work??  (Read 398 times)
0 Members and 2 Guests are viewing this topic.
learman
Active Member

Offline Offline

Posts: 91


View Profile
« on: June 30, 2010, 10:23:59 AM »

Hello

Im getting a "compile error" message

If Not IsActive (input4) Then   <<< will work if i get rid of this line
Code "G1 X 0.020"
While ismoving
sleep (1000)
setDro (0,0)

any Ideas??

thanks
Josh
Logged
stirling
Global Moderator
*
Offline Offline

Posts: 1,189

UK


View Profile WWW
« Reply #1 on: June 30, 2010, 10:26:42 AM »

you need an "end if" in there.

Ian
Logged
learman
Active Member

Offline Offline

Posts: 91


View Profile
« Reply #2 on: June 30, 2010, 10:29:55 AM »

Yes Sir!! now it works thanks

If Not IsActive (input4) Then   
Code "G1 X 0.020"
While ismoving
sleep (1000)
setDro (0,0)
end if
Logged
stirling
Global Moderator
*
Offline Offline

Posts: 1,189

UK


View Profile WWW
« Reply #3 on: June 30, 2010, 10:59:05 AM »

might want to stick a "wend" after your sleep too. When your input goes inactive you'll likely get a syntax error. Also stick a () on the end of your isMoving (it's a function) not a sub.

Ian
Logged
learman
Active Member

Offline Offline

Posts: 91


View Profile
« Reply #4 on: June 30, 2010, 11:26:46 AM »

If Not IsActive (input4) Then   
Code "G1 X 0.020"
While ismoving ()
Wend
sleep (1000)
setDro (0,0)
end if

Hows this?
Logged
stirling
Global Moderator
*
Offline Offline

Posts: 1,189

UK


View Profile WWW
« Reply #5 on: June 30, 2010, 01:21:12 PM »

well you could stick it before the sleep but after would be better  Grin
Logged
Pages: 1   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!