Digital quantity input and output system and method

By using a dual-channel 1OO2D architecture digital input/output system, and leveraging control unit collaborative diagnostics and safety responses, the high cost problem caused by complex system structure is solved, achieving a balance between safety and economy.

CN121806644APending Publication Date: 2026-04-07SUPCON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-04
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The complex structure of digital input/output systems in related technologies leads to high production and maintenance costs.

Method used

The digital input/output system adopts a dual-channel 1OO2D architecture. It performs fault diagnosis by working together with the first and second control units, uses a switch chip to exchange information, and performs operations when the switch states match or the sampling results are consistent; otherwise, it performs a safety response or fault diagnosis.

Benefits of technology

Without adding extra system architecture, it meets multiple safety standards, reduces system production and maintenance costs, and improves system fault tolerance and fault detection capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121806644A_ABST
    Figure CN121806644A_ABST
Patent Text Reader

Abstract

The invention discloses a digital quantity input and output system and method. The method comprises the steps that under the condition that the digital quantity input and output system is in a digital quantity output mode, a first control unit controls a first switch state of a first switch according to a first instruction, and a second control unit controls a second switch state of a second switch according to the first instruction, under the condition that the first switch state is matched with the second switch state, operation corresponding to the first switch state and the second switch state is executed on the receiving end equipment; and comparing the first sampling result with the second sampling result under the condition that the digital quantity input and output system is in a digital quantity input mode, and determining that the input data passes the verification under the condition that the first sampling result is consistent with the second sampling result. The technical problem of high production, operation and maintenance cost caused by a complex structure of a digital quantity input and output system in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial control, and more specifically, to a digital input / output system and method. Background Technology

[0002] Digital input / output systems in related technologies often have complex system structures to meet various security standards, resulting in high production and maintenance costs.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a digital input / output system and method to at least solve the technical problem of high production and maintenance costs caused by the complex structure of digital input / output systems in related technologies.

[0005] According to one aspect of the embodiments of this application, a digital input / output system is provided, comprising: a first control unit, a second control unit, a first sampling unit, a second sampling unit, and a data output unit, wherein the first control unit and the first sampling unit are connected, the second control unit and the second sampling unit are connected, and the first sampling unit and the second sampling unit sample the same input data; a first switch in the first control unit and the data output unit are connected, and a second switch in the second control unit and the data output unit are connected; when the digital input / output system is in digital input mode, the first control unit and the second control unit perform fault diagnosis on the first sampling unit and the second sampling unit through the data output unit; when the digital input / output system is in digital output mode, the first control unit and the second control unit perform fault diagnosis on the data output unit through the first sampling unit and the second sampling unit.

[0006] Optionally, when the digital input / output system is in digital output mode, the first control unit controls the first switch state of the first switch according to the first instruction, and the second control unit controls the second switch state of the second switch according to the first instruction; when the first switch state and the second switch state match, the receiving device performs an operation corresponding to the first switch state and the second switch state; when the first switch state and the second switch state do not match, the digital input / output system performs a preset safety response operation and performs fault diagnosis on the data output unit.

[0007] Optionally, when the digital input / output system is in digital input mode, the first sampling result and the second sampling result are compared; if the first sampling result and the second sampling result are consistent, the input data is determined to pass the verification; if the first sampling result and the second sampling result are inconsistent, the digital input / output system performs a preset security response operation and performs fault diagnosis on the first sampling unit and the second sampling unit.

[0008] Optionally, when the digital input / output system is in digital input mode, the fault diagnosis of the first sampling unit and the second sampling unit by the first control unit and the second control unit through the data output unit includes: the first control unit setting the first switch state of the first switch in the data output unit, and the second control unit setting the second switch state of the second switch in the data output unit; the first control unit acquiring the first sampling result of the preset feedback input signal through the first sampling unit, and the second control unit acquiring the second sampling result of the preset feedback input signal through the second sampling unit; and determining whether the first sampling unit and the second sampling unit have malfunctioned, and the type of malfunction, based on the first sampling result and the second sampling result.

[0009] Optionally, the fault diagnosis of the data output unit by the first control unit and the second control unit through the first sampling unit and the second sampling unit includes: according to preset diagnostic items, the first control unit controls the first switch state of the first switch, and the second control unit controls the second switch state of the second switch; the first control unit obtains the first state sampling result of the data output unit through the first sampling unit, and the second control unit obtains the second state sampling result of the data output unit through the second sampling unit, wherein the state of the data output unit corresponds to the first switch state and the second switch state; based on the first state sampling result and the second state sampling result, it is determined whether the data output unit has a fault, and the fault type.

[0010] Optionally, the first control unit and the second control unit are connected via a switch chip. The first control unit sends its first control unit information, including its operating frequency information and fault diagnosis information, to the second control unit via the switch chip. The second control unit sends its second control unit information, including its operating frequency information and fault diagnosis information, to the first control unit via the switch chip. The first control unit is used to perform fault diagnosis on the second control unit based on the second control unit information, and the second control unit is used to perform fault diagnosis on the first control unit based on the first control unit information.

[0011] Optionally, the digital input / output system also includes a third control unit, which is connected to the switch chip and provides an external communication interface for the first and second control units.

[0012] Optionally, the data output unit includes multiple parallel data output channels, wherein each data output channel is provided with a first switch and a second switch, the first switch being the high-side switch of the data output channel and the second switch being the low-side switch of the data output channel.

