[go: up one dir, main page]

CN103744747A - Power failure controlling device for programmable logic controller (PLC) - Google Patents

Power failure controlling device for programmable logic controller (PLC) Download PDF

Info

Publication number
CN103744747A
CN103744747A CN201410007365.7A CN201410007365A CN103744747A CN 103744747 A CN103744747 A CN 103744747A CN 201410007365 A CN201410007365 A CN 201410007365A CN 103744747 A CN103744747 A CN 103744747A
Authority
CN
China
Prior art keywords
plc
power
mcu
power failure
detection module
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.)
Pending
Application number
CN201410007365.7A
Other languages
Chinese (zh)
Inventor
戴敏
童炜山
张志胜
卓文涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN201410007365.7A priority Critical patent/CN103744747A/en
Publication of CN103744747A publication Critical patent/CN103744747A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

The invention discloses a power failure controlling g device for a programmable logic controller (PLC). The power failure controlling device comprises a microprogrammed control unit (MCU), a PLC, a power failure detection module, a permanent memory storage and a power module, when power failure of the PLC occurs, the power failure detection module transmits a power failure signal to the MCU, the data of the PLC, which are required to be stored, are stored by the MCU in the permanent memory storage, when the power failure detection module again detects that the supply voltage of the PLC reaches a certain threshold value, the power failure detection module transmits a power recover signal to the MCU, and thereby, the MCU is awakened and enabled to recover stored data. By means of the power failure controlling device for the PLC, when the power failure or instable voltage of the PLC occurs, the data of the PLC, which are required to be stored, can be stored, and when the voltage recovers, the stored data can be read so as to continue to work.

Description

一种用于PLC掉电控制装置A PLC power-down control device

技术领域technical field

本发明涉及一种用于PLC掉电控制装置。The invention relates to a PLC power-down control device.

背景技术Background technique

可编程控制器,作为一种专为工作于工业环境下而设计的计算机控制器,应具备高可靠性和强抗干扰能力,可对复杂多变的工业现场所突发产生的一些影响做出及时的反应。因此,这便要求可编程控制器的核心控制单元具有较快的运算速度和较强的实时处理能力。然而,目前的可编程控制器在突然掉电或者电压不够稳定的情况下,会不能及时作出处理,这些后果有时会直接影响到可编程控制器的性能。Programmable controller, as a computer controller specially designed for working in industrial environment, should have high reliability and strong anti-interference ability, and can make some sudden impacts on complex and changeable industrial sites. timely response. Therefore, this requires the core control unit of the programmable controller to have a faster computing speed and a stronger real-time processing capability. However, the current programmable controller may not be able to deal with it in time when there is a sudden power failure or the voltage is not stable enough. These consequences sometimes directly affect the performance of the programmable controller.

发明内容Contents of the invention

发明目的:本发明的目的是针对现有技术的不足而提供一种用于PLC掉电控制装置,使得PLC在掉电或者出现电压不稳定的时候能够将PLC需要保存的数据予以保存,待电压恢复后可以读取存储数据以继续工作。Purpose of the invention: the purpose of the present invention is to provide a kind of control device for PLC power-down at the deficiencies in the prior art, so that PLC can save the data that PLC needs to save when power-off or voltage instability occurs. Stored data can be read after recovery to continue working.

技术方案:为了实现本发明目的,本发明公开了一种用于PLC掉电控制装置,包括MCU、PLC、掉电检测模块、永久记忆存储器以及电源模块;当PLC掉电时,掉电检测模块传输一个掉电信号给MCU,MCU则会将PLC需要保存的数据存储到永久记忆存储器中,待掉电检测模块重新检测PLC供电电压达到一定阀值,掉电检测模块传输一个恢复电信号给MCU,从而唤醒MCU并使MCU恢复上述存储在永久记忆存储器中的需要保存的数据。Technical solution: In order to achieve the purpose of the present invention, the present invention discloses a PLC power-down control device, including MCU, PLC, power-down detection module, permanent memory memory and power supply module; when PLC power-off, the power-down detection module Transmit a power-down signal to the MCU, and the MCU will store the data that the PLC needs to save in the permanent memory. After the power-down detection module re-detects the PLC power supply voltage to reach a certain threshold, the power-down detection module transmits a recovery signal to the MCU. , thereby waking up the MCU and enabling the MCU to restore the above-mentioned data stored in the permanent memory that needs to be saved.

