CN104454344B - A kind of efficient conditional code latch reset design method - Google Patents

A kind of efficient conditional code latch reset design method Download PDF

Info

Publication number
CN104454344B
CN104454344B CN201410565942.4A CN201410565942A CN104454344B CN 104454344 B CN104454344 B CN 104454344B CN 201410565942 A CN201410565942 A CN 201410565942A CN 104454344 B CN104454344 B CN 104454344B
Authority
CN
China
Prior art keywords
conditional code
reset
statu
state
code
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.)
Active
Application number
CN201410565942.4A
Other languages
Chinese (zh)
Other versions
CN104454344A (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.)
Dongfang Electric Automatic Control Engineering Co., Ltd.
Original Assignee
SICHUAN ORIENT ELECTRIC AUTOMATIC CONTROL ENGINEERING 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 SICHUAN ORIENT ELECTRIC AUTOMATIC CONTROL ENGINEERING Co Ltd filed Critical SICHUAN ORIENT ELECTRIC AUTOMATIC CONTROL ENGINEERING Co Ltd
Priority to CN201410565942.4A priority Critical patent/CN104454344B/en
Publication of CN104454344A publication Critical patent/CN104454344A/en
Application granted granted Critical
Publication of CN104454344B publication Critical patent/CN104454344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E10/00Energy generation through renewable energy sources
    • Y02E10/70Wind energy
    • Y02E10/72Wind turbines with rotation axis in wind direction

Landscapes

  • Structures Of Non-Positive Displacement Pumps (AREA)
  • Control Of Positive-Displacement Air Blowers (AREA)

Abstract

The invention discloses a kind of efficient conditional code latch reset design method, it is characterised in that:Conditional code Array for structural body is initially set up, is handled according to a series of actions such as locking of this Array for structural body to conditional code, reset, shieldings by a kind of simple mode so that the subprogram possesses the features such as readable strong, succinct, efficient:1. which can be succinct, the purpose that the conditional code of blower fan is latched, resetted and shielded is rapidly reached, only can complete all actions by a logical relation judges code without substantial amounts of logical statement, increases the readability of program;2. the design is by the trigger condition of conditional code, the action such as the latch of reset condition and conditional code, reset, shielding is peeled off;So designer with more convenient by adding, deleting, changing conditional code, the problem of without worrying program error caused by complicated logic, can increase the maintainability of program.

Description

