My stepper motor wires have a shield/tap wire. At the G540 end of the wire, does the tap wire get connected to metal housing of the DB9 or to a particular pin number of the DB9 ( of course not pins 6-9)? I know the shield/tap is not connected at the other end( near the motor).

On a similar topic, the ground wire of the my brushed DC motor, does it get connected to the DC common of the DC controller, or to AC ground going into the DC controller ( or possibly straight to my star point)? and would it help if this wire is also shielded?