Relay control method, relay control module and functional safety circuit

文档序号:51080 发布日期:2021-09-28 浏览:18次 中文

阅读说明:本技术 继电器控制方法、继电器控制模块及功能安全电路 (Relay control method, relay control module and functional safety circuit ) 是由 陈小全 周婷 李兴磊 于 2020-03-24 设计创作,主要内容包括:本发明提供一种继电器控制方法、继电器控制模块及功能安全电路,包括:继电器输出状态为开时,各继电器闭合,其中,各继电器分别被设置为各继电器输出状态为开时对应的最后一个闭合的继电器;继电器输出状态为关时,各继电器断开,其中,各继电器分别被设置为各继电器输出状态为关时对应的第一个断开的继电器。本发明的继电器控制方法、继电器控制模块及功能安全电路对各继电器接通和断开的顺序进行编制,使得各继电器依次最后一个闭合和第一个断开,进而对切断回路和接通回路时产生的电弧进行平摊,使得各继电器的寿命平均化,以此确保整个功能安全电路的使用寿命。(The invention provides a relay control method, a relay control module and a functional safety circuit, which comprises the following steps: when the output state of the relay is on, each relay is closed, wherein each relay is set as the last closed relay corresponding to the output state of each relay when the output state of each relay is on; and when the output state of the relay is off, each relay is switched off, wherein each relay is set as the first switched-off relay corresponding to the output state of each relay when the output state of each relay is off. The relay control method, the relay control module and the functional safety circuit compile the turn-on and turn-off sequence of the relays, so that the relays are sequentially turned on and off in the last way, and further, the electric arcs generated when the circuit is cut off and turned on are leveled, the service life of the relays is averaged, and the service life of the whole functional safety circuit is ensured.)

1. A relay control method is applied to control of n relays connected in series, and is characterized by at least comprising the following steps:

when the output state of the relay is on, each relay is closed, wherein each relay is set as the last closed relay corresponding to the output state of each relay when the output state of each relay is on;

when the output state of the relay is off, each relay is disconnected, wherein each relay is set as a first disconnected relay corresponding to the output state of each relay when the output state of each relay is off;

wherein n is a natural number of 2 or more.

2. The relay control method according to claim 1, characterized in that: the relay control method further includes:

when the output state of the next relay is on, detecting the current output state of the relay, and if the current output state of the relay is on, keeping the control signal of each relay unchanged; if the current relay output state is off, controlling (n-1) relays to be closed, closing the last relay after delaying a first time period, and setting the last closed relay as another relay when the next relay output state is on so that all relays are sequentially closed at the last relay;

when the output state of the next relay is off, detecting the current output state of the relay, and if the current output state of the relay is off, keeping the control signal of each relay unchanged; and if the current relay output state is on, controlling the first relay to be switched off, delaying the second time period, then switching off the rest (n-1) relays, and setting the first switched-off relay as another relay when the next relay output state is off so that the relays are sequentially switched off at the first time.

3. The relay control method according to claim 2, characterized in that: the first time period and the second time period are respectively longer than the response time of the relay.

4. The relay control method according to any one of claims 1 to 3, characterized in that: the relays are sequentially cycled to be closed at the last or to be opened at the first according to the series sequence.

5. The relay control method according to any one of claims 1 to 3, characterized in that: setting a first relay control array ON _ end [ n ] and a second relay control array OFF _ first [ n ]; the first relay control array ON _ end [ n ] comprises n control values which correspond to the relays one to one so as to determine the last closed relay; the second relay control array OFF _ first [ n ] includes n control values in one-to-one correspondence with each relay to determine the first open relay.

6. A relay control module, characterized in that the relay control module comprises at least:

at least two relays connected in series in sequence and a relay controller;

the relay controller is respectively connected with the control ends of the relays and is used for controlling the on-off of the relays, and when each output state is on, the relays are sequentially set to be the last on-off, and when each output state is off, the relays are sequentially set to be the first off-off.

7. The relay control method according to claim 6, characterized in that: the relay controller includes: a detection unit and a logic control unit; the detection unit is connected with the output end of the relay connected in series and is used for detecting the output state of the relay; the logic control unit is connected with the output end of the detection unit and controls the switching sequence of the relay based on the detection result output by the detection unit.

8. A functional safety circuit, characterized in that it comprises at least: the relay control module of claim 6 or 7.

Technical Field

The invention relates to the field of functional safety, in particular to a relay control method, a relay control module and a functional safety circuit.

Background