A kind of efficient conditional code latch reset design method
Technical field
The present invention relates to the conditional code used in blower fan control system, and in particular to a kind of efficient conditional code latch reset Design method.
Background technology
With the universalness of wind-powered electricity generation and the increase of installed capacity, power network and wind power plant owner propose to air-blower control part More, higher functional requirement, this air-blower control logic for allowing for script need to modify every now and then, and this is just to designer Member proposes higher requirement, it is necessary in the case where ensureing safety and existing function to complete adding for New function in the short period Add and system test.
The latch of conditional code is occurred after conditional code triggering, and trigger condition does not terminate or trigger condition is over, but A kind of protection act carried out during reset condition is not met also.In the controls, the latch of conditional code is extremely important, and it is straight The stability and security for affecting control system are connect, determines execution action and the man-machine safety of control system.
At present, the various control system including air-blower control is all employed by state machine to realize control output Mode, which possess clear logic for control system, and program realizes more conveniently advantage.But which is scarce Point is also more obvious, that is, the triggering of state machine is largely dependent on the particular state residing for conditional code.Especially increasing Add, delete, when changing conditional code, it is necessary to it is double cautious, cause system to be in a mistake to avoid conditional code modification mistake State machine, so as to cause the damage to control system by mistake.
The content of the invention
The present invention, can be with order to solve the above technical problems, provide a kind of efficient conditional code latch reset design method The actions such as locking, reset, shielding to the trigger condition of conditional code, reset condition, shielding condition and conditional code are separated, What addition so as to largely conditions of support code and modification did not influenceed conditional code performs action;Latch for conditional code, The action such as reset and shielding only needs a logical operation formula that repertoire can be achieved, and reduces the amount of writing of code, carries The high readability and reliability of program.
Technical scheme is as follows:
A kind of efficient conditional code latch reset design method, it is characterised in that:Conditional code Array for structural body is initially set up, Be set to Statu [i], wherein i is specific required state number of codes, the attribute of each conditional code structure set comprise at least with Under several sign:
State triggering sign:Tripping;
State latch indicates:Tripped;
State reset indicates:Reset;
State mask marker:Fobbid;
Four signs are BOOL amounts(Boolean type variable).
According to the conditional code Array for structural body of above-mentioned foundation, then it can realize and touching for conditional code is write in individual document Hair, reset condition and mask switch:
Trigger the page:Statu[i].Tripping = A&B;(A, B are respectively writing a Chinese character in simplified form for condition);
Reset the page:Statu[i].Reset =C|D;(C, D are respectively writing a Chinese character in simplified form for reset condition);
Shield the page:Statu[i].Fobbid = 0;(1- represents to shield the state;0- represents not shield);
After writing conditional code, it is also necessary to latched the state of conditional code by equation below:
Statu[i].Tripped=(Statu[i].Tripping|(Statu[i].Tripped&(!Statu[i] .Reset)))&(! Statu[i].Fobbid);
Above-mentioned steps completely embody a series of processes of latch, reset and the shielding of conditional code, dexterously by conditional code Each state combine with logical operator, both saved size of code, and simple readability, embodied very strong logicality.
By above-mentioned steps, triggering, latch, reset and shielding a series of actions for completing conditional code are write.It is corresponding For whole control system, remaining work just only needs control action corresponding to establishment.
In addition, when establishing conditional code Array for structural body, the sign that the attribute of each conditional code structure is set can also root Need to increase other signs, such as conditional code triggered time, checkout time etc. according to system.
Beneficial effects of the present invention are as follows:
The present invention is that occur during the conditional code used in blower fan control system is modified, adds and deleted Complexity, the one kind being extract in the thinking and practice of the code revision work of redundancy is succinct, efficient conditional code processing mode, And the fields such as air-blower control and pitch control have been successfully applied to it.Intrinsically, every control for being related to state machine Field, which is applicable, possesses very strong adaptability and scalability, can increase the readable and maintainable of program, Ensure the stability and correctness of control logic;The present invention can by the trigger condition of conditional code, reset condition, shielding condition with The actions such as the locking of conditional code, reset, shielding are separated, the not shadow of the addition and modification so as to largely conditions of support code That rings conditional code performs action;The actions such as latch, reset and shielding for conditional code only need a logical operation formula i.e. Repertoire can be achieved, reduce the amount of writing of code, improve the readability and reliability of program.
Brief description of the drawings
Fig. 1 is the logic diagram of state of the present invention locking.
Embodiment
A kind of efficient conditional code latch reset design method, is to initially set up conditional code Array for structural body, is specifically defined It is as follows:
STRUCT
SC_Tripping : BOOL;(* state triggering *)
SC_Tripped : BOOL;(* state latch *)
SC_Fobbid : BOOL;(* state shielding *)
SC_Reset : BOOL;(* conditional code resets *)
END_STRUCT
Instantiate conditional code Array for structural body, array length 100:
G _SC : ARRAY[1..100] OF Statu;
According to the conditional code Array for structural body of above-mentioned foundation, the latch of 100 conditional codes:
FOR i:=1 TO 100 DO
G _SC[i].SC_Tripped := (G _SC[i].SC_Tripping OR(G _SC[i].SC_Tripped AND NOT G _SC[i].SC_Reset )) AND (NOT G _SC[i].SC_Fobbid);
END_FOR
In above-mentioned steps, the logic diagram of state locking is as shown in Figure 1.

Claims (2)

  1. A kind of 1. efficient conditional code latch reset design method, it is characterised in that:Conditional code Array for structural body is initially set up, if For Statu [i], wherein i is specific required state number of codes, and the attribute of each conditional code structure is set including at least following Several signs:
    State triggering sign:Tripping;
    State latch indicates:Tripped;
    State reset indicates:Reset;
    State mask marker:Fobbid;
    Four signs are Boolean type variable;
    According to the conditional code Array for structural body of above-mentioned foundation, then it can realize and triggering, being multiple for conditional code is write in individual document Position condition and mask switch:
    Trigger the page:Statu[i].Tripping = A&B;Wherein, A, B are respectively writing a Chinese character in simplified form for condition;
    Reset the page:Statu[i].Reset =C|D;Wherein, C, D are respectively writing a Chinese character in simplified form for reset condition;
    Shield the page:Statu[i].Fobbid = 0;Wherein, 1- represents to shield the state;0- represents not shield;
    After writing conditional code, also need to be latched the state of conditional code by equation below:
    Statu[i].Tripped=(Statu[i].Tripping|(Statu[i].Tripped&(!Statu[i] .Reset)))&(! Statu[i].Fobbid)。
  2. A kind of 2. efficient conditional code latch reset design method according to claim 1, it is characterised in that:Establishing shape During state code Array for structural body, the sign that the attribute of each conditional code structure is set needs to be provided with other signs according to system, Including conditional code triggered time sign, checkout time sign.
