CN104238444A - Generator set controller based PLC (programmable logic controller) ladder diagram generation method - Google Patents

Generator set controller based PLC (programmable logic controller) ladder diagram generation method Download PDF

Info

Publication number
CN104238444A
CN104238444A CN201410517781.1A CN201410517781A CN104238444A CN 104238444 A CN104238444 A CN 104238444A CN 201410517781 A CN201410517781 A CN 201410517781A CN 104238444 A CN104238444 A CN 104238444A
Authority
CN
China
Prior art keywords
node
logic
father
coordinate
sys
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.)
Granted
Application number
CN201410517781.1A
Other languages
Chinese (zh)
Other versions
CN104238444B (en
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.)
Zhengzhou Smartgen Technology Co Ltd
Original Assignee
Zhengzhou Smartgen Technology 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 Zhengzhou Smartgen Technology Co Ltd filed Critical Zhengzhou Smartgen Technology Co Ltd
Priority to CN201410517781.1A priority Critical patent/CN104238444B/en
Publication of CN104238444A publication Critical patent/CN104238444A/en
Application granted granted Critical
Publication of CN104238444B publication Critical patent/CN104238444B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

The invention provides a generator set controller based PLC (programmable logic controller) ladder diagram generation method. The method includes three steps of defining types of intermediate tree nodes, structuring an intermediate tree, and traversing the intermediate tree to generate a ladder diagram. The relation among logic nodes is found by the method of structuring the intermediate tree, and then the intermediate tree is traversed to draw the ladder diagram; the method has the advantage of flexibility and simplicity in operation.

Description

A kind of trapezoidal map generalization method of PLC based on generator set controller
Technical field
The present invention relates to a kind of trapezoidal map generalization method, specifically, relate to a kind of trapezoidal map generalization method of PLC based on generator set controller.
Background technology
PLC programmed method generally uses trapezoid figure language (LD), repertoire la nguage (IL), functional module language (FBD), order functional sequence graph-based language (SFC) and structured text language (ST) five kinds, wherein simple, directly perceived with trapezoid figure language (LD).But, there is shortcoming that is dumb, that easily make mistakes when ladder diagram editor in existing ladder Diagram Edit Software.
In order to solve above Problems existing, people are seeking a kind of desirable technical solution always.
Summary of the invention
The object of the invention is for the deficiencies in the prior art, thus a kind of flexible operation, simple is provided, the trapezoidal map generalization of the PLC based on the generator set controller method of logic node can be dragged arbitrarily with mouse.
To achieve these goals, the technical solution adopted in the present invention is: a kind of trapezoidal map generalization method of PLC based on generator set controller, is characterized in that: it comprises the following steps:
Step 1: the type of definition intermediary tree node, described intermediary tree node comprises leaf node X, series connection node S and sys node P, described leaf node X is logic node switching value in ladder diagram, and described series connection node S and sys node P is the father node of ladder diagram logic node; Definition logical node type, wherein, logic node represents the particular content of each node on ladder diagram;
Step 2: build intermediary tree, realized by following steps:
Step 2.1: drag a logic node on interface, if interface only has a logic node, the logic node X1 of the newly-built node that is that it doesn't matter, increases new logic node X(2);
If a is increased to described logic node X(1) before or below, the pass of two logic nodes is series connection, a newly-built series connection node S(1 again), described series connection node S(1) as the father node of two logic nodes, two logic nodes are increased in its sequence table in order;
If b is increased to described logic node X(1) below, the pass of two logic nodes is in parallel, a more newly-built sys node P(1), described sys node P(1) be the father node of two logic nodes;
Step 2.2: when at described logic node X(1) or described logic node X(2) a upper logic node X(3 in parallel) time, newly-built this logic node X(3) to described logic node X(1) or described logic node X(2) below, delete described logic node X(1) or described logic node X(2), a newly-built sys node P(2 again), described sys node P(2) father node point to described logic node X(1) or described logic node X(2) father node, described sys node P(2) replace described logic node X(1) or described logic node X(2) position, described logic node X(1) or described logic node X(2) together with described logic node X(3) be described sys node P(2) child node,
Step 2.3: repeat 2.1,2.2 steps, set up intermediary tree;
Step 3: generate ladder diagram
From the root node of above-mentioned intermediary tree, travel through whole tree, during traversal, record the coordinate position of each node, and the number of child node that each node comprises, if logic node is first child node of its father node, then inherit the position of its father node; Other child node, if be parallel relationship with father node, then X-coordinate inherits its father node, and Y-coordinate is that the coordinate of a node on it adds 1, if be series relationship with father node, then Y-coordinate inherits its father node, and X-coordinate is that the coordinate of a node on it adds 1; In like manner calculate the position coordinates of other nodes, according to Coordinate generation ladder diagram.
Hinge structure of the present invention has outstanding substantive distinguishing features and marked improvement, and specifically, the present invention is by building the method for intermediary tree, find the contact between each logic node, then by traversal intermediary tree, draw ladder diagram, there is flexible operation, simple advantage.
Accompanying drawing explanation
Fig. 1 is the intermediary tree structural drawing of a situation in step 2.1 of the present invention.
Fig. 2 is the intermediary tree structural drawing of b situation in step 2.1 of the present invention.
Fig. 3 is the intermediary tree structural drawing in step 2.2 of the present invention.
Fig. 4 is the intermediary tree structural drawing in step 2.3 of the present invention.
Embodiment
Below by embodiment, technical scheme of the present invention is described in further detail.
As shown in Figure 1,1, a kind of trapezoidal map generalization method of PLC based on generator set controller, it comprises the following steps:
Step 1: the type of definition intermediary tree node, described intermediary tree node comprises leaf node X, series connection node S and sys node P, described leaf node X is logic node switching value in ladder diagram, and described series connection node S and sys node P is the father node of logic node in ladder diagram; Definition logical node type, wherein, logic node represents the particular content of each node on ladder diagram;
Step 2: build intermediary tree, realized by following steps:
Step 2.1: drag a logic node on interface, if interface only has a logic node, the logic node X1 of the newly-built node that is that it doesn't matter, then increase new logic node X2;
If a is increased to before described logic node X1 or below, the pass of two logic nodes is series connection, a newly-built series connection node S1 again, described series connection node S1 is as the father node of two logic nodes, be increased in its sequence table in order by two logic nodes, now intermediary tree structure as shown in Figure 1;
If b is increased to the below of described logic node X1, the pass of two logic nodes is in parallel, more newly-built a sys node P1, described sys node P1 are the father node of two logic nodes, and now intermediary tree structure as shown in Figure 2;
Step 2.2: when on described logic node X2 during a logic node X3 in parallel, the below of newly-built this logic node X3 to described logic node X2, delete described logic node X2, a newly-built sys node P2 again, the father node of described sys node P2 points to the father node of described logic node X2, i.e. series connection node S1, described sys node P2 replaces the position of described logic node X2, described logic node X2 is the child node of described sys node P2 together with described logic node X3, and this time tree construction as shown in Figure 3;
Step 2.3: repeat 2.1,2.2 steps, set up intermediary tree, now intermediary tree structure as shown in Figure 4;
Step 3: generate ladder diagram
From the root node of above-mentioned intermediary tree, travel through whole tree, during traversal, record the coordinate position of each node, and the number of child node that each node comprises; Position coordinates as root node S1 is (0,0), if logic node is first child node of its father node, then inherits the position of its father node; , so P3 node inherits the position (0,0) of S1 node, X1 inherits the position (0,0) of P3; Other child node, as X2, X3, X4, X5, X6, if be parallel relationship with father node, then X-coordinate inherits its father node, Y-coordinate is that the coordinate of a node on it adds 1, if be series relationship with father node, then Y-coordinate inherits its father node, X-coordinate is that the coordinate of a node on it adds 1, that is, the coordinate position of X2 is (0,1), the coordinate position of X3 is (1,0), the coordinate position of X4 is (2,0), the coordinate position of X5 is (2,1), the coordinate position of X6 is (2,2), ladder diagram can be generated according to the coordinate position of record.
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; Although with reference to preferred embodiment to invention has been detailed description, those of ordinary skill in the field are to be understood that: still can modify to the specific embodiment of the present invention or carry out equivalent replacement to portion of techniques feature; And not departing from the spirit of technical solution of the present invention, it all should be encompassed in the middle of the technical scheme scope of request of the present invention protection.

