CN116069317A - AutomationML-based industrial equipment motion control PLC code automatic generation method and device - Google Patents

AutomationML-based industrial equipment motion control PLC code automatic generation method and device Download PDF

Info

Publication number
CN116069317A
CN116069317A CN202211736207.6A CN202211736207A CN116069317A CN 116069317 A CN116069317 A CN 116069317A CN 202211736207 A CN202211736207 A CN 202211736207A CN 116069317 A CN116069317 A CN 116069317A
Authority
CN
China
Prior art keywords
motion
equipment
motion control
logic
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211736207.6A
Other languages
Chinese (zh)
Inventor
邬惠峰
陈翊柯
赵建勇
孙丹枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202211736207.6A priority Critical patent/CN116069317A/en
Publication of CN116069317A publication Critical patent/CN116069317A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an automatic generation method and device of industrial equipment motion control PLC codes based on AutomatinML, comprising the following steps: the industrial simulation platform performs simulation motion simulation on a digital twin body of the field industrial equipment. After the equipment movement behavior is determined, modeling and representing equipment driving information, initial state information, target state information and complete movement process information to obtain an equipment behavior model; PLC (Programmable Logic Controller) programming platform imports the equipment behavior model, performs ontology semantic description on the equipment behavior model, and performs knowledge fusion according to the constructed functional block knowledge base to obtain a knowledge graph; and carrying out reasoning analysis on the knowledge graph according to specific rules and algorithms to generate FBD (Function Block Diagram) codes based on IEC 61131-3 standard consistent with the motion control logic described by the equipment behavior model. The invention realizes the automatic generation of codes from the industrial simulation platform to the PLC programming platform, solves the problem of lossless exchange of cross-platform data, and improves the development efficiency of industrial automation engineering.

Description

