Start, by understanding how the ABS works. Generally - An Hall effect sensor (switch) is located in a fixed location, around the hub has a series of magnets around its periphery, around 40 to 50. Each wheel as such a setup and the pulses from each wheel are fed via individual wires back to the ABS controller unit. The ABS controller compares the pulses coming from each wheel and if they are not similar frequencies, it makes an assumption that a wheel has locked and releases the braking effort from that wheel for a fraction of a second.
The ABS has two basic stages of diagnostics, static (when you turn the ignition on) and sub-10mph when additional checks are carried out. In the static check, the ABS controller ensures it has the Hall sensor connected at each wheel. Your ABS light should come on at switch on, then go off if it passes that first test.
The second stage checks it is seeing the correct number of regular pulses from each wheel, if not then it puts the ABS light back on and disables the ABS system.
Whilst on the road, the pulses continue to be monitored, and any failure puts the ABS light on and disables the system.
If the pulses from any sensor are delayed whilst braking, the ABS system assumes that wheel is locking up, so it releases hydraulic pressure on the brake.
Possible causes of the ABS light coming intermittently, are poor connections or damp where the sensor plugs into the loom. Sensor wiring loose and catching on the tyre. Metal or rust being caught up by the magnets in the hub or bearing. A worn hub bearing. One of the better diagnostic units or Fords specific unit, able to interrogate the ABS module, will be able to tell you the wheel with the issue. A normal cheap, general purpose ECU unit will not.
I made myself a cheap little gadget, to enable me to check my own system at the wheel sensor. It uses a very sensitive crystal earpiece, connected to a 'break-out' plug and socket. I simply unplug at the sensor and plug into the plug and socket. Wheel jacked up and rotated very slowly, as each magnet passes the sensor, I hear a click in the earphone. A brick placed alongside the tyre as a reference point, I make a chalk mark on the tyre at the edge of the brick. If all is well, I should end up with a series of chalk marks, the correct number and all perfectly evenly spaced around the tyre.