A relay control method, device and relay drive system

Through the dual CPU controller and signal comparison circuit, the accuracy of the relay driving signal is ensured, and the safety and reliability of the relay driving system is solved, reducing the risk of malfunction in railway signal control.

CN112038175BActive Publication Date: 2025-08-01BEIJING RAILWAY SIGNAL
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010928846.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-07
Publication Date
2025-08-01
Estimated Expiration
2040-09-07

AI Technical Summary

Technical Problem

In the prior art, the accuracy and safety of the relay drive system are low, and are susceptible to signal interference and lead to erroneous actions, which poses safety hazards, especially in railway signal control, which may lead to serious accidents.

Method used

A dual CPU controller is used to generate driving signals of different frequencies, and the signal comparison and frequency upscaling process is performed through the comparison circuit to ensure the accuracy of the driving signal, and the error status is displayed through the alarm monitoring circuit, and the accurate operation of the relay is controlled by the driving circuit and the display circuit.

Benefits of technology

It improves the accuracy of the relay driving signal and the safety of the system, reduces malfunctions, and ensures the reliability and stability of railway signal control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112038175B_ABST
    Figure CN112038175B_ABST
Patent Text Reader

Abstract

A relay control method, device and relay drive system provided by the present application obtain a first drive signal and a second drive signal, where the frequency of the first drive signal is twice that of the second drive signal; perform an up-frequency processing on the second drive signal to obtain an up-frequency processed second drive signal, so that the frequency of the up-frequency processed second drive signal is twice that of the second drive signal; compare the first drive signal with the up-frequency processed second drive signal; if the first drive signal is consistent with the up-frequency processed second drive signal, then drive the relay jointly by the first drive signal and the second drive signal to control the relay to act. The present application uses two controllers to drive the relay and has two drive signals for comparison, which can greatly improve the accuracy of the relay drive signal, thereby ensuring the safety and stability of the relay drive system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of relay control, and particularly relates to a relay control method, device, and relay drive system. Background Art

[0002] At present, the rail transit industry is developing rapidly. In today's social life, high-speed rail has become the preferred means of transportation for people to travel. It has the advantages of fast transportation speed, good safety performance, high comfort, low energy consumption, and convenience. Therefore, it is crucial to ensure the high efficiency and safety of high-speed rail operation.

[0003] An axle counter is a railway signal device that can detect the passing of wheels. It uses track sensors and counters to record and compare the number of axles entering and leaving a track section, so as to determine the occupancy and vacancy of the track section, that is, a technical equipment railway product used to calculate the number of axles of a vehicle entering and leaving a section, and then analyze and calculate whether there is a vehicle occupying the section. The core of the safety problem of axle counter products lies in the output of the relay. The relay being pulled up represents that the section is vacant, and the relay being dropped represents that a vehicle has passed through the section. Therefore, in railway products, it is necessary to ensure the accuracy of the relay output. Otherwise, it is very easy to have a collision accident, seriously threatening the lives of passengers and drivers, and the consequences are unimaginable.

[0004] Therefore, in the process of researching and developing axle counter equipment in the railway field, aiming at controlling the external output with a relay, how to ensure the accuracy of the relay output and improve the safety and reliability of the drive system are problems that need to be solved urgently by those skilled in the art. Summary of the Invention

[0005] This application provides a relay control method, device, and relay drive system, and its purpose is to: how to ensure the accuracy of the relay output and improve the safety and reliability of the drive system.

[0006] To achieve the above purpose, this application provides the following technical solutions:

[0007] A relay control method, applied to an axle counter device, controls the pulling up or dropping of a relay. The method includes:

[0008] Obtain a first drive signal and a second drive signal, where the frequency of the first drive signal is twice that of the second drive signal;

[0009] Perform up-frequency processing on the second drive signal to obtain an up-frequency processed second drive signal, so that the frequency of the up-frequency processed second drive signal is twice that of the second drive signal;

[0010] Compare the first drive signal with the up-frequency processed second drive signal;

[0011] If the first driving signal is the same as the frequency - up - converted second driving signal, the relay is driven by the first driving signal and the second driving signal together to control the operation of the relay.

