Text this: Generalized Predictive Control in PLC systems