Hi tom ,
I want to make a CNC light indicator (Stack light) program which indicates different program states of the machine.
RED: Failure conditions such as an emergency stop or machine fault or alarm
YELLOW: and FEED hold condition Warnings such as over-temperature or over-pressure conditions (G code not running) , G code completed.
GREEN: Normal machine or process operation (G code running)
How to make that C program that monitor all above. ? and how to process with that ?
and how to integrate with KFLOP+KANALOG+KONNECT .
Waiting for your kind reply.
How to make CNC light program (Indicator for Feed hold and Cycle start, ALARM)
Moderators: TomKerekes, dynomotion
-
- Posts: 134
- Joined: Tue Feb 20, 2018 7:35 am
- Location: India
How to make CNC light program (Indicator for Feed hold and Cycle start, ALARM)
Thank You
AMIT KUMAR
AMIT KUMAR
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: How to make CNC light program (Indicator for Feed hold and Cycle start, ALARM)
Hi Amit,
CS0_StoppingState != 0 would indicate a feedhold in progress.
For this you might test any EStop you have or whether any of your axes are disabled (chx->Enable)RED: Failure conditions such as an emergency stop or machine fault or alarm
You should know what sensors you have on your system. JOB_ACTIVE being FALSE would indicate GCode not runningYELLOW: and FEED hold condition Warnings such as over-temperature or over-pressure conditions (G code not running) , G code completed.
CS0_StoppingState != 0 would indicate a feedhold in progress.
JOB_ACTIVE being TRUE would indicate GCode running.GREEN: Normal machine or process operation (G code running)
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 134
- Joined: Tue Feb 20, 2018 7:35 am
- Location: India
Re: How to make CNC light program (Indicator for Feed hold and Cycle start, ALARM)
Hi tom ,
Thanks for the reply,
Is there any example of C program so i can get some programming idea too. ??
Waiting for your kind reply.
Thanks for the reply,
Is there any example of C program so i can get some programming idea too. ??
Waiting for your kind reply.
Thank You
AMIT KUMAR
AMIT KUMAR
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: How to make CNC light program (Indicator for Feed hold and Cycle start, ALARM)
Hi Amit,
You might try something like:
You might try something like:
Code: Select all
include "KMotionDef.h"
#define RED 46
#define YELLOW 47
#define GREEN 48
void main()
{
for (;;) // forever loop
{
if (CS0_StoppingState != 0) // Feed hold ?
{
SetBit(YELLOW);
ClearBit(GREEN);
ClearBit(RED);
}
else if (JOB_ACTIVE) // Job Active ?
{
SetBit(GREEN);
ClearBit(YELLOW);
ClearBit(RED);
}
else // otherwise
{
SetBit(RED);
ClearBit(YELLOW);
ClearBit(GREEN);
}
}
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.