CN204086849U - PLC redundancy control system - Google Patents

PLC redundancy control system Download PDF

Info

Publication number
CN204086849U
CN204086849U CN 201420215526 CN201420215526U CN204086849U CN 204086849 U CN204086849 U CN 204086849U CN 201420215526 CN201420215526 CN 201420215526 CN 201420215526 U CN201420215526 U CN 201420215526U CN 204086849 U CN204086849 U CN 204086849U
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
bus
main
standby
processor
system
Prior art date
Application number
CN 201420215526
Other languages
Chinese (zh)
Inventor
徐仁佐
阚伟
Original Assignee
北京龙鼎源科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

The utility model discloses a PLC (Programmable logic controller) redundancy control system, comprising a main processor configured to respectively connect with a main bus and a standby bus; a standby processor arranged to be respectively in connection with the main bus and the standby bus and connected to the main processor; the main bus configured to be connected with an I/O device; and the standby bus configured to be connected with the I/O device, wherein the main processor and the standby processor are backups for each other; the main bus and the standby bus are backups for each other. The PLC redundancy control system solves the technical problem of lower reliability of a present redundancy mode, and increases system reliability.

Description

可编程控制器冗余控制系统 Redundant control system PLC

技术领域 FIELD

[0001] 本实用新型涉及工业控制领域,具体而言,涉及一种可编程控制器冗余控制系统。 [0001] The present invention relates to the field of industrial control, particularly, to a redundant control system PLC.

背景技术 Background technique

[0002] 随着每年对具有更高可靠性系统产品的需求的逐年增加,可编程控制器(PLC,Programmable logic controller)作为工控领域的主要控制产品之一,发展具有冗余功能的PLC已成为其中一个重要的发展方向。 [0002] With the annual increase in the demand for products with higher reliability of the system every year, one of the programmable logic controller (PLC, Programmable logic controller) as the main field of industrial control products, development of PLC with redundancy has become one important development direction.

[0003] 现有的可编程控制器PLC所采用的冗余方式主要包括以下方式: Redundancy [0003] a conventional programmable logic controller PLC employed include the following ways:

[0004] I)单独针对处理器的冗余,传统的处理器冗余,通常采用两个处理器,通过专用冗余热备模块来实现切换后的数据同步,这种方式仅针对处理器,对于PLC中的其他部件并没有做出合理的冗余配置; [0004] I) alone for redundant processor, a conventional processor redundancy, usually two processors to implement the data after the handover by synchronization dedicated redundant hot spare module, only for the processor in this way, for other components in the PLC and it does not make sound redundant configuration;

[0005] 2)单独针对I/O板卡的冗余,通常采用机笼式冗余,其中,机笼是用于放置各个PLC板卡的基板,各板卡按一定的顺序放置在机架的不同的安装槽中,板卡之间用总线连接器连接。 [0005] 2) separately for redundant I / O board, usually Redundant cage, wherein the substrate is a cage for placing each PLC board, each board in a certain order in the rack different mounting groove, connected between the bus connector board. 当安装槽中的某一板卡出现故障,需要使用备份冗余时,必须同时切换整个机笼。 When the mounting groove of a board failure, it is necessary to use a redundant backup, the entire cage must be switched. 假设当前机笼A中包含了Al、D1、AO三种类型板卡,机笼B中是其冗余板卡,含有与机笼A中完全相同类型板卡。 A current hypothesis cage contains Al, D1, AO three types of cards, the cage B is a redundant card, and contain exactly the same as the type A cage card. 当机笼A中板卡为运行板卡时,机笼B中的板卡即为备用板卡,当机笼A中的Al卡故障时,则会立刻整体切换到机笼B中的备用板卡,切换后机笼B中的备用板卡将作为运行板卡;而机笼B中的DI卡故障时,则无法切回到机笼A利用机笼A中的DI卡,使得整个I/O板卡不得不停止工作。 A cage when the running board card, the card cage B is the standby board, when the cage A is Al card failure will immediately switch to the overall spare cage plate B card cage after switching the spare board B as the board run; DI while the card cage B is a failure, you can not switch back to using a cage a cage card a in the DI, such that the entire I / O boards had to stop work. 这种采用机笼的主/备切换的控制方式,本身存在扩展不方便的缺点,而且这种方式还存在主/备切换相互干扰的缺点,使得主/备切换的可靠性降低。 This cage control method using active / standby switching, extended inconvenient inherent disadvantages, and this way also the disadvantage master / slave switching interfere with each other, so that the reliability of the reduced primary / standby switching.

[0006] 针对上述的问题,目前尚未提出有效的解决方案。 [0006] In response to these problems, we have not yet come up with effective solutions.

实用新型内容 SUMMARY

[0007] 本实用新型实施例提供了一种可编程控制器冗余控制系统,以至少解决现有技术中所采用的冗余方式可靠性较低的技术问题。 [0007] Example embodiments of the present invention there is provided a programmable controller redundant control system in a redundant manner in at least solve the prior art used in technical problem of low reliability.

[0008] 根据本实用新型实施例的一个方面,提供了一种可编程控制器冗余控制系统,包括:主处理器,被设置为与主总线及备总线分别连接;备处理器,被设置为与上述主总线及上述备总线分别连接,并与上述主处理器连接;主总线,被设置为与I/o设备连接;备总线,被设置为与上述I/o设备连接; [0008] In accordance with one aspect of the present invention embodiment, there is provided a redundant PLC control system, comprising: a main processor, it is arranged to be connected to the main bus and the Bus respectively; standby processor arranged respectively connected to the main bus and said backup bus, and connected to the main processor; main bus, is provided to connect the I / o device; standby bus, is arranged to be connected to the I / o device;

[0009] 其中,上述主处理器与上述备处理器互为备份,上述主总线与上述备总线互为备份。 [0009] wherein the main processor and the standby processor up each other above the main bus and the Bus above-described redundancy.

[0010] 可选地,上述系统还包括:上述I/O设备,其中,上述I/O设备包括:主I/O设备,被设置为与上述主总线及上述备总线分别连接;和/或,备I/o设备,被设置为与上述主总线及上述备总线分别连接,并与上述主I/o设备连接;其中,上述主I/O设备与上述备I/O设备互为备份。 [0010] Alternatively, said system further comprising: the above-described I / O device, wherein the I / O device comprising: a primary I / O device, is arranged to be connected to the main bus and said backup bus, respectively; and / or , Preparation of I / o device, is arranged to be connected to the main bus and said bus are prepared and connected to the main I / o device; wherein said main I / O devices and the above-described standby I / O device redundancy.

[0011] 可选地,上述主处理器包括:第一中央控制处理器,被设置为与第一i/o连接控制电路连接;上述第一I/o连接控制电路,被设置为与上述主总线及上述备总线连接,用于选择上述主总线或上述备总线与上述I/O设备进行通信。 [0011] Alternatively, the main processor comprises: a first central processor, is arranged to be connected to the first connecting i / o control circuit; said first I / o connection control circuit, is set to the main Preparation bus and said bus, for selecting the main bus or the standby bus above the above-described I / O devices to communicate.

[0012] 可选地,上述备处理器包括:第二中央控制处理器,被设置为与第二I/O连接控制电路连接;上述第二I/o连接控制电路,被设置为与上述主总线及上述备总线连接,用于选择上述主总线或上述备总线与上述I/O设备进行通信。 [0012] Optionally, the processor apparatus comprising: a second central processor, is arranged to be connected to the second connecting I / O control circuit; said second I / o connection control circuit, is set to the main Preparation bus and said bus, for selecting the main bus or the standby bus above the above-described I / O devices to communicate.

[0013] 可选地,上述主处理器中包括:第一通信接口,被设置为与上述备处理器连接,用于向上述备处理器发送指示上述主处理器的运行状态的指示信号;上述备处理器中包括:第二通信接口,被设置为与上述主处理器连接,用于接收指示上述主处理器的运行状态的指示信号。 [0013] Alternatively, the main processor comprising: a first communication interface, is arranged to be connected to the standby processor for transmitting an instruction signal indicative of said main processor to the standby processor operating state; and the a processor apparatus comprising: a second communication interface is arranged to connect to the main processor for receiving an indication signal indicating the operating state of the main processor.

[0014] 可选地,上述备处理器中还包括:第一检测装置,被设置为与上述第二通信接口连接,用于检测上述指示上述主处理器的运行状态的指示信号是否出现异常。 [0014] Optionally, the processor apparatus further comprising: a first detecting means, is provided with the above-described second communication interface, for detecting the operating state signal indicating the instruction of the main processor is abnormal.

[0015] 可选地,上述主I/O设备包括:第三通信接口,被设置为与上述备I/O设备连接,用于向上述备I/o设备发送指示上述主I/O设备的运行状态的指示信号;上述备I/O设备包括:第四通信接口,被设置为与上述主I/o设备连接,用于接收指示上述主I/O设备的运行状态的指示信号。 [0015] Optionally, the main I / O devices comprising: a third communication interface apparatus arranged to be connected to the I / O device, for preparation to the I / o device transmits an indication of the main I / O devices a signal indicative of the operating state; and the standby I / O device comprising: a fourth communication interface is arranged to be connected to the main I / o device, for receiving an indication signal indicative of said main I / O devices operating state.

[0016] 可选地,上述备I/O设备还包括:第二检测装置,被设置为与上述第四通信接口连接,用于检测上述指示上述主I/o设备的运行状态的指示信号是否出现异常。 [0016] Alternatively, the above prepared I / O device further comprises: second detection means is arranged to communicate with the fourth interface, for detecting the operating state signal indicating the instruction of the main I / o device whether Abnormal.

[0017] 可选地,上述主处理器包括:互为备份的两个以太网接口;上述备处理器包括:互为备份的两个以太网接口。 [0017] Alternatively, the main processor comprising: two Ethernet interfaces mutual backup; and the processor apparatus comprising: two Ethernet interfaces mutual backup.

[0018] 可选地,上述主I/O设备与上述备I/O设备位于同一基板。 [0018] Optionally, the main I / O devices and the above-described standby I / O devices on the same substrate.

[0019] 在本实用新型实施例中,通过将可编程控制器中的处理器、总线、I/O设备均设置主/备两个设备,克服了现有技术中只针对特定的单独的模块或整个系统进行冗余设置所导致的可靠性较低的技术问题,使得整个系统在单独的模块出现故障,或者任意模块组合出现故障时,均可实现在不影响其他类型的模块前提下,进行无扰切换,达到了基于模块灵活切换的目的,从而实现了提高系统可靠性的技术效果,进而解决了现有技术中所采用的冗余方式可靠性较低的技术问题。 [0019] In the embodiment of the present invention, the programmable controller by the processor, bus, I / O devices are disposed master / slave two devices to overcome the prior art only for the particular individual modules or the entire system less reliable technical problem caused by the redundancy provided, such that a total system failure in a separate module, or any combination of the modules fails, the module can be achieved without affecting the other type of premise, for bumpless switching, to achieve the purpose of the flexible switch module, thereby achieving the technical effect of improving the reliability of the system, thereby solving the prior art redundancy employed in low reliability technical problems.

附图说明 BRIEF DESCRIPTION

[0020] 此处所说明的附图用来提供对本实用新型的进一步理解,构成本申请的一部分,本实用新型的示意性实施例及其说明用于解释本实用新型,并不构成对本实用新型的不当限定。 [0020] The drawings described herein are used to provide further understanding of the present invention to form part of this application, the present invention exemplary embodiments are used to explain the present invention and do not constitute the present invention to unduly limit. 在附图中: In the drawings:

[0021] 图1是根据本实用新型实施例的一种可选的可编程控制器冗余切换的示意图; [0021] FIG. 1 is a schematic diagram of the handover according to an alternative embodiment of the present invention, redundant programmable controller;

[0022] 图2是根据本实用新型实施例的另一种可选的可编程控制器冗余切换的示意图; [0022] FIG. 2 is a schematic view of the switching according to another alternative embodiment of the present invention, redundant programmable controller;

[0023] 图3是根据本实用新型实施例的又一种可选的可编程控制器冗余切换的示意图; [0023] FIG. 3 is a schematic view of a further handover according to an alternative embodiment of the present invention, redundant programmable controller;

[0024] 图4是根据本实用新型实施例的又一种可选的可编程控制器冗余切换的示意图; [0024] FIG. 4 is a schematic view of a further handover according to an alternative embodiment of the present invention, redundant programmable controller;

[0025] 图5是根据本实用新型实施例的又一种可选的可编程控制器冗余切换的示意图; [0025] FIG. 5 is a schematic view of a further handover according to an alternative embodiment of the present invention, redundant programmable controller;

[0026] 图6是根据本实用新型实施例的一种可选的可编程控制器冗余切换系统的示意图;以及 [0026] FIG. 6 is a schematic diagram of an alternative embodiment of the present invention the programmable controller redundancy switching system; and

[0027] 图7是根据本实用新型实施例的另一种可选的可编程控制器冗余切换系统的示意图。 [0027] FIG. 7 is a schematic diagram of another alternative embodiment of the present invention the programmable controller of the redundant switching system.

具体实施方式 detailed description

[0028] 下文中将参考附图并结合实施例来详细说明本实用新型。 [0028] with reference to the accompanying drawings and will hereinafter be described in detail embodiments of the present invention. 需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。 Incidentally, in the case of no conflict, embodiments and features of the embodiments of the present application can be combined with each other.

[0029] 实施例1 [0029] Example 1

[0030] 根据本实用新型实施例,提供了一种可编程控制器冗余控制方法,该方法包括: [0030] The embodiment of the present invention, there is provided a redundancy control method for a programmable controller, the method comprising:

[0031] SI,判断主处理器和/或主总线是否出现故障; [0031] SI, determines the main processor and / or primary bus is malfunctioning;

