Hi Troy,
Toggling a bit is easy: "If on, turn off, else turn on"
Code:
if (ReadBit(1059)) // on?
ClearBit(1059); // yes, turn off
else
SetBit(1059); // no, turn on
Or easier still "Set state to opposite state"
Code:
SetStateBit(1059,!ReadBit(1059)); // toggle bit
But I see a problem. There isn't a way for KFLOP to read the Block Delete. So if the Operator clicks on the screen to toggle it then the screen and your LED will be out of sync. I can't think of a solution other than adding functionality to read checkboxes.