作为优选,为了保证PLC的工作稳定性,掉电检测模块发出掉电信号的条件为供电电压低于4.63V。Preferably, in order to ensure the working stability of the PLC, the condition for the power-down detection module to send out the power-down signal is that the power supply voltage is lower than 4.63V.

作为优选,为了确保电压稳定后系统才工作并且提高工作效率,掉电检测模块的恢复电信号在延迟140~300ms后给出。Preferably, in order to ensure that the system works only after the voltage is stable and to improve work efficiency, the recovery electrical signal of the power-down detection module is given after a delay of 140-300 ms.

作为优选,为了实现整个控制装置的低功耗,MCU采用ARM的Cortex-M3处理器。Preferably, in order to realize the low power consumption of the whole control device, the MCU adopts the Cortex-M3 processor of ARM.

作为优选,为了用户程序无需通过上位机就能实现下载及更新,MCU通过USB Host接口模块与U盘连接。As a preference, for the user program to be downloaded and updated without going through the host computer, the MCU is connected to the U disk through the USB Host interface module.

有益效果:本发明与现有技术相比,本发明可以使得PLC在掉电或者出现电压不稳定的时候能够将PLC需要保存的数据予以保存,待电压恢复后可以读取存储数据以继续工作。Beneficial effects: Compared with the prior art, the present invention enables the PLC to save the data that the PLC needs to save when the power is off or the voltage is unstable, and the stored data can be read to continue working after the voltage is restored.

附图说明Description of drawings

图1为本发明用于PLC掉电控制装置的结构图;Fig. 1 is the structural diagram that the present invention is used for PLC power down control device;

图2为PLC掉电检测及恢复时序图;Figure 2 is a sequence diagram of PLC power-down detection and recovery;

图3为本发明用于PLC掉电控制装置的控制流程图。Fig. 3 is a control flow chart of the present invention for the PLC power-down control device.

具体实施方式Detailed ways

下面结合附图对本发明作更进一步的说明。The present invention will be further described below in conjunction with the accompanying drawings.

如图1所示,本发明的用于PLC掉电控制装置包括MCU,MCU包括有输入输出接口、其他接口、扩展接口以及特殊功能模块;其中,输入输出接口包括16路输入、16路输出以及2路A/D,其它接口包括运行/编程开关、掉电/上电外部中断以及工作状态LED指示灯,扩展部分包括扩展模块接口、人机交互界面以及外部存储器,特殊功能模块则包括USB-HOST、USB-DEVICE、RS-232以及JTAG。As shown in Figure 1, the present invention is used for PLC power-down control device and comprises MCU, and MCU comprises input and output interface, other interface, extension interface and special function module; Wherein, input and output interface comprises 16 routes of inputs, 16 routes of outputs and 2-way A/D, other interfaces include running/programming switch, power-off/power-on external interrupt and working status LED indicator, the extension part includes expansion module interface, human-computer interaction interface and external memory, and special function module includes USB- HOST, USB-DEVICE, RS-232 and JTAG.