[0013] Optionally, the first sampling unit includes multiple parallel data sampling channels, and the second sampling unit includes multiple parallel data sampling channels, with a one-to-one correspondence between the data sampling channels in the first sampling unit and the data sampling channels in the second sampling unit.

[0014] According to another aspect of the embodiments of this application, a digital input / output method is also provided, applicable to a digital input / output system, comprising: when the digital input / output system is in digital output mode, a first control unit controls a first switch state of a first switch according to a first instruction, a second control unit controls a second switch state of a second switch according to a first instruction, and when the first switch state and the second switch state match, performing an operation corresponding to the first switch state and the second switch state on a receiving device; when the digital input / output system is in digital input mode, comparing a first sampling result and a second sampling result, and determining that the input data passes the verification when the first sampling result and the second sampling result are consistent.

[0015] Optionally, the method further includes: when the first switch state and the second switch state do not match, the digital input / output system performs a preset safety response operation and diagnoses the fault of the data output unit; and when the first sampling result and the second sampling result are inconsistent, the digital input / output system performs a preset safety response operation and diagnoses the fault of the first sampling unit and the second sampling unit.

[0016] Optionally, the method further includes: setting a first switch state of a first switch in a data output unit by a first control unit, and setting a second switch state of a second switch in a data output unit by a second control unit; acquiring a first sampling result of a preset feedback input signal by a first sampling unit by a first sampling unit, and acquiring a second sampling result of the preset feedback input signal by a second sampling unit by a second control unit; and determining whether the first sampling unit and the second sampling unit have malfunctioned, and the type of malfunction, based on the first sampling result and the second sampling result.

[0017] Optionally, the method further includes: according to preset diagnostic items, the first control unit controls the first switch state of the first switch, and the second control unit controls the second switch state of the second switch; the first control unit obtains the first state sampling result of the data output unit through the first sampling unit, and the second control unit obtains the second state sampling result of the data output unit through the second sampling unit, wherein the state of the data output unit corresponds to the first switch state and the second switch state; based on the first state sampling result and the second state sampling result, it is determined whether the data output unit has malfunctioned, and the type of malfunction.

[0018] In this embodiment, when the digital input / output system is in digital output mode, a first control unit controls the first switch state of a first switch according to a first instruction, and a second control unit controls the second switch state of a second switch according to a first instruction. When the first switch state and the second switch state match, the receiving device performs an operation corresponding to the first switch state and the second switch state. When the digital input / output system is in digital input mode, a first sampling result and a second sampling result are compared. When the first sampling result and the second sampling result are consistent, the input data is determined to pass the verification. By having the two control units work together to determine the output result or to verify the input data, the goal of satisfying multiple security standards is achieved without adding additional system structure to meet security standards. This achieves the technical effect of reducing system production and maintenance costs, and solves the technical problem of high production and maintenance costs caused by the complex structure of digital input / output systems in related technologies. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This is a schematic diagram of a digital input / output system according to an embodiment of this application;

[0021] Figure 2 This is a schematic diagram of another digital input / output system provided according to an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of a power supply method according to an embodiment of this application;

[0023] Figure 4 This is a schematic diagram of an adhesion fault diagnosis logic provided according to an embodiment of this application;

[0024] Figure 5This is a flowchart illustrating a digital input / output method according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:

[0028] SIL: Safety Integrity Levels are quantitative classifications of a safety-related system's ability to perform safety functions based on international standards (such as IEC 61508). The higher the level, the higher the probability that the system will complete its safety functions within a specified time.

[0029] Cat.: Category safety classification is a design classification method for safety-related components or systems in the field of mechanical safety (such as ISO 13849-1). It is divided according to hardware structure, fault detection mechanism, etc., and is used to determine the safety performance requirements of the system.

[0030] PL: Performance Level. In mechanical safety standards, this is a classification of the actual safety performance of a safety-related system. It reflects the system's ability to withstand dangers under specified conditions and is directly related to parameters such as hardware failure margin and safety failure score.

[0031] HFT: Hardware Fault Tolerance refers to the ability of a security-related system to maintain its security functions after a specified number of hardware failures. It is usually expressed as the number of tolerable failures (e.g., HFT = 1 means that 1 hardware failure can be tolerated).

[0032] SFF: Safe Failure Fraction is the ratio of the probability of a safety failure to the total probability of failure in a safety-related system. It is one of the core indicators for evaluating system safety and is used to determine the system's safety category and performance level.

[0033] 1OO2D: 2 out of 1 with diagnostics is an architecture configuration for a security-related system. It means that the system consists of two identical hardware channels. During normal operation, either channel can execute security functions, and it is equipped with a diagnostic mechanism to continuously monitor hardware faults to improve system security and reliability.

[0034] In the industrial sector, the commonly used safety standard is IEC 61508. Its safety level, such as SIL3, indicates that the probability of safety function failure is extremely low within a specified time, making it suitable for scenarios with extremely high safety requirements. The implementation of the SIL3 architecture can be determined by two safety parameters: HFT and SFF. A specific implementation scheme is as follows.

[0035] 1. Achieve SIL3 using a single-channel architecture with SFF ≥ 99% and HFT = 0;

[0036] 2. Achieve SIL3 using a dual-channel architecture with SFF ≥ 90% and HFT = 1;

[0037] 3. SIL3 is achieved through a three-channel architecture with SFF≥60% and HFT=2.

[0038] In mechanical safety applications, ISO 13849-1 is a standard for mechanical safety. "Cat.4" is the highest category, representing a system with comprehensive fault detection and control capabilities. "PLe" is the safety performance indicator under this standard, with PLe being the highest level, commonly used in mechanical systems such as robots and automated production lines. ISO 13849-1 requires Cat.4 systems to achieve Ple level by implementing mutual monitoring through dual channels.

[0039] In the field of automation equipment, such as production lines, elevators and lifting equipment, when the site needs to meet both SIL3 functional safety and Cat.4 / PLe mechanical safety standards for "control logic + mechanical execution", and has both input and output signal requirements, users can select 1-2 systems that meet IEC61508 and ISO13849-1 respectively from the market according to the actual system configuration. Each system needs to be equipped with different types of modules that meet the corresponding safety standard architecture, including controllers, input modules, output modules, communication modules, etc.

[0040] It can be seen that to meet different security standards, related technologies require the configuration of multiple systems, and each system needs to be configured with various different modules. Furthermore, these technologies suffer from low system integration, large size, low volumetric efficiency, and wasted hardware resources. Therefore, the production and maintenance costs of these systems are relatively high, and they also have certain requirements for the deployment environment.

[0041] To address this issue, relevant solutions are provided in the embodiments of this application, which are described in detail below.

[0042] According to an embodiment of this application, an embodiment of a digital input / output system is provided. Figure 1 This is a schematic diagram of the system structure, from Figure 1 As can be seen from the diagram, the system includes: a first control unit 01, a second control unit 02, a first sampling unit 03, a second sampling unit 04, and a data output unit 05. The first control unit 01 and the first sampling unit 03 are connected, the second control unit 02 and the second sampling unit 04 are connected, and the first sampling unit 03 and the second sampling unit 04 sample the same input data. The first control unit 01 and the first switch in the data output unit 05 are connected, and the second control unit 02 and the second switch in the data output unit 05 are connected.

[0043] When the digital input / output system is in digital input mode, the first control unit 01 and the second control unit 02 perform fault diagnosis on the first sampling unit 03 and the second sampling unit 04 through the data output unit 05.

[0044] When the digital input / output system is in digital output mode, the first control unit 01 and the second control unit 02 perform fault diagnosis on the data output unit 05 through the first sampling unit 03 and the second sampling unit 04.

[0045] In some embodiments of this application, such as Figure 2As shown, the first control unit 01 and the second control unit 02 are connected via a switch chip. The first control unit 01 sends its first control unit 01 information to the second control unit 02 via the switch chip. The first control unit 01 information includes the operating frequency information and fault diagnosis information of the first control unit 01. The second control unit 02 sends its second control unit 02 information to the first control unit 01 via the switch chip. The first control unit 01 information includes the operating frequency information and fault diagnosis information of the second control unit 02. The first control unit 01 is used to perform fault diagnosis on the second control unit 02 based on the second control unit 02 information, and the second control unit 02 is used to perform fault diagnosis on the first control unit 01 based on the first control unit 01 information. Figure 2 In this context, MCU1 is the first control unit 01, MCU2 is the second control unit 02, and MCU3 is the third control unit 06.

[0046] In some embodiments of this application, the digital input / output system further includes a third control unit 06, which is connected to the switch chip and provides external communication interfaces for the first control unit 01 and the second control unit 02. The communication interfaces include RJ45 and RS485, enabling high-speed data interaction with external electronic devices (such as computers, touchscreens, switches, or host computers), and supporting remote control and network networking to meet the network topologies of different usage environments.

[0047] Optional, such as Figure 2 As shown, the digital input / output system comprises five parts: a power supply circuit, dual-channel voting CPUs MCU1 and MCU2, an input circuit, an output circuit, and a communication CPU (i.e., the third control unit MCU3). The system-side power supply circuit obtains two 3.3V1 and 3.3V2 power supplies to the two voting MCUs via DC-DC converters and LDOs. When the digital input / output system is configured in DO (digital output) mode, the DI (digital input) circuit can be used as a diagnostic circuit for DO circuit diagnosis. When the digital input / output system is configured in DI mode, the DO circuit can be used as an auxiliary diagnostic circuit for DI circuit diagnosis. The communication CPU serves as an external interface CPU, used for communication with external interfaces and for receiving and uploading data to the control layer. It should be noted that the specific figures mentioned in the embodiments of this application are for illustrative purposes only and do not represent a limitation on the solution provided in this application. The DI circuit includes a first sampling unit 03 and a second sampling unit 04, and the DO circuit includes a data output unit 05.

[0048] In some embodiments of this application, the power supply circuit is as follows: Figure 3 As shown. From Figure 3As can be seen, to ensure module availability, the module employs redundant power supply, drawing from two 24V system-side power inputs. These are converted to 5V via a DC-DC converter. The 5V power is then converted to 3.3V1 and 3.3V2 via two DC-DC converters to power MCU1 and MCU2 respectively. Furthermore, the two voting CPUs independently read back and diagnose each other's power supplies to ensure high system reliability.