[0012] Preferably, it further includes:

[0013] If the first driving signal is not the same as the frequency - up - converted second driving signal, a control signal is output, and the control signal is used to control the output of an alarm state.

[0014] Preferably, when obtaining the first driving signal and the second driving signal, it further includes:

[0015] Controlling the conduction timing of the first driving signal and the second driving signal to ensure the accuracy of the driving timing of the first driving signal and the second driving signal.

[0016] Preferably, it further includes:

[0017] During the conduction timing, when driving the relay by operating in multiple cycles, the first driving signal and the second driving signal are synchronized once according to a preset period;

[0018] Judge whether the cycle counter and the driving counter are full;

[0019] If the count is full, control the cycle counter and the driving counter to be cleared to ensure the accuracy of the operation of the relay.

[0020] A relay control device is applied to axle - counting equipment to control the pick - up or drop - down of a relay. The device includes:

[0021] A first processing unit for obtaining a first driving signal and a second driving signal, where the frequency of the first driving signal is twice that of the second driving signal;

[0022] A second processing unit for performing frequency - up conversion processing on the second driving signal to obtain a frequency - up - converted second driving signal, so that the frequency of the frequency - up - converted second driving signal is twice that of the second driving signal;

[0023] A third processing unit for comparing the first driving signal and the frequency - up - converted second driving signal;

[0024] A fourth processing unit for, if the first driving signal is the same as the frequency - up - converted second driving signal, driving the relay by the first driving signal and the second driving signal together to control the operation of the relay.

[0025] Preferably, the fourth processing unit is specifically further used for:

[0026] If the first driving signal and the frequency-upconverted second driving signal are inconsistent, a control signal is output, and the control signal is used to control the alarm monitoring module to display an alarm state.

[0027] Preferably, when obtaining the first driving signal and the second driving signal, it further includes:

[0028] Controlling the conduction timings of the first driving signal and the second driving signal to ensure the accuracy of the driving timings of the first driving signal and the second driving signal.

[0029] Preferably, it further includes: a fifth processing unit; specifically, the fifth processing unit is configured to:

[0030] During the conduction timings, when operating in multiple cycles and driving the relay, the first driving signal and the second driving signal are synchronized once according to a preset cycle;

[0031] Judge whether the cycle counter and the driving counter are full;

[0032] If the counting is full, control the cycle counter and the driving counter to be cleared to ensure the accuracy of the relay operation.

[0033] A relay driving system includes: a first controller, a second controller, a comparison circuit, a driving circuit, an alarm monitoring circuit, and a display circuit, wherein:

[0034] The first controller is configured to output a first control signal, the second controller is configured to output a second control signal, and the frequency of the first driving signal is twice that of the second driving signal;

[0035] The output ends of the first controller and the second controller are connected to the input of the comparison circuit. The comparison circuit is configured to perform frequency upconversion processing on the second control signal to obtain a frequency-upconverted second driving signal, so that the frequency of the frequency-upconverted second driving signal is twice that of the second driving signal; and compare the first driving signal with the frequency-upconverted second driving signal;

[0036] The first output end of the comparison circuit is connected to the input end of the alarm monitoring circuit, and the output end of the alarm monitoring circuit is connected to the display circuit. The alarm monitoring circuit is configured to output a control signal when the first driving signal and the frequency-upconverted second driving signal are inconsistent, and the control signal is used to control the display circuit to output an alarm state;

[0037] The second output terminal and the third output terminal of the comparison circuit are connected to the drive circuit, and the drive circuit is used to make the first drive signal consistent with the frequency-upconverted second drive signal, and then the relay is driven jointly by the first drive signal and the second drive signal to control the relay to actuate.

[0038] An electronic device, comprising:

[0039] a processor; and

[0040] a memory, on which executable code is stored, and when the executable code is executed by the processor, the processor is caused to execute the relay control method as described above.