所述的MCU采用基于超低功耗的ARM Cortex-M3处理器内核的STM32F103VET6芯片,最高可达72MHz的主频,具有较高的运行速度;512KB的片内Flash和64KB的片内SRAM,可支持较大的用户程序容量;集成嵌套向量控制器,具有较高的中断响应效率;所述的外部存储模块,采用铁电存储器作为外部存储设备,该类存储器具有断电不丢失以及可多次擦除等特点,可循环保存掉电保持的软元件的数据和可编程控制器的状态数据。所述的铁电存储器芯片为FM24C128,具有16KB的容量,擦写次数可达上亿次,最高可达400KHz的时钟频率,具有较高的读写速度,因而,可以很好地满足小型可编程控制器的工作需求。与FM24C128芯片的SCL引脚相连的MCU引脚为I2C2_SCL引脚,与FM24C128芯片的SDA引脚相连的MCU引脚为I2C2_SDA引脚。MCU作为PLC的控制芯片并且设有用于系统掉电上电状态检测的掉电检测模块以及用于断电不丢失可多次擦除的外部存储模块,当PLC处于掉电或者出现电压不稳定的时候能够将PLC需要保存的数据予以保存,待电压恢复后可以读取存储数据以继续工作。The MCU adopts the STM32F103VET6 chip based on the ARM Cortex-M3 processor core of ultra-low power consumption, which can reach a main frequency of 72MHz and has a high operating speed; the on-chip Flash of 512KB and the on-chip SRAM of 64KB can Support large user program capacity; integrated nested vector controller, with high interrupt response efficiency; the external storage module uses ferroelectric memory as the external storage device, this type of memory has the characteristics of not being lost when power is off and can It can save the data of the soft components and the state data of the programmable controller cyclically when the power is off. The ferroelectric memory chip is FM24C128, which has a capacity of 16KB, can be erased and written up to hundreds of millions of times, and has a clock frequency of up to 400KHz, and has a high read and write speed. Therefore, it can well meet the needs of small programmable Controller job requirements. The MCU pin connected to the SCL pin of the FM24C128 chip is the I2C2_SCL pin, and the MCU pin connected to the SDA pin of the FM24C128 chip is the I2C2_SDA pin. As the control chip of PLC, MCU is equipped with a power-off detection module for system power-off and power-on state detection, and an external storage module that can be erased multiple times without losing power. When the PLC is powered off or the voltage is unstable At this time, the data that the PLC needs to save can be saved, and the stored data can be read after the voltage is restored to continue working.

如图2所示,所述的掉电检测模块,在系统掉电时,掉电检测芯片给MCU提供一个掉电信号,让系统去存储需要保存的数据。当系统再次上电时唤醒MCU,对备份的数据进行恢复,以使系统可以继上次掉电时的状态继续运行。所述的掉电检测芯片为IMP809L,当系统电源供电Vcc为5V时,选择作为系统掉电检测电压的阀值。当系统掉电至时,IMP809L会产生一个下降沿来给MCU提供掉电信号;当系统上电时,IMP809L会延时至少140ms后再产生一个上升沿信号,这样可确保电源稳定之后系统才开始工作。与IMP809L的RESET引脚相连的MCU引脚设置为外部中断引脚。As shown in FIG. 2 , in the power-off detection module, when the system is powered off, the power-off detection chip provides a power-off signal to the MCU to allow the system to store data that needs to be saved. When the system is powered on again, it wakes up the MCU and restores the backup data, so that the system can continue to operate from the state when it was powered off last time. The power-down detection chip is IMP809L, and when the system power supply Vcc is 5V, it is selected as the threshold value of the system power-down detection voltage. When the system is powered off, IMP809L will generate a falling edge to provide a power-down signal to the MCU; when the system is powered on, IMP809L will delay at least 140ms before generating a rising edge signal, which ensures that the system starts after the power supply is stable. Work. The MCU pin connected to the RESET pin of IMP809L is set as an external interrupt pin.

如图3所示,首先将用户程序以特定的文件名保存在USB存储设备中并将USB存储设备通过USB-HOST接口与MCU相连;在识别到有USB存储设备插入之后,可编程控制器会对插入的USB存储设备进行枚举,然后会进行读取文件等一系列操作,最终会将用户程序读取到PLC的MCU的用户程序存储区内。从而实现了用户程序无需通过上位机就能实现下载及更新。As shown in Figure 3, first save the user program in a USB storage device with a specific file name and connect the USB storage device to the MCU through the USB-HOST interface; after recognizing that a USB storage device is inserted, the programmable controller will Enumerate the inserted USB storage device, and then perform a series of operations such as reading files, and finally read the user program into the user program storage area of the MCU of the PLC. In this way, the user program can be downloaded and updated without going through the host computer.

