Modern manufacturing environments require fast and reliable product sorting to maintain quality standards and reduce dependence and possible errors caused by manual inspection. Traditional sorting systems use fixed sensors, such as inductive proximity sensors or photoelectric barriers, paired with rule-based programmable logic controller (PLC) logic. These have good performances for simple tasks, but they cannot handle visual variations or quality criteria that go beyond basic pass/fail detection. Combining deep learning-based computer vision with PLCs addresses this limitation. A trained neural network handles flexible pattern recognition, while the PLC provides deterministic, real-time control. This paper proposes an AI-powered industrial sorting system. The presented solution combines a Siemens S7-1500 PLC with a MobileNetV2-based computer vision module to classify conveyor workpieces into four categories: Blue, Green, Metal, and Base - the latter corresponding to rejected or unrecognized workpieces. The PLC program was developed in TIA Portal using Ladder Diagram (LAD) and follows a state-machine architecture. A dual-confirmation mechanism in the AI interface block prevents false actuations by requiring both an AI classification result and a physical sensor signal before any actuator is activated. The proposed solution reduces the risk of false sorting actions caused by isolated prediction errors or incorrect object positioning. The system achieved an overall classification accuracy of 96%, validated in a Factory I/O simulation environment.