Hi Andy,
I can't see anything you are doing incorrectly.
You might try moving manually with all motor supplies off to see if it still accumulates counts. That would provide clues whether it is noise or something about the way the Drive outputs signals.
You might try lots of short direction reversals to try to determine if it could be a lost count on each or most reversals.
You might check the A+ A- B+ B- voltage levels at Kanalog. They should all toggle between about 0.5V and 3V. Sometimes they operate marginally correct with a broken wire and floating signal.
Kanalog has only moderate termination on the encoder inputs of 470 ohms. Ideally the Termination should be ~120 ohms. So you might consider paralleling 160~200 ohms across each + to - input.
KFLOP has digital filtering to reject noise glitches. KFLOP samples the A B signals at 16.67 MHz and requires them to be stable for 7 samples (by default) before considering the signal to have a valid new changed state. 7 samples = 0.42us. You might try increasing the filter value. Numbers higher than 14 will start reducing the max count rate below 1Mhz. The setting is global to all Encoders and can be changed by executing the statement below with the number 7 changed to a larger value (255 max):
FPGAW(ENC_NOISE_FILTER_ADD)=7;
Regards