Claims (1)

1., based on the trapezoidal map generalization method of PLC of generator set controller, it is characterized in that: it comprises the following steps:
Step 1: the type of definition intermediary tree node, described intermediary tree node comprises leaf node X, series connection node S and sys node P, described leaf node X is logic node switching value in ladder diagram, and described series connection node S and sys node P is the father node of ladder diagram logic node; Definition logical node type, wherein, logic node represents the particular content of each node on ladder diagram;
Step 2: build intermediary tree, realized by following steps:
Step 2.1: drag a logic node on interface, if interface only has a logic node, the logic node X1 of the newly-built node that is that it doesn't matter, continues to increase new logic node X(2);
If a is increased to described logic node X(1) before or below, the pass of two logic nodes is series connection, a newly-built series connection node S(1 again), described series connection node S(1) as the father node of two logic nodes, two logic nodes are increased in its sequence table in order;
If b is increased to described logic node X(1) below, the pass of two logic nodes is in parallel, a more newly-built sys node P(1), described sys node P(1) be the father node of two logic nodes;
Step 2.2: when at described logic node X(1) or described logic node X(2) a upper logic node X(3 in parallel) time, newly-built this logic node X(3) to described logic node X(1) or described logic node X(2) below, delete described logic node X(1) or described logic node X(2), a newly-built sys node P(2 again), described sys node P(2) father node point to described logic node X(1) or described logic node X(2) father node, described sys node P(2) replace described logic node X(1) or described logic node X(2) position, described logic node X(1) or described logic node X(2) together with described logic node X(3) be described sys node P(2) child node,
Step 2.3: repeat 2.1,2.2 steps, set up intermediary tree;
Step 3: generate ladder diagram
From the root node of above-mentioned intermediary tree, travel through whole tree, during traversal, record the coordinate position of each node, and the number of child node that each node comprises, if logic node is first child node of its father node, then inherit the position of its father node; Other child node, if be parallel relationship with father node, then X-coordinate inherits its father node, and Y-coordinate is that the coordinate of a node on it adds 1, if be series relationship with father node, then Y-coordinate inherits its father node, and X-coordinate is that the coordinate of a node on it adds 1; In like manner calculate the position coordinates of other nodes, according to Coordinate generation ladder diagram.
CN201410517781.1A 2014-09-30 2014-09-30 Generator set controller based PLC (programmable logic controller) ladder diagram generation method Active CN104238444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410517781.1A CN104238444B (en) 2014-09-30 2014-09-30 Generator set controller based PLC (programmable logic controller) ladder diagram generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410517781.1A CN104238444B (en) 2014-09-30 2014-09-30 Generator set controller based PLC (programmable logic controller) ladder diagram generation method