The design of the functional safety circuit needs to be designed according to international standard IEC 61508 (corresponding to national standard GBT20438), the functional safety circuit needs to reach a corresponding Safety Integrity Level (SIL), and the functional safety circuit can be designed according to circuit structure constraints and methods provided by the standard, and a common mode generally adopts multi-channel redundancy to reach the corresponding safety integrity level.

If the output is output by a relay, due to the particularity of the relay, electric arcs can be generated when the circuit is cut off and closed, so that the reliability of the relay is reduced, and the service life of the relay is shortened. In functional safety applications, such as safety relay applications, a plurality of relays are often connected in series on an output circuit to ensure the safety performance of the circuit, and if the output is not processed by a method, the service life of a relay is only the service life of one relay. For example, for a safety relay output loop, which is formed by connecting 3 relays in series, from the point of view of probability, if control is not processed, the probability that three relays ABC are opened or closed at the first time is the same, but if the control is applied to a single target product, at the moment of opening or closing, one of the three relays ABC is always the same, that is, when the loop is cut off and the loop is closed, arcs will accumulate on 1 or 2 relays (1 when the loop is closed, 1 when the loop is cut off, and possibly the loop is also closed, and the cut-off is all sent to 1), which results in that the life of the safety relay is only the life of one relay.

Therefore, how to increase the service life of the relay in the functional safety circuit becomes one of the problems to be solved urgently by those skilled in the art.

Disclosure of Invention

In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a relay control method, a relay control module and a functional safety circuit, which are used to solve the problem of short service life of the relay in the prior art.

In order to achieve the above and other related objects, the present invention provides a relay control method for controlling n relays connected in series, the relay control method at least comprising:

when the output state of the relay is on, each relay is closed, wherein each relay is set as the last closed relay corresponding to the output state of each relay when the output state of each relay is on;

when the output state of the relay is off, each relay is disconnected, wherein each relay is set as a first disconnected relay corresponding to the output state of each relay when the output state of each relay is off;

wherein n is a natural number of 2 or more.

Preferably, the relay control method further includes:

when the output state of the next relay is on, detecting the current output state of the relay, and if the current output state of the relay is on, keeping the control signal of each relay unchanged; if the current relay output state is off, controlling (n-1) relays to be closed, closing the last relay after delaying a first time period, and setting the last closed relay as another relay when the next relay output state is on so that all relays are sequentially closed at the last relay;

when the output state of the next relay is off, detecting the current output state of the relay, and if the current output state of the relay is off, keeping the control signal of each relay unchanged; and if the current relay output state is on, controlling the first relay to be switched off, delaying the second time period, then switching off the rest (n-1) relays, and setting the first switched-off relay as another relay when the next relay output state is off so that the relays are sequentially switched off at the first time.

More preferably, the first time period and the second time period are respectively greater than the response time of the relay.

More preferably, the relays cycle sequentially in series order, being closed at the last or open at the first.

More preferably, a first relay control array ON _ end [ n ] and a second relay control array OFF _ first [ n ] are provided; the first relay control array ON _ end [ n ] comprises n control values which correspond to the relays one to one so as to determine the last closed relay; the second relay control array OFF _ first [ n ] includes n control values in one-to-one correspondence with each relay to determine the first open relay.

To achieve the above and other related objects, the present invention provides a relay control module, comprising:

at least two relays connected in series in sequence and a relay controller;

the relay controller is respectively connected with the control ends of the relays and is used for controlling the on-off of the relays, and when each output state is on, the relays are sequentially set to be the last on-off, and when each output state is off, the relays are sequentially set to be the first off-off.

Optionally, the relay controller comprises: a detection unit and a logic control unit; the detection unit is connected with the output end of the relay connected in series and is used for detecting the output state of the relay; the logic control unit is connected with the output end of the detection unit and controls the switching sequence of the relay based on the detection result output by the detection unit.

To achieve the above and other related objects, the present invention further provides a functional safety circuit, which at least includes the relay control module.

As described above, the relay control method, the relay control module and the functional safety circuit according to the present invention have the following advantages:

the relay control method, the relay control module and the functional safety circuit compile the turn-on and turn-off sequence of the relays, so that the relays are sequentially turned on and off in the last way, and further, the electric arcs generated when the circuit is cut off and turned on are leveled, the service life of the relays is averaged, and the service life of the whole functional safety circuit is ensured.

Drawings

Fig. 1 is a schematic diagram of a relay according to the present invention.

Fig. 2 is a schematic flow chart of a relay control method according to the present invention.