CN201410565942.4A 2014-10-22 2014-10-22 A kind of efficient conditional code latch reset design method Active CN104454344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410565942.4A CN104454344B (en) 2014-10-22 2014-10-22 A kind of efficient conditional code latch reset design method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410565942.4A CN104454344B (en) 2014-10-22 2014-10-22 A kind of efficient conditional code latch reset design method

Publications (2)

Publication Number Publication Date
CN104454344A CN104454344A (en) 2015-03-25
CN104454344B true CN104454344B (en) 2017-12-29

Family

ID=52900961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410565942.4A Active CN104454344B (en) 2014-10-22 2014-10-22 A kind of efficient conditional code latch reset design method

Country Status (1)

Country Link
CN (1) CN104454344B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604265A (en) * 2008-06-13 2009-12-16 艾默生网络能源系统北美公司 A kind of reset locking shielding circuit of watchdog circuit
CN102214124A (en) * 2011-06-08 2011-10-12 深圳市理邦精密仪器股份有限公司 Watchdog reset control system
CN102748215A (en) * 2012-07-12 2012-10-24 国电南京自动化股份有限公司 Safety chain system of wind generating set and fault rapid identification method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10030991A1 (en) * 2000-06-30 2002-01-10 Bosch Gmbh Robert Microcontroller and watchdog operation synchronization method for vehicle control device, involves operating watchdog based on time period elapsed after booting up to resetting operation of microcontroller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604265A (en) * 2008-06-13 2009-12-16 艾默生网络能源系统北美公司 A kind of reset locking shielding circuit of watchdog circuit
CN102214124A (en) * 2011-06-08 2011-10-12 深圳市理邦精密仪器股份有限公司 Watchdog reset control system
CN102748215A (en) * 2012-07-12 2012-10-24 国电南京自动化股份有限公司 Safety chain system of wind generating set and fault rapid identification method thereof

Also Published As

Publication number Publication date
CN104454344A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN101446938B (en) Method for generating table and processing device thereof
Arshi et al. A multi-objective shuffled frog leaping algorithm for in-core fuel management optimization
CN106126927B (en) A kind of parallel scan method calculated for reactor shielding
CN104454344B (en) A kind of efficient conditional code latch reset design method
Maviglia et al. Optimization of DEMO geometry and disruption location prediction
CN110022492A (en) Intelligent television terminal focus adaptation method and device
Christensen Three-dimensional static and dynamic reactor calculations by the nodal expansion method
CN103246503A (en) Application development framework for enterprise management software
CN113434960A (en) Method for creating and modifying parts in batch
EP3163491B1 (en) Computerized mechanism for vulnerability evaluation in layout having interceptors
Pataki et al. Development and verification of new nodal methods in the KIKO3DMG code
Ru et al. Comments on" A Modified Reachability Tree Approach to Analysis of Unbounded Petri Nets
Chaudhuri et al. Comparison of high order perturbative convergence of multireference perturbation methods: Application to singlet states of CH2
CN104598226A (en) Chart interaction design method based on Flex
Yang et al. Development of NPP digital I&C system closed-loop online test system based on signal transmission array
Fen et al. A transformation algorithm of ladder diagram into instruction list based on AOV digraph and binary tree
CN104538935A (en) Frequency converter fault redundancy protecting method
Su et al. ATP-based automated fault simulation
CN106201732B (en) The line of removal data contention distributes parallel method in particle simulation algorithm is parallel
Lin et al. Stabilizing effect of enhanced resistivity on peeling-ballooning instabilities on EAST
Wanzeller et al. Percolation of Monte Carlo Clusters
Vit Iterative solution of the Riccati equation
Kim et al. Reliability Analysis of Core Protection Calculator System by Combining Petri Net and Fault Tree
Shimakawa et al. Discussion of LTL Subsets for Efficient Verification
Itsykson et al. Source code modification technology based on parameterized code patterns

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 618000 No. 18, Third Section of Lushan South Road, Deyang City, Sichuan Province

Patentee after: Dongfang Electric Automatic Control Engineering Co., Ltd.

Address before: 618099 No. 18, Section 3, Lushan South Road, Deyang City, Sichuan Province

Patentee before: Sichuan Orient Electric Automatic Control Engineering Co., Ltd.

CP03 Change of name, title or address