CN105511393A - Analysis method and device of PLC ladder diagram - Google Patents

Analysis method and device of PLC ladder diagram Download PDF

Info

Publication number
CN105511393A
CN105511393A CN201610048570.7A CN201610048570A CN105511393A CN 105511393 A CN105511393 A CN 105511393A CN 201610048570 A CN201610048570 A CN 201610048570A CN 105511393 A CN105511393 A CN 105511393A
Authority
CN
China
Prior art keywords
ladder diagram
logical relation
block
matrix
plc ladder
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
CN201610048570.7A
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.)
Shandong Chaoyue Numerical Control Electronics Co Ltd
Original Assignee
Shandong Chaoyue Numerical Control Electronics Co Ltd
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 Shandong Chaoyue Numerical Control Electronics Co Ltd filed Critical Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority to CN201610048570.7A priority Critical patent/CN105511393A/en
Publication of CN105511393A publication Critical patent/CN105511393A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13076Interprete in pc a ladder diagram, use of sequence engine

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention provides an analysis method and device of a PLC ladder diagram. The method comprises the steps that a PLC ladder diagram to be analyzed is obtained; the PLC ladder diagram is traversed, the traversed primitives with logical relationships are combined, traversing and combining are conducted repeatedly till the PLC ladder diagram does not contain the primitives with the logical relationships, and the current PLC ladder diagram serves as a final analysis result. According to the analysis method and device of the PLC ladder diagram, the primitives with the logical relationships in the PLC ladder diagram are combined, the complex PLC ladder diagram composed of the multiple primitives is converted into a simple PLC ladder diagram which only comprises a small number of primitives, and therefore the complexity of the PLC ladder diagram is reduced.

Description

