Detect input while moving
Posted: Fri Apr 05, 2019 6:44 pm
I'm just trying to get more familiar with UCCNC. So I'm trying to move my machine and stop when I receive an input signal. This is the code I'm trying:
exec.Code("G91 X1000 F500");
while (exec.IsMoving())
{
if (AS3.GetLED(11))
{
exec.StopWithDeccel();
}
}
However it does not stop when I trigger pin 11 (Port 1 Pin 1). According to this page: (file:///C:/UCCNC/Documentation/LEDs_by_number.htm) pin 11 is Port 1 Pin 1. And I can see on the diagnostic page that the sensor I have connected to Port 1 Pin 1 is indeed switching state when I trigger it. How would I stop the machine with an input signal?
Thanks in advance.
exec.Code("G91 X1000 F500");
while (exec.IsMoving())
{
if (AS3.GetLED(11))
{
exec.StopWithDeccel();
}
}
However it does not stop when I trigger pin 11 (Port 1 Pin 1). According to this page: (file:///C:/UCCNC/Documentation/LEDs_by_number.htm) pin 11 is Port 1 Pin 1. And I can see on the diagnostic page that the sensor I have connected to Port 1 Pin 1 is indeed switching state when I trigger it. How would I stop the machine with an input signal?
Thanks in advance.