Diagnosis method and device of DO module, electronic equipment and readable storage medium

By sending initial control signals in the signal channel of the DO module and comparing the status values, and refining the fault analysis, the problem of failure in the prior art being unable to accurately locate faults and detect fault hazards is improved, and diagnostic efficiency is improved.

CN119105468APending Publication Date: 2024-12-10HANGZHOU HOLLYSYS AUTOMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411416434.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The prior art cannot accurately locate the faults of the DO module and comprehensively detect their fault hazards, resulting in low detection efficiency.

Method used

By sending initial control signals in each signal channel of the DO module, collecting initial state values, determining the action signal of the test switch, and performing test actions, comparing the expected state values ​​with the actual state values, to determine the fault switch and refining the fault analysis Switch to the channel.

Benefits of technology

It realizes accurate positioning of DO module channel faults and effective detection of various switch fault hazards, improving diagnosis efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105468A_ABST
    Figure CN119105468A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of module diagnosis, and provides a DO module diagnosis method and device, electronic equipment and a readable storage medium. The method comprises the following steps: for each signal channel, sending a corresponding initial control signal to each switch, and acquiring an initial state value of the current signal channel through an acquisition unit; determining an action signal corresponding to the test switch according to the initial state value, and determining an expected state value when the current signal channel is subjected to the test action; executing a test action on each signal channel, and acquiring a test state value of the current signal channel through an acquisition unit; and comparing whether the test state value is consistent with the expected state value, if not, judging that the current signal channel has a fault, and determining a fault switch. According to the invention, the fault analysis of the signal channel is refined to the switch in the channel, so that the channel fault can be accurately, effectively and specifically positioned, and meanwhile, the fault hidden danger of each switch can be checked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of module diagnosis technology, and in particular to a diagnosis method, device, electronic device and readable storage medium for a DO module. Background Art

[0002] In the automation control system, the actual output of DO (Digital Output) signals needs to be realized using a dedicated DO module. The DO module converts the digital control signal sent by the PLC (Programmable Logic Controller) into an activation signal for the external device to achieve the function of controlling the external device.

[0003] In order to ensure that the DO module functions normally and can operate reliably, the DO module can be diagnosed through channels. At present, the channel diagnosis of the DO module usually sends a digital control signal for operation to the DO module and observes whether the activation signal appears as expected. This method can only simply confirm whether the channel is normal, but for DO modules with complex channel structures, it is impossible to locate the fault channel more accurately, nor is it possible to fully detect all the potential faults in the channel, and the detection efficiency is low.

[0004] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a diagnostic method, device, electronic device and readable storage medium for a DO module to solve the problem in the prior art that the DO module cannot locate faults in the diagnostic room and cannot fully detect all potential faults.

[0006] In a first aspect of an embodiment of the present application, a diagnostic method for a DO module is provided, wherein the DO module includes a plurality of signal channels, each of which includes a plurality of switches and an external load sequentially connected in series between a preset power source and a ground terminal, and each of which also includes a collection unit for collecting a state value indicating whether the external load in the current signal channel is connected to a preset power source; the diagnostic method includes:

[0007] For each signal channel, a corresponding initial control signal is sent to each switch, and an initial state value of the current signal channel is collected through a collection unit;

[0008] For each signal channel, according to the initial state value, an action signal of a corresponding test switch is determined, and an expected state value when the test action is executed on the current signal channel is determined; the test switch is any switch of the current signal channel, the action signal is opposite to the initial control signal of the test switch, and the test action includes sending a corresponding action signal to the test switch while keeping sending corresponding initial control signals to other switches;

[0009] For each signal channel, a test action is performed on the current signal channel, and a test state value of the current signal channel is collected through a collection unit;

[0010] For each signal channel, compare whether the test state value is consistent with the expected state value. If not, determine that the current signal channel is faulty, and determine the faulty switch among all switches based on the initial state value, test state value, expected state value and action signal.

[0011] According to a second aspect of an embodiment of the present application, a diagnostic device for a DO module is provided, wherein the DO module includes a plurality of signal channels, each of which includes a plurality of switches and an external load sequentially connected in series between a preset power source and a ground terminal, and each of which also includes a collection unit for collecting a state value indicating whether the external load in the current signal channel is connected to a preset power source; the diagnostic device includes:

[0012] The action unit is used to send a corresponding initial control signal to each switch for each signal channel, and collect the initial state value of the current signal channel through the collection unit;

[0013] The test unit is used to determine, for each signal channel, an action signal of a corresponding test switch according to an initial state value, and determine an expected state value when the current signal channel is subjected to a test action; the test switch is any switch of the current signal channel, the action signal is opposite to the initial control signal of the test switch, and the test action includes sending a corresponding action signal to the test switch while keeping sending corresponding initial control signals to other switches;

[0014] The action unit is further used to perform a test action on each signal channel and the current signal channel, and collect the test state value of the current signal channel through the collection unit;

[0015] The analysis unit is used to compare the test state value with the expected state value for each signal channel. If not, it determines that the current signal channel is faulty, and determines the faulty switch among all switches based on the initial state value, the test state value, the expected state value and the action signal.

[0016] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0017] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0018] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least: the embodiments of the present application generate an initial state value through an initial control signal, and determine a specific action signal of a test switch based on the initial state value, perform a test action on a signal channel based on the action signal of the test switch, and then compare whether the expected state value corresponding to the action signal is consistent with the current actual test state value, and locate the faulty switch according to the comparison result. The present application changes the on-off of the test switch by sending an action signal based on the actual initial state value, and observes the effect of the on-off of the test switch on the current signal channel, and refines the fault analysis of the signal channel to the switch in the channel, so that the channel fault can be accurately and effectively located, and the potential faults of each switch can be checked at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 It is a flowchart of a diagnostic method for a DO module provided in an embodiment of the present application;

[0021] Figure 2 It is a structural diagram of a DO module and a signal channel according to an embodiment of the present application;

[0022] Figure 3 is a timing diagram of an action signal provided in an embodiment of the present application;

[0023] Figure 4 It is a structural schematic diagram of a diagnostic device for a DO module provided in an embodiment of the present application;

[0024] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0026] A diagnostic method, device, electronic device and readable storage medium for a DO module according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0027] Figure 1 It is a flowchart of a diagnostic method for a DO module provided in an embodiment of the present application. Figure 1 The diagnostic method can be executed by a controller inside the DO module, or by a controller outside the DO module in the form of sending instructions to the DO module. The DO module includes multiple signal channels, each of which includes multiple switches and external loads connected in series between a preset power supply and a ground terminal, and each signal channel also includes a collection unit for collecting a status value indicating whether the external load in the current signal channel is connected to the preset power supply. Figure 1 As shown, the diagnostic method includes:

[0028] S101: For each signal channel, a corresponding initial control signal is sent to each switch, and an initial state value of the current signal channel is collected by a collection unit;

[0029] S102: for each signal channel, determining an action signal of a corresponding test switch according to an initial state value, and determining an expected state value when a test action is performed on the current signal channel; the test switch is any switch of the current signal channel, the action signal is opposite to the initial control signal of the test switch, and the test action includes sending a corresponding action signal to the test switch while keeping sending corresponding initial control signals to other switches;

[0030] S103: For each signal channel, perform a test action on the current signal channel, and collect a test state value of the current signal channel through a collection unit;

[0031] S104: For each signal channel, compare whether the test state value is consistent with the expected state value. If not, determine that the current signal channel is faulty, and determine the faulty switch among all switches based on the initial state value, the test state value, the expected state value and the action signal.

[0032] It can be understood that if the test state value is consistent with the expected state value, it is determined that the current signal channel has no fault.

[0033] It can be understood that each signal channel of the DO module in this embodiment includes multiple switches and external loads connected in series between the preset power supply and the ground terminal. It should be noted that in this embodiment, the switches are connected in series, and the connection order of the switches and the external loads is fixed, that is, the external load is the last series element, one end of the external load is connected to the ground terminal, and the other end is connected to the last switch. When all switches are closed, the external load will be connected to the preset power supply. When there is a switch disconnected, the external load is disconnected from the preset power supply. This structure of a signal channel with multiple switches connected in series between the preset power supply and the external load can improve control safety by controlling whether the external load is connected to the preset power supply through multiple switches, and is called a functional safety DO module.

[0034] It can be understood that, based on the structure of the signal channel in this embodiment, first, whether the signal channel is operating normally can be judged according to whether the initial control signal and the corresponding initial state value correspond. Specifically, for each signal channel, after sending the corresponding initial control signal to each switch and collecting the initial state value of the current signal channel through the collection unit, it also includes:

