This thesis deals with the problem of controlling proton accelerator which represents a classical mechatronic system, as it consists of mechanical, electrical and software part. At the beginning, various areas of accelerator’s use and their operation will be presented. The main focus will be on control and distributed control system EPICS, that is intended for this kind of use. The problem of the paper represents integration of the Newport ESP301 motion controller in the existing control system, that must meet all the necessary standards. It's purpose will be to control the collimator, which is part of the new nozzle and will be used on an existing accelerator for eye cancer the treatment. As a result, the EPICS module of the control system was developed and can be integrated into existing control system.