WO2016197329A1 - Method and apparatus of configuring an operation mode of an automation device - Google Patents

Method and apparatus of configuring an operation mode of an automation device Download PDF

Info

Publication number
WO2016197329A1
WO2016197329A1 PCT/CN2015/081086 CN2015081086W WO2016197329A1 WO 2016197329 A1 WO2016197329 A1 WO 2016197329A1 CN 2015081086 W CN2015081086 W CN 2015081086W WO 2016197329 A1 WO2016197329 A1 WO 2016197329A1
Authority
WO
WIPO (PCT)
Prior art keywords
voltage
trigger event
automation device
mode
value
Prior art date
Application number
PCT/CN2015/081086
Other languages
French (fr)
Inventor
Liang He
Xiaobo Wang
Lilei ZHAI
Yude ZHANG
Original Assignee
Abb Schweiz Ag
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 Abb Schweiz Ag filed Critical Abb Schweiz Ag
Priority to PCT/CN2015/081086 priority Critical patent/WO2016197329A1/en
Publication of WO2016197329A1 publication Critical patent/WO2016197329A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/40Testing power supplies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof

Definitions

  • Embodiments of the present disclosure generally relate to the field of industrial process control, and more particularly relate to a method and apparatus of configuring an operation mode of an automation device.
  • an automation device especially a standalone automation device, is widely used as a control device for small range process control.
  • the automatic device has several input/output ports and a configurable common process control algorithm (such as Proportion-Integration-Differentiation (PID) ) to perform a loop control.
  • PID Proportion-Integration-Differentiation
  • the automation device can be powered in an alternating current/direct current (AC/DC) power mode or a Universal Serial Bus (USB) power mode.
  • AC/DC power mode the automation device is powered by an isolated AC/DC power supply, for example by the 24V DC power supply or 220V AC mains.
  • the automation device will work in a control mode. In other words, the automation device works as a controller for outputting and sampling the current and voltage to control the object and calculating various parameters.
  • the automation device is powered by the USB port of an electronic device (such as a computer, notebook, netbook, tablet, a smart phone, and etc. ) which is connected to the automation device to configure the automation device.
  • the automation device works in a factory test mode or a configuration mode.
  • the factory test mode the automation device will be tested to check the healthiness of its various functionalities.
  • the configuration mode the electronic device is connected to the automation device to perform device configurations, such as uploading and downloading configuration files from the electronic device like a computer, notebook, netbook, tablet, a smart phone, and etc., and at the same time other functions, especially those for the control mode like outputting, sampling, calculating and so on are all forbidden.
  • the maximum power dispassion of the automation device is about 8W in the control mode, which means if the automation device is powered by USB port with a supply voltage of 5V, but works as a controller, the current pulled out of the USB port will be about 1.6A; however the current limitation of USB port is only about 0.5A. Thus if the automation device is powered by the USB port but works as a controller, it will damage the electronic device such as a computer, notebook, netbook, tablet, a smart phone, and etc., which is connected with the automation device to be configured.
  • the present disclosure provides a solution for automatic operation mode configuration of an automation device, so as to solve or at least partially mitigate at least a part of problems in the prior art.
  • a method of configuring an operation mode of an automation device comprises detecting, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device, wherein each of the first trigger event and the second trigger event denotes switching the supply voltage of the automation device between a first voltage for a configuration mode and a second voltage for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction while the second trigger event has a voltage changing direction different from the first trigger event; and configuring the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
  • the detection results of the first trigger event and the second trigger event may be denoted by a value of a power state
  • the method may further comprise setting the value of the power state in response to detection of the first trigger event or the second trigger event, and wherein the power state may have a first value for the voltage increasing direction and a second value for the voltage decreasing direction.
  • the configuring the operation mode of the automation device may comprise: determining the operation mode of the automation device as the control mode if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the first value.
  • the configuring the operation mode of the automation device may comprise: determining the operation mode of the automation device as a configuration mode if either of the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle is the second value.
  • the switching of the supply voltage of the automation device between the first voltage for the configuration mode and the second voltage for the control mode is denoted by an event that the supply voltage crosses a predetermined trip point which is between the first voltage and the second voltage.
  • the predetermined trip point may be between 4.11V and 4.55V, typically 4.33V. More particularly, the predetermined trip point may be stored in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device.
  • HVD High/Low Voltage Detect
  • the detecting the second trigger event may be performed after a predetermined time period since the first trigger event is detected.
  • a voltage changing direction setting stored in a register of High/Low Voltage Detect of a control unit of the automation device may be used for controlling the detecting of the first trigger event and the second trigger event.
  • the voltage changing direction setting may have an initial value indicating the voltage increasing direction and be changed if either the first trigger event or the second trigger event is detected.
  • an apparatus for configuring an operation mode of an automation device comprises an event detection module configured to detect, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device, wherein each of the first trigger event and the second trigger event denotes switching of the supply voltage of the automation device between a first voltage for a configuration mode and a second voltage for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction while the second trigger event has a voltage changing direction different from the first trigger event; and a mode configuration module, configured to configure the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
  • the first trigger event and the second trigger event of a supply voltage of the automation device are monitored, and based on the detection results of these trigger events, the operation mode could be configured automatically without any manual intervene.
  • the operation mode could be configured automatically without any manual intervene.
  • Fig. 1 schematically illustrates a diagram of a principle of operation mode configuration of an automation device according to an embodiment of the present disclosure
  • Fig. 2 schematically illustrates a flow diagram of a method of configuring an operation mode of an automation device according to an embodiment of the present disclosure
  • Fig. 3 schematically illustrates an example operation mode determination based on values of power state according to an embodiment of the present disclosure
  • Fig. 4 schematically illustrates a flow diagram of an example method of configuring an operation mode of an automation device when the microcontroller unit (MCU) of the automation device starts according to an embodiment of the present disclosure
  • Fig. 5 schematically illustrates a flow diagram of an example method of configuring operation mode of an automation device during operation of the automation device starts according to an embodiment of the present disclosure
  • Fig. 6 schematically illustrates a block diagram of an apparatus of configuring an operation mode of an automation device according to an embodiment of the present disclosure.
  • the power mode determination and operation mode configuration are very important to the automation device.
  • Current standalone automation device normally requires a user to manually configure the power mode. This manual configuration manner is not only very inconvenient but also has a potential risk of wrong configuration.
  • Fig. 1 schematically illustrates a diagram of a principle of operation mode configuration of an automation device according to an embodiment of the present disclosure.
  • the supply voltage of the automation device will be used to determine the power mode or the operation mode.
  • the power mode means the mode in which the automation device is powered and it comprises two modes, i.e., an USB power mode in which the automation device is powered from USB port of electronic device such as PC, notebook netbook, tablet, smart phone or the like and an AC/DC power mode in which the automatic device is powered by an AC/DC power supply.
  • the operation mode is a mode in which the automation device works, it may comprise a control mode which is used to perform the control functionality and a configuration mode, in which the automation device will be configured through the electronic device connected therewith.
  • a control mode which is used to perform the control functionality
  • a configuration mode in which the automation device will be configured through the electronic device connected therewith.
  • curve 1 and curve 2 shows respectively the voltage changing of the USB power mode and the AC/DC power mode during the starting up of automation device.
  • a stable supply voltage in AC/DC power mode is typically 5.0 V indicated by 102
  • a stable supply voltage in USB mode is typically 4.0 V as indicated by 101, which means different power modes have different stable supply voltages.
  • it may set a trip point.
  • the trip point herein means a voltage value which is considered as a transition point between the voltage for the AC/DC power mode (also called as the control mode voltage hereinafter) and the voltage for the USB mode (also called as the configuration mode voltage hereinafter) . If the stable voltage of the automation device is above the trip point, it means that the automation device is powered in the AC/DC power mode; if the stable voltage is below the trip point, it denotes that the automation device is powered in the USB power mode.
  • Fig. 2 schematically illustrates a flow diagram of a method of configuring an operation mode of an automation device according to an embodiment of the present disclosure.
  • detection of a first trigger event and the second trigger event of a supply voltage of the automation device is performed within a control cycle.
  • the first trigger event and the second trigger event are events that the supply voltage of the automation switches between the configuration mode voltage and the control mode voltage but they have different voltage changing directions.
  • the voltage changing direction indicates whether the supply voltage changes from the configuration mode voltage to the control mode voltage or from the control mode voltage to the configuration mode voltage, i.e., in a voltage increasing direction or in a voltage decreasing direction.
  • the control cycle used herein means a time cycle used to control a configuration of the operation mode.
  • the control cycle might be 250ms for example or any other suitable time period and it may happen regularly or triggered by a predetermined event. For example, it may start every 250ms, or alternatively, it may be triggered by detecting a trigger event with either voltage increasing direction or voltage decreasing direction or by detecting a trigger event with the voltage increasing direction in the previous control cycle.
  • the detection of the first trigger event and the second trigger event is performed by means of a control unit of the automation device, such as the microcontroller unit (MCU) of the automation device.
  • a control unit of the automation device such as the microcontroller unit (MCU) of the automation device.
  • MCU microcontroller unit
  • the power supplied from the AC/DC power supply or the USB port to the automation device is also fed to the control unit so that the control unit can work well, which means that the voltage of the control unit could reflect the supply voltage of the automation device very well.
  • the supply voltage of the automation device can be monitored.
  • the first and second events can be detected by detecting the supply voltage whether crossing a predetermined trip point.
  • HLVD high/low voltage detect
  • HLVDL2 (1) HLVDLl (1) HLVDL0 (1) R/W-0 R-0 R-0 R/W-0 R/W-0 R/W-1 R/W-0 R/W-0
  • the HLVD control register comprises 8 register bits.
  • the first four register bits i.e., bits 0 to 3 are voltage detection limit (HLVDL) bits, which is used to indicate a trip point, wherein “0000” indicate the minimum setting, and “1110” indicates the maximum setting.
  • Bit 4 is a high/low voltage detect power enable (HLVDEN) bit, which indicates whether the HLVD function is used, wherein “1” indicates the HLVD is enabled while “0” indicates HLVD is disabled.
  • Bit 5 is an internal reference voltage stable flag (IRVST) bit, which indicates whether the voltage detect logic will generate the interrupt flag at the specified voltage range, wherein “1” indicates the interrupt flag will be generated and “0” indicates the interrupt flag will not be generated.
  • Bit 6 is a band gap reference voltages stable status flag (BGVST) bit, which indicates whether the band gap voltage references are stable, wherein “1” indicates “stable” and “0” indicates “not stable. ”
  • the last bit, i.e., bit 7 is a voltage direction magnitude select (VDIRMAG) bit, wherein “1” indicates an event occurs when the voltage equals or exceeds the trip point set in the first four bits of the HLVD control register, and “0” indicates an event occurs when the voltage equals or falls below the trip point set in the first four bits of the HLVD control register.
  • VDIRMAG voltage direction magnitude select
  • the MCU When the HLVDEN is set as “1, ” i.e., the HLVD function is enabled, the MCU will monitor the voltage of the MCU, compare it with the set trip point in the HLVDL bits and generate an interrupt when the desired event indicated by the HLVDL bits and the VDIRMAG bit.
  • the predetermined trip point and the voltage changing direction could be stored in this control register.
  • the predetermined trip point may be a voltage value for example between 4.0 and 5.0, usually between 4.11V to 4.55 V and particularly is 4.33V.
  • the voltage direction as included in the HLVD control register indicates a voltage changing direction of the trigger event to be detected. Particularly the setting of the predetermined trip point and the voltage changing direction can performed by setting the first four register bits of HLVDL and the last register bit VDIRMAG.
  • the first four register bit of HLVDL can be set as “1101” to indicate the trip point 4.33V and the register bit of VDIRMAG can be set as “1” to indicate voltage increasing direction and a different value “0” to indicate the voltage decreasing direction.
  • the initial changing direction might be set as “1” to indicate the voltage increasing direction since when the MCU begins to start up, the voltage is under the predetermined trip point.
  • the voltage changing direction will be changed in response to the detection of the first trigger event or the second trigger event in the following control cycles. This means, ifthe supply voltage is above the predetermined trip point, next it is required to detect the event that the supply voltage falls below the predetermined trip point.
  • the MCU will monitor the voltage of the control unit and detect the supply voltage crossing the set trip point in the set voltage changing direction. If the voltage of the control unit experiences an excursion passing the set trip point, an interrupt flag will be set to indicate that a first trigger event occurs.
  • the process execution may branch to the interrupt vector address at which an event processing process will respond to the interrupt and perform corresponding operations. For example, when the first trigger event is detected, the event processing process may change the setting of voltage changing direction in the HLVD control register, i.e., revere the changing direction. In such a way, next detecting of the second trigger event with a different changing direction from the first trigger event will be performed. Similarly, when the second trigger event is detected, the voltage changing direction in HLVD control register will be changed as well. By this mechanism, it is possible to detect the first and the second trigger event by monitoring the interrupt flag.
  • the operation mode of the automation device is configured based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
  • the detecting of the first trigger event and the second trigger event will be performed in the control cycle and at the end of control cycle, it will determine whether there is a supply voltage change in the control cycle that will change the operation mode of the automation device. This could be performed based on the detection results of the first trigger event and the second trigger event.
  • the detection results of the first trigger event and the second trigger event in the control cycle may be denoted a value of a power state.
  • the value of the power state can be set based on with the detected trigger event, which means values of power state for the first trigger event and the second trigger event are different.
  • the detecting of the first trigger event and the second event is controlled by the voltage changing direction setting in the HLVD control register, which means in a control cycle, the first trigger event may have the voltage increasing direction or have the voltage decreasing direction.
  • the value of power state will be determined based on the voltage changing direction of the detected trigger event or the setting of voltage changing direction in the HLVD control register before the trigger event is detected.
  • the power state will be set as a value for the voltage increasing direction, such as “1, ” while if the second trigger event with the voltage decreasing direction is detected, which means that the supply voltage fall down and below the trip point, the power state will be set as another value for the voltage decreasing direction, “0” for example.
  • the power state is set as “0” for the voltage decreasing direction, while if the second trigger event the voltage with the increasing direction is detected, the power state will be set as “1” for the voltage increasing direction.
  • the setting of the power state can also be performed by the event process event in response to a trigger event is detected.
  • Fig. 3 schematically illustrates an example operation mode determination based on values of power state according to an embodiment of the present disclosure.
  • the operation mode of the automation device will be determined as the configuration mode. This means that if the automation device works in the configuration mode at the start of the control cycle and there is no any trigger event detected during the control cycle, the configuration mode will be maintained. Or alternatively, if the first trigger event with the voltage increasing direction and the second trigger event with the voltage decreasing direction are detected successively, these events are considered as the voltage fluctuation events and the operation mode does not change and is kept as it is.
  • the operation mode of the automation device will be determined as the configuration mode, as illustrated in Fig. 3. This means that if the automation device works in the configuration mode at the start of the control cycle and there is a trigger event with the voltage increasing direction, it still maintain the configuration mode. In such a case, the voltage increases above the trip point but it is not sure whether it will fall down again, which means an operation mode change is not determined yet. It can be understood that if it falls down again in the next control cycle, this means a voltage fluctuation and it shall not change the configuration mode to the control mode.
  • the configuration mode of the automation device will be determined as the configuration mode as well. This means that if the automation device works in the control mode at the start of the control cycle and there is a trigger event with the voltage decreasing direction, it will change the operation mode from the control mode to the configuration mode. In such a case, the voltage falls below the trip point. Although it is not sure whether it means an operation mode change yet, it is advantageous to change the control mode as the configuration mode since there is a possibility that it is a real operation mode change and thus there is a potential risk to maintain the control mode, which might harm the electronic device connected to the automation device. Thus, it shall change the operation mode from the control mode to the configuration mode at the end of the control cycle. In such a way, the possible damage will be prevented.
  • the configuration mode of the automation device will be determined as the control mode. This means that at the start of the control cycle, the automation device has worked in the control mode already or the automation device works in the configuration but the voltage increase above the trip point in the previous control cycle. In such a case if the value of the power state at the end of the control cycle is still kept as “1, ” it means the supply voltage is kept at the high voltage and thus the operation mode shall be the control mode.
  • the operation mode of the automation device is determined as the control mode only if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the value for the voltage increasing direction, such as “1”. While the operation mode of the automation device is determined as the configuration mode if either of the value of the power state at the start of the control cycle or the value of the power state at the end of the control cycle is the second value for the voltage increasing direction, for example “0. ” In such a way, it can prevent the electronic device from being damaged by wrong operation mode configuration.
  • Fig. 4 schematically illustrates a flow diagram of an example method of configuring operation mode of an automation device when the MCU of the automation device starts according to an embodiment of the present disclosure.
  • the MCU starts up.
  • the trip point and the initial voltage changing direction are set in the HLVD control register, particularly in the register bit of HLVDL ⁇ 3 ⁇ 0> and the register bit of VDIRMAG.
  • the trip point may be 4.33V indicated by “1101” and the initial voltage changing direction may be the voltage increasing direction indicated by “1. ”
  • step 403 it is determined whether the MCU voltage triggers the interrupt.
  • the power state flag (i.e., the value of the power state) is set as “0” and at step 409, the operation mode is determined as the configuration mode.
  • the interrupt/event processing process will set the power state flag as “1” and reverse the voltage changing direction. The reversing of the voltage changing direction may be delayed for a predetermined time interval, such as 10ms to avoid detection of the normal flutters during the increasing of the supply voltage, which might cause wrong event detection. In such a way, the event detection result is recorded and the interrupt or event to be detected next is changed.
  • step 406 it is further determined whether an interrupt is triggered again in the control cycle of 250ms. Ifit is determined that the interrupt is not triggered at 406, the operation mode will be determined as the control mode at step 407. Otherwise, if the interrupt is triggered again, at step 408 the interrupt/event processing process will set the power state flag back to “0” and reverse the voltage changing direction again. Afterwards, at step 409, it determines the operation mode as the configuration mode.
  • Fig. 5 schematically illustrates a flow diagram of an example method of configuring operation mode of an automation device during operation of the automation device.
  • the automation device works in a control mode or a configuration mode. If no interrupt is triggered within the control cycle at step 502, then at step 506, it will determine whether the value PS start of the power state flag at the start of the control cycle and the value PS end of the power state flag at the end of the control cycle are both 1. If yes, then at step 506, it is determined at step 507 that the automation device works in the control mode; otherwise, it works in the configuration mode at step 508.
  • step 502 event processing process will set the power state as a value corresponding to the voltage changing direction before the interrupt and reverse the voltage changing direction at step 503. Then, the interrupt with the reversed voltage changing direction is monitored. If it is determined at step 504 that the interrupt is triggered again, the method proceeds with step 505 at which the power state flag is set and the voltage changing direction is reversed. After that, at step 506, it determines the operation mode based on the values PS start and PS end . Besides, if there is no further interrupt triggered at step 504, the method directly goes to step 506 to determine the operation mode based on the values PS start and PS end .
  • apparatus 600 may comprise an event detection module 610 and a mode configuration module 620.
  • the event detection module 610 may be configured to detect, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device.
  • Each of the first trigger event and the second trigger event denotes switching of the supply voltage of the automation device between a first voltage (4.0V for example) for a configuration mode and a second voltage (5.0V for example) for a control mode.
  • the first trigger event has a voltage increasing direction or a voltage decreasing direction
  • the second trigger event has a voltage changing direction different from the first trigger event.
  • the mode configuration module 620 may be configured to configure the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
  • the detection results of the first trigger event and the second trigger event may be denoted by a value of a power state.
  • the apparatus 600 may further comprise an event processing module 630.
  • the event process module 630 may be configured to set the value of the power state in response to detection of the first trigger event or the second trigger event, and wherein the power state has a first value for the voltage increasing direction and has a second value for the voltage decreasing direction. For example, the power state has a first value of “1” for the voltage increasing direction and has a second value of “0” for the voltage decreasing direction.
  • the mode configuration module 620 may be further configured to determine the operation mode of the automation device as the control mode if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the first value.
  • the mode configuration module 620 may also be configured to determine the operation mode of the automation device as the configuration mode if either of the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle is the second value.
  • the switching of the supply voltage of the automation device between the configuration mode voltage and the control mode voltage may be denoted by an event that the supply voltage crosses a predetermined trip point.
  • the predetermined trip point can be a value between the first voltage and the second voltage, particularly between 4.11V to 4.55 V, typically 4.33 V.
  • the predetermined trip point may be stored in in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device, particularly the first four bits of the HLVD control register. In such a way, an interrupt flag will be set when the MCU voltage crosses the predetermined trip point.
  • HLVD High/Low Voltage Detect
  • the event detection module may detect the first or the second trigger event by checking the interrupt flag.
  • the event detection module 610 may be configured to detect the second trigger event after a predetermined time period since the first trigger event is detected.
  • a voltage changing direction setting may be stored and used for controlling the event detection module 610 to detect the first trigger event and the second trigger event.
  • the voltage changing direction setting has an initial value indicating the voltage increasing direction and will be changed if either the first trigger event or the second trigger event is detected.
  • the apparatus 600 as provided in embodiments of the present disclosure has been described in brief with reference to Fig. 6. However, it may be also appreciated that the apparatus 600 and the modules as contained therein will perform similar operations as described hereinbefore with regarding to the method. Accordingly, for details about these operations, reference may be made to the description about the method with reference to Figs. 1 to 5.
  • the value of the power state or the power flag is used to denote the detection result of the first and the second trigger events; however, in practice, it can be omitted.
  • the operation mode may be determined as the configuration mode; if no event is detected, the operation mode will be determined as the control mode if the current voltage changing direction is the voltage decreasing direction and determined as the configuration mode if the current voltage changing direction is the voltage increasing direction.
  • the first trigger event is described to perform in response to the detection of the second trigger event, it is also possible to detect the two trigger event concurrently.
  • control cycle is also not limited to 250ms but could be other time interval.
  • the solution as provided herein may take the form of a hardware embodiment, a software embodiment (including firmware, resident software, micro-code, etc. ) or an embodiment combining software and hardware aspects. That is to say, the event detection and the operation mode configuration herein can be implemented by electronic elements or devices, software stored in storage device, or the combination of electronic devices and the software, for example by micro-processors, digital signal processor, simple chip machine, and suitable programs etc.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Control Of Voltage And Current In General (AREA)

