A system for generating platform-specific control logic implementation code for execution on a programmable logic controller (PLC) platform includes a plurality of processing layers. A first layer models generic control requirements as a unitary mathematical model (UMM). A second layer trans lates the UMM into generic control code describing a plat form-independent set of generic control functions following an open structured language. A third layer automatically transforms the generic control functions into the platform specific implementation code executable on different PLC platforms. A method of generating the implementation code includes modeling control requirements as a mathematical model, transforming the model into platform-independent control code describing a predetermined set of generic con trol functions using Extensible Markup Language (XML) schema, and automatically transforming the generic control functions into the implementation code.