[0032] 可选地,在本实施例中上述可编程控制器冗余控制方法可以但不限于应用于中型混合可编程控制器(PLC, Programmable logic controller)。 [0032] Alternatively, in this embodiment the programmable redundancy control method of the above-described embodiments the controller may, but is not limited to be applied to medium-sized hybrid programmable logic controller (PLC, Programmable logic controller). 可选地,在本实施例中的主处理器对应有备处理器,主总线对应有备总线,主I/O设备对应有备I/O设备。 Alternatively, in the present embodiment corresponding to the embodiment has a main processor processor apparatus, there is prepared the corresponding master bus bus master I / O device has a corresponding standby I / O device. 结合图1所示,在本实施例中用于实施上述可编程控制器冗余控制方法的系统中包括主处理器CPUModule_l、备处理器CPU Module_2,交换机Switchl、Switch2,主总线SYS_NET1、备总线SYS_NET2,以及主I/O 设备1/0 Modulel、备1/0 设备1/0 Module2。 In conjunction with FIG. 1, in the present embodiment for implementing the above-described system redundant programmable controller control method includes a main processor CPUModule_l, standby processor CPU Module_2, switch Switchl, Switch2, main bus SYS_NET1, the Bus SYS_NET2 and a main I / O devices Module 1 1/0, 1/0 preparation apparatus 1/0 Module2.

[0033] 可选地,在本实施例中的主处理器和备处理器可以但不限于通过RS232总线或以太网与第三方设备通信,将数据传输给数据中心站。 [0033] Alternatively, in the present embodiment, the main processor and the standby processor embodiments may, but are not limited to Ethernet or RS232 bus via a third party communication device, the data transfer data to the central station. 可选地,在本实施例中的主处理器或备处理器可以包括但不限于:中央控制处理器(CPU),和1/0连接控制电路。 Alternatively, in the main or backup processor in the embodiment may include, but are not limited to: a central control processor (CPU), and 1/0 connection control circuit. 其中,CPU可以但不限于执行以下至少一种操作:数据处理、数据运算、外设通信,I/o连接控制电路(1/0Link)可以但不限于选择相应的总线与1/0设备进行数据通信。 Wherein, the CPU may be, but is not limited to at least one of the following operations: processing the data, computing data, communication peripherals, I / o connection control circuit (1 / 0Link) may, but is not limited to select the appropriate device data bus 1/0 communication. 可选地,在本实施例中的CPU处理器具有自检功能,能够将系统运行状态通过八段数码管显示。 Alternatively, in the present example embodiment has a CPU processor self-test function, the system can be run through the eight LED status display.

[0034] 可选地,在本实施例中的主处理器和备处理器可以包括但不限于:多个通信接口。 [0034] Alternatively, in the present embodiment, the main processor and the standby processor embodiments may include but are not limited to: a plurality of communication interfaces. 例如,如图1所示,主处理器CPU Module_l包括:第一通信接口Tl,用于向备处理器CPUModule_2发送主处理器CPU ModuleJ的运行状态的指示信号;互为备份的两个以太网接口El和E2,用于与人机交互界面HMI进行数据通信;备处理器CPU Module_2包括:第二通信接口Tl',用于接收主处理器CPU ModuleJ的运行状态的指示信号,互为备份的两个以太网接口ΕΓ和E2',用于与人机交互界面HMI进行数据通信。 For example, as shown in FIG. 1, the main CPU Module_l processor comprising: a first communication interface Tl, for transmitting a signal indicative of the operating state of the main processor to the standby processor CPU ModuleJ CPUModule_2; mutual backup two Ethernet interfaces El and E2 of, for data communication with the HMI machine interface; standby CPU module_2 processor comprising: a second communication interface Tl ', a signal for indicating the operating state of the host processor CPU ModuleJ receiving the backup for each two Ethernet interfaces ΕΓ and E2 ', for data communication with the human-machine interface HMI.

[0035] 可选地,在本实施例中与主处理器或备处理器进行数据通信的主1/0设备和备I/O设备可以但不限于位于同一基板,其中上述1/0设备主要是用来与现场进行交互,实现信号的输入输出。 [0035] Alternatively, a master 1/0 and data communications apparatus I / O device and the main processor or backup processor in the present embodiment but is not limited to the embodiment may be located in the same substrate, wherein said main apparatus 1/0 is used to interact with the scene, the implement input and output signals.

[0036] 可选地,在本实施例中对主处理器是否出现故障的判断方式包括但不限于:心跳检测、状态检测。 [0036] Alternatively, in the present embodiment, the main processor of the embodiment determines whether failure include but are not limited to: heartbeat, the state detection. 其中,检测的方式可以包括但不限于以下方式:主处理器实时向备处理器发送用于指示主处理器的运行状态的指示信号。 Wherein the detecting can include but are not limited to, the following: real-time host processor to the standby processor sends an instruction signal for indicating the operating state of the main processor. 可选地,在本实施例中检测主总线是否出现故障的判断方式可以包括但不限于:通过处理器中的I/o连接控制电路(1/0 link)通过接收的数据中的标识判断主总线是否处于正常的运行状态。 Alternatively, the detection of the main bus is faulty judgment can include but are not limited to the present embodiment: the identity is determined by a processor I / o connection control circuit (1/0 link) data received by the primary the bus is in normal operating condition.

[0037] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0037] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 主处理器CPU Module_l通过第一通信接口Tl实时向备处理器CPU Module_2发送用于指示主处理器CPU ModuleJ的运行状态的指示信号,则备处理器CPU Module_2通过第二通信接口Tl'检测判断在预定时间内是否听到对方的“心跳”或接收到的“心跳”是否出现异常。 A main processor CPU Module_l instruction signal transmits operational status of the main processor of the CPU ModuleJ Tl via the first communication interface in real time to the standby processor CPU Module_2, the processor CPU Module_2 prepared via the second communication interface Tl 'is determined in the detection Do you hear the other party within a predetermined time "heartbeat" or received "heartbeat" is abnormal. 若假设主处理器CPU ModuleJ未出现故障,则进一步检测判断主处理器CPU Module_l中的I/O连接控制电路(I/O link)所接收的数据中的标识是否为主总线SYS_NET I。 Assuming that the main processor CPU ModuleJ not faulted, the further detection data is determined in main CPU Module_l processor I / O connection control circuit (I / O Link) received identifies whether the main bus SYS_NET I.

[0038] S2,若主处理器出现故障,则将主处理器切换至备处理器,使得切换前通过主总线与主处理器通信的I/o设备在切换后通过主总线与备处理器通信; [0038] S2, if the primary processor fails, then the main processor to the standby processor is switched, so that the front and the standby processor is switched through the main bus through the main communication after the handover processor in communication with a bus master I / o device ;

[0039] 可选地,在本实施例中备处理器检测到的主处理器出现的故障包括以下至少之一:未在预定时间内接收到用于指示主处理器的运行状态的指示信号、接收到的用于指示主处理器的运行状态的指示信号指示异常。 Failure of the primary processor [0039] Alternatively, in this embodiment the processor apparatus detects embodiment comprises at least one of the following: an indication signal is not received for the operational status of the main processor within a predetermined time, It indicates that the received instruction signal for indicating the operating state of the main processor is abnormal.

[0040] 例如,结合图1所示,若判断出主处理器CPU ModuleJ出现故障(例如,备处理器CPUModule_2在预定的时间内没有接收到用于指示主处理器CPU Module_l的运行状态的指示信号),则将主处理器CPU Module_l切换至备处理器CPU Module_2,使得切换前通过主总线SYS_NET1与主处理器CPU ModuIe_l通信的I/O设备在切换后通过主总线SYS_NET1与备处理器CPU Module_2通信。 [0040] For example, in conjunction with FIG. 1, when it is determined that the host processor CPU ModuleJ failure (e.g., backup processor CPUModule_2 not received a signal for indicating the operational status of the main processor of the CPU Module_l within a predetermined time ), then the main processor to switch to standby CPU Module_l module_2 processor CPU, so that the pre-switching via I / O apparatus main bus SYS_NET1 ModuIe_l in communication with the main CPU via the main processor and the standby processor CPU bus SYS_NET1 module_2 communication after the handover .

[0041] 可选地,在本实施例中在主处理器和备处理器在切换之前可以但不限于进行同步数据传输。 [0041] Alternatively, this embodiment may be but not limited to synchronous data transmitted before switching the main processor and the standby processor in the present embodiment. 进一步说明,备处理器CPU Module_2要随时准备着,一旦需要进行切换,就立刻获取主控权切换成为当前运行的处理器。 Further instructions Standby processor CPU Module_2 be ready to, once required to be switched immediately to obtain mastership turns to the processor is currently running. 因此,主处理器CPU ModuleJ必须将自己的状态信息通过运行状态的指示信号实时传送给备处理器CPU Module_2,使备处理器CPUModule_2与主处理器CPU ModuleJ保持状态、数据同步,这样当要进行切换时,才可以实现无扰动的切换。 Accordingly, the main processor CPU ModuleJ must own status information indicating the operating state of the signal transmitted in real time to the standby processor CPU Module_2, prepared so that the processor with the main processor CPU ModuleJ CPUModule_2 hold state, data synchronization, so that when the switch to only when no disturbance switching can be achieved.

[0042] 可选地,在本实施例中PLC之间的数据同步可以包括但不限于采用硬件同步和软件同步两种方法,其中,硬件同步提供了同步数据的总线,也就是数据同步所需要的数据通道,实时的将数据传送给备处理器;软件同步则是将同步数据通过通信线路传送给备处理器CPUModule_2。 [0042] Alternatively, in the present embodiment, the data between the PLC embodiment synchronization may include but are not limited to hardware and software synchronization sync two methods, which provides bus synchronization hardware synchronization data, i.e. data required for synchronization data channel, to transmit data to the real-time backup processor; software synchronization sucked sync data to the processor CPUModule_2 apparatus through a communication line.

[0043] 可选地,在本实施例中主处理器CPU Module_l及备处理器CPU Module_2可以但不限于具备互为备份的两个以太网接口,具体示例结合图1所示,主处理器CPU Module」中包括互为备份的两个以太网接口El和E2,备处理器CPU Module_2中包括互为备份的两个以太网接口ΕΓ和E2',在上述各处理器的两个以太网接口上设置不同网段的IP地址,通过在人机交互界面HMI上设置2个相应的IP地址,做到PLC系统与HMI的通信冗余。 [0043] Alternatively, in the present embodiment, the main processor and the standby processor CPU CPU Module_l may module_2 includes but is not limited to two Ethernet interfaces mutual backup, in conjunction with a specific example shown in FIG. 1, the main CPU processor Module "includes two Ethernet interfaces mutual backup El and E2, the processor CPU module_2 preparation includes two Ethernet interfaces ΕΓ mutual backup and E2 ', two Ethernet interfaces on each of the processors in set different network IP addresses by setting the corresponding two IP addresses on the man-machine interface HMI, the PLC system to achieve the communication with the HMI redundant.

[0044] 例如,如图2所示,假设当前主处理器CPU Module_l及备处理器CPU Module_2通过以太网与第三方设备(例如,人机交互界面HMI)通信。 [0044] For example, as shown in FIG. 2, the host processor CPU Module_l assumed that the current and standby processor CPU Module_2 third-party equipment via Ethernet (e.g., human-machine interface HMI) communication. 主处理器CPU ModuleJ与备处理器CPU Module_2各自的两个以太网口分别设置为不同网段的2个IP地址,比如CPUModule_l 的El 口设置为192.168.1.101,E2 口设置为10.10.1.18,CPU Module_2 的设置与前者相同。 The main processor and the standby processor CPU ModuleJ CPU Module_2 respective two Ethernet ports respectively provided to two different IP addresses of network, such as the El CPUModule_l port is provided to 192.168.1.101, E2 port is provided to 10.10.1.18, CPU Module_2 same setting with the former. HMI具备2个网口,分别设为192.168.1.100和10.10.1.10。 HMI includes two Ethernet ports, and are set to 192.168.1.100 10.10.1.10.

[0045] 可选地,在本实施例中人机交互界面HMI与上述系统通信有主/备两个通信链路,例如,如图2所示的HMI与交换机Switcnl和Switcn2之间分别通过链路a、链路d进行通信,两条链路可以同时工作,通常以一条为主,另一条为辅,主链路故障时HMI将自动切换到另一条通信链路。 [0045] Alternatively, in the present embodiment has a man-machine interface HMI master / slave communication system above-described two communication links and, respectively, by a chain between e.g., HMI Switcnl the switch shown in Figure 2 and Switcn2 Road a, d communications link, both links may operate simultaneously, typically one main, supplemented by another, the HMI will automatically switch to another communication link if the primary link fails.

[0046] 进一步说明,上述系统中控制器所控制的主处理器CPU ModuleJ与备处理器CPUModule_2的网口是否工作是通过自身判断来实现的,当主处理器CPU Module_l为主工作时,其El 口,E2 口始终处于激活状态,两个端口均可以与HMI实现数据通信,备处理器CPUModule_2的E1' 口,E2' 口处于禁止状态,并呈现为高阻态。 [0046] Further described, whether or not the system controller controls the main processor and the standby processor CPU ModuleJ CPUModule_2 network port work through their own judgment to achieve, when the main processor, the main CPU Module_l work, the El port , E2 is always active port, two ports may be implemented in data communication with the HMI, the standby processor CPUModule_2 E1 'mouth, E2' port is disabled and presents a high impedance state.

[0047] 当主处理器CPU Module_l工作时,人机交互界面HMI与CPU A共有两条通信链路a—b和d— f,两条链路可以同时工作。 [0047] While the host processor CPU Module_l work, the man-machine interface HMI CPU A total of two communication links a-b and d- f, two links simultaneously. 假设当前a—b为主工作链路,则d— f链路则为备工作链路(但可以接收人机交互界面HMI下发的通信指令并回应);若通信链路a— b出现异常,人机交互界面HMI自动切换d — f通信链路来工作。 A-b based assumed that the current working link, the link d- f was prepared working link (but may receive communication instructions issued by the man-machine interface HMI and responses); if abnormal communication link a- b human machine interface HMI automatically switched d - f communications link to work. 主处理器CPU Module_l工作时,备处理器CPU Module_2的El' 口,E2'处于禁止状态,并呈现为高阻态。 When the main processor CPU Module_l work, preparation of the processor CPU Module_2 El 'mouth, E2' is disabled and presents a high impedance state. 如果主处理器CPUModule_l出现故障,控制器会自动裁决切换到备处理器CPU Module_2继续进行通信。 CPUModule_l If the master fails, the controller will automatically switch to standby decision processor CPU Module_2 continue communication.

[0048] 当备处理器CPU Module_2工作时,人机交互界面HMI与备处理器CPU Module_2共有两条通信链路a— c和d— e,两条链路可以同时工作。 [0048] When the standby processor CPU Module_2 work man-machine interface HMI and the standby processor CPU Module_2 total of two communication links a- c and d- e, two links simultaneously. 假设当前a— c为主工作链路,则d— e链路备工作链路(但可以接收人机交互界面HM下发的通信指令并回应);若通信链路a— c出现异常,人机交互界面HMI将自动切换d— e通信链路来工作。 A- c work mainly assumed that the current link, the link d- e standby working link (man-machine interface but can receive communication instructions and responses issued HM); if the communication link a- c abnormal, human machine interface HMI will automatically switch communication links work d- e. 备处理器CPUModule_2工作时主处理器CPU Module_l的El 口,E2处于禁止状态,并呈现为高阻态。 Preparation processor CPUModule_2 main processor during operation of the CPU Module_l port El, E2 is disabled and presents a high impedance state.

[0049] S3,若主总线出现故障,则将主总线切换至备总线,使得切换前通过主总线相互通信的主处理器和I/o设备在切换后通过备总线进行通信; [0049] S3, if the primary bus fails, then switching to the backup bus master bus, so that the front switches communicate with one another through the host bus and the host processor I / o devices to communicate via the Bus after the switching;

[0050] 可选地,在本实施例中检测主总线是否出现故障的判断方式可以包括但不限于:通过处理器中的I/O连接控制电路(I/O link)通过接收的数据中的标识判断主总线是否处于正常的运行状态。 [0050] Alternatively, in the present embodiment, the bus master determines whether the detected fault occurs embodiment may include, but are not limited to: / O connection control circuit (I / O link) by the processor through the data I received determining whether the identified main bus in a normal operating state.

[0051] 例如,结合图3所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0051] For example, in conjunction with FIG. 3, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 由主处理器CPU Module_l中的I/O连接控制电路(I/O link)所接收的数据中的标识得出主总线SYS_NET1的通信出现故障时,则将主总线SYS_NETl切换至备总线SYS_NET2,使得切换前通过主总线SYS_NET1相互通信的主处理器CPUModule_l和I/O设备在切换后通过备总线SYS_NET2进行通信,这样就保证了无I/O冗余的情况下也能保证系统的可靠运行。 When connected by the host processor CPU Module_l the I / O control circuit (I / O Link) of the received data identifying the main communication bus SYS_NET1 derived fails, then switching to the backup master bus SYS_NETl bus SYS_NET2, such that before switching communication with each other via the main bus SYS_NET1 CPUModule_l main processor and I / O devices communicating via the bus SYS_NET2 after the handover, thus ensuring the absence of I / O redundancy situation to ensure reliable operation of the system.

[0052] S4,若主处理器和主总线均出现故障,则将主处理器切换至备处理器,并将主总线切换至备总线,使得切换前通过主总线与主处理器通信的I/o设备在切换后通过备总线与备处理器通信。 [0052] S4, if both the host processor and the host bus fails, then the main processor to the standby processor is switched, and the bus master the bus is switched to standby, such that the pre-switching communications bus through the main processor of the master I / o after the switching equipment produced by a communication bus and standby processors.

[0053] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0053] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 当备处理器CPU Module_2在预定时间内没有接收到用于指示主处理器CPU ModuleJ的运行状态的指示信号,则将主处理器CPU ModuleJ切换至备处理器CPU Module_2,又当备处理器CPU Module_2由I/O连接控制电路(I/O link)接收的数据中的标识得知主总线SYS_NET1也出现故障,则将主总线SYS_NET1切换至备总线SYS_NET2,使得切换前通过主总线SYS_NET1与主处理器CPU Module_l通信的I/O设备在切换后通过备总线SYS_NET2与备处理器CPU Module_2通信。 When the standby processor CPU Module_2 operating state does not receive the main processor for instructing the CPU ModuleJ within a predetermined time indicative signal, the main processor to the backup processor CPU ModuleJ CPU Module_2 handover, and when prepared by a processor CPU Module_2 connected by I / O control circuit (I / O Link) data received identification SYS_NET1 main bus that also fails, then switching to the backup master bus SYS_NET1 bus SYS_NET2, such that the pre-switching via the main bus and the main processor SYS_NET1 I / O device CPU Module_l communication after the handover preparation and the standby processor CPU bus SYS_NET2 module_2 communication.

[0054] 通过本申请提供的实施例,通过判断得出主处理器和/或主总线出现故障,控制上述主处理器切换至备处理器和/或控制上述主总线切换至备总线,克服了传统技术所采用的冗余方式可靠性较低的问题,实现了提高可编程控制器PLC的可靠性的效果;此外,主/备处理器中还设置多个通信接口,可以通过控制一些通信接口的开启或禁止,实现了节省IP资源的效果,扩大了冗余数量;还可通过一些通信接口实现对主处理器实时的状态检测,以使出现故障时,可以将主处理器及时切换至备处理器。 [0054] provided by the present application embodiment, the main processor and / or primary bus fails, the control of the main processor to switch to standby derived by determining a processor and / or control of the main bus is switched to the Bus overcome redundancy conventional techniques employed in low reliability problems and achieve the effect of improving the reliability of the programmable logic controller PLC; in addition, master / slave processor is also provided a plurality of communication interfaces, the communication interface can be controlled by a number of to enable or disable, to achieve the effect of resource saving IP, expanding the number of redundant; may also be a communications interface through some real-time detection of a state of the main processor, so that when a fault occurs, the main processor in a timely manner can be switched to the backup processor.

[0055] 作为一种可选的方案,I/O设备包括主I/O设备和备I/O设备,其中,在判断主处理器和/或主总线是否出现故障时,还包括: [0055] As an alternative embodiment, I / O devices include a primary I / O devices and standby I / O device, wherein, in determining the main processor and / or primary bus has failed, further comprising:

[0056] SI,判断主I/O设备是否出现故障; [0056] SI, determines the main I / O device is malfunctioning;

[0057] 可选地,在本实施例中的主I/O设备和备I/O设备可以但不限于位于同一基板,其中,上述I/o设备主要是用来与现场进行交互,实现信号的输入输出。 [0057] Alternatively, in the present embodiment, the host I / O in the apparatus and standby I / O devices can be located but is not limited to the same substrate, wherein the I / o device is mainly used to interact with the field, for signal input and output. 可选地,在本实施例中的主I/O设备可以包括但不限于A0、A1、D0、DI四种卡件,相应的,在本实施例中的备I/O设备可以包括但不限于A0'、Al'、DO'、DI'。 Alternatively, in the present embodiment, the primary I / O devices may include but is not limited to embodiments A0, A1, D0, DI four kinds of cards, corresponding, I prepared in the present embodiment / O devices may include, but are not limited A0 ', Al', DO ', DI'. 可选地,在本实施例中主/备I/O设备可以但不限于为单独的板卡,例如,Al板卡。 Alternatively, in the present embodiment, master / slave I / O device may be, but is not limited to a single board, for example, Al board.

[0058] 可选地,在本实施例中的主I/O设备和备I/O设备还可以包括用于传输主I/O设备的运行状态的指示信号的通信接口。 [0058] Alternatively, in the present embodiment, the primary I / O devices and standby I / O device may also include a signal indicative of a communication interface for transmitting the operational state of the primary I / O devices. 例如,如图4所示,主I/O设备中包括Al板卡,DI板卡,上述板卡的通信接口分别为P1、P2,备I/O设备中包括Al'板卡,DI'板卡,上述板卡的通信接口分别为PI'、P2'。 For example, FIG. 4, the main I / O devices include Al board, the DI board, above the board are communication interfaces P1, P2, standby I / O device comprises Al 'board, DI' board cards, the above communication interface cards are PI ', P2'.

[0059] 可选地,在本实施例中的I/O设备能够通过LED指示灯显示当前输入输出的信号状态。 [0059] Alternatively, in the present embodiment the I / O device embodiment is capable of displaying the current status of a signal input and output via LED indicators.

[0060] 可选地,在本实施例中对主I/O设备是否出现故障的判断方式包括但不限于:心跳检测、状态检测。 [0060] Alternatively, in the present embodiment, the way of determining the main I / O devices are failure include but are not limited to: heartbeat, the state detection. 其中,检测的方式可以包括但不限于以下方式:主I/o设备实时向备I/O设备发送用于指示主I/O设备的运行状态的指示信号。 Wherein the detecting can include but are not limited to, the following: the main I / o device in real time to the standby I / O device transmits an instruction signal indicating the operating state of the primary I / O devices.

[0061] 例如,如图4所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/O设备正在进行正常的通信。 [0061] For example, FIG. 4, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / O devices. 主I/O设备(例如,Al板卡)通过第三通信接口(例如,Pl口)实时向备I/O设备(例如,Al'板卡)的第四通信接口(例如,ΡΓ 口)发送用于指示主I/O设备(例如,Al板卡)的运行状态的指示信号,则备I/O设备通过第四通信接口ΡΓ检测判断在预定时间内是否听到对方的“心跳”或接收到的“心跳”是否出现异常。 Primary I / O devices (e.g., Al board) via a third communication interface (e.g., Pl port) in real time to the standby I / O device (e.g., Al 'board) a fourth communication interface (e.g., ΡΓ mouth) transmission an instruction signal for indicating the operating state of the primary I / O devices (e.g., Al board), the standby I / O devices hear each other if the "heartbeat" or received within a predetermined time via a fourth test to determine the communication interface ΡΓ to the "heartbeat" is abnormal.

[0062] S2,若主I/O设备出现故障,则将主I/O设备切换至备I/O设备,使得切换前通过主总线与主I/o设备通信的主处理器在切换后通过主总线与备I/O设备通信。 [0062] S2, if the master I / O device fails, then the master I / O device is switched to the standby I / O device, such that the pre-switching through the main processor in communication with the primary bus master I / o device after the handover by main bus and communication standby I / O device.

[0063] 例如,如图4所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/O设备正在进行正常的通信,其中,将Al、DI卡作为主I/O设备,AI'、DI'作为Al、DI的备I/O设备。 [0063] For example, FIG. 4, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / O device, wherein the Al, DI card as the primary I / O devices, AI ' , DI 'as Al, DI Preparation of I / O devices. 若判断出主I/O设备(例如,Al板卡)出现故障(例如,备I/O设备(例如,Al'板卡)在预定的时间内没有接收到用于指示主I/O设备(例如,Al板卡)的运行状态的指示信号),则将主I/O设备切换至备I/O设备,使得切换前通过主总线SYS_NET1与主I/O设备通信的主处理器CPU Module_l在切换后通过主总线SYS_NET1与备I/O设备通信。 If it is determined that the main I / O devices (e.g., Al board) fails (e.g., standby I / O device (e.g., Al 'board) is not received within a predetermined period of time indicates that the master I / O device ( For example, a signal indicating board Al) the operating state), the master I / O device is switched to the standby I / O device, such that before the handover by the host processor CPU Module_l SYS_NET1 communication with the main bus master I / O device after switching the main bus SYS_NET1 communication apparatus I / O devices.

[0064] 进一步说明,两个I/O设备之间通过同一基板上的系统总线进行数据交互,根据各自采集的信号进行裁决,使其中一个I/o设备处于运行状态(即主I/O设备),另一个I/O设备处于准备状态(即备I/O设备);处于准备状态的备I/O设备与系统中有效的I/O连接控制电路(I/o link)之间的总线是被锁死的,即该路系统总线处于高阻态。 [0064] further described, data interaction between the two I / O devices via the system bus on the same substrate, according to rule their signal acquisition, so that one of I / o device is in operation (i.e., master I / O device ), the other I / O device is in the ready state (namely, the standby I / O device); prepared in a ready state, I / O devices in the system an effective I / O bus is connected between the control circuit (I / o link) is locked, i.e., the system bus is in high impedance path.

[0065] 可选地,在本实施例中对I/O设备的检测可以但不限于:周期性查询。 [0065] Alternatively, in the present embodiment, the detection of the I / O device is not limited to the embodiment but may be: a periodic query. 例如,I/O连接控制电路(I/o link)周期性(例如,周期T约为1.5ms)查询可编程控制器PLC的主I/O设备运行状态是否正常,并将状态返回给CPU(例如,每10ms返回给CPU处理器一次)。 For example, I / O connection control circuit (I / o link) periodically (e.g., about 1.5ms period T) query master programmable logic controller PLC I / O device running status, and the status is returned to the CPU ( for example, every 10ms is returned to a CPU processor). 这样在运行过程中CPU通过定期检测I/O连接控制电路(I/O link)返回的主I/O设备的运行状态,并且通过在系统中启动一个定期的任务,定期对主I/o设备进行轮询,以确定主I/o设备的运行状态,进而确定主I/O设备是否在正常工作。 Thus during operation the CPU by periodically detecting I / O connection control circuit (I / O Link) returned by the main I / operation state O devices, and by starting a periodic system task, periodically the master I / o device poll to determine an operating state of the primary I / o device, and to determine the primary I / O devices are functioning properly.

[0066] 通过本申请提供的实施例,通过位于同一基板的备I/O设备判断主I/O设备是否出现故障,则可在判断出现故障后,直接控制主/备I/o设备的切换,克服了现有的系统级主/备切换的不方便性,实现了基于模块的切换,达到了提高I/o设备主/备切换的灵活性以及可靠性的目的。 [0066] Example embodiments provided by the present application, the substrate prepared in the same I / O device determines the master I / O device has failed may be determined after a failure, the direct control of the switching master / slave I / o device , to overcome the inconvenience of the conventional system level active / standby switching, the switching module based on the realization, to increase the flexibility of the I / o apparatus main / standby switching and reliability purposes.