Abstract

A method (200) and an apparatus (600) of configuring an operation mode of an automation device are provided. The method (200) comprises detecting (201), within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device. Each of the first trigger event and the second trigger event denotes switching of the supply voltage of the automation device between a first voltage (101) for a configuration mode and a second configuration for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction while the second trigger event has a voltage changing direction different from the first trigger event. The method further comprises configuring (202) the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle. It could provide a solution of automatic operation mode configuration at a low cost. This solution could determine the operation mode efficiently and reliably, which could in turn improve the safety and reliability of the automation device greatly.

Description

METHOD AND APPARATUS OF CONFIGURING AN OPERATION MODE OF AN AUTOMATION DEVICE FIELD OF THE INVENTION
Embodiments of the present disclosure generally relate to the field of industrial process control, and more particularly relate to a method and apparatus of configuring an operation mode of an automation device.
BACKGROUND OF THE INVENTION
Nowadays, an automation device, especially a standalone automation device, is widely used as a control device for small range process control. Normally, the automatic device has several input/output ports and a configurable common process control algorithm (such as Proportion-Integration-Differentiation (PID) ) to perform a loop control.
The automation device can be powered in an alternating current/direct current (AC/DC) power mode or a Universal Serial Bus (USB) power mode. In the AC/DC power mode, the automation device is powered by an isolated AC/DC power supply, for example by the 24V DC power supply or 220V AC mains. In this AC/DC power mode, the automation device will work in a control mode. In other words, the automation device works as a controller for outputting and sampling the current and voltage to control the object and calculating various parameters. In the USB power mode, the automation device is powered by the USB port of an electronic device (such as a computer, notebook, netbook, tablet, a smart phone, and etc. ) which is connected to the automation device to configure the automation device. In the USB power mode, the automation device works in a factory test mode or a configuration mode. In the factory test mode, the automation device will be tested to check the healthiness of its various functionalities. In the configuration mode, the electronic device is connected to the automation device to perform device configurations, such as uploading and downloading configuration files from the electronic device like a computer, notebook, netbook, tablet, a smart phone, and etc., and at the same time other functions, especially those for the control mode like outputting, sampling, calculating and so on are all forbidden.
It is known that the maximum power dispassion of the automation device is about 8W in the control mode, which means if the automation device is powered by USB port with a supply voltage of 5V, but works as a controller, the current pulled out of the USB port will be about 1.6A; however the current limitation of USB port is only about 0.5A. Thus ifthe automation device is powered by the USB port but works as a controller, it will damage the electronic device such as a computer, notebook, netbook, tablet, a smart phone, and etc., which is connected with the automation device to be configured.
Therefore, there is a need in the art to prevent the electronic device connected with the automation device through the USB port from damaging.
SUMMARY OF THE INVENTION
To this end, the present disclosure provides a solution for automatic operation mode configuration of an automation device, so as to solve or at least partially mitigate at least a part of problems in the prior art.
According to a first aspect of the present disclosure, there is provided a method of configuring an operation mode of an automation device. The method comprises detecting, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device, wherein each of the first trigger event and the second trigger event denotes switching the supply voltage of the automation device between a first voltage for a configuration mode and a second voltage for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction while the second trigger event has a voltage changing direction different from the first trigger event; and configuring the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
In an embodiment of the present disclosure, the detection results of the first trigger event and the second trigger event may be denoted by a value of a power state, wherein the method may further comprise setting the value of the power state in response to detection of the first trigger event or the second trigger event, and wherein the power state may have a first value for the voltage increasing direction and a second value for the voltage decreasing direction.
In another embodiment of the present disclosure, the configuring the operation mode of the automation device may comprise: determining the operation mode of the automation device as the control mode if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the first value..
In a further embodiment of the present disclosure, the configuring the operation mode of the automation device may comprise: determining the operation mode of the automation device as a configuration mode if either of the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle is the second value.
In a still further embodiment of the present disclosure, the switching of the supply voltage of the automation device between the first voltage for the configuration mode and the second voltage for the control mode is denoted by an event that the supply voltage crosses a predetermined trip point which is between the first voltage and the second voltage. Particularly, the predetermined trip point may be between 4.11V and 4.55V, typically 4.33V. More particularly, the predetermined trip point may be stored in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device.
In another embodiment of the present disclosure, the detecting the second trigger event may be performed after a predetermined time period since the first trigger event is detected.
In a further embodiment of the present disclosure, a voltage changing direction setting stored in a register of High/Low Voltage Detect of a control unit of the automation device may be used for controlling the detecting of the first trigger event and the second trigger event. The voltage changing direction setting may have an initial value indicating the voltage increasing direction and be changed if either the first trigger event or the second trigger event is detected.
In a second aspect of the present disclosure, there is further provided an apparatus for configuring an operation mode of an automation device. The apparatus comprises an event detection module configured to detect, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device, wherein each of the first trigger event and the second trigger event denotes switching of  the supply voltage of the automation device between a first voltage for a configuration mode and a second voltage for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction while the second trigger event has a voltage changing direction different from the first trigger event; and a mode configuration module, configured to configure the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
With embodiments of the present disclosure, the first trigger event and the second trigger event of a supply voltage of the automation device are monitored, and based on the detection results of these trigger events, the operation mode could be configured automatically without any manual intervene. Thus, it could provide a solution of automatic operation mode configuration at a low cost, which could determine the operation mode efficiently and reliably and in turn improve the safety and reliability of the automation device greatly.
BRIEF DESCRIPTION OF THE DRAWINGS
The above and other features of the present disclosure will become more apparent through detailed explanation on the embodiments as illustrated in the description with reference to the accompanying drawings, throughout which like reference numbers represent same or similar components and wherein:
Fig. 1 schematically illustrates a diagram of a principle of operation mode configuration of an automation device according to an embodiment of the present disclosure;
Fig. 2 schematically illustrates a flow diagram of a method of configuring an operation mode of an automation device according to an embodiment of the present disclosure;
Fig. 3 schematically illustrates an example operation mode determination based on values of power state according to an embodiment of the present disclosure;
Fig. 4 schematically illustrates a flow diagram of an example method of configuring an operation mode of an automation device when the microcontroller unit (MCU) of the automation device starts according to an embodiment of the present  disclosure;
 Fig. 5 schematically illustrates a flow diagram of an example method of configuring operation mode of an automation device during operation of the automation device starts according to an embodiment of the present disclosure; and
