CN102306109B - Method for realizing logic programming in communication management machine - Google Patents

Method for realizing logic programming in communication management machine Download PDF

Info

Publication number
CN102306109B
CN102306109B CN201110201278.1A CN201110201278A CN102306109B CN 102306109 B CN102306109 B CN 102306109B CN 201110201278 A CN201110201278 A CN 201110201278A CN 102306109 B CN102306109 B CN 102306109B
Authority
CN
China
Prior art keywords
logic
logical
variable
communication manager
management machine
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
CN201110201278.1A
Other languages
Chinese (zh)
Other versions
CN102306109A (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.)
SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN KANGBIDA ZHONGCHUANG 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 SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY Co Ltd filed Critical SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY Co Ltd
Priority to CN201110201278.1A priority Critical patent/CN102306109B/en
Publication of CN102306109A publication Critical patent/CN102306109A/en
Application granted granted Critical
Publication of CN102306109B publication Critical patent/CN102306109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for realizing logic programming in a communication management machine. Based on a main program module in an electrically monitored communication management machine, logic programmable configuration software capable of performing logic programming and operation is added in a main program in the communication management machine; a management machine system is subject to function enhancement or modification. The realizing process comprises the following steps of: a, configuring application software of the logic process of the communication management machine by the program, wherein the software is an independent executing program; b, dynamic library which runs in the system; c, logic element; d, verifying logic emulation: testing validity and correctness of the logic process of a logic diagram; and e, online monitoring logic operation of the management machine: when the management machine is running, executing the execution condition of the logic process of the management machine. According to the invention, on the premise that the stability of the system in the communication management machine is not influenced, logic variables are manually or automatically added to the management machine system and logically processed.

Description