A kind of analytical approach of PLC ladder diagram and device
Technical field
The present invention relates to higher level lanquage technique of compiling field, particularly a kind of analytical approach of PLC ladder diagram and device.
Background technology
PLC (ProgrammableLogicController, programmable logic controller (PLC)) IL (IntermediateLanguage, intermediate language in NET framework) instruction list programming language is a kind of memonic symbol programming language similar with assembly language, equally with assembly language to be made up of operational code and operand, easily to be identified by PLC and perform.
In some prior aries, the conveniently intuitive of user program, reduces the requirement to programmer, and PLC ladder diagram can be adopted to programme, and then PLC ladder diagram is converted into IL instruction list programming language, passes to CPU and resolves and perform.
But because PLC ladder diagram is more complicated, therefore, when PLC ladder diagram is converted into IL instruction list, efficiency is lower.
Summary of the invention
Embodiments provide a kind of analytical approach and device of PLC ladder diagram, to reduce the complexity of PLC ladder diagram.
First aspect, embodiments provides a kind of analytical approach of PLC ladder diagram, comprising:
Obtain PLC ladder diagram to be analyzed;
Travel through described PLC ladder diagram, the pel with logical relation traversed is merged, and repeats this step, until do not comprise the pel with logical relation in described PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
Preferably, the described PLC ladder diagram of described traversal, comprise: scan each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then perform and described the pel with logical relation traversed to be merged, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then perform and described the pel with logical relation traversed to be merged, if do not exist and logical relation, then continue the next pel of scanning.
Preferably, before the described PLC ladder diagram of described traversal, comprise further: according to the annexation in described PLC ladder diagram between each element, for each element carries out assignment; Wherein, the PLC ladder diagram to be analyzed of described acquisition comprises multiple elements with annexation.
Preferably,
Described pel comprises: element and/or matrix-block;
Described the pel with logical relation traversed to be merged, comprising:
Traverse between element, there is logical relation in described PLC ladder diagram time, the element with logical relation is merged into matrix-block, and the value corresponding respectively according to each element being merged into this matrix-block generates the value of this matrix-block;
Traverse in described PLC ladder diagram, there is between element and matrix-block logical relation time, the element and matrix-block with logical relation are merged into new matrix-block, and according to this, there is the value that the element of the logical relation value corresponding respectively with matrix-block generates this new matrix-block;
Traverse in described PLC ladder diagram, there is between matrix-block and matrix-block logical relation time, the matrix-block with logical relation is merged into new matrix-block, and generates the value of this new matrix-block according to this value with the matrix-block of logical relation.
Preferably, comprise further: according to described final analysis result, PLC ladder diagram corresponding for final analysis result is converted to IL instruction list.
Second aspect, embodiments provides a kind of analytical equipment of PLC ladder diagram, comprising:
Acquiring unit, for obtaining PLC ladder diagram to be analyzed, and sends to Traversal Unit by the described PLC ladder diagram obtained;
Described Traversal Unit, for traveling through described PLC ladder diagram, and sends to analytic unit by the logical relation traversed;
Described analytic unit, for the pel with logical relation traversed is merged, and trigger described Traversal Unit continuation execution corresponding operating, until do not comprise the pel with logical relation in described PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
Preferably, described Traversal Unit, specifically for scanning each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then trigger described analytic unit and perform corresponding operating, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then trigger described analytic unit and perform corresponding operating, if do not exist and logical relation, then continue the next pel of scanning.
Preferably, comprise further: assignment unit, for according to the annexation in described PLC ladder diagram between each element, for each element carries out assignment; Wherein, the PLC ladder diagram to be analyzed of described acquisition comprises multiple elements with annexation.
Preferably,
Comprise at described pel: when element and/or matrix-block, described analytic unit, specifically for traverse between element, there is logical relation in described PLC ladder diagram time, the element with logical relation is merged into matrix-block, and the value corresponding respectively according to each element being merged into this matrix-block generates the value of this matrix-block; Traverse in described PLC ladder diagram, there is between element and matrix-block logical relation time, the element and matrix-block with logical relation are merged into new matrix-block, and according to this, there is the value that the element of the logical relation value corresponding respectively with matrix-block generates this new matrix-block; Traverse in described PLC ladder diagram, there is between matrix-block and matrix-block logical relation time, the matrix-block with logical relation is merged into new matrix-block, and generates the value of this new matrix-block according to this value with the matrix-block of logical relation.
Preferably, comprise further: converting unit, for according to described final analysis result, PLC ladder diagram corresponding for final analysis result is converted to IL instruction list.
Embodiments provide a kind of analytical approach and device of PLC ladder diagram, by the pel in PLC ladder diagram with logical relation is merged, make the complicated PLC ladder diagram be made up of multiple pel be converted to the simple PLC ladder diagram only including a small amount of pel, thus reduce the complexity of PLC ladder diagram.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram that one embodiment of the invention provides;
Fig. 2 is the another kind of method flow diagram that one embodiment of the invention provides;
Fig. 3 is the annexation schematic diagram that one embodiment of the invention provides;
Fig. 4 is a kind of PLC ladder diagram that one embodiment of the invention provides;
Fig. 5 is the PLC ladder diagram after the assignment that provides of one embodiment of the invention;
Fig. 6 is the PLC ladder diagram after another assignment of providing of one embodiment of the invention;
Fig. 7 is the another kind of PLC ladder diagram that one embodiment of the invention provides;
Fig. 8 is the PLC ladder diagram of the generator matrix block E15 that one embodiment of the invention provides;
Fig. 9 is the final PLC ladder diagram that one embodiment of the invention provides;
Figure 10 is the hardware structure figure of the analytical equipment place equipment of the PLC ladder diagram that one embodiment of the invention provides;
Figure 11 is a kind of structural representation of the analytical equipment of the PLC ladder diagram that one embodiment of the invention provides;
Figure 12 is the another kind of structural representation of the analytical equipment of the PLC ladder diagram that one embodiment of the invention provides.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly; below in conjunction with the accompanying drawing in the embodiment of the present invention; technical scheme in the embodiment of the present invention is clearly and completely described; obviously; described embodiment is the present invention's part embodiment, instead of whole embodiments, based on the embodiment in the present invention; the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of analytical approach of PLC ladder diagram, the method can comprise the following steps:
Step 101: obtain PLC ladder diagram to be analyzed;
Step 102: travel through described PLC ladder diagram, the pel with logical relation traversed is merged, and repeat this step, until do not comprise the pel with logical relation in described PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
According to the such scheme of the embodiment of the present invention, by the pel in PLC ladder diagram with logical relation is merged, make the complicated PLC ladder diagram be made up of multiple pel be converted to the simple PLC ladder diagram only including a small amount of pel, thus reduce the complexity of PLC ladder diagram.
In an embodiment of the invention, because the logical relation in PLC ladder diagram between each pel can comprise " or logical relation " and/or " with logical relation ", and when merging between by the pel with logical relation, need to merge the pel with logical relation according to the order of operation of reality, to ensure the accuracy of final analysis result, therefore, the described PLC ladder diagram of described traversal, comprise: scan each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then perform and described the pel with logical relation traversed to be merged, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then perform and described the pel with logical relation traversed to be merged, if do not exist and logical relation, then continue the next pel of scanning.
In an embodiment of the invention, in order to reduce the complexity of PLC ladder diagram, each pel in PLC ladder diagram can be merged, but in order to determine element relation original in the PLC ladder diagram after merging, before the described PLC ladder diagram of described traversal, comprise further: according to the annexation in described PLC ladder diagram between each element, for each element carries out assignment; Wherein, the PLC ladder diagram to be analyzed of described acquisition comprises multiple elements with annexation.When needing to determine element relation original in the PLC ladder diagram after merging, the original element annexation of PLC ladder diagram can be restored according to the value of the matrix-block after merging.
In an embodiment of the invention, for the merging between pel, can be the merging between element, also can be the merging between matrix-block, and also can be the merging between element and matrix-block, therefore, described pel comprises: element and/or matrix-block;
Wherein, described the pel with logical relation traversed to be merged, comprising:
Traverse between element, there is logical relation in described PLC ladder diagram time, the element with logical relation is merged into matrix-block, and the value corresponding respectively according to each element being merged into this matrix-block generates the value of this matrix-block;
Traverse in described PLC ladder diagram, there is between element and matrix-block logical relation time, the element and matrix-block with logical relation are merged into new matrix-block, and according to this, there is the value that the element of the logical relation value corresponding respectively with matrix-block generates this new matrix-block;
Traverse in described PLC ladder diagram, there is between matrix-block and matrix-block logical relation time, the matrix-block with logical relation is merged into new matrix-block, and generates the value of this new matrix-block according to this value with the matrix-block of logical relation.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
As shown in Figure 2, embodiments provide a kind of analytical approach of PLC ladder diagram, the method can comprise the following steps:
Step 201: obtain PLC ladder diagram to be analyzed.
In an embodiment of the invention, the mode obtaining PLC ladder diagram to be analyzed can comprise:
1, inputted by external unit.
2, according to matrix form without logical ladder diagram element, set up and have the PLC ladder diagram of logic.
Below for above-mentioned 2nd kind of obtain manner, describe the process of establishing of this PLC ladder diagram to be analyzed in detail.
Wherein, exist with a matrix type without logical ladder diagram element, each ladder diagram network is equivalent to a matrix.Only have upper and lower, four kinds, left and right annexation between each element in matrix, be expressed as TOP, BOTTOM, LEFT, RIGHT.If this yuan have left connection, then LEFT=1, if having right connection, RIGHT=1, if having upper connection, TOP=1, if having lower connection, BOTTOM=1.Connect the connection up and down represented on the right of element up and down, connecting up and down of the left side is usually represented by unit above.
Such as, please refer to the annexation of the E1 of element shown in Fig. 3 and element E2, wherein, for element E1, TOP=0, BOTTOM=1, LEFT=1, RIGHT=1, therefore can know the annexation of element E1.
According to matrix form without logical ladder diagram element, setting up has the process of the PLC ladder diagram of logic to comprise: first scan the first row matrix of elements, according to the node that level connection joint relation determined level two adjacent elements connect, then secondary series is scanned, judge that whether node is defined at previous column according to annexation, if not definition, produce new node, repetitive cycling draws all nodes.
Please refer to Fig. 4, for the PLC ladder diagram to be analyzed obtained, the figure shows simple annexation, logical relation is wherein very simple, and this logical relation comprises: E1 and E5 or logical relation, itself or operation result and E2 and computing, then operation result is carried out or computing with E7 again, again by operation result and E3, E6 or operation result carry out and computing, then operation result and E8 to be carried out or computing, finally operation result are exported by coil.
Step 202: according to the annexation in PLC ladder diagram between each element, for each element carries out assignment.
According to the annexation in Fig. 4 between each element, for each node carries out assignment, the mode of this assignment can include but not limited to following manner: from left side bearing is considered as node, be set to 1, and right side bearing is considered as last node, and known according to Fig. 4 is 5.PLC ladder diagram after assignment please refer to Fig. 5.
Further, the value of each element can be determined according to the value of each node in PLC ladder diagram, please refer to Fig. 6.
Step 203: scan each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then perform step 204, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then perform step 204, if do not exist and logical relation, then continue the next pel of scanning.
Wherein, this pel can comprise: element and/or matrix-block.
Following meaning is existed for matrix-block:
Each element used in PLC ladder diagram or multielement set are considered as a matrix-block, the set of matrix-block still can be considered a matrix-block, as " contact ", " coil ", " connecting line ", " functional block " etc. all can be regarded as is matrix-block in PLC ladder diagram, each matrix-block of PLC ladder diagram may be defined as a data structure block, this data structure stores the information of this block, such as: the coordinate of matrix-block, the node had, logical operation relation between element (or block) set had and element (and or block) and the attribute of block itself.
Please refer to Fig. 7, when scanning PLC ladder diagram, element in PLC ladder diagram and matrix-block all can be scanned as pel, when scanning element E1 (N (12)), element E1 (N (12)) can be traveled through and there is element E5 (N (12)) that is on row or logical relation.
Step 204: will to have or the pel of logical relation carries out or computing, carry out having and computing with the pel of logical relation, and perform step 203, until do not comprise the pel with logical relation in PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
Please refer to Fig. 8, will to have or the element E1 (N (12)) of logical relation and element E5 (N (12)) carries out or computing, generator matrix block E15 (N (12)).
According to current PLC ladder diagram, continue the next pel of scanning, scan element E3 (N (34)) and element E6 (N (34)) has or logical relation, to have or the element E3 (N (34)) of logical relation and element E6 (N (34)) carries out or computing, generator matrix block E36 (N (34)).
According to current PLC ladder diagram, continue the next pel of scanning, find there is not the element with logical relation, so rescan first pel of this PLC ladder diagram the first row, now scan matrix-block E15 (N (12)), this matrix-block E15 (N (12)) can be traveled through and there is the element E2 (N (23)) with logical relation, the matrix-block E15 (N (12)) and element E2 (N (23)) with this and logical relation are generated new matrix-block E (N (13)), in like manner, final PLC ladder diagram can be obtained, please refer to Fig. 9.
Step 205: according to described final analysis result, is converted to IL instruction list by PLC ladder diagram corresponding for final analysis result.
As shown in Figure 10, Figure 11, a kind of analytical equipment of PLC ladder diagram is embodiments provided.Device embodiment can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.Say from hardware view; as shown in Figure 10; a kind of hardware structure diagram of the analytical equipment place equipment of the PLC ladder diagram provided for the embodiment of the present invention; except the processor shown in Figure 10, internal memory, network interface and nonvolatile memory; in embodiment, the equipment at device place can also comprise other hardware usually, as the forwarding chip etc. of responsible process message.For software simulating, as shown in figure 11, as the device on a logical meaning, be by the CPU of its place equipment, computer program instructions corresponding in nonvolatile memory is read operation in internal memory to be formed.The analytical equipment of the PLC ladder diagram that the present embodiment provides, comprising:
Acquiring unit 1101, for obtaining PLC ladder diagram to be analyzed, and sends to Traversal Unit 1102 by the described PLC ladder diagram obtained;
Described Traversal Unit 1102, for traveling through described PLC ladder diagram, and sends to analytic unit by the logical relation traversed;
Described analytic unit 1103, for the pel with logical relation traversed is merged, and trigger described Traversal Unit 1102 continuation execution corresponding operating, until do not comprise the pel with logical relation in described PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
Wherein, described Traversal Unit 1102, specifically for scanning each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then trigger described analytic unit 1103 and perform corresponding operating, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then trigger described analytic unit 1103 and perform corresponding operating, if do not exist and logical relation, then continue the next pel of scanning.
In an embodiment of the invention, please refer to Figure 12, the analytical equipment of this PLC ladder diagram may further include: assignment unit 1201, for according to the annexation in described PLC ladder diagram between each element, for each element carries out assignment; Wherein, the PLC ladder diagram to be analyzed of described acquisition comprises multiple elements with annexation.
Wherein, comprise at described pel: when element and/or matrix-block, described analytic unit 1103, specifically for traverse between element, there is logical relation in described PLC ladder diagram time, the element with logical relation is merged into matrix-block, and the value corresponding respectively according to each element being merged into this matrix-block generates the value of this matrix-block; Traverse in described PLC ladder diagram, there is between element and matrix-block logical relation time, the element and matrix-block with logical relation are merged into new matrix-block, and according to this, there is the value that the element of the logical relation value corresponding respectively with matrix-block generates this new matrix-block; Traverse in described PLC ladder diagram, there is between matrix-block and matrix-block logical relation time, the matrix-block with logical relation is merged into new matrix-block, and generates the value of this new matrix-block according to this value with the matrix-block of logical relation.
In an embodiment of the invention, please refer to Figure 12, the analytical equipment of this PLC ladder diagram may further include: converting unit 1202, for according to described final analysis result, PLC ladder diagram corresponding for final analysis result is converted to IL instruction list.
To sum up, the embodiment of the present invention at least can realize following beneficial effect:
1, in embodiments of the present invention, by the pel in PLC ladder diagram with logical relation is merged, make the complicated PLC ladder diagram be made up of multiple pel be converted to the simple PLC ladder diagram only including a small amount of pel, thus reduce the complexity of PLC ladder diagram.
2, in embodiments of the present invention, because the logical relation in PLC ladder diagram between each pel can comprise " or logical relation " and/or " with logical relation ", and when merging between by the pel with logical relation, need to merge the pel with logical relation according to the order of operation of reality, thus the accuracy of final analysis result can be ensured.
3, in embodiments of the present invention, by according to the annexation in PLC ladder diagram between each element, for each element carries out assignment, make, when needing to determine element relation original in the PLC ladder diagram after merging, the original element annexation of PLC ladder diagram to be restored according to the value of the matrix-block after merging.
The content such as information interaction, implementation between each unit in said apparatus, due to the inventive method embodiment based on same design, particular content can see in the inventive method embodiment describe, repeat no more herein.
It should be noted that, in this article, the relational terms of such as first and second and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other same factor.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in the storage medium of embodied on computer readable, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium in.
Finally it should be noted that: the foregoing is only preferred embodiment of the present invention, only for illustration of technical scheme of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. an analytical approach for PLC ladder diagram, is characterized in that, comprising:
Obtain PLC ladder diagram to be analyzed;
Travel through described PLC ladder diagram, the pel with logical relation traversed is merged, and repeats this step, until do not comprise the pel with logical relation in described PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
2. method according to claim 1, it is characterized in that, the described PLC ladder diagram of described traversal, comprise: scan each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then perform and described the pel with logical relation traversed to be merged, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then perform and described the pel with logical relation traversed to be merged, if do not exist and logical relation, then continue the next pel of scanning.
3. method according to claim 1, is characterized in that, before the described PLC ladder diagram of described traversal, comprises further: according to the annexation in described PLC ladder diagram between each element, for each element carries out assignment; Wherein, the PLC ladder diagram to be analyzed of described acquisition comprises multiple elements with annexation.
4. method according to claim 3, is characterized in that,
Described pel comprises: element and/or matrix-block;
Described the pel with logical relation traversed to be merged, comprising:
Traverse between element, there is logical relation in described PLC ladder diagram time, the element with logical relation is merged into matrix-block, and the value corresponding respectively according to each element being merged into this matrix-block generates the value of this matrix-block;
Traverse in described PLC ladder diagram, there is between element and matrix-block logical relation time, the element and matrix-block with logical relation are merged into new matrix-block, and according to this, there is the value that the element of the logical relation value corresponding respectively with matrix-block generates this new matrix-block;
Traverse in described PLC ladder diagram, there is between matrix-block and matrix-block logical relation time, the matrix-block with logical relation is merged into new matrix-block, and generates the value of this new matrix-block according to this value with the matrix-block of logical relation.
5., according to described method arbitrary in claim 1-4, it is characterized in that, comprise further: according to described final analysis result, PLC ladder diagram corresponding for final analysis result is converted to IL instruction list.
6. an analytical equipment for PLC ladder diagram, is characterized in that, comprising:
Acquiring unit, for obtaining PLC ladder diagram to be analyzed, and sends to Traversal Unit by the described PLC ladder diagram obtained;
Described Traversal Unit, for traveling through described PLC ladder diagram, and sends to analytic unit by the logical relation traversed;
Described analytic unit, for the pel with logical relation traversed is merged, and trigger described Traversal Unit continuation execution corresponding operating, until do not comprise the pel with logical relation in described PLC ladder diagram, using current described PLC ladder diagram as final analysis result.
7. the analytical equipment of PLC ladder diagram according to claim 6, it is characterized in that, described Traversal Unit, specifically for scanning each pel in described PLC ladder diagram one by one, when scanning current pel, travel through current pel whether to exist or logical relation, if exist or logical relation, then trigger described analytic unit and perform corresponding operating, if do not exist or logical relation, then travel through current pel whether to exist and logical relation, if exist and logical relation, then trigger described analytic unit and perform corresponding operating, if do not exist and logical relation, then continue the next pel of scanning.
8. the analytical equipment of PLC ladder diagram according to claim 6, is characterized in that, comprise further: assignment unit, for according to the annexation in described PLC ladder diagram between each element, for each element carries out assignment; Wherein, the PLC ladder diagram to be analyzed of described acquisition comprises multiple elements with annexation.
9. the analytical equipment of PLC ladder diagram according to claim 8, is characterized in that,
Comprise at described pel: when element and/or matrix-block, described analytic unit, specifically for traverse between element, there is logical relation in described PLC ladder diagram time, the element with logical relation is merged into matrix-block, and the value corresponding respectively according to each element being merged into this matrix-block generates the value of this matrix-block; Traverse in described PLC ladder diagram, there is between element and matrix-block logical relation time, the element and matrix-block with logical relation are merged into new matrix-block, and according to this, there is the value that the element of the logical relation value corresponding respectively with matrix-block generates this new matrix-block; Traverse in described PLC ladder diagram, there is between matrix-block and matrix-block logical relation time, the matrix-block with logical relation is merged into new matrix-block, and generates the value of this new matrix-block according to this value with the matrix-block of logical relation.
10., according to the analytical equipment of described PLC ladder diagram arbitrary in claim 6-9, it is characterized in that, comprise further: converting unit, for according to described final analysis result, PLC ladder diagram corresponding for final analysis result is converted to IL instruction list.
CN201610048570.7A 2016-01-25 2016-01-25 Analysis method and device of PLC ladder diagram Pending CN105511393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610048570.7A CN105511393A (en) 2016-01-25 2016-01-25 Analysis method and device of PLC ladder diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610048570.7A CN105511393A (en) 2016-01-25 2016-01-25 Analysis method and device of PLC ladder diagram

