The present disclosure relates to techniques of automatic programming. Various embodiments of the teachings herein include methods, apparatus, and computer-readable storage media for automatic programming.
In the process of programming with robots, automatic production lines and other automatic programming tools, there are often values which need to be reused. At present, programmers usually use variables to record these values and reference them via variable names. In the following program, variable “tensor” is used to record reused values:
Using variables to record values that are used repeatedly has some disadvantages, such as not being intuitive, difficult to remember, and so on. Therefore, programmers need an intuitive tool, which can record, import and modify these reused values easily and quickly even without programming experience.
Various embodiments of the present disclosure include methods and apparatuses for automatic programming. For example, some embodiment include a method (100) for automatic programming, comprising: receiving (S101) a user's request on creating a first global parameter of a specific type by detecting the user's dragging a control corresponding to the specific type from a first user interface (701) and dropping the control on a second user interface (702); displaying (S102) a first popup window (804) for editing the first global parameter on the second user interface (702); receiving (S103) the user's editing operations on the first global parameter in the first popup window (804); creating (S104) the first global parameter according to the user's editing operations on the first global parameter; and displaying (S105) a new added first card (802) of the first global parameter in a list (802′) of global parameters on a third user interface (703).
In some embodiments, the method further comprises: receiving (S106) the user's request of setting relation of a second global parameter with a first FB displayed on the second user interface (702) by detecting the user's dragging of a second card (802) of the second global parameter from the third user interface (703) and dropping on the second user interface (702) if predefined condition is met; displaying (S107) a second popup window (804) for editing the second global parameter on the second user interface (702); receiving (S108) the user's editing operations on the second global parameter in the second popup window (804); and setting (S109) the first FB according to the user's operations on the second global parameter.
In some embodiments, the user's editing operations include changing the second global parameter into a local parameter, and setting (S109) the first FB according to the user's operations on the second global parameter comprises: creating a first local parameter and inheriting values of data items of the second global parameter to the first local parameter.
In some embodiments, the user's editing operations include changing a second local parameter into a third global parameter, and the method further comprises: creating (S110) the third global parameter and inheriting values of data items of the second local parameter to the third global parameter; and displaying (S111) a new added third card (802) of the third global parameter in the list (802′) of global parameters on a third user interface (703).
In some embodiments, the method further comprises: detecting (S112) the user's selecting a fourth card (803) of a fourth global parameter; and displaying (S113) at least one FB using the fourth global parameter in a highlighted way on the second user interface (702).
In some embodiments, the method further comprises: receiving (S114) the user's modification request on a fifth global parameter by detecting the user's clicking on a first button on a card (802) of the fifth global parameter; displaying (S115) a third popup window (804) for editing the fifth global parameter on the second user interface (702); receiving (S116) the user's editing operations on the fifth global parameter in the third popup window (804); updating (S117) all FBs referring to the fifth global parameter when detecting the user's clicking on a second button in the third popup window (804); and closing (S118) the third popup window (804) and displaying (S119) the updating status of all FBs referring to the fifth global parameter.
In some embodiments, types of a global parameter comprise at least one of the following items: motion path, wherein a global parameter of the type motion path includes at least one position group, each position group corresponds to a point on a motion path, data items of each position group include position coordinates, speed and acceleration; position coordinate; I/O channel; and value.
As another example, some embodiments include an apparatus (10) for automatic programming, comprising: a user interaction module (201), configured to receive a user's request on creating a first global parameter of a specific type by detecting the user's dragging a control corresponding to the specific type from a first user interface (701) and dropping the control on a second user interface (702); a displaying module (202), configured to display a first popup window (804) for editing the first global parameter on the second user interface (702); a processing module (203), configured to receive the user's editing operations on the first global parameter in the first popup window (804); and create the first global parameter according to the user's editing operations on the first global parameter; and the displaying module (202), further configured to display a new added first card (802) of the first global parameter in a list (802′) of global parameters on a third user interface (703).
In some embodiments, the user interaction module (201), further configured to receive the user's request of setting relation of a second global parameter with a first FB displayed on the second user interface (702) by detecting the user's dragging of a second card (802) of the second global parameter from the third user interface (703) and dropping on the second user interface (702) if predefined condition is met; the displaying module (202), further configured to display a second popup window (804) for editing the second global parameter on the second user interface (702); the user interaction module (201), further configured to receive the user's editing operations on the second global parameter in the second popup window (804); and the processing module (203), further configured to set the first FB according to the user's operations on the second global parameter.
In some embodiments, the user's editing operations include changing the second global parameter into a local parameter, and the processing module (203) is further configured to create a first local parameter and inheriting values of data items of the second global parameter to the first local parameter, when setting the first FB according to the user's operations on the second global parameter.
In some embodiments, the user's editing operations include changing a second local parameter into a third global parameter, and the processing module (203) is further configured to create the third global parameter and inherit values of data items of the second local parameter to the third global parameter; and the displaying module (202) is further configured to display a new added third card (802) of the third global parameter in the list (802′) of global parameters on a third user interface (703).
In some embodiments, the user interaction module (201), further configured to detect the user's selecting a fourth card (803) of a fourth global parameter; the displaying module (202), further configured to display at least one FB using the fourth global parameter in a highlighted way on the second user interface (702).
In some embodiments, the user interaction module (201), further configured to receive the user's modification request on a fifth global parameter by detecting the user's clicking on a first button on a card (802) of the fifth global parameter; the displaying module (202), further configured to display a third popup window (804) for editing the fifth global parameter on the second user interface (702); the user interaction module (202), further configured to receive the user's editing operations on the fifth global parameter in the third popup window (804); the processing module (203), further configured to update all FBs referring to the fifth global parameter when detecting the user's clicking on a second button in the third popup window (804); and the user interaction module (201), further configured to close the third popup window (804) and display the updating status of all FBs referring to the fifth global parameter.
In some embodiments, types of a global parameter comprise at least one of the following items: motion path, wherein a global parameter of the type motion path includes at least one position group, each position group corresponds to a point on a motion path, data items of each position group include position coordinates, speed and acceleration; position coordinate; I/O channel; and value.
As another example, some embodiments include an apparatus (10) for automatic programming, comprising: at least one processor (102); and at least one memory (101), coupled to the at least one processor (102), configured to execute one or more of the methods as described herein.
As another example, some embodiments include a computer-readable medium for automatic programming, storing computer-executable instructions, wherein the computer-executable instructions when executed cause at least one processor to execute one or more of the methods described herein.
The above mentioned attributes and other features and advantages of the present technique and the manner of attaining them will become more apparent and the present technique itself will be better understood by reference to the following description of embodiments of the present technique taken in conjunction with the accompanying drawings, wherein:
With the dragging-dropping-editing-listing steps, a global parameter of a desired type can be easily added and the adding result is also shown user-friendly and intuitively. Also, With the dragging-dropping-editing-listing steps, a global parameter can be easily referenced by one or multiple FBs. Use and editing of a global parameter in a FB can be much more easily and conveniently. What's more, FBs referring to a specific global parameter can be easily viewed. And, with the easy operations “Expand All” and “Save to all”, a global parameter's modification can be easily expanded to each FB, saving programming time and results of synchronization be viewed intuitively.
Hereinafter, above-mentioned and other features of the present technique are described in detail. Various embodiments are described with reference to the drawings, where like reference numerals are used to refer to like elements throughout. In the following description, for purpose of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more embodiments. It may be noted that the illustrated embodiments are intended to explain, and not to limit the scope of the disclosure. It may be evident that such embodiments may be practiced without these specific details.
When introducing elements of various embodiments of the present disclosure, the articles “a”, “an”, “the” and “said” are intended to mean that there are one or more of the elements. The terms “comprising”, “including” and “having” are intended to be inclusive and mean that there may be additional elements other than the listed elements. Now the present disclosure will be described hereinafter in details by referring to
Computer-executable instructions are stored in the at least one memory 101, and when executed by the at least one processor 102, can cause the at least one processor 102 to perform the steps described herein. The at least one processor 102 may include a microprocessor, an application specific integrated circuit (ASIC), a digital signal processor (DSP), a central processing unit (CPU), a graphics processing unit (GPU), state machines, etc. embodiments of computer-readable medium include, but not limited to a floppy disk, CD-ROM, magnetic disk, memory chip, ROM, RAM, an ASIC, a configured processor, all optical media, all magnetic tape or other magnetic media, or any other medium from which a computer processor can read instructions. Also, various other forms of computer-readable medium may transmit or carry instructions to a computer, including a router, private or public network, or other transmission device or channel, both wired and wireless. The instructions may include code from any computer-programming language, including, for example, C, C++, C#, Visual Basic, Java, and JavaScript.
The at least one memory 101 shown in
The automatic programming program 20 can include:
As shown in
A Function library 801 can be displayed on the first user interface 701. There can be multiple groups of functions in the
Function library 801, such as “Action”, “Logic Tools”, “Math Tools”, “Parameter” and “Skills”. when the control “parameter” is selected, types of global parameters will be displayed on the first user interface 701. Types of global parameters include but not limited to: “Motion path”, “Position coordinate”, “I/O channel” and “Value” (details of the types are shown in
With such a design, users can easily and clearly get to know what types of global parameters can be used and what global parameters have already been added. With the separate area of editing data items of a global parameter, users can focus on details of global parameter. Such separate user interfaces design can also make adding, editing and viewing use of global parameters become more easily.
Now referring to
As shown in
As shown in
As shown in
In some embodiments, the following operations can be made on a global parameter:
1) creating a global parameter (shown in
2) editing a global parameter in an FB (function block) (shown in
3) highlighting FBs using a global parameter (shown in
4) modifying a global parameter and expanding the modification to FBs (shown in
As shown in the upper figure in
Now referring to
Now referring to
Now referring to
With the dragging-dropping-editing-listing steps, a global parameter can be easily referenced by one or multiple FBs. Use and editing of a global parameter in a FB can be much more easily and conveniently. As shown in
Referring to
A global parameter is different than local ones, modification on a global parameter will influence all FBs referring it. Here, with the easy operations “Expand All” and “Save to all”, a global parameter's modification can be easily expanded to each FB, saving programming time and results of synchronization be viewed intuitively.
The user interaction module 201, the displaying module 202, and the processing module 203 are described above as software modules of the automatic programming program 20. In some embodiments, they can be implemented via hardware, such as ASIC chips. They can be integrated into one chip, or separately implemented and electrically connected. The architecture above is merely exemplary and used to explain the exemplary method 100 shown in
One exemplary method 100 incorporating teachings of the present disclosure includes steps S101 to S118, which correspond respectively to above mentioned operations:
1) creating a global parameter
Following steps are included as to the operations of creating a global parameter:
2) editing a global parameter in an FB
Following steps are included as to the operations of editing a global parameter:
In some embodiments, for changing a global parameter into a local one, in the step S109, a first local parameter can be created and values of data items of the second global parameter inherited to the first local parameter.
In some embodiments, for changing a local parameter into a global one, further steps can be executed after the step S109:
3) highlighting FBs using a global parameter
Following steps are included as to the operations of creating a global parameter:
4) modifying a global parameter and expanding the modification to FBs
Following steps are included as to the operations of modifying a global parameter and expanding to FBs:
In some embodiments, a computer-readable medium stores computer-executable instructions, which upon execution by a computer, enables the computer to execute any of the methods presented in this disclosure. A computer program, which is being executed by at least one processor and performs any of the methods presented in this disclosure.
An automatic programming enhancement solution is provided in the present disclosure, which allows:
1) Using different parameter types to distinguish value reuse scenario. Each parameter type has a fixed structure and friendly interface to identify. UI elements can be distinguished with data input usage (e.g. “motion path”, “value”, etc.).
2) User can quickly save, reference and copy reusable global parameters and data output values. On one hand, frequently used parameters can be referenced by and copied to different FBs; on the other hand, global parameters can also be dragged and dropped for reference by FBs.
3) Global parameters can be visually identified and modified in referenced FBs. Global parameters' modification can be applied to all referring FBs. And global parameters and local parameters can also be distinguished during editing in FBs. For quickly getting a view of global parameter's usage in FBs, FBs related can be highlighted when a global parameter is selected.
While the present technique has been described in detail with reference to certain embodiments, it should be appreciated that the present technique is not limited to those precise embodiments. Rather, in view of the present disclosure which describes exemplary modes for practicing the teachings herein, many modifications and variations would present themselves, to those skilled in the art without departing from the scope and spirit of this disclosure. All changes, modifications, and variations coming within the meaning and range of equivalency of the claims are to be considered within their scope.
This application is a U.S. National Stage Application of International Application No. PCT/CN2020/099352 filed Jun. 30, 2020, which designates the United States of America, the contents of which are hereby incorporated by reference in their entirety.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/099352 | 6/30/2020 | WO |