A distributed architecture for automated manufacturing systems