A method and apparatus for an automatic assembly control