Detection method, device and equipment for digital input and output circuit

By controlling and adjusting the input/output levels of the digital input and output circuit, the problems of low detection efficiency and inability to detect short-circuit or series connection in the prior art are solved, and an efficient and reliable detection method is realized.

CN119805175APending Publication Date: 2025-04-11HANGZHOU BMSER TECH
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing digital input and output circuit detection methods have many times, take up a long time, which affects the detection efficiency, and cannot effectively detect short-circuit or series connection problems, affecting the detection reliability.

Method used

By receiving control instructions, the input/output levels of each digital input module and digital output module are controlled to be the same level, and the respective levels are changed in sequence, and the level values ​​after each change are obtained, or the modules are grouped for control and detection to determine the normal state of each module.

Benefits of technology

The detection efficiency is improved, the detection can be completed in a short time, and the normal state and short-connection or series connection of each module are determined by controlling and adjusting the level, which improves the detection reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119805175A_ABST
    Figure CN119805175A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method, a device and equipment for detecting a digital input / output circuit. The detection method comprises the steps of receiving a control instruction; according to the control instruction, the input levels of the digital input modules are controlled to be the same level, and the output levels of the digital output modules are controlled to be the same level; controlling each digital input module to sequentially change respective input level, controlling each digital output module to sequentially change respective output level, and acquiring the input level and the output level after each change; or the digital input modules are grouped, the input level of each group is controlled, the digital output modules are grouped, the output level of each group is controlled, and the input level of each group and the output level of each group are obtained; and determining whether each digital input module is normal or not and whether each digital output module is normal or not according to the obtained input level of each group and the obtained output level of each group. According to the technical scheme provided by the embodiment of the invention, the detection efficiency and the detection reliability can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to circuit detection technology, and in particular to a detection method, device and equipment for a digital input and output circuit. Background Art

[0002] Digital input and output circuits are used to process and control digital signals. They are usually used in industrial automation, control systems and electronic equipment to collect, transmit and control digital signals. With the widespread application of digital input and output circuits in modern industrial development, the detection of the circuit function is also very important.

[0003] At present, the existing detection method of digital input and output circuits usually detects each digital input module and each digital output module in turn, and gradually completes the detection of each channel. The detection number is large and the time is long, which affects the detection efficiency. In addition, when two of the channels are short-circuited or connected in series, there is a problem that the short-circuit or series connection cannot be detected, thereby affecting the detection reliability. Summary of the invention

[0004] The embodiments of the present invention provide a method, a device and an apparatus for detecting a digital input-output circuit to ensure detection efficiency and detection reliability.

[0005] In a first aspect, an embodiment of the present invention provides a method for detecting a digital input-output circuit, wherein the digital input-output circuit includes a digital input module and a digital output module, wherein the digital input module and the digital output module are located in a device under test, and wherein the device under test includes multiple digital input modules and multiple digital output modules, wherein the detection method includes:

[0006] Receive control instructions;

[0007] According to the control instruction, the input levels of the digital input modules of each channel are controlled to be the same level, and the output levels of the digital output modules of each channel are controlled to be the same level;

[0008] According to the input level and the output level, control the digital input modules of each channel to sequentially change their respective input levels, and the digital output modules of each channel to sequentially change their respective output levels, and obtain the input level and the output level after each change; or, group the digital input modules of each channel, control the input level of each group, group the digital output modules of each channel, control the output level of each group, and obtain the input level and the output level of each group;

[0009] According to the acquired input level and output level, it is determined whether each digital input module is normal and whether each digital output module is normal.

[0010] Optionally, the device under test includes n digital output modules from the first to the nth, where n is an integer greater than 2; the same level of the digital output modules of each channel is a first level, and the first level is a high level or a low level;

[0011] According to the input level and the output level, controlling each of the digital input modules to sequentially change their input levels, and each of the digital output modules to sequentially change their output levels, comprises:

[0012] The m-th digital output module is controlled to output a second level, and the output levels of other digital output modules are the first level; the second level and the first level are opposite levels to each other, m changes from 1 to n in sequence, and m is an integer.

[0013] Optionally, determining whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level includes:

[0014] If m is any integer greater than or equal to 1 and less than or equal to n, the output level of the mth digital output module is the second level, and the output levels of other digital output modules are the first level, then it is determined that the digital output modules are normal without short circuit or series connection.