Fig. 3 is a schematic diagram of a relay control module according to the present invention.

Description of the element reference numerals

1 Relay controller

11 detection unit

12 logic control unit

Detailed Description

The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.

Please refer to fig. 1 to 3. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.

Example one

As shown in fig. 1 to 2, the present embodiment provides a relay control method, which is applied to control n relays connected in series, and the relay control method includes:

when the output state of the relay is on, each relay is closed, wherein each relay is set as the last closed relay corresponding to the output state of each relay when the output state of each relay is on;

and when the output state of the relay is off, each relay is switched off, wherein each relay is set as the first switched-off relay corresponding to the output state of each relay when the output state of each relay is off.

Specifically, as shown in fig. 1, the present embodiment takes 4 relays as an example, namely a first relay S1, a second relay S2, a third relay S3 and a fourth relay S4, which are connected in series in sequence; in practical use, the number n of the relays is not less than 2, namely n is a natural number greater than or equal to 2.

Specifically, as shown in fig. 2, a first relay control array ON _ end [ n ] and a second relay control array OFF _ first [ n ] are provided, and the number of control values included in the arrays is consistent with the number n of relays; in this embodiment, the first relay control array ON _ end [ n ] is ON _ end [4], and the second relay control array OFF _ first [ n ] is OFF _ first [4 ]. The first relay control array ON _ end [4] includes 4 control values corresponding to the relays one to one, in this embodiment, the initial value of the first relay control array ON _ end [4] is [1, 0, 0, 0], where 1 represents that the corresponding relay is last closed, and 0 represents that the corresponding relay is not last closed, that is, in the initial stage, the first relay S1 is last closed; the second relay control array OFF _ first [4] includes 4 control values corresponding to the relays one to one, and in this embodiment, the initial value of the second relay control array OFF _ first [4] is [0, 1, 0, 0], 1 indicates that the corresponding relay is first opened, 0 indicates that the corresponding relay is not first opened, that is, in the initial stage, the second relay S2 is first opened.

It should be noted that, in this embodiment, the initial values of the first relay control array ON _ end [4] and the second relay control array OFF _ first [4] are set as [1, 0, 0, 0] and [0, 1, 0, 0] respectively, and in actual use, the relay corresponding to the control value 1 may be any one, and there is no relationship between the two and no limitation. In this embodiment, the value 1 is used as the valid signal, and other values or identifiers may be used for representation in actual use, which is not limited to this embodiment.

Specifically, when the next relay output state is on, the current relay output state is detected.

More specifically, if the current relay output state is ON, the current relay control state is maintained, the control signals of the relays are unchanged, and the first relay control array ON _ end [ n ] is maintained unchanged.

More specifically, if the current relay output state is off, (n-1) relays having a control value corresponding to 0 are closed based ON the first relay control array ON _ end [ n ], in this embodiment, the second relay S2, the third relay S3 and the fourth relay S4 are closed, and the closing sequence may be sequentially, one by one or simultaneously, which is not limited herein. And closing the last relay (namely the first relay S1) based ON the first relay control array ON _ end [ n ] after the time delay of the first time period. Subsequently, updating the first relay control array ON _ end [ n ], and setting the last closed relay as another relay when the output state of the next relay is ON, in this embodiment, the relays are sequentially closed in the last in a serial sequence, the updated first relay control array ON _ end [4] is [0, 1, 0, 0], that is, the last second relay S2 is closed when the output state of the second relay is ON, and so ON, the first relay control array ON _ end [4] is [0, 0, 1, 0] when the output state of the third relay is ON, and the last third relay S3 is closed; when the output state of the fourth relay is ON, the first relay control array ON _ end [4] is [0, 0, 0, 1], and the last relay of the fourth relay S4 is closed; when the output state of the fifth relay is ON, the first relay control array ON _ end [4] is [1, 0, 0, 0], and the first relay S1 is closed … … for the last time; therefore, the corresponding last closed relay is changed when the output state of each relay is on, the distribution probability is the same, electric arcs generated when a loop is switched on can be shared on each relay, the service life of each relay can be greatly prolonged, and the service life of the safety relay is further prolonged.

It should be noted that, when the first relay control array ON _ end [ n ] is updated, the relay positions corresponding to the value 1 may be transmitted one by one, may also be transmitted in a jumping manner, may also be transmitted in an unordered manner, and the transmission direction is not limited; in actual use, the transmission sequence may be set as required so that the relays are sequentially closed at the last in a certain sequence, which is not limited to this embodiment.