[0067] 作为一种可选的方案,在判断主I/O设备是否出现故障之后,还包括: [0067] As an optional embodiment, after determining that the master I / O device has failed, further comprising:

[0068] SI,若主处理器和主I/O设备出现故障,则将主处理器切换至备处理器,并将主I/O设备切换至备I/O设备,使得切换前用于使主处理器和主I/O设备进行通信的主总线在切换后使备处理器和备I/o设备进行通信; [0068] SI, if the main processor and the main I / O devices fails, then the main processor to the standby processor is switched, and the main I / O device is switched to the standby I / O device, such that the pre-switching for the main processor and the main I / O bus communication master device after the switching and prepare to make backup processor I / o device communicates;

[0069] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0069] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 当备处理器CPU Module_2在预定的时间内没有接收到用于指示主处理器CPU ModuleJ的运行状态的指示信号,则将主处理器CPU ModuleJ切换至备处理器CPU Module_2,则将主处理器CPU Module_l切换至备处理器CPU Module_2,进一步备I/O设备也接收到用于指示主I/O设备的运行状态的指示信号,由指示信号判断得出出现异常,则将主I/O设备切换至备I/O设备,使得切换前用于使主处理器CPU Module_l和主I/O设备进行通信的主总线SYS_NET1在切换后使备处理器CPU Module_2和备I/O设备进行通信。 When the standby processor CPU does not receive the operating state module_2 for instructing the CPU ModuleJ main processor within a predetermined period of time indicative signal, the host processor CPU ModuleJ switching to the backup processor CPU module_2, then the main processor CPU Module_l switching to the backup processor CPU module_2, prepared by further I / O device also receives the instruction signal for indicating the operating state of the primary I / O device, the signal indicating the abnormal determination has been made, then the master I / O device is switched Preparation to I / O devices, such pre-switching for the main processor and the main CPU Module_l I / O bus master devices SYS_NET1 communication after the handover, and that the backup processor CPU module_2 Preparation of I / O devices to communicate.

[0070] S2,若主总线和主I/O设备出现故障,则将主总线切换至备总线,将主I/O设备切换至备I/o设备,使得切换前通过主总线与主I/O设备通信的主处理器在切换后通过备总线与备I/o设备通信; [0070] S2, and if the primary bus master I / O device fails, then the backup bus to the main bus switch, the main switch I / O devices to the standby I / o device, such that the pre-switching via the main bus and the main I / O apparatus main processor in communication after the handover preparation through the communication bus and the standby I / o device;

[0071] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0071] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 由主处理器CPU Module_l中的I/O连接控制电路(I/O link)所接收的数据中的标识得出主总线SYS_NET1的通信出现故障时,则将主总线SYS_NETl切换至备总线SYS_NET2,进一步备I/O设备又接收到用于指示主I/O设备的运行状态的指示信号,指示信号指示出现异常,则将主I/O设备切换至备I/O设备,使得切换前通过主总线SYS_NET1与主I/O设备通信的主处理器CPU Module_l在切换后通过备总线SYS_NET2与备I/O设备通信。 When connected by the host processor CPU Module_l the I / O control circuit (I / O Link) of the received data identifying the main communication bus SYS_NET1 derived fails, then switching to the backup master bus SYS_NETl bus SYS_NET2, further Preparation of I / O devices and for indicating the operating state of the received primary I / O device indicating signal indicating signal indicates abnormal, then the master I / O device is switched to the standby I / O device, such that the pre-switching via the main bus SYS_NET1 main I / communication with the host processor CPU Module_l O device after the switching and standby SYS_NET2 prepared by a bus I / O device communication.

[0072] S3,若主处理器、主总线和主I/O设备均出现故障,则将主处理器切换至备处理器,将主总线切换至备总线,将主I/o设备切换至备I/O设备,使得在切换后中断主处理器通过主总线与主I/o设备的通信,并在切换后使得备处理器通过备总线与备I/O设备进行通信。 [0072] S3, if the main processor, the main bus and the main I / O devices are faulty, then the main processor to switch to the backup processor, the bus master the bus is switched to standby, the main I / o device switches to standby I / O devices, so that after the handover by the main processor interrupt communication with the main bus master I / o device, and after the handover so that the standby processor in communication via the bus and the standby I / O device.

[0073] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0073] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 当备处理器CPU Module_2在预定的时间内没有接收到用于指示主处理器CPU ModuleJ的运行状态的指示信号,则将主处理器CPU ModuleJ切换至备处理器CPU Module_2,进一步切换后由备处理器CPU Module_2中的I/O连接控制电路(I/O link)所接收的数据中的标识得出主总线SYS_NET1的通信出现故障时,则将主总线SYS_NET1切换至备总线SYS_NET2,备I/O设备又接收到用于指示主I/O设备的运行状态的指示信号,指示信号指示出现异常,则将主I/O设备切换至备I/O设备,使得在切换后中断主处理器CPUModule_l通过主总线SYS_NET1与主I/O设备的通信,并在切换后使得备处理器CPUModule_2通过备总线SYS_NET2与备I/O设备进行通信。 When the backup processor CPU Module_2 does not receive the operating state of the main processor for instructing the CPU ModuleJ within a predetermined time indicative signal, the main processor to the backup processor CPU ModuleJ CPU Module_2 switching, the switching apparatus further processing CPU module_2 in an I / O connection control circuit (I / O Link) data of the received communication identifier obtained in the main bus SYS_NET1 fault occurs, the primary bus will be switched to the standby bus SYS_NET1 SYS_NET2, standby I / O and receive device for indicating the operating state of the primary I / O device indicating signal indicating signal indicates abnormal, then the master I / O device is switched to the standby I / O device, such that after handover interruption by the host processor CPUModule_l SYS_NET1 communication with the main bus master I / O device, and after the handover so that the standby processor in communication via the bus CPUModule_2 SYS_NET2 and the standby I / O devices.

[0074] 通过本申请提供的实施例,通过对主处理器、主总线及主I/O设备分别进行判断,进而得出在主处理器和主I/O设备出现故障时,在主总线和主I/O设备出现故障时,在主处理器、主总线和主I/o设备均出现故障的三种情况下的切换方法,实现了基于模块的主/备切换,达到了提高系统的灵活性以及可靠性的目的。 [0074] Example embodiments provided by the present application, by the main processor, the main bus and the main I / O devices were determined, and thus obtained when the main processor and the main I / O devices fails, the main bus and when the primary I / O device fails, the switching method of three cases of failure occurred at the main processor, the main bus and the main I / o device, to achieve the main / standby switching module-based, to enhance the flexibility of the system and reliability of the object.

[0075] 作为一种可选的方案,判断主I/O设备是否出现故障包括: [0075] As an alternative embodiment, determining the main I / O device is faulty comprises:

[0076] SI,备I/O设备检测用于指示主I/O设备的运行状态的指示信号是否出现异常; [0076] SI, standby I / O device for indicating the detection signal indicating the operating state of the primary I / O device is abnormal;

[0077] 可选地,在本实施例中对主I/O设备的运行状态的指示信号是否出现异常包括但不限于:未按时接收到用于指示主I/O设备的运行状态的指示信号、指示信号指示出现异常,其中,指示信号出现的异常可以包括但不限于信号波形异常。 Upon receiving the instruction signal fails to indicate the operational status of the master I / O device: [0077] Alternatively, a signal indicative of the master I / O device operating state abnormalities include but are not limited to the present embodiment is present in the embodiment indication signal indicates abnormal, wherein the signal indicative of abnormalities may occur include but are not limited to abnormal waveform.

[0078] 可选地,在本实施例中主I/O设备或备I/O设备可以但不限于为单独的板卡,例如,Al板卡。 [0078] Alternatively, in the present embodiment, the master I / O device or apparatus embodiments I / O device may be, but is not limited to a single board, for example, Al board.

[0079] S2,若检测到指示信号出现异常,则控制主I/O设备切换至备I/O设备。 [0079] S2, if the instruction signal abnormality is detected, the main control I / O device is switched to the standby I / O device.

[0080] 例如,结合图4所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0080] For example, in conjunction with FIG. 4, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 主I/O设备中包括Al板卡,DI板卡,上述板卡的通信接口分别为P1、P2,备I/O设备中包括Al'板卡,DI'板卡,上述板卡的通信接口分别为P1'、P2'。 The communication interface primary I / O devices include Al board, the DI board, above the board are communication interfaces P1, P2, standby I / O device comprises Al 'board, DI' board, above the board respectively P1 ', P2'. 当备I/O设备(例如,Al'板卡)通过通信接口ΡΓ接收到用于指示主I/O设备(例如,Al板卡)的运行状态的指示信号指示主I/O设备(例如,Al板卡)出现异常,则可单独控制Al板卡切换至备用的Al'板卡,而不会影响其他类型的板卡的正常工作,例如,主I/O设备DI板卡并未出现故障,则可以不用切换至备用的DI'板卡。 When the standby I / O device (e.g., Al 'board) for receiving the operating state indicates that the main I / O devices (e.g., Al card) through the communication interface ΡΓ the indication signal indicates the master I / O device (e.g., Al board) abnormal, can be individually controlled to switch to standby card Al Al 'board, the board will not affect the normal operation of other types, e.g., master I / O device is not faulty board DI , you can not switch to the spare DI 'board. 这样,基于模块的切换不仅更加灵活,也提高了系统的可靠性。 In this way, the switching module based not only more flexible, but also improve the reliability of the system.

[0081] 通过本申请提供的实施例,通过对主I/O设备基于模块是否出现故障的判断,克服了现有技术中基于系统的机笼式的主/备切换导致的扩展不方便的问题,使得可编程控制器PLC的冗余控制系统更加灵活,可靠性也有所提高。 [0081] Example embodiments provided by the present application, is determined by the primary I / O device based on whether the module failed to overcome the problems of the prior art master / slave switching is inconvenient due to expansion based system of cage such that the programmable controller PLC redundant control systems more flexible and improved reliability.

[0082] 作为一种可选的方案,将主总线切换至备总线包括: [0082] As an alternative embodiment, the apparatus switches to the bus master the bus comprising:

[0083] SI,判断主处理器或备处理器所接收的数据中是包含主总线的标识还是备总线的标识; [0083] SI, the master data processor or determines the received standby processor comprising a bus master identification or device identification bus;

[0084] 可选地,在本实施例中判断主处理器或备处理器所接收的数据中是包含主总线的标识还是备总线的标识的方式可以包括但不限于:通过处理器中的I/o连接控制电路(I/Olink)通过接收的数据中的标识判断主总线是否处于正常的运行状态。 [0084] Alternatively, the main or backup processor determines received in the present embodiment, the identification data comprising a main bus or bus mode device identification may include, but are not limited to: the processor through the I / o connection control circuit (I / Olink) through the received data identifier is determined whether the main bus in the normal operating state.

[0085] S2,若判断出是包含备总线的标识,则将主总线切换至备总线。 [0085] S2, if it is determined that the identification apparatus comprising a bus, the bus master will be switched to the standby bus.

[0086] 例如,结合图3所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0086] For example, in conjunction with FIG. 3, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 由主处理器CPU Module_l中的I/O连接控制电路(I/O link)所接收的数据中的标识得出主总线SYS_NET1的通信出现故障时,则将主总线SYS_NETl切换至备总线SYS_NET2,使得切换前通过主总线SYS_NET1相互通信的主处理器CPUModule_l和I/O设备在切换后通过备总线SYS_NET2进行通信,这样就保证了无I/O冗余的情况下也能保证系统的可靠运行。 When connected by the host processor CPU Module_l the I / O control circuit (I / O Link) of the received data identifying the main communication bus SYS_NET1 derived fails, then switching to the backup master bus SYS_NETl bus SYS_NET2, such that before switching communication with each other via the main bus SYS_NET1 CPUModule_l main processor and I / O devices communicating via the bus SYS_NET2 after the handover, thus ensuring the absence of I / O redundancy situation to ensure reliable operation of the system.

[0087] 通过本申请提供的实施例,采用双总线的方式,使得在I/O设备切换时不会影响其他类型的I/O设备,同时这种冗余方式也保证了运行的可靠性。 [0087] Example embodiments provided by the present application, the dual-mode bus, such that when I / O device switching does not affect other types of I / O devices, and this way also ensures redundancy reliability.

[0088] 作为一种可选地方案,将主处理器切换至备处理器包括: [0088] As an alternative to the embodiment, the main processor to switch to the backup processor comprising:

[0089] SI,备处理器检测用于指示主处理器的运行状态的指示信号是否出现异常; Instruction signal [0089] SI, the processor detecting apparatus for indicating the operational state of the main processor is abnormal;

[0090] 可选地,在本实施例中对主处理器的运行状态的指示信号是否出现异常包括但不限于:未按时接收到用于指示主处理器的运行状态的指示信号、指示信号指示出现异常,其中,指示信号出现的异常可以包括但不限于信号波形异常。 [0090] Alternatively, a signal indicative of the operating state of the master processor whether there is an abnormality in the present embodiment include, but are not limited to: upon receiving the indication signal fails to indicate the operational state of the main processor, an instruction signal indicating abnormal, wherein the signal indicative of abnormalities may occur include but are not limited to abnormal waveform.

[0091] S2,若检测到指示信号出现异常,则控制主处理器切换至备处理器。 [0091] S2, if the instruction signal abnormality is detected, the switching control of the main processor to the backup processor.

