As technology brings more complex and sophisticated systems, the importance of the problem of designing and developing a mechatronic system increases as well and it becomes more complicated to obtain a reliable, accurate and sustainable system. Since complex systems are generally composed of many different types of sub-systems, a necessity for a systematic approach towards the development arises. In this paper, the problem of software development for complex mechatronic systems is adressed and a novel software framework is proposed in order to provide common design and development criteria and related software structures. As an implementation of the framework and to present a proof of concept, software for a laser micromachining workstation is developed from scratch using this framework. Experiments are conducted using the workstation and results are provided.