How to keep sensor always at same value via actuator with opamp?

Grumpy_Mike:
No it is not. It is simply a reflective optical sensor designed to give a digital signal to measure if an object is in front of it.

Yes you are true.You know it better than me but is it effects system so much?I want to use this sensor for now because i have no tof sensor and for now i don't want to buy.But i will keep in mind thank you.
Yes i'm not beginner.Can you please answer my question at below of this message.

@Paul_KD7HB yes of course i worked for doing the PID from arduino via direct bit banging PWM.So the PID output was my pin high delay(with a couple of proving).But in that way i simply couldn't making difference on voltages and it was not effective.

@raschemmel I've renounced that now, you are right.It is depending on my changes on the post.

If i do a circuit like in this link https://www.youtube.com/watch?v=YLGLrEwEiTQ

If i put a diode on last op amp's end to achieve "if it goes under 750 do nothing just wait" can i achieve what i want?The diode because electromagnet is pulling the beam whatever it's polarity.