Fig. 6 schematically illustrates a block diagram of an apparatus of configuring an operation mode of an automation device according to an embodiment of the present disclosure.
DETAILED DESCRIPTION OF EMBODIMENTS
Hereinafter, solutions as provided in the present disclosure will be described in details through embodiments with reference to the accompanying drawings. It should be appreciated that these embodiments are presented only to enable those skilled in the art to better understand and implement the present disclosure, not intended to limit the scope of the present disclosure in any manner.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to ″a/an/the/said [element, device, component, means, step, etc. ] ″ are to be interpreted openly as referring to at least one instance of said element, device, component, means, unit, step, etc., without excluding a plurality of such devices, components, means, units, steps, etc., unless explicitly stated otherwise. Besides, the indefinite article “a/an” as used herein does not exclude a plurality of such steps, units, modules, devices, and objects, and etc.
As mentioned hereinabove, the power mode determination and operation mode configuration are very important to the automation device. Current standalone automation device normally requires a user to manually configure the power mode. This manual configuration manner is not only very inconvenient but also has a potential risk of wrong configuration.
In view of this, in the present disclosure, there is provided a solution for automatic operation mode configuration of an automation device, which will be described hereinafter with reference to Figs 1 to 5.
Reference is first made to Fig. 1, which schematically illustrates a diagram of a principle of operation mode configuration of an automation device  according to an embodiment of the present disclosure. In the present disclosure, the supply voltage of the automation device will be used to determine the power mode or the operation mode. Herein, the power mode means the mode in which the automation device is powered and it comprises two modes, i.e., an USB power mode in which the automation device is powered from USB port of electronic device such as PC, notebook netbook, tablet, smart phone or the like and an AC/DC power mode in which the automatic device is powered by an AC/DC power supply. The operation mode is a mode in which the automation device works, it may comprise a control mode which is used to perform the control functionality and a configuration mode, in which the automation device will be configured through the electronic device connected therewith. Thus, in the present disclosure, if the automation device is powered in the AC/DC power mode, it will work in the control mode; while if the automation device is powered in the USB power mode, it will work in the configuration mode.
As illustrated in Fig. 1, curve 1 and curve 2 shows respectively the voltage changing of the USB power mode and the AC/DC power mode during the starting up of automation device. As illustrated, a stable supply voltage in AC/DC power mode is typically 5.0 V indicated by 102, while a stable supply voltage in USB mode is typically 4.0 V as indicated by 101, which means different power modes have different stable supply voltages. Thus, it is possible to differentiate different power modes by means of the supply voltages. Particularly, it may set a trip point. The trip point herein means a voltage value which is considered as a transition point between the voltage for the AC/DC power mode (also called as the control mode voltage hereinafter) and the voltage for the USB mode (also called as the configuration mode voltage hereinafter) . If the stable voltage of the automation device is above the trip point, it means that the automation device is powered in the AC/DC power mode; if the stable voltage is below the trip point, it denotes that the automation device is powered in the USB power mode.
Based on such a principle, it is possible to automatically determine the operation mode of the automation device, which will be described with reference to Figs. 2 to 5.
Fig. 2 schematically illustrates a flow diagram of a method of configuring an operation mode of an automation device according to an embodiment of  the present disclosure. As illustrated in Fig. 2, first at step 201, detection of a first trigger event and the second trigger event of a supply voltage of the automation device is performed within a control cycle. The first trigger event and the second trigger event are events that the supply voltage of the automation switches between the configuration mode voltage and the control mode voltage but they have different voltage changing directions. The voltage changing direction indicates whether the supply voltage changes from the configuration mode voltage to the control mode voltage or from the control mode voltage to the configuration mode voltage, i.e., in a voltage increasing direction or in a voltage decreasing direction. The control cycle used herein means a time cycle used to control a configuration of the operation mode. During the control cycle, the first and second trigger events are monitored and at the end of the control cycle, the operation mode will be determined again to adapt supply voltage changes in the control cycle. The control cycle might be 250ms for example or any other suitable time period and it may happen regularly or triggered by a predetermined event. For example, it may start every 250ms, or alternatively, it may be triggered by detecting a trigger event with either voltage increasing direction or voltage decreasing direction or by detecting a trigger event with the voltage increasing direction in the previous control cycle.
In an embodiment of the present disclosure, the detection of the first trigger event and the second trigger event is performed by means of a control unit of the automation device, such as the microcontroller unit (MCU) of the automation device. It can be appreciated that the power supplied from the AC/DC power supply or the USB port to the automation device is also fed to the control unit so that the control unit can work well, which means that the voltage of the control unit could reflect the supply voltage of the automation device very well. Thus, through monitoring the voltage of the control unit, the supply voltage of the automation device can be monitored.
In practice, in order to simplify detection of the switching of supply voltage of the automation device between the configuration mode voltage and the control mode voltage and achieve the detection in a cost-efficient way, it may use the supply voltage crosses a predetermined trip point, it , may be considered that the switching occurs. Thus, the first and second events can be detected by detecting the supply voltage whether crossing a predetermined trip point.
In the MCU, there is usually a high/low voltage detect (HLVD) control register, which is a register storing control parameters for the high/low voltage detect. For a purpose of illustration, the structure of the HLVD control register is illustrated in the follow table.
Table 1 The HLVD Control Register
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
VDIRMAG BGVST IRVST HLVDEN HLVDL3 (1) HLVDL2 (1) HLVDLl (1) HLVDL0 (1)
R/W-0 R-0 R-0 R/W-0 R/W-0 R/W-1 R/W-0 R/W-0
*R = readable bit  W = writable bit  -n = value at Power-On Reset (POR)
“1” = bit is set
As illustrated in Table 1, the HLVD control register comprises 8 register bits. The first four register bits. i.e., bits 0 to 3 are voltage detection limit (HLVDL) bits, which is used to indicate a trip point, wherein “0000” indicate the minimum setting, and “1110” indicates the maximum setting. Bit 4 is a high/low voltage detect power enable (HLVDEN) bit, which indicates whether the HLVD function is used, wherein “1” indicates the HLVD is enabled while “0” indicates HLVD is disabled. Bit 5 is an internal reference voltage stable flag (IRVST) bit, which indicates whether the voltage detect logic will generate the interrupt flag at the specified voltage range, wherein “1” indicates the interrupt flag will be generated and “0” indicates the interrupt flag will not be generated. Bit 6 is a band gap reference voltages stable status flag (BGVST) bit, which indicates whether the band gap voltage references are stable, wherein “1” indicates “stable” and “0” indicates “not stable. ” The last bit, i.e., bit 7 is a voltage direction magnitude select (VDIRMAG) bit, wherein “1” indicates an event occurs when the voltage equals or exceeds the trip point set in the first four bits of the HLVD control register, and “0” indicates an event occurs when the voltage equals or falls below the trip point set in the first four bits of the HLVD control register. When the HLVDEN is set as “1, ” i.e., the HLVD function is enabled, the MCU will monitor the voltage of the MCU, compare it with the set trip point in the HLVDL bits and generate an interrupt when the desired event indicated by the HLVDL bits and the VDIRMAG bit.
Thus, it is possible to use this HLVD control register to achieve the trigger event detection. The predetermined trip point and the voltage changing  direction could be stored in this control register. The predetermined trip point may be a voltage value for example between 4.0 and 5.0, usually between 4.11V to 4.55 V and particularly is 4.33V. The voltage direction as included in the HLVD control register indicates a voltage changing direction of the trigger event to be detected. Particularly the setting of the predetermined trip point and the voltage changing direction can performed by setting the first four register bits of HLVDL and the last register bit VDIRMAG. For example, the first four register bit of HLVDL can be set as “1101” to indicate the trip point 4.33V and the register bit of VDIRMAG can be set as “1” to indicate voltage increasing direction and a different value “0” to indicate the voltage decreasing direction. The initial changing direction might be set as “1” to indicate the voltage increasing direction since when the MCU begins to start up, the voltage is under the predetermined trip point. The voltage changing direction will be changed in response to the detection of the first trigger event or the second trigger event in the following control cycles. This means, ifthe supply voltage is above the predetermined trip point, next it is required to detect the event that the supply voltage falls below the predetermined trip point.
Thus, once the HLVD control register is set, the MCU will monitor the voltage of the control unit and detect the supply voltage crossing the set trip point in the set voltage changing direction. If the voltage of the control unit experiences an excursion passing the set trip point, an interrupt flag will be set to indicate that a first trigger event occurs. In such a case, the process execution may branch to the interrupt vector address at which an event processing process will respond to the interrupt and perform corresponding operations. For example, when the first trigger event is detected, the event processing process may change the setting of voltage changing direction in the HLVD control register, i.e., revere the changing direction. In such a way, next detecting of the second trigger event with a different changing direction from the first trigger event will be performed. Similarly, when the second trigger event is detected, the voltage changing direction in HLVD control register will be changed as well. By this mechanism, it is possible to detect the first and the second trigger event by monitoring the interrupt flag.
Afterwards, at step 202, the operation mode of the automation device is configured based on detection results of the first trigger event and the second trigger  event at the end of the control cycle. As mentioned hereinabove, the detecting of the first trigger event and the second trigger event will be performed in the control cycle and at the end of control cycle, it will determine whether there is a supply voltage change in the control cycle that will change the operation mode of the automation device. This could be performed based on the detection results of the first trigger event and the second trigger event.
In an embodiment of the present disclosure, the detection results of the first trigger event and the second trigger event in the control cycle may be denoted a value of a power state. When the first trigger event or the second trigger event is detected, the value of the power state can be set based on with the detected trigger event, which means values of power state for the first trigger event and the second trigger event are different.
As mentioned above, the detecting of the first trigger event and the second event is controlled by the voltage changing direction setting in the HLVD control register, which means in a control cycle, the first trigger event may have the voltage increasing direction or have the voltage decreasing direction. Thus, the value of power state will be determined based on the voltage changing direction of the detected trigger event or the setting of voltage changing direction in the HLVD control register before the trigger event is detected.
For example, if the first trigger event with the voltage increasing direction is detected, which means that the supply voltage increases and goes beyond the trip point, the power state will be set as a value for the voltage increasing direction, such as “1, ” while if the second trigger event with the voltage decreasing direction is detected, which means that the supply voltage fall down and below the trip point, the power state will be set as another value for the voltage decreasing direction, “0” for example. On the other hand, if the first trigger event with the voltage decreasing direction is detected, the power state is set as “0” for the voltage decreasing direction, while if the second trigger event the voltage with the increasing direction is detected, the power state will be set as “1” for the voltage increasing direction. The setting of the power state can also be performed by the event process event in response to a trigger event is detected.
Fig. 3 schematically illustrates an example operation mode  determination based on values of power state according to an embodiment of the present disclosure. As illustrated in Fig. 3, when the value of the power state at the start of the control cycle and the value of the power state at the start of the control cycle are both “0,” the operation mode of the automation device will be determined as the configuration mode. This means that if the automation device works in the configuration mode at the start of the control cycle and there is no any trigger event detected during the control cycle, the configuration mode will be maintained. Or alternatively, if the first trigger event with the voltage increasing direction and the second trigger event with the voltage decreasing direction are detected successively, these events are considered as the voltage fluctuation events and the operation mode does not change and is kept as it is.
When the value of the power state at the start of the control cycle is 0 and the value of the power state at the end of the control cycle is “1, ” the operation mode of the automation device will be determined as the configuration mode, as illustrated in Fig. 3. This means that if the automation device works in the configuration mode at the start of the control cycle and there is a trigger event with the voltage increasing direction, it still maintain the configuration mode. In such a case, the voltage increases above the trip point but it is not sure whether it will fall down again, which means an operation mode change is not determined yet. It can be understood that if it falls down again in the next control cycle, this means a voltage fluctuation and it shall not change the configuration mode to the control mode. In such a case, if the operation mode is changed at the present control cycle, a voltage fluctuation will be wrongly taken as the operation mode change, which will harm the electronic device connected to the automation device since the control mode will cause a much higher current than the configuration mode. Thus, it is a better choice to keep the configuration mode and further determine based on the situation in the next control cycle whether the operation mode is changed or not.
As also illustrated in Fig. 3, when the value of the power state at the start of the control cycle is 1 and the value of the power state at the end of the control cycle is “0, ” the configuration mode of the automation device will be determined as the configuration mode as well. This means that if the automation device works in the control mode at the start of the control cycle and there is a trigger event with the voltage  decreasing direction, it will change the operation mode from the control mode to the configuration mode. In such a case, the voltage falls below the trip point. Although it is not sure whether it means an operation mode change yet, it is advantageous to change the control mode as the configuration mode since there is a possibility that it is a real operation mode change and thus there is a potential risk to maintain the control mode, which might harm the electronic device connected to the automation device. Thus, it shall change the operation mode from the control mode to the configuration mode at the end of the control cycle. In such a way, the possible damage will be prevented.
In addition, if the value of the power state at the start of the control cycle is 1 and the value of the power state at the end of the control cycle is “1, ” the configuration mode of the automation device will be determined as the control mode. This means that at the start of the control cycle, the automation device has worked in the control mode already or the automation device works in the configuration but the voltage increase above the trip point in the previous control cycle. In such a case if the value of the power state at the end of the control cycle is still kept as “1, ” it means the supply voltage is kept at the high voltage and thus the operation mode shall be the control mode.
Therefore, in embodiments of the present disclosure, the operation mode of the automation device is determined as the control mode only if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the value for the voltage increasing direction, such as “1”. While the operation mode of the automation device is determined as the configuration mode if either of the value of the power state at the start of the control cycle or the value of the power state at the end of the control cycle is the second value for the voltage increasing direction, for example “0. ” In such a way, it can prevent the electronic device from being damaged by wrong operation mode configuration.
With the solution as described herein above, it may provide a solution of an automatic operation mode configuration and at the same time, it does not require the additional hardware cost. Particularly it is possible to determine the operation mode efficiently and reliably, which in turn greatly improves safety and reliability of the automation device.
In addition, in order to make the skilled in the art understand the present disclosure completely and thoroughly, example methods of operation mode configuration within a control cycle will be described with reference to Figs. 4 and 5.
Reference is made to Fig. 4, which schematically illustrates a flow diagram of an example method of configuring operation mode of an automation device when the MCU of the automation device starts according to an embodiment of the present disclosure. As illustrated in Fig. 4, first at step 401, the MCU starts up. Then at step 402, the trip point and the initial voltage changing direction are set in the HLVD control register, particularly in the register bit of HLVDL <3∶0> and the register bit of VDIRMAG. The trip point may be 4.33V indicated by “1101” and the initial voltage changing direction may be the voltage increasing direction indicated by “1. ” Next at step 403, it is determined whether the MCU voltage triggers the interrupt. If the MCU voltage does not trigger the interrupt within the whole control cycle, then at step 404, the power state flag (i.e., the value of the power state) is set as “0” and at step 409, the operation mode is determined as the configuration mode. On the other hand, if the MCU voltage triggers the interrupt, at step 405 the interrupt/event processing process will set the power state flag as “1” and reverse the voltage changing direction. The reversing of the voltage changing direction may be delayed for a predetermined time interval, such as 10ms to avoid detection of the normal flutters during the increasing of the supply voltage, which might cause wrong event detection. In such a way, the event detection result is recorded and the interrupt or event to be detected next is changed. At step 406, it is further determined whether an interrupt is triggered again in the control cycle of 250ms. Ifit is determined that the interrupt is not triggered at 406, the operation mode will be determined as the control mode at step 407. Otherwise, if the interrupt is triggered again, at step 408 the interrupt/event processing process will set the power state flag back to “0” and reverse the voltage changing direction again. Afterwards, at step 409, it determines the operation mode as the configuration mode.
Fig. 5 schematically illustrates a flow diagram of an example method of configuring operation mode of an automation device during operation of the automation device. As illustrated in fig. 5, first at step 501, the automation device works in a control mode or a configuration mode. If no interrupt is triggered within the control cycle at step 502, then at step 506, it will determine whether the value PSstart of the  power state flag at the start of the control cycle and the value PSend of the power state flag at the end of the control cycle are both 1. If yes, then at step 506, it is determined at step 507 that the automation device works in the control mode; otherwise, it works in the configuration mode at step 508. On the other hand, if the MCU voltage triggers the interrupt at step 502, then event processing process will set the power state as a value corresponding to the voltage changing direction before the interrupt and reverse the voltage changing direction at step 503. Then, the interrupt with the reversed voltage changing direction is monitored. If it is determined at step 504 that the interrupt is triggered again, the method proceeds with step 505 at which the power state flag is set and the voltage changing direction is reversed. After that, at step 506, it determines the operation mode based on the values PSstart and PSend. Besides, if there is no further interrupt triggered at step 504, the method directly goes to step 506 to determine the operation mode based on the values PSstart and PSend.
In addition to the methods described hereinabove, there is also presented an apparatus for configuring an operation mode of an automation device, which will be described with reference to Fig. 6.
As illustrated in Fig. 6, apparatus 600 may comprise an event detection module 610 and a mode configuration module 620. The event detection module 610 may be configured to detect, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device. Each of the first trigger event and the second trigger event denotes switching of the supply voltage of the automation device between a first voltage (4.0V for example) for a configuration mode and a second voltage (5.0V for example) for a control mode. Particularly, the first trigger event has a voltage increasing direction or a voltage decreasing direction, while the second trigger event has a voltage changing direction different from the first trigger event. The mode configuration module 620 may be configured to configure the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
In an embodiment of the present disclosure, the detection results of the first trigger event and the second trigger event may be denoted by a value of a power state. In such a case, the apparatus 600 may further comprise an event processing module 630. The event process module 630 may be configured to set the value of the  power state in response to detection of the first trigger event or the second trigger event, and wherein the power state has a first value for the voltage increasing direction and has a second value for the voltage decreasing direction. For example, the power state has a first value of “1” for the voltage increasing direction and has a second value of “0” for the voltage decreasing direction.
The mode configuration module 620 may be further configured to determine the operation mode of the automation device as the control mode if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the first value. The mode configuration module 620 may also be configured to determine the operation mode of the automation device as the configuration mode if either of the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle is the second value.
Particularly, the switching of the supply voltage of the automation device between the configuration mode voltage and the control mode voltage may be denoted by an event that the supply voltage crosses a predetermined trip point. The predetermined trip point can be a value between the first voltage and the second voltage, particularly between 4.11V to 4.55 V, typically 4.33 V. The predetermined trip point may be stored in in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device, particularly the first four bits of the HLVD control register. In such a way, an interrupt flag will be set when the MCU voltage crosses the predetermined trip point. Thus, the event detection module may detect the first or the second trigger event by checking the interrupt flag. Besides the event detection module 610 may be configured to detect the second trigger event after a predetermined time period since the first trigger event is detected.
In the register of High/Low Voltage Detect of the control unit of the automation device, particularly in the register bit of VDIRMAG, a voltage changing direction setting may be stored and used for controlling the event detection module 610 to detect the first trigger event and the second trigger event. The voltage changing direction setting has an initial value indicating the voltage increasing direction and will be changed if either the first trigger event or the second trigger event is detected.
In the above, the apparatus 600 as provided in embodiments of the present disclosure has been described in brief with reference to Fig. 6. However, it  may be also appreciated that the apparatus 600 and the modules as contained therein will perform similar operations as described hereinbefore with regarding to the method. Accordingly, for details about these operations, reference may be made to the description about the method with reference to Figs. 1 to 5.
Besides, specific embodiments of the present disclosure are described with reference to the accompanying drawings; however, they are presented only for illustration purposes and the present disclosure is not limited thereto. As an example, the value of the power state or the power flag is used to denote the detection result of the first and the second trigger events; however, in practice, it can be omitted. For example, if the first trigger event and the second trigger event with the voltage decreasing direction are detected successively, these events are considered as the voltage fluctuation event and the operation does not change and be kept as it is; when one of the first trigger event and the second trigger is detected in the control cycle, the operation mode may be determined as the configuration mode; if no event is detected, the operation mode will be determined as the control mode if the current voltage changing direction is the voltage decreasing direction and determined as the configuration mode if the current voltage changing direction is the voltage increasing direction. In addition, although the first trigger event is described to perform in response to the detection of the second trigger event, it is also possible to detect the two trigger event concurrently. Although the description is made with reference to the HLVD control register of the MCU, it is also possible to use other similar mechanism or implement the solution without using the HLVD control register. Besides, it is also possible to use a trip area with a lower limit and a higher limit to indicate the switching between the voltage for the configuration mode and the voltage for the control mode, instead of a single trip point. Furthermore, the control cycle is also not limited to 250ms but could be other time interval.
The skilled in the art can also appreciate that the solution as provided herein may take the form of a hardware embodiment, a software embodiment (including firmware, resident software, micro-code, etc. ) or an embodiment combining software and hardware aspects. That is to say, the event detection and the operation mode configuration herein can be implemented by electronic elements or devices, software stored in storage device, or the combination of electronic devices and the software, for  example by micro-processors, digital signal processor, simple chip machine, and suitable programs etc.
Hereinabove, embodiments of the present disclosure have been described in details through embodiments with reference to the accompanying drawings. It should be appreciated that, while this specification contains many specific implementation details, these details should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a sub-combination.
Various modifications, adaptations to the foregoing exemplary embodiments of this disclosure may become apparent to those skilled in the relevant arts in view of the foregoing description, when read in conjunction with the accompanying drawings. Any and all modifications will still fall within the scope of the non-limiting and exemplary embodiments of this disclosure. Furthermore, other embodiments of the disclosures set forth herein will come to mind to one skilled in the art to which these embodiments of the disclosure pertain having the benefit of the teachings presented in the foregoing descriptions and the associated drawings.
Therefore, it is to be understood that the embodiments of the disclosure are not to be limited to the specific embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the appended claims. Although specific terms are used herein, they are used in a generic and descriptive sense only and not for purposes of limitation.

