trouble with the abs light coming on and braking problems on 2001 GMC Sonoma

The abs light comes on at times but doesn't stay on. I encounter brakes not working and grinding noise not every time I drive it but more often now. Seems to be more at low speeds.

Asked by for the 2001 GMC Sonoma
have abs codes scanned and post so we can adv