A kind of communication manager internal logic programmable method of realizing
Technical field
The present invention relates to power communication field, be specifically related to communication manager internal logic programmable method.
Technical background
In current many power communication management equipment applications, when designing, management system functions of the equipments kind is limited temporarily, on program is done customization, at maintenance system or need to add partial function on original basis, all to encode separately to repair and go, if continued, repair like this, will there is the impact of arriving very much to communication management reliability and performance, system lacks full functionality design, extended function design from now on, implant design, for some simple computation, shift operation, condition judgment all will have been encoded separately, this will increase program operation risk, delay project duration, increase version management cost, in view of above many application, in communication device inside, carry out the function of logic programmable and computing.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of can carry out in communication manager system outside the method for logic programmable and computing to system.
For solving the problems of the technologies described above, the present invention realizes by technical scheme once: a kind of communication manager internal logic programmable method of realizing, based on power monitoring communication manager internal main program module, the partial function module of described main program module comprises interface initialization module, parameter initialization module, udp port initialization module, UDP end data receiving or sending thread creation module, logic picture redraws thread creation module and interface scheduling window, it is characterized in that: in communication manager internal main program, add the logic programmable configuration software that can carry out programming in logic and computing, its interfaces windows basic composition comprises title block, master menu, toolbar, paging hurdle, status bar, interface is single window multi-page pattern, its operation process is one process multithreading, supervisor system is carried out to functional promotion or modification, its implementation procedure comprises the following steps:
A, this logic programmable configuration software are for configuring an application software of communication manager logical process, this software is an executive routine independently, editing interface for single window multi-page of windows, support generation and the loading of logical file, interpolation/the deletion of logic element, automatic identification and the adjustment in logic element path, carry out logical process to logical variable, logical variable is added in supervisor system manually or automatically, by interface scheduler module, operates;
B, configuration dynamic base data: operation communication manager logic programmable application dynamic base, this dynamic base is a dynamic base of internal system operation;
C, write logic element: logic element in definition power monitoring communication manager internal main program module, for representing each logical process or function;
D, logical simulation are just tested: validity and the correctness of test logic figure logical process, when not having supervisor to carry out in the situation of logical process checking, utilize logical simulation function, by manual change's logic parameter, detect the correctness of the logic realization process of the editorial logic figure of institute;
E, supervisor logic operation in-service monitoring: when supervisor is in when operation, implementation status that can monitor management machine logical process, and can in logical diagram, each state be shown.
The test of logical diagram described in described steps d comprises two kinds of off-line simulation test and on-line testings, and wherein, copying need to be opened up 3 threads, data receiver thread, Data Analysis thread, frame updating thread; Off-line simulation is Real Time Drive mode, can progressively check by variate-value is directly set on logical diagram, and logic programmable configuration software will be according to variate-value state real-time rendering.
The functional module that described single window multi-page pattern need to be separated, be convenient to communication manager carries out with multithreading when logical file is processed, can improve the processing speed of logic discrimination like this, each logic function block is an individual threads, be convenient to focus on, whole logic programmable configuration software is to realize in event driven mode.
Between described paging hurdle, define an in esse variable point, in supervisor project file, increase the mode of an information point, to in the logical variable of this some importing logic allocation project, participate in logic configuration again, play the effect of an intermediate variable, operation associated to the variable between logical diagram while completing paging editor.
In described step a, logical variable functional requirement comprises logical variable type stated, logical variable definition, the type definition of logical variable calculation function and logical variable operation rule.
Described step b communication device logic programmable application dynamic base is according to the configuring condition of logical file, for each logical diagram distribute one independently sub-thread carry out logic judgement and processing, for data receiving thread of UDP establishment of on-line debugging and the thread of Data Analysis transmission, for the treatment of the logical data between communication device and logic configuration software and process exchange, for logical variable, defined dynamic logic variable data structure, the needed memory headroom of assignment logic variable data structure as required when dynamic base initialization, avoid internal memory waste or resource exhaustion, consider the situation of two-shipper work, the result of now logical operation and process variable, all be designed to be carried out by working port, and gone to realize to the synchronous mode of standby port by working port.
Between the composing software of described logic programmable configuration software interface and communication device logic programmable application dynamic base, adopt Ethernet to be connected, by UDP mode, carry out communication; Communication device logic programmable application dynamic base need to be by dynamic call the execution of communication manager master routine.
Further, described logic programmable application dynamic base shows to call and represents by calling dynamic library name, pass through returned correct handle again and remove to call the function in this storehouse, what now return is function pointer, and then utilizes function pointer to carry out the functional procedure in this storehouse.
The present invention can, under the prerequisite of stability that does not affect communication manager built-in system, be added to logical variable in supervisor system by logical variable and carry out logical process manually or automatically; Communication manager carries out with multithreading when logical file is processed, and can improve like this processing speed of logic discrimination, and each logic function block is an individual threads, is convenient to focus on, and improves the processing speed of supervisor.Utilize logical simulation function, can be online or the correctness of offline inspection logical process process.
Accompanying drawing explanation
Fig. 1 is system module connection diagram of the present invention;
Fig. 2 is integrated connection schematic diagram of the present invention,
Fig. 3 is dynamic base data flowchart of the present invention.
Embodiment
According to above-mentioned accompanying drawing, the present invention is described in further detail below:
A kind of communication manager internal logic programmable method of realizing, based on power monitoring communication manager internal main program module, the partial function module of described main program module comprises interface initialization module, parameter initialization module, udp port initialization module, UDP end data receiving or sending thread creation module, logic picture redraws thread creation module and interface scheduling window, in communication manager internal main program, add the logic programmable configuration software that can carry out programming in logic and computing, its interfaces windows basic composition comprises title block, master menu, toolbar, paging hurdle, status bar, interface is single window multi-page pattern, its operation process is one process multithreading, supervisor system is carried out to functional promotion or modification, its implementation procedure comprises the following steps:
A, this program are for configuring an application software of communication manager logical process, this software is an executive routine independently, editing interface for single window multi-page of windows, support generation and the loading of logical file, interpolation/the deletion of logic element, automatic identification and the adjustment in logic element path, carry out logical process to logical variable, logical variable is added in supervisor system manually or automatically, by interface scheduler module, operates;
B, dynamic base: operation communication manager logic programmable application dynamic base, this dynamic base is a dynamic base of internal system operation;
C, logic element: logic element in define program, for representing each logical process or function;
D, logical simulation are just tested: validity and the correctness of test logic figure logical process, when not having supervisor to carry out in the situation of logical process checking, utilize logical simulation function, by manual change's logic parameter, detect the correctness of the logic realization process of the editorial logic figure of institute;
E, supervisor logic operation in-service monitoring: when supervisor is in when operation, implementation status that can monitor management machine logical process, and can in logical diagram, each state be shown.
Wherein logical variable functional requirement comprises logical variable type stated, logical variable definition, the type definition of logical variable calculation function and logical variable operation rule.
Embodiment mono-:
Logic programmable configurator module connection layout shown in Fig. 1, comprises following a few part:
1, main program module, this module is the main body of whole program, comprise the scheduling of program initialization, interface, workspace mouse or KeyEvent response, state and warning information prompting, logical file generates or load, the download between logical file and supervisor or upload, on-line debugging.
2, logic element generates and release module, and this module is for defining the drafting of logic element and discharging generation and deletion tactful, logic element line.
3, logical variable configuration module, which variable is this module, for defining the configuration control strategy of logical variable, specify to participate in so-and-so and input computing, and what its output can be used as and controls exclusive disjunction.
4, logical diagram collector, logical diagram compiling: check that logical diagram has error-free, compiling formation logic figure error log.
5, emulation testing module, off-line or online logic testing: udp port initialization, Generation of simulating data, logic frame updating are drawn.
The regulation of logical variable:
According to KBD supervisor, application by logical variable type definition is: remote measurement, remote signalling, remote control, distant arteries and veins, definite value, pure digi-tal variable, other variable be totally 7 classes.Types of variables, with numeral (since 1, scope 1~65535), temporarily defines logical variable type as follows: 1---remote measurement variable; 2---remote signalling variable; The distant arteries and veins variable of 3---; 4---remote control variable; 5---definite value variable (reservation); 6---pure digi-tal variable; Other variable of 7---(can expand backward according to this logical variable type)
The type definition of logical variable calculation function:
Arithmetical operation (add, subtract, multiplication and division, ask mould);
Logical operation (logical and, logical OR, logic NOT);
Bit arithmetic (move to left, move to right, step-by-step and, step-by-step or, position XOR, negate);
Condition judgment (be greater than, be more than or equal to, be less than, be less than or equal to, equal, be not equal to);
Function (sine function, cosine function, tan, cotangent function, arcsin function, inverse cosine function, arctan function, arc cotangent function, evolution function, power function, ABS function, delay function);
Control output (direct action is exported in remote control);
Timer (time relatively: with respect to fixed time overgauge x second with interior startup timer, otherwise timeing closing device.This timer time can arrange, for needs regularly time---divide--second);
Logical variable operation rule
Communication manager information point comprises: the remote measurement of equipment, remote signalling, definite value, remote controlled point, distant arteries and veins point.These points participate in the rule of logic programmable:
Definite value a: input variable (reservation) as condition judgment;
Remote measurement: can be used as the input variable of arithmetical operation, logical operation, bit arithmetic, condition judgment, function, remote measurement can be used as the result of remote signalling point by bit arithmetic;
Remote signalling: can be used as the input of bit arithmetic, its Output rusults can be used as remote measurement input;
Distant arteries and veins: can be used as the input variable of arithmetical operation, logical operation, condition judgment, function, its output can be used as the result of remote measurement or distant arteries and veins;
The result of logical operation, bit arithmetic, condition judgment can be used as the input of controlling output.
Logical diagram test comprises two kinds of off-line simulation test and on-line testings, and wherein, copying need to be opened up 3 threads, data receiver thread, Data Analysis thread, frame updating thread; Off-line simulation is Real Time Drive mode, can progressively check by variate-value is directly set on logical diagram, and program will be according to variate-value state real-time rendering.The functional module that single window multi-page pattern need to be separated, be convenient to communication manager carries out with multithreading when logical file is processed, can improve the processing speed of logic discrimination like this, each logic function block is an individual threads, be convenient to focus on, whole program is mainly to realize in event driven mode.Between described paging hurdle, define an in esse variable point, in supervisor project file, increase the mode of an information point, to in the logical variable of this some importing logic allocation project, participate in logic configuration again, play the effect of an intermediate variable, operation associated to the variable between logical diagram while completing paging editor.
Embodiment bis-:
Shown in Fig. 2, Fig. 3, communication device logic programmable application dynamic base:
Communication device logic programmable application dynamic base is according to the configuring condition of logical file, for each logical diagram distribute one independently sub-thread carry out logic judgement and processing, for data receiving thread of UDP establishment of on-line debugging and the thread of Data Analysis transmission, for the treatment of the logical data between communication device and logic configuration software and process exchange, for logical variable, defined dynamic logic variable data structure, the needed memory headroom of assignment logic variable data structure as required when dynamic base initialization, avoid internal memory waste or resource exhaustion, consider the situation of two-shipper work, the result of now logical operation and process variable, all be designed to be carried out by working port, and gone to realize to the synchronous mode of standby port by working port.Between the composing software of logic programmable configuration software interface and communication device logic programmable application dynamic base, adopt Ethernet to be connected, by UDP mode, carry out communication; Communication device logic programmable application dynamic base need to be by dynamic call the execution of communication manager master routine.Logic programmable application dynamic base shows calls expression by calling dynamic library name, then passes through returned correct handle and remove to call the function in this storehouse, and what now return is function pointer, and then utilizes function pointer to carry out the functional procedure in this storehouse.
Dynamic base master data flow process is as follows:
1) dynamic base initialization
The udp port of initialization logic variable-→ initialization on-line testing-→ establishment UDP message receipts/hair line journey → read logical file → establishment logical process to process sub-thread;
2) UDP on-line testing process
UDP on-line testing process is for logic on-line testing function between completion logic configuration software and communication manager.This process need is opened up two threads of data transmit-receive.On-line testing is to be completed by UDP message send-thread, is the mode initiatively sending.
Intercept the connection of logic configuration software -→ start test-→ active upload logical variabledata → stop test-→;
3) dynamic base discharges
There are two kinds of release conditions:
A, master routine exit all resources and discharge
Exit-→ release UDP message receipts/hair line journey of master routine and logical process are processed sub-thread;
B, logical process rerun
Receive the logic request of reruning of UDP client-→ discharge logical process process sub-thread-→ initialization logic variable-→ read logical file → establishment logical process to process sub-thread;
4) logic function is carried out sub-thread
This sub-thread is for resolving also logical process and the computing of completion logic functional diagram, and when dynamic base initialization, program can, according to the definition of logic.st file, be carried out sub-thread for each logi function chart creates logic function.The sub-thread execution frequency of each logic function can arrange as required.

Claims (8)

1. realize communication manager internal logic programmable method for one kind, based on power monitoring communication manager internal main program module, the partial function module of described main program module comprises interface initialization module, parameter initialization module, udp port initialization module, UDP end data receiving or sending thread creation module, logic picture redraws thread creation module and interface scheduling window, it is characterized in that: in communication manager internal main program, add the logic programmable configuration software that can carry out programming in logic and computing, its interfaces windows basic composition comprises title block, master menu, toolbar, paging hurdle, status bar, interface is single window multi-page pattern, its operation process is one process multithreading, supervisor system is carried out to functional promotion or modification, its implementation procedure comprises the following steps:
A, this logic programmable configuration software are for configuring an application software of communication manager logical process, this software is an executive routine independently, editing interface for single window multi-page of windows, support generation and the loading of logical file, interpolation/the deletion of logic element, automatic identification and the adjustment in logic element path, carry out logical process to logical variable, logical variable is added in supervisor system manually or automatically, by interface scheduler module, operates;
B, configuration dynamic base data: operation communication manager logic programmable application dynamic base, this dynamic base is a dynamic base of internal system operation;
C, write logic element: logic element in definition power monitoring communication manager internal main program module, for representing each logical process or function;
D, logical simulation are just tested: validity and the correctness of test logic figure logical process, when not having supervisor to carry out in the situation of logical process checking, utilize logical simulation function, by manual change's logic parameter, detect the correctness of the logic realization process of the editorial logic figure of institute;
E, supervisor logic operation in-service monitoring: when supervisor is in when operation, implementation status that can monitor management machine logical process, and can in logical diagram, each state be shown.
2. the communication manager internal logic programmable method of realizing according to claim 1, it is characterized in that: the test of logical diagram described in described steps d comprises two kinds of off-line simulation test and on-line testings, wherein, copying need to be opened up 3 threads, data receiver thread, Data Analysis thread, frame updating thread; Off-line simulation is Real Time Drive mode, by variate-value is directly set on logical diagram, progressively checks, logic programmable configuration software will be according to variate-value state real-time rendering.
3. the communication manager internal logic programmable method of realizing according to claim 1, it is characterized in that: the functional module that described single window multi-page pattern need to be separated, be convenient to communication manager carries out with multithreading when logical file is processed, can improve the processing speed of logic discrimination like this, each logic function block is an individual threads, be convenient to focus on, whole logic programmable configuration software is to realize in event driven mode.
4. the communication manager internal logic programmable method of realizing according to claim 1, it is characterized in that: between described paging hurdle, define an in esse variable point, in supervisor project file, increase the mode of an information point, to in the logical variable of this some importing logic allocation project, participate in logic configuration again, play the effect of an intermediate variable, operation associated to the variable between logical diagram while completing paging editor.
5. the communication manager internal logic programmable method of realizing according to claim 1, is characterized in that: in described step a, logical variable functional requirement comprises logical variable type stated, logical variable definition, the type definition of logical variable calculation function and logical variable operation rule.
6. the communication manager internal logic programmable method of realizing according to claim 1, it is characterized in that: described step b communication device logic programmable application dynamic base is according to the configuring condition of logical file, for each logical diagram distribute one independently sub-thread carry out logic judgement and processing, for data receiving thread of UDP establishment of on-line debugging and the thread of Data Analysis transmission, for the treatment of the logical data between communication device and logic configuration software and process exchange, for logical variable, defined dynamic logic variable data structure, the needed memory headroom of assignment logic variable data structure as required when dynamic base initialization, avoid internal memory waste or resource exhaustion, consider the situation of two-shipper work, the result of now logical operation and process variable, all be designed to be carried out by working port, and gone to realize to the synchronous mode of standby port by working port.
7. according to realizing communication manager internal logic programmable method described in claim 1 or 6, it is characterized in that: between the composing software of described logic programmable configuration software interface and communication device logic programmable application dynamic base, adopt Ethernet to be connected, by UDP mode, carry out communication; Communication device logic programmable application dynamic base need to be by dynamic call the execution of communication manager master routine.
8. according to realizing communication manager internal logic programmable method described in claim 1 or 6, it is characterized in that: described logic programmable application dynamic base shows to call and represents by calling dynamic library name, pass through again returned correct handle and remove to call the function in this storehouse, what now return is function pointer, and then utilizes function pointer to carry out the functional procedure in this storehouse.
CN201110201278.1A 2011-07-18 2011-07-18 Method for realizing logic programming in communication management machine Active CN102306109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110201278.1A CN102306109B (en) 2011-07-18 2011-07-18 Method for realizing logic programming in communication management machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110201278.1A CN102306109B (en) 2011-07-18 2011-07-18 Method for realizing logic programming in communication management machine

Publications (2)

Publication Number Publication Date
CN102306109A CN102306109A (en) 2012-01-04
CN102306109B true CN102306109B (en) 2014-02-19

Family

ID=45379975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110201278.1A Active CN102306109B (en) 2011-07-18 2011-07-18 Method for realizing logic programming in communication management machine

Country Status (1)

Country Link
CN (1) CN102306109B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204837B (en) * 2014-06-27 2021-02-09 南京南瑞继保电气有限公司 Method and device for realizing logic programming
CN109491910B (en) * 2018-11-07 2021-06-29 紫光测控有限公司 Visual simulation debugging method and system for protection logic and control logic
CN113495535B (en) * 2020-03-19 2022-06-14 中国科学院沈阳自动化研究所 Method and system for realizing production operation control through configuration
CN113489639B (en) * 2021-06-16 2022-12-02 杭州深渡科技有限公司 Gateway multi-interface data communication method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050228627A1 (en) * 2004-04-08 2005-10-13 Matthew Bellantoni System-level simulation of devices having diverse timing
CN100388234C (en) * 2005-12-09 2008-05-14 中兴通讯股份有限公司 Method for monitoring internal memory varible rewrite based on finite-state-machine
CN101630285A (en) * 2009-08-07 2010-01-20 华南理工大学 Software performance testing method applied in embedded system

Also Published As

Publication number Publication date
CN102306109A (en) 2012-01-04

Similar Documents

Publication Publication Date Title
CN110245067B (en) System and method for automatically generating test case based on requirement of safety key software
CN108846630B (en) Resource control system and method
US20050223295A1 (en) Method for the creation of sequences for testing software
CN108897676B (en) Flight guidance control software reliability analysis system and method based on formalization rules
US10551807B2 (en) Method for connecting an input/output interface of a tester equipped for control unit development
KR20100041447A (en) Apparatus and method for automatic testing of softwares or digital divices
CN102306109B (en) Method for realizing logic programming in communication management machine
US8701079B2 (en) Procedure and development environment for generation of an executable overall control program
CN104699478A (en) Method for changing the software in the memory of an electronic control unit
CN109062152A (en) A kind of Loacl variable on-line monitoring method that logic-based configuration generates
US20160094158A1 (en) Method for power station simulation
CN113919158A (en) Simulation method and device for flight control panel and storage medium
CN117032903B (en) Simulation debugging method and device, storage medium and electronic equipment
CN113742228A (en) Test, data playback and recording method, system, device, equipment and medium
Trakhtenbrot Implementation-oriented mutation testing of statechart models
Bidkar et al. Virtual ECU Development for Vehicle Diagnostics Software Testing using UDS Protocol
CN111581101A (en) Software model testing method, device, equipment and medium
CN101539766B (en) Program debugging method and device thereof
CN101710233A (en) Design method of motion controller based on RCP
CN111044826B (en) Detection method and detection system
CN112465281A (en) Stability control strategy prejudging method under real-time power system scene
US20240037016A1 (en) Computer readable storage medium, debugging support device, debugging support method, and machine learning device
US20220057769A1 (en) Programmable microgrid control system
Conrad et al. Towards a methodology for the design of hybrid systems in automotive electronics
CN113407243B (en) Method and device for configuring and scheduling virtual I/O (input/output) module

Legal Events

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

Inventor after: Lin Fengping

Inventor after: Ding Jianyi

Inventor after: Zhang Xiaoshan

Inventor before: Ding Jianyi

Inventor before: Lin Fengping

Inventor before: Zhang Xiaoshan

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: DING JIANYI LIN FENGPING ZHANG XIAOSHAN TO: LIN FENGPING DING JIANYI ZHANGXIAOSHAN

C14 Grant of patent or utility model
GR01 Patent grant