[0049] As an optional implementation, safety-related circuits such as the MCU utilize a 3.3V power supply. Therefore, the 3.3V power supply on the system side is protected by an over / under voltage diagnostic circuit. This detection circuit cuts off the 3.3V_S output power supply when it detects that the circuit voltage exceeds 3.6V or falls below 3.0V (diagnostic accuracy is 3%), in order to protect the downstream circuitry. The 3.3V power supply circuit includes the MCU circuit, the Isolator circuit, the WDT watchdog circuit, and the LED circuit.

[0050] As an optional implementation, the field-side DO circuit can be powered by an external 24V safety power supply. Here, "field-side" refers to the side of the module that is directly connected to external devices such as actuators and sensors in the industrial field during actual operation; it is the interface through which the module interacts with the "physical execution / sensing link."

[0051] In some embodiments of this application, the externally provided system power supply and field power supply are also equipped with a safe over / under voltage shutdown function.

[0052] In some embodiments of this application, the dual channels of the digital input / output system can cross-diagnose the operating voltage of the other end and guide the current channel to a safe state in case of a fault. Optionally, the dual channels of the digital input / output system are two sets of collaborative control channels with the first control unit 01 (MCU1) and the second control unit 02 (MCU2) as the core, and equipped with independent power supply links, independent SPI communication links, and safety auxiliary circuits (isolation, watchdog, etc.). Furthermore, adopting a 1OO2D architecture (HFT=1), fault detection can be achieved through cross-diagnosis of the operating voltage, data flow, and IO channel status of the other end. Fault tolerance ensures that the other channel can still complete safe actions when one channel fails. This satisfies the IEC61508 standard SIL3 functional safety target (SFF≥90%) and the ISO13849-1 standard Cat.4 / PLe mechanical safety target, and also enables flexible single-card configuration through mutual diagnosis of DI / DO channels, combining the advantages of high integration, small size, and low cost.

[0053] As can be seen, the dual-channel digital input / output system provided in this application embodiment has higher fault tolerance and fault detection capabilities. Regarding fault tolerance, even if one channel fails due to a fault, the other channel can still independently complete the safety action, preventing danger from occurring. Regarding fault detection, if the outputs of the two channels are inconsistent (e.g., one triggers a safety action while the other does not), the system will determine that a fault exists and immediately initiate a safety response (e.g., shutdown), while simultaneously issuing a fault alarm to prevent the fault from being masked and causing subsequent risks.

[0054] In some embodiments of this application, communication between the MCU and the DI and DO circuits is achieved via the SPI bus. The W-SPI1 write signal of MCU1 is used to control the switching of SW1 in multiple (e.g., 8) DO circuits, and the R-SPI1 read signal of MCU1 is used to read the input status of multiple DI1 circuits. The W-SPI2 write signal of MCU2 is used to control the switching of SW2 in multiple DO circuits, and the R-SPI2 read signal of MCU2 is used to read the input status of multiple DI2 circuits. The two SPI channels implement data transmission and reception and DI / DO channel diagnostics through the following diagnostic mechanism:

[0055] 1. All data packets are checked for data integrity using CRC; otherwise, input / output signals are set to a safe state.

[0056] 2. If MCU1 and MCU2 do not receive valid data or response within the timeout period, the input / output signals will be set to a safe state.

[0057] 3. The fault status remains locked until the fault confirmation button or fault confirmation command is pressed to unlock it.

[0058] As an optional implementation, the data output unit 05 includes multiple parallel data output channels, wherein each data output channel is provided with a first switch and a second switch, the first switch being the high-side switch of the data output channel and the second switch being the low-side switch of the data output channel.

[0059] In some embodiments of this application, the first sampling unit 03 includes multiple parallel data sampling channels, the second sampling unit 04 includes multiple parallel data sampling channels, and the data sampling channels in the first sampling unit 03 and the data sampling channels in the second sampling unit 04 correspond one-to-one.

[0060] In some embodiments of this application, fault diagnosis and safety assurance for the first control unit 01 and the second control unit 02 can be achieved in the following ways:

[0061] The control cycles of the first control unit 01 and the second control unit 02 are synchronized. Each cycle, the input / output signals are voted on 1002. If the input / output signals are found to be inconsistent with expectations, the digital input / output system is brought into a safe state. At the same time, the two control units cross-diagnose the data stream. If faults such as incorrect serial numbers, exceeding the time window range, or CRC check errors are detected, the receiver will bring the corresponding channel into a safe state. In addition, each cycle, the first control unit 01 and the second control unit 02 themselves will be diagnosed, covering components such as the CPU, variable memory, and communication bus. After a fault is detected, a restart will be attempted. If the fault still exists after 3 restarts, the channel will enter a safe state. The IO channels (including the first sampling unit 03, the second sampling unit 04, and the data output unit 05) will also be diagnosed. After an IO fault is diagnosed, the input / output will be set to a safe value. All fault states will be locked until the fault confirmation button is pressed or the fault confirmation command is used to unlock them.

[0062] In some embodiments of this application, when the digital input / output system is in digital output mode, the first control unit 01 controls the first switch state of the first switch according to the first instruction, and the second control unit 02 controls the second switch state of the second switch according to the first instruction; when the first switch state and the second switch state match, the receiving device performs an operation corresponding to the first switch state and the second switch state; when the first switch state and the second switch state do not match, the digital input / output system performs a preset safety response operation and performs fault diagnosis on the data output unit 05.

[0063] In some embodiments of this application, fault diagnosis of the data output unit 05 by the first control unit 01 and the second control unit 02 through the first sampling unit 03 and the second sampling unit 04 includes: according to preset diagnostic items, the first control unit 01 controls the first switch state of the first switch, and the second control unit 02 controls the second switch state of the second switch; the first control unit 01 obtains the first state sampling result of the data output unit 05 through the first sampling unit 03, and the second control unit 02 obtains the second state sampling result of the data output unit 05 through the second sampling unit 04, wherein the state of the data output unit 05 corresponds to the first switch state and the second switch state; based on the first state sampling result and the second state sampling result, it is determined whether the data output unit 05 has malfunctioned, and the type of malfunction.

[0064] In some embodiments of this application, the data output unit 05 (i.e., digital output circuit) includes multiple (e.g., 8) parallel data output channels. Each data output channel is equipped with a first switch (high-side switch) and a second switch (low-side switch). The first switch is connected to the first control unit 01, and the second switch is connected to the second control unit 02. The first control unit 01 and the second control unit 02 control the on / off state of the corresponding switches, respectively. All jog diagnostic processes are completed within a preset duration (e.g., 2ms), without causing relay operation. Furthermore, the jog sequence output value is independent of the real-time output data. When the digital input / output system is configured in digital output mode, the first sampling unit 03 and the second sampling unit 04 can be used as a feedback diagnostic circuit for fault diagnosis of the data output unit 05.

[0065] Optionally, switch fault diagnosis is achieved through periodic control. The first control unit 01 periodically controls the first switch to open and close for inching diagnosis to troubleshoot the first switch. The second control unit 02 periodically controls the second switch to open and close for inching diagnosis to troubleshoot the second switch. When a fault is diagnosed in the first switch, the second control unit 02 controls the second switch to open, ensuring that the data output unit 05 outputs a fault safety value OFF. When a fault is diagnosed in the second switch, the first control unit 01 controls the first switch to open, similarly ensuring that the data output unit 05 outputs a fault safety value OFF.

[0066] In some embodiments of this application, during line short-circuit diagnosis, the first switch has a built-in loop short-circuit diagnosis function. The short-circuit diagnosis signal detected by the first switch is transmitted to the first control unit 01 via SPI communication. When the loop is in the ON state (logic "1"), the first control unit 01 controls the first switch and the second control unit 02 controls the second switch to both output ON. If a short-circuit fault occurs in the external load, the first switch will transmit the diagnostic information to the first control unit 01, which will then report the short-circuit fault. When the loop is in the OFF state (logic "0"), the outputs of the first and second switches are turned ON by jogging, and after holding for 1ms, the current passing through the loop is detected to determine whether there is a short circuit in the loop.

[0067] As an optional implementation, in the line open circuit diagnosis, the first switch has a built-in loop open circuit diagnosis function. The open circuit diagnosis signal detected by the first switch is transmitted to the first control unit 01 via SPI communication. When the loop is in the ON state, the first control unit 01 controls the first switch and the second control unit 02 controls the second switch to output ON. If an open circuit fault occurs in the external load, the first switch and the second switch are used to perform open circuit detection. The detection result is transmitted to the first control unit 01 in the form of diagnostic information, and the first control unit 01 reports the open circuit fault. When the loop is in the OFF state (logic "0"), the output of the first switch and the second switch is turned ON by jogging. The state is then read back by the first sampling unit 03 and the second sampling unit 04 to determine whether there is an open circuit fault in the loop.

[0068] In some embodiments of this application, when an output circuit fault occurs, indicating that the data output unit 05 malfunctions and cannot control the load to operate normally, the diagnosis is achieved through multiple sets of switch state combinations and readback verification: First control unit 01 controls the first switch to close, and second control unit 02 controls the second switch to close, making the circuit output ON. The output state is read back through first sampling unit 03 and second sampling unit 04 and compared with the expected state. If they match, the first and second switches are determined to be working normally; otherwise, the first or second switch is determined to have a stuck OFF fault. Alternatively, first control unit 01 controls the first switch to open, and second control unit 02 controls the second switch to close, making the circuit output OFF. The output state is read back through first sampling unit 03 and second sampling unit 04 and compared with the expected state. If they match, the first switch is determined to be working normally; otherwise, the first switch is determined to have a stuck ON fault. Finally, first control unit 01 controls the first switch to close, and second control unit 02 controls the second switch to open, making the circuit output OFF. The output state is read back through first sampling unit 03 and second sampling unit 04 and compared with the expected state. If they match, the second switch is determined to be working normally; otherwise, the second switch is determined to have a stuck ON fault. ON fault; the first control unit 01 controls the first switch to open and the second control unit 02 controls the second switch to open, so that the circuit output is OFF. The output status is read back through the first sampling unit 03 and the second sampling unit 04 and compared with the expected status. If they are consistent, it is determined that the first switch or the second switch is working normally; otherwise, it is determined that the first switch and the second switch have a stuck ON fault. When performing jog diagnosis on the signal of one of the data output channels, the other multiple channels (such as 7 channels) maintain real-time value output.

[0069] In some embodiments of this application, line sticking and crosstalk faults in digital output mode refer to the sticking between the pins of the first control unit 01 and the second control unit 02 that control the first switch and the second switch, or between the switch pins of different data output channels, causing the switches to fail to turn on and off as required. During diagnosis, first assume the current loop outputs a real-time value. The first control unit 01 controls the first switch of all data output channels to close, and the second control unit 02 controls the second switch of all data output channels to maintain its current state. At this point, the loop output real-time value should remain unchanged. Then, control the second switch of channel 1 to flip (1→0), and the real-time output value of channel 1 should change accordingly (ON→OFF). If the real-time output values ​​of other channels change simultaneously, it indicates that there is a connection between the control pin of the corresponding channel of the second control unit 02 and the control pin of channel 1, or between the second switch of the corresponding channel and the second switch pin of channel 1. Diagnose multiple (e.g., 8) data output channels in this manner. Then, the second control unit 02 controls the second switches of all data output channels to close, and the first control unit 01 controls the first switches of multiple (e.g., 8) data output channels to flip simultaneously. If the real-time output values ​​of other channels change simultaneously, it indicates that there is a connection between the control pin of the corresponding channel of the first control unit 01, or between the first switch pin of the corresponding channel. The specific diagnostic logic is as follows: Figure 4 As shown.

[0070] In some embodiments of this application, taking the eight-channel data output unit 05 as an example, the following process can be used to determine whether an adhesion fault has occurred:

[0071] 1) Assume the current loop output real-time value is .

[0072] 2) The first control unit 01 controls the first switch of the 8-channel circuit to close, and the second control unit 02 controls the second switch of the 8-channel circuit to remain open. At this time, the real-time value of the circuit output remains unchanged. .

[0073] 3) Control the second switch of channel 1 to flip (1→0), and the real-time output value of channel 1 changes (ON→OFF). At this time, the real-time output value of the loop should be... If the real-time output values ​​of other channels change simultaneously, it indicates that the control pin of that channel in the second control unit 02 is stuck to the control pin of the first channel, or that the second switch pin of that channel is stuck to the second switch pin of the first channel. Diagnose all 8 channels sequentially. The diagnostic logic diagram is as follows: Figure 3 As shown.

[0074] 4) The second control unit 02 controls the second switch of channel 8 to close, and the first control unit 01 sequentially controls the first switch of channel 8 to flip. If the real-time output values ​​of other channels change simultaneously, it indicates that the first switch pin controlled by the first control unit 01 is stuck or the first switch pin is stuck. Diagnose channel 8 sequentially.

[0075] In some embodiments of this application, Figure 2 The fault diagnosis methods for other components in the circuit shown are as follows: An open circuit in the freewheeling diode D1 has no impact on the safety function, while a short circuit indicates a safety failure and can be diagnosed as a line short circuit fault; Open and short circuits in pull-down resistors R1 and R2 have no impact on the safety function; A short circuit in the auxiliary power control switch SW1 has no impact on the safety function, while an open circuit indicates a safety failure and can be diagnosed as a line open circuit fault; An open circuit in switch SW2 has no impact on the safety function, while a short circuit indicates a safety failure and can be diagnosed as a line short circuit fault.

[0076] In some embodiments of this application, when the digital input / output system is in digital input mode, the first sampling result and the second sampling result are compared; if the first sampling result and the second sampling result are consistent, the input data is determined to pass the verification; if the first sampling result and the second sampling result are inconsistent, the digital input / output system performs a preset security response operation and performs fault diagnosis on the first sampling unit 03 and the second sampling unit 04.

[0077] Optionally, when the digital input / output system is in digital input mode, the fault diagnosis of the first sampling unit 03 and the second sampling unit 04 by the first control unit 01 and the second control unit 02 through the data output unit 05 includes: the first control unit 01 setting the first switch state of the first switch in the data output unit 05, and the second control unit 02 setting the second switch state of the second switch in the data output unit 05; the first control unit 01 acquiring the first sampling result of the preset feedback input signal through the first sampling unit 03, and the second control unit 02 acquiring the second sampling result of the preset feedback input signal through the second sampling unit 04; and determining whether the first sampling unit 03 and the second sampling unit 04 have malfunctioned, and the type of malfunction, based on the first sampling result and the second sampling result.

[0078] The digital input circuit (i.e., DI circuit) includes a first sampling unit 03 and a second sampling unit 04, and has multiple (e.g., 8) parallel data sampling channels. Each data sampling channel is equipped with two independent sampling circuits, corresponding to the first sampling unit 03 and the second sampling unit 04 respectively. The two can sample the same external input data and perform logical judgment. When the digital input / output system is configured in digital input mode, the data output unit 05 can be used as an auxiliary diagnostic circuit for fault diagnosis of the digital input circuit.

[0079] Input circuit faults refer to abnormalities in the input logic of digital input circuits, leading to incorrect sampling results. Diagnosis revolves around the operating states of the first sampling unit 03 and the second sampling unit 04: Under normal operating conditions, the first control unit 01 controls the first switch in the data output unit 05 to close, and the second control unit 02 controls the second switch in the data output unit 05 to open. The first control unit 01 checks the logic state of the input signal through the first sampling unit 03, and the second control unit 02 checks the logic state of the input signal through the second sampling unit 04. The two control units compare the checked values; if the sampled values ​​are inconsistent, it is determined that either the first sampling unit 03 or the second sampling unit 04 has failed. In the normal ON state, the first control unit 01 reads an open-circuit fault through the first switch. Short-circuit diagnosis of the data sampling channel can be achieved through external test pulses.

[0080] Line sticking and crosstalk faults refer to the sticking between the pins of the first control unit 01 and the second control unit 02 when reading the first sampling unit 03 and the second sampling unit 04, or between the sampling pins of different data sampling channels, resulting in incorrect sampling results. The diagnosis is achieved by performing a jog diagnosis on the DI signal of the data sampling channel with the return value OFF. The specific process is as follows: First, assume that the current loop is reading the real-time value. The first control unit 01 controls the first switch to open, and the second control unit 02 controls the second switch to open. The first control unit 01 and the second control unit 02 compare the return values ​​through the first sampling unit 03 and the second sampling unit 04, respectively, and control the real-time value of the first channel to change (1→0). At this time, the loop reads the real-time value accordingly. If it does not change as expected, it indicates that the read-back pin or sampling pin of the first channel is sticking. Multiple (e.g., 8) data sampling channels are diagnosed in this way.

[0081] The fault diagnosis results for other components in the circuit are as follows: A short circuit in the auxiliary power control switch SW1 has no impact on the safety function; an open circuit indicates a safety failure and can be diagnosed as an open circuit fault. An open circuit in the freewheeling diode D1 has no impact on the safety function; a short circuit indicates a short circuit fault in the data sampling channel. An open circuit in the signal pull-down resistor R1 indicates a safety failure and can be diagnosed as an open circuit fault; a short circuit in R1 has no impact on the safety function. An open circuit in the signal pull-down resistor R2 indicates a safety failure and can be diagnosed as an open circuit fault; a short circuit in R2 has no impact on the safety function. An open circuit in switch SW2 has no impact on the safety function; a short circuit indicates a safety failure and can be diagnosed as a short circuit fault.

[0082] In summary, this application provides a digital input / output system. This system adopts a 1OO2D architecture with HFT = 1, simultaneously achieving SFF ≥ 90%, meeting the functional safety target of SIL3, and realizing the mechanical safety target of PLe through a Cat.4 architecture. Furthermore, this system 1. fully utilizes hardware resources, is small in size, highly integrated, and low in cost. Utilizing diagnostic circuits within the safety architecture, mutual diagnostics between the DI and DO channels enable flexible configuration of both DI and DO safety signal types on a single card. Simultaneously, this module integrates an external communication interface (RS485) and a data interface to the control layer (configuration download and data upload).

[0083] According to an embodiment of this application, a method embodiment of a digital input / output method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0084] Under the above operating environment, embodiments of this application provide a digital input / output method, such as... Figure 5 As shown, the method includes the following steps:

[0085] Step S502: When the digital input / output system is in digital output mode, the first control unit controls the first switch state of the first switch according to the first instruction, the second control unit controls the second switch state of the second switch according to the first instruction, and when the first switch state and the second switch state match, the receiving device performs an operation corresponding to the first switch state and the second switch state.

[0086] If the first switch state and the second switch state do not match, the digital input / output system performs a preset safety response operation and diagnoses the fault in the data output unit.

[0087] Step S504: When the digital input / output system is in digital input mode, compare the first sampling result and the second sampling result, and if the first sampling result and the second sampling result are consistent, determine that the input data passes the verification.

[0088] If the first sampling result and the second sampling result are inconsistent, the digital input / output system executes a preset safety response operation and performs fault diagnosis on the first sampling unit and the second sampling unit.

[0089] In some embodiments of this application, the method further includes: setting a first switch state of a first switch in a data output unit by a first control unit, and setting a second switch state of a second switch in a data output unit by a second control unit; acquiring a first sampling result of a preset feedback input signal by a first sampling unit by a first sampling unit, and acquiring a second sampling result of the preset feedback input signal by a second sampling unit by a second control unit; and determining whether the first sampling unit and the second sampling unit have malfunctioned, and the type of malfunction, based on the first sampling result and the second sampling result.

[0090] In some embodiments of this application, the method further includes: according to preset diagnostic items, a first control unit controls a first switch state of a first switch, and a second control unit controls a second switch state of a second switch; the first control unit obtains a first state sampling result of a data output unit through a first sampling unit, and the second control unit obtains a second state sampling result of a data output unit through a second sampling unit, wherein the state of the data output unit corresponds to the first switch state and the second switch state; based on the first state sampling result and the second state sampling result, it is determined whether a fault has occurred in the data output unit, and the type of fault.

[0091] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0092] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0093] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0094] Furthermore, the functional units in the various embodiments of this application 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 integrated unit can be implemented in hardware or as a software functional unit.

[0095] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0096] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A digital input / output system, characterized in that, It includes a first control unit, a second control unit, a first sampling unit, a second sampling unit, and a data output unit, wherein... The first control unit is connected to the first sampling unit, the second control unit is connected to the second sampling unit, and the first sampling unit and the second sampling unit sample the same input data; The first control unit is connected to the first switch in the data output unit, and the second control unit is connected to the second switch in the data output unit; When the digital input / output system is in digital input mode, the first control unit and the second control unit perform fault diagnosis on the first sampling unit and the second sampling unit through the data output unit; When the digital input / output system is in digital output mode, the first control unit and the second control unit perform fault diagnosis on the data output unit through the first sampling unit and the second sampling unit.

2. The digital input / output system according to claim 1, characterized in that, When the digital input / output system is in digital output mode, the first control unit controls the first switch state of the first switch according to the first instruction, and the second control unit controls the second switch state of the second switch according to the first instruction. When the first switch state and the second switch state match, the receiving device performs an operation corresponding to the first switch state and the second switch state; If the first switch state and the second switch state do not match, the digital input / output system performs a preset safety response operation and diagnoses the fault in the data output unit.

3. The digital input / output system according to claim 1, characterized in that, When the digital input / output system is in digital input mode, compare the first sampling result and the second sampling result; If the first sampling result and the second sampling result are consistent, the input data is determined to have passed the verification. If the first sampling result and the second sampling result are inconsistent, the digital input / output system performs a preset security response operation and performs fault diagnosis on the first sampling unit and the second sampling unit.

4. The digital input / output system according to claim 1, characterized in that, When the digital input / output system is in digital input mode, the fault diagnosis of the first sampling unit and the second sampling unit by the first control unit and the second control unit through the data output unit includes: The first control unit sets the first switch state of the first switch in the data output unit, and the second control unit sets the second switch state of the second switch in the data output unit; The first control unit acquires a first sampling result of the preset back-check input signal through the first sampling unit, and the second control unit acquires a second sampling result of the preset back-check input signal through the second sampling unit; Based on the first sampling result and the second sampling result, determine whether the first sampling unit and the second sampling unit have malfunctioned, and the type of malfunction.

5. The digital input / output system according to claim 1, characterized in that, The fault diagnosis of the data output unit by the first control unit and the second control unit through the first sampling unit and the second sampling unit includes: Based on preset diagnostic items, the first control unit controls the first switch state of the first switch, and the second control unit controls the second switch state of the second switch; The first control unit obtains the first state sampling result of the data output unit through the first sampling unit, and the second control unit obtains the second state sampling result of the data output unit through the second sampling unit, wherein the state of the data output unit corresponds to the first switch state and the second switch state; Based on the first state sampling result and the second state sampling result, determine whether the data output unit has malfunctioned and the type of malfunction.

6. The digital input / output system according to claim 1, characterized in that, The first control unit and the second control unit are connected via a switch chip, wherein, The first control unit sends first control unit information to the second control unit through the switch chip. The first control unit information includes the operating frequency information and fault diagnosis information of the first control unit. The second control unit sends its second control unit information to the first control unit via the switch chip. The first control unit information includes the operating frequency information and fault diagnosis information of the second control unit. The first control unit is used to diagnose faults in the second control unit based on the information from the second control unit, and the second control unit is used to diagnose faults in the first control unit based on the information from the first control unit.

7. The digital input / output system according to claim 6, characterized in that, The digital input / output system also includes a third control unit, wherein... The third control unit is connected to the switch chip and provides an external communication interface for the first control unit and the second control unit.

8. The digital input / output system according to claim 1, characterized in that, The data output unit includes multiple parallel data output channels, wherein each data output channel is provided with a first switch and a second switch, the first switch being the high-side switch of the data output channel and the second switch being the low-side switch of the data output channel.

9. The digital input / output system according to claim 1, characterized in that, The first sampling unit includes multiple parallel data sampling channels, and the second sampling unit includes multiple parallel data sampling channels, with a one-to-one correspondence between the data sampling channels in the first sampling unit and the data sampling channels in the second sampling unit.

10. A digital input / output method, applicable to the digital input / output system described in claim 1, characterized in that, include: When the digital input / output system is in digital output mode, the first control unit controls the first switch state of the first switch according to the first instruction, the second control unit controls the second switch state of the second switch according to the first instruction, and performs an operation corresponding to the first switch state and the second switch state on the receiving device when the first switch state and the second switch state match. When the digital input / output system is in digital input mode, the first sampling result and the second sampling result are compared, and if the first sampling result and the second sampling result are consistent, the input data is determined to pass the verification.

11. The digital input / output method according to claim 10, characterized in that, The method further includes: If the first switch state and the second switch state do not match, the digital input / output system executes a preset safety response operation and performs fault diagnosis on the data output unit; and, If the first sampling result and the second sampling result are inconsistent, the digital input / output system performs a preset security response operation and performs fault diagnosis on the first sampling unit and the second sampling unit.

12. The digital input / output method according to claim 10, characterized in that, The method further includes: The first control unit sets the first switch state of the first switch in the data output unit, and the second control unit sets the second switch state of the second switch in the data output unit; The first control unit acquires a first sampling result of the preset back-check input signal through the first sampling unit, and the second control unit acquires a second sampling result of the preset back-check input signal through the second sampling unit; Based on the first sampling result and the second sampling result, determine whether the first sampling unit and the second sampling unit have malfunctioned, and the type of malfunction.

13. The digital input / output method according to claim 10, characterized in that, The method further includes: Based on preset diagnostic items, the first control unit controls the first switch state of the first switch, and the second control unit controls the second switch state of the second switch; The first control unit obtains the first state sampling result of the data output unit through the first sampling unit, and the second control unit obtains the second state sampling result of the data output unit through the second sampling unit, wherein the state of the data output unit corresponds to the first switch state and the second switch state; Based on the first state sampling result and the second state sampling result, determine whether the data output unit has malfunctioned and the type of malfunction.