Does this job have a safety edge also? If so, then I would say your safety edge is retracting too far at final close and at full open and actually triggering the micro switch. Also remember wiring on Oildraulic and or older dover control the photo eye should drive the EE input and the safety edge the SE input.