I think I am missing something else in this configuration.
Now the Cycle Start program is indeed configured to "Exec/wait", but still it is executing some lines before Halt.
Here is the program that is executed when Cycle Start is called:
Code: Select all
#include "Homing.c"
#include "InitConfig.c"
#include "MillChanger.h"
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"
// Program to be executed when the Cycle Start button is pressed
// DoPC(PC_COMM_EXECUTE);
void main()
{
if (GetInitExecuted() == 0 || GetHomingExecuted() == 0 || GetIsExecutingHoming() == 1)
{
HaltAndWarn("Execute the Init and Homing function before run a program");
}
else if (ReadBit(MAGAZINE_OPENED_INPUT))
{
HaltAndWarn("Close the tool magazine before run a program");
}
}
void HaltAndWarn(char *message)
{
DoPC(PC_COMM_HALT);
MsgBoxNoWait(message, MB_ICONEXCLAMATION);
DoPC(PC_COMM_RESTART);
}
Guilherme