Diagnostic of controlled machine