PLC logic belongs in deterministic control, SCADA provides supervision and visibility, and MES adds production context. Clear boundaries and data contracts make the complete system easier to troubleshoot and evolve.
Engineering priorities
Start with the information model and the operational contract. Define what a consumer can trust, how unavailable values are represented and how changes are handled.