[0035] Determine whether the initial state value corresponds to the initial control signal;

[0036] If so, it is determined that the current signal channel is in normal operation;

[0037] If not, it is determined that the current signal channel is in a faulty operation state.

[0038] Specifically, in the correspondence between the initial state value and the initial control signal, only when all initial control signals are control switches closed, the corresponding initial state value is the connected state, and the initial control signals in other cases are all disconnected. Whether the current signal channel is in normal operation does not affect the diagnosis of subsequent switch faults, but can reflect whether the current overall operation state of the current signal channel is normal. Among them, the signal for controlling the switch to be closed can usually be set to a high level, and correspondingly, the signal for controlling the switch to be disconnected at a low level; if the signal for controlling the switch to be closed is set to a low level, then the signal for controlling the switch to be disconnected is a high level.

[0039] Furthermore, each signal channel of the present embodiment also includes an acquisition module for acquiring the state value of the current signal channel. The acquisition module is actually used to detect the level of the common terminal of the external load and the last switch. When the level of the common terminal is the level of the preset power supply, all switches between the external load and the preset power supply are closed, and the external load is connected to the preset power supply. When the level of the common terminal is the level of the ground point, the external load is not connected to the preset power supply, and at least one switch is not closed.

[0040] like Figure 2 As shown, Figure 2 The following is a detailed structural diagram of an example in which a signal channel in a DO module includes two switches. Figure 2 MCU is used as a controller to execute the method of this embodiment, wherein the preset power supply is denoted as Vref, the level can be set to 24V, the ground terminal GND level can be set to 0V, and two switches and an external load are connected in series between the preset power supply and the ground terminal, the two switches are denoted as K1 and K2, the on and off of the two switches are determined by the control signal sent by the MCU (Micro Controller Unit), and the external load is denoted as Load. The acquisition module is denoted as U1, which is used to obtain the level of the common terminal of the external load and the last switch as the state value of the signal channel and return it to the MCU.

[0041] It can be understood that the diagnostic method of this embodiment is executed for the same signal channel, and the specific process includes: sending the corresponding initial control signal to each switch and collecting the current initial state value; determining the action signal and expected state value corresponding to the test switch based on the initial state value; executing the test action and collecting the current test state value; comparing the test state value and the expected state value to determine whether the signal channel is faulty and the fault location.

[0042] Specifically, according to the above structural description of the signal channel, it can be known that the on and off states of different switches correspond to different state values ​​of the channels. In this embodiment, the on and off states of the test switch are changed by sending an action signal of the test switch, and the test state value is observed at the same time. Therefore, the fault analysis can be further refined from only determining whether the signal channel is operating normally to whether the switches in the channel have normal response capabilities. At the same time, the state change of the test switch can more comprehensively detect the potential faults of each switch.

[0043] The potential fault here refers to the failure of individual switches to work properly without affecting the operation of the entire signal channel. Figure 2 After the switch K1 is closed, it cannot be disconnected. The control signals of switches K1 and K2 are originally high level, both switches are closed, and the state value of the signal channel is connected. When the MCU wants to change the state value of the signal channel to disconnected, the MCU sends a low-level control signal to switches K1 and K2 at the same time. Switch K2 responds to the control signal and disconnects, while switch K1 does not respond to the control signal and remains closed. However, the state value of the entire signal channel changes to disconnected. In this case, switch K1 cannot work normally, but it does not affect the work of the entire signal channel. If the conventional diagnostic method is used, the diagnostic result is that the current signal channel is working normally, and the switch K1 fault will not be found, that is, no safety hazard is found in the current signal channel.

[0044] Compared with the existing technology, this solution can more sensitively and comprehensively check whether each switch in the signal channel can work normally. The original initial state value, action signal, expected state value, and test state value are used as the basis for the check. The purpose of sending the action signal is to change the on-off state of the test switch, and then observe whether the on-off state of the test switch affects the state value of the signal channel as expected. Different initial values ​​correspond to different judgment details.

[0045] Specifically, the process of determining the faulty switch among all switches based on the initial state value, the test state value, the expected state value and the action signal includes:

[0046] When all initial state values ​​are the on state, the test state values ​​are the on state, the expected state values ​​are the off state, and the action signal is a signal that disconnects the test switch, it is determined that the faulty switch is the test switch.

[0047] It can be understood that when the initial state value is the on state, each switch is in the closed state, and the initial control signals are all signals that close the switches. At this time, the action signal is a signal that disconnects the test switch. If the test switch responds to the action signal normally, the external load will disconnect from the preset power supply, so the expected state value is the off state. If the actual test state value collected after the action signal is sent is the on state, it means that the test switch does not respond to the action signal, the test switch is still in the closed state, and all switches are still in the closed state, so that the external load is connected to the preset power supply. Therefore, the fault test in this case can determine whether the test switch can perform the disconnection action. In fact, in this scenario, it is also diagnosed whether other switches are in a normal closed state. If any other switch is not in a normal closed state, the initial state value and the test state value will both be off.

[0048] Similarly, the process of determining the faulty switch among all switches based on the initial state value, the test state value, the expected state value and the action signal includes:

[0049] When all initial state values ​​are disconnected, test state values ​​are connected, expected state values ​​are disconnected, and the action signal is a signal that closes the test switch, it is determined that the faulty switch is another switch other than the test switch.

[0050] It can be understood that when the initial state value is the disconnected state, each switch should be in the disconnected state, and the initial control signal is a signal to disconnect the switch. At this time, the action signal is a signal to close the test switch. If the test switch responds to the action signal normally, since other switches should still be in the disconnected state, the external load still remains disconnected from the preset power supply, so the expected state value is the disconnected state. If the actual test state value collected after the action signal is sent is the connected state, it means that in addition to the test switch responding to the action signal and changing its own state to the closed state, other switches are also in the closed state, so that the external load is connected to the preset power supply. Therefore, the fault test in this case can determine whether other switches except the test switch are in a normal disconnected state. Furthermore, in this scenario, it is also diagnosed whether the test switch can perform a closing action. If the initial state value is the disconnected state and the test state value is the connected state, the test switch performs a closing action.

[0051] It is understandable that, according to the above two situations, it is difficult to complete the diagnosis of whether all switches are working normally and responding ability by using only one switch as a test switch, so each switch can be used as a test switch to perform the actions of steps S102-S104 once, that is, diagnose each switch, so as to achieve the effect of eliminating all potential faults of the signal channel. Specifically, for each signal channel, according to the initial state value, the action signal of the corresponding test switch is determined, and the process of determining the expected state value when the current signal channel is subjected to the test action includes:

[0052] For each signal path, perform the following actions on each switch as a test switch:

[0053] According to the initial state value, the action signal of the corresponding test switch is determined, and the expected state value when the test action is executed on the current signal channel is determined.

[0054] Furthermore, in order to facilitate diagnosis of all signal channels in the DO module, the method of this embodiment can organize control signals by taking all switches of all signal channels as control objects, so as to improve the efficiency of diagnostic testing. Specifically, for each signal channel, the process of sending a corresponding initial control signal to each switch includes:

[0055] Sending the same initial control signal to all switches of all signal channels;

[0056] Accordingly, for each signal channel, a test action is performed on the current signal channel, and a process of collecting the test state value of the current signal channel through a collection unit includes:

[0057] For all switches in all signal channels, corresponding pulse-form action signals are sent to each switch in a time-sharing manner, the state signal of each signal channel is collected by the collection unit, and the test state value corresponding to each action signal is determined based on the state signal.

[0058] It is understandable that this embodiment does not require the sending time of the initial control signal, but only requires the signal channel to be in the initial state value, and then steps S102-S104 can be executed. In order to improve the diagnostic test efficiency, the same test logic is used for each signal channel, that is, the initial state value of the signal channel is set to the same using the same initial control signal, the switch in the same position is selected as the test switch, and the same action signal is sent. At this time, the expected state value of each signal path is also the same, and only the actual test state value of each signal path needs to be paid attention to.

[0059] It is understandable that switches on different signal paths can receive action signals at the same time, but there can only be one test switch on the same signal path at the same time. Therefore, for all switches on all signal paths, time-sharing pulse-shaped action signals can be set, and other switches that are not test switches at the current moment maintain the original initial control signal. The pulse-shaped action signal means that the test switch will recover quickly after the action, and the signal path will experience the change process of the initial state value, the test state value, and the initial state value. On the one hand, it is convenient for the subsequent testing of other switches on the signal path as test switches. On the other hand, the pulse width of the action signal is intentionally set, so that the state value of the signal path can be collected by the acquisition unit without affecting the external load, which is convenient for the application of this diagnostic method in the normal working process of the DO module.

