Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects of the background technology, and provide the device and the method for synchronously acquiring and loading the middleware by the industrial robot, which can ensure the synchronism of the acquisition parameters, and can effectively save the data adaptation workload by an auxiliary data loading code generation mode, thereby improving the production efficiency.
The invention adopts the technical scheme that the synchronous data acquisition and loading middleware device for the industrial robot comprises a visual front-end module, a rear-end configuration management service module, a data mapping binding module, a data supervision center module, a data storage module, a code generation module, a data loading code, a historical data file and a data transmission module, wherein the visual front-end module is connected with the rear-end configuration management service module, the rear-end configuration management service module is respectively connected with the code generation module, the data storage module and the data supervision center module, the code generation module is connected with the data loading code, the data storage module is respectively connected with the historical data file and the data supervision center module, the data supervision center module is respectively connected with the data transmission module and the data mapping binding module, and the data loading code is respectively connected with the historical data file, the historical data file and the data transmission module, And the data transmission modules are connected.
Further, the visual front-end module is used for interacting with the back-end configuration management service module, transmitting configuration information set by a user to the back-end configuration management service module, receiving a data loading code, a historical data file and a configuration information file returned by the back-end configuration management service module, and providing a visual interface operated by the user;
the back-end configuration management service module is used for receiving the configuration information set by the user and transmitted by the visual front-end module, calling the code generation module and the historical data file, and returning the data loading code, the historical data file and the configuration information set by the user to the visual front-end module;
the data mapping binding module is internally provided with parameter types of the robot equipment, provides a parameter application interface for a robot body software developer to call, and realizes that each parameter in the robot body software is mapped and bound to the data mapping binding module; providing a data acquisition interface, preventing data from being modified by robot body software in the data acquisition process according to the requirement of a data supervision center module, and synchronously acquiring parameters bound to a data mapping binding module in the robot body software;
the data supervision center module is used for calling the data mapping binding module according to configuration information set by a user, and realizing parallel acquisition of selected parameters bound by the data mapping binding module; after the parameters are collected, the collected parameters are subjected to data transmission through a data transmission module, and data storage and recording are performed through a data storage module;
the data storage module has a data storage function and is used for the data supervision center module to store the data acquired from the data mapping and binding module; the system has a data export function, is called by a back-end configuration management service module, and exports the generated historical data file to the back-end configuration management service module;
the code generation module generates a data loading code based on the configuration information set by the current user;
the data loading code is a code generated by the code generation module and provides a user data reading function; after the data loading code is initialized, automatically identifying and loading historical data files under the same configuration parameters, finding a matched data transmission module and establishing connection, and writing the received data into the existing corresponding historical data file or creating a new historical data file according to the data source of the received data;
the historical data file is a data file in the robot body software system generated by the data storage module;
the data transmission module establishes a safety link between the data loading code and the data transmission module according to configuration information set by a user, provides a data transmission interface of the data supervision center module, and transmits data acquired by the data supervision center module to the data loading code.
Further, in the visual front-end module, the user operation includes setting configuration information, exporting a data loading code, exporting a historical data file, and exporting a configuration information file.
Further, in the visual front-end module, the configuration information set by the user includes system configuration information and data acquisition configuration information.
Further, the system configuration information includes data size and key information stored in the data storage module, and the key information is used for establishing a secure link between the data loading code and the data transmission module.
Further, the data acquisition configuration information includes the selected property of the bound parameters, the acquisition frequency and the trigger condition.
Further, the synchronous acquisition means that the data mapping and binding module does not allow the robot body software to modify data within a set time period, and the data mapping and binding module sequentially acquires parameters bound to the data mapping and binding module in the robot body software according to the transmitted parameter names within the time period.
A synchronous data acquisition and loading method for an industrial robot comprises the following steps:
step S1: the robot body software system is provided with a middleware device, each parameter in the robot body software is mapped and bound to a data mapping and binding module, the data mapping and binding module synchronously collects the parameters bound to the data mapping and binding module in the robot body software, and each module operates according to historical configuration information set by a user;
step S2: the user interacts with the back-end configuration management service module through the visual front-end module, checks the current configuration information and the bound parameter information, resets the configuration information, and sends the configuration information set by the user to the back-end configuration management service module through the visual front-end module;
step S3: the back-end configuration management service module receives configuration information set by a user and sent by the visual front-end module, generates a configuration information file based on the configuration information set by the current user, calls the code generation module and the historical data file, and returns a data loading code, the historical data file and the configuration information file to the visual front-end module;
step S4: the visual front-end module receives a data loading code, a historical data file and a configuration information file returned by the rear-end configuration management service module, and a user exports the data loading code, the historical data file and the configuration information file through the visual front-end module;
step S5: the data supervision center module collects data from the data mapping and binding module according to configuration information set by a user, parallel collection of selected parameters bound by the data mapping and binding module is realized, after the parameters are collected, the collected parameters are subjected to data transmission through the data transmission module, and data storage and recording are performed through the data storage module;
step S6: the data storage module receives data transmitted by the data monitoring center module and adds the data to a historical data file;
step S7: the data transmission module establishes a safety link between the data loading code and the data transmission module according to configuration information set by a user, and transmits data transmitted by the data monitoring center module to the data loading code;
step S8: and integrating the data loading code and the historical data file into a user application program by the user based on the exported data loading code and the historical data file, so that the data loading can be finished.
Further, in step S1, the specific process of mapping and binding each parameter in the robot body software to the data mapping and binding module is as follows: the robot body software calls a parameter application interface provided by the data mapping binding module, a parameter name and a parameter type are transmitted, the data mapping binding module verifies the transmitted parameter name and parameter type, and an error is returned if the verification fails; and if the verification is successful, creating the instance object of the corresponding type.
Further, in step S1, the specific process of synchronously acquiring the parameters bound to the data mapping and binding module in the robot body software is as follows: the data supervision center module transmits a required parameter list according to user setting, wherein the parameter list comprises required parameters set by the user; and the data mapping binding module reads the selected parameter list, locks the parameter mapping library, prevents data from being modified by the robot body software, sequentially inquires and records the parameter values in the parameter list, unlocks the parameter mapping library and returns the read parameter values to the data supervision center module after reading is completed.
Compared with the prior art, the invention has the following advantages:
the invention can realize synchronous acquisition and real-time loading of the operation data in the distributed robot system on the premise of keeping the original service logic and operation state unchanged, and is convenient for rapid integration of the data of the clustered robot. Compared with the prior art, the method can firstly ensure the synchronism of the acquisition parameters, secondly effectively reduce the data acquisition adaptation workload of the industrial robot by the auxiliary generation of the data loading code mode, and simultaneously realize the synchronous acquisition of the data, thereby improving the production efficiency and the data acquisition effect, effectively promoting the industrial development of the industrial robot, and having remarkable significance in the increasingly important intelligent era of data drive.
Detailed Description
The invention is described in further detail below with reference to the figures and specific embodiments.
Referring to fig. 1, the synchronous data acquisition and loading middleware device for an industrial robot in this embodiment includes a visual front-end module, a back-end configuration management service module, a data mapping and binding module, a data supervision center module, a data storage module, a code generation module, a data loading code, a historical data file and a data transmission module, the visual front-end module is connected with the rear-end configuration management service module, the rear-end configuration management service module is respectively connected with the code generation module, the data storage module and the data supervision center module, the code generation module is connected with the data loading code, the data storage module is respectively connected with the historical data file and the data supervision center module, the data supervision center module is respectively connected with the data transmission module and the data mapping binding module, and the data loading code is respectively connected with the historical data file and the data transmission module.
A visual front-end module: the system comprises a back-end configuration management service module, a data loading code, a historical data file and a configuration information file, wherein the back-end configuration management service module is used for interacting with the back-end configuration management service module, transmitting configuration information set by a user to the back-end configuration management service module, receiving the data loading code, the historical data file and the configuration information file returned by the back-end configuration management service module, and providing a visual interface for user operation (setting the configuration information, exporting the data loading code, exporting the historical data file and exporting the configuration information file); the configuration information set by the user comprises system configuration information and data acquisition configuration information, the system configuration information comprises data size and key information stored by a data storage module, and the key information is used for establishing a secure link between a data loading code and a data transmission module; the data acquisition configuration information comprises the selected property of the bound parameters (the parameters have selected and unselected states which represent the selected state of the parameters), acquisition frequency and trigger conditions. In this embodiment, the visualization front-end module interacts with the back-end configuration management service module in a Web page manner through an HTTP protocol.
The back-end configuration management service module: the system comprises a code generation module, a code loading module, a historical data file and configuration information set by a user, and is used for receiving the configuration information set by the user and transmitted by the visual front-end module, calling the code generation module and the historical data file, and returning the data loading code, the historical data file and the configuration information set by the user to the visual front-end module. In this embodiment, the back-end configuration management service module interacts with the visualization front-end module through an HTTP protocol.
The data mapping and binding module: various parameter types of the robot equipment are built in, a parameter application interface is provided for a robot body software developer to call, and mapping and binding of various parameters in the robot body software to a data mapping and binding module are achieved; and a data acquisition interface is provided, data is prevented from being modified by robot body software in the data acquisition process according to the requirements of a caller (a data supervision center module), and parameters bound to the data mapping binding module in the robot body software are synchronously acquired. The synchronous acquisition means that the data mapping binding module does not allow the robot body software to modify data within a set time period, and the data mapping binding module sequentially acquires parameters bound to the data mapping binding module in the robot body software according to the transmitted parameter names within the time period. In practical applications, the various parameter types of the robot device include various physical quantity types such as joint speed, joint angle, joint torque, device power, device temperature and the like of an industrial six-axis robot.
Referring to fig. 2, the specific process of mapping and binding each parameter in the robot body software to the data mapping and binding module is as follows: the robot body software calls a parameter application interface of the data mapping binding module, and transmits a parameter name and a parameter type; the data mapping and binding module verifies the transmitted parameter name and the parameter type, and if the verification fails, an error is returned; and if the verification is successful, creating an instance object of the corresponding type, storing the parameter name and the instance object into a parameter mapping library of the data mapping binding module in a key-value pair mode, and returning the instance object required by the robot body software.
Referring to fig. 3, the specific process of synchronously acquiring the parameters bound to the data mapping and binding module in the robot body software is as follows: the data supervision center module transmits a required parameter list according to user setting, wherein the parameter list comprises required parameters set by the user; and the data mapping binding module reads the selected parameter list, locks the parameter mapping library, prevents data from being modified by the robot body software, sequentially inquires and records the parameter values in the parameter list, unlocks the parameter mapping library and returns the read parameter values to the data supervision center module after reading is completed.
The data supervision center module: the data mapping and binding module is called according to configuration information set by a user, and selected parameters bound by the data mapping and binding module are collected in parallel; after the parameters are collected, the collected parameters are transmitted through the data transmission module, and data storage and recording are carried out through the data storage module. In this embodiment, the data monitoring center module selects an attribute according to the set acquisition period, trigger condition, and parameter, samples the selected parameter bound in the data mapping binding module, records each parameter value at a certain time, packages the parameter values according to the device name and the timestamp, calls the data storage module to store the parameter values, and calls the data transmission module to issue the parameter values.
A data storage module: the data management and binding module has a data storage function, the data management and binding module stores the data acquired from the data mapping and binding module, and the storage capacity of the data storage module can be set by a user through the visual front-end module; the data export function is provided, the back-end configuration management service module can call the data export function, and the generated historical data file is exported to the back-end configuration management service module.
A code generation module: generating a data loading code based on the configuration information set by the current user; in this embodiment, the code generation module provides a set of code functions for the backend configuration management service module to call, and returns the data loading code under the current configuration.
And (3) data loading codes: the code generated by the code generation module provides a user data reading function; after the data loading code is initialized, the historical data file loaded under the same configuration parameters can be automatically identified, the matched data transmission module is found and connection is established, and the received data is written into the existing corresponding historical data file or a new historical data file is created according to the data source of the received data. In this embodiment, after the user application calls the data loading code and initializes, all the exported historical data files are scanned first, after verification is passed, all the historical data files are loaded, and the current data information (the number of devices, the data size of each device, the time interval, etc.) of the user is returned; then, creating a data subscriber to find and connect with the newly added robot equipment data source; the user application may then enter the specified batch size to read the data from the cache until the user application ends. When the created data subscriber is matched and connected with the data publisher, if data is transmitted, a data callback function of the data subscriber is triggered, which equipment from which the newly added data comes is judged in the function, if the current buffer area and the historical data file have records, the newly added data is added into the data cache area and the historical data file, and if not, a data cache area and a historical data file corresponding to the equipment are created.
History data file: and generating a data file in the robot ontology software system for the data storage module (the robot ontology software runs on the robot ontology software system). Can be exported to the user application and loaded by the data loading code. In the embodiment, the historical data file adopts a csv format; the acquisition time of the data stored in the first column is respectively followed by various parameters selected by the user at corresponding time; the file name is named by using [ device model ] _[ device SN number ] _[ configuration time ].
A data transmission module: and establishing a safety link between the data loading code and the data transmission module according to the configuration information set by the user, providing a data transmission interface of the data supervision center module, and transmitting the data acquired by the data supervision center module to the data loading code. In this embodiment, a subscription and release model based on a data distribution service is adopted.
The synchronous data acquisition and loading system for the industrial robot in the embodiment is shown in fig. 4 and comprises n middleware devices, n sets of robot equipment, a robot body software system and a user application program, wherein one middleware device is correspondingly connected with one set of robot equipment, each set of robot equipment is provided with robot body software, and the robot body software runs on the robot body software system.
The synchronous data acquisition and loading method for the industrial robot comprises the following steps:
step S1: the robot body software system is provided with a middleware device, each parameter in the robot body software is mapped and bound to a data mapping and binding module, the data mapping and binding module synchronously collects the parameters bound to the data mapping and binding module in the robot body software, and each module operates according to historical configuration information set by a user.
The specific process of mapping and binding each parameter in the robot body software to the data mapping and binding module is as follows: the robot body software calls a parameter application interface provided by the data mapping binding module, a parameter name and a parameter type are transmitted, the data mapping binding module verifies the transmitted parameter name and parameter type, and an error is returned if the verification fails; and if the verification is successful, creating the instance object of the corresponding type.
The synchronous acquisition means that the data mapping binding module does not allow the robot body software to modify data within a set time period, and the data mapping binding module sequentially acquires parameters bound to the data mapping binding module in the robot body software according to the transmitted parameter names within the time period.
The specific process of synchronously acquiring the parameters bound to the data mapping binding module in the robot body software comprises the following steps: the data supervision center module transmits a required parameter list according to user setting, wherein the parameter list comprises required parameters set by the user; and the data mapping binding module reads the selected parameter list, locks the parameter mapping library, prevents data from being modified by the robot body software, sequentially inquires and records the parameter values in the parameter list, unlocks the parameter mapping library and returns the read parameter values to the data supervision center module after reading is completed.
Step S2: the user interacts with the back-end configuration management service module through the visual front-end module, checks the current configuration information and the bound parameter information, resets the configuration information, and sends the configuration information set by the user to the back-end configuration management service module through the visual front-end module.
The configuration information set by the user comprises system configuration information and data acquisition configuration information. The system configuration information comprises data size and key information stored by the data storage module, and the key information is used for establishing a secure link between the data loading code and the data transmission module; the data acquisition configuration information comprises bound parameter selection attributes (the parameters have a selected state and an unselected state and represent the selected state of the parameters), acquisition frequency and trigger conditions.
Step S3: the back-end configuration management service module receives the configuration information set by the user and sent by the visual front-end module, generates a configuration information file based on the configuration information set by the current user, calls the code generation module and the historical data file, and returns the data loading code, the historical data file and the configuration information file to the visual front-end module.
Step S4: the visual front-end module receives a data loading code, a historical data file and a configuration information file returned by the rear-end configuration management service module, and a user exports the data loading code, the historical data file and the configuration information file through the visual front-end module;
step S5: the data supervision center module collects data from the data mapping and binding module according to the data collection configuration information, parallel collection of selected parameters bound by the data mapping and binding module is achieved, after the parameters are collected, the collected parameters are transmitted through the data transmission module, and data storage and recording are conducted through the data storage module.
Step S6: and the data storage module receives data transmitted by the data monitoring center module and adds the data to the historical data file.
Step S7: the data transmission module establishes a safety link between the data loading code and the data transmission module according to the configuration information set by the user, and transmits the data transmitted by the data monitoring center module to the data loading code.
Step S8: and the user is connected with the robot equipment based on the exported data loading code and the historical data file, and the data loading code and the historical data file are integrated into a user application program, so that the data loading and the online updating can be completed.
The invention can realize synchronous acquisition and real-time loading of the operation data in the distributed robot system on the premise of keeping the original service logic and operation state unchanged, and is convenient for rapid integration of the data of the clustered robot. Compared with the prior art, the method can firstly ensure the synchronism of the acquisition parameters, and secondly can effectively save the data adaptation workload by the auxiliary generation of the data loading code mode, thereby improving the production efficiency, effectively promoting the industrial development of the industrial robot, and having remarkable significance in the increasingly important intelligent era of data drive.
Various modifications and variations of the present invention may be made by those skilled in the art, and they are also within the scope of the present invention provided they are within the scope of the claims of the present invention and their equivalents.
What is not described in detail in the specification is prior art that is well known to those skilled in the art.