[0041] Compared with the traditional technology, for the relay control method, device and relay drive system described in this application, by obtaining a first drive signal and a second drive signal, the frequency of the first drive signal is twice that of the second drive signal; the second drive signal is frequency-upconverted to obtain a frequency-upconverted second drive signal, so that the frequency of the frequency-upconverted second drive signal is twice that of the second drive signal; the first drive signal and the frequency-upconverted second drive signal are compared; if the first drive signal is consistent with the frequency-upconverted second drive signal, the relay is driven jointly by the first drive signal and the second drive signal to control the relay to actuate. This application uses two controllers to drive the relay and compares two drive signals, which can greatly improve the accuracy of the relay drive signal, thereby ensuring the safety and stability of the relay drive system. Description of the Drawings

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0043] Figure 1 It is a schematic diagram of the overall structure of a relay drive system provided by an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of the flow of a relay control method provided by an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of a drive circuit provided by an embodiment of the present application;

[0046] Figure 4 It is a timing diagram of the conduction of drive signals provided by an embodiment of the present application;

[0047] Figure 5 Schematic structural diagram of a relay control device provided by an embodiment of the present application;

[0048] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific embodiments

[0049] In related technologies, there are many driving methods for relays. Among them, the commonly used ones include transistor (including NPN type and PNP type) driving, ULN2003 driving, optocoupler + transistor driving, and optocoupler + UNL2003 driving, etc. An optocoupler is short for an optoelectronic coupler or an optoelectronic isolator, which is a device that transmits electrical signals through light. When an electrical signal is applied to the input terminal, the light emitter emits light. After the light receiver receives the light, a photocurrent is generated and flows out from the output terminal, thus realizing the conversion of "electricity - light - electricity". The optocoupler is used to achieve safe electrical isolation between the output terminal and the input terminal, avoiding mutual interference between the input signal and the output signal. The common idea of these driving methods is: directly control the relay with a switch control signal. For example, the most common one is optocoupler + transistor driving, and its control principle is as follows: the optocoupler is controlled by a single external signal to conduct and turn off. Due to the characteristics of the large internal resistance of the optocoupler and its inability to directly drive the load, a driving transistor needs to be added after the optocoupler to drive the relay.

[0050] Controlling the relay with only one switch signal as described above has a relatively low safety performance for a single CPU control, and there is a problem that the relay may malfunction due to signal interference. If it is used in the field of railway signal control, the risk coefficient is extremely high, and catastrophic consequences may occur. In addition, the transistor in the driving circuit directly drives the relay, and the relay may suddenly actuate and be damaged due to voltage mutation in the driving circuit.

[0051] A relay control method, device and relay driving system provided by the present application are applied to axle counter equipment to control the pickup or drop of the relay, and its application scenario is as Figure 1 shown in the relay control system as Figure 1 shown. The relay control system includes: a first controller 10, a second controller 20, a comparison circuit 30, a driving circuit 40, an alarm monitoring circuit 50, and a display circuit 60. In the present application, different driving signals are generated according to the dual CPUs, and the conduction sequence of the optocoupler is controlled by the dual CPUs to drive the pickup and drop of the relay, ensuring the accuracy of the relay driving signal, and the synchronization period and counting period of the driving module are judged by software to ensure the accuracy of the driving timing.

[0052] The object of the present invention is: how to ensure the accuracy of the relay output and improve the safety and reliability of the driving system.

[0053] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0054] See Figure 2 As shown, it is a flowchart of a relay control method provided by an embodiment of the present application. The relay control method provided by the embodiment of the present application is applied to an axle counter device to control the pickup or drop of a relay. The method specifically includes the following steps:

[0055] S201: Obtain a first drive signal and a second drive signal, where the frequency of the first drive signal is twice that of the second drive signal.

[0056] As Figure 1 shown, the above-mentioned first drive signal is output by the first controller 10, and the above-mentioned second drive signal is output by the second controller 20. The relationship between these two drive signals is that the frequency of the first drive signal is twice that of the second drive signal. In the embodiment of the present application, the first controller and the second controller play a core control role in the relay control system. In a specific embodiment, they receive a drive command sent by the host computer, perform complex arithmetic operations and logical operations through themselves, and output a first square wave signal and a second square wave signal with a certain time sequence through the output pins, and the frequencies of the two differ by twice.

