CN109947434A - Non-interrupted formula and pseudo- parallel embedded software real-time response method, system and medium - Google Patents

Non-interrupted formula and pseudo- parallel embedded software real-time response method, system and medium Download PDF

Info

Publication number
CN109947434A
CN109947434A CN201910285280.8A CN201910285280A CN109947434A CN 109947434 A CN109947434 A CN 109947434A CN 201910285280 A CN201910285280 A CN 201910285280A CN 109947434 A CN109947434 A CN 109947434A
Authority
CN
China
Prior art keywords
program
module
response
real
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910285280.8A
Other languages
Chinese (zh)
Inventor
贾琴
仵阳
刘佳
孟祥飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Electric Control Research Institute Of China Ordnance Equipment Group
Original Assignee
Shanghai Electric Control Research Institute Of China Ordnance Equipment Group
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 Shanghai Electric Control Research Institute Of China Ordnance Equipment Group filed Critical Shanghai Electric Control Research Institute Of China Ordnance Equipment Group
Publication of CN109947434A publication Critical patent/CN109947434A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of non-interrupted formula and pseudo- parallel embedded software real-time response methods, system and medium, include: that signal determines step: determining all input signals of embedded software, determines the priority of varying input signal and the response time requirement of input signal;Main-process stream plot step: the total flow chart of drawing program;Submodule process plot step: it determines each submodule of program, draws the flow chart of each submodule;Timing unit determines step: configuration software system tick timer sets optimal timing unit;Variable-definition step: defining each global variable of program, controls each subelement according to global variable and executes entrance and exit, the input signal of real-time response higher priority.The present invention is using the non-interrupted implementation method of embedded software multipriority, the pseudo- parallel real-time response design method of embedded software, it can react in real time to external event, enter different disposal module according to the different priorities of input, exports corresponding control signal in real time.

Description

Non-interrupted formula and pseudo- parallel embedded software real-time response method, system and medium
Technical field
The present invention relates to software design technology fields, and in particular, to non-interrupted formula and pseudo- parallel embedded software are real-time Response method, system and medium.
Background technique
The present invention is a kind of software design approach, particularly directed to multiple and different priority input, require real-time response Embedded Software Design method.Program uses major cycle structure, carries out circulation to input port, encoder, panel state and sweeps It retouches, implements real-time control.After controller powers on, system is initialized first: each primary variables of software systems, system are all Output end is reset, system watchdog reset.Then system executes self-check program, the UART serial ports that reinitializes, timer T2 and reading After entering angular encoder relative zero, system enters a major cycle structure: according to the requirement of system, repeatedly according to system flow Figure executes: according to input state, coder state and panel state, requiring according to control, control output and LED light.
Since embedded design does not use real time operating system, thus cannot as programming under an operating system, by The distribution and scheduling of operating system progress system resource, it is impossible to realize truly parallel.This system software is for son The scheduling of program is realized with CASE sentence, is run step number identifier by program, is such as entered " land operating condition " sub- journey It after sequence, identifies which step is land operating condition go to by executing step number identifier _ Step_Of_LandStatus, works as progress When jumping, and by _ Step_Of_LandStatus determine which step jumped to actually.This software design approach for The real-time of solution system is realized by pseudo- multiple programming technology.
The country there is no the elaboration to non-interrupted formula and pseudo- parallel embedded software real-time response method at present, is retrieved and is looked into Inquiry also has similar technique and method without discovery
Summary of the invention
For the defects in the prior art, the object of the present invention is to provide a kind of non-interrupted formula and pseudo- parallel embedded softwares Real-time response method, system and medium.
A kind of non-interrupted formula provided according to the present invention and pseudo- parallel embedded software real-time response method, comprising:
Signal determines step: determine all input signals of embedded software, determine the priority of varying input signal with And the response time requirement of input signal;
Main-process stream plot step: the total flow chart of drawing program;
Submodule process plot step: it determines each submodule of program, draws the flow chart of each submodule;
Timing unit determines step: configuration software system tick timer sets optimal timing unit;
Variable-definition step: defining each global variable of program, controls each subelement according to global variable and executes entrance and go out Mouthful, the input signal of real-time response higher priority;
Programming step: according to input signal, the priority of varying input signal, the response time requirement of input signal, journey The total flow chart of sequence, the flow chart of submodule, optimal timing unit and global variable carry out software programming.
Preferably, comprising: multipriority inputs non-interrupted implementation method, pseudo- parallel real-time response design method;
The optimal timing unit is the greatest common divisor of each program timing time.
Preferably, the non-interrupted implementation method of the multipriority input includes:
Program initialization step: after single-chip microcontroller electrification reset, in the input/output of program initialization part configuration single-chip microcontroller Port type, to output end poll tax on children initialization value, configuration software system tick timer sets the system suitable clock cycle, All kinds of interfaces of setting program include communication interface parameters, and the communication interface parameters include: serial ports transmission rate, data format inspection Test code;
Program scan round step: according to the priority of the varying input signal, according to priority orders scan round Each program module;
Signal processing step: handling the input signal received, and the processing includes following any or appoints more Kind: Key dithering operation, anti-misoperation;
Signal response of step: according to the priority of the varying input signal, responder processing module is called, is responded defeated Enter signal, realizes program function.
Preferably, the pseudo- parallel real-time response design method includes:
Timer setting step: using the software systems clock timer, set optimal timing unit, rings as software The fundamental clock factor answered;
Program design step: design main program enables software main program to have carried out electrification reset, self-test and program initial After change, into a scan round structure, main program is enabled to continually scan for each input port, difference is entered according to input and priority Module still enters main program and scans after the completion of current block execution;
Pseudo- parallel real-time response realizes step: each program respond module puppet Parallel Implementation, enable each program execution module according to It executes step number and is divided into several steps, each step jumps out current sub-routine processing module immediately after being finished, and by sub- journey Sequence module currently executes step number as return value, enters major cycle later and carries out input port scanning, judges whether there is priority When higher input needs to respond: if so, then entering high priority responder entrance;Otherwise, then enter according to execution step number Current sub-routine module, performs the next step program;
Response time rate-determining steps: response time control is realized in main program, is realized in major cycle by periodically Response time control, by adjusting the fundamental clock factor and program timing time control response speed.
A kind of non-interrupted formula provided according to the present invention and pseudo- parallel embedded software real-time response designing system, comprising:
Signal determining module: determining all input signals of embedded software, determine the priority of varying input signal with And the response time requirement of input signal;
Main-process stream drafting module: the total flow chart of drawing program;
Submodule process drafting module: it determines each submodule of program, draws the flow chart of each submodule;
Timing unit determining module: configuration software system tick timer sets optimal timing unit;
Variable-definition module: defining each global variable of program, controls each subelement according to global variable and executes entrance and go out Mouthful, the input signal of real-time response higher priority;
Programming module: according to input signal, the priority of varying input signal, the response time requirement of input signal, journey The total flow chart of sequence, the flow chart of submodule, optimal timing unit and global variable carry out software programming.
Preferably, comprising: multipriority inputs non-interrupted realization system, pseudo- parallel real-time response designing system;
The optimal timing unit is the greatest common divisor of each program timing time.
Preferably, the non-interrupted realization system of the multipriority input includes:
Program initialization module: after single-chip microcontroller electrification reset, in the input/output of program initialization part configuration single-chip microcontroller Port type, to output end poll tax on children initialization value, configuration software system tick timer sets the system suitable clock cycle, All kinds of interfaces of setting program include communication interface parameters, and the communication interface parameters include: serial ports transmission rate, data format inspection Test code;
Program scan round module: according to the priority of the varying input signal, according to priority orders scan round Each program module;
Signal processing module: handling the input signal received, and the processing includes following any or appoints more Kind: Key dithering operation, anti-misoperation;
Signal respond module: according to the priority of the varying input signal, responder processing module is called, is responded defeated Enter signal, realizes program function.
Preferably, the pseudo- parallel real-time response designing system includes:
Timer setting module: using the software systems clock timer, set optimal timing unit, rings as software The fundamental clock factor answered;
Program design module: design software main program enables software main program carry out electrification reset, self-test and program After initialization, into a scan round structure, main program is enabled to continually scan for each input port, is entered according to input and priority Disparate modules still enter main program and scan after the completion of current block execution;
Pseudo- parallel real-time response realizes module: each program respond module is pseudo- parallel
It realizes, enable each program execution module be divided into several steps according to step number is executed, each step is stood after being finished Current sub-routine processing module is jumped out, and subroutine module is currently executed into step number as return value, enters major cycle later Input port scanning is carried out, priority higher input is judged whether there is when needing to respond: being responded if so, then entering high priority Program entry;Otherwise, then enter current sub-routine module according to execution step number, perform the next step program;
Response time control module: response time control is realized in main program, is realized in major cycle by periodically Response time control, by adjusting the fundamental clock factor and program timing time control response speed.
A kind of computer readable storage medium for being stored with computer program provided according to the present invention, the computer journey Non-interrupted formula described in any of the above embodiments and pseudo- parallel embedded software real-time response method are realized when sequence is executed by processor Step.
Compared with prior art, the present invention have it is following the utility model has the advantages that
The present invention is set using the non-interrupted implementation method of embedded software multipriority, the pseudo- parallel real-time response of embedded software Meter method can in real time react to external event, enter different disposal module according to the different priorities of input, defeated in real time Corresponding control signal out.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention, Objects and advantages will become more apparent upon:
Fig. 1 is the software information flow diagram that the embodiment of the present invention 1 provides.
Fig. 2 is the program circuit schematic diagram that the embodiment of the present invention 1 provides.
Fig. 3 is the land and water procedure of operating mode schematic diagram that the embodiment of the present invention 2 provides.
Specific embodiment
The present invention is described in detail combined with specific embodiments below.Following embodiment will be helpful to the technology of this field Personnel further understand the present invention, but the invention is not limited in any way.It should be pointed out that the ordinary skill of this field For personnel, without departing from the inventive concept of the premise, several changes and improvements can also be made.These belong to the present invention Protection scope.
A kind of non-interrupted formula provided according to the present invention and pseudo- parallel embedded software real-time response method, comprising:
Signal determines step: determine all input signals of embedded software, determine the priority of varying input signal with And the response time requirement of input signal;Further, the response time requirement refers to the processing time of unlike signal requirement, no Same input signal has different response time requirements.
Main-process stream plot step: the total flow chart of drawing program;
Submodule process plot step: it determines each submodule of program, draws the flow chart of each submodule;
Timing unit determines step: configuration software system tick timer sets optimal timing unit;
Variable-definition step: defining each global variable of program, controls each subelement according to global variable and executes entrance and go out Mouthful, the input signal of real-time response higher priority;
Programming step: according to input signal, the priority of varying input signal, the response time requirement of input signal, journey The total flow chart of sequence, the flow chart of submodule, optimal timing unit and global variable carry out software programming.
Specifically, comprising: multipriority inputs non-interrupted implementation method, pseudo- parallel real-time response design method;
The optimal timing unit is the greatest common divisor of each program timing time.
Specifically, the non-interrupted implementation method of the multipriority input includes:
Program initialization step: after single-chip microcontroller electrification reset, in the input/output of program initialization part configuration single-chip microcontroller Port type, to output end poll tax on children initialization value, configuration software system tick timer sets the system suitable clock cycle, All kinds of interfaces of setting program include communication interface parameters, and the communication interface parameters include: serial ports transmission rate, data format inspection Test code;
Program scan round step: according to the priority of the varying input signal, according to priority orders scan round Each program module;
Signal processing step: handling the input signal received, and the processing includes following any or appoints more Kind: Key dithering operation, anti-misoperation;Further, described to shake certain particular moment for referring to signal relative to its ideal time position The short-term deviation set is shake.
Signal response of step: according to the priority of the varying input signal, responder processing module is called, is responded defeated Enter signal, realizes program function.
Specifically, the pseudo- parallel real-time response design method includes:
Timer setting step: using the software systems clock timer, set optimal timing unit, rings as software The fundamental clock factor answered;
Program design step: design main program enables software main program to have carried out electrification reset, self-test and program initial After change, into a scan round structure, main program is enabled to continually scan for each input port, difference is entered according to input and priority Module still enters main program and scans after the completion of current block execution;
Pseudo- parallel real-time response realizes step: each program respond module puppet Parallel Implementation, enable each program execution module according to It executes step number and is divided into several steps, each step jumps out current sub-routine processing module immediately after being finished, and by sub- journey Sequence module currently executes step number as return value, enters major cycle later and carries out input port scanning, judges whether there is priority When higher input needs to respond: if so, then entering high priority responder entrance;Otherwise, then enter according to execution step number Current sub-routine module, performs the next step program;
Response time rate-determining steps: response time control is realized in main program, is realized in major cycle by periodically Response time control, by adjusting the fundamental clock factor and program timing time control response speed.
Non-interrupted formula provided by the invention and pseudo- parallel embedded software real-time response designing system, can be through the invention The step process of the non-interrupted formula and pseudo- parallel embedded software real-time response design method given is realized.Those skilled in the art can To be interpreted as the non-interrupted formula and pseudo- parallel embedded software real-time response design method the non-interrupted formula and puppet be parallel One preference of embedded software real-time response designing system.
A kind of non-interrupted formula provided according to the present invention and pseudo- parallel embedded software real-time response designing system, comprising:
Signal determining module: determining all input signals of embedded software, determine the priority of varying input signal with And the response time requirement of input signal;
Main-process stream drafting module: the total flow chart of drawing program;
Submodule process drafting module: it determines each submodule of program, draws the flow chart of each submodule;
Timing unit determining module: configuration software system tick timer sets optimal timing unit;
Variable-definition module: defining each global variable of program, controls each subelement according to global variable and executes entrance and go out Mouthful, the input signal of real-time response higher priority;
Programming module: according to input signal, the priority of varying input signal, the response time requirement of input signal, journey The total flow chart of sequence, the flow chart of submodule, optimal timing unit and global variable carry out software programming.
Specifically, comprising: multipriority inputs non-interrupted realization system, pseudo- parallel real-time response designing system;
The optimal timing unit is the greatest common divisor of each program timing time.
Specifically, the non-interrupted realization system of the multipriority input includes:
Program initialization module: after single-chip microcontroller electrification reset, in the input/output of program initialization part configuration single-chip microcontroller Port type, to output end poll tax on children initialization value, configuration software system tick timer sets the system suitable clock cycle, All kinds of interfaces of setting program include communication interface parameters, and the communication interface parameters include: serial ports transmission rate, data format inspection Test code;
Program scan round module: according to the priority of the varying input signal, according to priority orders scan round Each program module;
Signal processing module: handling the input signal received, and the processing includes following any or appoints more Kind: Key dithering operation, anti-misoperation;
Signal respond module: according to the priority of the varying input signal, responder processing module is called, is responded defeated Enter signal, realizes program function.
Specifically, the pseudo- parallel real-time response designing system includes:
Timer setting module: using the software systems clock timer, set optimal timing unit, rings as software The fundamental clock factor answered;
Program design module: design software main program enables software main program carry out electrification reset, self-test and program After initialization, into a scan round structure, main program is enabled to continually scan for each input port, is entered according to input and priority Disparate modules still enter main program and scan after the completion of current block execution;
Pseudo- parallel real-time response realizes module: each program respond module puppet Parallel Implementation, enable each program execution module according to It executes step number and is divided into several steps, each step jumps out current sub-routine processing module immediately after being finished, and by sub- journey Sequence module currently executes step number as return value, enters major cycle later and carries out input port scanning, judges whether there is priority When higher input needs to respond: if so, then entering high priority responder entrance;Otherwise, then enter according to execution step number Current sub-routine module, performs the next step program;
Response time control module: response time control is realized in main program, is realized in major cycle by periodically Response time control, by adjusting the fundamental clock factor and program timing time control response speed.
A kind of computer readable storage medium for being stored with computer program provided according to the present invention, the computer journey Non-interrupted formula described in any of the above embodiments and pseudo- parallel embedded software real-time response method are realized when sequence is executed by processor Step.
Below by preference, the present invention is more specifically illustrated.
Embodiment 1:
A kind of non-interrupted implementation method of multipriority input
As shown in Fig. 2, multipriority input is non-interrupted to realize that steps are as follows:
Step 1: single-chip microcontroller electrification reset carries out program initialization.After single-chip microcontroller electrification reset, in program initialization part All input/output end port types of single-chip microcontroller are configured, to output end poll tax on children initialization value, configuration software system tick timer, The setting system suitable clock cycle realizes that non-interrupted real-time response sets response time element factor to be subsequent.Setting program All kinds of interfaces include communication interface parameters, such as serial ports transmission rate, data format check code.
Step 2: program scan round is carried out.According to priority orders, each program module is scanned.Single-chip microcontroller does not operate System, therefore program scanning can only successively be carried out according to sequencing.Programmer should accurately determine the excellent of each program module First grade, and according to the order-assigned of priority from high to low into the circulation of program scanning.It is same when carrying out priority judgement Each submodule of priority should be classified as a program entry, to reduce the scan period, improve executing efficiency, enhancing program is rung Answer real-time.
Step 3: input data is received.The input data received is handled, including Key dithering, anti-error behaviour Make.Here a kind of single-chip microcontroller input signal de-jitter method is described.By being sampled three times to input signal array X [V], three Secondary sample states unanimously think that input effectively, otherwise in vain, effectively avoids maloperation.
void FreshX(void)
{
int V;
For (V=0;V<8;V++){
LastX [V]=X [V];
X3 [V]=X2 [V];
X2 [V]=X1 [V];
}
For (V=0;V<8;V++){
X [V]=(X [V] & (X1 [V] & (~X2 [V]) | X2 [V] & (~X3 [V]) | X3 [V] & (~X1 [V]))) | (X1 [V]&X2[V]&X3[V]);}
}
Step 4: according to priority, input signal is responded.According to input signal priority, responder is called to handle mould Block realizes program function.The sequencing that different priorities input responder entrance is controlled by IF, ELSE statement.
As shown in Figure 1, each software module function is clear, module is relatively independent, and the data exchange of intermodule is become by global Amount transmitting, reduces the access to local variable in module, improves software execution speed and efficiency.Below with one section of program example into Row explanation.Wherein
Embodiment 2:
A kind of pseudo- parallel real-time response design method
What example 1 illustrated is realized to the control of multipriority input and non-interrupted mode, is illustrated in example 2 pseudo- parallel Real-time response implementation method.
Step 1: being the real-time and reliability for ensuring software in software design procedure, using the software systems of single-chip microcontroller A suitable clock cycle is arranged, as the fundamental clock factor of a software responses, such as 50ms in clock timer.
Step 2: program design.Software main program is after having carried out electrification reset, self-test and program initialization, into one A scan round structure realizes that main program continually scans for each input port using While sentence, according to input and preferential grading Enter disparate modules, after the completion of waiting current blocks to execute, still enters main program and scan.
Step 3: each program respond module puppet Parallel Implementation.To realize the response of high priority real-time priority, it is impossible to wait one A low priority modular program enters back into high priority module inlet after the completion of executing and is responded, and thus loses in real time Meaning, therefore each program execution module is divided into several steps according to step number is executed, each step is jumped out immediately after being finished Current sub-routine processing module, and subroutine module is currently executed into step number as return value, it is defeated to enter major cycle progress later Inbound port scanning, when there is the higher input of priority to need to respond, into high priority responder entrance;If without more The input of high priority is requested, and is entered current sub-routine module according to step number is executed, is performed the next step program.It is this pseudo- parallel real When response need to execute step number and software timer by setting global variable, and realized by switch, case cooperation.
It gives one example and is illustrated below.Assuming that a software module such as " land and water operating condition " is made of several steps, such as Fig. 3 It is shown.Each input port of program circulating scanning system, if the system detects that then executing " land and water into " land and water operating condition " signal The first step of operating condition " subprogram, sets delay mark backed off after random, and system continues to execute system major cycle downwards;If " land and water work Condition " delay is arrived, and the second step of " land and water operating condition " subprogram is executed, and sets delay mark backed off after random;System continues to execute system downwards Major cycle.Repeatedly, until " land and water operating condition " is finished.Other operating condition executive conditions are also such.
When the delay of land and water operating condition back off timer _ Timer_Of_WaterLandStatus to after, into timer T2 Disconnected processing function, is handled and is controlled to the loop control variables such as step number S, delay variable are executed, complete each module of system Execute control and calling process.
Step 4: response time control is realized in main program.Response time control is realized by periodically in major cycle, By adjusting basic chronon and timing control response speed.
One skilled in the art will appreciate that in addition to realizing system provided by the invention in a manner of pure computer readable program code It, completely can be by the way that method and step be carried out programming in logic come so that provided by the invention other than system, device and its modules System, device and its modules are declined with logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion The form of controller etc. realizes identical program.So system provided by the invention, device and its modules may be considered that It is a kind of hardware component, and the knot that the module for realizing various programs for including in it can also be considered as in hardware component Structure;It can also will be considered as realizing the module of various functions either the software program of implementation method can be Hardware Subdivision again Structure in part.
Specific embodiments of the present invention are described above.It is to be appreciated that the invention is not limited to above-mentioned Particular implementation, those skilled in the art can make a variety of changes or modify within the scope of the claims, this not shadow Ring substantive content of the invention.In the absence of conflict, the feature in embodiments herein and embodiment can any phase Mutually combination.

Claims (9)

1. a kind of non-interrupted formula and pseudo- parallel embedded software real-time response method characterized by comprising
Signal determines step: determining all input signals of embedded software, determines the priority of varying input signal and defeated Enter the response time requirement of signal;
Main-process stream plot step: the total flow chart of drawing program;
Submodule process plot step: it determines each submodule of program, draws the flow chart of each submodule;
Timing unit determines step: configuration software system tick timer sets optimal timing unit;
Variable-definition step: defining each global variable of program, controls each subelement according to global variable and executes entrance and exit, real When respond higher priority input signal;
Programming step: total according to input signal, the priority of varying input signal, the response time requirement of input signal, program Flow chart, the flow chart of submodule, optimal timing unit and global variable carry out software programming.
2. non-interrupted formula according to claim 1 and pseudo- parallel embedded software real-time response method, which is characterized in that packet Include: multipriority inputs non-interrupted implementation method, pseudo- parallel real-time response design method;
The optimal timing unit is the greatest common divisor of each program timing time.
3. non-interrupted formula according to claim 2 and pseudo- parallel embedded software real-time response method, which is characterized in that institute Stating the non-interrupted implementation method of multipriority input includes:
Program initialization step: after single-chip microcontroller electrification reset, in the input/output end port of program initialization part configuration single-chip microcontroller Type, to output end poll tax on children initialization value, configuration software system tick timer sets system suitable clock cycle, setting All kinds of interfaces of program include communication interface parameters, and the communication interface parameters include: serial ports transmission rate, data format inspection Code;
Program scan round step: according to the priority of the varying input signal, according to each journey of priority orders scan round Sequence module;
Signal processing step: handling the input signal received, and the processing includes following any or appoints a variety of: being gone Dither operation, anti-misoperation;
Signal response of step: according to the priority of the varying input signal, responder processing module, response input letter are called Number, realize program function.
4. according to non-interrupted formula as claimed in claim 3 and pseudo- parallel embedded software real-time response method, which is characterized in that described Real-time response design method includes: puppet parallel
Timer setting step: the software systems clock timer is used, optimal timing unit is set, as software responses The fundamental clock factor;
Program design step: design main program enables software main program carry out electrification reset, self-test and program initialization Afterwards, into a scan round structure, main program is enabled to continually scan for each input port, different moulds is entered according to input and priority Block still enters main program and scans after the completion of current block execution;
Pseudo- parallel real-time response realizes step: each program respond module puppet Parallel Implementation enables each program execution module according to execution Step number is divided into several steps, each step jumps out current sub-routine processing module immediately after being finished, and by subprogram mould Block currently executes step number as return value, enters major cycle later and carries out input port scanning, it is higher to judge whether there is priority Input when needing to respond: if so, then entering high priority responder entrance;Otherwise, then enter according to execution step number current Subroutine module performs the next step program;
Response time rate-determining steps: response time control is realized in main program, realizes response by periodically in major cycle Time control, by adjusting the fundamental clock factor and program timing time control response speed.
5. a kind of non-interrupted formula and pseudo- parallel embedded software real-time response designing system characterized by comprising
Signal determining module: determining all input signals of embedded software, determines the priority of varying input signal and defeated Enter the response time requirement of signal;
Main-process stream drafting module: the total flow chart of drawing program;
Submodule process drafting module: it determines each submodule of program, draws the flow chart of each submodule;
Timing unit determining module: configuration software system tick timer sets optimal timing unit;
Variable-definition module: defining each global variable of program, controls each subelement according to global variable and executes entrance and exit, real When respond higher priority input signal;
Programming module: total according to input signal, the priority of varying input signal, the response time requirement of input signal, program Flow chart, the flow chart of submodule, optimal timing unit and global variable carry out software programming.
6. a kind of non-interrupted formula according to claim 5 and pseudo- parallel embedded software real-time response designing system, special Sign is, comprising: multipriority inputs non-interrupted realization system, pseudo- parallel real-time response designing system;
The optimal timing unit is the greatest common divisor of each program timing time.
7. non-interrupted formula according to claim 6 and pseudo- parallel embedded software real-time response designing system, feature exist In the multipriority inputs non-interrupted realization system and includes:
Program initialization module: after single-chip microcontroller electrification reset, in the input/output end port of program initialization part configuration single-chip microcontroller Type, to output end poll tax on children initialization value, configuration software system tick timer sets system suitable clock cycle, setting All kinds of interfaces of program include communication interface parameters, and the communication interface parameters include: serial ports transmission rate, data format inspection Code;
Program scan round module: according to the priority of the varying input signal, according to each journey of priority orders scan round Sequence module;
Signal processing module: handling the input signal received, and the processing includes following any or appoints a variety of: being gone Dither operation, anti-misoperation;
Signal respond module: according to the priority of the varying input signal, responder processing module, response input letter are called Number, realize program function.
8. according to non-interrupted formula as claimed in claim 7 and pseudo- parallel embedded software real-time response designing system, which is characterized in that Real-time response designing system includes: the puppet parallel
Timer setting module: the software systems clock timer is used, optimal timing unit is set, as software responses The fundamental clock factor;
Program design module: design software main program enables software main program to have carried out electrification reset, self-test and program initial After change, into a scan round structure, main program is enabled to continually scan for each input port, difference is entered according to input and priority Module still enters main program and scans after the completion of current block execution;
Pseudo- parallel real-time response realizes module: each program respond module puppet Parallel Implementation enables each program execution module according to execution Step number is divided into several steps, each step jumps out current sub-routine processing module immediately after being finished, and by subprogram mould Block currently executes step number as return value, enters major cycle later and carries out input port scanning, it is higher to judge whether there is priority Input when needing to respond: if so, then entering high priority responder entrance;Otherwise, then enter according to execution step number current Subroutine module performs the next step program;
Response time control module: response time control is realized in main program, realizes response by periodically in major cycle Time control, by adjusting the fundamental clock factor and program timing time control response speed.
9. a kind of computer readable storage medium for being stored with computer program, which is characterized in that the computer program is located Reason device realizes non-interrupted formula described in any one of Claims 1-4 and pseudo- parallel embedded software real-time response side when executing The step of method.
CN201910285280.8A 2018-12-19 2019-04-10 Non-interrupted formula and pseudo- parallel embedded software real-time response method, system and medium Pending CN109947434A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2018115583330 2018-12-19
CN201811558333.0A CN109683903A (en) 2018-12-19 2018-12-19 Multipriority, non-interrupted formula, pseudo- parallel embedded software real-time response method, system and medium

Publications (1)

Publication Number Publication Date
CN109947434A true CN109947434A (en) 2019-06-28

Family

ID=66186337

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201811558333.0A Pending CN109683903A (en) 2018-12-19 2018-12-19 Multipriority, non-interrupted formula, pseudo- parallel embedded software real-time response method, system and medium
CN201910285280.8A Pending CN109947434A (en) 2018-12-19 2019-04-10 Non-interrupted formula and pseudo- parallel embedded software real-time response method, system and medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201811558333.0A Pending CN109683903A (en) 2018-12-19 2018-12-19 Multipriority, non-interrupted formula, pseudo- parallel embedded software real-time response method, system and medium

Country Status (1)

Country Link
CN (2) CN109683903A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1409209A (en) * 2001-09-24 2003-04-09 深圳市中兴通讯股份有限公司上海第二研究所 Realizing method for multiple task real-time operation system
CN101320337A (en) * 2008-07-16 2008-12-10 北京中星微电子有限公司 Timer and its implementing method
CN102063325A (en) * 2011-01-06 2011-05-18 哈尔滨工业大学 Method for implementing multi-task real-time operating system embedded into 51 series singlechip
US20120192147A1 (en) * 2011-01-25 2012-07-26 Argen Wong Develop real time software without an RTOS
CN105204857A (en) * 2015-09-21 2015-12-30 中国船舶重工集团公司第七〇五研究所 Design method of embedded control system capable of accurately scheduling a plurality of time slices based on polling mode
CN108196950A (en) * 2018-01-24 2018-06-22 苏州大学 A kind of real time implementation operating system and its method applied to narrowband Internet of Things

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1409209A (en) * 2001-09-24 2003-04-09 深圳市中兴通讯股份有限公司上海第二研究所 Realizing method for multiple task real-time operation system
CN101320337A (en) * 2008-07-16 2008-12-10 北京中星微电子有限公司 Timer and its implementing method
CN102063325A (en) * 2011-01-06 2011-05-18 哈尔滨工业大学 Method for implementing multi-task real-time operating system embedded into 51 series singlechip
US20120192147A1 (en) * 2011-01-25 2012-07-26 Argen Wong Develop real time software without an RTOS
CN105204857A (en) * 2015-09-21 2015-12-30 中国船舶重工集团公司第七〇五研究所 Design method of embedded control system capable of accurately scheduling a plurality of time slices based on polling mode
CN108196950A (en) * 2018-01-24 2018-06-22 苏州大学 A kind of real time implementation operating system and its method applied to narrowband Internet of Things

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
EDANLEE: "单片机无操作系统 多任务 无延时架构", 《CSDN社区》 *
陈汝全,林水生: "《实用微机与单片机控制技术》", 30 November 1998, 电子科技大学出版社 *
马庆等: "《基于新信息技术的C语言程序设计基础教程》", 30 September 2018, 西安电子科技大学出版社 *

Also Published As

Publication number Publication date
CN109683903A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN101479704B (en) Programming a multi-processor system
CN108156181A (en) A kind of vulnerability detection method and its vulnerability scanning system based on the association asynchronous IO of journey
CN109254763A (en) A kind of nuclear power plant&#39;s controlling software design method based on finite state machine
Beestermoller et al. An online and offline programmable Multi-loop Controller for Distributed Systems
CN109947434A (en) Non-interrupted formula and pseudo- parallel embedded software real-time response method, system and medium
Merz et al. Control system framework for autonomous robots based on extended state machines
Vanbekbergen et al. A generalized signal transition graph model for specification of complex interfaces
Camurri et al. Petri net based process scheduling: A model of the control system of flexible manufacturing systems
CN113094260B (en) Distributed system time sequence relation modeling and simulation analysis method
Wang et al. Protocol design and performance analysis for manufacturing message specification: A Petri net approach
Freedman et al. The analysis and optimization of repetition within robot workcell sequencing problems
Zorn et al. Multiprocessing extensions in SPUR Lisp
Huang et al. Timed protocol verification for Estelle-specified protocols
Jerraya et al. Languages for system-level specification and design
CN112810990B (en) Intelligent box random opening platform
Petrellis et al. Simulating hardware, software and electromechanical parts using communicating simulators
Hennessy et al. TOMAL: A task-oriented microprocessor Applications language
Ben-Arieh et al. Concurrent modeling and simulation of reactive manufacturing systems using Petri nets
GB2308686A (en) Integrated circuits for multi-tasking support in single or multiple processor networks
Hilal et al. A reactive real-time systems modelling and programming aid tool based on the synchronous Petri nets formalism
Zuberek PETRI NETS AND TIMED PETRI NETS BASIC CONCEPTS AND PROPERTIES
Baxter et al. Mapping real-time control algorithms onto heterogeneous architectures
Hansen Concurrent Processes
Winey Data flow architecture
JPH0785122A (en) Application build-up system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190628

RJ01 Rejection of invention patent application after publication