Claims (16)

  1. A method (200) of configuring an operation mode of an automation device, comprising:
    detecting (201) , within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device, wherein each of the first trigger event and the second trigger event denotes switching of the supply voltage of the automation device between a first voltage (101) for a configuration mode and a second voltage (102) for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction, while the second trigger event has a voltage changing direction different from the first trigger event; and
    configuring (202) the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
  2. The method (200) of Claim 1, wherein the detection results of the first trigger event and the second trigger event are denoted by a value of a power state, wherein the method further comprises setting the value of the power state in response to detection of the first trigger event or the second trigger event, and wherein the power state has a first value for the voltage increasing direction and a second value for the voltage decreasing direction.
  3. The method (200) of Claim 2, wherein the configuring (202) the operation mode of the automation device comprises:
    determining the operation mode of the automation device as the control mode only if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the first value.
  4. The method (200) of Claim 2 or 3, wherein the configuring (202) the operation mode of the automation device comprises:
    determining the operation mode of the automation device as the configuration mode if either of the value of the power state at the start of the control cycle and the  value of the power state at the end of the control cycle is the second value.
  5. The method (200) of any of Claims 1 to 4, wherein the switching of the supply voltage of the automation device between the first voltage (101) for the configuration mode and the second voltage (102) for the control mode is denoted by an event that the supply voltage crosses a predetermined trip point which is between the first voltage (101) and the second voltage (102) .
  6. The method (200) of Claim 5, wherein the predetermined trip point is between 4.11V and 4.55V and is stored in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device.
  7. The method (200) of any of Claims 1 to 6, wherein the detecting the second trigger event is performed after a predetermined time period since the first trigger event is detected.
  8. The method (200) of Claim 7, wherein a voltage changing direction setting stored in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device is used for controlling the detecting of the first trigger event and the second trigger event, and wherein the voltage changing direction setting has an initial value indicating the voltage increasing direction and is changed if either the first trigger event or the second trigger event is detected.
  9. An apparatus (600) of configuring an operation mode of an automation device, comprising:
    an event detection module (610) configured to detect, within a control cycle, a first trigger event and a second trigger event of a supply voltage of the automation device, wherein each of the first trigger event and the second trigger event denotes switching of the supply voltage of the automation device between a first voltage for a configuration mode and a second voltage for a control mode, the first trigger event has a voltage increasing direction or a voltage decreasing direction, while the second trigger event has a voltage changing direction different from the first trigger event; and
    a mode configuration module (620) , configured to configure the operation mode of the automation device based on detection results of the first trigger event and the second trigger event at the end of the control cycle.
  10. The apparatus (600) of Claim 9, wherein the detection results of the first trigger event and the second trigger event are denoted by a value of a power state, wherein the apparatus further comprises an event processing module (630) , configured to set the value of the power state in response to detection of the first trigger event or the second trigger event, and wherein the power state has a first value for the voltage increasing direction and has a second value for the voltage decreasing direction.
  11. The apparatus (600) of Claim 10, wherein the mode configuration module (620) is configured to:
    determine the operation mode of the automation device as the control mode if the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle are both the first value.
  12. The apparatus (600) of Claim 10 or 11, wherein the mode configuration module is (620) configured to:
    determine the operation mode of the automation device as the configuration mode if either of the value of the power state at the start of the control cycle and the value of the power state at the end of the control cycle is the second value.
  13. The apparatus (600) of any of Claim 9 to 12, wherein the switching of the supply voltage of the automation device between the first voltage (101) for the configuration mode and the second voltage (102) for the control mode is denoted by an event that the supply voltage crosses a predetermined trip point which is between the first voltage (101) and the second voltage (102) .
  14. The apparatus (600) of Claim 13, wherein the predetermined trip point is between 4.11V and 4.55V and is stored in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device.
  15. The apparatus (600) of any of Claims 9 to 14, wherein the event detection module (620) is configured to detect the second trigger event after a predetermined time period since the first trigger event is detected.
  16. The apparatus (600) of Claim 15, wherein a voltage changing direction setting stored in a High/Low Voltage Detect (HLVD) control register of a control unit of the automation device is used for controlling the event detection module (610) to detect the first trigger event and the second trigger event, and wherein the voltage changing direction setting has an initial value indicating the voltage increasing direction and is changed if either the first trigger event or the second trigger event is detected.