[0057] It should be noted that in the embodiment of the present application, the reason for using two controllers is that in the related art, the control of a relay by one controller has limitations. If the signal encounters interference during transmission, the control signal may be distorted, thereby affecting the accuracy of the drive signal. Once the drive signal is incorrect, the entire relay drive system will enter a fault state, seriously affecting the work efficiency. The present application uses two controllers to drive the relay, and compares the two drive signals, which can greatly improve the accuracy of the drive signal and ensure the safety and stability of the relay drive system.

[0058] S202: Perform up-frequency processing on the second drive signal to obtain an up-frequency second drive signal, so that the frequency of the up-frequency second drive signal is twice that of the second drive signal.

[0059] As Figure 1As shown in the figure, the comparison circuit 30 is used to determine the correctness of the first driving signal and the second driving signal. Since the frequencies of the two driving signals output from the first controller 10 and the second controller 20 differ by two times, it is necessary to first perform frequency up-conversion processing on the low-frequency signals in the first driving signal and the second driving signal to obtain the frequency-up-converted second driving signal, so that the frequency of the frequency-up-converted second driving signal is twice that of the second driving signal. It can be seen that after the frequency up-conversion processing, the frequency-up-converted second driving signal should be the same as the first driving signal.

[0060] It should be noted that in the embodiments of the present application, the idea of frequency up-conversion processing is as follows: By using a preset logic operation method, it is ensured that the frequency of the up-converted low-frequency signal is twice that of the original low-frequency signal, and the authenticity of the signal is ensured to be the same as that before frequency up-conversion. It should be further noted here that implementing the frequency up-conversion processing of the low-frequency signal through a preset logic operation method belongs to the prior art. For specific content, relevant materials can be referred to, and details will not be elaborated here.

[0061] S203: Compare the first driving signal with the frequency-up-converted second driving signal.

[0062] In the embodiments of the present application, the comparison between the above first driving signal and the frequency-up-converted second driving signal can be realized through a comparison circuit. The comparison circuit here includes a comparator and related control output circuits, and can realize the comparison of two or more data. The two inputs of the comparison circuit are PWM control signals, and the output is a digital signal. When the difference in input voltage increases or decreases and the positive and negative signs remain unchanged, its output remains constant. The embodiments of the present application use the comparison circuit to determine the accuracy of the driving signal sent by the controller.

[0063] S204: If the first driving signal is consistent with the frequency-up-converted second driving signal, the relay is driven by the first driving signal and the second driving signal together to control the relay to act.

[0064] It should be noted that the above relay is an electrical control device. It is an electrical appliance that causes a predetermined step change in the controlled quantity in the electrical output circuit when the change of the input quantity (excitation quantity) reaches the specified requirement. In fact, it is an "automatic switch" that uses a small current to control a large current operation.

[0065] S205: If the first driving signal is inconsistent with the frequency-up-converted second driving signal, a control signal is output, and the control signal is used to control the output of the alarm state.

[0066] Such as Figure 1As shown, the first drive signal and the frequency-upconverted second drive signal are compared in the comparison circuit 30. If the first drive signal is consistent with the frequency-upconverted second drive signal, the drive circuit 40 is controlled by the first drive signal and the second drive signal to drive the relay and control the relay to act. If the first drive signal is inconsistent with the frequency-upconverted second drive signal, the comparison circuit 30 outputs a control signal, and this control signal is used to control the alarm monitoring circuit 50 to output an alarm state, and the display circuit 60 displays the alarm state.

[0067] Furthermore, it should be noted that the above-mentioned alarm monitoring circuit 50 is composed of a controller, which is named the third controller here. The third controller communicates with the comparison circuit 30 through a serial port. If it is judged through the comparison circuit that the output results of the first controller and the second controller are inconsistent, the third controller identifies that the drive signal is incorrect through the information sent through the serial port, and drives the connected display circuit 60 to display the "alarm" state.

