This paper presents the design and validation of a fuzzy logic controller implemented with an industrial programmable logic controller (PLC). The chosen device belongs to the S7-1200 series of Siemens, whereas the code has been developed in Ladder Diagram language using the software TIA Portal. The fuzzy controller is of Mamdani type and is applied to control the speed of a servomotor. A comparison with a Simulink/Matlab fuzzy controller is done to validate the developed software module and to show the feasibility of the PLC to manage this kind of control algorithm.