Initialization and Learn Procedures
WARNING: This page is about a different car, the 2015 Cadillac SRX. However, it is still accessible from the selected car via links, so may be relevant.
In order for the sunroof/sunshade system to perform correctly it needs to establish the position profile it will encounter under normal closing conditions. The procedures are to be run when a new controller is placed on a vehicle, when a service procedure is performed on any mechanical component, or if the system seems to lose track of its known position.
If both the sunroof and the sunshade need initialization, always initialize the sunshade first.