Hello Guest it is May 24, 2019, 11:47:30 AM

Author Topic: VB DoButton + Referance All Axis  (Read 4035 times)

0 Members and 1 Guest are viewing this topic.

VB DoButton + Referance All Axis
« on: September 19, 2011, 11:45:19 AM »
Hi

I'm trying to make a button works as:

1.reference 4 AXIS (X/Y/A/B).
2.go to position X200, y100, A200, B100.


so I make a button and code it as :
DoButton(22)
DoButton(23)
DoButton(25)
DoButton(26)
code("G00 X200")
code("G00 Y100")
code("G00 A200")
code("G00 B100")


However, it's working as go to that position first, then reference axis later.


(but if I run the code line by line, It works all good)

Is there any help can correct my code?

thx!

Offline Hood

*
  •  25,816 25,816
  • Carnoustie, Scotland
    • View Profile
Re: VB DoButton + Referance All Axis
« Reply #1 on: September 19, 2011, 11:50:02 AM »
You will need
While IsMoving()
Wend

You will need it after each move if you want them to go there individually which would seem to be as you have each on seperate lines. You will also need it after the DoButton() probably just after the last one, so ths should work


DoButton(22)
DoButton(23)
DoButton(25)
DoButton(26)
While IsMoving()
Wend
code("G00 X200")
While IsMoving()
Wend
code("G00 Y100")
While IsMoving()
Wend
code("G00 A200")
While IsMoving()
Wend
code("G00 B100")

Hood
Re: VB DoButton + Referance All Axis
« Reply #2 on: September 19, 2011, 12:42:15 PM »
SUPER!

Thank you! Hood.