Method for automatically controlling an auxiliary function in an electronic control system of an agricultural machine, the method comprising - providing an agricultural machine having a work vehicle and an implement provided with a plurality of functional components , such as working tools or a lighting unit, which are controllable in operation by a plurality of auxiliary functions provided in an electronic control system of the agricultural machine, wherein each auxiliary function is configured to control one or more operation steps for at least one of the functional components ; - providing mapping data in the electronic control system , the mapping data being indicative of mapping the plurality of auxiliary functions to a plurality of operation events detectable for the work vehicle , in operation of the agricultural machine, by a detection unit , such as a sensor device, of the electronic control system and assigned to the work vehicle ; - operating the agricultural machine and detecting a first operation event for the work vehicle by the detection unit ; - in response to detecting the first operation event, selecting a first auxiliary function from the plurality of auxiliary functions by a selection unit of the electronic control system , the first auxiliary function being mapped to the first operation event, and configured to control operation of a first functional component from the plurality of functional components of the implement ; - generating, by a generation unit of the electronic control system , a first control signal for controlling operation of the first functional component assigned to the first auxiliary function in the electronic control system ; - receiving, through a data bus of the electronic control system , the first control signal in a first electronic control unit of the implement assigned to the first functional component of the implement ; and - by the first electronic control unit, controlling operation of the first functional component of the implement according to the first control signal. - providing an agricultural machine having a work vehicle and an implement provided with a plurality of functional components , such as working tools or a lighting unit, which are controllable in operation by a plurality of auxiliary functions provided in an electronic control system of the agricultural machine, wherein each auxiliary function is configured to control one or more operation steps for at least one of the functional components ; - providing mapping data in the electronic control system , the mapping data being indicative of mapping the plurality of auxiliary functions to a plurality of operation events detectable for the work vehicle , in operation of the agricultural machine, by a detection unit , such as a sensor device, of the electronic control system and assigned to the work vehicle ; - operating the agricultural machine and detecting a first operation event for the work vehicle by the detection unit ; - in response to detecting the first operation event, selecting a first auxiliary function from the plurality of auxiliary functions by a selection unit of the electronic control system , the first auxiliary function being mapped to the first operation event, and configured to control operation of a first functional component from the plurality of functional components of the implement ; - generating, by a generation unit of the electronic control system , a first control signal for controlling operation of the first functional component assigned to the first auxiliary function in the electronic control system ; - receiving, through a data bus of the electronic control system , the first control signal in a first electronic control unit of the implement assigned to the first functional component of the implement ; and - by the first electronic control unit, controlling operation of the first functional component of the implement according to the first control signal. <EOS>