You likely have a broken wire or bad connection, between the throttle position sensor and the engine ECM. I need to look through my information in the next few days and get back with you, but the ECM views the TPS position and Idle Validation Switch voltage relationship.
At slow idle the ECM needs to see 0% throttle percentage and 24V+ IVS. Off idle, the ECM must see no IVS voltage and some amount of throttle %. I.E. if the TPS percentage drops out (broken wire, poor connection, failing TPS, etc.), while the IVS voltage is off, the ECM limits the engine to an idle. If the ECM stops seeing throttle % for a moment while the IVS voltage is zero, a code is set and throttle is limited to low idle.
Wiring on these machines needs to be in PRISTINE condition for trouble free operation. You have 40+ feet of wiring between the rear ECM and TPS in the cab. Also I've found the throttle position sensors with the internal IVS, the internal switch fails frequently switching 24V on and off as they were designed to switch 12V by design. I.E. they fail frequently, even with genuine Williams Controls TPSs.
End result in our situation with frequent rear engine throttle issues, we were losing some of the 5 reference voltage to the rear TPS from the rear ECM(the amount of wiring the 5 reference volts needs to travel through to the rear TPS give a lot of opportunity for problems. Basically, we were losing our throttle % momentarily because were were losing our 5V reference voltage). So I cut the wire supplying the 5 reference volts to the rear TPS. Piggybacked off the front 5V supply to the front TPS to the cut rear wire supplying the TPS. I.E. the rear TPS sensor 5V reference voltage is now supplied by the front 5V reference.
I'll get some pictures in the next few days.