A method for programming a modular safety controller, designed to switch an electrical load on and off safely according to a safety regulation, wherein, by means of a processor, a programming interface with logic programming is displayed on a screen, a plurality of function block symbols (66, 68, 70) symbolizing input signals from encoders or output signals to actuators, or comprising logic function blocks, are displayed in a first subarea of the programming interface; upon selection of one of the function block symbols (66, 68, 70) by a user within the logic programming, an instance (72 - 84) of the selected function block symbol (66, 68, 70) is displayed in a second subarea of the programming interface, wherein the second subarea is designed in such a way that already selected instances (72 - 84) of function block symbols (66, 68, 70) are logically linked by the user on the basis of a logic circuit diagram, and either configuration data is created by the processor on the basis of the created logic circuit diagram and a module configuration and terminal assignment, which configuration data is designed to be loaded into the modular safety controller and interpreted and used by the latter during the execution of firmware stored therein, or adapted firmware is created which is designed to be transferred to the modular safety controller and executed therein; characterized in that each of the function block symbols (66, 68, 70) is associated with a data set specifying a hardware resource requirement, the hardware resources comprising functionalities of the modular safety controller and/or a terminal count, and when the function block symbol (66, 68, 70) is selected within the logic programming, it is checked on the basis of the hardware resource requirement specified in the data set assigned to this function block (66, 68, 70) whether a current module configuration of the modular safety controller can provide this hardware resource requirement in addition to a current hardware resource requirement, and if the current module configuration cannot provide this hardware resource requirement, the module configuration is changed, wherein, when the module configuration is changed, a total hardware resource requirement of all already selected instances (72 - 84) of function module symbols (66, 68, 70) in the second subarea is determined on the basis of the data records specified in the respective data records assigned to the function module symbols (66, 68, 70), wherein the module configuration is changed such that the changed module configuration can provide the total resource requirement by determining from all possible combinations of modules (2, 4, 6) those combinations that can provide the total hardware resource requirement. a programming interface with logic programming is displayed on a screen, a plurality of function block symbols (66, 68, 70) symbolizing input signals from encoders or output signals to actuators, or comprising logic function blocks, are displayed in a first subarea of the programming interface; upon selection of one of the function block symbols (66, 68, 70) by a user within the logic programming, an instance (72 - 84) of the selected function block symbol (66, 68, 70) is displayed in a second subarea of the programming interface, wherein the second subarea is designed in such a way that already selected instances (72 - 84) of function block symbols (66, 68, 70) are logically linked by the user on the basis of a logic circuit diagram, and either configuration data is created by the processor on the basis of the created logic circuit diagram and a module configuration and terminal assignment, which configuration data is designed to be loaded into the modular safety controller and interpreted and used by the latter during the execution of firmware stored therein, or adapted firmware is created which is designed to be transferred to the modular safety controller and executed therein; characterized in that each of the function block symbols (66, 68, 70) is associated with a data set specifying a hardware resource requirement, the hardware resources comprising functionalities of the modular safety controller and/or a terminal count, and when the function block symbol (66, 68, 70) is selected within the logic programming, it is checked on the basis of the hardware resource requirement specified in the data set assigned to this function block (66, 68, 70) whether a current module configuration of the modular safety controller can provide this hardware resource requirement in addition to a current hardware resource requirement, and if the current module configuration cannot provide this hardware resource requirement, the module configuration is changed, wherein, when the module configuration is changed, a total hardware resource requirement of all already selected instances (72 - 84) of function module symbols (66, 68, 70) in the second subarea is determined on the basis of the data records specified in the respective data records assigned to the function module symbols (66, 68, 70), wherein the module configuration is changed such that the changed module configuration can provide the total resource requirement by determining from all possible combinations of modules (2, 4, 6) those combinations that can provide the total hardware resource requirement.