Computer-implemented method for controlling a technical system (TS), comprising the method steps: - reading in (S1) hardware configuration parameters (HW1) and a value of a real-time requirement (RT) of a control unit (PLC), - reading in (S2) hardware configuration parameters (HW2) of an artificial intelligence computing unit (NPU), - reading in (S3) a control application (APP) for controlling the technical system, wherein the control application is configured to generate an input value (CTL) for the control unit on the basis of an artificial intelligence, - determining (S4) a processing time of the control application for execution of the control application on the artificial intelligence computing unit taking into consideration the hardware configuration parameters of the control unit and the hardware configuration parameters of the artificial intelligence computing unit, wherein the processing time comprises an execution time of the execution of the application on the artificial intelligence computing unit, - checking (S5) the determined processing time (T) on the basis of the value of the real-time requirement (RT) of the control unit and outputting a check result, and - outputting (S6) the control application for controlling the technical system on the basis of the check result, wherein the execution time of the control application is adapted (S8) to the value of the real-time requirement by modifying the control application, wherein the control application is iteratively modified (S9) until the determined execution time of the control application meets the value of the real-time requirement of the control unit, wherein the control application comprises an artificial neural network and nodes of the neural network are iteratively reduced until the determined execution time of the control application meets the value of the real-time requirement. - reading in (S1) hardware configuration parameters (HW1) and a value of a real-time requirement (RT) of a control unit (PLC), - reading in (S2) hardware configuration parameters (HW2) of an artificial intelligence computing unit (NPU), - reading in (S3) a control application (APP) for controlling the technical system, wherein the control application is configured to generate an input value (CTL) for the control unit on the basis of an artificial intelligence, - determining (S4) a processing time of the control application for execution of the control application on the artificial intelligence computing unit taking into consideration the hardware configuration parameters of the control unit and the hardware configuration parameters of the artificial intelligence computing unit, wherein the processing time comprises an execution time of the execution of the application on the artificial intelligence computing unit, - checking (S5) the determined processing time (T) on the basis of the value of the real-time requirement (RT) of the control unit and outputting a check result, and - outputting (S6) the control application for controlling the technical system on the basis of the check result, wherein the execution time of the control application is adapted (S8) to the value of the real-time requirement by modifying the control application, wherein the control application is iteratively modified (S9) until the determined execution time of the control application meets the value of the real-time requirement of the control unit, wherein the control application comprises an artificial neural network and nodes of the neural network are iteratively reduced until the determined execution time of the control application meets the value of the real-time requirement. <EOS>