AutomationML-based industrial equipment motion control PLC code automatic generation method and device
Technical Field
The invention belongs to the field of industrial control, and relates to an automatic generation method and device for an industrial equipment motion control code based on AutomatinML.
Background
There are a large number of renaturation tasks in the automated programming, resulting in low development efficiency of industrial automation engineering. The automatic code generation method is considered as an effective solution for reducing engineering cost, but the motion control of industrial equipment is a precise and complex process, requires precise logic and data, otherwise, equipment damage can be caused, and the personal safety of field staff is even affected.
The digital twin technology support establishes a mapping relation between a virtual environment and a real environment through a digital means, and the industrial simulation platform supports teaching programming of equipment in the virtual environment through a built-in component library comprising motion components. The industrial simulation platform based on the digital twin technology can simulate the motion process of the field industrial equipment in advance on the virtual environment, so that the field accident is avoided to a great extent, and technical support is provided for automatic code generation of the automatic engineering. However, due to the inconsistent platform and device protocols, the simulation platform often cannot directly drive the field device to work.
The PLC is a common device in the field of modern industrial control, and is developed in a programming language supporting the IEC 61131-3 standard. Motion control of field industrial equipment can be achieved through a PLC and a PLC programming development platform conforming to IEC 61131-3 standard.
In the field of PLC industrial control, because of the specificity of PLC codes, the behavior logic of industrial equipment and the bottom implementation of PLC motion control logic are two different research fields, so that the industrial field at present needs to be responsible for operating an industrial simulation platform by a process engineer of process control design, and a software engineer responsible for logic implementation operates a PLC programming platform to cooperate to complete the operation of the equipment. There is considerable repeatability in the work of both, which undoubtedly increases unnecessary human expenditure.
Therefore, in order to overcome the technical defects in the prior art, the invention aims to find a solution to automatically generate the code which can be operated by the PLC programming platform directly from the industrial simulation platform. How to accurately describe the motion logic between each module between devices, how to accurately reproduce virtual motion scenes and extract necessary information from the virtual motion scenes, and how to effectively correlate each discrete information and achieve lossless data exchange is a challenge, and the AutomationML (AML) format specification provides a reference solution for lossless data exchange between different platforms.
Disclosure of Invention
In order to solve the problems, the invention provides an automatic generation method and device for the motion control codes of industrial equipment based on AutomatinML, which realize automatic generation of codes from an industrial simulation platform to a PLC programming platform, solve the problem of lossless exchange of cross-platform data and improve the development efficiency of industrial automation engineering.
In order to solve the technical problems in the prior art, the technical scheme of the invention is as follows:
an automatic generation method of industrial equipment motion control codes based on AutomatinML comprises the following steps:
step S1, the industrial simulation platform performs simulation motion simulation on a digital twin body of field industrial equipment. After the equipment movement behavior is determined, modeling and representing equipment driving information, initial state information, target state information and complete movement process information to obtain an equipment behavior model;
step S2, the PLC programming platform imports a device behavior model, performs ontology semantic description on the device behavior model, and performs knowledge fusion according to the constructed functional block knowledge base to obtain a knowledge graph;
and S3, carrying out reasoning analysis on the knowledge graph according to specific rules and algorithms, and generating an FBD code based on the IEC 61131-3 standard, which is consistent with the motion control logic described by the equipment behavior model.
As a further development, an autopilonml based on the IEC 62714-1 standard is used as a model representation tool for the device behavior for combining the motion description with simulation information, wherein the simulation motion data is integrated into the autopilonml model in a colossal file description.
As a further improvement, step S1 further includes:
step S1-1: constructing a motion scene;
the basic motion of the device is described by a motion control model.
Definition 1: the motion control model is a 3-tuple mcm= (s, t, f) consisting of:
1) A start state s;
2) A target state t;
3) A transformation rule f representing transformation logic from s to t;
the complete equipment motion behavior is formed by combining a series of industrial equipment participating in motion control and motion control models among the industrial equipment according to a certain logic, wherein the equipment behavior model is described as follows:
definition 2: the device behavior model (Device Behavior Model) is a 4-tuple dbm= (d, M, S, λ) consisting of:
1) A device corresponding to the behavior description;
2) Aggregate list m= (M) of motion control model described by definition 1 0 ,m 1 ,…,m n );
3) Aggregate list s= (S) of motion control execution order 0 ,s 1 ,…,s n );
4) An interlock condition lambda set list lambda= (lambda) 01 ,…,λ n-1 ) An interlock is described as a binary logic that locks the associated motion control in a particular state; each lambda is i Description m i To m i+1 The interlocking constraints that need to be additionally met, i.e
Figure BDA0004028989230000031
Step S1-2: constructing a mechanical arm digital twin model; wherein,,
acquiring characteristic data from a sensor module carried by the mechanical arm by means of a digital twin technology, and generating a digital twin body of an actual mechanical arm on an industrial simulation platform based on a geometric model library integrated by the platform and data generated by transmission analysis;
step S1-3: describing a motion scene by the simulation platform; wherein,,
the interlocking logic described by combining the execution sequence and the logic component library through the motion control model can completely describe a device behavior model;
step S1-4: modeling and representing; wherein,,
the equipment behaviors described based on the industrial simulation platform are represented by modeling through AutomatinML, and the definition of AML standard comprises a basic role class library, a basic interface class library and a basic attribute class library. The simulated motion data is integrated into the AML model in a Collada description by combining device behavior and simulation information through semantic connection relationships defined in the AML standard.
As a further improvement, step S2 further includes:
step S2-1: constructing a function block knowledge base; wherein,,
performing ontology semantic conversion on an existing function block control library of the PLC programming platform to generate a corresponding function block knowledge base based on ontology semantic description, wherein the function block knowledge base comprises basic interlocking logic function blocks including Equal and function blocks based on PLCOpen Motion Control standard, and simultaneously providing input and output attributes of each motion control to form a mapping relation with a motion process in an AML model;
step S2-2: generating a knowledge graph: wherein,,
the PLC programming platform imports AML model files and performs ontology semantic conversion on the links among modules expressed by the AML models; the description of the motion process is related to, and knowledge fusion is carried out on the description and the built functional block knowledge base based on the ontology description according to a customized mapping relation.
As a further improvement, step S3 further includes:
step S3-1: generating an engineering framework; wherein,,
according to the DBM description, starting from the equipment node, the driving information corresponding to the equipment is stored in the variable area of the independent POU preferentially, and the POU is called shared POU and is used by other POUs. Sequentially establishing POU pages according to the execution sequence described by the Order class;
step S3-2: generating a functional block; wherein,,
starting from the motion process nodes, identifying the logic of the functional blocks corresponding to each motion process node, generating the logic in the corresponding POU according to the execution sequence, and transmitting information between the functional blocks by means of connecting lines or variables; if the two motion process nodes contain the interlocking logic control, the interlocking logic control is additionally generated.
Step S3-3: assigning values to the functional blocks; wherein,,
according to MCM description, starting from a motion process node, sequentially searching a corresponding initial state and a corresponding target state, and respectively acquiring data from a shared POU, an initial state point and a target state point according to the attribute of the input Port node description; if the Port node attribute cannot meet the input requirement of the functional block, a corresponding Collada file is acquired from the motion process, a characteristic point identification algorithm is called to identify the position of the characteristic point of each frame, the position is converted into an actual space position, the moving distance of the point between every two frames is calculated, and then information such as the moving speed and the acceleration of the equipment is calculated, and is assigned to the pins of the functional block.
As a further improvement scheme, the function block knowledge base is constructed by ontology descriptions corresponding to a function block control base based on a PLC programming platform, and comprises basic interlocking logic function blocks and function blocks based on PLCOpen Motion Control standard.
The invention also discloses an automatic generation device of the motion control code of the industrial equipment based on AutomatinML, which at least comprises an industrial simulation platform and a PLC programming platform, wherein,
the industrial simulation platform is used for performing simulation motion and simulation on a digital twin body of the field industrial equipment; after the equipment movement behavior is determined, modeling and representing equipment driving information, initial state information, target state information and complete movement process information to obtain an equipment behavior model;
the PLC programming platform is used for importing an equipment behavior model, carrying out ontology semantic description on the equipment behavior model, and carrying out knowledge fusion according to the constructed functional block knowledge base to obtain a knowledge graph; and carrying out reasoning analysis on the knowledge graph according to specific rules and algorithms to generate an FBD code based on IEC 61131-3 standard, which is consistent with the motion control logic described by the equipment behavior model.
As a further development of the invention it is provided that,
the industrial simulation platform integrates a geometric model library, a motion function library and a logic component library; the geometric model library comprises digital models of various industrial equipment; the motion function library comprises basic motion components, each basic motion component represents a basic motion process, the bottom layer corresponds to motion control logic based on body description, and the bottom layer motion control logic is transparent to a simulation platform user; the logic component library includes basic logic components including the Equal logic to describe the interlocking logic.
As a further development of the invention it is provided that,
the basic motion of the device is described by a motion control model:
definition 1: the motion control model is a 3-tuple mcm= (s, t, f) consisting of:
1) A start state s;
2) A target state t;
3) A transformation rule f representing transformation logic from s to t;
the complete equipment motion behavior is formed by combining a series of industrial equipment participating in motion control and motion control models among the industrial equipment according to a certain logic, wherein the equipment behavior model is described as follows:
definition 2: the device behavior model (Device Behavior Model) is a 4-tuple dbm= (d, M, s, λ) consisting of:
1) A device corresponding to the behavior description;
2) Aggregate list m= (M) of motion control model described by definition 1 0 ,m 1 ,…,m n );
3) Aggregate list s= (S) of motion control execution order 0 ,s 1 ,…,s n );
4) An interlock condition lambda set list lambda= (lambda) 01 ,…,λ n-1 ) An interlock is described as a binary logic that locks the associated motion control in a particular state; each lambda is i Description m i To m i+1 The interlocking constraints that need to be additionally met, i.e
Figure BDA0004028989230000061
As a further improvement scheme, the PLC programming platform is a programming platform based on the IEC 61131-3 standard programming language, provides programming modes of corresponding programming languages respectively, and provides various function block control libraries with rich functions.
Compared with the prior art, the invention has the following technical effects:
1. in the field of automatic generation of PLC codes, the prior art mainly considers the method of code generation in the aspect of logic control. The technical scheme of the invention explores the field of motion control and provides a method for generating motion control codes.
2. In the field of automatic generation of motion control codes, the prior art is mainly oriented to c/c++, python languages, a code frame meeting the requirement description is automatically generated through a model driving development technology, and specific details about the aspect of functional logic require programmers to realize the code frame by themselves, and the code frame belongs to semi-automatic generation. The invention provides a full-automatic solution for automatically generating the PLC codes based on PLCOpen Motion Control standard.
Drawings
FIG. 1 is a diagram of an implementation architecture of an automatic generation method for motion control codes of industrial equipment supporting lossless data exchange in an embodiment of the present invention;
FIG. 2 is a flow chart of an implementation of an automatic generation method for motion control codes of industrial equipment supporting lossless data exchange in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart illustrating an implementation of a device behavior modeling representation in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a motion scenario of a robot in an embodiment of the present invention;
FIG. 5 is a schematic diagram of an operation interface of an industrial simulation platform according to an embodiment of the present invention;
FIG. 6 is a schematic representation of AML model of a robot motion scenario in accordance with one embodiment of the present invention;
FIG. 7 is a schematic diagram of knowledge graph description of an AML model in accordance with an embodiment of the invention;
FIG. 8 is a flowchart of a knowledge-graph reasoning parsing code implementation in an embodiment of the invention;
FIG. 9 is a diagram illustrating a process for generating a program framework according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a process for generating an FBD function according to an embodiment of the invention;
FIG. 11 is a schematic diagram of a process for assigning values to FBD function block codes in an embodiment of the invention;
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
On the contrary, the invention is intended to cover any alternatives, modifications, equivalents, and variations as may be included within the spirit and scope of the invention as defined by the appended claims. Further, in the following detailed description of the present invention, certain specific details are set forth in order to provide a better understanding of the present invention. The present invention will be fully understood by those skilled in the art without the details described herein.
An embodiment provided by the invention comprises an automatic generation and realization architecture of industrial equipment motion control codes supporting lossless data exchange, as shown in fig. 1, and comprises an industrial simulation platform and a PLC programming platform, which form a programmable configuration environment, and the specific contents are as follows:
the industrial simulation platform integrates a geometric model library, a motion function library and a logic component library. The geometric model library comprises digital models of various industrial equipment including mechanical arms; the motion function library comprises basic motion components, each basic motion component represents a basic motion process, the bottom layer corresponds to motion control logic based on body description, and the bottom layer motion control logic is transparent to a simulation platform user; the logic component library includes basic logic components including the Equal logic to describe the interlocking logic.
The PLC programming platform is a programming platform based on five programming languages (FBD (Function Block Diagram), LD (Ladder Diagram), ST (Structured Text), SFC (Sequential Function Chart), IL (Instruction List)) of the IEC 61131-3 standard, respectively provides programming modes of the five languages, and provides various function block control libraries with rich functions.
The embodiment provided by the invention comprises an implementation flow of an automatic generation method of industrial equipment motion control codes based on AutomatinML, as shown in figure 2, and the specific steps are as follows:
step S1, the industrial simulation platform performs simulation motion simulation on a digital twin body of field industrial equipment. After the equipment movement behavior is determined, modeling and representing the equipment driving information, the initial state information, the target state information and the complete movement process information to obtain an equipment behavior model. The invention creatively provides a motion control and equipment behavior model, which aims to abstract the motion of the existing equipment, has universality among platforms, and is characterized in that the accurate description cannot be given out until what method is used by the platform to represent the model, and only abstract description can be given out, so that no matter what method is used, the built model is similar to the model provided by the invention within a certain spirit range, and the method is within the protection scope of the invention.
The implementation flow is shown in fig. 3, and the specific steps are as follows:
step S1-1: building a sports scene
Consider first the motion scenario shown in fig. 4: there are two industrial Robot arms Robot1 and Robot2 with six axes of freedom. Robot1 grabs an item at Position1, takes Position1 as the initial state, passes Position2, and moves to reach the target state Position3. When the Position4 of the Robot2 is the same as the Position3, the articles are received from the Robot1, and the articles move to the target Position5 by taking the Position4 as the initial state.
The basic motion of the device may be described by a motion control model.
Definition 1: the motion control model (Motion Control Model) is a 3-tuple mcm= (s, t, f) consisting of:
1) A start state s;
2) A target state t;
3) A transformation rule f represents transformation logic from s to t.
The basic motion of the two devices shown in fig. 4 can be described by the following three motion control models:
MCM 1 =(P 1 ,P 2 ,Move_PointToPoint) (1)
representing movement from the start state Position1 to the target state Position2 by the point-to-point movement rule.
MCM 2 =(P 2 ,P 3 ,Move_PointToPoint) (2)
Meaning of representation reference MCM 1
MCM 3 =(P 4 ,P 5 ,Move_PointToPoint) (3)
Meaning of representation reference MCM 1
The complete device motion behavior is formed by combining a series of industrial devices participating in motion control and motion control models among the industrial devices according to certain logic, and can be described by the following device behavior models.
Definition 2: the device behavior model (Device Behavior Model) is a 4-tuple dbm= (d, M, S, λ) consisting of:
1) Device for corresponding behavior description
2) Aggregate list m= (M) of motion control model described by definition 1 0 ,m 1 ,…,m n )。
3) Aggregate list s= (S) of motion control execution order 0 ,s 1 ,…,s n )。
4) An interlock condition lambda set list lambda= (lambda) 01 ,…,λ n-1 ). An interlock may be described as a binary logic that locks the associated motion control in a particular state. Each lambda is i Description m i To m i+1 The interlocking constraints that need to be additionally met, i.e
Figure BDA0004028989230000091
The complete device behavior shown in fig. 5 can be described by defining the model of 2 as follows:
DBM 1 =(d,(MCM 1 ,MCM 2 ),(1,2),(ε)) (4)
DBM 2 =(d,(MCM 3 ),(1),(λ 1 =Equal(Position3,Position4)) (5)
wherein ε represents no interlock constraint, λ 1 The behavior model represents that the positions of the Robot1 and the Robot2 are the same, and the Robot2 can be allowed to receive the article from the Robot1 and execute the motion control of the Robot2.
Step S1-2: and constructing a mechanical arm digital twin model.
For specifically describing the motion scene details, a programmable configuration simulation platform is used to determine a starting position state and a target position state of the mechanical arm, and corresponding equipment behaviors.
And acquiring characteristic data from a sensor module carried by the mechanical arm by means of a digital twin technology, and generating a digital twin body of the actual mechanical arm on an industrial simulation platform based on a geometric model library integrated by the platform and data generated by transmission analysis.
Step S1-3: simulation platform describing motion scene
According to the mechanical arm motion scene described in fig. 3, virtual simulation operation is performed on the digital twin body based on the platform integrated motion function library. To more accurately reveal the motion details of each Motion Control Model (MCM), the initial states, target states, and conversion rules in the MCM are fully described using simulation functions in conjunction with the basic motion components, and the operational interface diagram is shown in fig. 5. It can be seen that the MCM, in combination with the execution order and the interlocking logic described by the logic component library, can fully describe a Device Behavior Model (DBM).
Step S1-4: modeling representation
The equipment behaviors described based on the industrial simulation platform are represented by AML (AutomationML) in a modeling way, and the definition of the AML standard comprises a basic role class library, a basic interface class library and a basic attribute class library. The simulated motion data is integrated into the AML model in a Collada description by combining device behavior with simulation information through semantic connectivity defined in the AML standard, as shown in fig. 6. The simulated motion data is integrated into the AML model in a Collada description. In the Collada file, description of information such as device behavior gesture of each frame, time interval between frames and the like is contained, and information such as movement speed, acceleration and the like can be identified.
In this embodiment, modeling the device behavior AML is represented as shown in fig. 6.
Specifically, the AML model shown in FIG. 6 is described as follows:
the plant structure concept of Resource-Process-Product is used in AML to describe the above-mentioned equipment behavior model, and the concrete contents are as follows:
1) The device list is described by using Resource role classes in the basic role class library, wherein the device related information such as device driver and the like is stored in the attribute of the device.
In this example, the characteristics of the robot arm are described, including six steering axes, and driving information corresponding to each axis.
2) Describing a motion Process by using Process roles in a basic role class library, wherein the motion Process corresponds to basic motion components in an industrial simulation platform one by one.
In this example, only three motion_pointtoppoint 1, motion_pointtoppoint 2, and motion_pointtoppoint 3 instance motion processes generated by the basic motion component motion_pointtoppoint are involved.
3) The state information is described by the Product role class in the basic role class library, and the value contained in each state information is stored in the attribute of the state.
In this example, five state examples of Position1, position2, … and Position5 and corresponding spatial Position coordinate value information are generated based on the set Position spatial Position state class.
4) The information provided by the state and the input and output information required by the motion process are described by the Port interface class in the basic interface class library.
5) The Order interface class in the basic interface class library is used for describing the motion process execution sequence information of one device.
6) The simulation motion data information described in the external Collada file is integrated by linking the Collada interface class in the basic interface class library.
In this example, each motion process instance corresponds to a Collada file, and describes the simulation kinematic information of the mechanical arm in a single motion process.
7) A class describing logical components is customized, containing several interlocking component instances that are fixed.
8) The interlock logic information is described by an inter lock logic interface class in the base interface class library.
The relevance between elements is described by an interndlink in the AML standard, and the specific contents are as follows:
1) According to the principle of (s, t, f) in MCM, each motion process instance (namely conversion rule) is correspondingly connected with the initial state, the target state and the motion control equipment. In this case, the formulae (1), (2) and (3) described above are corresponded. Taking the formula (1) as an example, position1 is a corresponding initial state, position2 is a corresponding target state, and the Position2 is respectively connected with the corresponding Port interface class under the move_PointToPoint 1.
2) According to the principle of (d, M, S, lambda) in the DBM, each industrial device correspondingly connects the motion control models belonging to the industrial device according to the execution sequence, and if an interlocking condition exists, the industrial device additionally connects an inter-lock interface under the corresponding interlocking component instance. In this example, the formulae (4), (5) described above are corresponded. Taking equation (4) as an example, robot1 preferentially executes MCM 1 Re-executing MCM 2 . Taking formula (5) as an example, robot2 needs to preferentially satisfy the interlock condition λ 1 =Equal(Position3Position 4), i.e. when the Position Positon3 of Robot1 is equal to Position4 of Robot2, MCM is performed again 3 And corresponding motion control.
Step S2: the PLC programming platform imports the equipment behavior model, performs ontology semantic description on the equipment behavior model, and performs knowledge fusion according to the built functional block knowledge base to obtain a knowledge graph. And the PLC programming platform imports the equipment behavior model integrating the motion control model, so that the motion control code is generated.
Step S2-1: building a knowledge base of function blocks
Performing ontology semantic conversion on an existing function block control library of the PLC programming platform to generate a corresponding function block knowledge base based on ontology semantic description, wherein the function block knowledge base comprises basic interlocking logic function blocks including Equal and function blocks based on PLCOpen Motion Control standard, and simultaneously providing input and output attributes of each motion control to form a mapping relation with a motion process in an AML model.
Step S2-2: generating a knowledge graph
The PLC programming platform imports AML model files to carry out ontology semantic conversion on the links among modules expressed by the AML models.
The description of the motion process is related to, and knowledge fusion is carried out on the description and the built functional block knowledge base based on the body description according to the customized mapping relation.
It should be noted that the motion process represented in the knowledge graph and the motion control functional block based on PLCOpen Motion Control standard do not form a one-to-one correspondence, the motion process is a description of a basic motion component on the industrial simulation platform, the motion control functional block based on PLCOpen Motion Control standard is taken as an atomic motion behavior, and the mapping relationship is represented as follows by a complex motion behavior formed by one or more atomic motion behaviors according to a certain logic:
A=τ(B=(b 0 ,b 1 ,…,b n )) (6)
where A represents a motion process node, B represents a list of motion control function blocks B, and τ represents a transformation logic relationship.
In this embodiment, the motion process of the move_PointToPoint in the AML model and the MC_MoveDirectAbsolute description in the motion function block library form a direct mapping relationship, i.e
Figure BDA0004028989230000131
Wherein the method comprises the steps of
Figure BDA0004028989230000132
Representing a direct mapping without redundant logic.
And accessing MC_MoveDirectAblutate as a child node of the move_PointToPoint into the ontology semantic description, and finally generating a knowledge graph structure, as shown in figure 7. Wherein, related to the association of Port interface class, two nodes representing input/output are additionally derived, the output node represents the attribute and value that the motion or state can provide, and the input node represents the attribute required by the motion process.
Step S3: and carrying out reasoning analysis on the knowledge graph according to specific rules and algorithms to generate an FBD code based on the IEC 61131-3 standard, which is consistent with the motion control logic described by the equipment behavior model.
The semantic-replaced knowledge graph is characterized in that the nodes representing the motion process are added with descriptions of the motion control functional blocks based on PLCOpen Motion Control standard, and meanwhile, the semantic-replaced knowledge graph contains specific descriptions of input and output Port nodes. And (3) using a specific analysis algorithm to infer the knowledge graph, and further analyzing and generating the FBD code. The implementation flow is shown in fig. 8, and the specific steps are as follows:
step S3-1: generating engineering frameworks
According to the DBM description, starting from the equipment node, the drive information corresponding to the equipment is preferentially stored in a variable area of an independent POU (program organization unit), which is called as a shared POU and is used by other POUs. And sequentially establishing POU pages according to the execution sequence described by the Order class.
In this example, as shown in fig. 9, according to the knowledge graph description, two mechanical arm devices and three motion processes are involved, two device nodes are correspondingly generated under the engineering framework, and each device node sequentially generates POUs corresponding to the motion processes according to the execution sequence.
Step S3-2: generating functional blocks
Starting from the motion process nodes, the logic of the functional blocks corresponding to each motion process node is identified, the logic is generated in the corresponding POU according to the execution sequence, and the functional blocks are connected by wires (only two functional blocks are allowed to be in the same POU) or variables to transmit information. If the two motion process nodes contain the interlocking logic control, the interlocking logic control is additionally generated.
In this example, as shown in fig. 10, a functional block logic description generated by correspondence of the relationship descriptions between the two motion process nodes of the move_pointtoppoint 2 and move_pointtoppoint 3 in the knowledge graph is shown. It should be noted that the connection lines here represent only the association relationship on the logic level, and cannot completely represent the connection relationship of the functional blocks in the actual programming interface.
Step S3-3: function block assignment
According to MCM description, starting from the motion process node, sequentially searching the corresponding initial state and target state, and respectively acquiring data from the shared POU, the initial state point and the target state point according to the attribute of the input Port node description. If the Port node attribute cannot meet the input requirements of the functional block, if information such as speed and acceleration is needed, a corresponding Collada file is acquired from a motion process, a characteristic point identification algorithm is called to identify the position of each frame of characteristic point, the position is converted into an actual space position, the moving distance of the point between every two frames is calculated, and further the information such as the moving speed and the acceleration of the equipment is calculated and assigned to the pins of the functional block.
In this example, as shown in fig. 11, the pins of the functional blocks are successfully assigned after the step 2, where the functional blocks of different POUs transmit data through variables.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (10)

