This paper develops a model for DC motor diagnostics based on a state-space model approach. Its digital twin works in parallel with the real motor. The output signals of the motor and the digital twin from the electric current and angular velocity sensors are analyzed. The motor defects are detected by the magnitude of the discrepancy. If a defect is detected, the diagnostic system transmits information about it to the control system, turns on the defect indication, then by fuzzy logic methods or other methods determines the type of defect, the system element in which the defect occurred, predicts the remaining life, the control system is fail-safe operation. If the magnitude of the defect is insignificant, then appropriate maintenance actions are recommended. If the magnitude of the defect is significant, an emergency shutdown of the motor must be performed.