[0092] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0092] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 当备处理器CPU Module_2在预定时间内没有接收到用于指示主处理器CPU ModuleJ的运行状态的指示信号,又或者,备处理器CPU Module_2接收到用于指示主处理器CPU ModuleJ的运行状态的指示信号,但指示信号指示出现异常,则将主处理器CPU Module_l切换至备处理器CPU Module_2。 When the standby processor CPU Module_2 not received within a predetermined time indicating signal for indicating the operating state of the host processor CPU ModuleJ, or, prepared by the processor CPU Module_2 for instructing the received operating state of the main processor CPU ModuleJ indication signal, the indication signal indicates abnormal, then the main processor to the backup processor CPU Module_l switch CPU module_2.

[0093] 通过本申请提供的实施例,通过判断得出主处理器出现故障,控制上述主处理器切换至备处理器,克服了传统技术所采用的冗余方式可靠性较低的问题,实现了提高可编程控制器PLC的可靠性的效果。 [0093] The embodiments provided herein present embodiment, the primary processor fails, the control of the main processor to switch to the backup processor, to overcome the conventional redundancy techniques employed by the problem of low reliability determination results, to achieve the effect of improving the reliability of the programmable logic controller PLC.

[0094] 本实用新型提供了一种优选的实施例来进一步对本实用新型进行解释,但是值得注意的是,该优选实施例只是为了更好的描述本实用新型,并不构成对本实用新型不当的限定。 [0094] The present invention provides a further preferred embodiment of the present invention will be explained, but it is worth noting that only the preferred embodiment in order to better describe the present invention, do not constitute the present invention are novel improperly limited.

[0095] 实施例2 [0095] Example 2

[0096] 根据本实用新型实施例,还提供了一种可编程控制器冗余控制系统,如图6所示,在本实施例该系统包括: [0096] According to the present embodiment of the invention, the programmable controller is also provided a redundant control system, shown in Figure 6, in this embodiment, the system comprises:

[0097] (I)主处理器602,被设置为与主总线及备总线分别连接; [0097] (I) a main processor 602, is arranged to be connected to the main bus and the Bus respectively;

[0098] (2)备处理器604,被设置为与主总线及备总线分别连接,并与主处理器连接; [0098] (2) Preparation of processor 604, respectively, are provided to connect main bus and standby bus, and connected to the main processor;

[0099] 可选地,在本实施例中的主处理器与备处理器互为备份,主总线与备总线互为备份。 [0099] Alternatively, in the present embodiment the main processor and the standby processor up each other embodiments, the host bus and the Bus redundancy.

[0100] 可选地,在本实施例中上述可编程控制器冗余控制方法可以但不限于应用于中型混合可编程控制器(PLC, Programmable logic controller)。 [0100] Alternatively, in this embodiment the programmable redundancy control method of the above-described embodiments the controller may, but is not limited to be applied to medium-sized hybrid programmable logic controller (PLC, Programmable logic controller). 可选地,在本实施例中的主处理器对应有备处理器,主总线对应有备总线,主I/O设备对应有备I/O设备。 Alternatively, in the present embodiment corresponding to the embodiment has a main processor processor apparatus, there is prepared the corresponding master bus bus master I / O device has a corresponding standby I / O device. 结合图1所示,在本实施例中用于实施上述可编程控制器冗余控制方法的系统中包括主处理器CPUModule_l、备处理器CPU Module_2,交换机Switchl、Switch2,主总线SYS_NET1、备总线SYS_NET2,以及主I/O 设备1/0 Modulel、备1/0 设备1/0 Module2。 In conjunction with FIG. 1, in the present embodiment for implementing the above-described system redundant programmable controller control method includes a main processor CPUModule_l, standby processor CPU Module_2, switch Switchl, Switch2, main bus SYS_NET1, the Bus SYS_NET2 and a main I / O devices Module 1 1/0, 1/0 preparation apparatus 1/0 Module2.

[0101] 可选地,在本实施例中的主处理器和备处理器可以但不限于通过RS232总线或以太网与第三方设备通信,将数据传输给数据中心站。 [0101] Alternatively, in the present embodiment, the main processor and the standby processor embodiments may, but are not limited to Ethernet or RS232 bus via a third party communication device, the data transfer data to the central station. 可选地,在本实施例中的主处理器或备处理器可以包括但不限于:中央控制处理器(CPU),和1/0连接控制电路。 Alternatively, in the main or backup processor in the embodiment may include, but are not limited to: a central control processor (CPU), and 1/0 connection control circuit. 其中,CPU可以但不限于执行以下至少一种操作:数据处理、数据运算、外设通信,I/o连接控制电路(1/0Link)可以但不限于选择相应的总线与1/0设备进行数据通信。 Wherein, the CPU may be, but is not limited to at least one of the following operations: processing the data, computing data, communication peripherals, I / o connection control circuit (1 / 0Link) may, but is not limited to select the appropriate device data bus 1/0 communication. 可选地,在本实施例中的CPU处理器具有自检功能,能够将系统运行状态通过八段数码管显示。 Alternatively, in the present example embodiment has a CPU processor self-test function, the system can be run through the eight LED status display.

[0102] 可选地,在本实施例中的主处理器和备处理器可以包括但不限于:多个通信接口。 [0102] Alternatively, in the present embodiment, the main processor and the standby processor embodiments may include but are not limited to: a plurality of communication interfaces. 例如,如图1所示,主处理器CPU Module_l包括:第一通信接口Tl,用于向备处理器CPUModule_2发送主处理器CPU Module」的运行状态的指示信号;互为备份的两个以太网接口El和E2,用于与人机交互界面HMI进行数据通信;备处理器CPU Module_2包括:第二通信接口Tl',用于接收主处理器CPU ModuleJ的运行状态的指示信号,互为备份的两个以太网接口ΕΓ和E2',用于与人机交互界面HMI进行数据通信。 For example, as shown in FIG. 1, the main CPU Module_l processor comprising: a first communication interface Tl, for transmitting a signal indicative of the operating state of the host processor CPU Module "to the standby processor CPUModule_2; two Ethernet mutual backup El and E2 of the interface, for performing data communication with the HMI machine interface; standby CPU module_2 processor comprising: a second communication interface Tl ', for receiving a signal indicative of the operating state of the main processor CPU ModuleJ, mutual backup ΕΓ two Ethernet interfaces and E2 ', for data communication with the human-machine interface HMI.

[0103] 可选地,在本实施例中与主处理器或备处理器进行数据通信的主I/O设备和备I/O设备可以但不限于位于同一基板,其中上述I/O设备主要是用来与现场进行交互,实现信号的输入输出。 [0103] Alternatively, with the main or backup processor in the present embodiment, the primary data communication I / O devices and standby I / O devices can be located but is not limited to the same substrate, wherein said I / O device main is used to interact with the scene, the implement input and output signals.

[0104] 可选地,在本实施例中对主处理器是否出现故障的判断方式包括但不限于:心跳检测、状态检测。 [0104] Alternatively, in the present embodiment, the main processor of the embodiment determines whether failure include but are not limited to: heartbeat, the state detection. 其中,检测的方式可以包括但不限于以下方式:主处理器实时向备处理器发送用于指示主处理器的运行状态的指示信号。 Wherein the detecting can include but are not limited to, the following: real-time host processor to the standby processor sends an instruction signal for indicating the operating state of the main processor.

[0105] 可选地,在本实施例中备处理器检测到的主处理器出现的故障包括以下至少之一:未在预定时间内接收到用于指示主处理器的运行状态的指示信号、接收到的用于指示主处理器的运行状态的指示信号指示异常。 Failure of the primary processor [0105] Alternatively, in this embodiment the processor apparatus detects embodiment comprises at least one of the following: an indication signal is not received for the operational status of the main processor within a predetermined time, It indicates that the received instruction signal for indicating the operating state of the main processor is abnormal.

[0106] 可选地,在本实施例中对主处理器的运行状态的指示信号是否出现异常包括但不限于:未按时接收到用于指示主处理器的运行状态的指示信号、指示信号指示出现异常,其中,指示信号出现的异常可以包括但不限于信号波形异常。 [0106] Alternatively, a signal indicative of the operating state of the master processor whether there is an abnormality in the present embodiment include, but are not limited to: upon receiving the indication signal fails to indicate the operational state of the main processor, an instruction signal indicating abnormal, wherein the signal indicative of abnormalities may occur include but are not limited to abnormal waveform.

[0107] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0107] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 主处理器CPU Module_l通过第一通信接口Tl实时向备处理器CPU Module_2发送用于指示主处理器CPU ModuleJ的运行状态的指示信号,则备处理器CPU Module_2通过第二通信接口Tl'检测判断在预定时间内是否听到对方的“心跳”或接收到的“心跳”是否出现异常。 A main processor CPU Module_l instruction signal transmits operational status of the main processor of the CPU ModuleJ Tl via the first communication interface in real time to the standby processor CPU Module_2, the processor CPU Module_2 prepared via the second communication interface Tl 'is determined in the detection Do you hear the other party within a predetermined time "heartbeat" or received "heartbeat" is abnormal. 若判断出主处理器CPU ModuleJ出现故障(例如,备处理器CPU Module_2在预定的时间内没有接收到用于指示主处理器CPU Module_l的运行状态的指示信号),则将主处理器CPU Module_l切换至备处理器CPU Module_2,使得切换前通过主总线SYS_NET1与主处理器CPU Modulej通信的I/O设备在切换后通过主总线SYS_NETl与备处理器CPU Module_2通信。 If it is determined that the host processor CPU ModuleJ failure (e.g., backup processor CPU Module_2 not received within a predetermined time indicating signal for indicating the operating state of the host processor CPU Module_l), the main processor CPU Module_l switch to prepare the processor CPU module_2, so that before the handover after the handover by the bus master and the standby processor CPU module_2 SYS_NETl communicate via a main bus SYS_NET1 Modulej communication with the main processor CPU I / O devices.

[0108] 可选地,在本实施例中在主处理器和备处理器在切换之前可以但不限于进行同步数据传输。 [0108] Alternatively, this embodiment may be but not limited to synchronous data transmitted before switching the main processor and the standby processor in the present embodiment. 进一步说明,备处理器CPU Module_2要随时准备着,一旦需要进行切换,就立刻获取主控权切换成为当前运行的处理器。 Further instructions Standby processor CPU Module_2 be ready to, once required to be switched immediately to obtain mastership turns to the processor is currently running. 因此,主处理器CPU ModuleJ必须将自己的状态信息通过运行状态的指示信号实时传送给备处理器CPU Module_2,使备处理器CPUModule_2与主处理器CPU ModuleJ保持状态、数据同步,这样当要进行切换时,才可以实现无扰动的切换。 Accordingly, the main processor CPU ModuleJ must own status information indicating the operating state of the signal transmitted in real time to the standby processor CPU Module_2, prepared so that the processor with the main processor CPU ModuleJ CPUModule_2 hold state, data synchronization, so that when the switch to only when no disturbance switching can be achieved.

[0109] 可选地,在本实施例中PLC之间的数据同步可以包括但不限于采用硬件同步和软件同步两种方法,其中,硬件同步提供了同步数据的总线,也就是数据同步所需要的数据通道,实时的将数据传送给备处理器;软件同步则是将同步数据通过通信线路传送给备处理器CPUModule_2。 [0109] Alternatively, in the present embodiment, the data between the PLC embodiment synchronization may include but are not limited to hardware and software synchronization sync two methods, which provides bus synchronization hardware synchronization data, i.e. data required for synchronization data channel, to transmit data to the real-time backup processor; software synchronization sucked sync data to the processor CPUModule_2 apparatus through a communication line.

[0110] (3)主总线606,被设置为与I/O设备连接; [0110] (3) The main bus 606 is arranged for connection to I / O devices;

[0111] (4)备总线608,被设置为与I/O设备连接; [0111] (4) Preparation of bus 608, is arranged for connection to I / O devices;

[0112] 可选地,在本实施例中检测主总线是否出现故障的判断方式可以包括但不限于:通过处理器中的I/O连接控制电路(I/O link)通过接收的数据中的标识判断主总线是否处于正常的运行状态。 [0112] Alternatively, in the present embodiment, the bus master determines whether the detected fault occurs embodiment may include, but are not limited to: / O connection control circuit (I / O link) by the processor through the data I received determining whether the identified main bus in a normal operating state.

[0113] 例如,结合图3所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0113] For example, in conjunction with FIG. 3, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 由主处理器CPU Module_l中的I/O连接控制电路(I/O link)所接收的数据中的标识得出主总线SYS_NET1的通信出现故障时,则将主总线SYS_NETl切换至备总线SYS_NET2,使得切换前通过主总线SYS_NET1相互通信的主处理器CPUModule_l和I/O设备在切换后通过备总线SYS_NET2进行通信,这样就保证了无I/O冗余的情况下也能保证系统的可靠运行。 When connected by the host processor CPU Module_l the I / O control circuit (I / O Link) of the received data identifying the main communication bus SYS_NET1 derived fails, then switching to the backup master bus SYS_NETl bus SYS_NET2, such that before switching communication with each other via the main bus SYS_NET1 CPUModule_l main processor and I / O devices communicating via the bus SYS_NET2 after the handover, thus ensuring the absence of I / O redundancy situation to ensure reliable operation of the system.

[0114] 通过本申请提供的实施例,通过本申请提供的实施例,通过判断得出主处理器和/或主总线出现故障,控制上述主处理器切换至备处理器和/或控制上述主总线切换至备总线,克服了传统技术所采用的冗余方式可靠性较低的问题,实现了提高可编程控制器PLC的可靠性的效果。 [0114] By the present embodiment provided herein, embodiments provided by the present application, main processor and / or primary bus fails, the control of the main processor to switch to the backup processor and / or control is determined by the main stars bus switching to the backup bus, to overcome the conventional redundancy techniques employed in low reliability problems and achieve the effect of improving the reliability of the programmable controller of the PLC.

[0115] 作为一种可选的方案,如图7所示,在本实施例中的系统还包括:1/0设备,其中,I/o设备包括: [0115] As an alternative embodiment, shown in Figure 7, in this embodiment, the system further comprising: a 1/0 device, wherein, I / o device comprising:

[0116] (I)主I/O设备702,被设置为与主总线及备总线分别连接;和/或 [0116] (I) main I / O device 702, is provided with the main bus and the Bus are connected; and / or

[0117] (2)备I/O设备704,被设置为与主总线及备总线分别连接,并与主I/O设备连接; [0117] (2) Preparation of I / O device 704, are provided respectively connected to the main bus and standby bus, and connected to the main I / O devices;

[0118] 可选地,在本实施例中的主I/O设备与备I/O设备互为备份。 [0118] Alternatively, in the present embodiment the main I / O devices and the standby I / O apparatus according to the redundancy.

[0119] 可选地,在本实施例中的主I/O设备和备I/O设备可以但不限于位于同一基板,其中,上述I/o设备主要是用来与现场进行交互,实现信号的输入输出。 [0119] Alternatively, in the present embodiment, the host I / O in the apparatus and standby I / O devices can be located but is not limited to the same substrate, wherein the I / o device is mainly used to interact with the field, for signal input and output. 可选地,在本实施例中的主I/O设备可以包括但不限于A0、A1、D0、DI四种卡件,相应的,在本实施例中的备I/O设备可以包括但不限于A0'、Al'、DO'、DI'。 Alternatively, in the present embodiment, the primary I / O devices may include but is not limited to embodiments A0, A1, D0, DI four kinds of cards, corresponding, I prepared in the present embodiment / O devices may include, but are not limited A0 ', Al', DO ', DI'. 可选地,在本实施例中主/备I/O设备可以但不限于为单独的板卡,例如,Al板卡。 Alternatively, in the present embodiment, master / slave I / O device may be, but is not limited to a single board, for example, Al board.

[0120] 可选地,在本实施例中的主I/O设备和备I/O设备还可以包括用于传输主I/O设备的运行状态的指示信号的通信接口。 [0120] Alternatively, in the present embodiment, the primary I / O devices and standby I / O device may also include a signal indicative of a communication interface for transmitting the operational state of the primary I / O devices. 例如,如图4所示,主I/O设备中包括Al板卡,DI板卡,上述板卡的通信接口分别为P1、P2,备I/O设备中包括Al'板卡,DI'板卡,上述板卡的通信接口分别为PI'、P2'。 For example, FIG. 4, the main I / O devices include Al board, the DI board, above the board are communication interfaces P1, P2, standby I / O device comprises Al 'board, DI' board cards, the above communication interface cards are PI ', P2'. 可选地,在本实施例中的I/O设备能够通过LED指示灯显示当前输入输出的信号状态。 Alternatively, in the present embodiment the I / O device embodiment is capable of displaying the current status of a signal input and output via LED indicators.

[0121] 可选地,在本实施例中对主I/O设备是否出现故障的判断方式包括但不限于:心跳检测、状态检测。 [0121] Alternatively, in the present embodiment, the way of determining the main I / O devices are failure include but are not limited to: heartbeat, the state detection. 其中,检测的方式可以包括但不限于以下方式:主I/o设备实时向备I/O设备发送用于指示主I/O设备的运行状态的指示信号。 Wherein the detecting can include but are not limited to, the following: the main I / o device in real time to the standby I / O device transmits an instruction signal indicating the operating state of the primary I / O devices.

[0122] 可选地,在本实施例中对主I/O设备的运行状态的指示信号是否出现异常包括但不限于:未按时接收到用于指示主I/o设备的运行状态的指示信号、指示信号指示出现异常,其中,指示信号出现的异常可以包括但不限于信号波形异常。 Upon receiving the instruction signal fails to indicate the operational status of the master I / o device: [0122] Alternatively, a signal indicative of the master I / O device operating state abnormalities include but are not limited to the present embodiment is present in the embodiment indication signal indicates abnormal, wherein the signal indicative of abnormalities may occur include but are not limited to abnormal waveform.

[0123] 例如,如图4所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/O设备正在进行正常的通信,其中,将Al、DI卡作为主I/O设备,AI'、DI'作为Al、DI的备I/O设备。 [0123] For example, FIG. 4, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / O device, wherein the Al, DI card as the primary I / O devices, AI ' , DI 'as Al, DI Preparation of I / O devices. 若判断出主I/O设备(例如,Al板卡)出现故障(例如,备I/O设备(例如,Al'板卡)在预定的时间内没有接收到用于指示主I/O设备(例如,Al板卡)的运行状态的指示信号),则将主I/O设备切换至备I/O设备,使得切换前通过主总线SYS_NET1与主I/O设备通信的主处理器CPU Module_l在切换后通过主总线SYS_NET1与备I/O设备通信。 If it is determined that the main I / O devices (e.g., Al board) fails (e.g., standby I / O device (e.g., Al 'board) is not received within a predetermined period of time indicates that the master I / O device ( For example, a signal indicating board Al) the operating state), the master I / O device is switched to the standby I / O device, such that before the handover by the host processor CPU Module_l SYS_NET1 communication with the main bus master I / O device after switching the main bus SYS_NET1 communication apparatus I / O devices.

[0124] 进一步说明,两个I/O设备之间通过同一基板上的系统总线进行数据交互,根据各自采集的信号进行裁决,使其中一个I/o设备处于运行状态(即主I/O设备),另一个I/O设备处于准备状态(即备I/O设备);处于准备状态的备I/O设备与系统中有效的I/O连接控制电路(Ι/Olink)之间的总线是被锁死的,即该路系统总线处于高阻态。 [0124] further described, data interaction between the two I / O devices via the system bus on the same substrate, according to rule their signal acquisition, so that one of I / o device is in operation (i.e., master I / O device ), the other I / O device is in the ready state (namely, the standby I / O device); a bus between the apparatus in a ready state, I / O devices in the system an effective I / O connection control circuit (Ι / Olink) is is locked, i.e., the system bus is in high impedance path.

[0125] 可选地,在本实施例中对I/O设备的检测可以但不限于:周期性查询。 [0125] Alternatively, in the present embodiment, the detection of the I / O device is not limited to the embodiment but may be: a periodic query. 例如,I/O连接控制电路(I/o link)周期性(例如,周期T约为1.5ms)查询可编程控制器PLC的主I/O设备运行状态是否正常,并将状态返回给CPU(例如,每10ms返回给CPU处理器一次)。 For example, I / O connection control circuit (I / o link) periodically (e.g., about 1.5ms period T) query master programmable logic controller PLC I / O device running status, and the status is returned to the CPU ( for example, every 10ms is returned to a CPU processor). 这样在运行过程中CPU通过定期检测I/O连接控制电路(I/O link)返回的主I/O设备的运行状态,并且通过在系统中启动一个定期的任务,定期对主I/O设备进行轮询,以确定主I/O设备的运行状态,进而确定主I/O设备是否在正常工作。 Thus during operation the CPU by periodically detecting I / O connection control circuit (I / O Link) returned by the main I / operation state O devices, and by starting a periodic system task, periodically the master I / O device poll to determine an operating state of the primary I / O devices, and to determine the primary I / O devices are functioning properly.

[0126] 通过本申请提供的实施例,通过位于同一基板的备I/O设备判断主I/O设备是否出现故障,则可在判断出现故障后,直接控制主/备I/o设备的切换,克服了现有的系统级主/备切换的不方便性,实现了基于模块的切换,达到了提高I/o设备主/备切换的灵活性以及可靠性的目的。 [0126] Example embodiments provided by the present application, the substrate prepared in the same I / O device determines the master I / O device has failed may be determined after a failure, the direct control of the switching master / slave I / o device , to overcome the inconvenience of the conventional system level active / standby switching, the switching module based on the realization, to increase the flexibility of the I / o apparatus main / standby switching and reliability purposes.

[0127] 作为一种可选的方案,在本实施例中的主处理器602包括: [0127] As an alternative embodiment, the main processor 602 in the present embodiment comprises:

[0128] (I)第一中央控制处理器,被设置为与第一I/O连接控制电路连接; [0128] (I) a first central control processor, is arranged to be connected to the first connecting I / O control circuit;

[0129] 可选地,在本实施例中的CPU可以但不限于执行以下至少一种操作:数据处理、数据运算、外设通信,I/o连接控制电路(I/O Link)可以但不限于选择相应的总线与I/O设备进行数据通信。 [0129] Alternatively, the CPU in the embodiment, but is not limited to at least one of the following operations in the present embodiment: data processing, data calculation, communication peripherals, I / o connection control circuit (I / O Link) but can not be limited selection of the respective bus I / O devices for data communication. 可选地,在本实施例中的CPU处理器具有自检功能,能够将系统运行状态通过八段数码管显示。 Alternatively, in the present example embodiment has a CPU processor self-test function, the system can be run through the eight LED status display.

[0130] (2)第一I/O连接控制电路,被设置为与主总线及备总线连接,用于控制选择主总线或备总线与I/o设备进行通信。 [0130] (2) a first I / O connection control circuit, is provided o the device to communicate with the main bus and the Bus connection for controlling the selection of the host bus or the standby bus I /.

[0131] 可选地,在本实施例中检测主总线是否出现故障的判断方式可以包括但不限于:通过处理器中的I/O连接控制电路(I/O link)通过接收的数据中的标识判断主总线是否处于正常的运行状态。 [0131] Alternatively, in the present embodiment, the bus master determines whether the detected fault occurs embodiment may include, but are not limited to: / O connection control circuit (I / O link) by the processor through the data I received determining whether the identified main bus in a normal operating state.

[0132] 可选地,在本实施例中,上述可编程控制器冗余控制系统中还可以但不限于包括通信模块502,如图5所示,该通信模块502不仅可以作为处理器与总线(SYS_NET)的交互接口,同时也可以但不限于为处理器、I/O设备提供24V电源。 [0132] Alternatively, in the present embodiment, the redundant control system PLC may also include, without limitation, a communication module 502, shown in Figure 5, the communication module 502 and the processor bus not only as a (SYS_NET) of the interactive interface, but also can provide a 24V power supply, but is not limited to the processor, I / O devices. 可选地,在本实施例中,上述通信模块502可以但不限于通过RJ45头,与处理器中的I/O连接控制电路(I/O link)或者I/O设备进行通信。 Alternatively, in the present embodiment, the communication module 502 may, but is not limited to connection control circuit (I / O Link), or I / O devices communicating via the RJ45, and processor I / O.

[0133] 通过本申请提供的实施例,通过处理器中的中央控制处理器以及I/O连接控制电路两个结构组合,共同控制主处理器、以及主总线的切换,实现了灵活控制系统中模块的主/备切换,同时也提高了系统的可靠性。 [0133] Example embodiments, the control processor and I / O circuits connected to control two structural combination, the common control of the main processor, and a switching main bus through the central processor, enables flexible control system provided by the present application active / standby switch module, but also to improve the reliability of the system.

[0134] 作为一种可选的方案,在本实施例中的备处理器604包括: [0134] As an alternative embodiment, processor 604 prepared in the present embodiment comprises:

[0135] (I)第二中央控制处理器,被设置为与第二I/O连接控制电路连接; [0135] (I) a second central control processor, is arranged to be connected to the second I / O control circuit;

[0136] 可选地,在本实施例中的CPU可以但不限于执行以下至少一种操作:数据处理、数据运算、外设通信,I/o连接控制电路(I/O Link)可以但不限于选择相应的总线与I/O设备进行数据通信。 [0136] Alternatively, the CPU in the embodiment, but is not limited to at least one of the following operations in the present embodiment: data processing, data calculation, communication peripherals, I / o connection control circuit (I / O Link) but can not be limited selection of the respective bus I / O devices for data communication. 可选地,在本实施例中的CPU处理器具有自检功能,能够将系统运行状态通过八段数码管显示。 Alternatively, in the present example embodiment has a CPU processor self-test function, the system can be run through the eight LED status display.

[0137] (2)第二I/O连接控制电路,被设置为与主总线及备总线连接,用于选择主总线或备总线与I/O设备进行通信。 [0137] (2) a second I / O connected to the control circuit is arranged to select the host bus or the standby bus I / O devices to communicate with the main bus and bus connection standby for.

[0138] 可选地,在本实施例中检测主总线是否出现故障的判断方式可以包括但不限于:通过处理器中的I/O连接控制电路(I/O link)通过接收的数据中的标识判断主总线是否处于正常的运行状态。 [0138] Alternatively, in the present embodiment, the bus master determines whether the detected fault occurs embodiment may include, but are not limited to: / O connection control circuit (I / O link) by the processor through the data I received determining whether the identified main bus in a normal operating state.

[0139] 可选地,在本实施例中,上述可编程控制器冗余控制系统中还可以但不限于包括通信模块502,如图5所示,该通信模块502不仅可以作为处理器与总线(SYS_NET)的交互接口,同时也可以但不限于为处理器、I/O设备提供24V电源。 [0139] Alternatively, in the present embodiment, the redundant control system PLC may also include, without limitation, a communication module 502, shown in Figure 5, the communication module 502 and the processor bus not only as a (SYS_NET) of the interactive interface, but also can provide a 24V power supply, but is not limited to the processor, I / O devices. 可选地,在本实施例中,上述通信模块502可以但不限于通过RJ45头,与处理器中的I/O连接控制电路(I/O link)或者I/O设备进行通信。 Alternatively, in the present embodiment, the communication module 502 may, but is not limited to connection control circuit (I / O Link), or I / O devices communicating via the RJ45, and processor I / O. 通过本申请提供的实施例,通过处理器中的中央控制处理器以及I/O连接控制电路两个结构组合,共同控制备处理器、以及备总线的切换,实现了灵活控制系统中模块的主/备切换,同时也提高了系统的可靠性。 Examples of the present application provided by the central control processor of the processor and I / O circuits connected to control two structural combination, the common control processor prepared, and switching the Bus achieve flexible control of the main modules in the system / standby switching, but also improve the reliability of the system.

[0140] 作为一种可选的方案,在本实施例中的主处理器602中包括: [0140] As an alternative embodiment, the main processor 602 in the present embodiment comprises:

[0141] (I)第一通信接口,被设置为与备处理器连接,用于向备处理器发送指示主处理器的运行状态的指示信号; [0141] (I) a first communication interface apparatus arranged for connection to the processor, for transmitting to the main processor indicating the processor operating state of the standby indication signal;

[0142] 可选地,在本实施例中备处理器中包括: [0142] Alternatively, the processor apparatus embodiment in the present embodiment comprises:

[0143] (I)第二通信接口,被设置为与主处理器连接,用于接收指示主处理器的运行状态的指示信号。 [0143] (I) a second communication interface is arranged to be connected to the main processor, the main processor for receiving an indication of the operating state indicating signal.

[0144] 可选地,在本实施例中的主处理器和备处理器可以包括但不限于:多个通信接口。 [0144] Alternatively, in the present embodiment, the main processor and the standby processor embodiments may include but are not limited to: a plurality of communication interfaces. 例如,如图1所示,主处理器CPU Module_l包括:第一通信接口Tl,用于向备处理器CPUModule_2发送主处理器CPU Module_l的运行状态的指示信号;备处理器CPU Module_2包括:第二通信接口Tl',用于接收主处理器CPU ModuleJ的运行状态的指示信号。 For example, as illustrated, a main processor CPU Module_l comprising: a first communication interface Tl, for transmitting a signal indicative of the operating state of the main processor to the standby processor CPU Module_l CPUModule_2; Standby CPU Module_2 processor comprises: a second a communication interface Tl ', a main processor for receiving a signal indicating the operational state of CPU ModuleJ.

[0145] 作为一种可选的方案,在本实施例中的备处理器604还包括: [0145] As an alternative embodiment, processor 604 prepared in the present embodiment further comprises:

[0146] (I)第一检测装置,被设置为与第二通信接口连接,用于检测指示主处理器的运行状态的指示信号是否出现异常。 [0146] (I) a first detecting means is provided with the second communication interface, for detecting the operating state of the primary processor indicative of an instruction signal is abnormal.

[0147] 可选地,在本实施例中备处理器检测到的主处理器出现的故障包括以下至少之一:未在预定时间内接收到用于指示主处理器的运行状态的指示信号、接收到的用于指示主处理器的运行状态的指示信号指示异常。 Failure of the primary processor [0147] Alternatively, in this embodiment the processor apparatus detects embodiment comprises at least one of the following: an indication signal is not received for the operational status of the main processor within a predetermined time, It indicates that the received instruction signal for indicating the operating state of the main processor is abnormal.

[0148] 可选地,在本实施例中对主处理器的运行状态的指示信号是否出现异常包括但不限于:未按时接收到用于指示主处理器的运行状态的指示信号、指示信号指示出现异常,其中,指示信号出现的异常可以包括但不限于信号波形异常。 [0148] Alternatively, a signal indicative of the operating state of the master processor whether there is an abnormality in the present embodiment include, but are not limited to: upon receiving the indication signal fails to indicate the operational state of the main processor, an instruction signal indicating abnormal, wherein the signal indicative of abnormalities may occur include but are not limited to abnormal waveform.

[0149] 例如,结合图1所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/o设备正在进行正常的通信。 [0149] For example, in conjunction with FIG. 1, a main processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / o device. 主处理器CPU Module_l通过第一通信接口Tl实时向备处理器CPU Module_2发送用于指示主处理器CPU ModuleJ的运行状态的指示信号,则备处理器CPU Module_2通过第二通信接口Tl'检测判断在预定时间内是否听到对方的“心跳”或接收到的“心跳”是否出现异常。 A main processor CPU Module_l instruction signal transmits operational status of the main processor of the CPU ModuleJ Tl via the first communication interface in real time to the standby processor CPU Module_2, the processor CPU Module_2 prepared via the second communication interface Tl 'is determined in the detection Do you hear the other party within a predetermined time "heartbeat" or received "heartbeat" is abnormal.

[0150] 通过本申请提供的实施例,通过判断得出主处理器出现故障,控制上述主处理器切换至备处理器,克服了传统技术所采用的冗余方式可靠性较低的问题,实现了提高可编程控制器PLC的可靠性的效果。 [0150] By the present embodiment provided herein, the primary processor fails, the control of the main processor to switch to the backup processor, to overcome the conventional redundancy techniques employed by the problem of low reliability determination results, to achieve the effect of improving the reliability of the programmable logic controller PLC.

[0151] 作为一种可选的方案,在本实施例中的主I/O设备702包括: [0151] As an optional embodiment, in the present embodiment the host I / O in the device 702 comprising:

[0152] (I)第三通信接口,被设置为与备I/O设备连接,用于向备I/O设备发送指示主I/O设备的运行状态的指示信号; [0152] (I) a third communication interface apparatus arranged for connection to I / O devices, to prepare for I / O device indicates that the main transmission of the I / O device state indication signal;

[0153] 可选地,在本实施例中备I/O设备包括: [0153] Alternatively, in the present embodiment the apparatus I / O device embodiment comprising:

[0154] (I)第四通信接口,被设置为与主I/O设备连接,用于接收指示主I/O设备的运行状态的指示信号。 [0154] (I) the fourth communication interface is arranged for connection to a main I / O devices, for receiving the indication signal indicating the operating state of the main I / O devices.

[0155] 可选地,在本实施例中的主I/O设备和备I/O设备可以但不限于位于同一基板,其中,上述I/o设备主要是用来与现场进行交互,实现信号的输入输出。 [0155] Alternatively, in the present embodiment, the host I / O in the apparatus and standby I / O devices can be located but is not limited to the same substrate, wherein the I / o device is mainly used to interact with the field, for signal input and output. 可选地,在本实施例中的主I/O设备可以包括但不限于A0、A1、D0、DI四种卡件,相应的,在本实施例中的备I/O设备可以包括但不限于A0'、Al'、DO'、DI'。 Alternatively, in the present embodiment, the primary I / O devices may include but is not limited to embodiments A0, A1, D0, DI four kinds of cards, corresponding, I prepared in the present embodiment / O devices may include, but are not limited A0 ', Al', DO ', DI'. 可选地,在本实施例中主/备I/O设备可以但不限于为单独的板卡,例如,Al板卡。 Alternatively, in the present embodiment, master / slave I / O device may be, but is not limited to a single board, for example, Al board.

[0156] 可选地,在本实施例中的主I/O设备和备I/O设备还可以包括用于传输主I/O设备的运行状态的指示信号的通信接口。 [0156] Alternatively, in the present embodiment, the primary I / O devices and standby I / O device may also include a signal indicative of a communication interface for transmitting the operational state of the primary I / O devices. 例如,如图4所示,主I/O设备中包括Al板卡,DI板卡,上述板卡的通信接口分别为P1、P2,备I/O设备中包括Al'板卡,DI'板卡,上述板卡的通信接口分别为PI'、P2'。 For example, FIG. 4, the main I / O devices include Al board, the DI board, above the board are communication interfaces P1, P2, standby I / O device comprises Al 'board, DI' board cards, the above communication interface cards are PI ', P2'.

[0157] 作为一种可选的方案,在本实施例中的备I/O设备704还包括: [0157] As an alternative embodiment, the present embodiment prepared in Examples I / O device of 704 further comprising:

[0158] (I)第二检测装置,被设置为与第四通信接口连接,用于检测指示主I/O设备的运行状态的指示信号是否出现异常。 [0158] (I) a second detecting means, is provided with the fourth communication interface, for detecting the operating state indicates that the master I / O device instruction signal is abnormal.

[0159] 可选地,在本实施例中对主I/O设备是否出现故障的判断方式包括但不限于:心跳检测、状态检测。 [0159] Alternatively, in the present embodiment, the way of determining the main I / O devices are failure include but are not limited to: heartbeat, the state detection. 其中,检测的方式可以包括但不限于以下方式:主I/o设备实时向备I/O设备发送用于指示主I/O设备的运行状态的指示信号。 Wherein the detecting can include but are not limited to, the following: the main I / o device in real time to the standby I / O device transmits an instruction signal indicating the operating state of the primary I / O devices.

[0160] 可选地,在本实施例中对主I/O设备的运行状态的指示信号是否出现异常包括但不限于:未按时接收到用于指示主I/o设备的运行状态的指示信号、指示信号指示出现异常,其中,指示信号出现的异常可以包括但不限于信号波形异常。 Upon receiving the instruction signal fails to indicate the operational status of the master I / o device: [0160] Alternatively, a signal indicative of the master I / O device operating state abnormalities include but are not limited to the present embodiment is present in the embodiment indication signal indicates abnormal, wherein the signal indicative of abnormalities may occur include but are not limited to abnormal waveform.

[0161] 例如,如图4所示,假设当前主处理器CPU Module_l通过主总线SYS_NET1与主I/O设备正在进行正常的通信。 [0161] For example, FIG. 4, the host processor CPU Module_l assumed that the current going through the normal communication with the main SYS_NET1 main bus I / O devices. 主I/O设备(例如,Al板卡)通过第三通信接口(例如,Pl口)实时向备I/O设备(例如,Al'板卡)的第四通信接口(例如,ΡΓ 口)发送用于指示主I/O设备(例如,Al板卡)的运行状态的指示信号,则备I/O设备通过第四通信接口ΡΓ检测判断在预定时间内是否听到对方的“心跳”或接收到的“心跳”是否出现异常。 Primary I / O devices (e.g., Al board) via a third communication interface (e.g., Pl port) in real time to the standby I / O device (e.g., Al 'board) a fourth communication interface (e.g., ΡΓ mouth) transmission an instruction signal for indicating the operating state of the primary I / O devices (e.g., Al board), the standby I / O devices hear each other if the "heartbeat" or received within a predetermined time via a fourth test to determine the communication interface ΡΓ to the "heartbeat" is abnormal.

[0162] 作为一种可选的方案,在本实施例中的主处理器602包括:互为备份的两个以太网接口; [0162] As an alternative embodiment, the main processor 602 in the present embodiment includes embodiments: two Ethernet interfaces mutual backup;

[0163] 可选地,在本实施例中备处理器包括:互为备份的两个以太网接口。 Mutual backup two Ethernet interfaces: [0163] Alternatively, in the present example embodiment includes a processor apparatus.

[0164] 可选地,在本实施例中的主I/O设备与备I/O设备位于同一基板。 [0164] Alternatively, in the present embodiment the main I / O devices and the standby I / O device in the same embodiment the substrate.

[0165] 可选地,在本实施例中主处理器CPU Module_l及备处理器CPU Module_2可以但不限于具备2个互为备份的两个以太网接口,具体示例结合图1所示,主处理器CPUModule_l中包括互为备份的两个以太网接口El和E2,备处理器CPU Module_2中包括互为备份的两个以太网接口ΕΓ和E2',在上述各处理器的两个以太网接口上设置不同网段的IP地址,通过在人机交互界面HMI上设置2个相应的IP地址,做到PLC系统与HMI的通信冗余。 [0165] Alternatively, in the present embodiment, the main processor and the standby processor CPU Module_l CPU Module_2 may includes but is not limited to two mutual backup two Ethernet interfaces, in conjunction with a specific example shown in FIG. 1, main processing CPUModule_l device includes two Ethernet interfaces mutual backup El and E2, the processor CPU module_2 preparation includes two Ethernet interfaces ΕΓ mutual backup and E2 ', two Ethernet interfaces on each of the processors in set different network IP addresses by setting the corresponding two IP addresses on the man-machine interface HMI, the PLC system to achieve the communication with the HMI redundant.

[0166] 例如,如图2所示,假设当前主处理器CPU Module_l及备处理器CPU Module_2通过以太网与第三方设备(例如,人机交互界面HMI)通信。 [0166] For example, as shown in FIG. 2, the host processor CPU Module_l assumed that the current and standby processor CPU Module_2 third-party equipment via Ethernet (e.g., human-machine interface HMI) communication. 主处理器CPU ModuleJ与备处理器CPU Module_2各自的两个以太网口分别设置为不同网段的2个IP地址,比如CPUModuIe_l 的El 口设置为192.168.1.101,E2 口设置为10.10.1.18,CPU Module_2 的设置与前者相同。 The main processor and the standby processor CPU ModuleJ CPU Module_2 respective two Ethernet ports respectively provided to two different IP addresses of network, such as the El CPUModuIe_l port is provided to 192.168.1.101, E2 port is provided to 10.10.1.18, CPU Module_2 same setting with the former. HMI具备2个网口,分别设为192.168.1.100和10.10.1.10。 HMI includes two Ethernet ports, and are set to 192.168.1.100 10.10.1.10.

[0167] 可选地,在本实施例中人机交互界面HMI与上述系统通信有主/备两个通信链路,例如,如图2所示的HMI与交换机Switcnl和Switcn2之间分别通过链路a、链路d进行通信,两条链路可以同时工作,通常以一条为主,另一条为辅,主链路故障时HMI将自动切换到另一条通信链路。 [0167] Alternatively, in the present embodiment has a man-machine interface HMI master / slave communication system above-described two communication links and, respectively, by a chain between e.g., HMI Switcnl the switch shown in Figure 2 and Switcn2 Road a, d communications link, both links may operate simultaneously, typically one main, supplemented by another, the HMI will automatically switch to another communication link if the primary link fails.

[0168] 进一步说明,上述系统中控制器所控制的主处理器CPU ModuleJ与备处理器CPUModule_2的网口是否工作是通过自身判断来实现的,当主处理器CPU Module_l为主工作时,其El 口,E2 口始终处于激活状态,两个端口均可以与HMI实现数据通信,备处理器CPUModule_2的E1' 口,E2' 口处于禁止状态,并呈现为高阻态。 [0168] Further described, whether or not the system controller controls the main processor and the standby processor CPU ModuleJ CPUModule_2 network port work through their own judgment to achieve, when the main processor, the main CPU Module_l work, the El port , E2 is always active port, two ports may be implemented in data communication with the HMI, the standby processor CPUModule_2 E1 'mouth, E2' port is disabled and presents a high impedance state.

