Safety-critical mechatronic systems must not contain any errors, because errors in these systems can cause serious accidents. Mechatronic systems are often realized by several distributed subsystems that must cooperate in order to fulfill the system's complex requirements. Due to the complexity of the required communication software, a manual implementation is prone to errors. This thesis describes an approach for a distributed synthesis. This approach automatically derives a distributed implementation model based on formal requirements for the communication behavior of a distributed system. The resulting model is constructed such that it fulfills all given requirements. To use the approach, engineers must describe these requirements in a scenario-based way, i.e., in relation to particular situations. The requirements must be formalized using Modal Sequence Diagrams. The main advantage of the approach compared to related work is that it identifies any additionally needed messages and adds them to the system, while avoiding to add unnecessary messages. Furthermore, the thesis discusses the application of the distributed synthesis approach to the domain of mechatronic systems. To this end, it describes an extension of the approach to support real-time requirements. For further development of the software based on the synthesized model, the thesis presents concepts for integrating the approach into the MechatronicUML design method.