A method for programming a safety controller, which has a plurality of inputs for receiving sensor signals, a plurality of outputs for outputting actuator signals, and at least one processor (62a, 62b) for executing program code, the method comprising the steps of: creating a user program which defines logical dependencies between the sensor signals and the actuator signals, using a program editor, wherein the user program has a first program portion and at least one additional program portion, and wherein the first program portion defines safety-related logical dependencies between selected sensor signals and actuator signals, compiling and linking the first and the at least one additional program portion, in order to obtain an executable original program code for the at least one processor (62a, 62b), wherein the original program code has an original first code portion which represents the first program portion, and at least one original additional code portion which represents the at least one additional program portion, transferring the original program code to a first memory of the safety controller, executing the original program code by means of the at least one processor (62a, 62b), in order to generate the actuator signals as a function of the sensor signals, modifying the first program portion using the program editor, in order to obtain a modified first program portion, and compiling the modified first program portion, in order to obtain a modified first code portion, characterized in that the modified first code portion is transferred to a second memory of the safety controller while the original program code is executed by means of the at least one processor (62a, 62b), and the modified first code portion is then executed in addition to the original additional code portion and instead of the original first code portion by means of the at least one processor (62a, 62b), in order to generate the actuator signals as a function of the modified first program portion. creating a user program which defines logical dependencies between the sensor signals and the actuator signals, using a program editor, wherein the user program has a first program portion and at least one additional program portion, and wherein the first program portion defines safety-related logical dependencies between selected sensor signals and actuator signals, compiling and linking the first and the at least one additional program portion, in order to obtain an executable original program code for the at least one processor (62a, 62b), wherein the original program code has an original first code portion which represents the first program portion, and at least one original additional code portion which represents the at least one additional program portion, transferring the original program code to a first memory of the safety controller, executing the original program code by means of the at least one processor (62a, 62b), in order to generate the actuator signals as a function of the sensor signals, modifying the first program portion using the program editor, in order to obtain a modified first program portion, and compiling the modified first program portion, in order to obtain a modified first code portion, characterized in that the modified first code portion is transferred to a second memory of the safety controller while the original program code is executed by means of the at least one processor (62a, 62b), and the modified first code portion is then executed in addition to the original additional code portion and instead of the original first code portion by means of the at least one processor (62a, 62b), in order to generate the actuator signals as a function of the modified first program portion.