Hello there,
Based on a simple g-code program, I try to transfer it on vb to improve and make a more complex algorithm. However, when running the simple code below, I cannot see the wait time between down/up unless I put >2seconds.
What's wrong in my code?
Global Const nT_Wid = 3
Global Const Dpitch = 10.0
Sub Main()
Dim i As Integer
Code "G17 G21 G91 G64 G40"
For i = 1 To nT_Wid
Touch
Code "G0 X" & Dpitch
Next i
End Sub
Sub Touch
Code "G1 F1000" Z5"
Sleep(1000)
Code "G0 Z5"
End Sub