CN100582979C - Debugging method and device for controller - Google Patents

Debugging method and device for controller Download PDF

Info

Publication number
CN100582979C
CN100582979C CN200610156451A CN200610156451A CN100582979C CN 100582979 C CN100582979 C CN 100582979C CN 200610156451 A CN200610156451 A CN 200610156451A CN 200610156451 A CN200610156451 A CN 200610156451A CN 100582979 C CN100582979 C CN 100582979C
Authority
CN
China
Prior art keywords
shielding
program
point
controller
district
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.)
Expired - Fee Related
Application number
CN200610156451A
Other languages
Chinese (zh)
Other versions
CN1987706A (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.)
ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Zhejiang University ZJU
Supcon Group Co Ltd
Original Assignee
ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Zhejiang University ZJU
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 ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd, Zhejiang University ZJU filed Critical ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Priority to CN200610156451A priority Critical patent/CN100582979C/en
Publication of CN1987706A publication Critical patent/CN1987706A/en
Application granted granted Critical
Publication of CN100582979C publication Critical patent/CN100582979C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

Being related to technical area of industry digitizing control, the method includes following steps: setting up masking off attribute points in the input program area (IPA) or/and the output program area (OPA) of information stream (IS) in controller in advance, generating masking off points corresponding to the masking off attribute points, and setting up values of physical addresses of masking off points; running program in IPA of information stream, determining whether value of physical address of masking off point is on; if yes, then masking off IPA of IS to receive data from the connected program area or the running device; running program in OPA of IS, determining whether value of physical address of masking off point is on; if yes, then masking off OPA of IS to send data to the connected program area or the running device; debugging not masked program area connected to IPA of IS or OPA of IS.

Description

A kind of adjustment method of controller and device
Technical field
The present invention relates to the industrial control technology field, be meant a kind of adjustment method and device of controller especially.
Background technology
In industrial control field, need according to on-the-spot condition and the different controlling schemes of operational characteristic design for realizing control procedure.The process of access control scheme correctness, be that the physical quantity that the scene characterizes various characteristics is collected in the controller by input channel, and, be transported in the scene by output channel according to the different control program of feature establishment separately, drive topworks, thereby finished a control procedure.The correctness of control program, performed control is vital to controller, these control programs can be checked the correctness of its grammer when compiling, but the correctness of logic then need realize by other means.Yet, in the proving program logical process, always production run is caused disturbance, cause damage.Therefore controller need be reduced in the program verification process interference to production run, thereby reduces the loss, and raises the efficiency.
Controlling schemes in controller is made up of control section.Control section is to realize one section program of fixed function, and it has code and data, has characterized operation method, operating procedure and the operation result of program respectively.Permutation and combination by various control sections realizes different controlling schemes and control strategy.
Access control scheme correctness comparatively commonly adopts emulation technology.Emulation technology is exactly a simulated field ruuning situation, with the correctness of test controlling schemes.All kinds of emulation technologies emerge in an endless stream, the ruuning situation of these technology or simulated field, or with program run in emulation controller, importantly the input of program is also carried out the emulation input and output, isolated with on-the-spot gets in touch.Emulation technology to a certain extent can simulator program the situation of operation, find some problem of programmed logic, can not cause disturbance to the scene yet.
But because on-the-spot operating mode is Protean, setting up a correct simulated environment relatively wastes time and energy.If there is deviation in environment, just can't guarantee that program can adapt to actual field.Operate in the program of emulation controller for those, the signal of input is a simulate signal, exists certain difference with on-site signal, and the carrier of working procedure is not the environment of final operation.Because on-the-spot state is ever-changing, can not be comprehensive during design, if the problem that designing institute causes adopts this emulation mode to be difficult to detect, and the control program of one section logic complexity, its operation result is all linked with one another.If program has many places to make mistakes, emulation mode just can not be carried out the checking of follow-up interrelated logic, has found a mistake, must can carry out searching of next problem by update routine.Can not skip error routine, carry out the debugging of next section program, influence the debugging efficiency of system.
Along with being gradually improved of control technology, online download technology also moves to maturity, and when on-the-spot technology is improved, can adopt the method for online download usually, to reduce the influence to the equipment that runs well.These controlling schemes that obtain changing by online download need checking equally, if adopt emulation technology, need the simulation process before repeated plant is opened again, become inconvenient more on the contrary.Particularly when the input of newly-increased program be during certain data in the middle of the working procedure, old program roll back one time just can need be finished the whole debugging flow process of program again, process is loaded down with trivial details.
Therefore, for the improvement project of this class download, when debugging, the on-line debugging technology of employing, it forbids the operation of program segment by forbidding means.When program runs into the program segment of forbidding, skip the operation that this section program is carried out the next non-program segment of forbidding.This debugging method can be investigated program error, but can not debug the execution of program segment inside based on program actual motion environment on certain program.
Summary of the invention
In view of this, the invention reside in adjustment method and device that a kind of controller is provided, to solve the above-mentioned problem that can not debug the execution of program segment inside.
For addressing the above problem, the invention provides a kind of adjustment method of controller, controller is connected with operating equipment, comprising:
Shielding is set in information flow loading routine district in controller and the information flow written-out program district in advance characterizes point, and a generation and the corresponding shielding point of described shielding sign point; Wherein, described information flow loading routine district is provided with first shielding and characterizes the corresponding first shielding point of dot generation, described information flow written-out program district is provided with secondary shielding and characterizes the corresponding secondary shielding point of dot generation, and the physical address values of the described first shielding point and described secondary shielding point is set;
Move the program in the described information flow loading routine district, judge the physical address values of described first shielding point, if described physical address values is an opening, then shields described information flow loading routine district and receive the program area be connected or the data of described equipment in service;
Move the program in the described information flow written-out program district, judge the physical address values of described secondary shielding point, if described physical address values is an opening, then shield described information flow written-out program district to program area that is connected or described equipment output data in service;
Debugging is connected and unscreened program area with described information flow loading routine district or described information flow written-out program district.
Wherein, this method further comprises:
Shielding is set in information flow loading routine district and information flow written-out program district characterizes point simultaneously, the 3rd shielding is set in the program area of functional block in controller characterizes point, generate with described the 3rd shielding and characterize corresponding the 3rd shielding point of point, the physical address values of described the 3rd shielding point is set;
Move the program in the program area of described functional block, judge the physical address values of described the 3rd shielding point,, then shield the program in the program area of described functional block if described physical address values is an opening.
Wherein, before being debugged, described controller comprises:
The engineer station sends a command to controller by Ethernet, after controller receives order, described shielding is set characterizes point.
Wherein, after being debugged, described controller comprises:
After debugging successfully, the physical address values of described shielding point is set to close, and controller moves the equipment of the described operation of programmed control in each program area.
The present invention also provides a kind of debugging apparatus of controller, and controller is connected with operating equipment, comprising:
Writing unit is used for being provided with in the program area of controller in advance shielding and characterizes point;
The unit is set, is used for generating and the corresponding shielding point of described shielding sign point, the physical address values of shielding point is set;
Processing unit is used for moving the program of described program area, when running to described shielding and characterizing point, notifies described judging unit, after the answer that receives judging unit, carries out shielding and does;
Judging unit after being used to receive the notice of processing unit, is judged the physical address values of described shielding point, if described physical address values is an opening, then replys processing unit;
Debug interface unit is connected with described processing unit, is used to import Debugging message, debugs unscreened program area, described unscreened program area.
Wherein, the program area is the program area of information flow loading routine district, information flow written-out program district or functional block in the described device.
Wherein, described device also comprises interface unit, is connected with the said write unit, is used for being connected with the engineer station by Ethernet.
Method and apparatus of the present invention, different with emulation technology is, and debugging is fully based on program actual motion environment at the scene, and controlling schemes operates under this environment the most at last.The present invention can carry out the collection of on-the-spot actual measuring point according to demand, and controls according to these data, and control program operates in the working control device, and controller is connected with operating equipment.Embody actual operating mode like this, improve the efficient of debugging, detect input value faster and whether be equal to design characteristics.After certain section program debug success, directly program is withdrawed from debugging mode, carry out actual motion, control operating equipment, easy to operate.
Different with the on-line debugging technology is, not only can forbid the operation of program segment based on the controlling schemes debugging technique of information flow shielding, the input/output information of program segment can also be shielded respectively, with the internal logic of debugged program section, and in the isolated debug process various intermediate values to the influence of its downstream program section.
Description of drawings
Fig. 1 is the structural drawing of controller;
Fig. 2 is the process flow diagram of the embodiment of the invention one;
Fig. 3 is the connection diagram of each functional block;
Fig. 4 is a structure drawing of device of the present invention.
Embodiment
For after the controlling schemes in the controller in the scene of solving changes, when new controlling schemes is debugged, can not be to the problem of its scheme implementation debugging.
The present invention proposes controlling schemes debugging technique based on the information flow shielding.In debug process, after shielding, realize this functional block debugging to the input traffic of functional block and output stream to controlling schemes.After debugging all functions piece of controlling schemes successfully, again controller is put in the work.Functional block among the present invention is meant control program is divided according to its logic, is divided into each program area.
Describe specific embodiments of the invention one in detail below in conjunction with accompanying drawing.
Referring to Fig. 1, the engineer station is connected with controller, and controller is connected with equipment in the factory.In the present embodiment, the engineer station is a terminal, when adding new controlling schemes or the controlling schemes moved when changing to the equipment in the factory, need carry out configuration to controlling schemes the engineer station, the process of configuration is with the instrument that provides in the application software, method, finishes the process of specific tasks in the control engineering.Configuration compiling forms new controlling schemes and downloads in the controller, debug qualified after, by controller shop equipment is controlled.
As other debugging method, the present invention need be provided with some special sign in program, need carry out some special processings when program runs into these signs.In a lot of high-level language programs these signs are called breakpoint, when the code line of carrying out these sign places is the operation of time out program.And the distinctive mark that is proposed among the present invention is different from breakpoint, and the present invention is referred to as to shield a little.When the program execution runs into the shielding point, skip the program segment that the shielding point is identified, carry out the operation of next section program.
The present invention logically carries out subregion by the method for shielding point is set with program, according to demand program is divided into a plurality of districts when debugging, and makeing mistakes in certain program area, can cut off this program area, carries out the debugging of next program area.Wherein, the particular flow sheet of embodiment is referring to Fig. 2,
Step S201: shielding is set in the program area characterizes point;
When the engineer station carries out the configuration compiling, shielding is set respectively in loading routine district, written-out program district, complicated process district characterizes point.The program that shielding characterizes in this program area of some expression can be skipped, and directly moves the program in the next program area.
Step S202: set up shielding and characterize point and the mapping table that shields point;
By Ethernet, mapping table is set up in the data field in the control program district the engineer station, the shielding of creating in each maskable program area is characterized point store in the mapping table, also will store and shield the corresponding shielding point of sign point in mapping table.The information of shielding point includes the pairing physical address in controller of this shielding point.
Step S203: the shielding point is set;
After will shielding the mapping table that characterizes point and shielding point and creating successfully, need be provided with shielding.When the shielding point that each complicated process district, loading routine district, written-out program district comprised is set, send the Ethernet order by the engineer station to controller, controller sends to the Ethernet data treatment region in the ethernet controller, controller carries out write operation by this order to the pairing physical address of shielding point, the storing value in this physical address is changed to opens or close.After being set to open, the pairing loading routine of this shielding point district, written-out program district or complicated process district can't move.
Referring to Fig. 1, in the present embodiment, maskable program area is 1 to N, and non-maskable program area is 1 to M.
Step S204: move each program area;
After mapping table is set up successfully, each state setting that shields point of needs shielding is finished, move each program area, there is shielding to characterize point, then execution in step S205 if find in the process of operation.
Step S205: judge the shielding dotted state;
In mapping table, find out this program and characterize the pairing shielding point of point, judge in the pairing physical address of shielding point to shield dotted state,, continue each program area of operation if closed condition is then returned step S204; If opening, then execution in step S206.
Step S206: debug the program in this program area.
Be transferred to the data test stage this moment, if what shielded is a loading routine district in the functional block, then during these functional block operation input data, can't go to gather measured value from signal input and output treatment region.Like this, protect the measured value that is not subjected to of this functional block to influence, can directly debug, assignment in functional block, and the output valve by this functional block detects this functional block whether in normal range.
When output valve after within the normal range, remove the shielding point again, the state that is about to the shielding point is set to close.The program of this functional block of operation realizes the control to equipment in controller.
Top embodiment describes the workflow of work of the present invention in detail, uses embodiments of the invention two when describing a plurality of functional block of debugging in detail below in conjunction with Fig. 3.
Referring to Fig. 3, in the present embodiment, analyze in the program that when compiling will debug in to this controller, this section program is divided into 9 program areas.Input in each program area and each functional block shown in Figure 3 and the functional block, output are corresponding.
We according to handling complexity, are divided into sophisticated functions piece and simple functions piece with functional block.For the sophisticated functions piece, we can be by shielding its shielding of naming a person for a particular job, and simple functional block then can shield, and allows its operation.
9 program areas are respectively:
The information flow loading routine district of functional block 1 is used for IN1 and IN2 with measured value 1 and measured value 2 input function pieces 1, but the conductively-closed of this section program area.
The program run district of functional block 1, because functional block 1 is the simple functions piece, this section program area can not conductively-closed.
The information flow written-out program district of functional block 1 is used for the OUT1 output information stream from functional block 1, but the conductively-closed of this section program area.
The information flow loading routine district of functional block 2 is used for the data of IN1, IN2 and IN3 are input to functional block 2, but the conductively-closed of this section program area.
The program run district of functional block 2, function 2 is the sophisticated functions piece, but the conductively-closed of this section program.
The information flow written-out program district of functional block 2 is used for the OUT1 output information stream from functional block 2, but the conductively-closed of this section program.
The information flow loading routine district of functional block 3 is used for importing data to IN1, with measured value 3, measured value 4 and export 1 the feedback be input among IN2, the IN3 and IN4 of functional block 3, but the conductively-closed of this section program.
The program run district of functional block 3, function 3 is the sophisticated functions piece, but the conductively-closed of this section program.
Functional block 3 information flow written-out program districts are used for the output data from OUT1, but the conductively-closed of this section program.
Superincumbent 9 program areas characterize point but can add shielding in the program area of conductively-closed, and the shielding point are set.When the shielding point is provided with, can be provided with according to the needs of debugging.
In this embodiment, each program area moves one by one, during the information flow loading routine district of operation function piece 2, discovery has shielding to characterize point, find the physical address of corresponding shielding point, judging by the value of physical address is to close, not conductively-closed, and the input of functional block 2 changes along with the variation of IN1, IN2 and IN3 so; If open, then represent conductively-closed, can give functional block 2 assignment that this moment by the debugging interface.By the output valve of observing function piece 2, determine whether the program run district of functional block 2 moves correctly.After observing its output valve in normal range, remove the shielding in the information flow loading routine district of functional block 2, in controller, use this functional block 2.
When the program run district of debug function piece 2, can make functional block 3 can not produce disturbance the information flow written-out program district shielding of functional block 2 because of the test of functional block 2.
When each functional block of debugging, information flow loading routine district, the written-out program district of three functional blocks can also be shielded, the program run district of three functional blocks is debugged, after input value, output valve are in normal scope, remove each shielding, three functional blocks of operation in controller.
Can also carry out the integral body debugging,, debug the information flow loading routine district of functional block 1 and the information flow written-out program district shielding of functional block 3.Break away from normal range if find the output result in the debug process, the program area shielding of one of them functional block only can be moved the program area of other functional block.If program run this moment is correct, can infer the functional block existing problems of shielding so, need to revise.
The present invention also provides a kind of debugging apparatus of controller, and controller is connected with operating equipment, and debugging apparatus can be in controller, also can be outside independence and controller, and debugging apparatus comprises:
Writing unit 401 is used for being provided with in the program area of controller in advance shielding and characterizes point;
Unit 402 is set, is used for generating and the corresponding shielding point of described shielding sign point, the physical address values of shielding point is set;
Processing unit 403 is used for moving the program of described program area, when running to described shielding and characterizing point, notifies described judging unit 404, after the answer that receives judging unit 404, carries out masking operation;
Judging unit 404 after being used to receive the notice of processing unit 403, is judged the physical address values of described shielding point, if value is then replied processing unit 403 for opening;
Debug interface unit 406 is connected with described processing unit 403, is used to import Debugging message, debugs unscreened program area, described unscreened program area.
In device of the present invention, the program area is the program area of information flow loading routine district, information flow written-out program district or functional block in the described device.
In device of the present invention,
Described processing unit 403 operation informations stream loading routine district is or/and information flow written-out program district, when running to described shielding and characterizing point, is used to shield described information flow loading routine district and receives the program area that is connected or the data of described equipment in service; Or shield described information flow written-out program district to program area that is connected or described equipment output data in service.
Device of the present invention also comprises interface unit 405, is connected with said write unit 401, is used for being connected with the engineer station by Ethernet.
Method and apparatus of the present invention, different from emulation technology is that debugging is fully based on journey Order actual motion environment at the scene, control program operates under this environment the most at last. The present invention Can carry out according to demand the collection of on-the-spot actual measuring point, and control according to these data, control The processing procedure sort run is in the working control device, and controller is connected with operating equipment. Such body Reveal actual operating mode, improve the efficient of debugging, detect faster input value and whether be equal to Design characteristics. After certain section program debugging success, directly program is withdrawed from debugging mode, carry out reality The border operation, the equipment in the controlling run, easy to operate.
Different from the on-line debugging technology is, based on the control program debugging technique of information flow shielding Not only can forbid the operation of program segment, the input/output information of program segment can also be shielded respectively Cover, with the internal logic of debugging routine section, and various medians are lower to it in the isolated debug process The impact of trip program segment.
For method and apparatus of the present invention, within the spirit and principles in the present invention all, do Any modification, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1, a kind of adjustment method of controller, controller is connected with operating equipment, it is characterized in that, comprising:
Shielding is set in information flow loading routine district in controller and the information flow written-out program district in advance characterizes point, and a generation and the corresponding shielding point of described shielding sign point; Wherein, described information flow loading routine district is provided with first shielding and characterizes the corresponding first shielding point of dot generation, described information flow written-out program district is provided with secondary shielding and characterizes the corresponding secondary shielding point of dot generation, and the physical address values of the described first shielding point and described secondary shielding point is set;
Move the program in the described information flow loading routine district, judge the physical address values of the described first shielding point,, then shield described information flow loading routine district and receive the program area that is connected or the data of described equipment in service if this physical address values is an opening;
Move the program in the described information flow written-out program district, judge the physical address values of described secondary shielding point,, then shield described information flow written-out program district to program area that is connected or described equipment output data in service if this physical address values is an opening;
Debugging is connected and unscreened program area with described information flow written-out program district with described information flow loading routine district.
2, method according to claim 1 is characterized in that, this method further comprises:
Shielding is set in information flow loading routine district and information flow written-out program district characterizes point simultaneously, the 3rd shielding is set in the program area of functional block in controller characterizes point, generate with described the 3rd shielding and characterize corresponding the 3rd shielding point of point, the physical address values of described the 3rd shielding point is set;
Move the program in the program area of described functional block, judge the physical address values of described the 3rd shielding point,, then shield the program in the program area of described functional block if this physical address values is an opening.
3, method according to claim 1 is characterized in that, comprises before described controller is debugged:
The engineer station sends a command to controller by Ethernet, after controller receives order, described shielding is set characterizes point.
4, method according to claim 1 is characterized in that, comprises after described controller is debugged:
After debugging successfully, the physical address values of described shielding point is set to close, and controller moves the equipment of the described operation of programmed control in each program area.
5, a kind of debugging apparatus of controller, controller is connected with operating equipment, it is characterized in that, comprising:
Writing unit is used for being provided with in the program area of controller in advance shielding and characterizes point;
The unit is set, is used for generating and the corresponding shielding point of described shielding sign point, the physical address values of shielding point is set;
Processing unit is used for moving the program of described program area, when running to described shielding and characterizing point, notifies described judging unit, after the answer that receives judging unit, carries out masking operation;
Judging unit after being used to receive the notice of processing unit, is judged the physical address values of described shielding point, if this physical address values is an opening, then replys processing unit;
Debug interface unit is connected with described processing unit, is used to import Debugging message, debugs unscreened program area.
6, device according to claim 5 is characterized in that, the program area is the program area of information flow loading routine district, information flow written-out program district or functional block in the described device.
7, device according to claim 5 is characterized in that, described device also comprises interface unit, is connected with the said write unit, is used for being connected with the engineer station by Ethernet.
CN200610156451A 2006-12-31 2006-12-31 Debugging method and device for controller Expired - Fee Related CN100582979C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200610156451A CN100582979C (en) 2006-12-31 2006-12-31 Debugging method and device for controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200610156451A CN100582979C (en) 2006-12-31 2006-12-31 Debugging method and device for controller

Publications (2)

Publication Number Publication Date
CN1987706A CN1987706A (en) 2007-06-27
CN100582979C true CN100582979C (en) 2010-01-20

Family

ID=38184531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200610156451A Expired - Fee Related CN100582979C (en) 2006-12-31 2006-12-31 Debugging method and device for controller

Country Status (1)

Country Link
CN (1) CN100582979C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102608934B (en) * 2012-02-08 2014-06-04 浙江中控技术股份有限公司 Function block ordering method on basis of information flow

Also Published As

Publication number Publication date
CN1987706A (en) 2007-06-27

Similar Documents

Publication Publication Date Title
CN101853200B (en) High-efficiency dynamic software vulnerability exploiting method
CN106021103B (en) A kind of mobile application test script automatic maintenance method based on code change
CN106737676B (en) It is a kind of based on script can secondary development industrial robot programing system
CN101976187B (en) Stack tracing method and device in decompilation process and decompiler
CN104391791B (en) The method of testing and device of embedded Control algorithm
CN102375778A (en) Method and system for automatically testing digital signal processor (DSP)
CN108563569B (en) Automatic interface testing method for early warning detection system
CN105608258A (en) Model based system design and information flow visualization simulation system and method
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN109684304A (en) Data migration method and device
CN102968371A (en) Method and device for testing JAVA API unit component
CN103049374B (en) Automatic testing method and device
CN101594627A (en) A kind of apparatus and method of simulating mobile terminal fault
CN108320104B (en) Method for realizing protection fixed value on-line verification function obtaining model based on RelayCAC relay protection setting software
CN1318976C (en) Software detection method and system
CN106844221B (en) Method for realizing coverage rate analysis of virtual verification system
CN102063367B (en) Off-line analysis method and device aiming at computer crash program
CN110069414A (en) Regression testing method and system
CN100582979C (en) Debugging method and device for controller
CN100391290C (en) Method of testing with integrated test tools
CN101539766B (en) Program debugging method and device thereof
CN106796430A (en) Monitoring control device test device
CN110276119A (en) A kind of method that model engineering machinery PEMS operating condition carries out exploitation debugging
CN113836023B (en) Compiler security testing method based on architecture cross check
Ulewicz et al. Proving equivalence between control software variants for Programmable Logic Controllers

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100120

Termination date: 20201231