Hello Guest it is April 19, 2024, 06:59:22 AM

Author Topic: VB script = gcode  (Read 3669 times)

0 Members and 1 Guest are viewing this topic.

Offline lew

*
  •  74 74
    • View Profile
VB script = gcode
« on: May 10, 2007, 08:49:27 PM »
Hello:
I've been trying to write vb script in the scripter and calling gcode to perform a z axis to zero and after that move x and y to zero.
Can someone take a look at this vb and tell me if you see anything wrong?
When I execute this vb script, the z moves to zero but the x and y do not move.

code "G0 Z0.0"
While (ismoving)
Wend
code "GO X0.0 Y0.0"
End

Thanks
LEW

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: VB script = gcode
« Reply #1 on: May 10, 2007, 09:34:09 PM »
Yes here is your code:

code "G0 Z0.0"
While (ismoving)      'your while is moving is wrong also you need to put it at the end of your movement code.
Wend
code "GO X0.0 Y0.0"  'you put the letter "O" after your G instead of "0"
End                          'You put and End statement that ties to nothing

It need to be:

code "G0 Z0.0"
code "G0 X0.0 Y0.0"
While Ismoving()
Wend


« Last Edit: May 10, 2007, 09:37:19 PM by poppabear »
fun times

Offline lew

*
  •  74 74
    • View Profile
Re: VB script = gcode
« Reply #2 on: May 11, 2007, 08:37:04 AM »
Thanks, Poppabear.
This was not a test. Just a guy who is starting to learn vb and has made some stupid mistakes.
Can't believe I typed an O and not a 0. The rest was ignorance. Working on the ignorance.
LEW