A method of operating an intelligent programmable logic controller (200, 300) over a plurality of scan cycles, the method comprising: 1.1 executing, by a processor of the intelligent programmable logic controller (200, 300), a control program that reads process data received from one or more production devices and provides instructions to control the one or more production devices; 1.1.1 storing, in a storage medium of the intelligent programmable logic controller (200, 300), a pre-defined knowledge model and a custom knowledge model connected syntactically via shared signature items and connected semantically via assertions on relation between elements of the pre-defined knowledge model and the custom knowledge model, wherein the custom knowledge model expresses at least one of process-specific information on parameters, required functionalities, or process-specific analytical functionality; 1.1.2 storing, in the storage medium of the intelligent programmable logic controller (200, 300), a pre-defined reasoning model and a custom reasoning model, wherein the pre-defined reasoning model and the custom reasoning model integrate one or more reasoning algorithms into the intelligent programmable logic controller (200, 300); 1.3 executing, by a data analytics component with an automated reasoner module of the intelligent programmable logic controller (200, 300), the one or more reasoning algorithms for analyzing data received and transmitted via a data connector component of the intelligent programmable logic controller (200, 300), wherein the process data, the knowledge models (330, 335) and the reasoning models (320, 325) are loaded into the processor where the reasoning models (320, 325) are configured with the knowledge models (330, 335) and are executed based on the process data; the method being characterised in 1.4 receiving, by the data connector component with a deployment interface (235, 505) of the intelligent programmable logic controller (200, 300), a customer configuration from an external server, the customer configuration having information including rules, parameters, and attribute values for customizing the custom knowledge model and the custom reasoning model; and 1.5 dynamically modifying, by a contextualization component with a knowledge manager of the intelligent programmable logic controller (200, 300), the configuration of the one or more reasoning algorithms during runtime of the control program based on the customer configuration, while remaining functionality of the control program remains operative in one or more separate processing threads. 1.1 executing, by a processor of the intelligent programmable logic controller (200, 300), a control program that reads process data received from one or more production devices and provides instructions to control the one or more production devices; 1.1.1 storing, in a storage medium of the intelligent programmable logic controller (200, 300), a pre-defined knowledge model and a custom knowledge model connected syntactically via shared signature items and connected semantically via assertions on relation between elements of the pre-defined knowledge model and the custom knowledge model, wherein the custom knowledge model expresses at least one of process-specific information on parameters, required functionalities, or process-specific analytical functionality; 1.1.2 storing, in the storage medium of the intelligent programmable logic controller (200, 300), a pre-defined reasoning model and a custom reasoning model, wherein the pre-defined reasoning model and the custom reasoning model integrate one or more reasoning algorithms into the intelligent programmable logic controller (200, 300); 1.3 executing, by a data analytics component with an automated reasoner module of the intelligent programmable logic controller (200, 300), the one or more reasoning algorithms for analyzing data received and transmitted via a data connector component of the intelligent programmable logic controller (200, 300), wherein the process data, the knowledge models (330, 335) and the reasoning models (320, 325) are loaded into the processor where the reasoning models (320, 325) are configured with the knowledge models (330, 335) and are executed based on the process data; 1.4 receiving, by the data connector component with a deployment interface (235, 505) of the intelligent programmable logic controller (200, 300), a customer configuration from an external server, the customer configuration having information including rules, parameters, and attribute values for customizing the custom knowledge model and the custom reasoning model; and 1.5 dynamically modifying, by a contextualization component with a knowledge manager of the intelligent programmable logic controller (200, 300), the configuration of the one or more reasoning algorithms during runtime of the control program based on the customer configuration, while remaining functionality of the control program remains operative in one or more separate processing threads.