[0060] In addition, the pulse-shaped action signal causes the test switch to recover quickly after the action, and can further verify whether the opening and closing actions of the test switch can respond normally.

[0061] Furthermore, when the action signals in the form of pulses are sent in time-sharing, they can be sent one by one according to a certain preset sending frequency, and the preset sending frequency set according to a rule can be used to standardize the diagnosis process.

[0062] Specifically, the pulse width of the action signal may be in the range of 500us-2ms, and the unit cycle duration corresponding to the preset transmission frequency may be in the range of 200ms-1s. The action signal of each switch may be in the form of a pulse with a pulse periodicity, and the pulse period of the action signals of all switches is the same, and the duration of the pulse period is not less than the sum of the unit cycle durations of all action signals.

[0063] Specifically, the sending order of the action signals of all switches can be carried out in turn through the signal channels, with four signal channels, each signal channel is Figure 2Taking the structure of the action signal as a low-level pulse as an example, after specifying the preset sending frequency and pulse width of the action signal, the timing of the action signal can be as follows Figure 3 As shown, first, the switch K1 of the signal channel 1-4 sends an action signal in the form of a pulse at a preset sending frequency, and then the switch K2 of the signal channel 1-4 sends an action signal in the form of a pulse at a preset sending frequency. The diagnostic pulse time interval Time is the duration of the pulse period of the action signal of the first switch.

[0064] Specifically, Figure 3 The sending order of the action signals shown is that when the initial state values ​​of all signal channels are in the on state, the corresponding diagnostic analysis content can be shown in Table 1 below; when the initial state values ​​of all signal channels are in the off state, the corresponding diagnostic analysis content can be shown in Table 2 below, where the sending period is the period number corresponding to the preset sending frequency.

[0065] Table 1 Diagnostic analysis of the initial state value in the on state

[0066]

[0067] Table 2 Diagnostic analysis of the initial state value when it is not connected

[0068]

[0069] Furthermore, there may be crosstalk faults between multiple signal channels. Whether there is a crosstalk fault between the signal channels in the current DO module can be determined by sending corresponding pulse-form action signals to each switch in a time-sharing manner, and then analyzing whether there are signal channels affected by the crosstalk based on the response of the DO module to all action signals, that is, all test status values. That is, when an action signal is sent to a switch of a certain signal channel, the switches of other signal channels also respond to the action signal and cause the test status value to change.

[0070] Therefore, after determining the test state value corresponding to each action signal based on the state signal, the method further includes:

[0071] Based on all action signals and test status values, analyze whether there is a crosstalk fault between each signal channel.

[0072] It is understandable that, similar to the relationship between the faulty switch and the faulty channel mentioned above, not all crosstalk faults can be reflected in the test status value. Therefore, it is necessary to combine the real-time status of all switches, whether the switches can operate normally, and the relationship between the test status values ​​and action signals of all signal channels to traverse and analyze whether there is a crosstalk fault between two signal channels.

[0073] Furthermore, in order to distinguish the action signals of different signal channels, the pulse widths of the action signals of different signal channels may be set to different values, so that the corresponding relationship between the signal channel and the control signal can be identified by the pulse width.

[0074] It is understandable that, for a safety DO module, the internal controller that sends control signals to all switches can be set according to the number of switches on each signal channel, for example Figure 2 If a signal channel includes two switches K1 and K2, the DO module can be set with two controllers MCU1 and MCU2, where MCU1 is used to manage all K1s and send control signals to all K1s, and MCU2 is used to manage all K2s and send control signals to all K2s. The two controllers can use the same time source to ensure that the action signals of each switch are sent out in time sequence. The time source here can be in the form of a synchronous interrupt, such as a synchronous interrupt with a cycle of 100us. Both MCU1 and MCU2 use this time interrupt as the time base for timing.

