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?
Status flag Home
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Status flag Home
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.
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);
}
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 39
- Joined: Wed May 03, 2023 12:54 am
Re: Status flag Home
This stops the automatic execution of programs.But how to prohibit manual movements in KMotionCNC ?
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Status flag Home
Jogging? Maybe don't enable the Axes until homing.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 39
- Joined: Wed May 03, 2023 12:54 am
Re: Status flag Home
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 ?
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Status flag Home
noIs it possible for the axes to move during the Homing procedure if the axes are not enabled?
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:How to run multiple programs in multiple threads using one button in KMotionCNC ?
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");
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.