Hi swat cat,

We don't have an examples for that with Mach3. You might consider 3 approaches:

#1 - change SetFROwithPot.c to call SetFRO() within KFLOP instead of sending a request to KMotionCNC (which Mach3 would ignore). The disadvantage here is that the Mach3 FRO will not update and be out of sync with the Potentiometer. The FRO should have an immediate effect.

#2 - Create a C Program to periodically read the ADC and place the value into a KFLOP Persist Variable. Create a Mach3 macro pump Basic program that periodically runs and requests the variable into a Mach3 DRO and commands the Mach3 FRO based on the value. In this way the On Screen FRO should basically show the Potentiometer Value. There will be a delay before any buffered trajectory sees the effect.

#3 - switch to KMotionCNC