[0068] Furthermore, it should be noted that the display circuit 60 is used to display the "alarm" state to prompt the relevant staff that the relay drive state is incorrect. The display circuit 60 mainly transmits the signal to the screen for display by the LCD controller. It is driven by both hardware and software to complete. The LCD controller is integrated inside the controller. The software runs by the built-in LCD controller. The hardware part mainly establishes pin connections with the DMA circuit and the peripheral interface circuit of the controller. The software part mainly transmits the timing control signals required by the LCD on these circuits and pin lines, converts and decodes the image data into the data in the LCD data display format, and transmits it to the display circuit 60 via the data line, so that the LCD can display the text image of "alarm".

[0069] The relay control method provided by the embodiment of the present application obtains the first drive signal and the second drive signal, and the frequency of the first drive signal is twice that of the second drive signal; performs frequency-upconversion processing on the second drive signal to obtain the frequency-upconverted second drive signal, so that the frequency of the frequency-upconverted second drive signal is twice that of the second drive signal; compares the first drive signal and the frequency-upconverted second drive signal; if the first drive signal is consistent with the frequency-upconverted second drive signal, the relay is jointly driven by the first drive signal and the second drive signal to control the relay to act; if the first drive signal is inconsistent with the frequency-upconverted second drive signal, a control signal is output, and this control signal is used to control the output of the alarm state. The embodiment of the present application uses two controllers to drive the relay and compares two drive signals, which can greatly improve the accuracy of the relay drive signal, thereby ensuring the safety and stability of the relay drive system.

[0070] Further, on the basis of the above disclosure, in order to further ensure the accuracy of the relay operation, when obtaining the first driving signal and the second driving signal, the following steps are further included:

[0071] Control the conduction timings of the first driving signal and the second driving signal to ensure the accuracy of the driving timings of the first driving signal and the second driving signal.

[0072] The embodiment of the present application utilizes the conduction sequences of two controller optocouplers to further improve the accuracy of the relay driving signal, thereby further ensuring the safety and stability of the relay driving system.

[0073] Further, on the basis of the above disclosure, in order to further ensure the accuracy of the relay operation, the method further includes the following steps:

[0074] During the conduction timings, run in multiple cycles. When driving the relay, the first driving signal and the second driving signal are synchronized once according to a preset cycle;

[0075] Judge whether the cycle counter and the driving counter are full;

[0076] If the counting is full, control the cycle counter and the driving counter to be cleared to ensure the accuracy of the relay operation.

[0077] Here, the driving counter is a device for recording the number of driving signal pulses. It consists of a basic counting unit and some control gates. The counting unit is composed of a series of various flip-flops with the function of storing information. When the overflow condition is met, the driving counter is automatically cleared. The embodiment of the present application utilizes the driving counter to ensure the accuracy of the driving signal timings.

[0078] In the embodiment of the present application, it can be set that the first controller and the second controller are synchronized once every 5 cycles, and it is judged whether the cycle counter and the driving counter are full. If the counting is full, the cycle counter and the driving counter are cleared to ensure the accuracy of the relay operation. It should be noted that in the embodiment of the present application, the above driving circuit 40 is as Figure 3 shown in the circuit schematic diagram. According to the conduction timings of the driving signal 1 and the driving signal 2, control the charge and discharge times of the capacitor C1 and the capacitor C2, and then control the pickup and drop of the relay. The driving circuit is mainly divided into a hardware part and a software part. For the specific circuit design of the hardware part, see Figure 3 .

[0079] In the embodiment of the present application, as Figure 4As shown in the figure, taking a cycle T1 as an example, the working process of the drive circuit is briefly described as follows. During time t1, both drive signal 1 and drive signal 2 are at high level, K1 and K2 are disconnected, capacitor C1 is in a floating state, and capacitor C2 is in a discharging state because the voltage cannot change suddenly; during time t2, drive signal 1 is at low level, K1 is turned on, drive signal 2 is at high level, K2 is disconnected, at this time capacitor C1 is charged and capacitor C2 is discharged; during time t3, drive signal 1 is at high level, drive signal 2 is at low level, K1 is disconnected, K2 is turned on, and capacitor C1 charges C2; during time t4, both drive signal 1 and drive signal 2 are at low level, K1 and K2 are turned on simultaneously, C1 continues to discharge and C2 continues to charge; the above process is repeated in the next cycle.

