Cyber-physical manufacturing systems (CPMS) can be defined by the integration of control, network communication, and computing with a physical manufacturing process. In this work, we present a hybrid model of CPMS combining sensor data, context information, and expert knowledge. We used the identification of global operational states and a multimodel framework to improve anomaly detection and diagnosis. The anomaly detection is based on context-sensitive adaptive threshold limits. Root cause diagnosis is based on classification models and expert knowledge. The proposed approach was implemented using the Internet of Things (IoT) to extract data from a computer numerical control machine. Results showed that using a context-sensitive modeling strategy allowed to combine physics-based and data-driven models for residual analysis to detect an anomaly in the part, machine, or process. The identification of root cause was improved by adding context information in classification models to identify worn or broken tools and wrong material. Note to Practitioners—Anomaly detection and diagnosis of manufacturing equipment is a complex problem. Some of the challenges are complex machine dynamics and nonstationary operating conditions. This paper describes a framework for modeling manufacturing equipment using a combination of sensor data, context information, and system knowledge. The proposed modeling framework is used to improve anomaly detection for diagnostics using a context-sensitive strategy. This work aims to support more effective maintenance actions by identifying problems in the machine, part, or process. The modeling and anomaly detection strategy was used to identify anomalies in computer numerical control machines and can be extended to other equipment on the plant floor.