If you place the wire near a permanent magnet, this temporary magnetic field interacts with the permanent magnet field. You will know that two magnets placed near one another either attract or repel. In the same way, the temporary magnetism around the wire attracts or repels the permanent magnetism from the magnet, and that is what causes the wire to jump.
The PWM Drive (pulse-width modulated drive) to motor power conductors are typically the most intense noise source in a system. Proper implementation of shielding, grounding, splicing, and treatment of excess cable is essential to reducing noise in your system.
In addition, note that the common lead in this type of motor is usually white or purple. If there are additional leads in the run widing group, continue to use the ohmmeter to test the now-identified common and additional leads. Descending resistance will give you ascending speeds.
Shield drain wire must be spliced only to mating shield drain wires and not grounded at the junction box. Feedback shields must be passed through pin for pin. Separate junction boxes for power and feedback are required.