[0015] Optionally, grouping the digital output modules of each channel, controlling the output level of each group, and obtaining the input level of each group and the output level of each group includes:

[0016] Grouping the digital output modules of each channel into multiple groups;

[0017] The even group in each grouping is controlled to output the second level, and the output level of the odd group is the first level; the second level and the first level are opposite levels to each other.

[0018] Optionally, the device under test includes n digital output modules from the first to the nth, where n is an integer greater than 2; each time grouping is performed, there are 2 to the power of k digital output modules in each group, where k gradually increases from 0, k is an integer and 2 to the power of k is less than or equal to n.

[0019] Optionally, determining whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level includes:

[0020] If the output level of the even group obtained after each grouping is the second level, and the output level of the odd group obtained is the first level, it is determined that each of the digital output modules is normal without short circuit or series connection.

[0021] Optionally, determining whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level includes:

[0022] If the output level of the even group after at least one grouping is the first level or the output level of the odd group is the second level, it is determined that at least one of the digital output modules is abnormal.

[0023] In a second aspect, an embodiment of the present invention provides a detection device for a digital input-output circuit, wherein the digital input-output circuit comprises a digital input module and a digital output module, wherein the digital input module and the digital output module are located in a device under test, and the device under test comprises a plurality of digital input modules and a plurality of digital output modules;

[0024] An instruction receiving module, used for receiving control instructions;

[0025] A level control module, used to control the input levels of the digital input modules of each channel to be the same level, and the output levels of the digital output modules of each channel to be the same level according to the control instruction;

[0026] A level adjustment module, configured to control the digital input modules of each channel to sequentially change their respective input levels, and the digital output modules of each channel to sequentially change their respective output levels according to the input level and the output level, and obtain the input level and the output level after each change; or, group the digital input modules of each channel to control the input level of each group, group the digital output modules of each channel to control the output level of each group, and obtain the input level and the output level of each group;

[0027] The status detection module is used to determine whether each digital input module is normal and whether each digital output module is normal according to the acquired input level and output level.

[0028] In a third aspect, an embodiment of the present invention provides a device, the device comprising:

[0029] one or more processors;

[0030] A storage device for storing one or more programs;

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the detection method as described in the first aspect.

[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the detection method as described in the first aspect.

[0033] The detection method, device and equipment of the digital input-output circuit provided by the embodiment of the present invention, the digital input-output circuit includes a digital input module and a digital output module, the digital input module and the digital output module are located in the device under test, and the device under test includes a multi-channel digital input module and a multi-channel digital output module, and the detection method includes: receiving a control instruction; according to the control instruction, controlling the input level of each digital input module to be the same level, and the output level of each digital output module to be the same level; according to the input level and the output level, controlling each digital input module to sequentially change its own input level, and each digital output module to sequentially change its own output level, and obtaining the input level and output level after each change; or, grouping each digital input module, controlling the input level of each group, grouping each digital output module, controlling the output level of each group, and obtaining the input level and output level of each group; according to the obtained input level and output level of each group, determining whether each digital input module is normal and whether each digital output module is normal. The detection method, device and equipment of the digital input-output circuit provided by the embodiments of the present invention simultaneously control and adjust the input level of each digital input module, and simultaneously control and adjust the output level of each digital output module. While ensuring the detection efficiency, it is determined whether each digital input module is normal and whether it is short-circuited or connected in series, and whether each digital output module is normal and whether it is short-circuited or connected in series based on the input level and output level obtained after control and adjustment, thereby ensuring the detection reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of a detection method for a digital input-output circuit provided in Embodiment 1 of the present invention;

[0035] Figure 2 is a structural block diagram of a device under test and a detection device provided in Embodiment 1 of the present invention;

[0036] Figure 3 is a flow chart of a detection method for a digital input-output circuit provided in Embodiment 2 of the present invention;

[0037] Figure 4 is a flow chart of a method for detecting a digital input-output circuit provided in Embodiment 3 of the present invention;

[0038] Figure 5 is a structural block diagram of a detection device for a digital input-output circuit provided in a fourth embodiment of the present invention;

[0039] Figure 6 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0040] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0041] Embodiment 1

