KFLOP MPG: Troubleshooting FRO and Position Control

Tom Garrett3 min read
Motion ControlOther ManufacturerTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

An MPG can serve two roles in a KFLOP interface: control an axis position while the Control switch is pressed and adjust feed-rate override (FRO) while the switch is released. The implementation must preserve encoder movement between scans, select one role at a time, and define how hardware input interacts with the on-screen FRO control.

Correct the encoder initialization fault

The supplied program initializes LastEncoder whenever FirstTime is true, but never clears FirstTime. Reinitializing LastEncoder every scan can eliminate the position difference that the accumulator needs. Set the flag false immediately after capturing the initial position.

if (FirstTime)
{
    LastEncoder = chan[MPG_INPUT_AXIS].Position;
    FirstTime = FALSE;
}

T = WaitNextTimeSlice();
Encoder += chan[MPG_INPUT_AXIS].Position - LastEncoder;
LastEncoder = chan[MPG_INPUT_AXIS].Position;

Retain the existing accumulation approach: wait until Encoder exceeds either positive or negative CHANGE_TOL, enforce CHANGE_TIME between updates, apply the selected increment, and then clear Encoder after processing it.

Separate position and override modes

Read the Control switch once per service cycle and route the encoder delta to only one destination. While pressed, use the accumulated movement for axis-position control. While released, convert accepted movement into an FRO change. Reset or transfer the accumulator deliberately when the switch changes state so movement collected for one mode cannot affect the other.

Control switch MPG destination Required handling
Pressed Selected axis position Apply encoder movement only to the position-control path.
Released FRO Accumulate movement and periodically issue an override update.
State transition Neither until reconciled Prevent a stored delta from crossing into the new mode.

Choose FRO ownership explicitly

PC_COMM_SET_FRO sets the computed FRO value directly. PC_COMM_SET_FRO_INC is the better candidate when the MPG must increment or decrement the value already controlled on screen. This avoids repeatedly replacing a value that the operator may also change through the interface. If FRO and rapid-rate override (RRO) must track together, issue the corresponding PC_COMM_SET_RRO update only after independently applying the configured FRO and RRO limits.

The shown logic changes override in steps of 0.1 and clamps the results with FRO_MIN, FRO_MAX, RRO_MIN, and RRO_MAX. Those bounds are symbolic in the evidence; verify their configured values rather than assuming limits.

Verify the command path before testing motion

  1. Confirm BasicServiceMPG() runs continuously from the initialization program and that FirstTime becomes false after its first call.
  2. Turn the MPG and verify that raw position, accumulated Encoder, and the computed FRO change in the expected direction.
  3. Confirm that the on-screen FRO slider moves after the PC command. A changing console variable alone proves only that the local calculation ran.
  4. Temporarily select the Resizable 3 Axis screen. If the command works there, investigate the custom screen and its control bindings.
  5. If the slider still does not move, capture the complete programs, Tool Setup trajectory-planner settings, and software version. The reported installation used version 4.35h.

Do not use only a G0 move to judge FRO behavior: the reported test displayed Feed Override during a G0 move. Regardless of the motion test, the FRO slider should still respond to a successful override command, making it the clearer first verification point.

FAQ

Why does my KFLOP MPG encoder delta remain zero?

If FirstTime is never set to FALSE, LastEncoder is reinitialized every service cycle. Clear the flag immediately after the initial position capture.

Should an MPG use PC_COMM_SET_FRO or PC_COMM_SET_FRO_INC?

Use PC_COMM_SET_FRO to write an absolute computed value. Consider PC_COMM_SET_FRO_INC when both the MPG and on-screen control must adjust the same FRO value.

How do I verify that a KFLOP FRO command is working?

First verify that the on-screen FRO slider moves, then test motion. If it does not move, switch temporarily to Resizable 3 Axis and inspect the custom screen, complete program set, trajectory-planner settings, and software version.

Back to blog