Architectural design patterns for logic control of manufacturing systems: the generalized device