Estop Code

Moderators: TomKerekes, dynomotion

Post Reply
CA Allen
Posts: 2
Joined: Sun Jun 16, 2024 10:38 pm

Estop Code

Post by CA Allen » Sun Jun 16, 2024 10:51 pm

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);
}

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Estop Code

Post by TomKerekes » Mon Jun 17, 2024 2:05 am

It needs to be in a loop to execute over and over instead of just once.

Also inputs can not be ‘Set’
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply