As Bubba indicated...but a few more details.
Wrap the outside of the dust collection hose or PVC with an insulated copper wire and connect to the metal body of the dust collector. Also, run a bare solid copper wire on the inside of the dust collection hose or PVC, though the cyclone or separator if you have one, and then attach this to the metal body of the dust collector. Then connect from the dust collector to a copper rod in the earth.
If you use a shop vac with a plastic body, run everything to the copper rod.
You might also check the continuity of the ground on everything, machine, spindle, BOB, power supply, computer, fuse or breaker panel, electrical outlets, light switches, extension cords, and cords of the dust collector or shop vac.
If static electricity has not been a problem in the past, but is now a problem, something in the wiring on the machine, spindle, dust collector or shop vac, BOB, power supply, computer, wiring, outlet or switches has changed.
Odd as these may sound: What kind of clothing were you wearing? Some types of material in clothing generate static electricity. Also, what was temperature and humidity level in the shop?
Have you tried wearing a grounding wrist band?
I am a wood worker [on occasion cut plastics] and have never have static electricity problems with the usual woodworking power tools or with my CNC. My shops have had bare or painted concrete floors and painted plywood floors.