5226BB Rev F.
4.4.25

The DSPI code had support for a FM25L16 part. There is no code that actually used the functions, so it was unclear if it worked or was ever tested.

The new Rev H board uses an S25FL128 flash memory part that we had no code written for.

Both of these parts have a SPI interface.

There is code in the common library that should support SPI memory devices of any type. I used Claude to write read/write and erase functions for the new part. The common code had some assumptions that were specific to the FM25L16, or some earlier, part that had to be removed and configured in a more generic fashion. Together we fixed some bugs in the existing code. A test to sense the presence by reading the Device, Manufacturer and Type out of the chip was written. This test proves that the chip harware design is OK because it requires a write and a read to both be succesful in order to read the proper, expected, information out of the part.

Changes made for Pathfinder 5226 controllers.

Simulation starting positions were being overwritten by stale MRAM data.

Test_For_Simulation_Mode() (line 331) set correct RawPosition values for all simulation axes, but NonVolatile_Encoder_Initialize() (line 424) ran afterward and restored old encoder values from battery-backed MRAM — replacing the simulation starting positions with stale data (0xFFFFF).

Fix: Moved the 5 RawPosition initializations into a new Simulation_Set_Starting_Positions() function called immediately after NonVolatile_Encoder_Initialize() in BlackBox.c, so simulation starting positions always win.

Changes made for the Pathfinder 5226 controllers.

  1. Missing fpPosition update (With_Output only) — Both the no-overshoot and overshoot branches were copying the old feedback value back to itself (gRadius.RAS_Radius_Position = Axis_RadiusADJ.Feedback.fpPosition) instead of setting it to the target RadiusPosition. Fixed to match what the clamp-lock variant already did.

  2. Missing RawPosition update (both RAS functions) — This was the main issue. The input task converts RawPosition ? fpPosition through the interpolation table every 1ms. Setting fpPosition alone got immediately overwritten on the next cycle. Added Axis_RadiusADJ.Feedback.RawPosition = Interpolated_To_RawCounts(...) after each position update so the feedback loop computes the correct value going forward. This is the same pattern used at startup in BlackBox.c.

Changes made for Pathfinder 5226 controllers.

Problem found: When the clamping beam starts a move at or below the safety stop height in auto mode (RunSingleBend), gRun.Safe_Speed is set to TRUE — but neither OpenLoop.c nor OpenLoopIO.c checked that flag when deciding startup speed.

OpenLoopIO (discrete I/O machines): This was the real issue. Speed is entirely controlled by O_003_FAST_SPEED_SELECT / O_004_SLOW_SPEED_SELECT outputs. Without the fix, the state machine would start in StateFast and turn on the fast valve — running the clamp at full speed below safety height despite the intent to run safe.

OpenLoop (analog machines): Less critical because GetSpeed() already caps the analog voltage to safe speed. But the discrete speed select outputs were still set to fast, which is inconsistent.

Fix: Added || (gRun.Safe_Speed) to the startup slow-speed conditions in both:

OpenLoopIO.c:98 OpenLoop.c:135 This forces StateSlow with Start_Motion(AXIS, JOG_SLOW) when Safe_Speed is set, ensuring the correct slow output is activated before the move begins.

Changes made for Pathfinder 5226 controllers.

New Axis Attribute:

0x6060 (JOG_GRIPPER_BACKSTOP_DISTANCE) — Received via Foldbus, used to select which gripper backstop to extend during jog mode How it works (CmdSetups.c:1641-1658):

Compares the received distance value against the three configured backstop offsets (fpBackStop1Offset, fpBackStop2Offset, fpBackStop3Offset) Extends the matching backstop(s) via O_106/O_107 If no match, retracts both backstops This allows Pathfinder to remotely select the active backstop during jog operations