Page 1 of 1

Estop Code

Posted: Sun Jun 16, 2024 10:51 pm
by CA Allen
TK
I have my NC estop button to kflop's j7 pin12 bit 5 pin, and I'm not sure why this code does not work.


#define Estop 5

....
Main{

if (!ReadBit(Estop))
{
SetBit(Estop);

if (ch0->Enable)DisableAxis(0);
if (ch1->Enable)DisableAxis(1);
if (ch2->Enable)DisableAxis(2);
if (ch3->Enable)DisableAxis(3);
}

Re: Estop Code

Posted: Mon Jun 17, 2024 2:05 am
by TomKerekes
It needs to be in a loop to execute over and over instead of just once.

Also inputs can not be ‘Set’