Publications (1)

Publication Number Publication Date
CN105511393A true CN105511393A (en) 2016-04-20

Family

ID=55719461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610048570.7A Pending CN105511393A (en) 2016-01-25 2016-01-25 Analysis method and device of PLC ladder diagram

Country Status (1)

Country Link
CN (1) CN105511393A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108375952A (en) * 2018-03-08 2018-08-07 山东超越数控电子股份有限公司 A kind of PLC continuous functions schema compiler and explain method and apparatus
CN112379635A (en) * 2020-11-19 2021-02-19 航天新长征大道科技有限公司 PLC ladder diagram analysis method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588256A (en) * 2004-09-23 2005-03-02 艾默生网络能源有限公司 Method and system for changing ladder diagram program into instruction listing program
CN101364098A (en) * 2008-09-12 2009-02-11 南京航空航天大学 Method and system for conversing trapezoidal pattern to be instruction catalogue program, and interpretation execution method and system
CN102354144A (en) * 2011-09-06 2012-02-15 北京联合大学 Method for converting ladder diagram into PLC (Programmable Logic Controller) program command
JP2014052673A (en) * 2012-09-04 2014-03-20 Keyence Corp Programmable controller, programming support device, and program
CN104820393A (en) * 2015-03-17 2015-08-05 浪潮集团有限公司 Ladder diagram matrix compiling and interpreting method based on PLC

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588256A (en) * 2004-09-23 2005-03-02 艾默生网络能源有限公司 Method and system for changing ladder diagram program into instruction listing program
CN101364098A (en) * 2008-09-12 2009-02-11 南京航空航天大学 Method and system for conversing trapezoidal pattern to be instruction catalogue program, and interpretation execution method and system
CN102354144A (en) * 2011-09-06 2012-02-15 北京联合大学 Method for converting ladder diagram into PLC (Programmable Logic Controller) program command
JP2014052673A (en) * 2012-09-04 2014-03-20 Keyence Corp Programmable controller, programming support device, and program
CN104820393A (en) * 2015-03-17 2015-08-05 浪潮集团有限公司 Ladder diagram matrix compiling and interpreting method based on PLC

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108375952A (en) * 2018-03-08 2018-08-07 山东超越数控电子股份有限公司 A kind of PLC continuous functions schema compiler and explain method and apparatus
CN112379635A (en) * 2020-11-19 2021-02-19 航天新长征大道科技有限公司 PLC ladder diagram analysis method and device, electronic equipment and readable storage medium
CN112379635B (en) * 2020-11-19 2022-03-04 航天新长征大道科技有限公司 PLC ladder diagram analysis method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US20070005582A1 (en) Building of database queries from graphical operations
CN107679276B (en) Generation method and device of power system tide wiring diagram and electronic equipment
CN110532019B (en) Method for tracing history of software code segment
CN106874947B (en) Method and apparatus for determining text shape recency
CN112199086A (en) Automatic programming control system, method, device, electronic device and storage medium
CN105512265A (en) Method and device for displaying data through figure
US10818082B2 (en) Method and system for parametrically creating an optimal three dimensional building structure
CN109829092B (en) Method for directionally monitoring webpage
Mani et al. Test case generation for embedded system software using UML interaction diagram
Bolelli et al. Connected components labeling on DRAGs
JP7031627B2 (en) Analytical equipment, analysis method, and analysis program
CN112214210A (en) Logistics business rule engine and configuration method, device, equipment and storage medium thereof
CN105809389A (en) Method and apparatus for generating BOM trees
KR20150092880A (en) Method and Apparatus for Re-Configuring Design Decisions after Developing Graphic User Interface
US10467575B2 (en) Numerical graphical flow diagram conversion and comparison
CN113239818A (en) Cross-modal information extraction method of tabular image based on segmentation and graph convolution neural network
CN113806429A (en) Canvas type log analysis method based on large data stream processing framework
CN105511393A (en) Analysis method and device of PLC ladder diagram
US8572551B2 (en) Difference log production for model merging
CN104656543A (en) PLC gradient diagram matrix editing display method
CN114741754A (en) Room area identification method and system based on building drawing
EP2348403B1 (en) Method and system for analyzing a legacy system based on trails through the legacy system
CN111724406B (en) Regional communication merging method, device, equipment and medium
CN104239606A (en) UML (Unified Modeling Language) modeling method and device capable of supporting screen touch under web environment
Jain et al. TSR-DSAW: table structure recognition via deep spatial association of words

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160420