PCT/CN2015/081086 2015-06-09 2015-06-09 Method and apparatus of configuring an operation mode of an automation device WO2016197329A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/081086 WO2016197329A1 (en) 2015-06-09 2015-06-09 Method and apparatus of configuring an operation mode of an automation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/081086 WO2016197329A1 (en) 2015-06-09 2015-06-09 Method and apparatus of configuring an operation mode of an automation device

Publications (1)

Publication Number Publication Date
WO2016197329A1 true WO2016197329A1 (en) 2016-12-15

Family

ID=57504438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081086 WO2016197329A1 (en) 2015-06-09 2015-06-09 Method and apparatus of configuring an operation mode of an automation device

Country Status (1)

Country Link
WO (1) WO2016197329A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1458591A (en) * 2002-05-13 2003-11-26 义隆电子股份有限公司 USB/PS2 interface automatic identification device and method
CN102642472A (en) * 2011-02-17 2012-08-22 上海航鼎电子科技发展有限公司 Method and device for power management and deadlock protective control of vehicle-mounted positioning and tracking equipment
CN102650963A (en) * 2011-02-24 2012-08-29 鸿富锦精密工业(深圳)有限公司 Computer startup and shutdown testing device
CN102693753A (en) * 2011-03-22 2012-09-26 台湾积体电路制造股份有限公司 Sense amplifier
CN104216737A (en) * 2014-08-15 2014-12-17 英业达科技有限公司 Reset system of microcontroller and reset method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1458591A (en) * 2002-05-13 2003-11-26 义隆电子股份有限公司 USB/PS2 interface automatic identification device and method
CN102642472A (en) * 2011-02-17 2012-08-22 上海航鼎电子科技发展有限公司 Method and device for power management and deadlock protective control of vehicle-mounted positioning and tracking equipment
CN102650963A (en) * 2011-02-24 2012-08-29 鸿富锦精密工业(深圳)有限公司 Computer startup and shutdown testing device
CN102693753A (en) * 2011-03-22 2012-09-26 台湾积体电路制造股份有限公司 Sense amplifier
CN104216737A (en) * 2014-08-15 2014-12-17 英业达科技有限公司 Reset system of microcontroller and reset method thereof