It should be noted that, in this embodiment, the first time period is greater than the response time of the relay.

Specifically, when the next relay output state is off, the current relay output state is detected.

More specifically, if the current relay output state is OFF, the current relay control state is maintained, the control signals of the relays are not changed, and the second relay control array OFF _ first [ n ] is maintained.

More specifically, if the current relay output state is on, 1 relay in which the control value corresponds to 1 is turned OFF based on the second relay control array OFF _ first [ n ], and in this embodiment, the second relay S2 is turned OFF first. After the time delay of the second time period, the (n-1) relays, of which the control values correspond to 0, are turned OFF based on the second relay control array OFF _ first [ n ], in this embodiment, the first relay S1, the third relay S3 and the fourth relay S4 are turned OFF, and the turn-OFF sequence may be sequentially, one by one or simultaneously, which is not limited herein. Subsequently, updating the second relay control array OFF _ first [ n ], and setting the relay which is firstly disconnected when the output state of the next relay is OFF as another relay, in the embodiment, the relays are sequentially and circularly disconnected at the first time according to the series sequence, the updated second relay control array OFF _ first [4] is [0, 0, 1, 0], that is, the third relay S3 is firstly disconnected when the output state of the second relay is OFF, and so on, the second relay control array OFF _ first [4] is [0, 0, 0, 1] when the output state of the fourth relay is OFF, and the fourth relay S4 is firstly disconnected; when the fourth relay output state is OFF, the second relay control array OFF _ first [4] is [1, 0, 0, 0], and the first relay S1 is firstly switched OFF; when the output state of the fifth relay is OFF, the second relay control array OFF _ first [4] is [0, 1, 0, 0], and the second relay S2 is firstly disconnected … …; therefore, the relays corresponding to the first disconnection are changed when the output state of each relay is off, the distribution probability is the same, electric arcs generated when the loop is cut off can be shared on each relay, the service life of each relay can be greatly prolonged, and the service life of the safety relay is prolonged.

It should be noted that, when the second relay control array OFF _ first [ n ] is updated, the relay positions corresponding to the value 1 may be transmitted one by one, may also be transmitted in a jump manner, may also be transmitted in an unordered manner, and the transmission direction is not limited; in actual use, the transmission sequence may be set as required so that the relays are sequentially turned off first according to a certain sequence, which is not limited to this embodiment.

It should be noted that, in this embodiment, the second time period is greater than the response time of the relay, and the second time period may be the same as or different from the first time period.

Example two

As shown in fig. 3, the present embodiment provides a relay control module, which at least includes:

at least two relays connected in series in turn, and a relay controller 1.

As shown in fig. 3, the relays are connected in series in order to ensure the safety of the circuit.

Specifically, in the present embodiment, the number of relays is set to 4, respectively, the first relay S1, the second relay S2, the third relay S3, and the fourth relay S4.

As shown in fig. 3, the relay controller 1 is connected to the control terminals of the relays, and is configured to control the switches of the relays, and set the relays to be closed last when the output state is on, and set the relays to be opened first when the output state is off.

Specifically, in the present embodiment, the relay controller 1 includes a detection unit 11 and a logic control unit 12. The detection unit 11 is connected with the output ends of the relays connected in series and detects the output state of the relays. The logic control unit 12 is connected to the output end of the detection unit 11, and controls the switching sequence of the relay based on the detection result output by the detection unit 11, and the specific principle is as in the first embodiment, which is not repeated herein.

EXAMPLE III

This embodiment provides a functional safety circuit, functional safety circuit includes the relay control module of embodiment two at least, and each relay is as functional safety circuit's relay output, and other structures are not repeated here one by one, from this when promoting the relay life-span, can promote functional safety circuit's life.

In summary, the present invention provides a relay control method, a relay control module and a functional safety circuit, including: when the output state of the relay is on, each relay is closed, wherein each relay is set as the last closed relay corresponding to the output state of each relay when the output state of each relay is on; and when the output state of the relay is off, each relay is switched off, wherein each relay is set as the first switched-off relay corresponding to the output state of each relay when the output state of each relay is off. The relay control method, the relay control module and the functional safety circuit compile the turn-on and turn-off sequence of the relays, so that the relays are sequentially turned on and off in the last way, and further, the electric arcs generated when the circuit is cut off and turned on are leveled, the service life of the relays is averaged, and the service life of the whole functional safety circuit is ensured. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.

The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于过零检测的电压抑制装置、方法以及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!