In this study, the auto-tuning proportional-integral controller is used to control the speed of a switched reluctance motor. The control algorithm is executed by the programmable logic controller. The proportional integral gains are determined via fuzzy logic. Fuzzy logic is executed on a separate computer via MATLAB/Simulink software. The data exchange between the programmable logic controller and MATLAB/Simulink is done with object linking embedding/component for the process. The fuzzy proportional integral control algorithm is compared with the conventional proportional integral controller. We reduced the load on the programmable logic controller via executing fuzzy logic in a separate computer and at the same time eliminated the disadvantages of the conventional proportional-integral controller. With the proposed method, the engine reached the reference speed value in a short time and the overshoots were eliminated in variable conditions such as different load and different speed conditions.