How can I power a relay using two photoelectric switch sensors?

I have a relay that I want to be able to energize by one photoelectric switch sensor when this one detects a target and the other sensor would be able to DE-energize the relay when it detects the second target I tried but so far my head s going crazy .. HELP ! the photoelectric sensor model is a OMRON E3F2-R2C4 ... show more I have a relay that I want to be able to energize by one photoelectric switch sensor when this one detects a target and the other sensor
would be able to DE-energize the relay when it detects the second target I tried but so far my head s going crazy .. HELP ! the photoelectric sensor model is a OMRON E3F2-R2C4 THANKS
Update: I don't want t o buy anything else, Sorry guys, I was told that I can wire the sensor in the way that one power the srelay and the otherone will shut it off... I'll keep searching for more answers Thank though
3 answers 3