[0080] From the analysis of the charging and discharging states of capacitor C2 within one signal cycle as described above, it can be seen that the energy (i.e., the voltage across both ends) of capacitor C2 is affected by the frequency relationship and duty cycle of the two drive signals. Therefore, by adjusting the frequency relationship and duty cycle of the two drive signals, the control of the relay operation by the two signals can be achieved. In the railway signal control system, it can be designed that the two drive signals come from different controllers. Then, only when the PWM signals output by the two controllers satisfy a specific logical relationship will the relay be driven to operate, realizing the control of the relay by the two controllers, thereby reducing system misjudgment and improving the reliability of the relay control system.

[0081] To ensure the accuracy of the drive signal timing, a software control module is added to the relay control system, stipulating that the first controller 10 and the second controller 20 are synchronized every 5 cycles. If the counting cycle reaches 5, the first controller 10 sends a synchronization signal to the second controller 20, and the counting cycle is cleared; if the counting cycle does not reach 5, the drive signal is set to high level. Then, the "drive count value" is used to control the number of loop times, thereby controlling the high-level and low-level times, and realizing the control output of the PWM waveform period and duty cycle.

[0082] Please refer to Figure 5 , based on a relay control method disclosed in the above-mentioned embodiment, this embodiment correspondingly discloses a relay control device, which is applied to axle counter equipment to control the pickup or drop of the relay. The device specifically includes:

[0083] A first processing unit 501, configured to obtain a first drive signal and a second drive signal, where the frequency of the first drive signal is twice that of the second drive signal;

[0084] A second processing unit 502, configured to perform frequency up-conversion processing on the second drive signal to obtain an up-converted second drive signal, so that the frequency of the up-converted second drive signal is twice that of the second drive signal;

[0085] A third processing unit 503, configured to compare the first driving signal and the frequency-upconverted second driving signal;

[0086] A fourth processing unit 504, configured to, if the first driving signal is consistent with the frequency-upconverted second driving signal, drive the relay through the first driving signal and the second driving signal to control the relay to act.

[0087] Preferably, the fourth processing unit 504 is further specifically configured to:

[0088] If the first driving signal is inconsistent with the frequency-upconverted second driving signal, output a control signal, where the control signal is used to control an alarm monitoring module to display an alarm state.

[0089] Preferably, the first processing unit 501 is further configured to:

[0090] Control the conduction timings of the first driving signal and the second driving signal to ensure the accuracy of the driving timings of the first driving signal and the second driving signal.

[0091] Preferably, the device further includes: a fifth processing unit; the fifth processing unit is specifically configured to:

[0092] During the conduction timings, when operating in multiple cycles and driving the relay, the first driving signal and the second driving signal are synchronized once according to a preset cycle;

[0093] Judge whether a cycle counter and a driving counter are full;

[0094] If the counting is full, control the cycle counter and the driving counter to be cleared to ensure the accuracy of the relay operation.

[0095] The relay control device includes a processor and a memory. The above-mentioned first processing unit, second processing unit, third processing unit, fourth processing unit, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.

[0096] The processor includes a kernel, and the kernel retrieves corresponding program units from the memory. One or more kernels can be set, and by adjusting kernel parameters, the accuracy of the relay output can be ensured, and the safety and reliability of the driving system can be improved.

[0097] An embodiment of the present application provides a storage medium, on which a program is stored, and when the program is executed by a processor, the relay control method is implemented.

[0098] An embodiment of the present application provides a processor for running a program, wherein when the program runs, the relay control method is executed.

[0099] An embodiment of the present application provides an electronic device. As Figure 6 shown, the electronic device includes at least one processor 601, at least one memory 602 connected to the processor, and a bus 603. Among them, the processor 601 and the memory 602 complete communication with each other through the bus 603. The processor 601 is used to call program instructions in the memory 602 to execute the above-mentioned relay control method.

