Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: chrishunt79 on March 05, 2014, 11:28:26 AM

Title: Help with SystemWaitFor() script
Post by: chrishunt79 on March 05, 2014, 11:28:26 AM
Hello everyone. I am new to Mach3 and the forum.  Below is a Script I have written but it does not work. What I want to have happen is when the homing sequence is started I want the Z,Y and X to home (in that order) and then zero out all of the positions.

VB Script for REF ALL HOME Button:

NOTIFYPLUGINS(3000)

SystemWaitFor(INPUT4)    ' Input 4 is the homing prox for the last axis to be homed

DoOEMButton(1009)
DoOEMButton(1008)
DoOEMButton(1010)


The sequence starts just fine but as soon at it starts it zero's all of the axis's. It is not waiting for Input 4 to continue. Is there something wrong with my code. I am using Mach 3, a Galil DMC 4060 controller with Copley Stepnet stepper controllers. Thanks.