1. An automatic generation method of industrial equipment motion control codes based on AutomatinML is characterized by comprising the following steps:
step S1, an industrial simulation platform performs simulation motion simulation on a digital twin body of field industrial equipment; after the equipment movement behavior is determined, modeling and representing equipment driving information, initial state information, target state information and complete movement process information to obtain an equipment behavior model;
step S2, the PLC programming platform imports a device behavior model, performs ontology semantic description on the device behavior model, and performs knowledge fusion according to the constructed functional block knowledge base to obtain a knowledge graph;
and S3, carrying out reasoning analysis on the knowledge graph according to specific rules and algorithms, and generating an FBD code based on the IEC 61131-3 standard, which is consistent with the motion control logic described by the equipment behavior model.
2. The automatic generation method of an industrial device motion control code based on AutomatinML according to claim 1, wherein AutomatinML based on IEC 62714-1 standard is used as a model representation tool of device behavior for combining motion description and simulation information, wherein simulation motion data is integrated into the AutomatinML model in a colla file description.
3. The automatic generation method of an industrial equipment motion control code based on AutomatinML according to claim 2, wherein step S1 further comprises:
step S1-1: constructing a motion scene;
the basic motion of the device is described by a motion control model;
definition 1: the motion control model is a 3-tuple mcm= (s, t, f) consisting of:
1) A start state s;
2) A target state t;
3) A transformation rule f representing transformation logic from s to t;
the complete equipment motion behavior is formed by combining a series of industrial equipment participating in motion control and motion control models among the industrial equipment according to a certain logic, wherein the equipment behavior model is described as follows:
definition 2: the device behavior model (Device Behavior Model) is a 4-tuple dbm= (d, M, S, λ) consisting of:
1) A device corresponding to the behavior description;
2) Aggregate list m= (M) of motion control model described by definition 1 0 ,m 1 ,…,m n );
3) Aggregate list s= (S) of motion control execution order 0 ,s 1 ,…,s n );
4) An interlock condition lambda set list lambda= (lambda) 01 ,…,λ n-1 ) An interlock is described as a binary logic that locks the associated motion control in a particular state; each lambda is i Description m i To m i+1 The interlocking constraints that need to be additionally met, i.e
Figure FDA0004028989220000021
Step S1-2: constructing a mechanical arm digital twin model; wherein,,
acquiring characteristic data from a sensor module carried by the mechanical arm by means of a digital twin technology, and generating a digital twin body of an actual mechanical arm on an industrial simulation platform based on a geometric model library integrated by the platform and data generated by transmission analysis;
step S1-3: describing a motion scene by the simulation platform; wherein,,
the interlocking logic described by combining the execution sequence and the logic component library through the motion control model can completely describe a device behavior model;
step S1-4: modeling and representing; wherein,,
modeling and representing equipment behaviors described based on an industrial simulation platform by using AutomatinML, wherein the definition of AML standard comprises a basic role class library, a basic interface class library and a basic attribute class library; the simulated motion data is integrated into the AML model in a Collada description by combining device behavior and simulation information through semantic connection relationships defined in the AML standard.
4. The automatic generation method of an industrial equipment motion control code based on AutomatinML according to claim 3, wherein step S2 further comprises:
step S2-1: constructing a function block knowledge base; wherein,,
performing ontology semantic conversion on an existing function block control library of the PLC programming platform to generate a corresponding function block knowledge base based on ontology semantic description, wherein the function block knowledge base comprises basic interlocking logic function blocks including Equal and function blocks based on PLCOpen Motion Control standard, and simultaneously providing input and output attributes of each motion control to form a mapping relation with a motion process in an AML model;
step S2-2: generating a knowledge graph: wherein,,
the PLC programming platform imports AML model files and performs ontology semantic conversion on the links among modules expressed by the AML models; the description of the motion process is related to, and knowledge fusion is carried out on the description and the built functional block knowledge base based on the ontology description according to a customized mapping relation.
5. The automatic generation method of an industrial equipment motion control code based on AutomatinML according to claim 3, wherein step S3 further comprises:
step S3-1: generating an engineering framework; wherein,,
according to the DBM description, starting from an equipment node, preferentially storing driving information corresponding to the equipment into a variable area of an independent POU, namely a shared POU, and providing the shared POU for other POUs; sequentially establishing POU pages according to the execution sequence described by the Order class;
step S3-2: generating a functional block; wherein,,
starting from the motion process nodes, identifying the logic of the functional blocks corresponding to each motion process node, generating the logic in the corresponding POU according to the execution sequence, and transmitting information between the functional blocks by means of connecting lines or variables; if the two motion process nodes contain the interlocking logic control, the interlocking logic control is additionally generated;
step S3-3: assigning values to the functional blocks; wherein,,
according to MCM description, starting from a motion process node, sequentially searching a corresponding initial state and a corresponding target state, and respectively acquiring data from a shared POU, an initial state point and a target state point according to the attribute of the input Port node description; if the Port node attribute cannot meet the input requirement of the functional block, a corresponding Collada file is acquired from the motion process, a characteristic point identification algorithm is called to identify the position of the characteristic point of each frame, the position is converted into an actual space position, the moving distance of the point between every two frames is calculated, and then information such as the moving speed and the acceleration of the equipment is calculated, and is assigned to the pins of the functional block.
6. The automatic generation method of the industrial equipment motion control code based on AutomatinML according to claim 1, wherein the function block knowledge base is constructed by ontology descriptions corresponding to a function block control library based on a PLC programming platform, and comprises basic interlocking logic function blocks and function blocks based on PLCOpen Motion Control standard.
7. An automatic generation device of industrial equipment motion control codes based on AutomatinML is characterized by at least comprising an industrial simulation platform and a PLC programming platform, wherein,
the industrial simulation platform is used for performing simulation motion and simulation on a digital twin body of the field industrial equipment; after the equipment movement behavior is determined, modeling and representing equipment driving information, initial state information, target state information and complete movement process information to obtain an equipment behavior model;
the PLC programming platform is used for importing an equipment behavior model, carrying out ontology semantic description on the equipment behavior model, and carrying out knowledge fusion according to the constructed functional block knowledge base to obtain a knowledge graph; and carrying out reasoning analysis on the knowledge graph according to specific rules and algorithms to generate an FBD code based on IEC 61131-3 standard, which is consistent with the motion control logic described by the equipment behavior model.
8. The AutomationML-based industrial equipment motion control code automatic generation apparatus of claim 7,
the industrial simulation platform integrates a geometric model library, a motion function library and a logic component library; the geometric model library comprises digital models of various industrial equipment; the motion function library comprises basic motion components, each basic motion component represents a basic motion process, the bottom layer corresponds to motion control logic based on body description, and the bottom layer motion control logic is transparent to a simulation platform user; the logic component library includes basic logic components including the Equal logic to describe the interlocking logic.
9. The AutomationML-based industrial equipment motion control code automatic generation apparatus of claim 7,
the basic motion of the device is described by a motion control model:
definition 1: the motion control model is a 3-tuple mcm= (s, t, f) consisting of:
1) A start state s;
2) A target state t;
3) A transformation rule f representing transformation logic from s to t;
the complete equipment motion behavior is formed by combining a series of industrial equipment participating in motion control and motion control models among the industrial equipment according to a certain logic, wherein the equipment behavior model is described as follows:
definition 2: the device behavior model (Device Behavior Model) is a 4-tuple dbm= (d, M, S, λ) consisting of:
1) A device corresponding to the behavior description;
2) Aggregate list m= (M) of motion control model described by definition 1 0 ,m 1 ,…,m n );
3) Motion controlAggregate list of execution order s= (S) 0 ,s 1 ,…,s n );
4) An interlock condition lambda set list lambda= (lambda) 01 ,…,λ n-1 ) An interlock is described as a binary logic that locks the associated motion control in a particular state; each lambda is i Description m i To m i+1 The interlocking constraints that need to be additionally met, i.e
Figure FDA0004028989220000051
10. The automatic generation device of motion control codes of industrial equipment based on AutomatinML according to claim 7, wherein the PLC programming platform is a programming platform based on IEC 61131-3 standard programming language, provides programming modes of corresponding programming languages respectively, and provides various function block control libraries with rich functions.
CN202211736207.6A 2022-12-30 2022-12-30 AutomationML-based industrial equipment motion control PLC code automatic generation method and device Pending CN116069317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211736207.6A CN116069317A (en) 2022-12-30 2022-12-30 AutomationML-based industrial equipment motion control PLC code automatic generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211736207.6A CN116069317A (en) 2022-12-30 2022-12-30 AutomationML-based industrial equipment motion control PLC code automatic generation method and device

