A method for modifying code for an industrial control program running on an industrial controller unit, comprising: providing to the industrial controller unit, or receiving at the industrial controller unit a code portion for the industrial control program; the method being characterized in that it further comprises: providing an ancillary data area for holding values of variables to be accessed by the code portion, wherein the ancillary data area is distinct and/or separated from a program data area that holds data for the industrial control program; inserting the code portion into the industrial control program at a predetermined code position of the industrial control program, wherein the code portion is adapted to only write data into the ancillary data area; copying values of variables that are expected to be accessed by the code portion from the program data area into the ancillary data area before processing the code portion; running the industrial control program comprising the code portion on the industrial controller unit; monitoring a performance of the code portion in the industrial control program, and, depending on the monitoring: removing the code portion from the industrial control program; or copying at least part of the data from the ancillary data area to the program data area. providing to the industrial controller unit, or receiving at the industrial controller unit a code portion for the industrial control program; the method being characterized in that it further comprises: providing an ancillary data area for holding values of variables to be accessed by the code portion, wherein the ancillary data area is distinct and/or separated from a program data area that holds data for the industrial control program; inserting the code portion into the industrial control program at a predetermined code position of the industrial control program, wherein the code portion is adapted to only write data into the ancillary data area; copying values of variables that are expected to be accessed by the code portion from the program data area into the ancillary data area before processing the code portion; running the industrial control program comprising the code portion on the industrial controller unit; providing an ancillary data area for holding values of variables to be accessed by the code portion, wherein the ancillary data area is distinct and/or separated from a program data area that holds data for the industrial control program; inserting the code portion into the industrial control program at a predetermined code position of the industrial control program, wherein the code portion is adapted to only write data into the ancillary data area; copying values of variables that are expected to be accessed by the code portion from the program data area into the ancillary data area before processing the code portion; running the industrial control program comprising the code portion on the industrial controller unit; monitoring a performance of the code portion in the industrial control program, and, depending on the monitoring: removing the code portion from the industrial control program; or copying at least part of the data from the ancillary data area to the program data area. removing the code portion from the industrial control program; or copying at least part of the data from the ancillary data area to the program data area.