Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, in the situation that not conflicting, the feature in embodiment and embodiment in the application can combine mutually.
Embodiment 1
According to the embodiment of the present invention, a kind of Programmable Logic Controller redundancy control method is provided, the method comprises:
S1, judges whether primary processor and/or main bus break down;
Alternatively, 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) in the present embodiment.Alternatively, primary processor is in the present embodiment to there being standby processor, and main bus is to there being standby bus, and main I/O equipment is to there being standby I/O equipment.Shown in Fig. 1, comprise primary processor CPU Module_1, standby processor CPU Module_2 for implementing the system of above-mentioned Programmable Logic Controller redundancy control method in the present embodiment, switch Switch1, Switch2, main bus SYS_NET1, standby bus SYS_NET2, and main I/O equipment I/O Module1, standby I/O equipment I/O Module2.
Alternatively, primary processor in the present embodiment can be, but not limited to communicate by letter with third party device by RS232 bus or Ethernet with standby processor, transfers data to data center station.Alternatively, primary processor in the present embodiment or standby processor can include but not limited to: central control processor (CPU), is connected control circuit with I/O.Wherein, CPU can be, but not limited to carry out following at least one operation: data processing, data operation, peripheral communication, I/O connects control circuit (I/O Link) and can be, but not limited to select corresponding bus and I/O equipment to carry out data communication.Alternatively, CPU processor in the present embodiment has self-checking function, system running state can be shown by eight segment numeral pipes.
Alternatively, primary processor in the present embodiment and standby processor can include but not limited to: multiple communication interfaces.For example, as shown in Figure 1, primary processor CPU Module_1 comprises: the first communication interface T1, for send mutually redundant two the Ethernet interface E1 of indicator signal and the E2 of the running status of primary processor CPU Module_1 to standby processor CPU Module_2, for carrying out data communication with human-computer interaction interface HMI; Standby processor CPU Module_2 comprises: second communication interface T1 ', be used for mutually redundant two the Ethernet interface E1 ' of indicator signal and the E2 ' of the running status that receives primary processor CPU Module_1, for carrying out data communication with human-computer interaction interface HMI.
Alternatively, carry out the main I/O equipment of data communication and can be, but not limited to be positioned at same substrate for I/O equipment in the present embodiment with primary processor or standby processor, wherein above-mentioned I/O equipment is mainly for carrying out alternately, realizing the input and output of signal with scene.
Alternatively, the judgment mode in the present embodiment whether primary processor being broken down includes but not limited to: heartbeat detection, state-detection.Wherein, the mode of detection can include but not limited to following mode: primary processor sends the indicator signal of the running status that is used to indicate primary processor in real time to standby processor.Alternatively, detecting in the present embodiment the judgment mode whether main bus break down can include but not limited to: connect control circuit (I/O link) by the I/O in processor and judge that by the mark in the data that receive whether main bus is in normal running status.
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.Primary processor CPU Module_1 sends the indicator signal of the running status that is used to indicate primary processor CPU Module_1 in real time to standby processor CPU Module_2 by the first communication interface T1, standby processor CPU Module_2 detects to judge whether hear in the given time whether the other side's " heartbeat " or " heartbeat " that receive occur extremely by second communication interface T1 '.If suppose, primary processor CPU Module_1 does not break down, and whether the mark further detecting in the data that the I/O connection control circuit (I/O link) that judge in primary processor CPU Module_1 receives is main bus SYS_NET1.
S2, if primary processor breaks down, switches to primary processor standby processor, make the I/O equipment of communicating by letter with primary processor by main bus before switching after switching by main bus and for processor communication;
Alternatively, the fault that the primary processor that standby processor detects in the present embodiment occurs comprise following one of at least: the indicator signal instruction that does not receive in the given time the indicator signal of the running status that is used to indicate primary processor, the running status that is used to indicate primary processor that receives is abnormal.
For example, shown in Fig. 1, for example, if judging primary processor CPU Module_1 (breaks down, standby processor CPU Module_2 does not receive the indicator signal of the running status that is used to indicate primary processor CPU Module_1 within the predetermined time), primary processor CPU Module_1 is switched to standby processor CPU Module_2, the I/O equipment of communicating by letter with primary processor CPU Module_1 by main bus SYS_NET1 before switching is communicated by letter with standby processor CPU Module_2 by main bus SYS_NET1 after switching.
Alternatively, before switching, can be, but not limited to carry out synchronous data transmission at primary processor and standby processor in the present embodiment.Further illustrate, standby processor CPU Module_2 will prepare at any time, once need to switch, is switching to the processor of current operation with regard to obtaining ownership at once.Therefore, primary processor CPU Module_1 must be real-time transmitted to standby processor CPU Module_2 by the indicator signal of running status by the status information of oneself, standby processor CPU Module_2 is synchronizeed with primary processor CPU Module_1 hold mode, data, in the time will switching, just can realize undisturbed switching like this.
Alternatively, data between PLC synchronously can include but not limited to adopt hardware synchronization and two kinds of methods of software synchronization in the present embodiment, and wherein, hardware synchronization provides the bus of synchrodata, the namely synchronous needed data channel of data, real-time sends data to for processor; Software synchronization is to send synchrodata to standby processor CPU Module_2 by communication line.
Alternatively, primary processor CPU Module_1 and standby processor CPU Module_2 can be, but not limited to possess 2 mutually redundant two Ethernet interfaces in the present embodiment, concrete example is in conjunction with shown in Fig. 1, primary processor CPU Module_1 comprises mutually redundant two Ethernet interface E1 and E2, standby processor CPU Module_2 comprises mutually redundant two Ethernet interface E1 ' and E2 ', the IP address of different segment is set on two Ethernet interfaces of above-mentioned each processor, by 2 corresponding IP addresses are set on human-computer interaction interface HMI, accomplish the communication redundancy of PLC system and HMI.
For example, as shown in Figure 2, suppose that current primary processor CPU Module_1 and standby processor CPU Module_2 for example, by Ethernet and third party device (, human-computer interaction interface HMI) communication.Primary processor CPU Module_1 and 2 IP addresses that are set to respectively different segment for processor CPU Module_2 two Ethernet interfaces separately, such as the E1 mouth of CPU Module_1 is 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 made as respectively 192.168.1.100 and 10.10.1.10.
Alternatively, human-computer interaction interface HMI active/standby two communication links of having communicated by letter with said system in the present embodiment, for example, between HMI as shown in Figure 2 and switch Switcn1 and Switcn2, communicate by link a, link d respectively, article two, link can be worked simultaneously, conventionally taking one as main, another is auxiliary, and when primary link failure, HMI will automatically switch to another communication link.
Further illustrate, whether the primary processor CPU Module_1 that said system middle controller is controlled works and judges to realize by self with the network interface of standby processor CPU Module_2, in the time that primary processor CPU Module_1 is main work, its E1 mouth, E2 mouth is all the time in state of activation, and two ports all can be realized data communication with HMI, the E1 ' of standby processor CPU Module_2 mouthful, E2 ' is mouthful in illegal state, and is rendered as high-impedance state.
In the time that primary processor CPU Module_1 works, human-computer interaction interface HMI and CPU A have two communication link a-b and d-f, and two links can be worked simultaneously.Suppose that current a-b is main active link, d-f link is standby active link (but the communication instruction can recipient's machine interactive interface HMI issuing respond); If communication link a-b occurs abnormal, human-computer interaction interface HMI automatic switchover d-f communication link carrys out work.Primary processor CPU Module_1 when work, the E1 ' of standby processor CPU Module_2 mouthful, E2 ' is in illegal state, and is rendered as high-impedance state.If primary processor CPU Module_1 breaks down, controller can automatic ruling be switched to standby processor CPU Module_2 and proceeds communication.
In the time of standby processor CPU Module_2 work, human-computer interaction interface HMI and standby processor CPU Module_2 have two communication link a-c and d-e, and two links can be worked simultaneously.Suppose that current a-c is main active link, d-e link is for active link (but the communication instruction can recipient's machine interactive interface HM issuing respond); If communication link a-c occurs abnormal, automatic switchover d-e communication link is carried out work by human-computer interaction interface HMI.The E1 mouth of primary processor CPU Module_1 when standby processor CPU Module_2 work, E2 is in illegal state, and is rendered as high-impedance state.
S3, if main bus breaks down, switches to main bus standby bus, and the primary processor and the I/O equipment that before switching, intercom mutually by main bus are communicated by standby bus after switching;
Alternatively, detecting in the present embodiment the judgment mode whether main bus break down can include but not limited to: connect control circuit (I/O link) by the I/O in processor and judge that by the mark in the data that receive whether main bus is in normal running status.
For example, shown in Fig. 3, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When mark in the data that received by the I/O connection control circuit (I/O link) in primary processor CPU Module_1 show that the communication of main bus SYS_NET1 is broken down, main bus SYS_NET1 is switched to standby bus SYS_NET2, the primary processor CPU Module_1 and the I/O equipment that before switching, intercom mutually by main bus SYS_NET1 are communicated by standby bus SYS_NET2 after switching, so just ensured without the reliability service that also can ensure system in the situation of I/O redundancy.
S4, if primary processor and main bus all break down, switches to primary processor standby processor, and main bus is switched to standby bus, makes the I/O equipment of communicating by letter with primary processor by main bus before switching pass through afterwards standby bus and standby processor communication in switching.
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When do not receive in the given time the indicator signal of the running status that is used to indicate primary processor CPU Module_1 for processor CPU Module_2, primary processor CPU Module_1 is switched to standby processor CPU Module_2, again when the mark in the data that connected control circuit (I/O link) reception for processor CPU Module_2 by I/O learns that main bus SYS_NET1 also breaks down, main bus SYS_NET1 is switched to standby bus SYS_NET2, the I/O equipment of communicating by letter with primary processor CPU Module_1 by main bus SYS_NET1 before switching is communicated by letter with standby processor CPU Module_2 by standby bus SYS_NET2 after switching.
The embodiment providing by the application, show that by judgement primary processor and/or main bus break down, controlling above-mentioned primary processor switches to standby processor and/or controls above-mentioned main bus and switch to standby bus, overcome the lower problem of redundant fashion reliability that conventional art adopts, realized the effect that improves the reliability of Programmable Logic Controller PLC; In addition, multiple communication interfaces are also set in active/standby processor, can be by controlling the unlatching of some communication interfaces or forbidding, realize the effect of saving IP resource, expand redundancy quantity; Also can realize the real-time state-detection of primary processor by some communication interfaces, so that while breaking down, primary processor can be switched in time for processor.
As the optional scheme of one, I/O equipment comprises main I/O equipment and standby I/O equipment, wherein, in the time judging whether primary processor and/or main bus break down, also comprises:
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 be positioned at same substrate, and wherein, above-mentioned I/O equipment is mainly for carrying out alternately, realizing the input and output of signal with scene.Alternatively, main I/O equipment in the present embodiment can include but not limited to AO, AI, DO, tetra-kinds of fasteners of DI, and corresponding, standby I/O equipment in the present embodiment can include but not limited to AO ', AI ', DO ', DI '.Alternatively, active/standby I/O equipment can be, but not limited to as independent board in the present embodiment, for example, and AI board.
Alternatively, main I/O equipment in the present embodiment and standby I/O equipment can also comprise the communication interface of the indicator signal of the running status for transmitting main I/O equipment.For example, as shown in Figure 4, main I/O equipment comprises AI board, DI board, and the communication interface of above-mentioned board is respectively P1, P2, and standby I/O equipment comprises AI ' board, DI ' board, the communication interface of above-mentioned board is respectively P1 ', P2 '.
Alternatively, I/O equipment in the present embodiment can show by LED light the signal condition of current input and output.
Alternatively, the judgment mode in the present embodiment whether main I/O equipment being broken down includes but not limited to: heartbeat detection, state-detection.Wherein, the mode of detection can include but not limited to following mode: main I/O equipment sends the indicator signal of the running status that is used to indicate main I/O equipment in real time to standby I/O equipment.
For example, as shown in Figure 4, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.Main I/O equipment (for example, AI board) by third communication interface (for example, P1 mouth) in real time to standby I/O equipment (for example, AI ' board) the 4th communication interface (for example, P1 ' mouthful) send and (be for example used to indicate main I/O equipment, AI board) the indicator signal of running status, standby I/O equipment detects to judge whether hear in the given time whether the other side's " heartbeat " or " heartbeat " that receive occur extremely by the 4th communication interface P1 '.
S2, if main I/O equipment breaks down, switches to main I/O equipment standby I/O equipment, make before switching primary processor by main bus and main I/O devices communicating after switching by main bus with for I/O devices communicating.
For example, as shown in Figure 4, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1, wherein, using AI, DI card as main I/O equipment, AI ', DI ' are as the standby I/O equipment of AI, DI.For example, if (judge main I/O equipment, AI board) (for example break down, standby I/O equipment (for example, AI ' board) do not receive within the predetermined time and (be for example used to indicate main I/O equipment, AI board) the indicator signal of running status), main I/O equipment is switched to standby I/O equipment, make the primary processor CPU Module_1 by main bus SYS_NET1 and main I/O devices communicating before switching pass through afterwards main bus SYS_NET1 and standby I/O devices communicating in switching.
Further illustrate, between two I/O equipment, carry out data interaction by the system bus on same substrate, carry out ruling according to the signal gathering separately, make one of them I/O equipment in running status (i.e. main I/O equipment), another I/O equipment is in standby condition (i.e. standby I/O equipment); In standby I/O equipment in standby condition and system, effectively I/O is connected bus between control circuit (I/Olink) by locked, and Ji Gai road system bus is in high-impedance state.
Alternatively, in the present embodiment the detection of I/O equipment be can be, but not limited to: periodic queries.For example, I/O periodically (for example connects control circuit (I/O link), cycle T is about 1.5ms) whether the main I/O equipment running status of inquiry Programmable Logic Controller PLC normal, and state is returned to CPU (for example, every 100ms returns to CPU processor once).The running status of the main I/O equipment that CPU returns by regular detection I/O connection control circuit (I/O link) in operational process like this, and by start a regular task in system, regularly main I/O equipment is carried out to poll, to determine the running status of main I/O equipment, and then determine that whether main I/O equipment is in normal work.
The embodiment providing by the application, judge by being positioned at the standby I/O equipment of same substrate whether main I/O equipment breaks down, can be after judgement be broken down, directly control the switching of active/standby I/O equipment, overcome the inconvenience of existing system-level active/standby switching, realize the switching based on module, reached and improved the dirigibility of the active/standby switching of I/O equipment and the object of reliability.
As the optional scheme of one, after judging whether main I/O equipment breaks down, also comprise:
S1, if primary processor and main I/O equipment break down, primary processor is switched to standby processor, and main I/O equipment is switched to standby I/O equipment, before making to switch, after switching, make standby processor and standby I/O equipment communicate for the main bus that primary processor and main I/O equipment are communicated;
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When do not receive within the predetermined time the indicator signal of the running status that is used to indicate primary processor CPU Module_1 for processor CPU Module_2, primary processor CPU Module_1 is switched to standby processor CPU Module_2, primary processor CPU Module_1 is switched to standby processor CPU Module_2, further standby I/O equipment also receives the indicator signal of the running status that is used to indicate main I/O equipment, draw and occur extremely by indicator signal judgement, main I/O equipment is switched to standby I/O equipment, before making to switch, after switching, make standby processor CPU Module_2 and standby I/O equipment communicate for the main bus SYS_NET1 that primary processor CPU Module_1 and main I/O equipment are communicated.
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, make the primary processor by main bus and main I/O devices communicating before switching pass through afterwards standby bus and standby I/O devices communicating in switching;
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When mark in the data that received by the I/O connection control circuit (I/O link) in primary processor CPU Module_1 show that the communication of main bus SYS_NET1 is broken down, main bus SYS_NET1 is switched to standby bus SYS_NET2, further standby I/O equipment receives again the indicator signal of the running status that is used to indicate main I/O equipment, indicator signal instruction occurs abnormal, main I/O equipment is switched to standby I/O equipment, make the primary processor CPU Module_1 by main bus SYS_NET1 and main I/O devices communicating before switching pass through afterwards standby bus SYS_NET2 and standby I/O devices communicating in switching.
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, make to interrupt afterwards primary processor by the communicating by letter of main bus and main I/O equipment in switching, and after switching, make standby processor communicate by standby bus and standby I/O equipment.
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When do not receive within the predetermined time the indicator signal of the running status that is used to indicate primary processor CPU Module_1 for processor CPU Module_2, primary processor CPU Module_1 is switched to standby processor CPU Module_2, when mark in the data that received by the I/O connection control circuit (I/O link) in standby processor CPU Module_2 after further switching show that the communication of main bus SYS_NET1 is broken down, main bus SYS_NET1 is switched to standby bus SYS_NET2, standby I/O equipment receives again the indicator signal of the running status that is used to indicate main I/O equipment, indicator signal instruction occurs abnormal, main I/O equipment is switched to standby I/O equipment, make to interrupt afterwards primary processor CPU Module_1 communicating by letter by main bus SYS_NET1 and main I/O equipment in switching, and after switching, make standby processor CPU Module_2 communicate with standby I/O equipment by standby bus SYS_NET2.
The embodiment providing by the application, by primary processor, main bus and main I/O equipment are judged respectively, and then draw in the time that primary processor and main I/O equipment break down, in the time that main bus and main I/O equipment break down, changing method in three kinds of situations that all break down at primary processor, main bus and main I/O equipment, realize the active/standby switching based on module, reached and improved the dirigibility of system and the object of reliability.
As the optional scheme of one, judge whether main I/O equipment breaks down to comprise:
S1, whether the indicator signal that standby I/O equipment Inspection is used to indicate the running status of main I/O equipment occurs extremely;
Alternatively, whether the indicator signal of the running status to main I/O equipment occurs extremely including but not limited in the present embodiment: the indicator signal, the indicator signal instruction that do not receive the running status that is used to indicate main I/O equipment occur abnormal on time, what wherein, indicator signal occurred can include but not limited to that signal waveform is abnormal extremely.
Alternatively, main I/O equipment or standby I/O equipment can be, but not limited to as independent board in the present embodiment, for example, and AI board.
S2, it is abnormal if detect, indicator signal occurs, controls main I/O equipment and switches to standby I/O equipment.
For example, shown in Fig. 4, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.Main I/O equipment comprises AI board, DI board, and the communication interface of above-mentioned board is respectively P1, P2, and standby I/O equipment comprises AI ' board, DI ' board, the communication interface of above-mentioned board is respectively P1 ', P2 '.When standby I/O equipment (for example, AI ' board) receive and (be for example used to indicate main I/O equipment by communication interface P1 ', AI board) the indicator signal of running status (for example indicate main I/O equipment, AI board) occur extremely, can control separately AI board and switch to AI ' board for subsequent use, and can not affect the normal work of the board of other types, for example, main I/O equipment DI board does not break down, and can switch to DI ' board for subsequent use.Like this, the switching based on module is not only more flexible, has also improved the reliability of system.
The embodiment providing by the application, by the judgement whether main I/O equipment is broken down based on module, overcome the problem of the expansion inconvenience that in prior art, the active/standby switching of the machine cage based on system causes, make the redundancy control system of Programmable Logic Controller PLC more flexible, reliability also increases.
As the optional scheme of one, main bus is switched to standby bus and comprises:
S1, judges the mark that comprises main bus in the data that primary processor or standby processor receive or the mark of standby bus;
Alternatively, judge that in the present embodiment the mark that comprises main bus in the data that primary processor or standby processor receive or the mode of the mark of standby bus can include but not limited to: connect control circuit (I/O link) by the I/O in processor and judge that by the mark in the data that receive whether main bus is in normal running status.
S2, is the mark that comprises standby bus if judge, and main bus is switched to standby bus.
For example, shown in Fig. 3, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When mark in the data that received by the I/O connection control circuit (I/O link) in primary processor CPU Module_1 show that the communication of main bus SYS_NET1 is broken down, main bus SYS_NET1 is switched to standby bus SYS_NET2, the primary processor CPU Module_1 and the I/O equipment that before switching, intercom mutually by main bus SYS_NET1 are communicated by standby bus SYS_NET2 after switching, so just ensured without the reliability service that also can ensure system in the situation of I/O redundancy.
The embodiment providing by the application, adopts the mode of dual bus, makes can not affect the I/O equipment of other types in the time that I/O equipment switches, and the while, this redundant fashion also ensured reliability of operation.
As one scheme alternatively, primary processor is switched to standby processor and comprises:
S1, whether the indicator signal that standby processor detects the running status that is used to indicate primary processor occurs extremely;
Alternatively, whether the indicator signal of the running status to primary processor occurs extremely including but not limited in the present embodiment: the indicator signal, the indicator signal instruction that do not receive the running status that is used to indicate primary processor occur abnormal on time, what wherein, indicator signal occurred can include but not limited to that signal waveform is abnormal extremely.
S2, it is abnormal if detect, indicator signal occurs, controls primary processor and switches to standby processor.
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When do not receive in the given time the indicator signal of the running status that is used to indicate primary processor CPU Module_1 for processor CPU Module_2, or, standby processor CPU Module_2 receives the indicator signal of the running status that is used to indicate primary processor CPU Module_1, but it is abnormal that indicator signal instruction occurs, primary processor CPU Module_1 is switched to standby processor CPU Module_2.
The embodiment providing by the application, show that by judgement primary processor breaks down, control above-mentioned primary processor and switch to standby processor, overcome the lower problem of redundant fashion reliability that conventional art adopts, realized the effect that improves the reliability of Programmable Logic Controller PLC.
The invention provides a kind of preferred embodiment and come further the present invention to be made an explanation, but it should be noted that the preferred embodiment, just in order better to describe the present invention, does not form the present invention is limited improperly.
Embodiment 2
According to the embodiment of the present invention, a kind of Programmable Logic Controller redundancy control system is also provided, as shown in Figure 6, comprise in this system of the present embodiment:
(1) primary processor 602, is set to be connected respectively with main bus and standby bus;
(2) standby processor 604, is set to be connected respectively with main bus and standby bus, and is connected with primary processor;
Alternatively, primary processor in the present embodiment backups each other with standby processor, and main bus backups each other with standby bus.
Alternatively, 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) in the present embodiment.Alternatively, primary processor is in the present embodiment to there being standby processor, and main bus is to there being standby bus, and main I/O equipment is to there being standby I/O equipment.Shown in Fig. 1, comprise primary processor CPU Module_1, standby processor CPU Module_2 for implementing the system of above-mentioned Programmable Logic Controller redundancy control method in the present embodiment, switch Switch1, Switch2, main bus SYS_NET1, standby bus SYS_NET2, and main I/O equipment I/O Module1, standby I/O equipment I/O Module2.
Alternatively, primary processor in the present embodiment can be, but not limited to communicate by letter with third party device by RS232 bus or Ethernet with standby processor, transfers data to data center station.Alternatively, primary processor in the present embodiment or standby processor can include but not limited to: central control processor (CPU), is connected control circuit with I/O.Wherein, CPU can be, but not limited to carry out following at least one operation: data processing, data operation, peripheral communication, I/O connects control circuit (I/O Link) and can be, but not limited to select corresponding bus and I/O equipment to carry out data communication.Alternatively, CPU processor in the present embodiment has self-checking function, system running state can be shown by eight segment numeral pipes.
Alternatively, primary processor in the present embodiment and standby processor can include but not limited to: multiple communication interfaces.For example, as shown in Figure 1, primary processor CPU Module_1 comprises: the first communication interface T1, for send the indicator signal of the running status of primary processor CPU Module_1 to standby processor CPU Module_2; Mutually redundant two Ethernet interface E1 and E2, for carrying out data communication with human-computer interaction interface HMI; Standby processor CPU Module_2 comprises: second communication interface T1 ', be used for the indicator signal of the running status that receives primary processor CPU Module_1, mutually redundant two Ethernet interface E1 ' and E2 ', for carrying out data communication with human-computer interaction interface HMI.
Alternatively, carry out the main I/O equipment of data communication and can be, but not limited to be positioned at same substrate for I/O equipment in the present embodiment with primary processor or standby processor, wherein above-mentioned I/O equipment is mainly for carrying out alternately, realizing the input and output of signal with scene.
Alternatively, the judgment mode in the present embodiment whether primary processor being broken down includes but not limited to: heartbeat detection, state-detection.Wherein, the mode of detection can include but not limited to following mode: primary processor sends the indicator signal of the running status that is used to indicate primary processor in real time to standby processor.
Alternatively, the fault that the primary processor that standby processor detects in the present embodiment occurs comprise following one of at least: the indicator signal instruction that does not receive in the given time the indicator signal of the running status that is used to indicate primary processor, the running status that is used to indicate primary processor that receives is abnormal.
Alternatively, whether the indicator signal of the running status to primary processor occurs extremely including but not limited in the present embodiment: the indicator signal, the indicator signal instruction that do not receive the running status that is used to indicate primary processor occur abnormal on time, what wherein, indicator signal occurred can include but not limited to that signal waveform is abnormal extremely.
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.Primary processor CPU Module_1 sends the indicator signal of the running status that is used to indicate primary processor CPU Module_1 in real time to standby processor CPU Module_2 by the first communication interface T1, standby processor CPU Module_2 detects to judge whether hear in the given time whether the other side's " heartbeat " or " heartbeat " that receive occur extremely by second communication interface T1 '.For example, if judging primary processor CPU Module_1 (breaks down, standby processor CPU Module_2 does not receive the indicator signal of the running status that is used to indicate primary processor CPU Module_1 within the predetermined time), primary processor CPU Module_1 is switched to standby processor CPU Module_2, the I/O equipment of communicating by letter with primary processor CPU Module_1 by main bus SYS_NET1 before switching is communicated by letter with standby processor CPU Module_2 by main bus SYS_NET1 after switching.
Alternatively, before switching, can be, but not limited to carry out synchronous data transmission at primary processor and standby processor in the present embodiment.Further illustrate, standby processor CPU Module_2 will prepare at any time, once need to switch, is switching to the processor of current operation with regard to obtaining ownership at once.Therefore, primary processor CPU Module_1 must be real-time transmitted to standby processor CPU Module_2 by the indicator signal of running status by the status information of oneself, standby processor CPU Module_2 is synchronizeed with primary processor CPU Module_1 hold mode, data, in the time will switching, just can realize undisturbed switching like this.
Alternatively, data between PLC synchronously can include but not limited to adopt hardware synchronization and two kinds of methods of software synchronization in the present embodiment, and wherein, hardware synchronization provides the bus of synchrodata, the namely synchronous needed data channel of data, real-time sends data to for processor; Software synchronization is to send synchrodata to standby processor CPU Module_2 by communication line.
(3) main bus 606, is set to the equipment connection with I/O;
(4) standby bus 608, is set to the equipment connection with I/O;
Alternatively, detecting in the present embodiment the judgment mode whether main bus break down can include but not limited to: connect control circuit (I/O link) by the I/O in processor and judge that by the mark in the data that receive whether main bus is in normal running status.
For example, shown in Fig. 3, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.When mark in the data that received by the I/O connection control circuit (I/O link) in primary processor CPU Module_1 show that the communication of main bus SYS_NET1 is broken down, main bus SYS_NET1 is switched to standby bus SYS_NET2, the primary processor CPU Module_1 and the I/O equipment that before switching, intercom mutually by main bus SYS_NET1 are communicated by standby bus SYS_NET2 after switching, so just ensured without the reliability service that also can ensure system in the situation of I/O redundancy.
The embodiment providing by the application, the embodiment providing by the application, show that by judgement primary processor and/or main bus break down, controlling above-mentioned primary processor switches to standby processor and/or controls above-mentioned main bus and switch to standby bus, overcome the lower problem of redundant fashion reliability that conventional art adopts, realized the effect that improves the reliability of Programmable Logic Controller PLC.
As the optional scheme of one, as shown in Figure 7, system in the present embodiment also comprises: I/O equipment, and wherein, I/O equipment comprises:
(1) main I/O equipment 702, is set to be connected respectively with main bus and standby bus; And/or
(2) standby I/O equipment 704, is set to be connected respectively with main bus and standby bus, and with main I/O equipment connection;
Alternatively, main I/O equipment in the present embodiment backups each other with standby I/O equipment.
Alternatively, main I/O equipment in the present embodiment and standby I/O equipment can be, but not limited to be positioned at same substrate, and wherein, above-mentioned I/O equipment is mainly for carrying out alternately, realizing the input and output of signal with scene.Alternatively, main I/O equipment in the present embodiment can include but not limited to AO, AI, DO, tetra-kinds of fasteners of DI, and corresponding, standby I/O equipment in the present embodiment can include but not limited to AO ', AI ', DO ', DI '.Alternatively, active/standby I/O equipment can be, but not limited to as independent board in the present embodiment, for example, and AI board.
Alternatively, main I/O equipment in the present embodiment and standby I/O equipment can also comprise the communication interface of the indicator signal of the running status for transmitting main I/O equipment.For example, as shown in Figure 4, main I/O equipment comprises AI board, DI board, and the communication interface of above-mentioned board is respectively P1, P2, and standby I/O equipment comprises AI ' board, DI ' board, the communication interface of above-mentioned board is respectively P1 ', P2 '.Alternatively, I/O equipment in the present embodiment can show by LED light the signal condition of current input and output.
Alternatively, the judgment mode in the present embodiment whether main I/O equipment being broken down includes but not limited to: heartbeat detection, state-detection.Wherein, the mode of detection can include but not limited to following mode: main I/O equipment sends the indicator signal of the running status that is used to indicate main I/O equipment in real time to standby I/O equipment.
Alternatively, whether the indicator signal of the running status to main I/O equipment occurs extremely including but not limited in the present embodiment: the indicator signal, the indicator signal instruction that do not receive the running status that is used to indicate main I/O equipment occur abnormal on time, what wherein, indicator signal occurred can include but not limited to that signal waveform is abnormal extremely.
For example, as shown in Figure 4, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1, wherein, using AI, DI card as main I/O equipment, AI ', DI ' are as the standby I/O equipment of AI, DI.For example, if (judge main I/O equipment, AI board) (for example break down, standby I/O equipment (for example, AI ' board) do not receive within the predetermined time and (be for example used to indicate main I/O equipment, AI board) the indicator signal of running status), main I/O equipment is switched to standby I/O equipment, make the primary processor CPU Module_1 by main bus SYS_NET1 and main I/O devices communicating before switching pass through afterwards main bus SYS_NET1 and standby I/O devices communicating in switching.
Further illustrate, between two I/O equipment, carry out data interaction by the system bus on same substrate, carry out ruling according to the signal gathering separately, make one of them I/O equipment in running status (i.e. main I/O equipment), another I/O equipment is in standby condition (i.e. standby I/O equipment); In standby I/O equipment in standby condition and system, effectively I/O is connected bus between control circuit (I/O link) by locked, and Ji Gai road system bus is in high-impedance state.
Alternatively, in the present embodiment the detection of I/O equipment be can be, but not limited to: periodic queries.For example, I/O periodically (for example connects control circuit (I/O link), cycle T is about 1.5ms) whether the main I/O equipment running status of inquiry Programmable Logic Controller PLC normal, and state is returned to CPU (for example, every 100ms returns to CPU processor once).The running status of the main I/O equipment that CPU returns by regular detection I/O connection control circuit (I/O link) in operational process like this, and by start a regular task in system, regularly main I/O equipment is carried out to poll, to determine the running status of main I/O equipment, and then determine that whether main I/O equipment is in normal work.
The embodiment providing by the application, judge by being positioned at the standby I/O equipment of same substrate whether main I/O equipment breaks down, can be after judgement be broken down, directly control the switching of active/standby I/O equipment, overcome the inconvenience of existing system-level active/standby switching, realize the switching based on module, reached and improved the dirigibility of the active/standby switching of I/O equipment and the object of reliability.
As the optional scheme of one, primary processor 602 in the present embodiment comprises:
(1) first central control processor, is set to be connected with an I/O control circuit and connects;
Alternatively, CPU in the present embodiment can be, but not limited to carry out following at least one operation: data processing, data operation, peripheral communication, I/O connects control circuit (I/O Link) and can be, but not limited to select corresponding bus and I/O equipment to carry out data communication.Alternatively, CPU processor in the present embodiment has self-checking function, system running state can be shown by eight segment numeral pipes.
(2) the one I/O connect control circuit, are set to be connected with main bus and standby bus, select main bus or standby bus and I/O equipment to communicate for controlling.
Alternatively, detecting in the present embodiment the judgment mode whether main bus break down can include but not limited to: connect control circuit (I/O link) by the I/O in processor and judge that by the mark in the data that receive whether main bus is 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 comprise communication module 502, as shown in Figure 5, this communication module 502 not only can be used as the interactive interface of processor and bus (SYS_NET), also can be, but not limited to provide 24V power supply for processor, I/O equipment simultaneously.Alternatively, in the present embodiment, above-mentioned communication module 502 can be, but not limited to the head by RJ45, is connected control circuit (I/O link) or I/O equipment communicates with the I/O in processor.
The embodiment providing by the application, connect two textural associations of control circuit by the central control processor in processor and I/O, the switching of co-controlling primary processor and main bus, realize the active/standby switching of module in flexible control system, also improved the reliability of system simultaneously.
As the optional scheme of one, standby processor 604 in the present embodiment comprises:
(1) second central control processor, is set to be connected with the 2nd I/O control circuit and connects;
Alternatively, CPU in the present embodiment can be, but not limited to carry out following at least one operation: data processing, data operation, peripheral communication, I/O connects control circuit (I/O Link) and can be, but not limited to select corresponding bus and I/O equipment to carry out data communication.Alternatively, CPU processor in the present embodiment has self-checking function, system running state can be shown by eight segment numeral pipes.
(2) the 2nd I/O connect control circuit, are set to be connected with main bus and standby bus, for selecting main bus or standby bus and I/O equipment to communicate.
Alternatively, detecting in the present embodiment the judgment mode whether main bus break down can include but not limited to: connect control circuit (I/O link) by the I/O in processor and judge that by the mark in the data that receive whether main bus is 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 comprise communication module 502, as shown in Figure 5, this communication module 502 not only can be used as the interactive interface of processor and bus (SYS_NET), also can be, but not limited to provide 24V power supply for processor, I/O equipment simultaneously.Alternatively, in the present embodiment, above-mentioned communication module 502 can be, but not limited to the head by RJ45, is connected control circuit (I/O link) or I/O equipment communicates with the I/O in processor.
The embodiment providing by the application, connect two textural associations of control circuit by the central control processor in processor and I/O, co-controlling is for the switching of processor and standby bus, realize the active/standby switching of module in flexible control system, also improved the reliability of system simultaneously.
As the optional scheme of one, primary processor 602 in the present embodiment comprises:
(1) first communication interface, is set to be connected with standby processor, for send the indicator signal of the running status of instruction primary processor to standby processor;
Alternatively, standby processor comprises in the present embodiment:
(1) second communication interface, is set to be connected with primary processor, for receiving the indicator signal of the running status of indicating primary processor;
Whether (2) first pick-up units, are set to be connected with second communication interface, occur extremely for detection of the indicator signal of the running status of indicating primary processor.
Alternatively, primary processor in the present embodiment and standby processor can include but not limited to: multiple communication interfaces.For example, as shown in Figure 1, primary processor CPU Module_1 comprises: the first communication interface T1, for send the indicator signal of the running status of primary processor CPU Module_1 to standby processor CPU Module_2; Standby processor CPU Module_2 comprises: second communication interface T1 ', and for receiving the indicator signal of running status of primary processor CPU Module_1.
Alternatively, the fault that the primary processor that standby processor detects in the present embodiment occurs comprise following one of at least: the indicator signal instruction that does not receive in the given time the indicator signal of the running status that is used to indicate primary processor, the running status that is used to indicate primary processor that receives is abnormal.
Alternatively, whether the indicator signal of the running status to primary processor occurs extremely including but not limited in the present embodiment: the indicator signal, the indicator signal instruction that do not receive the running status that is used to indicate primary processor occur abnormal on time, what wherein, indicator signal occurred can include but not limited to that signal waveform is abnormal extremely.
For example, shown in Fig. 1, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.Primary processor CPU Module_1 sends the indicator signal of the running status that is used to indicate primary processor CPU Module_1 in real time to standby processor CPU Module_2 by the first communication interface T1, standby processor CPU Module_2 detects to judge whether hear in the given time whether the other side's " heartbeat " or " heartbeat " that receive occur extremely by second communication interface T1 '.
The embodiment providing by the application, show that by judgement primary processor breaks down, control above-mentioned primary processor and switch to standby processor, overcome the lower problem of redundant fashion reliability that conventional art adopts, realized the effect that improves the reliability of Programmable Logic Controller PLC.
As the optional scheme of one, main I/O equipment 702 in the present embodiment comprises:
(1) third communication interface, is set to and standby I/O equipment connection, for send the indicator signal of the running status of the main I/O equipment of instruction to standby I/O equipment;
Alternatively, standby I/O equipment comprises in the present embodiment:
(1) the 4th communication interface, is set to and main I/O equipment connection, for receiving the indicator signal of the running status of indicating main I/O equipment;
(2) whether second detection device, is set to be connected with the 4th communication interface, occur extremely for detection of the indicator signal of the running status of indicating main I/O equipment.
Alternatively, main I/O equipment in the present embodiment and standby I/O equipment can be, but not limited to be positioned at same substrate, and wherein, above-mentioned I/O equipment is mainly for carrying out alternately, realizing the input and output of signal with scene.Alternatively, main I/O equipment in the present embodiment can include but not limited to AO, AI, DO, tetra-kinds of fasteners of DI, and corresponding, standby I/O equipment in the present embodiment can include but not limited to AO ', AI ', DO ', DI '.Alternatively, active/standby I/O equipment can be, but not limited to as independent board in the present embodiment, for example, and AI board.
Alternatively, main I/O equipment in the present embodiment and standby I/O equipment can also comprise the communication interface of the indicator signal of the running status for transmitting main I/O equipment.For example, as shown in Figure 4, main I/O equipment comprises AI board, DI board, and the communication interface of above-mentioned board is respectively P1, P2, and standby I/O equipment comprises AI ' board, DI ' board, the communication interface of above-mentioned board is respectively P1 ', P2 '.
Alternatively, the judgment mode in the present embodiment whether main I/O equipment being broken down includes but not limited to: heartbeat detection, state-detection.Wherein, the mode of detection can include but not limited to following mode: main I/O equipment sends the indicator signal of the running status that is used to indicate main I/O equipment in real time to standby I/O equipment.
Alternatively, whether the indicator signal of the running status to main I/O equipment occurs extremely including but not limited in the present embodiment: the indicator signal, the indicator signal instruction that do not receive the running status that is used to indicate main I/O equipment occur abnormal on time, what wherein, indicator signal occurred can include but not limited to that signal waveform is abnormal extremely.
For example, as shown in Figure 4, suppose that current primary processor CPU Module_1 communicates by letter with main I/O equipment normally by main bus SYS_NET1.Main I/O equipment (for example, AI board) by third communication interface (for example, P1 mouth) in real time to standby I/O equipment (for example, AI ' board) the 4th communication interface (for example, P1 ' mouthful) send and (be for example used to indicate main I/O equipment, AI board) the indicator signal of running status, standby I/O equipment detects to judge whether hear in the given time whether the other side's " heartbeat " or " heartbeat " that receive occur extremely by the 4th communication interface P1 '.
As the optional scheme of one, this system also comprises: main I/O equipment is positioned at same substrate with standby I/O equipment.
Alternatively, primary processor CPU Module_1 and standby processor CPU Module_2 can be, but not limited to possess 2 mutually redundant two Ethernet interfaces in the present embodiment, concrete example is in conjunction with shown in Fig. 1, primary processor CPU Module_1 comprises mutually redundant two Ethernet interface E1 and E2, standby processor CPU Module_2 comprises mutually redundant two Ethernet interface E1 ' and E2 ', the IP address of different segment is set on two Ethernet interfaces of above-mentioned each processor, by 2 corresponding IP addresses are set on human-computer interaction interface HMI, accomplish the communication redundancy of PLC system and HMI.
For example, as shown in Figure 2, suppose that current primary processor CPU Module_1 and standby processor CPU Module_2 for example, by Ethernet and third party device (, human-computer interaction interface HMI) communication.Primary processor CPU Module_1 and 2 IP addresses that are set to respectively different segment for processor CPU Module_2 two Ethernet interfaces separately, such as the E1 mouth of CPU Module_1 is 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 made as respectively 192.168.1.100 and 10.10.1.10.
Alternatively, human-computer interaction interface HMI active/standby two communication links of having communicated by letter with said system in the present embodiment, for example, between HMI as shown in Figure 2 and switch Switcn1 and Switcn2, communicate by link a, link d respectively, article two, link can be worked simultaneously, conventionally taking one as main, another is auxiliary, and when primary link failure, HMI will automatically switch to another communication link.
Further illustrate, whether the primary processor CPU Module_1 that said system middle controller is controlled works and judges to realize by self with the network interface of standby processor CPU Module_2, in the time that primary processor CPU Module_1 is main work, its E1 mouth, E2 mouth is all the time in state of activation, and two ports all can be realized data communication with HMI, the E1 ' of standby processor CPU Module_2 mouthful, E2 ' is mouthful in illegal state, and is rendered as high-impedance state.
In the time that primary processor CPU Module_1 works, human-computer interaction interface HMI and CPU A have two communication link a-b and d-f, and two links can be worked simultaneously.Suppose that current a-b is main active link, d-f link is standby active link (but the communication instruction can recipient's machine interactive interface HMI issuing respond); If communication link a-b occurs abnormal, human-computer interaction interface HMI automatic switchover d-f communication link carrys out work.Primary processor CPU Module_1 when work, the E1 ' of standby processor CPU Module_2 mouthful, E2 ' is in illegal state, and is rendered as high-impedance state.If primary processor CPU Module_1 breaks down, controller can automatic ruling be switched to standby processor CPU Module_2 and proceeds communication.
In the time of standby processor CPU Module_2 work, human-computer interaction interface HMI and standby processor CPU Module_2 have two communication link a-c and d-e, and two links can be worked simultaneously.Suppose that current a-c is main active link, d-e link is for active link (but the communication instruction can recipient's machine interactive interface HM issuing respond); If communication link a-c occurs abnormal, automatic switchover d-e communication link is carried out work by human-computer interaction interface HMI.The E1 mouth of primary processor CPU Module_1 when standby processor CPU Module_2 work, E2 is in illegal state, and is rendered as high-impedance state.
The embodiment providing by the application, also arranges multiple communication interfaces in active/standby processor, can be by controlling the unlatching of some communication interfaces or forbidding, realize the effect of saving IP resource, and expand redundancy quantity; Also can realize the real-time state-detection of primary processor by some communication interfaces, so that while breaking down, primary processor can be switched in time for processor.
The invention provides a kind of preferred embodiment and come further the present invention to be made an explanation, but it should be noted that the preferred embodiment, just in order better to describe the present invention, does not form the present invention is limited improperly.
From above description, can find out, in embodiments of the present invention, by by the processor in Programmable Logic Controller, bus, I/O equipment all arranges active/standby two equipment, only overcome in prior art and to have carried out redundancy for specific independent module or whole system the technical matters that caused reliability is lower is set, whole system is broken down in independent module, or when operational blocks which partition system combination is broken down, all can realize under the module prerequisite that does not affect other types, carry out unperturbed switching, reach the object of switching flexibly based on module, thereby realize the technique effect that improves system reliability, and then solve the lower technical matters 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 a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.