Publications (1)

Publication Number Publication Date
CN116069317A true CN116069317A (en) 2023-05-05

Family

ID=86179587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211736207.6A Pending CN116069317A (en) 2022-12-30 2022-12-30 AutomationML-based industrial equipment motion control PLC code automatic generation method and device

Country Status (1)

Country Link
CN (1) CN116069317A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117621090A (en) * 2024-01-25 2024-03-01 青岛创新奇智科技集团股份有限公司 Industrial robot control method and system and industrial robot

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117621090A (en) * 2024-01-25 2024-03-01 青岛创新奇智科技集团股份有限公司 Industrial robot control method and system and industrial robot
CN117621090B (en) * 2024-01-25 2024-05-14 青岛创新奇智科技集团股份有限公司 Industrial robot control method and system and industrial robot

Similar Documents

Publication Publication Date Title
Leng et al. Digital twins-based remote semi-physical commissioning of flow-type smart manufacturing systems
JP7489727B2 (en) Configuring robots in a multi-robot environment
Munro et al. ECSTASY: A control system CAD environment
Yang et al. Model-driven development of control software for distributed automation: a survey and an approach
CN110271009B (en) Method for realizing manipulator teaching function based on PLC robot-simulated instruction
Park et al. A PLC programming environment based on a virtual plant
CN102955460A (en) Control system of numerical control system master station over input/output (IO) terminal slave station
CN111708530A (en) Industrial robot graphical programming system
CN110480658A (en) A kind of six-joint robot control system merging vision self-calibration
CN116069317A (en) AutomationML-based industrial equipment motion control PLC code automatic generation method and device
Bank et al. Temporal logic (TL)-based autonomy for smart manufacturing systems
Sinnemann et al. Architecture for simulation and optimization of energy consumption of automated production systems
Park et al. PLCStudio: Simulation based PLC code verification
Tran O'Leary et al. Taxon: a Language for Formal Reasoning with Digital Fabrication Machines
CN105930583A (en) Automation system based on equipment multi-field object model and design method therefor
Thapa et al. Auto-generation of IEC standard PLC code using t-MPSG
Hossain et al. Virtual control system development platform with the application of PLC device
CN115356997A (en) Integrated industrial control system and control method thereof, industrial control equipment and medium
Dietz et al. Concept for an interoperable behavior library for virtual commissioning using PLCopenXML
Ye et al. Research on the monitoring of the industrial robot motion based on digital twins
Striffler et al. Concepts and trends of virtual commissioning–A comprehensive review
Kazmi Methodology for validating mechatronic digital twin
Thormann et al. Programming of a lightweight robot using function blocks and sequential function charts
de Oliveira Hansen et al. Agile digital machine development
Bu-Hai et al. Kinematic Analysis and Three-dimensional Teaching of Six-Axis Robot Based on LinuxCNC

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination