This is my first post, trying to learn vbscript from scratch.
I ran a simple gcode below:
S20 M3
G1 Z20
M5
M30
And my machine runs as written correctly in sequence: first turn on spindle, move Z, once Z reached 20mm, stop spindle.
However, I tried running this on Option->VB Scripter Window, with slight modification as such:
code "S20 M3"
code "G1 Z20"
code "M5"
code "M30"
My machine does this: move Z, once Z reached 20mm, turn on spindle, 1 sec later, spindle stopped.
How can I run this simple gcode in sequence?
In case you ask me why vb marco, because I will be needing to add some conditional features like IF ELSE THEN WHILE etc, building from this as a start.
Hoped to get some help please.