The paper contains a description of a research into applying classic algorithm of PID controller as well as advanced Type-2 Fuzzy logic controller to ensure stability of the levitating object in magnetic field. The implemented algorithm can handle uncertainties without increasing drastically the computational complexity, which is crucial in case of PLCs. The issues concerning the construction of the unit, where the experiments were carried out, are presented, as well as the characteristics of the object for different controllers.