It is the spring that controls the sliding cover. Mine was disconnected for a week and the top still functioned fine, so I doubt that's your problem. There's no sensor on that cover.
The usual problem with not latching at the windshield is a bad electrical connection. Double check everything, otherwise maybe you have a bad motor in the latch mechanism. With the top manually closed will it electronically open?
Sent from my Nexus 7 using Bimmer App
Last edited by taylor192; 02-02-2013 at 08:09 PM.