Programmable Logic Controller redundancy control method and system
Technical field
The present invention relates to industrial control field, in particular to a kind of Programmable Logic Controller redundancy control method be
System.
Background technology
With the annual increase year by year to the demand with higher reliability system product, Programmable Logic Controller (plc,
Programmable logic controller) as industrial control field one of major control product, development has redundancy feature
Plc become one of important developing direction.
The redundant fashion that existing Programmable Logic Controller plc is adopted mainly includes in the following manner:
1) individually for the redundancy of processor, traditional processor redundancy, generally adopt two processors, by special superfluous
Waste heat to realize the data syn-chronization after switching for module, this mode only for processor, for the miscellaneous part in plc not
Make rational redundant configuration;
2) individually for the redundancy of i/o board, generally adopt machine cage redundancy, wherein, machine cage is for placing each plc
The substrate of board, each board is placed in the different mounting groove of frame in sequence, uses Bussing connector between board
Connect.When a certain board in mounting groove breaks down, need using during standby redundancy it is necessary to switch whole machine cage simultaneously.False
If containing ai, di, ao three types board in current machine cage a, it is its redundancy board in machine cage b, containing complete with machine cage a
Same type board.When in machine cage a, board is to run board, the board in machine cage b is standby board, when in machine cage a
During ai card failure, then can integrally be switched to the standby board in machine cage b at once, the standby board in machine cage b after switching using as
Run board;And during di card failure in machine cage b, then cannot switch back to machine cage a and utilize di card in machine cage a so that whole i/o
Board has to quit work.The active/standby switching control mode of this employing machine cage, itself haves the shortcomings that extension is inconvenient,
And this mode also haves the shortcomings that active/standby switching interferes so that the reliability of active/standby switching reduces.
For above-mentioned problem, effective solution is not yet proposed at present.
Content of the invention
Embodiments provide a kind of Programmable Logic Controller redundancy control method and system, at least to solve existing skill
The relatively low technical problem of redundant fashion reliability employed in art.
A kind of one side according to embodiments of the present invention, there is provided Programmable Logic Controller redundancy control method, comprising: sentence
Whether disconnected primary processor and/or main bus break down, and wherein, above-mentioned primary processor is to should have standby processor, above-mentioned main bus
To should have standby bus;If above-mentioned primary processor breaks down, above-mentioned primary processor is switched to above-mentioned standby processor so that cutting
The i/o equipment being communicated with above-mentioned primary processor by above-mentioned main bus before changing passes through above-mentioned main bus and above-mentioned standby place after handover
Reason device communication;If above-mentioned main bus breaks down, above-mentioned main bus is switched to above-mentioned standby bus so that passing through upper before switching
State the above-mentioned primary processor that main bus is in communication with each other and above-mentioned i/o equipment is communicated by above-mentioned standby bus after handover;If
Above-mentioned primary processor and above-mentioned main bus all break down, then above-mentioned primary processor is switched to above-mentioned standby processor, and will be upper
State main bus and switch to above-mentioned standby bus so that the above-mentioned i/o that communicates with above-mentioned primary processor by above-mentioned main bus before switching
Equipment is after handover by above-mentioned standby bus and above-mentioned standby processor communication.
Alternatively, above-mentioned i/o equipment includes main i/o equipment and standby i/o equipment, wherein, is judging primary processor and/or master
When whether bus breaks down, also include: judge whether above-mentioned main i/o equipment breaks down;If event in above-mentioned main i/o equipment
Barrier, then switch to above-mentioned standby i/o equipment so that setting with above-mentioned main i/o by above-mentioned main bus before switching by above-mentioned main i/o equipment
The above-mentioned primary processor of standby communication is after handover by above-mentioned main bus and above-mentioned standby i/o equipment communication.
Alternatively, after judging whether above-mentioned main i/o equipment breaks down, also include: if above-mentioned primary processor and upper
State main i/o equipment to break down, then above-mentioned primary processor is switched to above-mentioned standby processor, and above-mentioned main i/o equipment is switched
To above-mentioned standby i/o equipment so that before switching the above-mentioned master for making above-mentioned primary processor and above-mentioned main i/o equipment is communicated total
Line makes above-mentioned standby processor and above-mentioned standby i/o equipment be communicated after handover;If above-mentioned main bus and above-mentioned main i/o equipment go out
Existing fault, then switch to above-mentioned standby bus by above-mentioned main bus, above-mentioned main i/o equipment is switched to above-mentioned standby i/o equipment so that
Before switching by the above-mentioned primary processor of above-mentioned main bus and above-mentioned main i/o equipment communication pass through after handover above-mentioned for bus and
Above-mentioned standby i/o equipment communication;If above-mentioned primary processor, above-mentioned main bus and above-mentioned main i/o equipment all break down, will be above-mentioned
Primary processor switches to above-mentioned standby processor, above-mentioned main bus is switched to above-mentioned standby bus, above-mentioned main i/o equipment is switched to
Above-mentioned standby i/o equipment passes through the logical of above-mentioned main bus and above-mentioned main i/o equipment so that interrupting above-mentioned primary processor after handover
Letter, and so that above-mentioned standby processor is communicated with above-mentioned standby i/o equipment by above-mentioned standby bus after handover.
Alternatively, above-mentioned judge above-mentioned main i/o equipment whether break down including: above-mentioned standby i/o equipment detects for referring to
Show whether the indication signal of the running status of above-mentioned main i/o equipment exception;If above-mentioned indication signal is detected and occurring extremely,
Above-mentioned main i/o equipment is then controlled to switch to above-mentioned standby i/o equipment.
Alternatively, above-mentioned main bus is switched to above-mentioned standby bus to include: judge above-mentioned primary processor or above-mentioned standby process
The mark of above-mentioned main bus or the mark of above-mentioned standby bus is comprised in device received data;If judging to comprise above-mentioned
The mark of standby bus, then switch to above-mentioned standby bus by above-mentioned main bus.
Alternatively, above-mentioned above-mentioned primary processor is switched to above-mentioned standby processor include: above-mentioned standby processor detects and is used for
Indicate whether the indication signal of the running status of above-mentioned primary processor exception;If it is different above-mentioned indication signal appearance is detected
Often, then above-mentioned primary processor is controlled to switch to above-mentioned standby processor.
Other side according to embodiments of the present invention, additionally provides a kind of Programmable Logic Controller redundancy control system, bag
Include: primary processor, it is arranged to be connected respectively with main bus and standby bus;Standby processor, be arranged to above-mentioned main bus and
Above-mentioned standby bus connects respectively, and is connected with above-mentioned primary processor;Main bus, is arranged to be connected with i/o equipment;Standby bus,
It is arranged to be connected with above-mentioned i/o equipment;Wherein, above-mentioned primary processor and above-mentioned standby processor backup each other, above-mentioned main bus
Backup each other with above-mentioned standby bus.
Alternatively, said system also includes: above-mentioned i/o equipment, and wherein, above-mentioned i/o equipment includes: main i/o equipment, is set
It is set to and be connected respectively with above-mentioned main bus and above-mentioned standby bus;And/or, standby i/o equipment, be arranged to above-mentioned main bus and on
State standby bus to connect respectively, and be connected with above-mentioned main i/o equipment;Wherein, above-mentioned main i/o equipment is with above-mentioned standby i/o equipment each other
Backup.
Alternatively, above-mentioned primary processor includes: the first central control processor, is arranged to be connected control with an i/o
Circuit connects;An above-mentioned i/o connects control circuit, is arranged to be connected with above-mentioned main bus and above-mentioned standby bus, for controlling
System selects above-mentioned main bus or above-mentioned standby bus to be communicated with above-mentioned i/o equipment;Above-mentioned standby processor includes: the control of the second central authorities
Processor processed, is arranged to be connected control circuit connection with the 2nd i/o;Above-mentioned 2nd i/o connect control circuit, be arranged to
Above-mentioned main bus and above-mentioned standby bus connect, and enter with above-mentioned i/o equipment for the above-mentioned main bus of control selections or above-mentioned standby bus
Row communication.
Alternatively, above-mentioned primary processor includes: the first communication interface, is arranged to be connected with above-mentioned standby processor, uses
In the indication signal sending the running status indicating above-mentioned primary processor to above-mentioned standby processor;Above-mentioned standby processor includes:
Second communication interface, is arranged to be connected with above-mentioned primary processor, for receiving the running status indicating above-mentioned primary processor
Indication signal;First detection means, is arranged to be connected with above-mentioned second communication interface, for detecting the above-mentioned main place of above-mentioned instruction
Whether the indication signal of the running status of reason device exception.
Alternatively, above-mentioned main i/o equipment includes: third communication interface, is arranged to be connected with above-mentioned standby i/o equipment, uses
In the indication signal sending the running status indicating above-mentioned main i/o equipment to above-mentioned standby i/o equipment;Above-mentioned standby i/o equipment includes:
Fourth communication interface, is arranged to be connected with above-mentioned main i/o equipment, for receiving the running status indicating above-mentioned main i/o equipment
Indication signal;Second detection device, is arranged to be connected with above-mentioned fourth communication interface, for detecting the above-mentioned master of above-mentioned instruction
Whether the indication signal of the running status of i/o equipment exception.
Alternatively, above-mentioned main i/o equipment and above-mentioned standby i/o equipment are located at same substrate.
In embodiments of the present invention, active/standby by being respectively provided with the processor in Programmable Logic Controller, bus, i/o equipment
Two equipment, overcome in prior art just for specifically individually module or whole system carry out what redundancy setting was led to
The relatively low technical problem of reliability is so that whole system breaks down in single module, or event in operational blocks which partition system combination
During barrier, all may be implemented under the premise of not affecting other kinds of module, carry out no-harass switch, reached and flexibly switched based on module
Purpose, it is achieved thereby that improving the technique effect of system reliability, and then solve redundancy side used in the prior art
The relatively low technical problem of formula reliability.
Brief description
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this
Bright schematic description and description is used for explaining the present invention, does not constitute inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of a kind of optional Programmable Logic Controller redundancy switching according to embodiments of the present invention;
Fig. 2 is the schematic diagram of another kind of optional Programmable Logic Controller redundancy switching according to embodiments of the present invention;
Fig. 3 is the schematic diagram of according to embodiments of the present invention another optional Programmable Logic Controller redundancy switching;
Fig. 4 is the schematic diagram of according to embodiments of the present invention another optional Programmable Logic Controller redundancy switching;
Fig. 5 is the schematic diagram of according to embodiments of the present invention another optional Programmable Logic Controller redundancy switching;
Fig. 6 is the schematic diagram of a kind of optional Programmable Logic Controller redundancy switched system according to embodiments of the present invention;With
And
Fig. 7 is the schematic diagram of another kind of optional Programmable Logic Controller redundancy switched system according to embodiments of the present invention.
Specific embodiment
To describe the present invention in detail below with reference to accompanying drawing and in conjunction with the embodiments.It should be noted that not conflicting
In the case of, the embodiment in the application and the feature in embodiment can be mutually combined.
Embodiment 1
According to embodiments of the present invention, there is provided a kind of Programmable Logic Controller redundancy control method, the method includes:
S1, judges whether primary processor and/or main bus break down;
Alternatively, in the present embodiment above-mentioned Programmable Logic Controller redundancy control method can be, but not limited to be applied to medium-sized
Mixing Programmable Logic Controller (plc, programmable logic controller).Alternatively, main place in the present embodiment
To should have standby processor, to should have standby bus, main i/o equipment is to should have standby i/o equipment for main bus for reason device.In conjunction with shown in Fig. 1,
The system being used for implementing above-mentioned Programmable Logic Controller redundancy control method in the present embodiment includes primary processor cpu module_
1st, standby processor cpu module_2, switch switch1, switch2, main bus sys_net1, standby bus sys_net2, with
And main i/o equipment i/o module1, standby i/o equipment i/o module2.
Alternatively, primary processor in the present embodiment and standby processor can be, but not limited to by rs232 bus or with
Too net and third party device communication, transfer data to data-centric.Alternatively, primary processor in the present embodiment or standby
Processor can include but is not limited to: central control processor (cpu), and i/o connects control circuit.Wherein, cpu can but not
It is limited to execute following at least one operation: data processing, data operation, peripheral communication, i/o connects control circuit (i/o link)
Can be, but not limited to select corresponding bus and i/o equipment to enter row data communication.Alternatively, cpu process in the present embodiment
Utensil has self-checking function, can show system running state by eight segment numeral pipes.
Alternatively, primary processor in the present embodiment and standby processor can include but is not limited to: multiple communication interfaces.
For example, as shown in figure 1, primary processor cpu module_1 includes: the first communication interface t1, for for processor cpu
Module_2 sends mutually redundant two Ethernet interfaces of indication signal of the running status of primary processor cpu module_1
E1 and e2, for entering row data communication with human-computer interaction interface hmi;Standby processor cpu module_2 includes: the second communication connects
Mouth t1 ', mutually redundant two Ethernets of the indication signal for receiving the running status of primary processor cpu module_1 connect
Mouth e1 ' and e2 ', for entering row data communication with human-computer interaction interface hmi.
Alternatively, the main i/o equipment of row data communication and standby i/o are entered with primary processor or standby processor in the present embodiment
Equipment can be, but not limited to positioned at same substrate, and wherein above-mentioned i/o equipment is primarily used to interact with scene, realizes signal
Input and output.
Alternatively, the judgment mode in the present embodiment whether primary processor being broken down includes but is not limited to: heart beating
Detection, state-detection.Wherein, the mode of detection can include but is not limited in the following manner: primary processor is in real time to standby processor
Send the indication signal of the running status for indicating primary processor.Alternatively, whether detection main bus goes out in the present embodiment
The judgment mode of existing fault can include but is not limited to: connect control circuit (i/o link) by the i/o in processor and pass through
Mark in the data receiving judges whether main bus is in normal running status.
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Primary processor cpu module_1 passes through the first communication interface t1 in real time to standby processor
Cpu module_2 sends the indication signal of the running status for indicating primary processor cpu module_1, then for processor
Cpu module_2 passes through the second communication interface t1 ' detect " heart beating " judging whether hear other side in the given time or receive
To " heart beating " whether exception occurs.If assuming, primary processor cpu module_1 does not break down, and detection further judges
I/o in primary processor cpu module_1 connects based on identifying whether in control circuit (i/o link) received data
Bus sys_net1.
S2, if primary processor breaks down, primary processor is switched to standby processor so that passing through main bus before switching
The i/o equipment communicating with primary processor passes through main bus and standby processor communication after handover;
Alternatively, the fault that the primary processor detecting for processor in the present embodiment occurs include following at least it
One: do not receive in the given time the running status for indicating primary processor indication signal, receive for indicating
The indication signal instruction of the running status of primary processor is abnormal.
For example, in conjunction with shown in Fig. 1, if judging, primary processor cpu module_1 breaks down (for example, for processor
Cpu module_2 is not received by the running status for indicating primary processor cpu module_1 within the predetermined time
Indication signal), then primary processor cpu module_1 is switched to standby processor cpu module_2 so that passing through master before switching
The i/o equipment that bus sys_net1 is communicated with primary processor cpu module_1 after handover pass through main bus sys_net1 with standby
Processor cpu module_2 communicates.
Alternatively, can be, but not limited to before handover synchronize in primary processor and standby processor in the present embodiment
Data transfer.Further illustrate, standby processor cpu module_2 will be ready to, once needing to switch over, just at once
Obtain the processor that ownership is switching to current operation.Therefore, primary processor cpu module_1 must be by the state of oneself
Information is real-time transmitted to standby processor cpu module_2 by the indication signal of running status, makes standby processor cpu
Module_2 and primary processor cpu module_1 hold mode, data syn-chronization, so when when to be switched over, just can realize
Undisturbed switching.
Alternatively, the data syn-chronization between plc can including but not limited to adopt hardware synchronization and soft in the present embodiment
Two methods of part synchronization, wherein, hardware synchronization provides the bus of synchrodata, that is, the data required for data syn-chronization is led to
Road, transfers data to standby processor in real time;Software synchronization is then to send synchrodata to standby process by communication line
Device cpu module_2.
Alternatively, in the present embodiment primary processor cpu module_1 and standby processor cpu module_2 can but not
It is limited to possess 2 mutually redundant two Ethernet interfaces, specific example combines shown in Fig. 1, primary processor cpu module_1
Include mutually redundant two Ethernet interface e1 and e2, standby processor cpu module_2 includes mutually redundant two
Ethernet interface e1 ' and e2 ', arranges the ip address of different segment on two Ethernet interfaces of above-mentioned each processor, passes through
Human-computer interaction interface hmi arranges 2 corresponding ip addresses, accomplishes the communication redundancy of plc system and hmi.
For example, as illustrated in fig. 2, it is assumed that current primary processor cpu module_1 and standby processor cpu module_2 passes through
Ethernet is communicated with third party device (for example, human-computer interaction interface hmi).Primary processor cpu module_1 and standby processor
Respective two Ethernet interfaces of cpu module_2 are respectively set to 2 ip addresses of different segment, such as cpu module_1
E1 mouth be set to 192.168.1.101, e2 mouth is set to 10.10.1.18, and the setting of cpu module_2 is identical with the former.
Hmi possesses 2 network interfaces, is set to 192.168.1.100 and 10.10.1.10.
Alternatively, human-computer interaction interface hmi is communicated with said system and has active/standby two communication links in the present embodiment,
For example, communicated by link a, link d respectively between hmi as shown in Figure 2 and switch switcn1 and switcn2, two
Bar link can work simultaneously, generally based on one, supplemented by another, during primary link failure hmi will automatically switch to another
Communication link.
Further illustrate, the primary processor cpu module_1 that in said system, controller is controlled and standby processor cpu
Whether the network interface of module_2 works is judged realizing by itself, works based on the primary processor cpu module_1
When, its e1 mouth, e2 mouth is active all the time, and data communication all can be realized with hmi in two ports, standby processor cpu
E1 ' the mouth of module_2, e2 ' mouth is in illegal state, and is rendered as high-impedance state.
When primary processor cpu module_1 works, human-computer interaction interface hmi and cpu a has two communication links
A b and d f, both links can work simultaneously.Assume active link based on current a b, then d f link is then standby work
Link (but the communication instruction that human-computer interaction interface hmi issues can be received and respond);If abnormal, people in communication link a b
Machine interactive interface hmi automatic switchover d f communication link carrys out work.During primary processor cpu module_1 work, standby processor
E1 ' the mouth of cpu module_2, e2 ' is in illegal state, and is rendered as high-impedance state.If primary processor cpu module_1 goes out
Existing fault, controller automatic ruling can be switched to standby processor cpu module_2 and proceed communication.
When standby processor cpu module_2 work, human-computer interaction interface hmi and standby processor cpu module_2 is altogether
There are two communication link a c and d e, both links can work simultaneously.Assume active link based on current a c, then d e
Link is for active link (but can receive the communication instruction that human-computer interaction interface hm issues and respond);If communication link a c goes out
Now abnormal, automatic switchover d e communication link is carried out work by human-computer interaction interface hmi.During standby processor cpu module_2 work
The e1 mouth of primary processor cpu module_1, e2 is in illegal state, and is rendered as high-impedance state.
S3, if main bus breaks down, main bus is switched to standby bus so that passing through main bus phase intercommunication before switching
The primary processor of letter and i/o equipment are communicated by standby bus after handover;
Alternatively, the judgment mode that whether detection main bus breaks down in the present embodiment can include but is not limited to:
Control circuit (i/o link) is connected by the i/o in processor and judges whether main bus is located by the mark in the data of reception
In normal running status.
For example, in conjunction with shown in Fig. 3 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Control circuit (i/o link) institute is connected by the i/o in primary processor cpu module_1
When mark in the data receiving draws the communication broke down of main bus sys_net1, then main bus sys_net1 is switched to
Standby bus sys_net2 is so that primary processor cpu module_1 and i/ that be in communication with each other by main bus sys_net1 before switching
O equipment is communicated by standby bus sys_net2 after handover, this ensures that theres and no also can guarantee that in the case of i/o redundancy
The reliability service of system.
S4, if primary processor and main bus all break down, primary processor is switched to standby processor, and by main bus
Switch to standby bus so that the i/o equipment that communicates with primary processor by main bus before switching after handover by for bus and
Standby processor communication.
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.When standby processor cpu module_2 is not received by the given time for indicating
The indication signal of the running status of primary processor cpu module_1, then switch to standby process by primary processor cpu module_1
Device cpu module_2, again when standby processor cpu module_2 connects, by i/o, the data that control circuit (i/o link) receives
In mark learn that main bus sys_net1 also breaks down, then main bus sys_net1 is switched to standby bus sys_net2,
So that the i/o equipment being communicated with primary processor cpu module_1 by main bus sys_net1 before switching is after handover by standby
Bus sys_net2 is communicated with standby processor cpu module_2.
The embodiment being provided by the application, by judging to show that primary processor and/or main bus break down, in control
State primary processor to switch to standby processor and/or control above-mentioned main bus to switch to standby bus, overcome conventional art and adopted
The relatively low problem of redundant fashion reliability it is achieved that improving the effect of the reliability of Programmable Logic Controller plc;Additionally, it is active/standby
Also setting up multiple communication interfaces in processor, by controlling the unlatching of some communication interfaces or can forbidding it is achieved that saving ip
The effect of resource, expands redundancy quantity;Also real-time state-detection can be realized to primary processor by some communication interfaces, with
When making to break down, primary processor can be switched in time standby processor.
As a kind of optional scheme, i/o equipment includes main i/o equipment and standby i/o equipment, wherein, is judging main process task
When whether device and/or main bus break down, also include:
S1, judges whether main i/o equipment breaks down;
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment can be, but not limited to positioned at same substrate, its
In, above-mentioned i/o equipment is primarily used to interact with scene, realizes the input and output of signal.Alternatively, in the present embodiment
Main i/o equipment can include but is not limited to tetra- kinds of fasteners of ao, ai, do, di, accordingly, standby i/o equipment in the present embodiment
Ao ', ai ', do ', di ' can be included but is not limited to.Alternatively, in the present embodiment active/standby i/o equipment can be, but not limited to for
Individually board, for example, ai board.
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment can also be included for transmitting main i/o equipment
The indication signal of running status communication interface.For example, as shown in figure 4, main i/o equipment includes ai board, di board, on
The communication interface stating board is respectively p1, p2, and standby i/o equipment includes ai ' board, di ' board, the communication interface of above-mentioned board
It is respectively p1 ', p2 '.
Alternatively, i/o equipment in the present embodiment can show the signal shape of current input and output by led display lamp
State.
Alternatively, the judgment mode in the present embodiment whether main i/o equipment being broken down includes but is not limited to: heart beating
Detection, state-detection.Wherein, the mode of detection can include but is not limited in the following manner: main i/o equipment sets to standby i/o in real time
Preparation send the indication signal of the running status for indicating main i/o equipment.
For example, it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/o
Equipment is normally communicated.Main i/o equipment (for example, ai board) passes through third communication interface (for example, p1 mouth) in real time
Fourth communication interface (for example, p1 ' mouth) to standby i/o equipment (for example, ai ' board) sends for indicating main i/o equipment (example
As ai board) running status indication signal, then pass through fourth communication interface p1 ' detection for i/o equipment and judge in advance regularly
Whether interior " heart beating " whether hearing other side or " heart beating " that receive exception.
S2, if main i/o equipment breaks down, main i/o equipment is switched to standby i/o equipment so that passing through master before switching
The primary processor of bus and main i/o equipment communication passes through main bus and standby i/o equipment communication after handover.
For example, it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/o
Equipment is normally communicated, and wherein, using ai, di card as main i/o equipment, ai ', di ' set as the standby i/o of ai, di
Standby.If judging, main i/o equipment (for example, ai board) breaks down (for example, for i/o equipment (for example, ai ' board) predetermined
Time in be not received by the indication signal of running status for indicating main i/o equipment (for example, ai board)), then will lead
I/o equipment switches to standby i/o equipment so that passing through the primary processor of main bus sys_net1 and main i/o equipment communication before switching
Cpu module_1 passes through main bus sys_net1 and standby i/o equipment communication after handover.
Further illustrate, between two i/o equipment, data interaction is carried out by the system bus on same substrate, according to each
From collection signal carry out ruling so as in an i/o equipment be in running status (i.e. main i/o equipment), another i/o equipment
It is in SBR (i.e. for i/o equipment);It is in the standby i/o equipment of SBR and i/o effective in system is connected control electricity
Bus between road (i/olink) is locked, and Ji Gai road system bus is in high-impedance state.
Alternatively, the detection to i/o equipment can be, but not limited in the present embodiment: periodic queries.For example, i/o connects
Connection control circuit (i/o link) periodically (for example, cycle t is about 1.5ms) inquires about the main i/o equipment of Programmable Logic Controller plc
Whether running status is normal, and state is returned to cpu (for example, every 100ms returns to cpu processor once).So in fortune
During row, cpu connects the running status of the main i/o equipment that control circuit (i/o link) returns by periodic detection i/o, and
And by starting a regularly task in systems, periodically main i/o equipment is polled, to determine the fortune of main i/o equipment
Row state, and then determine main i/o equipment whether in normal work.
By the standby i/o equipment positioned at same substrate, the embodiment being provided by the application, judges whether main i/o equipment goes out
Existing fault, then can be after judging to break down, the directly switching of the active/standby i/o equipment of control, overcome existing system-level master/
The inconvenience of standby switching it is achieved that switching based on module, reached the motility improving the active/standby switching of i/o equipment and
The purpose of reliability.
As a kind of optional scheme, after judging whether main i/o equipment breaks down, also include:
S1, if primary processor and main i/o equipment break down, primary processor is switched to standby processor, and by main i/o
Equipment switches to standby i/o equipment so that for making primary processor and main bus that main i/o equipment is communicated is in switching before switching
After so that standby processor and standby i/o equipment is communicated;
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.When standby processor cpu module_2 is not received by within the predetermined time for referring to
Show the indication signal of the running status of primary processor cpu module_1, then primary processor cpu module_1 is switched to standby place
Reason device cpu module_2, then switch to standby processor cpu module_2 by primary processor cpu module_1, standby further
I/o equipment also receives the indication signal of the running status for indicating main i/o equipment, judges to show that appearance is different by indication signal
Often, then main i/o equipment is switched to standby i/o equipment so that being used for making primary processor cpu module_1 and main i/o set before switching
The standby main bus sys_net1 being communicated makes standby processor cpu module_2 and standby i/o equipment be communicated after handover.
S2, if main bus and main i/o equipment break down, main bus is switched to standby bus, main i/o equipment is switched
To standby i/o equipment so that before switching by the primary processor of main bus and main i/o equipment communication pass through after handover standby bus with
Standby i/o equipment communication;
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Control circuit (i/o link) institute is connected by the i/o in primary processor cpu module_1
When mark in the data receiving draws the communication broke down of main bus sys_net1, then main bus sys_net1 is switched to
Standby bus sys_net2, receives the indication signal of the running status for indicating main i/o equipment further for i/o equipment again,
Indication signal instruction occurs extremely, then main i/o equipment is switched to standby i/o equipment so that passing through main bus sys_ before switching
Net1 is set with standby i/o by standby bus sys_net2 after handover with the primary processor cpu module_1 of main i/o equipment communication
Standby communication.
S3, if primary processor, main bus and main i/o equipment all break down, primary processor is switched to standby processor,
Main bus is switched to standby bus, main i/o equipment is switched to standby i/o equipment and passes through so that interrupting primary processor after handover
Main bus and the communication of main i/o equipment, and so that standby processor is communicated with standby i/o equipment by standby bus after handover.
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.When standby processor cpu module_2 is not received by within the predetermined time for referring to
Show the indication signal of the running status of primary processor cpu module_1, then primary processor cpu module_1 is switched to standby place
Reason device cpu module_2, connects control circuit (i/o by the i/o in standby processor cpu module_2 after switching further
Link when) mark in received data draws the communication broke down of main bus sys_net1, then by main bus sys_
Net1 switches to standby bus sys_net2, and standby i/o equipment receives the instruction letter of the running status for indicating main i/o equipment again
Number, indication signal instruction occurs extremely, then main i/o equipment is switched to standby i/o equipment so that interrupting primary processor after handover
Cpu module_1 passes through the communication of main bus sys_net1 and main i/o equipment, and makes standby processor cpu after handover
Module_2 is communicated with standby i/o equipment by standby bus sys_net2.
The embodiment being provided by the application, by judging respectively to primary processor, main bus and main i/o equipment,
And then draw when primary processor and main i/o equipment break down, when main bus and main i/o equipment break down, at main place
Changing method in the case of reason device, main bus and main i/o equipment all break down three kinds is it is achieved that active/standby based on module
Switching, has reached the raising motility of system and the purpose of reliability.
As a kind of optional scheme, judge main i/o equipment whether break down including:
S1, standby i/o equipment detects whether the indication signal of the running status for indicating main i/o equipment exception;
Alternatively, in the present embodiment whether the indication signal of the running status of main i/o equipment is occurred abnormal include but
It is not limited to: do not receive the indication signal of running status for indicating main i/o equipment, indication signal indicates that appearance is different on time
Often, wherein, it is abnormal that the exception that indication signal occurs can include but is not limited to signal waveform.
Alternatively, main i/o equipment or standby i/o equipment can be, but not limited to as single board in the present embodiment, for example,
Ai board.
S2, if indication signal is detected to occur extremely, controlling main i/o equipment to switch to standby i/o equipment.
For example, in conjunction with shown in Fig. 4 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Main i/o equipment includes ai board, di board, and the communication interface of above-mentioned board is respectively
P1, p2, standby i/o equipment includes ai ' board, di ' board, and the communication interface of above-mentioned board is respectively p1 ', p2 '.As standby i/o
Equipment (for example, ai ' board) passes through communication interface p1 ' receive operation shape for indicating main i/o equipment (for example, ai board)
It is abnormal that the indication signal of state indicates that main i/o equipment (for example, ai board) occurs, then can individually control ai board to switch to standby
Ai ' board, without affecting the normal work of other kinds of board, for example, main i/o equipment di board does not break down,
Then can be without switching to standby di ' board.So, the switching based on module is not only more flexible, also improves system
Reliability.
The embodiment being provided by the application, by the judgement whether main i/o equipment is broken down based on module, is overcome
The inconvenient problem of extension that in prior art, the active/standby switching of the machine cage based on system leads to is so that PLC technology
The redundancy control system of device plc is more flexible, and reliability also increases.
As a kind of optional scheme, main bus is switched to standby bus and includes:
S1, judges the mark comprising main bus in primary processor or standby processor received data or for bus
Mark;
Alternatively, judge in the present embodiment to comprise main bus in primary processor or standby processor received data
The mode of the mark of mark or standby bus can include but is not limited to: connects control circuit (i/o by the i/o in processor
Link the mark) passed through in the data receiving judges whether main bus is in normal running status.
S2, if judging to comprise the mark of standby bus, main bus is switched to standby bus.
For example, in conjunction with shown in Fig. 3 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Control circuit (i/o link) institute is connected by the i/o in primary processor cpu module_1
When mark in the data receiving draws the communication broke down of main bus sys_net1, then main bus sys_net1 is switched to
Standby bus sys_net2 is so that primary processor cpu module_1 and i/ that be in communication with each other by main bus sys_net1 before switching
O equipment is communicated by standby bus sys_net2 after handover, this ensures that theres and no also can guarantee that in the case of i/o redundancy
The reliability service of system.
The embodiment being provided by the application, so that not interfering with it when i/o equipment switches by the way of dual bus
The i/o equipment of his type, simultaneously this redundant fashion also ensure that reliability of operation.
As one kind alternatively scheme, primary processor is switched to standby processor and includes:
S1, standby processor detects whether the indication signal of the running status for indicating primary processor exception;
Alternatively, in the present embodiment whether the indication signal of the running status of primary processor is occurred abnormal include but not
It is limited to: do not receive the indication signal of running status for indicating primary processor, indication signal instruction occurs extremely on time, its
In, the exception that indication signal occurs can include but is not limited to signal waveform extremely.
S2, if indication signal is detected to occur extremely, controlling primary processor to switch to standby processor.
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.When standby processor cpu module_2 is not received by the given time for indicating
The indication signal of the running status of primary processor cpu module_1, or, standby processor cpu module_2 receives use
In the indication signal of the running status of instruction primary processor cpu module_1, but extremely, then leading occurs in indication signal instruction
Processor cpu module_1 switches to standby processor cpu module_2.
The embodiment being provided by the application, by judging to show that primary processor breaks down, controls above-mentioned primary processor
Switch to standby processor, overcome the relatively low problem of the redundant fashion reliability that conventional art adopted and can compile it is achieved that improving
The effect of the reliability of range controller plc.
The invention provides a kind of preferred embodiment further the present invention to be explained, but noticeable
It is that the preferred embodiment is intended merely to preferably describe the present invention, does not constitute and the present invention is improperly limited.
Embodiment 2
According to embodiments of the present invention, additionally provide a kind of Programmable Logic Controller redundancy control system, as shown in fig. 6, at this
This system of embodiment includes:
(1) primary processor 602, are arranged to be connected respectively with main bus and standby bus;
(2) standby processor 604, is arranged to be connected respectively with main bus and standby bus, and is connected with primary processor;
Alternatively, primary processor in the present embodiment and standby processor backup each other, and main bus is standby each other with standby bus
Part.
Alternatively, in the present embodiment above-mentioned Programmable Logic Controller redundancy control method can be, but not limited to be applied to medium-sized
Mixing Programmable Logic Controller (plc, programmable logic controller).Alternatively, main place in the present embodiment
To should have standby processor, to should have standby bus, main i/o equipment is to should have standby i/o equipment for main bus for reason device.In conjunction with shown in Fig. 1,
The system being used for implementing above-mentioned Programmable Logic Controller redundancy control method in the present embodiment includes primary processor cpu module_
1st, standby processor cpu module_2, switch switch1, switch2, main bus sys_net1, standby bus sys_net2, with
And main i/o equipment i/o module1, standby i/o equipment i/o module2.
Alternatively, primary processor in the present embodiment and standby processor can be, but not limited to by rs232 bus or with
Too net and third party device communication, transfer data to data-centric.Alternatively, primary processor in the present embodiment or standby
Processor can include but is not limited to: central control processor (cpu), and i/o connects control circuit.Wherein, cpu can but not
It is limited to execute following at least one operation: data processing, data operation, peripheral communication, i/o connects control circuit (i/o link)
Can be, but not limited to select corresponding bus and i/o equipment to enter row data communication.Alternatively, cpu process in the present embodiment
Utensil has self-checking function, can show system running state by eight segment numeral pipes.
Alternatively, primary processor in the present embodiment and standby processor can include but is not limited to: multiple communication interfaces.
For example, as shown in figure 1, primary processor cpu module_1 includes: the first communication interface t1, for for processor cpu
Module_2 sends the indication signal of the running status of primary processor cpu module_1;Mutually redundant two Ethernet interfaces
E1 and e2, for entering row data communication with human-computer interaction interface hmi;Standby processor cpu module_2 includes: the second communication connects
Mouth t1 ', for receiving the indication signal of the running status of primary processor cpu module_1, mutually redundant two Ethernets connect
Mouth e1 ' and e2 ', for entering row data communication with human-computer interaction interface hmi.
Alternatively, the main i/o equipment of row data communication and standby i/o are entered with primary processor or standby processor in the present embodiment
Equipment can be, but not limited to positioned at same substrate, and wherein above-mentioned i/o equipment is primarily used to interact with scene, realizes signal
Input and output.
Alternatively, the judgment mode in the present embodiment whether primary processor being broken down includes but is not limited to: heart beating
Detection, state-detection.Wherein, the mode of detection can include but is not limited in the following manner: primary processor is in real time to standby processor
Send the indication signal of the running status for indicating primary processor.
Alternatively, the fault that the primary processor detecting for processor in the present embodiment occurs include following at least it
One: do not receive in the given time the running status for indicating primary processor indication signal, receive for indicating
The indication signal instruction of the running status of primary processor is abnormal.
Alternatively, in the present embodiment whether the indication signal of the running status of primary processor is occurred abnormal include but not
It is limited to: do not receive the indication signal of running status for indicating primary processor, indication signal instruction occurs extremely on time, its
In, the exception that indication signal occurs can include but is not limited to signal waveform extremely.
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Primary processor cpu module_1 passes through the first communication interface t1 in real time to standby processor
Cpu module_2 sends the indication signal of the running status for indicating primary processor cpu module_1, then for processor
Cpu module_2 passes through the second communication interface t1 ' detect " heart beating " judging whether hear other side in the given time or receive
To " heart beating " whether exception occurs.If judging, primary processor cpu module_1 breaks down (for example, for processor cpu
Module_2 is not received by the instruction of the running status for indicating primary processor cpu module_1 within the predetermined time
Signal), then primary processor cpu module_1 is switched to standby processor cpu module_2 so that passing through main bus before switching
The i/o equipment that sys_net1 is communicated with primary processor cpu module_1 is passed through main bus sys_net1 after handover and is processed with standby
Device cpu module_2 communicates.
Alternatively, can be, but not limited to before handover synchronize in primary processor and standby processor in the present embodiment
Data transfer.Further illustrate, standby processor cpu module_2 will be ready to, once needing to switch over, just at once
Obtain the processor that ownership is switching to current operation.Therefore, primary processor cpu module_1 must be by the state of oneself
Information is real-time transmitted to standby processor cpu module_2 by the indication signal of running status, makes standby processor cpu
Module_2 and primary processor cpu module_1 hold mode, data syn-chronization, so when when to be switched over, just can realize
Undisturbed switching.
Alternatively, the data syn-chronization between plc can including but not limited to adopt hardware synchronization and soft in the present embodiment
Two methods of part synchronization, wherein, hardware synchronization provides the bus of synchrodata, that is, the data required for data syn-chronization is led to
Road, transfers data to standby processor in real time;Software synchronization is then to send synchrodata to standby process by communication line
Device cpu module_2.
(3) main bus 606, are arranged to be connected with i/o equipment;
(4) standby bus 608, is arranged to be connected with i/o equipment;
Alternatively, the judgment mode that whether detection main bus breaks down in the present embodiment can include but is not limited to:
Control circuit (i/o link) is connected by the i/o in processor and judges whether main bus is located by the mark in the data of reception
In normal running status.
For example, in conjunction with shown in Fig. 3 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Control circuit (i/o link) institute is connected by the i/o in primary processor cpu module_1
When mark in the data receiving draws the communication broke down of main bus sys_net1, then main bus sys_net1 is switched to
Standby bus sys_net2 is so that primary processor cpu module_1 and i/ that be in communication with each other by main bus sys_net1 before switching
O equipment is communicated by standby bus sys_net2 after handover, this ensures that theres and no also can guarantee that in the case of i/o redundancy
The reliability service of system.
The embodiment being provided by the application, the embodiment being provided by the application, by judge draw primary processor and/
Or main bus breaks down, above-mentioned primary processor is controlled to switch to standby processor and/or control above-mentioned main bus to switch to for total
Line, overcomes the relatively low problem of the redundant fashion reliability that conventional art adopted it is achieved that improving Programmable Logic Controller plc's
The effect of reliability.
As a kind of optional scheme, as shown in fig. 7, system in the present embodiment also includes: i/o equipment, wherein, i/
O equipment includes:
(1) main i/o equipment 702, is arranged to be connected respectively with main bus and standby bus;And/or
(2) standby i/o equipment 704, is arranged to be connected respectively with main bus and standby bus, and is connected with main i/o equipment;
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment backup each other.
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment can be, but not limited to positioned at same substrate, its
In, above-mentioned i/o equipment is primarily used to interact with scene, realizes the input and output of signal.Alternatively, in the present embodiment
Main i/o equipment can include but is not limited to tetra- kinds of fasteners of ao, ai, do, di, accordingly, standby i/o equipment in the present embodiment
Ao ', ai ', do ', di ' can be included but is not limited to.Alternatively, in the present embodiment active/standby i/o equipment can be, but not limited to for
Individually board, for example, ai board.
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment can also be included for transmitting main i/o equipment
The indication signal of running status communication interface.For example, as shown in figure 4, main i/o equipment includes ai board, di board, on
The communication interface stating board is respectively p1, p2, and standby i/o equipment includes ai ' board, di ' board, the communication interface of above-mentioned board
It is respectively p1 ', p2 '.Alternatively, i/o equipment in the present embodiment can show current input and output by led display lamp
Signal condition.
Alternatively, the judgment mode in the present embodiment whether main i/o equipment being broken down includes but is not limited to: heart beating
Detection, state-detection.Wherein, the mode of detection can include but is not limited in the following manner: main i/o equipment sets to standby i/o in real time
Preparation send the indication signal of the running status for indicating main i/o equipment.
Alternatively, in the present embodiment whether the indication signal of the running status of main i/o equipment is occurred abnormal include but
It is not limited to: do not receive the indication signal of running status for indicating main i/o equipment, indication signal indicates that appearance is different on time
Often, wherein, it is abnormal that the exception that indication signal occurs can include but is not limited to signal waveform.
For example, it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/o
Equipment is normally communicated, and wherein, using ai, di card as main i/o equipment, ai ', di ' set as the standby i/o of ai, di
Standby.If judging, main i/o equipment (for example, ai board) breaks down (for example, for i/o equipment (for example, ai ' board) predetermined
Time in be not received by the indication signal of running status for indicating main i/o equipment (for example, ai board)), then will lead
I/o equipment switches to standby i/o equipment so that passing through the primary processor of main bus sys_net1 and main i/o equipment communication before switching
Cpu module_1 passes through main bus sys_net1 and standby i/o equipment communication after handover.
Further illustrate, between two i/o equipment, data interaction is carried out by the system bus on same substrate, according to each
From collection signal carry out ruling so as in an i/o equipment be in running status (i.e. main i/o equipment), another i/o equipment
It is in SBR (i.e. for i/o equipment);It is in the standby i/o equipment of SBR and i/o effective in system is connected control electricity
Bus between road (i/o link) is locked, and Ji Gai road system bus is in high-impedance state.
Alternatively, the detection to i/o equipment can be, but not limited in the present embodiment: periodic queries.For example, i/o connects
Connection control circuit (i/o link) periodically (for example, cycle t is about 1.5ms) inquires about the main i/o equipment of Programmable Logic Controller plc
Whether running status is normal, and state is returned to cpu (for example, every 100ms returns to cpu processor once).So in fortune
During row, cpu connects the running status of the main i/o equipment that control circuit (i/o link) returns by periodic detection i/o, and
And by starting a regularly task in systems, periodically main i/o equipment is polled, to determine the fortune of main i/o equipment
Row state, and then determine main i/o equipment whether in normal work.
By the standby i/o equipment positioned at same substrate, the embodiment being provided by the application, judges whether main i/o equipment goes out
Existing fault, then can be after judging to break down, the directly switching of the active/standby i/o equipment of control, overcome existing system-level master/
The inconvenience of standby switching it is achieved that switching based on module, reached the motility improving the active/standby switching of i/o equipment and
The purpose of reliability.
As a kind of optional scheme, primary processor 602 in the present embodiment includes:
(1) first central control processor, is arranged to be connected control circuit connection with an i/o;
Alternatively, cpu in the present embodiment can be, but not limited to execute following at least one operation: data processing, number
According to computing, peripheral communication, i/o connects control circuit (i/o link) and can be, but not limited to select corresponding bus and i/o equipment
Enter row data communication.Alternatively, cpu processor in the present embodiment has self-checking function, can lead to system running state
Cross eight segment numeral pipes to show.
(2) the first i/o connect control circuit, are arranged to be connected with main bus and standby bus, for control selections, master is total
Line or standby bus are communicated with i/o equipment.
Alternatively, the judgment mode that whether detection main bus breaks down in the present embodiment can include but is not limited to:
Control circuit (i/o link) is connected by the i/o in processor and judges whether main bus is located by the mark in the data of reception
In normal running status.
Alternatively, in the present embodiment, in above-mentioned Programmable Logic Controller redundancy control system can also but be not limited to including
Communication module 502, as shown in figure 5, this communication module 502 acts not only as processor connect with interacting of bus (sys_net)
Mouthful, simultaneously can also but be not limited to processor, i/o equipment provide 24v power supply.Alternatively, in the present embodiment, above-mentioned communication
Module 502 can be, but not limited to by rj45 head, is connected control circuit (i/o link) with the i/o in processor or i/o sets
Standby communicated.
The embodiment being provided by the application, is connected by the central control processor in processor and i/o and controls electricity
Two, road structural grouping, the switching of co- controlling primary processor and main bus is it is achieved that module in flexible control system
Active/standby switching, also improves the reliability of system simultaneously.
As a kind of optional scheme, standby processor 604 in the present embodiment includes:
(1) second central control processor, is arranged to be connected control circuit connection with the 2nd i/o;
Alternatively, cpu in the present embodiment can be, but not limited to execute following at least one operation: data processing, number
According to computing, peripheral communication, i/o connects control circuit (i/o link) and can be, but not limited to select corresponding bus and i/o equipment
Enter row data communication.Alternatively, cpu processor in the present embodiment has self-checking function, can lead to system running state
Cross eight segment numeral pipes to show.
(2) the 2nd i/o connect control circuits, are arranged to be connected with main bus and standby bus, for select main bus or
Standby bus is communicated with i/o equipment.
Alternatively, the judgment mode that whether detection main bus breaks down in the present embodiment can include but is not limited to:
Control circuit (i/o link) is connected by the i/o in processor and judges whether main bus is located by the mark in the data of reception
In normal running status.
Alternatively, in the present embodiment, in above-mentioned Programmable Logic Controller redundancy control system can also but be not limited to including
Communication module 502, as shown in figure 5, this communication module 502 acts not only as processor connect with interacting of bus (sys_net)
Mouthful, simultaneously can also but be not limited to processor, i/o equipment provide 24v power supply.Alternatively, in the present embodiment, above-mentioned communication
Module 502 can be, but not limited to by rj45 head, is connected control circuit (i/o link) with the i/o in processor or i/o sets
Standby communicated.
The embodiment being provided by the application, is connected by the central control processor in processor and i/o and controls electricity
Two, road structural grouping, co- controlling for processor and standby bus switching it is achieved that module in flexible control system
Active/standby switching, also improves the reliability of system simultaneously.
As a kind of optional scheme, primary processor 602 in the present embodiment includes:
(1) first communication interface, is arranged to be connected with standby processor, for sending instruction primary processor to standby processor
Running status indication signal;
Alternatively, include for processor in the present embodiment:
(1) second communication interface, is arranged to be connected with primary processor, for receiving the running status of instruction primary processor
Indication signal;
(2) first detection means, are arranged to be connected with the second communication interface, for the operation of detection instruction primary processor
Whether the indication signal of state exception.
Alternatively, primary processor in the present embodiment and standby processor can include but is not limited to: multiple communication interfaces.
For example, as shown in figure 1, primary processor cpu module_1 includes: the first communication interface t1, for for processor cpu
Module_2 sends the indication signal of the running status of primary processor cpu module_1;Standby processor cpu module_2 bag
Include: the second communication interface t1 ', for receiving the indication signal of the running status of primary processor cpu module_1.
Alternatively, the fault that the primary processor detecting for processor in the present embodiment occurs include following at least it
One: do not receive in the given time the running status for indicating primary processor indication signal, receive for indicating
The indication signal instruction of the running status of primary processor is abnormal.
Alternatively, in the present embodiment whether the indication signal of the running status of primary processor is occurred abnormal include but not
It is limited to: do not receive the indication signal of running status for indicating primary processor, indication signal instruction occurs extremely on time, its
In, the exception that indication signal occurs can include but is not limited to signal waveform extremely.
For example, in conjunction with shown in Fig. 1 it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/
O equipment is normally communicated.Primary processor cpu module_1 passes through the first communication interface t1 in real time to standby processor
Cpu module_2 sends the indication signal of the running status for indicating primary processor cpu module_1, then for processor
Cpu module_2 passes through the second communication interface t1 ' detect " heart beating " judging whether hear other side in the given time or receive
To " heart beating " whether exception occurs.
The embodiment being provided by the application, by judging to show that primary processor breaks down, controls above-mentioned primary processor
Switch to standby processor, overcome the relatively low problem of the redundant fashion reliability that conventional art adopted and can compile it is achieved that improving
The effect of the reliability of range controller plc.
As a kind of optional scheme, main i/o equipment 702 in the present embodiment includes:
(1) third communication interface, is arranged to be connected with standby i/o equipment, indicates main i/o for sending to standby i/o equipment
The indication signal of the running status of equipment;
Alternatively, include for i/o equipment in the present embodiment:
(1) fourth communication interface, is arranged to be connected with main i/o equipment, for receiving the operation shape indicating main i/o equipment
The indication signal of state;
(2) second detection device, is arranged to be connected with fourth communication interface, indicates the fortune of main i/o equipment for detection
Whether the indication signal of row state exception.
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment can be, but not limited to positioned at same substrate, its
In, above-mentioned i/o equipment is primarily used to interact with scene, realizes the input and output of signal.Alternatively, in the present embodiment
Main i/o equipment can include but is not limited to tetra- kinds of fasteners of ao, ai, do, di, accordingly, standby i/o equipment in the present embodiment
Ao ', ai ', do ', di ' can be included but is not limited to.Alternatively, in the present embodiment active/standby i/o equipment can be, but not limited to for
Individually board, for example, ai board.
Alternatively, main i/o equipment in the present embodiment and standby i/o equipment can also be included for transmitting main i/o equipment
The indication signal of running status communication interface.For example, as shown in figure 4, main i/o equipment includes ai board, di board, on
The communication interface stating board is respectively p1, p2, and standby i/o equipment includes ai ' board, di ' board, the communication interface of above-mentioned board
It is respectively p1 ', p2 '.
Alternatively, the judgment mode in the present embodiment whether main i/o equipment being broken down includes but is not limited to: heart beating
Detection, state-detection.Wherein, the mode of detection can include but is not limited in the following manner: main i/o equipment sets to standby i/o in real time
Preparation send the indication signal of the running status for indicating main i/o equipment.
Alternatively, in the present embodiment whether the indication signal of the running status of main i/o equipment is occurred abnormal include but
It is not limited to: do not receive the indication signal of running status for indicating main i/o equipment, indication signal indicates that appearance is different on time
Often, wherein, it is abnormal that the exception that indication signal occurs can include but is not limited to signal waveform.
For example, it is assumed that current primary processor cpu module_1 passes through main bus sys_net1 and main i/o
Equipment is normally communicated.Main i/o equipment (for example, ai board) passes through third communication interface (for example, p1 mouth) in real time
Fourth communication interface (for example, p1 ' mouth) to standby i/o equipment (for example, ai ' board) sends for indicating main i/o equipment (example
As ai board) running status indication signal, then pass through fourth communication interface p1 ' detection for i/o equipment and judge in advance regularly
Whether interior " heart beating " whether hearing other side or " heart beating " that receive exception.
As a kind of optional scheme, this system also includes: main i/o equipment is located at same substrate with standby i/o equipment.
Alternatively, in the present embodiment primary processor cpu module_1 and standby processor cpu module_2 can but not
It is limited to possess 2 mutually redundant two Ethernet interfaces, specific example combines shown in Fig. 1, primary processor cpu module_1
Include mutually redundant two Ethernet interface e1 and e2, standby processor cpu module_2 includes mutually redundant two
Ethernet interface e1 ' and e2 ', arranges the ip address of different segment on two Ethernet interfaces of above-mentioned each processor, passes through
Human-computer interaction interface hmi arranges 2 corresponding ip addresses, accomplishes the communication redundancy of plc system and hmi.
For example, as illustrated in fig. 2, it is assumed that current primary processor cpu module_1 and standby processor cpu module_2 passes through
Ethernet is communicated with third party device (for example, human-computer interaction interface hmi).Primary processor cpu module_1 and standby processor
Respective two Ethernet interfaces of cpu module_2 are respectively set to 2 ip addresses of different segment, such as cpu module_1
E1 mouth be set to 192.168.1.101, e2 mouth is set to 10.10.1.18, and the setting of cpu module_2 is identical with the former.
Hmi possesses 2 network interfaces, is set to 192.168.1.100 and 10.10.1.10.
Alternatively, human-computer interaction interface hmi is communicated with said system and has active/standby two communication links in the present embodiment,
For example, communicated by link a, link d respectively between hmi as shown in Figure 2 and switch switcn1 and switcn2, two
Bar link can work simultaneously, generally based on one, supplemented by another, during primary link failure hmi will automatically switch to another
Communication link.
Further illustrate, the primary processor cpu module_1 that in said system, controller is controlled and standby processor cpu
Whether the network interface of module_2 works is judged realizing by itself, works based on the primary processor cpu module_1
When, its e1 mouth, e2 mouth is active all the time, and data communication all can be realized with hmi in two ports, standby processor cpu
E1 ' the mouth of module_2, e2 ' mouth is in illegal state, and is rendered as high-impedance state.
When primary processor cpu module_1 works, human-computer interaction interface hmi and cpu a has two communication links
A b and d f, both links can work simultaneously.Assume active link based on current a b, then d f link is then standby work
Link (but the communication instruction that human-computer interaction interface hmi issues can be received and respond);If abnormal, people in communication link a b
Machine interactive interface hmi automatic switchover d f communication link carrys out work.During primary processor cpu module_1 work, standby processor
E1 ' the mouth of cpu module_2, e2 ' is in illegal state, and is rendered as high-impedance state.If primary processor cpu module_1 goes out
Existing fault, controller automatic ruling can be switched to standby processor cpu module_2 and proceed communication.
When standby processor cpu module_2 work, human-computer interaction interface hmi and standby processor cpu module_2 is altogether
There are two communication link a c and d e, both links can work simultaneously.Assume active link based on current a c, then d e
Link is for active link (but can receive the communication instruction that human-computer interaction interface hm issues and respond);If communication link a c goes out
Now abnormal, automatic switchover d e communication link is carried out work by human-computer interaction interface hmi.During standby processor cpu module_2 work
The e1 mouth of primary processor cpu module_1, e2 is in illegal state, and is rendered as high-impedance state.
The embodiment being provided by the application, also sets up multiple communication interfaces in active/standby processor, can pass through control one
The unlatching of a little communication interfaces or forbid, it is achieved that saving the effect of ip resource, expanding redundancy quantity;Also can be by some communications
Interface realizes to primary processor real-time state-detection, so that when breaking down, primary processor can switch to standby place in time
Reason device.
The invention provides a kind of preferred embodiment further the present invention to be explained, but noticeable
It is that the preferred embodiment is intended merely to preferably describe the present invention, does not constitute and the present invention is improperly limited.
As can be seen from the above description, in embodiments of the present invention, by by the process in Programmable Logic Controller
Device, bus, i/o equipment are respectively provided with active/standby two equipment, overcome in prior art just for specifically single module or whole
Individual system carry out the relatively low technical problem of reliability that redundancy setting led to so that whole system occur in single module therefore
Barrier, or when operational blocks which partition system combination is broken down, all may be implemented under the premise of not affecting other kinds of module, carry out unperturbed and cut
Changing, reached the purpose flexibly switching based on module, it is achieved thereby that improving the technique effect of system reliability, and then solving
The relatively low technical problem of redundant fashion reliability used in the prior art.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, made any repair
Change, equivalent, improvement etc., should be included within the scope of the present invention.