A method for updating and operating a programmable logic controller, the method comprising the steps of: generating a list of allowed output parameters by recording all input data and output parameters of an initial application logic and correlating the recorded input data and output parameters to generate the list of allowed output parameters; receiving application logic update data in an update checking layer of the programmable logic controller, wherein the application logic update data contains information for updating the initial application logic of the programmable logic controller; checking the application logic update data by the update checking layer, whether the application logic update data is allowed application logic update data, by verifying that every application logic update defined by the application logic update data corresponds to an application logic update from a list of allowed logic updates; updating the initial application logic with the application logic update data, only if the application logic update data is allowed application logic update data; receiving sensor input data from at least one sensor coupled to the programmable logic controller; processing the sensor input data with application logic stored in the programmable logic controller to generate an output parameter; receiving the output parameter in an output checking layer of the programmable logic controller; checking, during runtime, the output parameter by the output checking layer, whether the output parameter is an allowed output parameter, by verifying whether the output parameter corresponds to the list of allowed output parameters; outputting only an allowed output parameter to an actuator coupled to the programmable logic controller. generating a list of allowed output parameters by recording all input data and output parameters of an initial application logic and correlating the recorded input data and output parameters to generate the list of allowed output parameters; receiving application logic update data in an update checking layer of the programmable logic controller, wherein the application logic update data contains information for updating the initial application logic of the programmable logic controller; checking the application logic update data by the update checking layer, whether the application logic update data is allowed application logic update data, by verifying that every application logic update defined by the application logic update data corresponds to an application logic update from a list of allowed logic updates; updating the initial application logic with the application logic update data, only if the application logic update data is allowed application logic update data; receiving sensor input data from at least one sensor coupled to the programmable logic controller; processing the sensor input data with application logic stored in the programmable logic controller to generate an output parameter; receiving the output parameter in an output checking layer of the programmable logic controller; checking, during runtime, the output parameter by the output checking layer, whether the output parameter is an allowed output parameter, by verifying whether the output parameter corresponds to the list of allowed output parameters; outputting only an allowed output parameter to an actuator coupled to the programmable logic controller.