Publications (2)

Publication Number Publication Date
CN104238444A true CN104238444A (en) 2014-12-24
CN104238444B CN104238444B (en) 2017-01-11

Family

ID=52226760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410517781.1A Active CN104238444B (en) 2014-09-30 2014-09-30 Generator set controller based PLC (programmable logic controller) ladder diagram generation method

Country Status (1)

Country Link
CN (1) CN104238444B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515084A (en) * 2021-07-26 2021-10-19 山东省计算中心(国家超级计算济南中心) Graphical programming interaction system and interaction method of compiled PLC

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
CN101369234A (en) * 2008-06-24 2009-02-18 杭州电子科技大学 Method for compiling ladder diagram language into instruction list language according to IEC61131-3 standard
WO2011013884A1 (en) * 2009-07-30 2011-02-03 경상대학교산학협력단 Plc ladder logic layout and ladder code generation method
CN103559727A (en) * 2013-11-20 2014-02-05 北京四方继保自动化股份有限公司 Ladder diagram data structural description and scanning analytic method

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
CN101369234A (en) * 2008-06-24 2009-02-18 杭州电子科技大学 Method for compiling ladder diagram language into instruction list language according to IEC61131-3 standard
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
WO2011013884A1 (en) * 2009-07-30 2011-02-03 경상대학교산학협력단 Plc ladder logic layout and ladder code generation method
CN103559727A (en) * 2013-11-20 2014-02-05 北京四方继保自动化股份有限公司 Ladder diagram data structural description and scanning analytic method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何敏佳 等: ""梯形图与指令表互译算法的设计与实现"", 《计算机技术与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515084A (en) * 2021-07-26 2021-10-19 山东省计算中心(国家超级计算济南中心) Graphical programming interaction system and interaction method of compiled PLC
CN113515084B (en) * 2021-07-26 2022-10-18 山东省计算中心(国家超级计算济南中心) Graphical programming interaction system and interaction method of compiling PLC

Also Published As

Publication number Publication date
CN104238444B (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN103259718B (en) A kind of stream table conversion method and device
CN103617576B (en) General fault detecting and maintenance method for equipment
WO2020037906A1 (en) Method for editing script of hmi configuration software
CN109190326B (en) Method and device for generating process flow chart
WO2014140908A3 (en) Systems and methods for handling user editing history
CN103309988A (en) Method for automatically generating rail traffic line database
CN105159783A (en) System task distribution method
CN104657140A (en) Code generating method and device
CN105354023A (en) Visual logic editing runtime engine
CN103793349A (en) Data processing method and data processing device
CN106557794A (en) Based on the machine room of Internet of Things perception, cabinet space management method
CN103617318A (en) Method for modeling distribution automation power grid
CN104572682A (en) Method for area indexing of integrated circuit layout data
CN104238444A (en) Generator set controller based PLC (programmable logic controller) ladder diagram generation method
CN103678138A (en) Method and device for generating state conversion test samples
CN104239606B (en) The UML modeling methods and device of touch screen are supported under Web environment
CN104978170A (en) Multi-agent system generating method based on graphical expression
CN104462705A (en) Fixture assembly sequence planning method based on particle swarm optimization algorithm
CN110544284A (en) method for automatically planning optimal layout flow chart
CN104331314B (en) A kind of method that PLC ladder diagrams based on generator set controller turn instruction catalogue
CN106779046A (en) A kind of multiple agent high-order conviction cognition planner implementation method
CN104731051A (en) Method for achieving sensor point position objectification
CN104503360A (en) System and method capable of realizing digital control on scene part operation
CN102103759A (en) Polygon rapid-combination method for topological structure-free vector graphics
CN105786456A (en) Method and device for realizing functions of VxWorks task hook function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Feng Bin

Inventor after: Wen Yumin

Inventor after: Wang Xiangqian

Inventor after: Wang Lei

Inventor after: Gao Changsheng

Inventor after: Zhang Shuangyang

Inventor before: Feng Bin

Inventor before: Wang Xiangqian

Inventor before: Wang Lei

Inventor before: Gao Changsheng

Inventor before: Zhang Shuangyang

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant