CN108153195A - A kind of controller switching method, device, equipment and computer readable storage medium - Google Patents

A kind of controller switching method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN108153195A
CN108153195A CN201711420088.2A CN201711420088A CN108153195A CN 108153195 A CN108153195 A CN 108153195A CN 201711420088 A CN201711420088 A CN 201711420088A CN 108153195 A CN108153195 A CN 108153195A
Authority
CN
China
Prior art keywords
module
online
effective
detected
numbers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711420088.2A
Other languages
Chinese (zh)
Other versions
CN108153195B (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.)
Hangzhou Hollysys Automation Co Ltd
Original Assignee
Hangzhou Hollysys Automation 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 Hangzhou Hollysys Automation Co Ltd filed Critical Hangzhou Hollysys Automation Co Ltd
Priority to CN201711420088.2A priority Critical patent/CN108153195B/en
Publication of CN108153195A publication Critical patent/CN108153195A/en
Application granted granted Critical
Publication of CN108153195B publication Critical patent/CN108153195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output

Abstract

The invention discloses a kind of controller switching method, device, equipment and computer readable storage medium, this method to include:Detect online module number and effective AI module numbers in appointing system;Online module number and effective AI module numbers in appointing system are detected after the first prefixed time interval, if the online module number that previous ought be detected reduced the default ratio that falls sharply than last time, and/or the effective AI module numbers that previous ought be detected reduced the default ratio that falls sharply than last time, indicated the master controller in appointing system and switched mutually from controller;Otherwise, it returns and performs the step of online module number and effective AI module numbers in appointing system are detected after the first prefixed time interval.So as to avoid when there is online input/output module and/or largely offline AI modules, master controller is out of hand on offline module and then influences the situation of live safety in operation, and then the safety of live operation has been effectively ensured.

Description

A kind of controller switching method, device, equipment and computer readable storage medium
Technical field
The present invention relates to controller handoff technique field, more specifically to a kind of controller switching method, device, Equipment and computer readable storage medium.
Background technology
Include DCS (Distributed ControlSystem, the distributed AC servo system of DP main cards, DP slave stations and controller System) system at runtime, controller needs safely and effectively to control all input/output modules (abbreviation module) in scene System, it is therefore desirable to the communication state of timing detection modules and online situation.
Controller is functional " COM diagnosis ", just detects the communication state of all modules in scene and online for timing Situation.When scene all modules all break down and it is offline when, it is believed that the DP main websites of the controller and DP slave station communication failures, this When automatically switch master and slave controller and notify switch reasons, make master controller reset be reduced to slave, host be upgraded to from controller simultaneously It continues to run with.But if failure and offline has occurred in scene major part module, " COM " are detected or normal at this time, no Meet the offline conditions for diagnostics of whole modules, controller is without master-slave swap but continues to run with.In this case, currently Controller loses these offline modules control, that is, loses control to live most of place, in this way after It is safe operation nonsensical and that scene can be influenced if reforwarding row.
It is current this field skill in conclusion how to provide a kind of technical solution that live safety in operation is effectively ensured Art personnel's urgent problem to be solved.
Invention content
The object of the present invention is to provide a kind of controller switching method, device, equipment and computer readable storage medium, energy The safety of scene operation is enough effectively ensured.
To achieve these goals, the present invention provides following technical solution:
A kind of controller switching method, including:
Online module number and effective AI module numbers in appointing system are detected, wherein, online module number is online The quantity of input/output module, effective AI module numbers are the quantity of online AI modules, and the input/output module includes institute State AI modules;
Online module number and effective AI module numbers in the appointing system are detected after the first prefixed time interval, If the online module number that the online module number that previous ought be detected was detected than last time reduce it is default fall sharply ratio and/ Or the effective AI module numbers that previous ought be detected reduce the default ratio that falls sharply than effective AI module numbers that last time detects, then It determines data stream failure to occur, and indicate the master controller in the appointing system and from controller switch mutually;Otherwise, then it returns Receipt, which was passed through, detects online module number and effective AI module numbers in the appointing system after the first prefixed time interval Step.
Preferably, it detects in appointing system before online module number and effective AI module numbers, further includes:
Judge to answer whether the quantity of online input/output module is more than default total quantity in the appointing system, if It is the step of then performing online module number and effective AI module numbers in detection appointing system, if it is not, then pre- by second Judge the quantity for answering online input/output module in the appointing system whether more than default if returning and performing after time interval The step of total quantity.
Preferably, it detects in appointing system before online module number, further includes after the first prefixed time interval:
Judge whether the online module number that last time detects is more than the first default component, if it is, performing by the The step of online module number in appointing system is detected after one prefixed time interval, if it is not, then refusal is performed by first in advance If the step of online module number in appointing system is detected after time interval.
Preferably, it before effectively AI module numbers are detected in appointing system after the first prefixed time interval, further includes:
Judge whether effective AI module numbers that last time detects are more than the second default component, if it is, performing process The step of effectively AI module numbers are detected in appointing system after first prefixed time interval, if it is not, then refusal is performed by the The step of effective AI module numbers in appointing system are detected after one prefixed time interval.
Preferably, it determines after data stream failure occurs, further includes:
Whether the number that statistics recurs data stream failure reaches preset times, if it is, executing instruction the finger Determine the master controller in system and from controller switch mutually the step of, performed if it is not, then returning by the first preset time The step of online module number and effective AI module numbers in the appointing system are detected behind interval.
Preferably, online module number and effective AI module numbers in appointing system are detected, including:
Based on the online module number of the channel value of the input/output module and AI modules update state-detection and have Imitate AI module numbers.
Preferably, online module number and effective AI module numbers in appointing system are detected, including:
Online module number and effective AI moulds are detected based on the heartbeat signal of the input/output module and the AI modules Number of blocks.
A kind of controller switching device, including:
Preliminary detection module is used for:Online module number and effective AI module numbers in appointing system are detected, wherein, Wire module quantity is the quantity of online input/output module, and effective AI module numbers are the quantity of online AI modules, described Input/output module includes the AI modules;
Controller handover module, is used for:It is detected after the first prefixed time interval in the appointing system in wire module Quantity and effective AI module numbers, if the online module number that the online module number that previous ought be detected was detected than last time Reduce the default effective AI number of modules for falling sharply ratio and/or the effective AI module numbers that previous ought detect were detected than last time Amount reduces the default ratio that falls sharply, it is determined that data stream failure occurs, and indicates the master controller in the appointing system and from control Device processed switches mutually;Otherwise, then execution is returned to detect after the first prefixed time interval in the appointing system in wire module The step of quantity and effective AI module numbers.
A kind of controller switching equipment, including:
Memory, for storing computer program;
Processor realizes the step of any one of the as above controller switching method during for performing the computer program Suddenly.
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, described The step of as above any one controller switching method is realized when computer program is executed by processor.
The present invention provides a kind of controller switching method, device, equipment and computer readable storage mediums, the wherein party Method includes:Online module number and effective AI module numbers in appointing system are detected, wherein, online module number is online defeated Enter the quantity of output module, effective AI module numbers are the quantity of online AI modules, and the input/output module includes described AI modules;Online module number and effective AI module numbers in the appointing system are detected after the first prefixed time interval, If the online module number that the online module number that previous ought be detected was detected than last time reduce it is default fall sharply ratio and/ Or the effective AI module numbers that previous ought be detected reduce the default ratio that falls sharply than effective AI module numbers that last time detects, then It determines data stream failure to occur, and indicate the master controller in the appointing system and from controller switch mutually;Otherwise, then it returns Receipt, which was passed through, detects online module number and effective AI module numbers in the appointing system after the first prefixed time interval Step.In technical solution disclosed in the present application, timing detects input/output module quantity online in appointing system and AI modules Quantity, so as to judge whether online module number and/or AI module numbers have occurred relative to the corresponding number that last time detects Fall sharply, if so, think that master controller has been likely to occur failure, control master controller at this time and switch mutually from controller, it is no Then, then continue to realize detection correlation step.So as to determine to be by the off-line case of online input/output module and AI modules It is no to need switch controller, and then cutting for controller is completed when online input/output module and/or AI modules fall sharply It changes, avoids when there is online input/output module and/or largely offline AI modules, master controller loses offline module The situation of live safety in operation is controlled and then influenced, and then the safety of live operation has been effectively ensured.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of controller switching method provided in an embodiment of the present invention;
Fig. 2 is first that the detection of module presence is realized in a kind of controller switching method provided in an embodiment of the present invention The schematic diagram of kind algorithmic block;
Fig. 3 is second that the detection of module presence is realized in a kind of controller switching method provided in an embodiment of the present invention The schematic diagram of kind algorithmic block;
Fig. 4 is a kind of structure diagram of controller switching device provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, it illustrates a kind of flow chart of controller switching method provided in an embodiment of the present invention, can wrap It includes:
S11:Detect online module number and effective AI module numbers in appointing system, wherein, online module number be The quantity of the input/output module of line, effective AI module numbers are the quantity of online AI modules, and input/output module includes AI Module.
A kind of execution subject of controller switching method provided in an embodiment of the present invention can be corresponding device or equipment, And the device or equipment can be integrated in master controller, therefore a kind of controller switching method provided in an embodiment of the present invention It can be master controller to perform subject.
Wherein, DCS system includes controller, DP main cards and DP slave stations, wherein, DP main cards is are integrated in master controller respectively And from the Profibus DP main websites on the board of controller, DP slave stations are the input and output for supporting Profibus DP slave station protocols Module (referred to as " module "), DP slave stations and DP main card periodic communications, including analog input/output module and digital quantity input/ Output module etc.;AI modules are Analog input mModule, are contained in input/output module;Controller (including master controller and From controller) it is receives the input data of input/output module by the DP main card periods, and operation, right is carried out according to input data The equipment for controlling input/output module output by DP main cards afterwards;It is online input/output module in wire module, in wire module Quantity is the quantity of online input/output module, and effective AI modules are online AI modules, and effective AI module numbers are online AI modules quantity, online in the application is that it can be carried out for controller with the normal communication of DP main cards Monitoring;And the arbitrary DCS system specified can be actually needed in appointing system according to.
S12:Online module number and effective AI module numbers in appointing system are detected after the first prefixed time interval, If the online module number that the online module number that previous ought be detected was detected than last time reduce it is default fall sharply ratio and/ Or the effective AI module numbers that previous ought be detected reduce the default ratio that falls sharply than effective AI module numbers that last time detects, then It determines data stream failure to occur, and indicate the master controller in appointing system and from controller switch mutually;Otherwise, then it returns and holds Passed through after the first prefixed time interval online module number and effective AI module numbers in detection appointing system the step of.
Wherein, the first prefixed time interval can be set according to actual needs, such as 4 seconds, so as to default based on first Time interval realizes that the timing to module number online in appointing system and effective AI module numbers detects, i.e., default every first Time interval then detects online module number and effective AI module numbers in an appointing system.It is default fall sharply ratio can basis Actual needs is set, and the online module number that previous ought be detected and the last online module number detected are carried out It compares, and effective AI module numbers that the effective AI module numbers that previous ought be detected are detected with the last time are compared, If it is that the online module number that previous ought be detected is reduced in advance than the online module number that last time detects to compare acquired results If the ratio that falls sharply and/or the effective AI module numbers that previous ought be detected are reduced than effective AI module numbers that last time detects The default ratio that falls sharply, it is determined that input/output module and effective AI modules have occurred largely offline within a short period of time, it is believed that The DP main cards of master controller and DP slave station Communications failures, the at this time master slave mode of automatic switching controller.Otherwise, then it is assumed that master control Device processed is normal operating conditions, and returns to execution detection correlation step, so as to ensure that for each input/output module and have Imitate the presence monitoring of AI modules.In addition, master controller and switching oneself state mutually from controller as master controller It is reduced to from controller and completes should being completed from controller for task after performing reset, and master control is upgraded to from controller by oneself state Device processed continues to run with to complete the task that master controller should be completed.
It should be noted that can be extraneous spare interface, so that the external world can pass through according to live actual demand The interface modifies to the default ratio (FP) that falls sharply.
In technical solution disclosed in the present application, timing detects input/output module quantity online in appointing system and AI moulds Number of blocks, so as to judge whether online module number and/or AI module numbers occur relative to the corresponding number that last time detects Fall sharply, if so, think that master controller has been likely to occur failure, control master controller at this time and switch mutually from controller, Otherwise, then continue to realize detection correlation step.So as to be determined by the off-line case of online input/output module and AI modules Switch controller whether is needed, and then controller is completed when online input/output module and/or AI modules fall sharply Switching is avoided when there is online input/output module and/or largely offline AI modules, master controller is to offline module mistake The situation of live safety in operation is gone to control and then influenced, and then the safety of live operation has been effectively ensured.
In addition to above-mentioned technical proposal disclosed in the present application is effectively realized, in detection appointing system every time in wire module The quantitative value this time detected can also be preserved after quantity and effective AI module numbers.
A kind of controller switching method provided in an embodiment of the present invention detects in appointing system online module number and effectively Before AI module numbers, it can also include:
Judge to answer whether the quantity of online input/output module is more than default total quantity in the appointing system, if It is the step of then performing online module number and effective AI module numbers in detection appointing system, if it is not, then pre- by second Judge the quantity for answering online input/output module in the appointing system whether more than default if returning and performing after time interval The step of total quantity.
Wherein, the second prefixed time interval can be set according to actual needs, such as 4 seconds;Default total quantity can root It is set according to the actual conditions of DCS system, such as can be set as 12.If online input/output module is answered in appointing system Quantity is very few, then an input/output module may occur and/or the offline of effective AI modules can reach corresponding preset Fall sharply ratio, is unreasonable in this way, therefore online mould when answering online input/output module quantity very few in appointing system The detection of number of blocks and effective AI module numbers and follow-up judge it is nonsensical, therefore when should in appointing system in the application When the quantity of online input/output module is not more than default total quantity, then it is assumed that answer online input/output module quantity very few, The size for judging to answer online input/output module quantity and default total quantity is then returned again to after the second prefixed time interval Relationship, otherwise, then realize in the application wire module and effective AI modules detection and follow-up judgment step, so as to avoid money Source waste and erroneous judgement and so on.
A kind of controller switching method provided in an embodiment of the present invention detects specified system after the first prefixed time interval In system before online module number, it can also include:
Judge whether the online module number that last time detects is more than the first default component, if it is, performing by the The step of online module number in appointing system is detected after one prefixed time interval, if it is not, then refusal is performed by first in advance If the step of online module number in appointing system is detected after time interval.
Wherein, the first default component can be identical with default total quantity, can also be slightly less than default total quantity, specifically can be with It sets according to actual needs.If the online module number that last time detects is very few, one may occur when previous detection The offline of input/output module can reach the corresponding default ratio that falls sharply, and be unreasonable in this way, therefore in appointing system The detection of online module number and follow-up judgement are nonsensical when the online module number that last time detects is very few, therefore this In application when the online module number that last time detects is not more than the first default component, then it is assumed that the online mould that last time detects Number of blocks is very few, then refuses to detect online module number;Otherwise, then detection and the subsequent step of online module number are realized, from And effectively prevent the wasting of resources and erroneous judgement.
A kind of controller switching method provided in an embodiment of the present invention detects specified system after the first prefixed time interval In system before effective AI module numbers, it can also include:
Judge whether effective AI module numbers that last time detects are more than the second default component, if it is, performing process The step of effectively AI module numbers are detected in appointing system after first prefixed time interval, if it is not, then refusal is performed by the The step of effective AI module numbers in appointing system are detected after one prefixed time interval.
Wherein, the second default component is generally less than default total quantity, and such as default total quantity is 12, and the second default component can be with It is 6, can specifically sets according to actual needs.If effective AI module numbers that last time detects are very few, may work as previous The offline of AI modules occurs during detection and can reach the corresponding default ratio that falls sharply, is unreasonable in this way, therefore referring to Determine effective AI module numbers that last time in system detects it is very few when effective AI module numbers detection and follow-up judge it is not have Meaning, therefore in the application when effective AI module numbers that last time detects are not more than the second default component, then it is assumed that on The secondary effective AI module numbers detected are very few, then refuse to detect effective AI module numbers;Otherwise, then effective AI number of modules is realized The detection of amount and subsequent step, so as to effectively prevent the wasting of resources and erroneous judgement.
Above-mentioned technical proposal disclosed in the present application flexibly and effectively solves part of module and offline this scene of failure occurs Application so that controller failure diagnostic function is more perfect, and so as to be completely covered, live whole modules are offline and part of module The application of both offline scenes, so that operation more safe and reasonable of the controller to the module at scene, so that control The operating mechanism of device processed is more safe and reliable.
A kind of controller switching method provided in an embodiment of the present invention is determined after data stream failure occurs, can also be wrapped It includes:
Whether the number that statistics recurs data stream failure reaches preset times, if it is, executing instruction the finger Determine the master controller in system and from controller switch mutually the step of, performed if it is not, then returning by the first preset time The step of online module number and effective AI module numbers in the appointing system are detected behind interval.
Wherein, preset times can be set according to actual needs, and such as 3.If recurring data flow in the application The number of failure reaches preset times, then controls master controller and switch mutually from controller, otherwise, then continues to realize online mould The detection of number of blocks and effective AI module numbers and follow-up the step of judging.So as to avoid mistake occur in one-time detection leading It causes erroneous judgement and then switches the situation of master-slave controller, but master controller is realized again after repeatedly determining that data stream failure occurs And from the switching between controller, and then it ensure that the validity and accuracy of controller switching.
A kind of controller switching method provided in an embodiment of the present invention detects in appointing system online module number and effectively AI module numbers can include:
Based on the online module number of the channel value of the input/output module and AI modules update state-detection and have Imitate AI module numbers.
The online module number of state-detection and effective AI modules are updated based on the channel value of input/output module and AI modules Quantity, can be detection input/output module and AI modules present count (can set according to actual needs, such as 2) a channel it is logical Whether road value had data brush before current time, in current time preset certain period of time (such as 4 seconds) Newly, if it is think that respective modules are online, and then the quantity for counting online input/output module and AI modules is corresponded to Online module number and effective AI module numbers, if otherwise it is assumed that respective modules are offline.It is achieved thereby that module presence Accurate detection.
Specifically, it realizes online based on the channel value of the input/output module and AI modules update state-detection The algorithmic block of module number and effective AI module numbers can be with as shown in Fig. 2, each pin defines as shown in table 1 in the algorithmic block.
Table 1
The realization principle of the algorithmic block:Effective AI module numbers are obtained by ARR_MAR and ARR_ON and all inputs are defeated Go out the presence of module, the online quantity of module can be obtained by input/output module presence;Last time effective AI modules The presence of quantity and all input/output modules can be all stored in inside algorithmic block, pass through the effective AI that previous ought be detected Module number and/or online module number and the default ratio FP that falls sharply judge whether to need into the master and slave switching of line control unit, And export result SWITCH.
A kind of controller switching method provided in an embodiment of the present invention detects in appointing system online module number and effectively AI module numbers can include:
Online module number and effective AI moulds are detected based on the heartbeat signal of the input/output module and the AI modules Number of blocks.
Online module number and effective AI moulds are detected based on the heartbeat signal of the input/output module and the AI modules Number of blocks, can be detection before current time, in the current time preset certain period of time (such as 4 seconds) whether The heartbeat signal that input/output module and AI modules are sent is received, if it is thinks that respective modules are online, and then is counted The input/output module of line and the quantity of AI modules obtain corresponding to online module number and effective AI module numbers, if otherwise recognized It is offline for respective modules.It is achieved thereby that the accurate detection of module presence.
Specifically, it realizes and online number of modules is detected based on the heartbeat signal of the input/output module and the AI modules Amount and the effectively algorithmic block of AI module numbers can be with as shown in figure 3, each pin define as shown in table 2 in the algorithmic block.
Table 2
The realization principle of the algorithmic block:The heartbeat signal of all modules is obtained by K_BEAT, passes through module heartbeat signal It can obtain the online quantity of module;The heartbeat signal of last time all modules can be all stored in inside algorithmic block, previous by working as The heartbeat signal of all modules and the default ratio FP that falls sharply judge whether to need into the master and slave switching of line control unit, and export knot Fruit SWITCH.
It should be noted that it can be by setting data that master controller is indicated in the application and is switched mutually from controller Stream failure corresponds to switching mark and realizes that (switching mark can be by setting the value of SWITCH in table 1 and table 2 to realize, i.e. SWITCH Explanation configured switching mark, is otherwise then not provided with switching mark when being worth for TRUE), specifically, when judging to compare institute It is that the online module number that previous ought be detected reduces the default ratio that falls sharply than the online module number that last time detects to obtain result, And/or the effective AI module numbers that previous ought be detected reduce the default ratio that falls sharply than effective AI module numbers that last time detects Example then sets switching mark, and master controller can once be cut with every by preset time interval (such as 100 milliseconds) reading Dehorn will, and reset and be reduced to from controller when continuous preset times time read switching mark, and notify to switch from controller Data stream failure has occurred in reason;Master controller is upgraded to after receiving notice from controller, if also sent out at this time from controller Data stream failure or COM failures have been given birth to, then has no longer carried out master controller and from the switching between controller, prevents principal and subordinate The phenomenon that pingpang handoff, until determining that master controller does not have failure, health completely, could carry out master-slave swap again.
The embodiment of the present invention additionally provides a kind of controller switching device, as shown in figure 4, can include:
Preliminary detection module 11, is used for:Online module number and effective AI module numbers in appointing system are detected, wherein, Quantity of the online module number for online input/output module, quantity of effective AI module numbers for online AI modules, institute It states input/output module and includes the AI modules;
Controller handover module 12, is used for:Online mould in the appointing system is detected after the first prefixed time interval Number of blocks and effective AI module numbers, if the online number of modules that the online module number that previous ought be detected was detected than last time Amount reduces the default effective AI modules for falling sharply ratio and/or the effective AI module numbers that previous ought detect were detected than last time Quantity reduces the default ratio that falls sharply, it is determined that data stream failure occurs, and indicate the master controller in the appointing system and from Controller switches mutually;Otherwise, then it returns to execution and online mould in the appointing system is detected after the first prefixed time interval The step of number of blocks and effective AI module numbers.
A kind of controller switching device provided in an embodiment of the present invention can be by the algorithmic block that is set to inside controller Realize, algorithmic block to be write using structured text language (ST language), by function be packaged into input/output interface can Depending on changing graphical interfaces, it is used to implement the procedure set of certain specific function.Certainly other settings can also be carried out according to actual needs, Within protection scope of the present invention.
A kind of controller switching device provided in an embodiment of the present invention, can also include:
First judgment module, is used for:It detects in appointing system before online module number and effective AI module numbers, judges Answer whether the quantity of online input/output module is more than default total quantity in the appointing system, if it is, instruction performs The step of detecting online module number and effective AI module numbers in appointing system, if it is not, then by between the second preset time It is performed every rear return and judges whether the quantity that online input/output module is answered in the appointing system is more than default total quantity Step.
A kind of controller switching device provided in an embodiment of the present invention, can also include:
Second judgment module, is used for:Detected after the first prefixed time interval in appointing system online module number it Before, judge whether the online module number that last time detects is more than the first default component, if it is, instruction is performed by first The step of online module number in appointing system is detected after prefixed time interval, presets if it is not, then refusal is performed by first The step of online module number in appointing system is detected after time interval.
A kind of controller switching device provided in an embodiment of the present invention, can also include:
Third judgment module, is used for:Effective AI module numbers in appointing system are detected after the first prefixed time interval Before, judge whether effective AI module numbers that last time detects are more than the second default component, if it is, instruction performs process The step of effectively AI module numbers are detected in appointing system after first prefixed time interval, if it is not, then refusal is performed by the The step of effective AI module numbers in appointing system are detected after one prefixed time interval.
A kind of controller switching device provided in an embodiment of the present invention, can also include:
4th judgment module, is used for:It determines after data stream failure occurs, statistics recurs the number of data stream failure Whether preset times are reached, if it is, instruction executes instruction master controller in the appointing system and mutual from controller The step of switching, is detected in the appointing system in wire module if it is not, then instruction is performed after the first prefixed time interval The step of quantity and effective AI module numbers.
A kind of controller switching device provided in an embodiment of the present invention, the preliminary detection module and controller handover module It may each comprise:
First detection unit is used for:It is examined based on the channel value more new state of the input/output module and the AI modules Survey online module number and effective AI module numbers.
A kind of controller switching device provided in an embodiment of the present invention, the preliminary detection module and controller handover module It may each comprise:
Second detection unit is used for:It is online based on the detection of the heartbeat signal of the input/output module and the AI modules Module number and effective AI module numbers.
The embodiment of the present invention additionally provides a kind of controller switching equipment, can include:
Memory, for storing computer program;
Processor realizes the step of any one of the as above controller switching method during for performing the computer program Suddenly.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, is deposited on the computer readable storage medium Computer program is contained, the as above any one controller switching side can be realized when the computer program is executed by processor The step of method.
Dependent part in a kind of controller switching device provided in an embodiment of the present invention, equipment and computer readable storage medium The explanation divided refers to the detailed description of corresponding part in a kind of controller switching method provided in an embodiment of the present invention, herein not It repeats again.In addition with corresponding to technical solution realization principle one in the prior art in above-mentioned technical proposal provided in an embodiment of the present invention The part of cause is simultaneously unspecified, in order to avoid excessively repeat.
The foregoing description of the disclosed embodiments enables those skilled in the art to realize or use the present invention.To this A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited The embodiments shown herein is formed on, and is to fit to consistent with the principles and novel features disclosed herein most wide Range.

Claims (10)

1. a kind of controller switching method, which is characterized in that including:
Online module number and effective AI module numbers in appointing system are detected, wherein, online module number is online input The quantity of output module, effective AI module numbers are the quantity of online AI modules, and the input/output module includes the AI Module;
Online module number and effective AI module numbers in the appointing system are detected after the first prefixed time interval, if Ratio and/or work as when the online module number that the previous online module number detected was detected than last time reduces default fall sharply The previous effective AI module numbers detected reduce the default ratio that falls sharply than effective AI module numbers that last time detects, it is determined that Data stream failure occurs, and indicates the master controller in the appointing system and switches mutually from controller;Otherwise, then it returns and holds It passed through the step of online module number and effective AI module numbers in the appointing system are detected after the first prefixed time interval.
2. according to the method described in claim 1, it is characterized in that, detect online module number and effective AI moulds in appointing system Before number of blocks, further include:
Judge to answer whether the quantity of online input/output module is more than default total quantity in the appointing system, if it is, The step of performing online module number and effective AI module numbers in detection appointing system, if it is not, then by second it is default when Between be spaced after return perform judge to answer in the appointing system online input/output module quantity whether be more than it is default total The step of amount.
3. it according to the method described in claim 2, it is characterized in that, is detected in appointing system after the first prefixed time interval Before online module number, further include:
Judge whether the online module number that last time detects is more than the first default component, if it is, performing pre- by first If after time interval detect appointing system in online module number the step of, if it is not, then refusal perform by first it is default when Between be spaced after detection appointing system in online module number the step of.
4. it according to the method described in claim 3, it is characterized in that, is detected in appointing system after the first prefixed time interval Before effective AI module numbers, further include:
Judge whether effective AI module numbers that last time detects are more than the second default component, if it is, performing by first The step of effective AI module numbers in appointing system are detected after prefixed time interval, if it is not, then refusal execution is pre- by first If the step of effective AI module numbers in appointing system are detected after time interval.
5. according to the method described in claim 1, it is characterized in that, after determining generation data stream failure, further include:
Whether the number that statistics recurs data stream failure reaches preset times, if it is, executing instruction the specified system Master controller in system and from controller switch mutually the step of, performed if it is not, then returning by the first prefixed time interval After the step of detecting online module number and effective AI module numbers in the appointing system.
6. according to the method described in claim 1, it is characterized in that, detect online module number and effective AI moulds in appointing system Number of blocks, including:
The online module number of state-detection and effective AI are updated based on the channel value of the input/output module and the AI modules Module number.
7. according to the method described in claim 1, it is characterized in that, detect online module number and effective AI moulds in appointing system Number of blocks, including:
Online module number and effective AI number of modules are detected based on the heartbeat signal of the input/output module and the AI modules Amount.
8. a kind of controller switching device, which is characterized in that including:
Preliminary detection module is used for:Online module number and effective AI module numbers in appointing system are detected, wherein, online mould Quantity of the number of blocks for online input/output module, quantity of effective AI module numbers for online AI modules, the input Output module includes the AI modules;
Controller handover module, is used for:Online module number in the appointing system is detected after the first prefixed time interval And effective AI module numbers, if the online module number that previous ought be detected is reduced than the online module number that last time detects It is default to fall sharply ratio and/or the effective AI module numbers that previous detect subtract than effective AI module numbers that last time detects Few default ratio that falls sharply, it is determined that data stream failure occurs, and indicates the master controller in the appointing system and from controller Switching mutually;Otherwise, then it returns to execution and online module number in the appointing system is detected after the first prefixed time interval And effectively AI module numbers the step of.
9. a kind of controller switching equipment, which is characterized in that including:
Memory, for storing computer program;
Processor realizes the controller switching method as described in any one of claim 1 to 7 during for performing the computer program The step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, realizing the controller switching method as described in any one of claim 1 to 7 when the computer program is executed by processor Step.
CN201711420088.2A 2017-12-25 2017-12-25 Controller switching method, device, equipment and computer readable storage medium Active CN108153195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711420088.2A CN108153195B (en) 2017-12-25 2017-12-25 Controller switching method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711420088.2A CN108153195B (en) 2017-12-25 2017-12-25 Controller switching method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108153195A true CN108153195A (en) 2018-06-12
CN108153195B CN108153195B (en) 2020-11-27

Family

ID=62465661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711420088.2A Active CN108153195B (en) 2017-12-25 2017-12-25 Controller switching method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108153195B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1811640A (en) * 2006-01-19 2006-08-02 吴胜华 Collecting and distributing large capacity field high-speed real-time redundance communicating method and system thereof
CN102361106A (en) * 2011-09-07 2012-02-22 航天科工深圳(集团)有限公司 Storage battery temperature adjusting system
CN103455005A (en) * 2013-09-06 2013-12-18 北京四方继保自动化股份有限公司 Controller redundancy and switching method
CN104571041A (en) * 2014-12-31 2015-04-29 重庆川仪自动化股份有限公司 Data synchronization method based on 1:1 controller redundancies
CN104714406A (en) * 2014-12-31 2015-06-17 重庆川仪自动化股份有限公司 Redundancy switching method of input and output module
CN205003224U (en) * 2015-09-02 2016-01-27 中国南方电网有限责任公司调峰调频发电公司天生桥水力发电总厂 500kV owner becomes dc magnetic biasing data and keeps watch on collection system on line
CN105278516A (en) * 2014-06-24 2016-01-27 南京理工大学 Double-redundancy switch value PLC control system reliable fault-tolerant controller realization method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1811640A (en) * 2006-01-19 2006-08-02 吴胜华 Collecting and distributing large capacity field high-speed real-time redundance communicating method and system thereof
CN102361106A (en) * 2011-09-07 2012-02-22 航天科工深圳(集团)有限公司 Storage battery temperature adjusting system
CN103455005A (en) * 2013-09-06 2013-12-18 北京四方继保自动化股份有限公司 Controller redundancy and switching method
CN105278516A (en) * 2014-06-24 2016-01-27 南京理工大学 Double-redundancy switch value PLC control system reliable fault-tolerant controller realization method
CN104571041A (en) * 2014-12-31 2015-04-29 重庆川仪自动化股份有限公司 Data synchronization method based on 1:1 controller redundancies
CN104714406A (en) * 2014-12-31 2015-06-17 重庆川仪自动化股份有限公司 Redundancy switching method of input and output module
CN205003224U (en) * 2015-09-02 2016-01-27 中国南方电网有限责任公司调峰调频发电公司天生桥水力发电总厂 500kV owner becomes dc magnetic biasing data and keeps watch on collection system on line

Also Published As

Publication number Publication date
CN108153195B (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN103647781B (en) Mixed redundancy programmable control system based on equipment redundancy and network redundancy
CN101807076B (en) Duplication redundancy fault-tolerant high-reliability control system having synergistic warm standby function based on PROFIBUS field bus
CN104714406B (en) Input/output module redundancy switching method
CN104570721B (en) Redundant manipulator master slave mode determines method
CN102033141B (en) Test system based on CAN (Controller Area Network) bus automobile instrument and method
CN105974879A (en) Redundancy control equipment of digital instrument control system, digital instrument control system and control method
CN103680655B (en) Nuclear plant digital I&C system default value method to set up and system
CN107505883B (en) High-reliability dual-redundancy integrated control module based on microcontroller
CN108259227A (en) A kind of method of data synchronization of two-node cluster hot backup interlock system
CN115913906A (en) Redundancy control system and method for ship
CN109484474A (en) EPS control module and its control system and control method
CN108153195A (en) A kind of controller switching method, device, equipment and computer readable storage medium
CN102611600B (en) Method and device for locating short circuit position of CAN (Controller Area Network) network
CN102216909A (en) A network processor and a diagnostic method of procedures stored in the network process
CN111688762B (en) Reverse cutting method and device for urban rail interlocking control display
CN106597944B (en) A kind of two CSTR controller seamless switch-over system and switching method
CN102255760A (en) Quick protection switching method with business cards backing up each other
CN105201808A (en) Pump controller, PLC platform and sea water desalting plant
CN105068597B (en) A kind of redundant transmission method and system of pulse signal
JP4247791B2 (en) Ensuring maximum reaction time for complex or distributed safety and / or non-safety systems
KR20130129566A (en) Apparatus and method for monitoring for plc system
CN111891192A (en) Train overspeed protection equipment, control method and dual-machine hot standby system
CN110413480A (en) Processing method and processing device for robot operating status
CN111324492B (en) Diagnosis and switching method and device under redundant host link collision mode
CN110035007A (en) Data transmission method and system, storage medium, electronic device

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
GR01 Patent grant
GR01 Patent grant