[0075] The method of the embodiment of the present application generates an initial state value through an initial control signal, and determines the action signal of a specific test switch based on the initial state value, performs a test action on the signal channel based on the action signal of the test switch, and then compares whether the expected state value corresponding to the action signal is consistent with the current actual test state value, and locates the faulty switch according to the comparison result. The present application changes the on-off of the test switch by sending an action signal based on the actual initial state value, and observes the impact of the on-off of the test switch on the current signal channel, and refines the fault analysis of the signal channel to the switch in the channel, so that the channel fault can be accurately and effectively located, and the hidden faults of each switch can be checked at the same time.

[0076] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0077] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0078] Figure 4 Schematic diagram of a diagnostic device for a DO module provided in an embodiment of the present application. The DO module includes multiple signal channels, each signal channel includes multiple switches and external loads connected in series between a preset power source and a ground terminal, and each signal channel also includes a collection unit for collecting a status value indicating whether the external load in the current signal channel is connected to a preset power source. Figure 4 As shown, the diagnostic device comprises:

[0079] The action unit 401 is used to send a corresponding initial control signal to each switch for each signal channel, and collect the initial state value of the current signal channel through the collection unit;

[0080] The test unit 402 is used to determine, for each signal channel, an action signal of a corresponding test switch according to an initial state value, and determine an expected state value when a test action is performed on the current signal channel; the test switch is any switch of the current signal channel, the action signal is opposite to the initial control signal of the test switch, and the test action includes sending a corresponding action signal to the test switch while keeping sending corresponding initial control signals to other switches;

[0081] The action unit 401 is further used to perform a test action on each signal channel and the current signal channel, and collect the test state value of the current signal channel through the collection unit;

[0082] The analysis unit 403 is used to compare the test state value with the expected state value for each signal channel. If not, it determines that the current signal channel is faulty and determines the faulty switch among all switches based on the initial state value, test state value, expected state value and action signal.

[0083] The device of the embodiment of the present application generates an initial state value through an initial control signal, and determines the action signal of a specific test switch based on the initial state value, performs a test action on the signal channel based on the action signal of the test switch, and then compares whether the expected state value corresponding to the action signal is consistent with the current actual test state value, and locates the faulty switch according to the comparison result. The present application changes the on-off of the test switch by sending an action signal based on the actual initial state value, and observes the impact of the on-off of the test switch on the current signal channel, and refines the fault analysis of the signal channel to the switch in the channel, so that the channel fault can be accurately and effectively located, and the hidden faults of each switch can be checked at the same time.

[0084] In an exemplary embodiment, the analysis unit is specifically configured to:

[0085] When all initial state values ​​are the on state, the test state values ​​are the on state, the expected state values ​​are the off state, and the action signal is a signal that disconnects the test switch, it is determined that the faulty switch is the test switch.

[0086] In an exemplary embodiment, the analysis unit is specifically configured to:

[0087] When all initial state values ​​are disconnected, test state values ​​are connected, expected state values ​​are disconnected, and the action signal is a signal that closes the test switch, it is determined that the faulty switch is another switch other than the test switch.

[0088] In an exemplary embodiment, the testing unit is specifically used for:

[0089] For each signal path, perform the following actions on each switch as a test switch:

[0090] According to the initial state value, the action signal of the corresponding test switch is determined, and the expected state value when the test action is executed on the current signal channel is determined.

[0091] In an exemplary embodiment, the action unit is specifically used to:

[0092] Sending the same initial control signal to all switches of all signal channels;

[0093] For all switches in all signal channels, corresponding pulse-form action signals are sent to each switch in a time-sharing manner, the state signal of each signal channel is collected by the collection unit, and the test state value corresponding to each action signal is determined based on the state signal.

[0094] In an exemplary embodiment, the analysis unit is further configured to:

[0095] Based on all action signals and test status values, analyze whether there is a crosstalk fault between each signal channel.

[0096] In an exemplary embodiment, the analysis module is further configured to:

[0097] Determine whether the initial state value corresponds to the initial control signal;

[0098] If so, it is determined that the current signal channel is in normal operation;

[0099] If not, it is determined that the current signal channel is in a faulty operation state.

[0100] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0101] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.

[0102] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0103] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.

[0104] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0105] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the readable storage medium does not include electric carrier signals and telecommunication signals.