这样的设计就保证了PLC在掉电或者出现电压不稳定的时候能够将PLC需要保存的数据予以保存,并且待电压恢复后可以读取存储数据以继续工作;同时ARM Cortex-M3处理器本身具有的不同工作状态,也保证了本装置可以在低功耗下完成一系列工作。This design ensures that the PLC can save the data that the PLC needs to save when the power is off or the voltage is unstable, and the stored data can be read after the voltage is restored to continue working; at the same time, the ARM Cortex-M3 processor itself has The different working states also ensure that the device can complete a series of tasks under low power consumption.

Claims (5)

1.一种用于PLC掉电控制装置,其特征在于,包括MCU、PLC、掉电检测模块、永久记忆存储器以及电源模块;1. A power-down control device for PLC, comprising MCU, PLC, power-down detection module, permanent memory memory and power supply module; 当PLC掉电时,掉电检测模块传输一个掉电信号给MCU,MCU则会将PLC需要保存的数据存储到永久记忆存储器中,待掉电检测模块重新检测PLC供电电压达到一定阀值,掉电检测模块传输一个恢复电信号给MCU,从而唤醒MCU并使MCU恢复上述存储在永久记忆存储器中的需要保存的数据。When the PLC is powered off, the power-off detection module transmits a power-off signal to the MCU, and the MCU will store the data that the PLC needs to save in the permanent memory. The electrical detection module transmits a recovery electrical signal to the MCU, thereby waking up the MCU and enabling the MCU to restore the above-mentioned data stored in the permanent memory that needs to be preserved. 2.如权利要求1所述的一种用于PLC掉电控制装置,其特征在于,掉电检测模块发出掉电信号的条件为供电电压低于4.63V。2. A power-down control device for PLC according to claim 1, wherein the condition for the power-down detection module to send a power-down signal is that the power supply voltage is lower than 4.63V. 3.如权利要求1所述的一种用于PLC掉电控制装置,其特征在于,掉电检测模块的恢复电信号在延迟140~300ms后给出。3. A power-down control device for PLC according to claim 1, characterized in that, the recovery electrical signal of the power-down detection module is given after a delay of 140-300 ms. 4.如权利要求1所述的一种用于PLC掉电控制装置,其特征在于,MCU采用ARM的Cortex-M3处理器。4. A kind of control device for PLC power down as claimed in claim 1, is characterized in that, MCU adopts the Cortex-M3 processor of ARM. 5.如权利要求1所述的一种用于PLC掉电控制装置,其特征在于,MCU通过USB Host接口模块与U盘连接。5. A kind of control device for PLC power down as claimed in claim 1, is characterized in that, MCU is connected with U disk by USB Host interface module.
CN201410007365.7A 2014-01-08 2014-01-08 Power failure controlling device for programmable logic controller (PLC) Pending CN103744747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410007365.7A CN103744747A (en) 2014-01-08 2014-01-08 Power failure controlling device for programmable logic controller (PLC)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410007365.7A CN103744747A (en) 2014-01-08 2014-01-08 Power failure controlling device for programmable logic controller (PLC)

Publications (1)

Publication Number Publication Date
CN103744747A true CN103744747A (en) 2014-04-23

Family

ID=50501767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410007365.7A Pending CN103744747A (en) 2014-01-08 2014-01-08 Power failure controlling device for programmable logic controller (PLC)

Country Status (1)

