Hi,
I have machine, that will drill holes, so it only uses X axis, and the drill is performed by pneumatic valve, that has sensors for up, and down positions.
I mapped them as INPUT1 and INPUT2.
The valve actuator is mapped to OUTPUT2.
So I wrote macro, (filename M123.M1S):
---------------------------------------------------------------
ActivateSignal(OUTPUT2)
while IsActive(INPUT2)=false
sleep(100)
wend
DeactivateSignal(OUTPUT2)
while isActive(INPUT1)=false
sleep(100)
wend
---------------------------------------------------------------
And the main g-code program looks like this:
---------------------------------------------------------------
m3
g0x100
m123
g0x150
m123
g0x300
m123
g0x350
m123
g0x500
m123
g0x550
m123
g0x0
m30
---------------------------------------------------------------
Basically, it works fine, but the problem is when I first load the g-code, mach3 starts to "Please wait. Generating path...", and hangs-up!
if I cancel it, then press e-stop, then release E-stop, somehow I am in the game, so I can start using this code.
So my question is why is that happening, and how to avoid it?
Thanks!