5360
5226; State Machine for Load Sheet with Clamp and Grippers
Pathfinder

Changes made for Pathfinder 5226 controller.

Description of Change: Restructured the sheet-loading routines LoadSheetWithClamp() and LoadSheetWithGripper() as explicit state machines to make the operator-interaction logic easier to follow and maintain. No functional change is intended — the new versions are behavior-preserving rewrites of the existing code.

Details:

Added new functions LoadSheetWithClamp_SM() and LoadSheetWithGripper_SM(). The original implementations remain in the file, renamed to LoadSheetWithClamp_Original() and LoadSheetWithGripper_Original(). The active implementation is selected with the LOADSHEET_STATE_MACHINE define near the top of the file. Defined = new state-machine code (current setting); commented out = original code. Both versions are always compiled, so the fallback stays buildable. Clamp version: the laser lockout/override timing (Setup IDs 732/733), previously tracked in four interacting timer/flag variables, is now an explicit three-state machine (Idle ? Lockout ? Override Window), plus a two-phase outer loop (Wait For Operator / Confirm Clamped) that eliminates the goto. Gripper version: the IO_Set pedal-light variable is replaced by named regions (Clamp-Up / Grip) with entry actions; the goto Next_Operation is replaced by a normal loop exit. Axis setup, presence-check (E475/E476), and cleanup code is carried over byte-for-byte from the originals. Reason for Change: The original loading loops encoded their state in scattered flags, timers, and goto labels, making the safety-critical laser override sequence difficult to review and modify. Explicit states make the behavior auditable and simplify future changes.

Model Version Released
5226BB Rev F. 4.04.28 8/11/2026
5226BB Rev G. 5.00.27 8/11/2026
5226BB Rev H. 5.01.03 8/11/2026