Thank you for the response and sorry for the repetition ... it's the first time you entered here and I didn't know what it was like.
Jorge did you get the problem? what was it if you solved accept the solution to close the question
Hi Elio ... I could not make the closing magnet work ... it stopped just at the sensor that is when the gate is opened ... and the gate was open 15 cm for more than it will regulate ... I chose to put a square magnet He used to weld ... and it was perfect ... Until you get a new sensor ... Thanks for the help.
Jorge, since the solution served you and while you eat the new sensor, accept the solution if this question is not open and it is not the idea. you have to close it to move on.