[0106] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A diagnostic method for a DO digital output module, characterized in that: The DO module includes a plurality of signal channels, each of which includes a plurality of switches and external loads sequentially connected in series between a preset power source and a ground terminal, and each of which also includes a collection unit for collecting a state value indicating whether the external load in the current signal channel is connected to the preset power source; the diagnostic method includes: For each of the signal channels, a corresponding initial control signal is sent to each of the switches, and an initial state value of the current signal channel is collected by the collection unit; For each of the signal channels, an action signal of a corresponding test switch is determined according to the initial state value, and an expected state value when a test action is performed on the current signal channel is determined; the test switch is any switch of the current signal channel, the action signal is opposite to the initial control signal of the test switch, and the test action includes sending the corresponding action signal to the test switch while keeping sending the corresponding initial control signal to other switches; For each of the signal channels, the test action is performed on the current signal channel, and the test state value of the current signal channel is collected by the collection unit; For each of the signal channels, compare whether the test state value is consistent with the expected state value. If not, determine that the current signal channel is faulty, and determine the faulty switch among all the switches based on the initial state value, the test state value, the expected state value and the action signal.

2. The method according to claim 1, characterized in that: The process of determining a faulty switch among all the switches based on the initial state value, the test state value, the expected state value and the action signal comprises: When all the initial state values ​​are the on state, the test state value is the on state, the expected state value is the off state, and the action signal is a signal to disconnect the test switch, it is determined that the faulty switch is the test switch.

3. The method according to claim 1, characterized in that The process of determining a faulty switch among all the switches based on the initial state value, the test state value, the expected state value and the action signal comprises: When all the initial state values ​​are disconnected, the test state values ​​are connected, the expected state values ​​are disconnected, and the action signal is a signal that closes the test switch, it is determined that the faulty switch is another switch other than the test switch.

4. The method according to claim 1, characterized in that: The process of determining, for each of the signal channels, an action signal of a corresponding test switch according to the initial state value, and determining an expected state value when the current signal channel is subjected to a test action, comprises: For each of the signal paths, each of the switches is used as a test switch to perform the following actions: According to the initial state value, an action signal corresponding to the test switch is determined, and an expected state value when the test action is executed on the current signal channel is determined.

5. The method according to claim 4, characterized in that The process of sending a corresponding initial control signal to each switch for each signal channel includes: sending the same initial control signal to all the switches of all the signal channels; The process of performing the test action on the current signal channel for each of the signal channels and collecting the test status value of the current signal channel through the collection unit includes: For all the switches in all the signal channels, the corresponding action signal in pulse form is sent to each switch in a time-sharing manner, the state signal of each signal channel is collected by the collection unit, and the test state value corresponding to each action signal is determined based on the state signal.

6. The method according to claim 5, characterized in that After determining the test state value corresponding to each of the action signals based on the state signal, the method further includes: Based on all the action signals and the test status values, it is analyzed whether there is a crosstalk fault between the signal channels.

7. The method according to any one of claims 1 to 6, characterized in that: For each of the signal channels, after sending a corresponding initial control signal to each of the switches and collecting the initial state value of the current signal channel through the collection unit, the method further includes: Determining whether the initial state value corresponds to the initial control signal; If so, it is determined that the current signal channel is in a normal operating state; If not, it is determined that the current signal channel is in a faulty operating state.

8. A diagnostic device for a DO module, characterized in that: The DO module includes a plurality of signal channels, each of which includes a plurality of switches and external loads connected in series between a preset power source and a ground terminal, and each of which includes a collection unit for collecting a state value indicating whether the external load in the current signal channel is connected to the preset power source; The diagnostic device comprises: An action unit, configured to send a corresponding initial control signal to each switch for each signal channel, and collect an initial state value of the current signal channel through the collection unit; a test unit, configured to determine, for each of the signal channels, an action signal of a corresponding test switch according to the initial state value, and determine an expected state value when the current signal channel is subjected to a test action; the test switch is any switch of the current signal channel, the action signal is opposite to the initial control signal of the test switch, and the test action comprises sending the corresponding action signal to the test switch while keeping sending the corresponding initial control signal to other switches; The action unit is further used to perform the test action on each of the signal channels and the current signal channel, and collect the test state value of the current signal channel through the collection unit; The analysis unit is used to compare the test state value with the expected state value for each of the signal channels to see whether they are consistent. If not, it is determined that the current signal channel is faulty, and the faulty switch is determined among all the switches based on the initial state value, the test state value, the expected state value and the action signal.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.