CN-122003661-A - Programming method and device of automation equipment
Abstract
The invention provides a programming method of an automation device, which comprises the steps of downloading an application program on a mobile device, wherein the application program comprises a front-end code and a back-end code, the front-end code is executable to generate a user interface of the application program, receiving the back-end code from the mobile device on the automation device, analyzing the back-end code in a runtime environment of the automation device so that the automation device can run the application program, initializing configuration parameters of the application program, and running the application program in the automation device according to the configuration parameters.
Inventors
- NIU ZHU
- REN HUAJUN
- JIE MING
- FAN SHUNJIE
- ZHANG BIN
Assignees
- 西门子股份公司
Dates
- Publication Date
- 20260508
- Application Date
- 20231027
Claims (11)
- 1. A programming method (100) of an automation device, the programming method (100) comprising: Downloading an application program at a mobile device, the application program comprising front-end code and back-end code, the front-end code being executable to generate a user interface (110) for the application program; Receiving the backend code at the automation device from the mobile device, parsing the backend code in a runtime environment of the automation device so that the automation device can run the application (120); Configuration parameters of the application are initialized, and the application is run (130) in the automation device according to the configuration parameters.
- 2. The method (100) of claim 1, wherein parsing the back-end code in the runtime environment of the automation device includes determining interface information of the automation device, creating a runtime environment from the interface information, and parsing the back-end code in the runtime environment of the automation device.
- 3. The method (100) according to claim 1 or 2, wherein initializing configuration parameters of the application program, running the application program in the automation device according to the configuration parameters, comprises receiving configuration parameter set values input by a user through a user interface, running the application program in the automation device according to the configuration parameter set values, and acquiring configuration parameter actual values of the automation device in real time.
- 4. The method (100) of claim 1, wherein downloading the application at the mobile device includes connecting the mobile device to a cloud, the mobile device downloading the application from the cloud.
- 5. The method (100) of claim 1, wherein the method (100) further comprises uninstalling the application at the mobile device and the automated device in response to detecting an uninstall instruction of a user on the user interface.
- 6. The method (100) of claim 1, wherein the runtime environment is WebAssembly runtime environments.
- 7. A programming device (500) of an automation apparatus, characterized in that the programming device (500) comprises: a download module (510) that downloads an application at a mobile device, the application comprising front-end code and back-end code, the front-end code executable to generate a user interface for the application; a parsing module (520) that receives the back-end code from the mobile device at the automation device, parses the back-end code in a runtime environment of the automation device so that the automation device can run the application; And an operation module (530) for initializing configuration parameters of the application program and operating the application program in the automation device according to the configuration parameters.
- 8. An automation system comprising a mobile device (21) and an automation device (22), characterized in that, -The mobile device (21) downloading an application program, the application program comprising front-end code and back-end code, the front-end code being executable to generate a user interface for the application program; -the automation device (22) receiving the back-end code from the mobile device (21), parsing the back-end code in a runtime environment of the automation device (22) so that the automation device (22) can run the application; Initializing configuration parameters of the application program, and running the application program in the automation device (22) according to the configuration parameters.
- 9. An electronic device (600) comprising a processor (610), a memory (620) and instructions stored in the memory (620), wherein the instructions when executed by the processor (610) implement the method (100) according to any of claims 1-6.
- 10. A computer readable storage medium having stored thereon computer instructions which, when executed, perform the method (100) according to any of claims 1-6.
- 11. A computer program product comprising a computer program which, when executed by a processor, implements the method (100) of any of claims 1-6.
Description
Programming method and device of automation equipment Technical Field The invention mainly relates to the field of automation, in particular to a programming method and device of automation equipment. Background With the popularity of industrial automation, more and more automation devices, such as frequency converters, drives, etc., are deployed within a factory. The automation device needs to configure a large number of parameters before running to realize corresponding functions, and especially needs to adjust the parameters for different control scenes, which is very complex for users. In addition, some functions cannot be used by users, so that the waste of hardware resources is caused, and the hardware expense of the users is increased. Disclosure of Invention In order to solve the technical problems, the invention provides a programming method and device of an automation device, so as to improve the programming efficiency and flexibility of the automation device. To achieve the above object, the present invention proposes a programming method of an automation device, the programming method comprising downloading an application program at a mobile device, the application program comprising front-end code and back-end code, the front-end code being executable to generate a user interface of the application program; receiving the backend code at the automation device from the mobile device, parsing the backend code in a runtime environment of the automation device so that the automation device can run the application; initializing configuration parameters of the application program, and running the application program in the automation device according to the configuration parameters. Therefore, by downloading the application program on the mobile device, the front-end code of the application program can be executed to generate the user interface of the application program, and the user can interact with the application program through the user interface without interacting with the slowly-updated automation device, so that the user experience is improved. In addition, the back end code of the application program can be analyzed by the runtime environment of the automation device, and can be executed in the automation device without compiling, so that the automation device can run the application program, and the automation device has the function provided by the application program, thereby realizing the software-defined automation device. Optionally, parsing the back-end code in the runtime environment of the automation device includes determining interface information of the automation device, creating a runtime environment from the interface information, and parsing the back-end code in the runtime environment of the automation device. Therefore, the runtime environment is created according to the equipment information, so that the runtime environment is matched with the automation equipment, and the efficiency of automatic programming is improved. Optionally, initializing the configuration parameters of the application program, and running the application program in the automation device according to the configuration parameters comprises receiving configuration parameter set values input by a user through a user interface, running the application program in the automation device according to the configuration parameter set values, and acquiring the actual values of the configuration parameters of the automation device in real time. Therefore, the configuration parameter set value is input by a user through a user interface, so that the flexibility of configuration parameter setting is improved, and the programming flexibility of the automatic equipment is improved. Optionally, downloading the application program at the mobile device includes connecting the mobile device to a cloud, the mobile device downloading the application program from the cloud. For this reason, the mobile device may connect to the cloud and download the application program from the cloud, thereby meeting the user's demand for the application program. Optionally, the method further comprises uninstalling the application at the mobile device and the automation device in response to detecting an uninstall instruction of a user on the user interface. Therefore, the user can uninstall the application program through the user interface, so that the flexibility of uninstalling the application program is improved, and the flexibility of programming the automatic equipment is further improved. Optionally, the runtime environment is WebAssembly runtime environments. To this end, webAssembly runtime environments are provided. The invention also proposes a programming device of an automation device, comprising: a download module that downloads an application at a mobile device, the application comprising front-end code and back-end code, the front-end code executable to generate a user interface for the application; a parsing module tha