There have been many previous posts on grounding this is an example.
The above link requires a little more explanation and I am working on adding a few things to a similar article.
The basic concept is to set up a central ground point which is connected to the service ground.
All P.S. commons that are grounded, cable shields and motor frame grounds should go to this point, if drive heats sinks are connected to chassis, they are usually bonded through the enclosure, otherwise a bonding conductor should be taken to ground point.
Also any metallic part of the machine should also be bonded to the central point.
When using PC based systems, although usually grounded at the power supply point, I always take a separate ground from PS common or where the control exits the PC, in the case of a Desk top PC using the parallel port, this would be port common, this ensures no ground current passes across the MB.
This also helps avoid spurious noise causing false triggering.