[0100] An embodiment of the present application further provides a relay drive system. As Figure 1 shown, the relay drive system includes: a first controller 10, a second controller 20, a comparison circuit 30, a drive circuit 40, an alarm monitoring circuit 50, and a display circuit 60, where:

[0101] The first controller 10 is used to output a first control signal, the second controller 20 is used to output a second control signal, and the frequency of the first drive signal is twice that of the second drive signal;

[0102] The output ends of the first controller 10 and the second controller 20 are connected to the input of the comparison circuit 30. The comparison circuit 30 is used to perform frequency up-conversion processing on the second control signal to obtain an up-converted second drive signal, so that the frequency of the up-converted second drive signal is twice that of the second drive signal; and compare the first drive signal with the up-converted second drive signal;

[0103] The first output end of the comparison circuit 30 is connected to the input end of the alarm monitoring circuit 50, and the output end of the alarm monitoring circuit 50 is connected to the display circuit 60. The alarm monitoring circuit 50 is used to output a control signal when the first drive signal is inconsistent with the up-converted second drive signal, and the control signal is used to control the display circuit 60 to output an alarm state;

[0104] The second output end and the third output end of the comparison circuit 30 are connected to the drive circuit 40. The drive circuit 40 is used to drive the relay jointly by the first drive signal and the second drive signal to control the relay to act when the first drive signal is consistent with the up-converted second drive signal.

[0105] The relay driving system provided by the embodiment of the present application obtains a first driving signal and a second driving signal, where the frequency of the first driving signal is twice that of the second driving signal; performs up - frequency processing on the second driving signal to obtain an up - frequency processed second driving signal, so that the frequency of the up - frequency processed second driving signal is twice that of the second driving signal; compares the first driving signal with the up - frequency processed second driving signal; if the first driving signal is consistent with the up - frequency processed second driving signal, the relay is jointly driven by the first driving signal and the second driving signal to control the relay to act; if the first driving signal is inconsistent with the up - frequency processed second driving signal, a control signal is output, and the control signal is used to control the output of an alarm state. The embodiment of the present application uses two controllers to drive the relay and compares two driving signals, which can greatly improve the accuracy of the relay driving signal, thereby ensuring the safety and stability of the relay driving system.

[0106] The electronic devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0107] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with the following method steps:

[0108] Obtain a first driving signal and a second driving signal, where the frequency of the first driving signal is twice that of the second driving signal;

[0109] Perform up - frequency processing on the second driving signal to obtain an up - frequency processed second driving signal, so that the frequency of the up - frequency processed second driving signal is twice that of the second driving signal;

[0110] Compare the first driving signal with the up - frequency processed second driving signal;

[0111] If the first driving signal is consistent with the up - frequency processed second driving signal, the relay is jointly driven by the first driving signal and the second driving signal to control the relay to act.

[0112] Preferably, the method further includes:

[0113] If the first driving signal is inconsistent with the up - frequency processed second driving signal, a control signal is output, and the control signal is used to control the output of an alarm state.

[0114] Preferably, when obtaining the first driving signal and the second driving signal, the method further includes:

[0115] Control the conduction timings of the first driving signal and the second driving signal to ensure the accuracy of the driving timings of the first driving signal and the second driving signal.

[0116] Preferably, the method further includes:

[0117] During the conduction timings, when operating in multiple cycles to drive the relay, the first driving signal and the second driving signal are synchronized once according to a preset period;

[0118] Determine whether a cycle counter and a driving counter are full;

[0119] If the counting is full, control the cycle counter and the driving counter to be cleared to ensure the accuracy of the relay operation.

[0120] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0121] In a typical configuration, the device includes one or more processors (CPUs), a memory, and a bus. The device may also include an input / output interface, a network interface, etc.

[0122] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one storage chip. The memory is an example of a computer-readable medium.