[0042] Figure 1 1 is a flow chart of a method for detecting a digital input-output circuit provided in Embodiment 1 of the present invention. This embodiment can be applied to detecting a digital input-output circuit, etc. The digital input-output circuit includes a digital input module and a digital output module. The digital input module and the digital output module are located in a device under test. The device under test includes a multi-channel digital input module and a multi-channel digital output module. The method can be executed by a detection device for a digital input-output circuit. The control device can be integrated into a processor. The processor can be implemented in the form of software and / or hardware. The method specifically includes the following steps:

[0043] Step 110: Receive control instructions.

[0044] The control instruction may be an externally input control instruction for starting detection.

[0045] Step 120: According to the control instruction, the input levels of the digital input modules are controlled to be the same level, and the output levels of the digital output modules are controlled to be the same level.

[0046] Specifically, when the processor receives a control instruction to start detection, it controls the input level of each digital input module to be the same level such as a high level or a low level, controls the output level of each digital output module to be the same level such as a high level or a low level, and reads the input level of each digital input module and the output level of each digital output module.

[0047] Step 130: According to the input level and the output level, control each digital input module to change its own input level in sequence, and each digital output module to change its own output level in sequence, and obtain the input level and output level after each change; or, group the digital input modules, control the input level of each group, group the digital output modules, control the output level of each group, and obtain the input level and output level of each group.

[0048] Specifically, taking the digital output module as an example, the processor controls each digital output module to change its output level in turn, such as controlling the output level of one digital output module from low level to high level, and the output level of other digital output modules is low level; or, the digital output modules are grouped for multiple times, each time into a different number of groups, and the output level of each group after each grouping is obtained. The processor's control of the digital input module is the same as that of the digital output module, which will not be repeated here.

[0049] For example, Figure 2 1 is a structural block diagram of a device under test and a detection device provided in Embodiment 1 of the present invention. Figure 2 The detection device is connected to the device under test through multiple communication lines, and each module (including each digital input module and each digital output module) communicates with the detection device through its corresponding communication line. The processor obtains the input level of each digital input module of the device under test and the output level of each digital output module through the detection device communicating with it.

[0050] In addition, the processor can control each digital input module to change its own input level in sequence, group each digital output module, and control the output level of each group. It can also control each digital output module to change its own output level in sequence, group each digital input module, and control the input level of each group. The combination of specific control methods is not limited here.

[0051] Step 140: Determine whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level.

[0052] Specifically, if the input (output) level obtained is the same as the input (output) level of each digital input (output) module controlled, it can be determined that the input (output) level of each digital input (output) module is normal and there is no short circuit or series connection between the digital input (output) modules. If the input (output) level of at least one digital input (output) module is different from the input (output) level of the digital input (output) module obtained, such as the output level of a certain digital output module is controlled to be high, and the output level of the digital output module obtained is low, it can be determined that the digital output module is abnormal. According to the output level obtained after each change or according to the output level of each group obtained, it is determined whether the abnormality of the digital output module is a problem of itself or a short circuit or series connection, and the digital output module short-circuited or connected in series with the digital output module when short-circuited or connected in series.

[0053] It should be noted that the specific duration of the above preset time can be determined according to actual control requirements and is not limited here.

[0054] The detection method of the digital input-output circuit provided in the present embodiment includes: receiving a control instruction; according to the control instruction, controlling the input level of each digital input module to be the same level, and the output level of each digital output module to be the same level; according to the input level and the output level, controlling each digital input module to sequentially change its own input level, and each digital output module to sequentially change its own output level, and acquiring the input level and output level after each change; or, grouping each digital input module, controlling the input level of each group, grouping each digital output module, controlling the output level of each group, and acquiring the input level and output level of each group; and determining whether each digital input module is normal and whether each digital output module is normal according to the acquired input level and output level of each group. The detection method for the digital input-output circuit provided in the present embodiment controls and adjusts the input level of each digital input module simultaneously, and controls and adjusts the output level of each digital output module simultaneously. While ensuring the detection efficiency, it is determined whether each digital input module is normal and whether it is short-circuited or connected in series, and whether each digital output module is normal and whether it is short-circuited or connected in series based on the input level and output level obtained after control and adjustment, thereby ensuring the detection reliability.

