CN105629923B - Controller and its control method - Google Patents
Controller and its control method Download PDFInfo
- Publication number
- CN105629923B CN105629923B CN201510784708.5A CN201510784708A CN105629923B CN 105629923 B CN105629923 B CN 105629923B CN 201510784708 A CN201510784708 A CN 201510784708A CN 105629923 B CN105629923 B CN 105629923B
- Authority
- CN
- China
- Prior art keywords
- module
- cpu
- remote
- digital data
- mentioned
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 18
- 230000005856 abnormality Effects 0.000 claims abstract description 114
- 230000005540 biological transmission Effects 0.000 claims abstract description 102
- 230000002159 abnormal effect Effects 0.000 claims abstract description 63
- 238000001514 detection method Methods 0.000 claims abstract description 20
- 230000008859 change Effects 0.000 claims description 21
- 230000008569 process Effects 0.000 claims description 5
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 30
- 238000012545 processing Methods 0.000 description 25
- 238000010586 diagram Methods 0.000 description 22
- 230000009471 action Effects 0.000 description 11
- 239000010865 sewage Substances 0.000 description 8
- 238000009413 insulation Methods 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000007257 malfunction Effects 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000002347 injection Methods 0.000 description 3
- 239000007924 injection Substances 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000000746 purification Methods 0.000 description 3
- 239000000126 substance Substances 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- KZBUYRJDOAKODT-UHFFFAOYSA-N Chlorine Chemical compound ClCl KZBUYRJDOAKODT-UHFFFAOYSA-N 0.000 description 2
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 238000004062 sedimentation Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 239000008399 tap water Substances 0.000 description 2
- 235000020679 tap water Nutrition 0.000 description 2
- 229910000831 Steel Inorganic materials 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 239000003990 capacitor Substances 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 229910052742 iron Inorganic materials 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- -1 sand filtration Substances 0.000 description 1
- 238000009287 sand filtration Methods 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/418—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
- G05B19/4184—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by fault tolerance, reliability of production system
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34475—Detect abnormality of control system without inverted model, using input command
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Manufacturing & Machinery (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Programmable Controllers (AREA)
- Testing And Monitoring For Control Systems (AREA)
- Safety Devices In Control Systems (AREA)
- Numerical Control (AREA)
Abstract
本发明提供一种在由CPU模块与远程IO模块构成的控制器中,根据异常要素而可靠并且选择性地执行异常时的控制动作,从而实现高可靠性的控制器。本发明的控制器具备:CPU模块,其具有检测模块的异常动作的异常状态检测部,并对上述工厂的多个设备机器进行程序控制;以及多个远程IO模块,它们通过串行传输路径菊花链式连接于上述CPU模块,并转换从上述CPU模块传输的数字数据而向上述设备机器输出,上述异常状态检测部在检测出异常动作时,向上述远程IO模块通知CPU异常,上述远程IO模块在被通知上述CPU异常时,与基于上述数字数据的控制不同地将所有上述设备机器控制为停止状态。
The present invention provides a controller composed of a CPU module and a remote IO module, which reliably and selectively executes a control operation at the time of an abnormality according to an abnormal factor, thereby realizing a highly reliable controller. The controller of the present invention is equipped with: a CPU module having an abnormal state detection unit for detecting abnormal operation of the module, and performing program control on a plurality of equipment machines in the above-mentioned factory; and a plurality of remote IO modules connected through a serial transmission path The above-mentioned CPU module is connected in a chain, and the digital data transmitted from the above-mentioned CPU module is converted and output to the above-mentioned equipment. When the above-mentioned CPU abnormality is notified, all the above-mentioned equipment devices are controlled to be in a stopped state differently from the control based on the above-mentioned digital data.
Description
技术领域technical field
本发明涉及对工厂(plant)设备等进行自动控制的控制器。The present invention relates to a controller for automatically controlling plant equipment and the like.
背景技术Background technique
作为进行自动控制的控制器,存在通过传输电缆将CPU(Central ProcessingUnit:中央处理器)模块与多个远程IO(Remote Input/Output:远程输入/输出)模块之间连接的系统。对于该结构而言,CPU模块执行自动控制用的控制程序并输出数字数据DO(Digital Output data:数字输出数据),远程IO模块将从CPU模块接收的数字数据DO转换成工厂输出信号并将其向工厂设备的操作端子输出。As a controller that performs automatic control, there is a system that connects a CPU (Central Processing Unit: central processing unit) module and a plurality of remote IO (Remote Input/Output: remote input/output) modules with a transmission cable. In this structure, the CPU module executes the control program for automatic control and outputs digital data DO (Digital Output data), and the remote IO module converts the digital data DO received from the CPU module into a factory output signal and converts it Output to the operation terminal of the factory equipment.
该远程IO方式的控制器存在能够以省空间、低成本实现多个分散配置的工厂设备的控制的优点。This remote IO type controller has the advantage of being able to realize the control of a plurality of distributed factory equipment at a space-saving and low-cost.
例如,由多个设备构成的上下水道工厂能够应用上述的控制器,进行工厂控制。上下水道工厂的各设备由多个机器构成,而且,在各机器具备操作端子。从外部向该操作端子输出工厂输出信号,从而能够操作机器的运转、停止。从控制器或者手动操作装置向操作端子适当地输出工厂输出信号,从而实现机器单体的运转以及工厂整体的运转。For example, the above-mentioned controller can be applied to a water and sewage plant composed of a plurality of devices for plant control. Each piece of equipment in a water and sewage factory is composed of a plurality of machines, and each machine is equipped with an operation terminal. By outputting a factory output signal to the operation terminal from the outside, it is possible to operate and stop the machine. The factory output signal is appropriately output from the controller or manual operation device to the operation terminal, so as to realize the operation of the single machine and the operation of the whole factory.
上下水道工厂的控制器的误动作、停止存在引起自来水停水、城市洪水等,从而威胁生命、财产的可能性。因此,对控制器要求24小时连续的稳定的运转。Misoperation or stoppage of the controller of the sewer factory may cause tap water stoppage, city flood, etc., thereby threatening life and property. Therefore, continuous and stable operation for 24 hours is required for the controller.
如上,对面向上下水道工厂的控制器要求高可靠性。As above, high reliability is required for controllers for water and sewage plants.
在控制器检测出异常的情况下,为了防止工厂的误动作,而必须实施紧急停止或者边将工厂功能维持为检测出异常前的状态边运转、使一部分机器停止而缩减工厂功能地运转、或切换成手动操作进行运转等。When the controller detects an abnormality, in order to prevent malfunction of the plant, it is necessary to implement an emergency stop or operate the plant while maintaining the state before the abnormality was detected, stop part of the equipment and operate the plant with reduced functions, or Switch to manual operation for operation, etc.
特别是,在检测出控制器的异常的危险度最高的CPU模块异常的情况下,需要避免CPU误动作而导致的数字数据DO误输出的风险,而使工厂紧急停止。In particular, when an abnormality of the CPU module, which has the highest risk of abnormality of the controller, is detected, it is necessary to avoid the risk of erroneous output of digital data DO due to CPU malfunction, and urgently stop the factory.
另外,在上下水道工厂设置有高压电气设备、感应马达、变频器等成为噪声源的机器,因此在应用远程IO模块时,存在产生因噪声重叠而对将CPU模块与远程IO模块连接的传输电缆产生一时性的传输异常的可能性。In addition, high-voltage electrical equipment, induction motors, inverters, and other equipment that become noise sources are installed in water and sewage plants. Therefore, when remote IO modules are used, there may be problems with transmission cables that connect the CPU module and remote IO modules due to noise overlap. Potential for temporary transmission anomalies.
以往,鉴于上述的情况,提出了在检测出控制器的异常的情况下,控制外部负载的供给电源的技术(例如,参照专利文献1)。Conventionally, in view of the above-mentioned circumstances, when an abnormality of the controller is detected, a technique of controlling the power supply to the external load has been proposed (for example, refer to Patent Document 1).
根据专利文献1所公开的技术,通过从主程序输出的脉冲输出和由继电器与定时器构成的外部电路定时器检测异常,在检测出异常时,切断或者接通外部负载的电源供给,从而实现故障保护功能。According to the technology disclosed in Patent Document 1, an abnormality is detected by the pulse output output from the main program and an external circuit timer composed of a relay and a timer. failsafe function.
另外,在专利文献2公开了如下IO单元,通过设置MPU11的异常检查用输出端子,异常检查时的IO单元的输出端子的输出的状态成为未激活被连接的IO机器的状态,从而能够预先检测有无故障·异常。In addition, the following IO unit is disclosed in Patent Document 2. By providing an output terminal for abnormality inspection of the MPU 11, the output state of the output terminal of the IO unit at the time of abnormality inspection becomes a state in which the connected IO device is not activated, so that it can be detected in advance. Are there any malfunctions or abnormalities?
现有技术文献prior art literature
专利文献patent documents
专利文献1:日本特开平9-185403号公报Patent Document 1: Japanese Patent Application Laid-Open No. 9-185403
专利文献2:日本特开2008-310389号公报Patent Document 2: Japanese Patent Laid-Open No. 2008-310389
发明内容Contents of the invention
发明所要解决的课题The problem to be solved by the invention
根据上述的专利文献1所公开的技术,通过接通延迟定时器与断开延时定时器的组合来监视脉冲输出,因此从产生异常至检测出异常至少需要两个程序周期以上的异常检测等待时间。因此,在异常检测等待时间内,存在无法防止因CPU误动作而导致的向工厂的误输出的问题。According to the technology disclosed in the above-mentioned Patent Document 1, the pulse output is monitored by a combination of an on-delay timer and an off-delay timer, so at least two program cycles or more are required for abnormality detection waits from when an abnormality occurs to when an abnormality is detected. time. Therefore, there is a problem that it is impossible to prevent erroneous output to the factory due to CPU malfunction during the abnormality detection waiting time.
另外,根据专利文献1,即使在CPU模块、远程IO模块、主程序、传输、外部电路的任意部位产生异常,也检测为全部相同的异常,因此存在即使检测出CPU异常之类的危险度特别高的异常重要因素,在检测出时也无法可靠地立即断开数字数据DO的问题。In addition, according to Patent Document 1, even if an abnormality occurs in any part of the CPU module, remote IO module, main program, transmission, and external circuits, all the same abnormalities are detected, so there is a risk that even if a CPU abnormality is detected, the degree of risk is particularly high. There is a problem that the digital data DO cannot be reliably and immediately disconnected even when the abnormality factor is high when it is detected.
另外,存在由CPU模块与远程IO模块构成的控制器无法检测必要的传输异常,即在检测出传输异常时无法选择异常时控制动作而进行设定的课题。In addition, there is a problem that the controller composed of the CPU module and the remote IO module cannot detect the necessary transmission abnormality, that is, it cannot select and set the abnormality control operation when the transmission abnormality is detected.
根据上述的专利文献2所公开的技术,虽能够预先检测出有无IO单元的故障、异常,但存在未考虑实际运用时的故障检测,另外未考虑PLC的CPU单元、主要单元的故障的问题。According to the technology disclosed in the above-mentioned Patent Document 2, although the presence or absence of failure and abnormality of the IO unit can be detected in advance, there is a problem that the failure detection during actual operation is not considered, and the failure of the CPU unit and main unit of the PLC is not considered. .
如上,在专利文献1、2所公开的技术中,无法实现面向上下水道的控制器所需的可靠性。As described above, in the techniques disclosed in Patent Documents 1 and 2, the reliability required for a controller for water and sewage cannot be realized.
用于解决课题的方法method used to solve the problem
本发明是鉴于上述的实际情况而完成的,目的在于提供一种在由CPU模块与远程IO模块构成的控制器中,根据CPU异常、传输异常等的异常要素,而可靠并且选择性地执行异常时的控制动作,从而能够实现高可靠性的控制器。The present invention has been made in view of the above-mentioned actual situation, and the object is to provide a controller composed of a CPU module and a remote IO module, which can reliably and selectively execute abnormality according to abnormal factors such as CPU abnormality and transmission abnormality. Timely control action, so that a highly reliable controller can be realized.
为了解决上述课题,本发明的对工厂的设备机器进行控制的控制器具备:CPU模块,其具有检测模块的异常动作的异常状态检测部,并对上述工厂的多个设备机器进行程序控制;以及多个远程IO模块,它们通过串行传输路径菊花链式连接于上述CPU模块,并转换从上述CPU模块传输的数字数据而向上述设备机器输出,上述CPU模块在上述异常状态检测部检测出异常动作时,向上述远程IO模块通知CPU异常,上述远程IO模块在被通知上述CPU异常时,与基于上述数字数据的控制不同地使所有上述设备机器处于停止状态。In order to solve the above-mentioned problems, a controller for controlling equipment in a factory according to the present invention includes: a CPU module having an abnormal state detection unit for detecting abnormal operation of the module, and program-controlling a plurality of equipment in the factory; and A plurality of remote IO modules are daisy-chain-connected to the CPU module through a serial transmission path, and convert digital data transmitted from the CPU module to output to the equipment device, and the CPU module detects an abnormality in the abnormal state detection part When operating, the remote IO module is notified of CPU abnormality, and when the remote IO module is notified of the CPU abnormality, unlike the control based on the digital data, all of the equipment devices are stopped.
另外,对于本发明的具有CPU模块和对工厂的多个设备机器进行控制的远程IO模块的控制器而言,上述CPU模块与上述远程IO模块通过串行传输路径以及CPU状态信号而被连接,该串行传输路径菊花链式连接上述CPU模块与上述远程IO模块并传输控制信息,该CPU状态信号菊花链式连接上述CPU模块与上述远程IO模块并从上述CPU模块向上述远程IO模块传输CPU异常。In addition, for the controller of the present invention having a CPU module and a remote IO module controlling a plurality of equipment in a factory, the CPU module and the remote IO module are connected through a serial transmission path and a CPU status signal, The serial transmission path daisy-chain connects the CPU module and the remote IO module and transmits control information, and the CPU status signal daisy-chain connects the CPU module and the remote IO module and transmits the CPU from the CPU module to the remote IO module. abnormal.
另外,本发明的具有CPU模块和对工厂的至少一个设备机器进行控制的远程IO模块,并对工厂的多个设备机器进行控制的控制器的控制方法具有:检测对上述工厂的多个设备机器进行程序控制的CPU模块的异常动作并在CPU状态信号输出表示异常状态的信号的步骤;以及与从CPU模块通知的数字数据DO对应地设定上述多个设备机器各自的操作端子的上述远程IO模块根据上述CPU状态信号的表示异常状态的信号而将所有的上述操作端子设定为规定的状态的步骤。In addition, the control method of the present invention has a CPU module and a remote IO module that controls at least one equipment in the factory, and controls a plurality of equipment in the factory. The step of performing the abnormal operation of the CPU module controlled by the program and outputting a signal indicating the abnormal state in the CPU state signal; and setting the above-mentioned remote IO of each operation terminal of the above-mentioned plurality of equipment in correspondence with the digital data DO notified from the CPU module A step of setting all of the operation terminals to a predetermined state by the module based on a signal indicating an abnormal state of the CPU state signal.
本发明的效果如下。The effects of the present invention are as follows.
根据本发明,能够提高控制器的可靠性。According to the present invention, the reliability of the controller can be improved.
附图说明Description of drawings
图1是上下水道工厂的控制器的结构图。Fig. 1 is a configuration diagram of a controller of a water and sewage plant.
图2是表示CPU模块的结构例的图。FIG. 2 is a diagram showing a configuration example of a CPU module.
图3是对控制程序的异常检测处理进行说明的时序图。FIG. 3 is a sequence diagram illustrating abnormality detection processing of a control program.
图4是表示远程IO模块与设备机器的结构例的图。FIG. 4 is a diagram showing a configuration example of a remote IO module and equipment.
图5是表示CPU异常控制部的结构的图。FIG. 5 is a diagram showing a configuration of a CPU abnormality control unit.
图6是表示远程IO模块的IO输出部的结构的图。FIG. 6 is a diagram showing the configuration of an IO output unit of a remote IO module.
图7是表示CPU异常控制部的时序图的一个例子的图。FIG. 7 is a diagram showing an example of a sequence chart of a CPU abnormality control unit.
图8是表示远程IO模块的其他的结构的图。FIG. 8 is a diagram showing another configuration of a remote IO module.
图9是表示从远程IO传输部被输出的数字数据DO的时序图的一个例子的图。FIG. 9 is a diagram showing an example of a timing chart of digital data DO output from a remote IO transfer unit.
图10是对远程IO模块的动作进行程序处理的情况下的流程图。Fig. 10 is a flowchart in the case of performing program processing on the operation of the remote IO module.
图11是非同步地进行的CPU异常处理的流程图。FIG. 11 is a flowchart of CPU exception processing performed asynchronously.
图12是表示水输送工厂的一个例子的图。FIG. 12 is a diagram showing an example of a water delivery factory.
其中:in:
1—控制器;2—CPU模块;3、3a、3b、3c—远程IO模块;4、4a、4b、4c、4d、4e、4f、4g、4h、4i—设备机器;5—串行传输路径;6—CPU状态信号;7a、7b、7c、7d、7e、7f、7g、7h、7i—机器连接电缆。1—controller; 2—CPU module; 3, 3a, 3b, 3c—remote IO module; 4, 4a, 4b, 4c, 4d, 4e, 4f, 4g, 4h, 4i—equipment machine; 5—serial transmission Path; 6—CPU status signal; 7a, 7b, 7c, 7d, 7e, 7f, 7g, 7h, 7i—machine connection cables.
具体实施方式Detailed ways
以下,参照附图对本发明的实施方式详细地进行说明。Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
实施方式1Embodiment 1
本实施方式以从水库、河川汲取原水,进行药品沉淀、砂过滤、氯气注入而制造自来水的净水厂等上下水道工厂为例进行说明。This embodiment will be described by taking raw water from a reservoir or a river as an example, such as a water purification plant, which manufactures tap water by sedimentation of chemicals, sand filtration, and injection of chlorine gas.
净水厂等上下水道工厂由原水泵设备、高压受电设备、应急用的发电机设备、药品注入设备、沉淀池设备、过滤池设备、氯气注入设备、输水泵设备、排水设备等构成。而且,在这些各设备包含泵、马达、阀、断路器、发动机等的控制机器与水位计、流量计、水质传感器等的检测机器。Water purification plants and other sewage plants are composed of raw water pump equipment, high-voltage power receiving equipment, emergency generator equipment, chemical injection equipment, sedimentation tank equipment, filter tank equipment, chlorine gas injection equipment, water delivery pump equipment, drainage equipment, etc. Furthermore, these devices include control devices such as pumps, motors, valves, circuit breakers, and engines, and detection devices such as water level gauges, flow meters, and water quality sensors.
在上述的控制机器中,具备用于将机器的动作状态向外部输出的状态触点。此处,在机器的动作状态中,存在泵的运转过程中或停止过程中、阀的全开或全闭或微开等开闭状态、断路器的接通或断开、机器的故障状态。In the control device described above, a status contact for outputting the operating state of the device to the outside is provided. Here, in the operating state of the machine, there are on-off states such as pump operation or stop, valve fully open, fully closed, or slightly open, circuit breaker on or off, and machine failure state.
该状态触点的电气规格例如成为若泵在运转过程中,则成为电导通状态,若在停止过程中,则成为绝缘状态的二值的输出。The electrical specification of the state contact is, for example, a binary output in which the pump is in an electrically conductive state when it is running, and is in an isolated state when it is stopped.
另外,上述的检测机器具备将电流、电压、流量、水位、水压、开度等的传感器输出的数值信息转换成电压或者电流的模拟信号并将其向外部输出的模拟输出端子。In addition, the above detection equipment has an analog output terminal for converting numerical information output by sensors such as current, voltage, flow rate, water level, water pressure, and opening into an analog signal of voltage or current and outputting it to the outside.
另外,在上述的控制机器中,具备用于从外部操作机器的动作的操作端子。将操作端子形成电导通状态、绝缘状态,从而控制泵、马达的运转停止、阀、阀门的开闭、断路器、电容器的通断等。例如,若从外部使泵的操作端子处于电导通状态,则泵运转,若处于绝缘状态,则泵停止。上述的操作端子有时也是用于输入来自外部的模拟信号的模拟输入端子,此时,根据模拟输入端子的信号操作控制机器的开度、转速等。In addition, the control device described above is provided with an operation terminal for externally operating the operation of the device. Make the operation terminals into the state of electrical conduction and insulation, so as to control the operation and stop of pumps and motors, the opening and closing of valves and valves, the on and off of circuit breakers and capacitors, etc. For example, if the operating terminal of the pump is electrically conducted from the outside, the pump will operate, and if it is in an isolated state, the pump will stop. The above-mentioned operation terminal is sometimes also an analog input terminal for inputting an analog signal from the outside. At this time, the opening degree, rotation speed, etc. of the machine are controlled according to the signal of the analog input terminal.
上述的检测机有时也具有模拟输入端子。The detectors mentioned above may also have analog input terminals.
图1是具备上述的控制机器的净水厂等上下水道工厂的控制器的结构图。FIG. 1 is a block diagram of a controller of a water and sewage plant such as a water purification plant equipped with the above-mentioned control equipment.
控制器1由CPU(Central Processing Unit)模块2与多个远程IO(Remote Input/Output)模块3a、3b、3c(以下,总称为远程IO模块3)构成。The controller 1 is composed of a CPU (Central Processing Unit) module 2 and a plurality of remote IO (Remote Input/Output) modules 3 a, 3 b, and 3 c (hereinafter, collectively referred to as remote IO modules 3 ).
CPU模块2与多个远程IO模块3通过RS-485等多站方式的串行传输路径5而被菊花链式连接。而且,通过在CPU模块2动作的顺序程序,经由串行传输路径5,访问远程IO模块3,从而控制包含控制机器的多个设备机器4a、4b、4c、…4i(以下,总称为设备机器4)。The CPU module 2 and the plurality of remote IO modules 3 are daisy-chain-connected via a multi-drop serial transmission line 5 such as RS-485. Moreover, the sequence program operating on the CPU module 2 accesses the remote IO module 3 via the serial transmission path 5, thereby controlling a plurality of equipment devices 4a, 4b, 4c, ... 4i (hereinafter collectively referred to as equipment devices) including control devices. 4).
在图1的系统结构图中,示出了具有多个远程IO模块3的结构,但也可以是一个CPU模块2与一个远程IO模块3的结构。In the system structure diagram of FIG. 1 , a structure with multiple remote IO modules 3 is shown, but a structure with one CPU module 2 and one remote IO module 3 is also possible.
在以下的说明中,将经由串行传输路径5在CPU模块2与远程IO模块3之间被传输的数字数据称为1位结构的输入用的数字数据DI(DI:Digital Input data)、输出用的数字数据DO(DO:Digital Output data)、字或长字结构的模拟输入数据AI(AI:Analog Inputdata)、模拟输出数据AO(AO:Analog Output data)、脉冲输入数据PI(PI:Pulse Inputdata)等。In the following description, the digital data transmitted between the CPU module 2 and the remote IO module 3 via the serial transmission path 5 will be referred to as digital data DI (DI: Digital Input data) for input and output of 1-bit structure. Digital data DO (DO: Digital Output data), analog input data AI (AI: Analog Inputdata) of word or long word structure, analog output data AO (AO: Analog Output data), pulse input data PI (PI: Pulse Inputdata) etc.
在远程IO模块3分别经由机器连接电缆7a、7b、7c、…7i(以下,总称为机器连接电缆7)连接有多个设备机器4的状态触点、操作端子、模拟输入端子、模拟输出端子。机器连接电缆7的电气规格具有AC100V、AC200V、DC24V、DC48V等的电压输出,并具有导通或绝缘的状态。或者是4~20mA、1~5V等的模拟信号。The remote IO module 3 is connected to the status contacts, operation terminals, analog input terminals, and analog output terminals of a plurality of equipment machines 4 via machine connection cables 7a, 7b, 7c, ... 7i (hereinafter collectively referred to as machine connection cables 7). . The electrical specifications of the machine connection cable 7 have voltage outputs such as AC100V, AC200V, DC24V, DC48V, etc., and have a conduction or insulation state. Or 4 ~ 20mA, 1 ~ 5V and other analog signals.
设备机器4的状态触点、操作端子、模拟输入端子、模拟输出端子经由该机器连接电缆7从远程IO模块3被访问,CPU模块2通过远程IO模块3控制设备机器4。The status contacts, operation terminals, analog input terminals, and analog output terminals of the equipment device 4 are accessed from the remote IO module 3 via the equipment connection cable 7 , and the CPU module 2 controls the equipment device 4 through the remote IO module 3 .
更详细而言,在远程IO模块3经由机器连接电缆7输入有设备机器4的状态触点的状态,作为来自设备机器的信号。被输入的设备机器4的状态触点的状态被转换成从远程IO模块3向CPU模块2传输的数字数据DI。具体而言,设备机器4的状态触点若成为导通状态,则DI被转换成“1”,若成为绝缘状态,则DI被转换成“0”。被转换的设备机器4的状态触点的数字数据DI从远程IO模块3被传输至CPU模块2。另外,设备机器4若输出电压或者电流的电平,则对设备机器4的模拟输出端子的状态进行AD转换而形成模拟输入数据AI,并从远程IO模块3向CPU模块2传输。More specifically, the state of the status contact of the equipment equipment 4 is input to the remote IO module 3 via the equipment connection cable 7 as a signal from the equipment equipment. The input state of the status contact of the equipment device 4 is converted into digital data DI transmitted from the remote IO module 3 to the CPU module 2 . Specifically, when the status contact of the equipment 4 is in the conductive state, DI is converted to "1", and when it is in the isolated state, DI is converted to "0". The digital data DI of the status contacts of the converted equipment machine 4 are transmitted from the remote IO module 3 to the CPU module 2 . Moreover, when the equipment 4 outputs a voltage or current level, it AD-converts the state of the analog output terminal of the equipment 4 to form analog input data AI, and transmits it from the remote IO module 3 to the CPU module 2 .
若从CPU模块2传输有数字数据DO,则远程IO模块3将机器连接电缆7驱动为导通状态或者绝缘状态,从而控制设备机器4的操作端子。具体而言,对于机器连接电缆7而言,若DO为“1”,则被驱动为导通状态,若DO为“0”,则被驱动为绝缘状态。When the digital data DO is transmitted from the CPU module 2 , the remote IO module 3 drives the device connection cable 7 into a conduction state or an insulated state, thereby controlling the operation terminal of the equipment device 4 . Specifically, the device connection cable 7 is driven into a conduction state when DO is "1", and is driven into an insulated state when DO is "0".
另外,远程IO模块3对模拟输出数据AO进行DA转换而形成模拟信号,并向设备机器4的模拟输入端子输出。In addition, the remote IO module 3 performs DA conversion on the analog output data AO to form an analog signal, and outputs it to the analog input terminal of the equipment device 4 .
在图1中连接有三台设备机器4,但在一个远程IO模块3能够连接8~64台设备机器4。在CPU模块2连接有多个I/O模块3。通常,一台控制器进行输入输出的状态触点、操作端子、模拟输入端子以及模拟输出端子的合计达到数十~数千点。In FIG. 1 , three equipment devices 4 are connected, but 8 to 64 equipment devices 4 can be connected to one remote IO module 3 . A plurality of I/O modules 3 are connected to the CPU module 2 . Usually, the total number of state contacts, operation terminals, analog input terminals, and analog output terminals for input and output of one controller is tens to thousands of points.
机器连接电缆7铺设于每个状态触点、操作端子、模拟输入端子、模拟输出端子,而成为数十~数千条。特别是在大规模的系统中,机器连接电缆7的铺设变得困难。因此,通过应用远程IO模块3,在设备机器4的附近设置远程IO模块3,从而使机器连接电缆7的铺设变得容易,但需要串行传输路径5误传输时的应对。The machine connection cables 7 are laid for each status contact, operation terminal, analog input terminal, and analog output terminal, and the number is tens to thousands. Especially in large-scale systems, the laying of the machine connection cable 7 becomes difficult. Therefore, by applying the remote IO module 3 and installing the remote IO module 3 near the equipment 4, it is easy to lay the equipment connection cable 7, but it is necessary to deal with the mistransmission of the serial transmission path 5.
另外,需要远程IO模块3相对于CPU模块2的异常动作的应对。In addition, it is necessary to deal with the abnormal operation of the remote IO module 3 with respect to the CPU module 2 .
在本实施例的控制器1中,通过以下方式,应对传输错误、CPU异常动作。In the controller 1 of this embodiment, transmission errors and CPU abnormal operations are dealt with in the following manner.
CPU模块2基于数字数据DI、模拟输入数据AI执行控制程序,作为执行结果,输出数字数据DO、模拟输出数据AO。此时,本实施例的CPU模块2监视硬件、程序的状态并检测动作异常,从而在CPU状态信号6输出有无异常。The CPU module 2 executes the control program based on the digital data DI and the analog input data AI, and outputs the digital data DO and the analog output data AO as the execution result. At this time, the CPU module 2 of this embodiment monitors the status of hardware and programs to detect abnormal operation, and outputs whether there is abnormality in the CPU status signal 6 .
另外,远程IO模块3具有奇偶错误等的串行传输路径5的错误检测机构,在检测出传输错误时,将各个设备机器4的DO设为“0”(绝缘状态)或者保持检测出错误前的状态。In addition, the remote IO module 3 has an error detection mechanism of the serial transmission path 5 such as a parity error, and when a transmission error is detected, the DO of each equipment device 4 is set to "0" (insulated state) or remains in the state before the error is detected. status.
另外,远程IO模块3在CPU状态信号6表示CPU异常的情况下,不论DO的状态如何,均将全部的设备机器4的操作端子驱动为绝缘状态。In addition, when the CPU state signal 6 indicates that the CPU is abnormal, the remote IO module 3 drives the operation terminals of all the equipment devices 4 to an isolated state regardless of the state of DO.
以下,对处理传输错误、CPU的动作异常的结构详细地进行说明。Hereinafter, the configuration for handling transmission errors and CPU operation abnormalities will be described in detail.
图2是表示CPU模块2的结构例的图。CPU模块2具有CPU21、存储器22、CPU传输部23、异常状态检测部25以及异常状态输出部26,并通过CPU系统总线24相互连接。存储器22为RAM(Random Access Memory:随机存取存储器)等,并配置有控制程序221、寄存器222。FIG. 2 is a diagram showing a configuration example of the CPU module 2 . The CPU module 2 has a CPU 21 , a memory 22 , a CPU transmission unit 23 , an abnormal state detection unit 25 , and an abnormal state output unit 26 , and is connected to each other through a CPU system bus 24 . The memory 22 is RAM (Random Access Memory: random access memory) etc., and the control program 221 and the register 222 are arrange|positioned.
CPU传输部23在与控制程序221的处理对应的规定的周期内,经由传输电缆5而与远程IO模块3之间执行串行通信,并收发数字数据DI、数字数据DO等。另外,CPU传输部23经由系统总线24而与寄存器222之间收发数字数据DI、数字数据DO,从而使远程IO模块3与寄存器222的数字数据一致化(称为刷新处理)。The CPU transmission unit 23 performs serial communication with the remote IO module 3 via the transmission cable 5 in a predetermined cycle corresponding to the processing of the control program 221 , and transmits and receives digital data DI, digital data DO, and the like. In addition, the CPU transfer unit 23 transmits and receives digital data DI and digital data DO to and from the register 222 via the system bus 24 to align the digital data of the remote IO module 3 and the register 222 (referred to as refresh processing).
控制程序221是设备机器4的顺序控制、循环控制的程序,在寄存器222储存有数字数据DI、数字数据DO、模拟输入数据AI、模拟输出数据AO、控制程序的初始数据、运算数据等。The control program 221 is a program for sequence control and cycle control of the equipment 4, and the register 222 stores digital data DI, digital data DO, analog input data AI, analog output data AO, initial data of the control program, calculation data, and the like.
另外,控制程序221被CPU21周期性地执行,在通过远程IO模块3将设备机器4的状态触点的内容转换成数字数据DI后,经由CPU传输部23储存于寄存器222,成为控制程序221的输入。In addition, the control program 221 is periodically executed by the CPU 21. After the remote IO module 3 converts the content of the status contact of the equipment 4 into digital data DI, it is stored in the register 222 via the CPU transmission unit 23, and becomes the content of the control program 221. enter.
控制程序221将寄存器222的数字数据DI作为输入来执行逻辑运算、数值运算等的程序运算,将数字数据DO作为执行结果输出。而且,被控制程序221输出至寄存器222的数字数据DO经由CPU传输部23被发送至远程IO模块3,从而在规定的周期内设定设备机器4的操作端子。The control program 221 uses the digital data DI of the register 222 as an input, executes program operations such as logic operations and numerical operations, and outputs digital data DO as an execution result. And the digital data DO output to the register 222 by the control program 221 is sent to the remote IO module 3 via the CPU transmission part 23, and the operation terminal of the equipment 4 is set in a predetermined cycle.
图3是对控制程序221的异常检测处理进行说明的时序图。FIG. 3 is a sequence diagram illustrating abnormality detection processing of the control program 221 .
控制程序221以例如50ms、100ms、200ms等的控制周期反复执行处理。The control program 221 repeatedly executes processing in a control cycle of, for example, 50 ms, 100 ms, 200 ms, or the like.
该处理由使远程IO模块3与寄存器222的数字数据一致化的IO模块的刷新处理、程序运算构成。储存于寄存器222的程序运算的结果在接下来的周期的IO模块的刷新处理中被发送至远程IO模块3。This processing is composed of refresh processing of the remote IO module 3 and the digital data of the register 222, and program operation. The result of the program operation stored in the register 222 is sent to the remote IO module 3 in the refresh process of the IO module in the next cycle.
在产生了CPU21、存储器22的异常动作、控制程序221的程序异常的情况下,存在程序运算在规定时间内未结束的情况。When an abnormal operation of the CPU 21 and the memory 22 or a program abnormality of the control program 221 occurs, the program operation may not be completed within a predetermined time.
异常状态检测部25监视控制程序221的处理周期,若控制程序221的处理周期超过规定的监视时间,则判定为CPU异常。The abnormal state detection unit 25 monitors the processing cycle of the control program 221, and determines that the CPU is abnormal when the processing cycle of the control program 221 exceeds a predetermined monitoring time.
更详细而言,在异常状态检测部25设置在规定的监视时间内溢出的监视定时器,从而在控制程序221的开始进行定时器初始化与定时器的起动。在控制程序221正常地动作的情况下,不发生监视定时器的溢出。但是,在控制程序221处理延迟而发生了监视定时器的溢出的情况下,则判定为CPU的动作异常。More specifically, a monitoring timer that overflows within a predetermined monitoring time is provided in the abnormal state detection unit 25 , and timer initialization and timer activation are performed at the start of the control program 221 . When the control program 221 operates normally, the watchdog timer does not overflow. However, when the process of the control program 221 is delayed and the watchdog timer overflows, it is determined that the operation of the CPU is abnormal.
另外,IO模块的刷新处理与控制程序作为独立地执行的构成,监视IO模块的刷新处理与控制程序的处理周期,若任一个的处理周期超过规定的监视时间,则也可以判定为CPU的动作异常。另外,控制程序也可以为多个。In addition, the refresh processing of the IO module and the control program are independently executed, and the processing cycle of the refresh processing of the IO module and the control program is monitored. If the processing cycle of any one exceeds the specified monitoring time, it can also be judged as the operation of the CPU. abnormal. In addition, there may be a plurality of control programs.
另外,图2的异常状态检测部25也可以检测ROM总数错误、存储器的位错误等的硬件异常、通过非法指令执行的例外处理检测OS异常、控制程序异常等的软件异常。In addition, the abnormal state detection unit 25 in FIG. 2 may detect hardware abnormalities such as ROM total error and memory bit error, and detect software abnormalities such as OS abnormality and control program abnormality through exception processing of illegal command execution.
异常状态输出部26通过CPU状态信号6将由异常状态检测部25检测出的CPU模块2的异常状态通知给多个远程IO模块3。因此,对于CPU状态信号6与串行传输路径5相同地使用能够进行多站连接的RS-485等的差分串行接口。The abnormal state output unit 26 notifies the plurality of remote IO modules 3 of the abnormal state of the CPU module 2 detected by the abnormal state detection unit 25 through the CPU state signal 6 . Therefore, a differential serial interface such as RS-485 capable of multi-station connection is used for the CPU state signal 6 in the same way as the serial transmission line 5 .
串行传输路径5以规定的间隔进行数据转送,但若检测出异常,则CPU状态信号6立即输出CPU模块2的异常状态。The serial transmission line 5 transfers data at predetermined intervals, but if an abnormality is detected, the CPU status signal 6 immediately outputs the abnormal status of the CPU module 2 .
如上,通过与串行传输路径5另行地设置CPU状态信号6,从而能够与CPU模块2的CPU传输部23的动作无关地非同步地进行CPU的异常状态的通信,因此能够快速地进行CPU异常的通知。As above, by providing the CPU status signal 6 separately from the serial transmission path 5, the abnormal status of the CPU can be communicated asynchronously regardless of the operation of the CPU transmission unit 23 of the CPU module 2, so that the abnormal status of the CPU can be quickly communicated. announcement of.
另外,CPU状态信号6只要能够通知CPU异常即可,因此通信容量也可以较少,能够使通信速率比串行传输路径5小。由此能够提高CPU状态信号6的传输的数据可靠性。In addition, the CPU status signal 6 only needs to be able to notify the CPU of abnormality, so the communication capacity can also be small, and the communication rate can be lower than that of the serial transmission line 5 . The data reliability of the transmission of the CPU status signal 6 can thus be increased.
另外,异常状态输出部26也可以具备CPU状态触点,该CPU状态触点将在异常状态检测部25检测出的状态数据转换成驱动CPU状态信号6的信号,并用于向外部输出。此时,CPU状态触点例如由半导体继电器、电磁继电器等构成。若状态数据为CPU正常,则也可以将CPU状态触点形成导通状态,若状态数据为CPU异常,则也可以将CPU状态触点形成绝缘状态。In addition, the abnormal state output unit 26 may include a CPU state contact for converting the state data detected by the abnormal state detecting portion 25 into a signal for driving the CPU state signal 6 for external output. At this time, the CPU state contact is constituted by, for example, a semiconductor relay, an electromagnetic relay, or the like. If the status data indicates that the CPU is normal, the CPU status contact can also be in a conducting state, and if the status data is that the CPU is abnormal, then the CPU status contact can also be in an insulated state.
此时,在停止向CPU模块2供给电源的情况下,CPU状态触点向绝缘状态迁移,因此电源供给停止也被输出为CPU异常。At this time, when the power supply to the CPU module 2 is stopped, the CPU state contact transitions to the insulated state, so the stop of the power supply is also output as a CPU abnormality.
更具体而言,具有例如AC100V、AC200V、DC24V、DC48V等的电压,形成导通状态或绝缘状态的触点规格,使CPU状态信号6为例如2芯电缆,从而能够不受外部噪声的影响地将CPU的异常状态的有无可靠地从CPU模块2向远程IO模块3输出。More specifically, there are voltages such as AC100V, AC200V, DC24V, DC48V, etc., to form a contact specification in a conductive state or an insulated state, so that the CPU status signal 6 is, for example, a 2-core cable, so that it can be ground without being affected by external noise. The presence or absence of an abnormal state of the CPU is reliably output from the CPU module 2 to the remote IO module 3 .
或者,也可以具有4~20mA的电流源,将电流的有无状态形成触点规格,在CPU正常的情况下处于有电流的状态。Alternatively, a current source of 4 to 20 mA may be provided, and the presence or absence of current may be made into a contact specification, and the state of current flow may be present when the CPU is normal.
图4是表示远程IO模块3与设备机器4的结构例的图。FIG. 4 is a diagram showing a configuration example of the remote IO module 3 and the equipment 4 .
远程IO模块3具有远程IO传输部31、IO输入部36、IO输出部34、CPU异常控制部35,并通过系统总线33相互连接。另外,IO输入部36通过机器连接输入电缆7-2与设备机器4的控制机器42的状态触点41连接,IO输出机构34通过机器连接输出电缆7-1与设备机器4的控制机器42的操作端子40连接。The remote IO module 3 has a remote IO transmission unit 31 , an IO input unit 36 , an IO output unit 34 , and a CPU abnormality control unit 35 , and is connected to each other through a system bus 33 . In addition, the IO input unit 36 is connected to the state contact 41 of the control device 42 of the equipment device 4 through the device connection input cable 7-2, and the IO output mechanism 34 is connected to the control device 42 of the device device 4 through the device connection output cable 7-1. Operation terminal 40 is connected.
此处,被图4的虚线包围的IO输入部36、IO输出部34、CPU异常控制部35表示数字数据的1位大小的结构,该远程IO模块3若与16位大小的数字数据DI、DO对应,则成为包含16个IO输入部36、IO输出部34、CPU异常控制部35的结构。Here, the IO input unit 36, the IO output unit 34, and the CPU abnormality control unit 35 surrounded by the dotted line in FIG. For DO correspondence, it becomes a structure including 16 IO input units 36 , IO output units 34 , and CPU abnormality control unit 35 .
远程IO传输部31经由CPU模块2与串行传输路径5执行串行传输,并收发数字数据DI、DO。此处,被串行传输的数字数据由例如将16个DI设为1个字,或者将16个DO设为1个字的多个字构成。The remote IO transmission unit 31 executes serial transmission via the CPU module 2 and the serial transmission path 5, and sends and receives digital data DI, DO. Here, the digital data to be serially transmitted is constituted by, for example, 16 DIs as 1 word, or 16 DOs as 1 word.
远程IO传输部31经由系统总线33从IO输入部36接收与状态触点41的状态对应的数字数据DI,并转换成字的数字数据向CPU模块2传输。The remote IO transmission unit 31 receives the digital data DI corresponding to the state of the status contact 41 from the IO input unit 36 via the system bus 33 , and converts the digital data into words for transmission to the CPU module 2 .
另外,远程IO传输部31提取从CPU模块2传输的数字数据DO,并经由连接于系统总线33的CPU异常控制部35将数字数据DO向IO输出部34输出。Also, the remote IO transmission unit 31 extracts the digital data DO transmitted from the CPU module 2 and outputs the digital data DO to the IO output unit 34 via the CPU abnormality control unit 35 connected to the system bus 33 .
在CPU异常控制部35连接有CPU状态信号6,通知CPU模块2的正常或者异常的状态。CPU异常控制部35针对远程IO模块3具备的IO输出,在CPU模块2的正常或者异常的状态与从远程IO传输部31输入的数字数据DO之间进行运算,并将运算结果向IO输出部34输出。A CPU state signal 6 is connected to the CPU abnormality control unit 35 to notify the normal or abnormal state of the CPU module 2 . For the IO output that the remote IO module 3 possesses, the CPU abnormal control part 35 performs calculation between the normal or abnormal state of the CPU module 2 and the digital data DO input from the remote IO transmission part 31, and sends the calculation result to the IO output part. 34 outputs.
详细而言如下进行控制,在通知CPU模块2为正常的状态的情况下,IO输出部34输出与数字数据DO对应的状态,在通知CPU模块2为异常的状态的情况下,IO输出部34输出绝缘状态。In detail, control is performed as follows. When notifying the CPU module 2 of a normal state, the IO output unit 34 outputs a state corresponding to the digital data DO, and when notifying the CPU module 2 of an abnormal state, the IO output unit 34 Output insulation status.
IO输出部34经由机器连接输出电缆7-1与设备机器4的操作端子40连接,并根据CPU异常控制部35的设定向设备机器4的操作端子40通知导通状态或者绝缘状态。由此,控制设备机器4。The IO output unit 34 is connected to the operation terminal 40 of the equipment 4 via the equipment connection output cable 7 - 1 , and notifies the operation terminal 40 of the equipment 4 of the conduction state or the insulation state according to the setting of the CPU abnormality control unit 35 . Thus, the equipment 4 is controlled.
IO输入部36经由机器连接输入电缆7-2与设备机器4的状态触点41连接,从而取得状态触点41的导通状态或者绝缘状态。而且,在状态触点41为导通状态的情况下,将数字数据DI设定为“1”,在状态触点41为绝缘状态的情况下,将数字数据DI设定为“0”。所设定的数字数据DI经由远程IO传输部31被通知给CPU模块2。The IO input unit 36 is connected to the state contact 41 of the equipment device 4 via the device connection input cable 7 - 2 to obtain the conduction state or the insulation state of the state contact 41 . Then, when the state contact 41 is in the conduction state, the digital data DI is set to "1", and when the state contact 41 is in the insulated state, the digital data DI is set to "0". The set digital data DI is notified to the CPU module 2 via the remote I/O transmission unit 31 .
图5是表示CPU异常控制部35的结构的图。FIG. 5 is a diagram showing the configuration of the CPU abnormality control unit 35 .
CPU异常控制部35具备第一输入电路351、第二输入电路352以及逻辑运算电路353。The CPU abnormality control unit 35 includes a first input circuit 351 , a second input circuit 352 , and a logical operation circuit 353 .
第一输入电路351经由CPU状态信号6连接于CPU模块2的异常状态输出部26,从而将CPU状态信号6的信号电平转换成TTL(Transistor TransistorLogic:晶体管—晶体管逻辑)电平。例如,在CPU状态信号6表示CPU模块2的异常状态的情况下转换成低电平,在表示CPU模块2的正常状态的情况下转换成高电平。The first input circuit 351 is connected to the abnormal state output unit 26 of the CPU module 2 via the CPU state signal 6 , thereby converting the signal level of the CPU state signal 6 into a TTL (Transistor TransistorLogic: Transistor-Transistor Logic) level. For example, the CPU state signal 6 is converted to a low level when indicating an abnormal state of the CPU module 2 , and is converted to a high level when indicating a normal state of the CPU module 2 .
第二输入电路352连接于系统总线33,从而将由远程IO传输部31接收的数字数据DO转换成TTL电平。例如,在数字数据DO为“0”的情况下转换成低电平,在数字数据DO为“1”的情况下转换成高电平。The second input circuit 352 is connected to the system bus 33 to convert the digital data DO received by the remote IO transmission unit 31 into a TTL level. For example, when the digital data DO is "0", it transitions to a low level, and when the digital data DO is "1", it transitions to a high level.
逻辑运算电路353是例如由TTL构成的逻辑电路,并执行来自第一输入电路351和第二输入电路352的信号的逻辑运算,从而输出控制输出信号。控制输出信号在逻辑成立时为高电平,在逻辑不成立时为低电平。The logic operation circuit 353 is, for example, a logic circuit constituted by TTL, and performs logic operations of signals from the first input circuit 351 and the second input circuit 352, thereby outputting a control output signal. The control output signal is high level when the logic is established, and is low level when the logic is not established.
实施例的逻辑运算电路353具备与门电路,如接下来那样,输出控制输出信号。The logical operation circuit 353 of the embodiment includes an AND circuit, and outputs a control output signal as follows.
在CPU状态信号6表示CPU模块2的正常状态,并且数字数据DO为“1”的情况下,第一输入电路351的输出成为高电平,第二输入电路352的输出也成为高电平,逻辑运算电路353的逻辑积的结果,将逻辑成立的高电平输出为控制输出信号。When the CPU state signal 6 represents the normal state of the CPU module 2, and the digital data DO is "1", the output of the first input circuit 351 becomes a high level, and the output of the second input circuit 352 also becomes a high level, As a result of the logical product of the logical operation circuit 353 , a high level of logical establishment is output as a control output signal.
在CPU状态信号6表示CPU模块2的正常状态,并且数字数据DO为“0”的情况下,第一输入电路351的输出成为高电平,第二输入电路352的输出成为低电平,逻辑运算电路353的逻辑积的结果,将逻辑不成立的低电平输出为控制输出信号。When the CPU state signal 6 represents the normal state of the CPU module 2, and the digital data DO is "0", the output of the first input circuit 351 becomes a high level, the output of the second input circuit 352 becomes a low level, and the logic As a result of the logical product of the arithmetic circuit 353 , a low level that is logically false is output as a control output signal.
在CPU状态信号6表示CPU模块2的异常状态的情况下,即使数字数据DO为“1”或者“0”的任一个,逻辑运算电路353的逻辑积的结果,也将逻辑不成立的低电平输出为控制输出信号。In the case where the CPU state signal 6 represents the abnormal state of the CPU module 2, even if the digital data DO is any one of "1" or "0", the result of the logical product of the logic operation circuit 353 will be a low level of logic failure. The output is a control output signal.
图6是表示远程IO模块3的IO输出部34的结构的图。FIG. 6 is a diagram showing the configuration of the IO output unit 34 of the remote IO module 3 .
IO输出部34由继电器电路341和输出端子342构成。The IO output unit 34 is composed of a relay circuit 341 and an output terminal 342 .
继电器电路341例如由半导体继电器、电磁继电器等构成,根据CPU异常控制部35的控制输出信号,进行输出侧的电路的通断。例如,若控制输出信号成为高电平,则接通继电器,另外若控制输出信号成为低电平,则断开继电器。The relay circuit 341 is constituted by, for example, a semiconductor relay, an electromagnetic relay, etc., and performs switching of the circuit on the output side according to the control output signal of the CPU abnormality control unit 35 . For example, when the control output signal becomes high level, the relay is turned on, and when the control output signal becomes low level, the relay is turned off.
输出端子342通过机器连接输出电缆7-1与设备机器4的操作端子40连接,通过继电器电路341使操作端子40处于导通状态或者绝缘状态。The output terminal 342 is connected to the operation terminal 40 of the equipment device 4 through the equipment connection output cable 7 - 1 , and the operation terminal 40 is placed in a conduction state or an insulated state through the relay circuit 341 .
图7是表示CPU异常控制部35的时序图的一个例子的图,且示出了CPU状态信号、数字数据DO以及控制输出信号的关系。FIG. 7 is a diagram showing an example of a timing chart of the CPU abnormality control unit 35 , and shows the relationship among the CPU state signal, digital data DO, and control output signal.
在CPU状态信号6表示正常状态的情况下,若数字数据DO为“1”,则控制输出信号输出高电平,若数字数据DO为“0”,则控制输出信号输出低电平。由此,输出与数字数据DO的值对应的控制输出信号,将设备机器4的操作端子40控制为导通状态或者绝缘状态。When the CPU state signal 6 indicates a normal state, if the digital data DO is "1", the control output signal outputs a high level, and if the digital data DO is "0", the control output signal outputs a low level. As a result, a control output signal corresponding to the value of the digital data DO is output, and the operation terminal 40 of the equipment device 4 is controlled to be in a conductive state or an insulated state.
另一方面,在CPU状态信号表示异常状态的情况下,不论数字数据DO为“1”或“0”,控制输出信号均输出低电平。因此,在CPU状态信号表示异常状态的情况下,将设备机器4的操作端子40控制为绝缘状态。On the other hand, when the CPU state signal indicates an abnormal state, the control output signal outputs a low level regardless of whether the digital data DO is "1" or "0". Therefore, when the CPU state signal indicates an abnormal state, the operation terminal 40 of the equipment device 4 is controlled to be in an insulated state.
如上所述,以CPU异常控制部35与1点的数字数据DO对应的结构进行了说明,但在远程IO模块3与16点的数字数据DO对应的结构的情况下,则成为具备16个图5的第二输入电路352,具备16个与门电路353的与门电路,从而从与门电路353输出16个控制输出信号的结构。而且,若通过CPU状态信号6通知CPU模块2的异常状态,则所有16个IO输出部34将连接的控制机器4的操作端子40控制为绝缘状态。As described above, the CPU abnormality control unit 35 has been described as a structure corresponding to 1 point of digital data DO, but in the case of a structure corresponding to 16 points of digital data DO of the remote IO module 3, it becomes equipped with 16 diagrams. The second input circuit 352 of 5 has a structure in which 16 AND gate circuits 353 are provided, and 16 control output signals are output from the AND gate circuits 353 . And, when the abnormal state of the CPU module 2 is notified by the CPU state signal 6, all the 16 IO output parts 34 control the operation terminal 40 of the connected control device 4 to an insulated state.
如图1所示,在控制器1具有多个远程IO模块3的情况下,CPU状态信号6被菊花链式连接于多个远程IO模块3,因此CPU模块2的异常状态被通知给所有的远程IO模块3。在各个远程IO模块3中,进行上述的处理,将连接的控制机器4的操作端子40控制为绝缘状态。由此,能够停止控制器1的控制对象的所有的设备机器。As shown in Figure 1, when the controller 1 has multiple remote IO modules 3, the CPU status signal 6 is daisy-chain connected to multiple remote IO modules 3, so the abnormal status of the CPU module 2 is notified to all Remote IO module 3. In each remote IO module 3, the above-mentioned processing is performed, and the operation terminal 40 of the connected control device 4 is controlled to be in an isolated state. Thereby, all the equipments controlled by the controller 1 can be stopped.
实施方式2Embodiment 2
图8是表示远程IO模块3的其他的结构的图。FIG. 8 is a diagram showing another configuration of the remote IO module 3 .
远程IO模块3具有远程IO传输部31、传输异常控制部32、针对所连接的各个设备机器4设置的多个IO输入部36、IO输出部34、CPU异常控制部35,并通过系统总线33相互连接。另外,IO输入部36通过机器连接输入电缆7-2与设备机器4的状态触点41连接,IO输出部34通过机器连接输出电缆7-1与设备机器4的操作端子40连接。The remote IO module 3 has a remote IO transmission part 31, a transmission abnormality control part 32, a plurality of IO input parts 36, an IO output part 34, and a CPU abnormality control part 35 arranged for each equipment machine 4 connected, and passes through a system bus 33 interconnected. Also, the IO input unit 36 is connected to the status contact 41 of the equipment device 4 through the equipment connection input cable 7 - 2 , and the IO output unit 34 is connected to the operation terminal 40 of the equipment equipment 4 through the equipment connection output cable 7 - 1 .
图4所示的远程IO模块3与本实施例的远程IO模块3具有传输异常控制部32的情况不同,以下,以不同点为中心进行说明。The remote IO module 3 shown in FIG. 4 is different from the remote IO module 3 of this embodiment in that it has the transmission abnormality control unit 32 , and the following description will focus on the differences.
传输异常控制部32经由远程IO传输部31在每个控制周期内监视连接远程IO模块3与CPU模块2的串行传输路径5的传输状态,在检测出传输异常时,控制远程IO传输部31,并根据预先设定的变更规则变更数字数据DO。The abnormal transmission control part 32 monitors the transmission status of the serial transmission path 5 connecting the remote IO module 3 and the CPU module 2 in each control cycle via the remote IO transmission part 31, and controls the remote IO transmission part 31 when abnormal transmission is detected. , and change the digital data DO according to a preset change rule.
此处,由传输异常控制部32检测出的传输异常通过电缆断线等的断线、作为在规定时间内未结束收发的状态的超时检测、传输的数字数据的CRC错误、奇偶错误等错误检测来进行判定。Here, the transmission abnormality detected by the transmission abnormality control unit 32 is detected by a disconnection such as a cable disconnection, a timeout detection as a state in which transmission and reception has not been completed within a predetermined time, and an error detection such as a CRC error or a parity error of the transmitted digital data. to judge.
在传输异常控制部32在每个控制周期内检测出传输异常时,变更数字数据DO的变更规则例如是将DO改写成“0”(归零),维持(保持)检测出异常前的数字数据DO等。When the transmission abnormality control unit 32 detects transmission abnormality in each control cycle, the change rule for changing the digital data DO is, for example, rewriting DO to "0" (returning to zero), and maintaining (holding) the digital data before the abnormality is detected. DO et al.
该变更规则能够针对每个数字数据DO的位,换句话说,针对每个控制对象的设备机器4而设定。因此,在具有多个操作端子的设备机器4所连接的远程IO模块中,针对每个数字数据DO,通过CPU模块2对变更规则进行指令设定。This change rule can be set for each bit of the digital data DO, in other words, for each equipment device 4 to be controlled. Therefore, in the remote IO module to which the equipment 4 having a plurality of operation terminals is connected, the change rule is commanded and set by the CPU module 2 for each digital data DO.
通过远程IO传输部31而在传输异常时所变更的数字数据DO被发送至CPU异常控制部35。The digital data DO changed when the transmission is abnormal by the remote IO transmission unit 31 is sent to the CPU abnormality control unit 35 .
在CPU异常控制部35中,如上所述,根据CPU状态信号6的状态变更数字数据DO,向IO输出部34输出控制输出信号。该控制输出信号在IO输出部34转换成导通状态或者绝缘状态,并通知给设备机器4的操作端子40。In the CPU abnormality control unit 35 , as described above, the digital data DO is changed according to the state of the CPU state signal 6 , and a control output signal is output to the IO output unit 34 . This control output signal is switched to a conductive state or an isolated state by the IO output unit 34 and notified to the operation terminal 40 of the equipment device 4 .
图9是表示从远程IO传输部31输出的数字数据DO的时序图的一个例子的图。按照从CPU模块2输入的数字数据DO、传输异常的有无、传输异常时的数字数据的变更规则,示出了CPU异常控制部35的输出的关系。FIG. 9 is a diagram showing an example of a timing chart of digital data DO output from the remote IO transfer unit 31 . The relationship between the output of the CPU abnormality control unit 35 is shown in accordance with the digital data DO input from the CPU module 2 , the presence or absence of transmission abnormality, and the digital data change rule at the time of transmission abnormality.
在未由传输异常控制部32检测出传输电缆5的传输异常的情况下,不论数字数据DO的变更规则的设定如何,从远程IO传输部31向CPU异常控制部35均不变更数字数据DO而将其输出,若不存在CPU异常,则保持原样地输出。When the transmission abnormality of the transmission cable 5 is not detected by the transmission abnormality control unit 32, the digital data DO is not changed from the remote IO transmission unit 31 to the CPU abnormality control unit 35 regardless of the setting of the change rule of the digital data DO. On the other hand, it is outputted, and if there is no CPU abnormality, it is outputted as it is.
另一方面,在检测出传输异常的情况下,向CPU异常控制部35输出的数字数据DO因数字数据DO的变更规则的设定而不同。若规则为保持设定,则数字数据DO变更成检测出传输异常前的值(在图9中为“1”)并输出。若规则为归零,则数字数据DO变更成“0”并输出。而且,若不存在CPU异常,则输出被变更的数字数据DO。On the other hand, when a transmission abnormality is detected, the digital data DO output to the CPU abnormality control unit 35 differs depending on the setting of the change rule of the digital data DO. If the rule is to hold the setting, the digital data DO is changed to a value ("1" in FIG. 9 ) before the transmission abnormality is detected, and output. If the rule is zero, the digital data DO is changed to "0" and output. And if there is no CPU abnormality, the changed digital data DO is output.
如上,针对每个设备机器4,设置数字数据DO的变更规则,从而能够根据设备机器4的重要程度改变发生错误时的对应方法,因此能够实现系统的可靠性的提高。As described above, by setting change rules for digital data DO for each equipment device 4 , it is possible to change the response method when an error occurs according to the importance of the equipment device 4 , thereby improving the reliability of the system.
图10是对远程IO模块3的动作进行程序处理的情况下的流程图。图10的流程在多个远程IO模块3中分别进行动作。FIG. 10 is a flowchart in the case of performing program processing on the operation of the remote IO module 3 . The flow of FIG. 10 operates in each of the plurality of remote IO modules 3 .
首先,判定是否接收了本远程IO模块3的数字数据DO(S901)。若未从CPU模块2发送本远程IO模块3的数字数据DO,则等待接收(S901的否)。First, it is determined whether the digital data DO of the own remote IO module 3 has been received (S901). If the digital data DO of the own remote IO module 3 has not been sent from the CPU module 2, it waits for reception (No of S901).
在接收了上述的数字数据DO的情况下(S901的是),判定接收时的传输异常的有无(S902)。详细而言,传输异常的判定通过奇偶检查、CRC代码、总数检查等而进行。When the above-mentioned digital data DO is received (YES in S901), it is determined whether there is a transmission abnormality at the time of reception (S902). Specifically, determination of transmission abnormality is performed by parity check, CRC code, sum check, and the like.
在不存在异常的情况下(S902的否),正常地进行数字数据DO的传输,为了进行后述的传输异常处理而暂时保存所接收的DO(S909),进入S906。When there is no abnormality (No in S902), the digital data DO is normally transmitted, and the received DO is temporarily saved for the transmission abnormality processing described later (S909), and the process proceeds to S906.
在存在传输异常的情况下(S902的是),如接下来那样进行数字数据DO的变更。When there is a transmission abnormality (YES in S902), the digital data DO is changed as follows.
首先,判定所设定的修正规则的种类(S903),若为“归零”(S903的“归零”),则将数字数据DO改写成零(S904),进入S906。First, determine the type of the set correction rule (S903), and if it is "return to zero" ("reset to zero" in S903), rewrite the digital data DO to zero (S904), and proceed to S906.
若在S903中为“保持”(S903的“保持”),则将数字数据DO改写成在S909中暂时保存前的正常传输的DO的值(S905)。换句话说,在改写成检测出异常前的值后,进入S906。If it is "Hold" in S903 ("Hold" in S903), the digital data DO is rewritten to the value of DO that was normally transmitted before being temporarily saved in S909 (S905). In other words, after rewriting to the value before the abnormality is detected, it proceeds to S906.
在S906中,判定是否从CPU模块2检测出CPU异常的通知。在检测出CPU异常的情况下(S906的是),将数字数据DO无条件地改写成零(S907),进入S908。In S906 , it is determined whether or not a CPU abnormality notification has been detected from the CPU module 2 . When a CPU abnormality is detected (YES in S906), the digital data DO is unconditionally rewritten to zero (S907), and the process proceeds to S908.
当在S906中未检测出CPU异常的通知的情况下(S906的否),进入S908。When the notification of CPU abnormality is not detected in S906 (NO of S906), it progresses to S908.
在S908中,在IO输出部34设定数字数据D0,根据数字数据DO的值输出导通状态或者绝缘状态。In S908, the digital data D0 is set in the IO output unit 34, and the conduction state or the insulation state is output according to the value of the digital data DO.
通过上述的流程,检测出串行传输路径5中发生传输异常与CPU模块2的异常动作,变更数字数据DO,因此能够防止控制器1的异常控制。Through the above flow, the abnormal operation of the CPU module 2 and the transmission abnormality in the serial transmission line 5 are detected, and the digital data DO is changed, so that the abnormal control of the controller 1 can be prevented.
另外,为了迅速地进行CPU模块2的异常对策,而与图10的处理流程非同步地进行CPU模块的发生异常时的处理。In addition, in order to quickly take countermeasures against the abnormality of the CPU module 2 , the processing at the time of occurrence of abnormality of the CPU module is performed asynchronously with the processing flow in FIG. 10 .
图11是非同步地进行的CPU异常处理的流程图。FIG. 11 is a flowchart of CPU exception processing performed asynchronously.
图11的处理通过CPU状态信号6的接收数据中断而起动,优选尽可能地提高中断优先级。The processing in FIG. 11 is started by the received data interrupt of the CPU status signal 6, and it is preferable to increase the priority of the interrupt as much as possible.
此外,图11的S906、S907、S908的处理内容与图10相同,因此此处省略说明。In addition, since the processing content of S906, S907, and S908 of FIG. 11 is the same as FIG. 10, description is abbreviate|omitted here.
实施方式3Embodiment 3
接下来,利用图12对通过传输异常控制部32处理的数字数据DO的变更规则的具体例进行说明。Next, a specific example of the change rule of the digital data DO processed by the transmission abnormality control part 32 is demonstrated using FIG. 12. FIG.
图12是表示抽起泵井8的存积水,并控制为目标流量而从配管9作为流出水流出的水输送工厂的一个例子的图。FIG. 12 is a diagram showing an example of a water transfer plant that pumps up the stored water in the pump well 8 and controls the target flow rate to flow out from the pipe 9 as effluent water.
水输送工厂由泵井8、配管9、定速泵42a、调节流量的电动阀42b、流量计42c构成。而且,被定速泵42a排出的流出水通过流量计42c进行流量测定,以成为恒定流量的方式被电动阀42b控制。The water delivery plant is composed of a pump well 8, piping 9, a constant speed pump 42a, an electric valve 42b for adjusting flow rate, and a flow meter 42c. And the flow rate of the outflow water discharged|emitted by the constant speed pump 42a is measured by the flow meter 42c, and is controlled by the electric valve 42b so that it may become a constant flow rate.
该水输送工厂通过机器连接电缆7a、7d、7e、7g将包含定速泵42a的设备机器4a、包含电动阀42b的设备机器4d、包含流量计42c的设备机器4g分别连接于远程IO模块3a、3b、3c,并通过CPU模块2进行流量控制。远程IO模块3a、3b、3c通过串行传输路径5和CPU状态信号6菊花链式连接于CPU模块2。The water delivery factory connects the equipment machine 4a including the fixed speed pump 42a, the equipment machine 4d including the electric valve 42b, and the equipment machine 4g including the flowmeter 42c to the remote IO module 3a through machine connection cables 7a, 7d, 7e, and 7g. , 3b, 3c, and through the CPU module 2 for flow control. The remote IO modules 3 a , 3 b , 3 c are daisy-chain connected to the CPU module 2 through the serial transmission path 5 and the CPU status signal 6 .
接下来对设备机器4a、4d、4g的功能进行说明。Next, the functions of the equipment devices 4a, 4d, and 4g will be described.
设备机器4a的定速泵42a为转速恒定的规格,在运转时排出恒定流量,停止时的排出流量为零。设备机器4a具备操作端子40a,通过使操作端子40a处于电导通状态,从而持续泵运转,若处于绝缘状态,则停止泵运转。The fixed-speed pump 42a of the equipment 4a is a specification with a constant rotational speed, discharges a constant flow rate during operation, and discharges a flow rate of zero when stopped. The equipment 4a includes an operation terminal 40a, and the pump operation is continued by making the operation terminal 40a electrically conductive, and the pump operation is stopped when the operation terminal 40a is in an insulated state.
设备机器4d的电动阀42b通过马达的正转与反转来调节阀的开动作与闭动作,从而控制来自定速泵42a的排出流量。阀开度例如在全闭0%、全开100%的0~100%的范围内进行动作。该阀开度的设定通过控制阀的开动作与闭动作的动作时间而进行。The motorized valve 42b of the equipment 4d controls the discharge flow rate from the constant speed pump 42a by adjusting the opening and closing of the valve through forward rotation and reverse rotation of the motor. The valve opening is, for example, operated within a range of 0% to 100% of fully closed 0% and fully opened 100%. The setting of the valve opening degree is performed by controlling the operation time of the valve opening operation and closing operation.
具体而言,开动作、闭动作若例如在1秒内形成阀开度5%的速度,则在全闭状态下若保持开动作20秒,则达到全开而停止开动作。相反,在全开状态下,若保持20秒闭动作,则成为全闭状态,从而停止闭动作。Specifically, if the opening and closing actions are performed at a speed of 5% of the valve opening in 1 second, for example, if the opening action is maintained for 20 seconds in the fully closed state, the valve will be fully opened and the opening action will stop. On the contrary, in the fully open state, if the closing operation is maintained for 20 seconds, it will become a fully closed state, and the closing operation will stop.
设备机器4d具备操作端子40b(开动作)与操作端子40c(闭动作),通过使操作端子40b、40c处于电导通状态,从而持续开动作或者闭动作,若处于绝缘状态,则使开动作或者闭动作停止。The equipment 4d is equipped with an operation terminal 40b (opening action) and an operating terminal 40c (closing action). By making the operating terminals 40b and 40c in an electrically conductive state, the opening or closing action is continued, and if it is in an insulated state, the opening or closing action is made. The closing action stops.
设备机器4d的电动阀42b的阀开度通过调整使操作端子40b或者操作端子40c处于导通状态的时间,而能够控制为成为目标的开度。The valve opening degree of the electric valve 42b of the equipment 4d can be controlled to a target opening degree by adjusting the time during which the operation terminal 40b or the operation terminal 40c is in the conduction state.
设备机器4g的流量计42c计测流出水的流出流量。The flow meter 42c of 4 g of equipment instruments measures the outflow flow rate of outflow water.
设备机器4g的模拟输出端子43将计测出的流量值转换成4~20mA的电流信号,并输出。The analog output terminal 43 of the equipment 4g converts the measured flow rate value into a current signal of 4 to 20 mA, and outputs it.
在CPU模块2中,经由远程IO模块3c取得模拟输出端子43的流出流量作为模拟输入数据AI,以该模拟输入数据AI成为目标流量的方式执行控制定速泵42a的运转与停止、控制电动阀42b的开动作与闭动作的控制程序。In the CPU module 2, the outflow flow rate of the analog output terminal 43 is obtained as the analog input data AI via the remote IO module 3c, and the operation and stop of the constant speed pump 42a are controlled and the electric valve is controlled so that the analog input data AI becomes the target flow rate. 42b's opening action and closing action control program.
定速泵42a通过控制程序将运转或者停止的动作指示记录于数字数据DO,经由远程IO模块3a设定于设备机器4a的操作端子40a,从而指示运转或者停止。The fixed-speed pump 42a records the operation instruction of running or stopping in the digital data DO through the control program, and sets it in the operation terminal 40a of the equipment 4a via the remote IO module 3a, thereby instructing running or stopping.
电动阀42b通过控制程序将开动作与闭动作的动作指示记录于数字数据DO,经由远程IO模块3b,设定于设备机器4d的操作端子40b、40c,从而设定阀开度。The electric valve 42b records the operation instructions of opening and closing operations in the digital data DO through the control program, and sets them in the operation terminals 40b and 40c of the equipment 4d via the remote IO module 3b to set the valve opening degree.
如上所述,远程IO模块3a、3b检测转送数字数据DO的串行传输路径5的传输异常,并基于规定的变更规则变更数字数据DO。As described above, the remote IO modules 3a and 3b detect a transmission abnormality in the serial transmission line 5 that transfers the digital data DO, and change the digital data DO based on a predetermined change rule.
在本实施例中,在检测出传输异常时,针对定速泵42a与电动阀42b,在接下来的变更规则中变更数字数据DO。In the present embodiment, when a transmission abnormality is detected, the digital data DO is changed in the next change rule with respect to the constant speed pump 42a and the electric valve 42b.
在远程IO模块3a中,形成将指示定速泵42a的动作的数字数据DO保持为之前的控制周期的设定状态的变更规则。换句话说,维持当前的定速泵42a的运转或者停止状态。In the remote IO module 3a, a change rule is formed to keep the digital data DO instructing the operation of the constant speed pump 42a in the setting state of the previous control cycle. In other words, the current operation or stop state of the constant speed pump 42a is maintained.
在远程IO模块3b中,形成对指示电动阀42b的开动作与闭动作的数字数据DO进行归零设定(不进行开动作或者闭动作)的变更规则。换句话说,使电动阀42b的阀的开动作、闭动作停止并固定阀开度,从而维持当前的流量。In the remote IO module 3b, a change rule is formed to reset the digital data DO indicating the opening and closing of the electric valve 42b to zero (no opening or closing). In other words, the current flow rate is maintained by stopping the valve opening and closing operations of the electric valve 42 b and fixing the valve opening.
如上述那样设定本实施例的水输送工厂的定速泵42a与电动阀42b的传输异常时的数字数据DO的变更规则,从而不使检测出传输异常的控制周期的水输送停止,另外在恢复成传输正常的情况下,能够容易地重新开始控制。As described above, the rules for changing the digital data DO when the transmission of the fixed-speed pump 42a and the electric valve 42b of the water delivery factory of the present embodiment are abnormal are set so as not to stop the water delivery in the control cycle when the transmission abnormality is detected. When the transmission is restored to normal, the control can be easily restarted.
上述的变更规则不限定于此,能够根据传输异常时的运用规格适当地决定。The above-mentioned change rule is not limited to this, and can be appropriately determined according to the operation specification at the time of transmission abnormality.
然而,在图12所示的本实施例的水输送工厂的控制器1中,通过CPU状态信号6,从CPU模块2向远程IO模块3a、3b、3c通知CPU异常。However, in the controller 1 of the water delivery plant of the present embodiment shown in FIG. 12 , the CPU module 2 notifies the remote IO modules 3 a , 3 b , and 3 c of CPU abnormality through the CPU status signal 6 .
被CPU状态信号6通知了CPU异常的远程IO模块3a、3b、3c将数字数据DO设为“0”,将操作端子40a、40b、40c设定为绝缘状态。换句话说,定速泵42a使泵运转停止,电动阀42b使开动作或者闭动作停止,因此流出水的流出停止。The remote IO modules 3a, 3b, and 3c notified of a CPU abnormality by the CPU state signal 6 set the digital data DO to "0" and set the operation terminals 40a, 40b, and 40c to an isolated state. In other words, since the constant speed pump 42a stops the pump operation, and the electric valve 42b stops the opening or closing operation, the outflow of the effluent water is stopped.
在检测出CPU异常的情况下,存在直至控制器的复原花费时间的情况。因此,为了进行流出水的流出,优选预先能够手动地使定速泵42a与电动阀42b动作。When a CPU abnormality is detected, it may take time until the recovery of the controller. Therefore, it is preferable to manually operate the constant speed pump 42 a and the electric valve 42 b in advance in order to discharge the effluent water.
因此,例如在定速泵42a的操作端子4a的机器连接电缆7a设置切换装置,从而能够选择来自远程IO模块3a的信号和来自手动操作装置的信号。Therefore, for example, a switching device is provided on the equipment connection cable 7a of the operation terminal 4a of the constant speed pump 42a, so that the signal from the remote IO module 3a and the signal from the manual operation device can be selected.
在定速泵42a因CPU异常而停止时,通过切换装置,切换为连接定速泵42a的操作端子4a与手动操作装置。而且,通过手动操作装置,使定速泵42a的操作端子4a处于导通状态,从而进行泵运转。When the constant speed pump 42a stops due to CPU abnormality, the switching device switches to connect the operation terminal 4a of the constant speed pump 42a and the manual operation device. Then, the operation terminal 4a of the constant speed pump 42a is brought into conduction state by the manual operation device, and the pump operation is performed.
如以上说明的那样,根据本实施方式,控制器1若检测出CPU模块2的异常之类的致命的状态,则使机器连接输出电缆7-1可靠地处于绝缘状态,从而能够使所有的设备机器的动作停止,因此能够防止工厂的误动作。As described above, according to the present embodiment, when the controller 1 detects a fatal state such as an abnormality of the CPU module 2, the device connection output cable 7-1 is reliably insulated, thereby enabling all equipment The operation of the machine is stopped, so it is possible to prevent malfunctions in the factory.
另外,根据本实施方式,通过在远程IO模块不使用高性能CPU等的机构而安装简易的逻辑电路以及仅铺设通知CPU模块的状态的信号电缆,能够在CPU异常时使工厂的运转可靠地停止,因此存在能够以低成本提高安全性的效果。In addition, according to this embodiment, by installing a simple logic circuit in the remote IO module without using a mechanism such as a high-performance CPU and laying only a signal cable for notifying the status of the CPU module, it is possible to reliably stop the operation of the factory when the CPU is abnormal. , and therefore there is an effect that security can be improved at low cost.
另外,若CPU模块2为正常,则在检测出串行传输路径5的传输异常时,能够选择设定针对控制机器的输出的继续或者停止,因此具有即便在发生异常时也能够灵活地应对控制对象机器的重要程度与运用方针的效果。In addition, if the CPU module 2 is normal, when the transmission abnormality of the serial transmission path 5 is detected, the continuation or stop of the output to the control device can be selected and set, so it is possible to flexibly respond to the control even when an abnormality occurs. The importance of the target equipment and the effect of the operation policy.
另外,仅在检测出CPU异常等特定的重大的异常重要因素的情况下,使连接的所有的控制机器的运转停止,因此自动控制的运转利用率提高,从而能够期待操纵人员的手动运转的负担的减少。In addition, the operation of all connected control devices is stopped only when a specific major abnormality factor such as CPU abnormality is detected, so that the utilization rate of automatic control operation is improved, and the burden of manual operation on the operator can be expected reduction.
本发明所涉及的控制器不限定于上述的实施方式,能够在不脱离本发明的主旨的范围内适当地进行变形。以下,列举本发明所涉及的控制器的其他的实施方式。The controller according to the present invention is not limited to the above-described embodiments, and can be appropriately modified within a range not departing from the gist of the present invention. Other embodiments of the controller according to the present invention will be listed below.
在上述的实施方式中,虽然形成远程IO模块3具备1点DI、1点DO的结构,但也可以形成具备多个DI、多个DO的结构,另外,也可以形成具备多个AI、AO、PI的结构。In the above-mentioned embodiment, although the remote IO module 3 has a structure with one DI and one DO, it may also be formed with a plurality of DIs and a plurality of DOs, and may also be formed with a plurality of AIs and AOs. , The structure of PI.
另外,在上述的实施方式中,虽然使状态触点、操作端子、CPU状态触点为a触点,但也可以是b触点、c触点。In addition, in the above-mentioned embodiment, although the status contact, the operation terminal, and the CPU status contact were made a contact, they may be a b contact or a c contact.
另外,上述的实施方式所涉及的控制器1也能够应用于电力、气体、交通、水库等的社会基础建设系统的控制器、铁钢、化学、食品、物流等工业系统的控制器。In addition, the controller 1 according to the above-described embodiment can also be applied to controllers of social infrastructure systems such as electric power, gas, transportation, and reservoirs, and controllers of industrial systems such as iron and steel, chemical, food, and logistics.
另外,实现各功能的程序、数据等信息除了储存于RAM(Random Access Memory:随机存取存储器)以外,还能够储存于SSD(Solid State Drive:固态硬盘)等记录装置、IC(Integrated Circuit:集成电路)卡、SD(Secure Digital:安全数字)卡、DVD(DigitalVersatile Disc:数字化通用磁盘)等记录介质。In addition, in addition to storing information such as programs and data for realizing various functions in RAM (Random Access Memory: Random Access Memory), it can also be stored in recording devices such as SSD (Solid State Drive: Solid State Drive), IC (Integrated Circuit: Integrated Circuit) circuit) card, SD (Secure Digital: Secure Digital) card, DVD (Digital Versatile Disc: Digital Versatile Disc) and other recording media.
另外,上述的实施方式所涉及的各部的结构、功能、CPU、存储器、系统总线也能够通过以集成电路设计的硬件来实现它们中的全部或者一部分。In addition, the configurations, functions, CPU, memory, and system bus of each unit related to the above-described embodiments can be realized in whole or in part by hardware designed as an integrated circuit.
此外,在对实施方式进行说明的附图中,仅示出了在说明方面考虑为必须的控制线、信息线,在制品方面不必限定为示出了所有的控制线、信息线。实际上,也可以考虑为大致所有的结构被相互连接。In addition, in the drawings explaining the embodiment, only control lines and information lines considered necessary for explanation are shown, and it is not necessarily limited to show all control lines and information lines in terms of products. In fact, it is also conceivable that substantially all structures are connected to each other.
Claims (10)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014-237964 | 2014-11-25 | ||
JP2014237964A JP6560489B2 (en) | 2014-11-25 | 2014-11-25 | Control controller and control method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105629923A CN105629923A (en) | 2016-06-01 |
CN105629923B true CN105629923B (en) | 2018-06-12 |
Family
ID=56044983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510784708.5A Active CN105629923B (en) | 2014-11-25 | 2015-11-16 | Controller and its control method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6560489B2 (en) |
CN (1) | CN105629923B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6812737B2 (en) * | 2016-10-07 | 2021-01-13 | オムロン株式会社 | Arithmetic logic unit and control unit |
JP6812736B2 (en) * | 2016-10-07 | 2021-01-13 | オムロン株式会社 | Arithmetic logic unit and control unit |
DE102017103418B4 (en) * | 2017-02-20 | 2019-01-24 | Infineon Technologies Ag | A method of determining information about integrity of signal processing components within a signal path, signal processing circuit and electronic control unit |
JP6816554B2 (en) * | 2017-02-22 | 2021-01-20 | オムロン株式会社 | Control systems, controllers and control programs |
CN110612635B (en) * | 2017-05-16 | 2022-09-27 | 松下知识产权经营株式会社 | Power storage system and stop control system |
WO2019073565A1 (en) * | 2017-10-12 | 2019-04-18 | 三菱電機株式会社 | Distributed control system |
JP2019207475A (en) * | 2018-05-28 | 2019-12-05 | オムロン株式会社 | Controller and control method thereof |
CN109029543A (en) * | 2018-06-26 | 2018-12-18 | 深圳市威富智能设备有限公司 | A kind of abnormality detection system and method |
CN110647127B (en) * | 2019-10-17 | 2021-05-11 | 厦门高瑞特电气自动化有限公司 | Module combined power process control device and initialization configuration method thereof |
CN110987977B (en) * | 2019-12-31 | 2021-08-06 | 中国热带农业科学院农业机械研究所 | An intelligent servo electric cylinder type purification and separation control system and method |
CN113467281A (en) * | 2021-07-05 | 2021-10-01 | 上海航天计算机技术研究所 | Sequence control device compatible with multiple types of controlled objects |
CN113759803A (en) * | 2021-09-23 | 2021-12-07 | 西安铭创源机电科技有限公司 | Intelligent monitoring protection control electrical apparatus |
WO2025011463A1 (en) * | 2023-07-07 | 2025-01-16 | 北京极智嘉科技股份有限公司 | Control method and control system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1723445A (en) * | 2002-10-15 | 2006-01-18 | Abb股份有限公司 | Fault detection in industrial controllers during safety control |
CN1808999A (en) * | 2006-02-23 | 2006-07-26 | 烽火通信科技股份有限公司 | Method and apparatus of CPU fault detection for signal processing unit |
CN101989085A (en) * | 2009-07-31 | 2011-03-23 | 欧姆龙株式会社 | Controller |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH061401B2 (en) * | 1986-08-08 | 1994-01-05 | 富士電機株式会社 | Back-up system of control device |
JP2554268B2 (en) * | 1988-05-02 | 1996-11-13 | 三菱電機株式会社 | Computer distributed system |
JP2768791B2 (en) * | 1990-03-09 | 1998-06-25 | 三菱自動車工業株式会社 | Automotive electronic control unit |
JPH05346810A (en) * | 1991-10-09 | 1993-12-27 | Yaskawa Electric Corp | Output abnormality processing system for programmable controller |
CN101523307B (en) * | 2006-09-28 | 2011-06-15 | 三菱电机株式会社 | Fault detector, fault detection method, and fault detection program |
JP2008186205A (en) * | 2007-01-30 | 2008-08-14 | Meidensha Corp | Command route control system for monitoring system |
JP5448661B2 (en) * | 2009-09-08 | 2014-03-19 | 株式会社日立製作所 | Battery control device and power device |
WO2014041596A1 (en) * | 2012-09-11 | 2014-03-20 | 三菱電機株式会社 | Safety controller |
-
2014
- 2014-11-25 JP JP2014237964A patent/JP6560489B2/en active Active
-
2015
- 2015-11-16 CN CN201510784708.5A patent/CN105629923B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1723445A (en) * | 2002-10-15 | 2006-01-18 | Abb股份有限公司 | Fault detection in industrial controllers during safety control |
CN1808999A (en) * | 2006-02-23 | 2006-07-26 | 烽火通信科技股份有限公司 | Method and apparatus of CPU fault detection for signal processing unit |
CN101989085A (en) * | 2009-07-31 | 2011-03-23 | 欧姆龙株式会社 | Controller |
Also Published As
Publication number | Publication date |
---|---|
JP2016099879A (en) | 2016-05-30 |
CN105629923A (en) | 2016-06-01 |
JP6560489B2 (en) | 2019-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105629923B (en) | Controller and its control method | |
JP4835842B2 (en) | IO unit in a building block type safety controller | |
JP4202335B2 (en) | Emergency stop circuit | |
US9482220B2 (en) | Dual redundancy in fire pump controllers | |
EP3159220B1 (en) | Vehicle-mounted control device or vehicle-mounted control system | |
CN102375426B (en) | Controlling apparatus of digital quantity output of PLC and controlling method thereof | |
RU2662571C2 (en) | System and method for shutting down field device | |
JP7225689B2 (en) | motor controller | |
US20070182255A1 (en) | Safety switching module | |
JPWO2016002416A1 (en) | Power converter | |
EP3695114A1 (en) | Systems and methods for remotely managing wind power generation | |
JP5193648B2 (en) | Control rod drive control device | |
CN206133294U (en) | Controller fault protection system | |
JP3915629B2 (en) | Automatic control device | |
JP5782835B2 (en) | Water supply equipment | |
WO2016113895A1 (en) | Elevator safety control device and elevator safety control method | |
US20210048799A1 (en) | Methods and systems for remote isolation and energization of mechanical equipment | |
JP2020154443A (en) | Telemeter and pump control system | |
EP3416005B1 (en) | Safety controller with cyber-secure maintenance override | |
KR102681978B1 (en) | Water supply and sewage facility control system automatic operation recovery apparatus | |
CN205983197U (en) | Fault detection apparatus | |
JP2025012281A (en) | Monitoring and control system and monitoring and control method | |
VanDeRee | Fail-Safe Control Systems for Heavy Movable Structures | |
KR102636373B1 (en) | Flow accident prevention type measurement and control system | |
JP5630766B2 (en) | Equipment repair method and repair board |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |