ERP is used to build and maintain the basic plant schedule, while MES is used in real-time to drive the production process by monitoring and reporting on plant operations as incidents occur.