The thesis presents the process of planning and implementing of a new software solution for programmable logic controllers and the upgrade of the label printing system. In the production process, controllers are used to automate peripherals along side every injection moulding machine and to communicate with superior systems. The existing software code is obsolete, undocumented and was not originally designed for the production process in the form that is carried out in the company today. The new program implements all the requirements of the current production process in a comprehensible way, is properly documented and designed in a way that will enable effective upgrades in the future. These properties are largely achieved by using the automata-based programming paradigm. The upgrade of the printing system is also described, which now allows printing of various labels. The thesis will first describe the elements of the system and how they are placed in the production process. Next, the basic concepts of working with controllers, the controller that we will use and the standard IEC 61131-3 will be described. The main part will describe the design of the new program, some of the more important algorithms from the code, and the upgrade of the printing system. Finally, documentation of programs for controllers will be described.