T23 M6 just now continued without running my toolchange1.c program; no lift to Z machine 0, no spindle off, no message box for tool change request; it just continued on as if M6 was never called. It is not repeatable and just seems to happen at random.
I am using 4.35F, M6 is set to exec/wait/sync using thread 5 and variable 9 (nothing else is using either)
toolchange1.c is:
Code: Select all
#include "KMotionDef.h"
#define TMP 10
#include "KflopToKMotionCNCFunctions.c"
main()
{
int slot = persist.UserData[9]; // value stored is an int
int id = persist.UserData[9+1]; // value stored is an int
char str[100]; //create an empty string to store number
char toolNum[20];
int Answer;
sprintf(str,"Insert Tool Number: %i", id); //make the number into string using sprintf function
Answer = MsgBox(str,MB_OK|MB_ICONEXCLAMATION);
if (Answer == IDYES)
printf("Answer is Yes\n");
else
printf("Answer is No\n");
printf("Tool Set to slot %d id %d\n",slot,id); // print the slot and id
}