[0169] 当主处理器CPU Module_l工作时,人机交互界面HMI与CPU A共有两条通信链路a—b和d— f,两条链路可以同时工作。 [0169] While the host processor CPU Module_l work, the man-machine interface HMI CPU A total of two communication links a-b and d- f, two links simultaneously. 假设当前a—b为主工作链路,则d— f链路则为备工作链路(但可以接收人机交互界面HMI下发的通信指令并回应);若通信链路a— b出现异常,人机交互界面HMI自动切换d — f通信链路来工作。 A-b based assumed that the current working link, the link d- f was prepared working link (but may receive communication instructions issued by the man-machine interface HMI and responses); if abnormal communication link a- b human machine interface HMI automatically switched d - f communications link to work. 主处理器CPU Module_l工作时,备处理器CPU Module_2的El' 口,E2'处于禁止状态,并呈现为高阻态。 When the main processor CPU Module_l work, preparation of the processor CPU Module_2 El 'mouth, E2' is disabled and presents a high impedance state. 如果主处理器CPUModule_l出现故障,控制器会自动裁决切换到备处理器CPU Module_2继续进行通信。 CPUModule_l If the master fails, the controller will automatically switch to standby decision processor CPU Module_2 continue communication.

[0170] 当备处理器CPU Module_2工作时,人机交互界面HMI与备处理器CPU Module_2共有两条通信链路a— c和d— e,两条链路可以同时工作。 [0170] When the standby processor CPU Module_2 work man-machine interface HMI and the standby processor CPU Module_2 total of two communication links a- c and d- e, two links simultaneously. 假设当前a— c为主工作链路,则d— e链路备工作链路(但可以接收人机交互界面HM下发的通信指令并回应);若通信链路a— c出现异常,人机交互界面HMI将自动切换d— e通信链路来工作。 A- c work mainly assumed that the current link, the link d- e standby working link (man-machine interface but can receive communication instructions and responses issued HM); if the communication link a- c abnormal, human machine interface HMI will automatically switch communication links work d- e. 备处理器CPUModule_2工作时主处理器CPU Module_l的El 口,E2处于禁止状态,并呈现为高阻态。 Preparation processor CPUModule_2 main processor during operation of the CPU Module_l port El, E2 is disabled and presents a high impedance state.

[0171] 通过本申请提供的实施例,主/备处理器中还设置多个通信接口,可以通过控制一些通信接口的开启或禁止,实现了节省IP资源的效果,扩大了冗余数量;还可通过一些通信接口实现对主处理器实时的状态检测,以使出现故障时,可以将主处理器及时切换至备处理器。 [0171] Example embodiments provided by the present application, master / slave processor is also provided a plurality of communication interfaces, by controlling the number of opening or prohibit communication interface, implements IP resource saving effect of expanding the number of redundant; further the main processor can be realized through some real-time status detecting a communication interface, so that when a fault occurs, the main processor in a timely manner can be switched to the backup processor.

[0172] 本实用新型提供了一种优选的实施例来进一步对本实用新型进行解释,但是值得注意的是,该优选实施例只是为了更好的描述本实用新型,并不构成对本实用新型不当的限定。 [0172] The present invention provides a further preferred embodiment of the present invention will be explained, but it is worth noting that only the preferred embodiment in order to better describe the present invention, do not constitute the present invention are novel improperly limited.

[0173] 从以上的描述中,可以看出,在本实用新型实施例中,通过将可编程控制器中的处理器、总线、I/o设备均设置主/备两个设备,克服了现有技术中只针对特定的单独的模块或整个系统进行冗余设置所导致的可靠性较低的技术问题,使得整个系统在单独的模块出现故障,或者任意模块组合出现故障时,均可实现在不影响其他类型的模块前提下,进行无扰切换,达到了基于模块灵活切换的目的,从而实现了提高系统可靠性的技术效果,进而解决了现有技术中所采用的冗余方式可靠性较低的技术问题。 [0173] From the above description, it can be seen that, in the present invention embodiment, the programmable controller by the processor, bus, I / o device are set master / slave two devices, now overcome there are only specific technical individual modules or the entire system less reliable technical problem caused by the redundancy provided, such that a total system failure in a separate module, or any combination of the modules fails, can be achieved in It does not affect other types of modules under the premise, a bumpless switching, to achieve the purpose of switching on a flexible module, thereby achieving the technical effect of improving the reliability of the system, thereby solving the prior art redundancy reliability than employed low technical problems.

[0174] 以上所述仅为本实用新型的优选实施例而已,并不用于限制本实用新型,对于本领域的技术人员来说,本实用新型可以有各种更改和变化。 [0174] The foregoing is only embodiments of the present invention is preferably, but not intended to limit the present invention, those skilled in the art, the present invention may have various changes and variations. 凡在本实用新型的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本实用新型的保护范围之内。 Any modification within the spirit and principle of the invention, the, equivalent substitutions, improvements should be included within the scope of protection of the present invention.

Claims (10)

  1. 1.一种可编程控制器冗余控制系统,其特征在于,包括: 主处理器,被设置为与主总线及备总线分别连接; 备处理器,被设置为与所述主总线及所述备总线分别连接,并与所述主处理器连接; 主总线,被设置为与I/o设备连接; 备总线,被设置为与所述I/o设备连接; 其中,所述主处理器与所述备处理器互为备份,所述主总线与所述备总线互为备份。 1. A programmable controller redundant control system comprising: a main processor, is arranged to be connected to the main bus and the Bus respectively; standby processor, is arranged to the main bus and the Preparation of buses are connected, and connected to the main processor; main bus, is provided to connect the I / o device; standby bus, is arranged to be connected to the I / o device; wherein said main processor and the standby processor up each other, the main bus and the bus standby redundancy.
  2. 2.根据权利要求1所述的系统,其特征在于,还包括:所述I/O设备,其中,所述I/O设备包括: 主I/o设备,被设置为与所述主总线及所述备总线分别连接;和/或备I/o设备,被设置为与所述主总线及所述备总线分别连接,并与所述主I/O设备连接; 其中,所述主I/o设备与所述备I/O设备互为备份。 2. The system according to claim 1, characterized in that, further comprising: the I / O device, wherein the I / O device comprising: a main I / o device, is arranged to the main bus and Preparation of the bus are connected; and / or backup I / o device, it is arranged to be connected to the main bus and the buses are prepared and connected to the main I / O device; wherein the primary I / o device and the standby I / O device redundancy.
  3. 3.根据权利要求1所述的系统,其特征在于,所述主处理器包括: 第一中央控制处理器,被设置为与第一I/o连接控制电路连接; 所述第一I/o连接控制电路,被设置为与所述主总线及所述备总线连接,用于选择所述主总线或所述备总线与所述I/o设备进行通信。 3. The system of claim 1, wherein said main processor comprises: a first central processor, is arranged to be connected to the first connection I / o control circuit; said first I / o connection control circuit, is arranged to communicate with the main bus and the bus connection apparatus, for selecting said master bus or the standby bus and the I / o device.
  4. 4.根据权利要求1所述的系统,其特征在于,所述备处理器包括: 第二中央控制处理器,被设置为与第二I/o连接控制电路连接; 所述第二I/o连接控制电路,被设置为与所述主总线及所述备总线连接,用于选择所述主总线或所述备总线与所述I/o设备进行通信。 4. The system according to claim 1, wherein said processor apparatus comprises: a second central processor, is arranged to be connected to the second connection I / o control circuit; said second I / o connection control circuit, is arranged to communicate with the main bus and the bus connection apparatus, for selecting said master bus or the standby bus and the I / o device.
  5. 5.根据权利要求1所述的系统,其特征在于, 所述主处理器中包括:第一通信接口,被设置为与所述备处理器连接,用于向所述备处理器发送指示所述主处理器的运行状态的指示信号; 所述备处理器中包括:第二通信接口,被设置为与所述主处理器连接,用于接收指示所述主处理器的运行状态的指示信号。 5. The system according to claim 1, wherein said main processor comprises: a first communication interface, is provided to the apparatus connected to the processor for transmitting the indication to the processor apparatus said signal indicative of the operating state of the host processor; the processor apparatus comprising: a second communication interface is arranged to connect to the main processor for receiving an indication signal indicating the operating state of the host processor .
  6. 6.根据权利要求5所述的系统,其特征在于,所述备处理器中还包括: 第一检测装置,被设置为与所述第二通信接口连接,用于检测所述指示所述主处理器的运行状态的指示信号是否出现异常。 6. The system as claimed in claim 5, wherein said processor apparatus further comprising: a first detecting means, the second communication interface is provided to the connection, for detecting the indication of the main a signal indicative of the operating state of the processor is abnormal.
  7. 7.根据权利要求2所述的系统,其特征在于, 所述主I/o设备包括:第三通信接口,被设置为与所述备I/O设备连接,用于向所述备I/o设备发送指示所述主I/O设备的运行状态的指示信号; 所述备I/o设备包括:第四通信接口,被设置为与所述主I/o设备连接,用于接收指示所述主I/o设备的运行状态的指示信号。 7. The system according to claim 2, characterized in that the main I / o device comprising: a third communication interface is set to the standby I / O device connected to the apparatus for I / o operating condition indicating the primary device transmits I / O device indicative signal; Preparation of the I / o device comprising: a fourth communication interface is provided to the main I / o device is connected, for receiving an indication of the a signal indicative of the operating state of said main I / o device.
  8. 8.根据权利要求7所述的系统,其特征在于,所述备I/O设备还包括: 第二检测装置,被设置为与所述第四通信接口连接,用于检测所述指示所述主I/O设备的运行状态的指示信号是否出现异常。 8. The system according to claim 7, wherein the standby I / O device further comprises: second detection means is arranged to communicate with said fourth interface, for detecting the indication of the a signal indicative of the operating state of the primary I / O device is abnormal.
  9. 9.根据权利要求1至8中任一项所述的系统,其特征在于, 所述主处理器包括:互为备份的两个以太网接口; 所述备处理器包括:互为备份的两个以太网接口。 The system according to claim 1 to 8 according to any preceding claim, wherein the primary processor comprising: a mutual backup two Ethernet interfaces; the processor apparatus comprising: two mutual backup Ethernet interfaces.
  10. 10.根据权利要求2、7-8中任一项所述的系统,其特征在于,所述主I/O设备与所述备I/o设备位于同一基板。 10. The system of any one of 2,7-8 claim, wherein the primary I / O device and the standby I / o device on the same substrate.
CN 201420215526 2014-04-29 2014-04-29 PLC redundancy control system CN204086849U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201420215526 CN204086849U (en) 2014-04-29 2014-04-29 PLC redundancy control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201420215526 CN204086849U (en) 2014-04-29 2014-04-29 PLC redundancy control system

Publications (1)

Publication Number Publication Date
CN204086849U true CN204086849U (en) 2015-01-07

Family

ID=52179544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201420215526 CN204086849U (en) 2014-04-29 2014-04-29 PLC redundancy control system

Country Status (1)

Country Link
CN (1) CN204086849U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103941633A (en) * 2014-04-29 2014-07-23 北京依雷特科技有限公司 PLC redundancy control method and system
CN104536361A (en) * 2015-01-23 2015-04-22 浙江中控技术股份有限公司 Data processing method and redundancy control system
CN105259863A (en) * 2015-10-30 2016-01-20 北京航天自动控制研究所 PLC warm backup redundancy method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103941633A (en) * 2014-04-29 2014-07-23 北京依雷特科技有限公司 PLC redundancy control method and system
CN103941633B (en) * 2014-04-29 2017-01-25 北京龙鼎源科技股份有限公司 PLC redundancy control method and system
CN104536361A (en) * 2015-01-23 2015-04-22 浙江中控技术股份有限公司 Data processing method and redundancy control system
CN104536361B (en) * 2015-01-23 2017-07-11 浙江中控技术股份有限公司 A data processing method, and a redundant control system
CN105259863A (en) * 2015-10-30 2016-01-20 北京航天自动控制研究所 PLC warm backup redundancy method and system
CN105259863B (en) * 2015-10-30 2017-11-03 北京航天自动控制研究所 One kind plc warm standby redundancy method and system

Similar Documents

Publication Publication Date Title
CN101102177A (en) An implementation method and device for switching master and slave controller
CN101634959A (en) Dual redundant fault-tolerant system based on embedded type CPU,
CN101546187A (en) Redundant PLC system
CN1777137A (en) Data translation device and system based on ethernet and serial communication technology
CN101483540A (en) Master-slave switching method in high class data communication equipment
CN101917283A (en) Two-channel hot standby system and method for realizing two-channel hot standby
CN101207408A (en) Apparatus and method of synthesis fault detection for main-spare taking turns
CN101337552A (en) Counting axle system using double 2-vote-2 system
CN102122157A (en) Redundancy architecture control system and method thereof capable of keeping original system function and performance
CN201936169U (en) Central redundancy control system for shielding door of rail transportation station
CN103149907A (en) Hot-redundancy CAN (Controller Area Network)-bus high-fault-tolerance control terminal and method based on dual DSPs (Digital Signal Processors)
CN101645915A (en) Disk array host channel daughter card, on-line switching system and switching method thereof
CN102724083A (en) Degradable triple-modular redundancy computer system based on software synchronization
CN101753284A (en) 10/100M Ethernet double interface switching method based upon carrier detect and device thereof
CN101192960A (en) Main/slave switching detection and control device and method in distributed system
CN101523310A (en) Method and system for redundantly actuating a slave device
CN103455005A (en) Controller redundancy and switching method
CN102724092A (en) Profibus-DP communication protocol redundancy master station
CN102540985A (en) Central redundancy control system for rail transit platform screen door
CN101047575A (en) System, device, equipment and method for monitoring management
CN102749890A (en) Redundancy method for DCS (distributed control system) control module
CN102508746A (en) Management method for triple configurable fault-tolerant computer system
CN203476374U (en) Hydraulic support electrohydraulic control system

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
C56 Change in the name or address of the patentee