Hi Dennis
which version of "3040" CNC machine do you have ?
photos of your machine will help
grounding has two functions
first for your safety
grounding on Chinese equipment can be hit and miss
very often the ground wire from the mains inlet that should ground the control box is screwed to the painted surface inside the box !!!!!
also the ground terminal on the spindle motor is not always connected even though the motor has a 4 pin connector -
3 pins to connect to the 3 phase motor windings and the 4th that should ground the motors case !!!
taken from another post -
a picture of adding an earth connection inside a spindle motor
the other issue I have with these Chinese control boxes is the use of a 5 pin chassis plug for the spindle motor connections- should be a socket as it has mains voltages on the exposed pins !!!!
live pins on chassis plug for spindle motor !!!
so you need to double check the continuity between your supply ground and any external metal parts of the control box and the machine
the second ground function
to prevent electrical noise from the stepper & spindle motor wiring being picked up by the low level control signal control wiring
the grounds to the screened signal wires being connected by individual wires to a "star point" which is a common ground in the control box and not daisy chained
there are pros & cons for grounding one or both ends of the screened cable
the simple approach is to ground one end of the screen
with industrial machines where the machine is at equipotential you can ground both ends
( you may find its more difficult to ensure your chinese machine and its control box are at the same potential so connecting
both ends of the screens do not result in unwanted currents circulating in the ground loop )
john