by cncdrive » Tue Jan 24, 2017 2:14 am
The issue is that motion code (F and S codes are also motion codes) can't run if the controller is in Reset.
And on startup the controller is set to reset.
So, you have to remove the reset condition first to execute and F and S commands.
Also to make sure the constructor motion command will run when the software started up you should first wait for the reset or idle LED to come on.
Like this:
while(!AS3.GetLED(25)) //Wait for the reset LED to come on
{
Thread.Sleep(50);
}
exec.Callbutton(513); //Remove the reset
exec.Code("S10000");
while(exec.IsMoving()){}
exec.Code("F150");
while(exec.IsMoving()){}
exec.Callbutton(512); //Set the reset
The only issue I see with this is that the reset will be pulled out for a moment, so if there is a charge pump then that will be activated for a short time,
but I see no solution, because you just can't set an S or F command while the controller is in reset.