the more conventional 4 to 20 mA
More conventional is a very relative term, and it seems you might be coming from a process control background, where sensor signals are often processed and converted to a current internally in the sensor. Let me assure you that it's not the most common thing in the world.
What's the advantage […] rather than […] converted to digital at the receiving end?
Well, having an ADC in the microcontroller is a luxury. The sensor in question has a 14 bit output; finding a microcontroller with a 14 bit ADC will increase your material cost.
Is this more accurate?
Yes. 14 bit means \$2^{14}\$ possible values. Let's say the voltage signal would have a full amplitude range of 0 V to 5 V. In that case, your voltage step would be \$5\cdot2^{-14}\,\text V\approx0.3\,\text{mV}\$. That's very little! Interference, temperature variations and noise in your ADC will be a multiple of that, unless you can very closely control a lot of things, which will make your system very, very complex and expensive.
So: Whenever you need digital values at the end, convert analog to digital as early as technically feasible.
Alternatively why not go HART / PROFIBUS etc. ?
Because buses like these are really complicated to implement on both the sensor and the controller, and if you're really just attaching the sensor to a microcontroller on the same PCB, why make things complicated, and costly?
The four-states state machine I showed that is able to receive this kind of signal might seem complicated to someone not overly used to embedded development, but imagine you'd have to write a full PROFIBUS endpoint. Good luck!
Best Answer
This is the function of a Time-to-Digital Converter. The idea is that you start a counter when the sensor 1 gives a 1 and stop it when sensor 2 gives a 1. The precision is determined by the clock frequency of the counter. It is even possible to have higher precision if you add an interpolator (the Nutt method), but I don't think you require it.
To detect the rising edge, implement edge detectors:
edit: The
Q <= D when rising_edge(CLK);
construct is perfectly legal VHDL (since VHDL93), and supported by all modern synthesis software afaik. More people are using it, just Google it. It is also described in "Effective Coding with VHDL" by Ricardo Jasinskithen just count:
Your last part is unclear: what do you mean with "after a moving object moves infront of it i cannot store the time"
Edit:
It is likely also necessary to implement (clock domain) synchronizers for the sensor inputs.