From what I understand this code detected the Claw was not "loose"
Code:
// - Read CLAW_LOOSE bit to see whether the tool is loose, to make a safe Z move without
// destroying tool holder
// - If CLAW_LOOSE bit is high, something has gone wrong;
// halt everything and display message indicating failure
if (!ReadBit(CLAW_LOOSE))
{
printf("Claw Loose Error\n");
MsgBox("Claw Loose Error\n", MB_ICONHAND | MB_OK);
return 1;
}
So if you want the claw re-engaged I think you would add:
ClearBit(CLAW_EJECT);
Before printing the error message.
To watch for both on in a forever loop I think the test would be:
Code:
if (ReadBit(SPINDLECW_BIT) && ReadBit(CLAW_EJECT))
{
ClearBit(SPINDLECW_BIT);
DoPC(PC_COMM_ESTOP);
printf("EStop - Spindle active with Claw Released\n");
}