Page 1 of 1
Status flag Home
Posted: Wed Nov 13, 2024 11:44 am
by Alexanders
I have a running Home program that changes the status variable Home in the data area persist.UserData[ ].
How to implement the prohibition/permission to work in automatic/ manual modes for KMotionCNC and the operator panel?
Re: Status flag Home
Posted: Wed Nov 13, 2024 5:38 pm
by TomKerekes
Hi Alexanders,
Not quite sure what you mean. But you might add a check such as the one shown below as the Cycle Start Action in KMotionCNC | Tool Setup.
Code: Select all
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"
main()
{
if (!ReadBit(48) || !ReadBit(49)) // check if all necessary operations have been completed
{
MsgBox("Please Home and Set Tool before running Jobs",MB_OK);
DoPC(PC_COMM_HALT);
}
}
Re: Status flag Home
Posted: Tue Nov 19, 2024 10:01 am
by Alexanders
This stops the automatic execution of programs.But how to prohibit manual movements in KMotionCNC ?
Re: Status flag Home
Posted: Tue Nov 19, 2024 7:30 pm
by TomKerekes
Jogging? Maybe don't enable the Axes until homing.
Re: Status flag Home
Posted: Thu Nov 21, 2024 11:42 am
by Alexanders
TomKerekes wrote: ↑Tue Nov 19, 2024 7:30 pm
Jogging? Maybe don't enable the Axes until homing.
Is it possible for the axes to move during the Homing procedure if the axes are not enabled?
And one more question.
How to run multiple programs in multiple threads using one button in KMotionCNC ?
Re: Status flag Home
Posted: Thu Nov 21, 2024 6:54 pm
by TomKerekes
Is it possible for the axes to move during the Homing procedure if the axes are not enabled?
no
How to run multiple programs in multiple threads using one button in KMotionCNC ?
That shouldn't normally be necessary. But you could have the first Program push another button (possibly hidden) that executes a 2nd program. Or when using Custom Screens you can use Screen Script to perform actions. Such as:
Code: Select all
if (ScreenScript("Action:4;3;0;0;0;0;BlinkKFLOP.c")) // Execute a Program in Thread #3
printf("Screen Script Failed\n");
else
printf("Screen Script Success\n");