[0123] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0124] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A relay control method, characterized in that, Applied to axle counter equipment to control the pickup or drop of a relay, the method includes: Obtain a first drive signal and a second drive signal, where the frequency of the first drive signal is twice that of the second drive signal; Perform up - frequency processing on the second drive signal to obtain an up - frequencyed second drive signal, so that the frequency of the up - frequencyed second drive signal is twice that of the second drive signal; Compare the first drive signal with the up - frequencyed second drive signal; If the first drive signal is consistent with the up - frequencyed second drive signal, jointly drive the relay through the first drive signal and the second drive signal to control the operation of the relay.

2. The method according to claim 1, wherein It further includes: If the first drive signal is inconsistent with the up - frequencyed second drive signal, output a control signal, and the control signal is used to control the output of an alarm state.

3. The method according to claim 1 or 2, characterized in that, When obtaining the first drive signal and the second drive signal, it further includes: Control the conduction timing of the first drive signal and the second drive signal to ensure the accuracy of the drive timing of the first drive signal and the second drive signal.

4. The method according to claim 3, characterized in that, It further includes: During the conduction timing, when operating in multiple cycles and driving the relay, the first drive signal and the second drive signal are synchronized once according to a preset period; Judge whether the cycle counter and the drive counter are full; If the counting is full, control the cycle counter and the drive counter to be cleared to ensure the accuracy of the operation of the relay.

5. A relay control device, characterized in that, Applied to axle counter equipment to control the pickup or drop of a relay, the device includes: A first processing unit for obtaining a first drive signal and a second drive signal, where the frequency of the first drive signal is twice that of the second drive signal; A second processing unit for performing up - frequency processing on the second drive signal to obtain an up - frequencyed second drive signal, so that the frequency of the up - frequencyed second drive signal is twice that of the second drive signal; A third processing unit for comparing the first drive signal with the up - frequencyed second drive signal; A fourth processing unit for, if the first drive signal is consistent with the up - frequencyed second drive signal, jointly drive the relay through the first drive signal and the second drive signal to control the operation of the relay.

6. The device according to claim 5, characterized in that, The fourth processing unit is specifically further used for: If the first drive signal is inconsistent with the up - frequencyed second drive signal, output a control signal, and the control signal is used to control an alarm monitoring module to display an alarm state.

7. The device according to claim 5 or 6, characterized in that, When obtaining the first drive signal and the second drive signal, it further includes: Control the conduction timing of the first drive signal and the second drive signal to ensure the accuracy of the drive timing of the first drive signal and the second drive signal.

8. The device according to claim 7, characterized in that, It further includes: A fifth processing unit; the fifth processing unit is specifically used for: During the conduction timing, when operating in multiple cycles and driving the relay, the first drive signal and the second drive signal are synchronized once according to a preset period; Judge whether the cycle counter and the drive counter are full; If the count is full, control the cycle counter and the drive counter to be cleared to ensure the accuracy of the relay operation.

9. A relay driving system, characterized in that, Comprising: A first controller, a second controller, a comparison circuit, a drive circuit, an alarm monitoring circuit, and a display circuit, wherein: The first controller is used to output a first drive signal, the second controller is used to output a second drive signal, and the frequency of the first drive signal is twice that of the second drive signal; The output ends of the first controller and the second controller are connected to the input end of the comparison circuit. The comparison circuit is used to perform frequency up-conversion processing on the second drive signal to obtain an up-converted second drive signal, so that the frequency of the up-converted second drive signal is twice that of the second drive signal; and compare the first drive signal with the up-converted second drive signal; The first output end of the comparison circuit is connected to the input end of the alarm monitoring circuit, the output end of the alarm monitoring circuit is connected to the display circuit, and the alarm monitoring circuit is used to output a control signal when the first drive signal is inconsistent with the up-converted second drive signal, and the control signal is used to control the display circuit to output an alarm state; The second output end and the third output end of the comparison circuit are connected to the drive circuit. The drive circuit is used to jointly drive the relay by the first drive signal and the up-converted second drive signal when they are consistent, and control the relay to act.

10. An electronic device, characterized in that, Comprising: A processor; And A memory, on which executable code is stored. When the executable code is executed by the processor, the processor is caused to execute the relay control method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Relay driving system and relay control device

    CN212750727U