Status flag Home

Moderators: TomKerekes, dynomotion

Post Reply
Alexanders
Posts: 39
Joined: Wed May 03, 2023 12:54 am

Status flag Home

Post by Alexanders » Wed Nov 13, 2024 11:44 am

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?

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

Re: Status flag Home

Post by TomKerekes » Wed Nov 13, 2024 5:38 pm

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

Tom Kerekes
Dynomotion, Inc.

Alexanders
Posts: 39
Joined: Wed May 03, 2023 12:54 am

Re: Status flag Home

Post by Alexanders » Tue Nov 19, 2024 10:01 am

This stops the automatic execution of programs.But how to prohibit manual movements in KMotionCNC ?

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

Re: Status flag Home

Post by TomKerekes » Tue Nov 19, 2024 7:30 pm

Jogging? Maybe don't enable the Axes until homing.
Regards,

Tom Kerekes
Dynomotion, Inc.

Alexanders
Posts: 39
Joined: Wed May 03, 2023 12:54 am

Re: Status flag Home

Post by Alexanders » Thu Nov 21, 2024 11:42 am

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 ?

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

Re: Status flag Home

Post by TomKerekes » Thu Nov 21, 2024 6:54 pm

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");
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply