1. A method for programming a programmable logic controller (PLC) configured to control at least one energy consumer of a machine, the energy consumer having a plurality of consumer energy modes, the method comprising: receiving input via a user interface of a programming device operatively connected to the programmable logic controller, the input being indicative of a selection of (i) at least one energy consumer functional module, and (ii) at least one energy control functional module to implement in the programmable logic controller, and wherein the at least one energy control functional module is configured, in terms of programming, to: receive an operating command indicating at least one machine operating condition, wherein the operating command includes a specification of boundary condition, select one of the consumer energy modes for the energy consumer based on the at least one machine operating condition indicated by the operating command, the consumer energy mode being selected to meet the boundary condition, output the selected consumer energy mode to the at least one consumer functional module, and wherein the at least one consumer functional module is configured, in terms of programming, to control the energy consumer so as to implement the selected consumer energy mode.