Similar Documents

Publication Publication Date Title
JP5363437B2 (en) Test equipment
US10157115B2 (en) Detection system and method for baseboard management controller
US9595895B2 (en) Motor control system and method for protecting inrush resistor
US9135193B2 (en) Expander interrupt processing
US10747287B2 (en) Backup power supply based configuration data application
US8782444B2 (en) Circuit protection system and method for a circuit utilizing chip type power supply
JP2012226569A (en) Data protection device for storage device
US9722414B2 (en) Power distribution and information handling
CN106201797A (en) The method that fatigue tester collocation 4U tool realizes multinode AC test
WO2022188398A1 (en) Method and apparatus for controlling air conditioner, and air conditioner
TW201336194A (en) Electronic device and power-fail protection apparatus and method used in the electronic device
US20160156170A1 (en) Server with power source protection system and power source protection method
WO2016197329A1 (en) Method and apparatus of configuring an operation mode of an automation device
CN105529981B (en) The method for controlling frequency converter
TWI547060B (en) Power system, and non-transitory machine-readable storage medium and method related to said power system
US8826056B2 (en) Circuit protection system and method
US9490624B2 (en) Circuit for voltage detection and protection and operating method thereof
CA2896590C (en) Automatic input impedance control
EP2658105A2 (en) Power supply built-in testing
JP6738700B2 (en) Drive circuit, control device, and drive circuit protection method
JP2016086511A (en) Switching element drive device
WO2021169476A1 (en) Server expansion system, and power control method for same
JP2019105922A5 (en)
TWM544730U (en) Power source device with protection mechanism
US20140351620A1 (en) Power supply detecting system and detecting method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15894599

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15894599

Country of ref document: EP

Kind code of ref document: A1