Country Link
CN (1) CN103744747A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016045303A1 (en) * 2014-09-24 2016-03-31 中兴通讯股份有限公司 Data saving method and device and terminal
CN110410935A (en) * 2019-08-09 2019-11-05 宁波奥克斯电气股份有限公司 A kind of control method of air-conditioning power down Auto Power On
CN110907688A (en) * 2018-09-17 2020-03-24 宁德时代新能源科技股份有限公司 Power failure detection circuit and control method thereof
CN112711381A (en) * 2020-12-28 2021-04-27 深圳市合信自动化技术有限公司 Method for accelerating power failure data storage and PLC
CN114428477A (en) * 2021-12-07 2022-05-03 首钢京唐钢铁联合有限责任公司 Programmable Logic Controller (PLC), data recovery method and device thereof and storage medium
CN114490194A (en) * 2022-04-19 2022-05-13 海光信息技术股份有限公司 Power-down processing method, functional node, processing system, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6038669A (en) * 1996-12-17 2000-03-14 Lg Industrial Systems Co., Ltd. PLC having power failure compensation function and power failure compensation method
CN1837449A (en) * 2005-03-25 2006-09-27 海尔集团公司 A washing machine capable of updating or adding washing programs
CN201336019Y (en) * 2009-01-22 2009-10-28 无锡市中远工业自动化有限公司 Power-failure protecting circuit for programmable controller
CN102033502A (en) * 2009-09-25 2011-04-27 松下电工株式会社 Programmable controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6038669A (en) * 1996-12-17 2000-03-14 Lg Industrial Systems Co., Ltd. PLC having power failure compensation function and power failure compensation method
CN1837449A (en) * 2005-03-25 2006-09-27 海尔集团公司 A washing machine capable of updating or adding washing programs
CN201336019Y (en) * 2009-01-22 2009-10-28 无锡市中远工业自动化有限公司 Power-failure protecting circuit for programmable controller
CN102033502A (en) * 2009-09-25 2011-04-27 松下电工株式会社 Programmable controller

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016045303A1 (en) * 2014-09-24 2016-03-31 中兴通讯股份有限公司 Data saving method and device and terminal
CN110907688A (en) * 2018-09-17 2020-03-24 宁德时代新能源科技股份有限公司 Power failure detection circuit and control method thereof
US11048316B2 (en) 2018-09-17 2021-06-29 Contemporary Amperex Technology Co., Limited Power-down detection circuit and control method
US11656672B2 (en) 2018-09-17 2023-05-23 Contemporary Amperex Technology Co., Limited Method for controlling a power-down detection circuit, controller and computer readable storage media
CN110410935A (en) * 2019-08-09 2019-11-05 宁波奥克斯电气股份有限公司 A kind of control method of air-conditioning power down Auto Power On
CN112711381A (en) * 2020-12-28 2021-04-27 深圳市合信自动化技术有限公司 Method for accelerating power failure data storage and PLC
CN114428477A (en) * 2021-12-07 2022-05-03 首钢京唐钢铁联合有限责任公司 Programmable Logic Controller (PLC), data recovery method and device thereof and storage medium
CN114428477B (en) * 2021-12-07 2024-10-01 首钢京唐钢铁联合有限责任公司 Programmable logic controller PLC, data recovery method and device thereof and storage medium
CN114490194A (en) * 2022-04-19 2022-05-13 海光信息技术股份有限公司 Power-down processing method, functional node, processing system, device and storage medium

Similar Documents

Publication Publication Date Title
CN103744747A (en) Power failure controlling device for programmable logic controller (PLC)
US9042197B2 (en) Power fail protection and recovery using low power states in a data storage device/system
TWI475368B (en) Power control system and method thereof
CN107068172B (en) Memory device, method and apparatus for controlling memory device
CN103531233B (en) For the power-down protection circuit of flash memory and power down protection sequence circuit
CN102866934B (en) Based on dormancy and the waken system of the embedded device of non-volatile random access memory
TWI567541B (en) Implementing a power off state in a computing device
EP2877994A1 (en) Ultra-deep power-down mode for memory devices
CN102360244A (en) Standby method for lengthening standby time of computer
CN107346170A (en) A kind of FPGA Heterogeneous Computings acceleration system and method
CN101710252A (en) Power supply method and power supply device of storage system
CN103399520B (en) For power failure data access method and the device of programmable logic controller system
CN105759679A (en) Power-failure protection controller and power-failure protection method thereof
CN103713726B (en) A kind of SCM system with power-saving working mode
CN204304532U (en) A kind of computer and the feed circuit based on its USB interface
CN104570821B (en) Integrated circuit and operation method thereof
CN101088099A (en) Card device
CN202084190U (en) An embedded electronic book based on electronic ink screen
CN103198861B (en) Memory storage device, memory controller and control method
CN205427831U (en) Central air conditioning controller falls electric data backup device
CN204650508U (en) A kind of hard disk isolation prosthetic device
CN202887096U (en) Central processing unit (CPU) reset circuit
CN202093834U (en) Universal serial bus (USB) flash disk capable of producing sound during power failure
CN1282911A (en) Method for suspending computer system state
CN100371858C (en) Power supply backup system of memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140423