[0055] Embodiment 2

[0056] Figure 3 1 is a flow chart of a method for detecting a digital input-output circuit provided in the second embodiment of the present invention. This embodiment can be applied to aspects such as detecting a digital input-output circuit. The digital input-output circuit includes a digital input module and a digital output module. The digital input module and the digital output module are located in a device under test. The device under test includes a multi-channel digital input module and a multi-channel digital output module. The method can be executed by a detection device for a digital input-output circuit. The control device can be integrated into a processor. The processor can be implemented in the form of software and / or hardware. The method specifically includes the following steps:

[0057] Step 210: Receive control instructions.

[0058] The control instruction may be an externally input control instruction for starting detection.

[0059] Step 220: According to the control instruction, the output levels of the digital output modules of each channel are controlled to be the same level.

[0060] Specifically, when the processor receives a control instruction to start detection, the output level of each digital output module is controlled to be the same level, such as a first level, the first level is a high level or a low level, and the output level of each digital output module is read. Exemplarily, the device under test includes a total of n digital output modules from the first to the nth, where n is an integer greater than 2.

[0061] Step 230, control the m-th digital output module to output the second level, and the output levels of the other digital output modules are the first level; the second level and the first level are opposite levels, m changes from 1 to n in sequence, and m is an integer.

[0062] Specifically, the first digital output module is controlled to output the second level, the output levels of the other digital output modules are the first level, and the output levels of the digital output modules are obtained; then the second digital output module is controlled to output the second level, the output levels of the other digital output modules are the first level, and the output levels of the digital output modules are obtained; then the third digital output module is controlled to output the second level, the output levels of the other digital output modules are the first level, and the output levels of the digital output modules are obtained; ... until the nth digital output module is controlled to output the second level, the output levels of the other digital output modules are the first level, and the output levels of the digital output modules are obtained.

[0063] Step 240: if m is any integer greater than or equal to 1 and less than or equal to n, the output level of the mth digital output module is the second level, and the output levels of other digital output modules are the first level, then it is determined that the digital output modules are normal without short circuit or series connection.

[0064] Specifically, when controlling the mth digital output module to output the second level and the output levels of other digital output modules are the first level, if during the process of m changing from 1 to n, the output level of the mth digital output module obtained is always the second level, and the output levels of other digital output modules are always the first level, it can be determined that the output levels of the digital output modules are normal and there is no short circuit or series connection between the digital output modules.

[0065] In addition, when controlling a certain digital output module to output a high level and other digital output modules to output a low level, if the output level of the digital output module obtained is a low level, it is determined that the digital output module is abnormal, and based on the output level obtained during each change when m changes from 1 to n, it is determined whether the abnormality of the digital module is a problem of itself or a series connection or short circuit, as well as the digital output module that is short-circuited with the digital output module when short-circuited.

[0066] The detection method of the digital input-output circuit provided in the present embodiment controls the m-th digital output module to output the second level, and the output levels of the other digital output modules are the first level; the second level and the first level are mutually inverse levels, m changes from 1 to n in sequence, and m is an integer. If m is any integer greater than or equal to 1 and less than or equal to n, the output level of the m-th digital output module is the second level, and the output levels of the other digital output modules are the first level, then it is determined that the digital output modules are normal without short circuit or series connection, thereby realizing the detection of the digital output modules.

[0067] Embodiment 3

[0068] Figure 4 1 is a flow chart of a method for detecting a digital input-output circuit provided in Embodiment 3 of the present invention. This embodiment can be applied to aspects such as detecting a digital input-output circuit. The digital input-output circuit includes a digital input module and a digital output module. The digital input module and the digital output module are located in a device under test. The device under test includes a multi-channel digital input module and a multi-channel digital output module. The method can be executed by a detection device for a digital input-output circuit. The control device can be integrated into a processor. The processor can be implemented in the form of software and / or hardware. The method specifically includes the following steps:

[0069] Step 310: Receive control instructions.

[0070] The control instruction may be an externally input control instruction for starting detection.

[0071] Step 320: According to the control instruction, the output levels of the digital output modules are the same level.

[0072] Specifically, when the processor receives a control instruction to start detection, the output level of each digital output module is controlled to be the same level, such as a high level or a low level. Exemplarily, the device under test includes a total of n digital output modules from the first to the nth, where n is an integer greater than 2; the same level of each digital output module is a first level, which is a high level or a low level.

[0073] Step 330: group the digital output modules into multiple groups.

[0074] Exemplarily, each group has 2k-power digital output modules, k gradually increases from 0, k is an integer and 2k-power is less than or equal to n. Taking n as an example, when n-channel digital output modules are grouped for the first time, the first channel to the n-th channel are the first group to the n-th group respectively; when n-channel digital output modules are grouped for the second time, two channels are grouped, the first channel and the second channel are the first group, the third channel and the fourth channel are the second group, and so on, and all the insufficient number of modules are grouped into the last group; when n-channel digital output modules are grouped for the third time, four channels are grouped, the first channel, the second channel, the third channel and the fourth channel are the first group, the fifth channel, the sixth channel, the seventh channel and the eighth channel are the second group, and so on, and all the insufficient number of modules are grouped into the last group; ... Grouping is performed according to the above grouping method until all digital output modules are grouped into the same group.

[0075] Step 340: Control the even group in each grouping to output the second level, and the odd group to output the first level; the second level and the first level are opposite levels to each other.

[0076] Among them, the even group can also output the first level, the odd group outputs the second level, and the output levels of the even group and the odd group are opposite. Each group has at least one output, and the number x of digital output modules included in each group corresponds to the x outputs of each group.

[0077] Step 350: If the output level of the even group obtained after each grouping is the second level and the output level of the odd group is the first level, it is determined that each digital output module is normal without short circuit or series connection.

[0078] Specifically, if the output level of the even array obtained after each grouping is the same as the output level of the control even array, and the output level of the odd array obtained after each grouping is the same as the output level of the control odd array, it means that the output level of each digital output module is normal, and there is no short circuit or series connection between the digital output modules.

[0079] In addition, when the output level of at least one group of even arrays obtained in the first grouping is the first level, and / or the output level of at least one group of odd arrays obtained in the first grouping is the second level, it can be determined that there is an abnormality in at least one data output module, and it is necessary to determine whether the abnormality is a problem with the output itself or a series connection or short circuit problem based on the output levels of the even array and the output levels of the odd array obtained from the second grouping to the last grouping.

[0080] It should be noted that the detection process of each digital input module can refer to the detection process of each digital output module in any embodiment of the present invention, and the output can be replaced by the input, which will not be repeated here.

[0081] The detection method of the digital input-output circuit provided in the present embodiment groups each digital output module for multiple times, controls the even group in each grouping to output the second level, and the output level of the odd group to be the first level, and the second level and the first level are mutually inverse levels. If the output level of the even group obtained after each grouping is the second level, and the output level of the odd group is the first level, it is determined that each digital output module is normal without short circuit or series connection, thereby realizing the detection of each digital output module.

[0082] Embodiment 4

[0083] Figure 5 : is a structural block diagram of a detection device for a digital input-output circuit provided in Embodiment 4 of the present invention. The digital input-output circuit includes a digital input module and a digital output module, the digital input module and the digital output module are located in the device under test, and the device under test includes a multi-channel digital input module and a multi-channel digital output module; Figure 5, the detection device includes: an instruction receiving module 510, a level control module 520, a level adjustment module 530 and a state detection module 540. Among them, the instruction receiving module 510 is used to receive control instructions; the level control module 520 is used to control the input level of each digital input module to be the same level, and the output level of each digital output module to be the same level according to the control instruction; the level adjustment module 530 is used to control each digital input module to change its input level in sequence according to the input level and the output level, and each digital output module to change its output level in sequence, and obtain the input level and output level after each change; or, the digital input modules are grouped, the input level of each group is controlled, the digital output modules are grouped, the output level of each group is controlled, and the input level and output level of each group are obtained; the state detection module 540 is used to determine whether each digital input module is normal and whether each digital output module is normal according to the obtained input level and output level.

[0084] In one embodiment, the device under test includes a total of n digital output modules from the first to the nth, where n is an integer greater than 2; the same level of each digital output module is a first level, and the first level is a high level or a low level; the level adjustment module 530 is used to control the mth digital output module to output a second level, and the output levels of the other digital output modules are the first level; the second level and the first level are opposite levels to each other, and m changes from 1 to n in sequence, and m is an integer.

[0085] Based on the above implementation, the status detection module 540 is specifically used to determine that the digital output modules are normal without short circuit or series connection if m is any integer greater than or equal to 1 and less than or equal to n, the output level of the mth digital output module is the second level, and the output levels of other digital output modules are the first level.

[0086] Optionally, the level adjustment module 530 includes a grouping unit and a level adjustment unit; wherein the grouping unit is used to group each digital output module multiple times; the level adjustment unit is used to control the even group in each grouping to output the second level, and the output level of the odd group is the first level; the second level and the first level are opposite levels to each other.

[0087] Optionally, based on the above-mentioned grouping unit and level adjustment unit, the status detection module 540 is specifically used to determine that each digital output module is normal without short circuit or series connection if the output level of the even group obtained after each grouping is the second level and the output level of the odd group is the first level.

[0088] Optionally, based on the above-mentioned grouping unit and level adjustment unit, the status detection module 540 is also used to determine that at least one of the digital output modules is abnormal if the output level of the even group after at least one grouping is the first level or the output level of the odd group is the second level.

[0089] The detection device for a digital input-output circuit provided in this embodiment and the detection method for a digital input-output circuit provided in any embodiment of the present invention belong to the same inventive concept and have corresponding beneficial effects. For technical details not detailed in this embodiment, please refer to the detection method for a digital input-output circuit provided in any embodiment of the present invention.

[0090] Embodiment 5

[0091] Figure 6 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. Figure 6 A block diagram of an exemplary electronic device 412 suitable for use in implementing embodiments of the present invention is shown. Figure 6 The electronic device 412 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0092] like Figure 6 As shown, the electronic device 412 is in the form of a general purpose device. The components of the electronic device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 connecting different system components (including the storage device 428 and the processor 416).

[0093] Bus 418 represents one or more of several types of bus structures, including a storage device bus or storage device controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Subversive Alliance (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0094] The electronic device 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 412, including volatile and non-volatile media, removable and non-removable media.

[0095] The storage device 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. The electronic device 412 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 434 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk, such as a read-only optical disk (Compact Disc Read-Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 418 via one or more data medium interfaces. The storage device 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0096] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in storage device 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 442 generally perform the functions and / or methods of the embodiments described herein.

[0097] The electronic device 412 may also communicate with one or more external devices 414 (e.g., a keyboard, a pointing terminal, a display 424, etc.), may also communicate with one or more terminals that enable a user to interact with the electronic device 412, and / or communicate with any terminal that enables the electronic device 412 to communicate with one or more other computing terminals (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 422. Furthermore, the electronic device 412 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 420. Figure 6As shown, the network adapter 420 communicates with other modules of the electronic device 412 via the bus 418. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 412, including but not limited to: microcode, terminal drivers, redundant processors, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.

[0098] The processor 416 executes various functional applications and data processing by running the program stored in the storage device 428, for example, implementing the detection method of the digital input-output circuit provided in the embodiment of the present invention, the digital input-output circuit includes a digital input module and a digital output module, the digital input module and the digital output module are located in the device under test, the device under test includes a multi-channel digital input module and a multi-channel digital output module, and the detection method includes:

[0099] Receive control instructions;

[0100] According to the control instruction, the input level of each digital input module is controlled to be the same level, and the output level of each digital output module is controlled to be the same level;

[0101] According to the input level and the output level, control each digital input module to sequentially change its input level, each digital output module to sequentially change its output level, and obtain the input level and output level after each change; or, group each digital input module, control the input level of each group, group each digital output module, control the output level of each group, and obtain the input level and output level of each group;

[0102] According to the acquired input levels of each group and output levels of each group, it is determined whether each digital input module is normal and whether each digital output module is normal.

[0103] Embodiment 6

[0104] Embodiment 6 of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, a detection method for a digital input-output circuit as provided in the embodiment of the present invention is implemented. The digital input-output circuit includes a digital input module and a digital output module. The digital input module and the digital output module are located in a device under test. The device under test includes a multi-channel digital input module and a multi-channel digital output module. The detection method includes:

[0105] Receive control instructions;

[0106] According to the control instruction, the input level of each digital input module is controlled to be the same level, and the output level of each digital output module is controlled to be the same level;

[0107] According to the input level and the output level, control each digital input module to sequentially change its input level, each digital output module to sequentially change its output level, and obtain the input level and output level after each change; or, group each digital input module, control the input level of each group, group each digital output module, control the output level of each group, and obtain the input level and output level of each group;

[0108] According to the acquired input levels of each group and output levels of each group, it is determined whether each digital input module is normal and whether each digital output module is normal.

[0109] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0110] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0111] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0112] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0113] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, combinations and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for detecting a digital input / output circuit, characterized in that: The digital input-output circuit includes a digital input module and a digital output module, the digital input module and the digital output module are located in the device under test, the device under test includes multiple digital input modules and multiple digital output modules, and the detection method includes: Receive control instructions; According to the control instruction, the input levels of the digital input modules of each channel are controlled to be the same level, and the output levels of the digital output modules of each channel are controlled to be the same level; According to the input level and the output level, control the digital input modules of each channel to sequentially change their respective input levels, and the digital output modules of each channel to sequentially change their respective output levels, and obtain the input level and the output level after each change; or, group the digital input modules of each channel, control the input level of each group, group the digital output modules of each channel, control the output level of each group, and obtain the input level and the output level of each group; According to the acquired input level and output level, it is determined whether each digital input module is normal and whether each digital output module is normal.

2. The detection method according to claim 1, characterized in that: The device under test comprises a total of n digital output modules from the first to the nth, where n is an integer greater than 2; the same level of the digital output modules of each channel is a first level, which is a high level or a low level; According to the input level and the output level, controlling each of the digital input modules to sequentially change their input levels, and each of the digital output modules to sequentially change their output levels, comprises: The m-th digital output module is controlled to output a second level, and the output levels of other digital output modules are the first level; the second level and the first level are opposite levels to each other, m changes from 1 to n in sequence, and m is an integer.

3. The detection method according to claim 2, characterized in that: Determining whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level includes: If m is any integer greater than or equal to 1 and less than or equal to n, the output level of the mth digital output module is the second level, and the output levels of other digital output modules are the first level, then it is determined that the digital output modules are normal without short circuit or series connection.

4. The detection method according to claim 1, characterized in that: The step of grouping the digital output modules of each channel, controlling the output level of each group, and obtaining the input level of each group and the output level of each group includes: Grouping the digital output modules of each channel into multiple groups; The even group in each grouping is controlled to output the second level, and the output level of the odd group is the first level; the second level and the first level are opposite levels to each other.

5. The detection method according to claim 4, characterized in that: The device under test includes a total of n digital output modules from the first to the nth, where n is an integer greater than 2; each time grouping is performed, each group has 2k-th digital output modules, where k gradually increases from 0, k is an integer and 2k-th is less than or equal to n.

6. The detection method according to claim 4, characterized in that: Determining whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level includes: If the output level of the even group obtained after each grouping is the second level, and the output level of the odd group obtained is the first level, it is determined that each of the digital output modules is normal without short circuit or series connection.

7. The detection method according to claim 4, characterized in that: Determining whether each digital input module is normal and each digital output module is normal according to the acquired input level and output level includes: If the output level of the even group after at least one grouping is the first level or the output level of the odd group is the second level, it is determined that at least one of the digital output modules is abnormal.

8. A detection device for a digital input-output circuit, characterized in that: The digital input-output circuit includes a digital input module and a digital output module, the digital input module and the digital output module are located in the device under test, and the device under test includes multiple digital input modules and multiple digital output modules; The detection device comprises: An instruction receiving module, used for receiving control instructions; A level control module, used to control the input levels of the digital input modules of each channel to be the same level, and the output levels of the digital output modules of each channel to be the same level according to the control instruction; A level adjustment module, configured to control the digital input modules of each channel to sequentially change their respective input levels, and the digital output modules of each channel to sequentially change their respective output levels according to the input level and the output level, and obtain the input level and the output level after each change; or, group the digital input modules of each channel to control the input level of each group, group the digital output modules of each channel to control the output level of each group, and obtain the input level and the output level of each group; The status detection module is used to determine whether each digital input module is normal and whether each digital output module is normal according to the acquired input level and output level.

9. A device, characterized in that: The device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the detection method as described in any one of claims 1 to 7 is implemented.