A universal I / O module and control method

By designing a general-purpose I/O module and utilizing controllable switches and signal conditioning circuits to achieve adaptive conversion of various signal types, the problem of increased I/O module quantity and resource waste is solved, system cost and maintenance difficulty are reduced, and resource utilization is improved.

CN119644887BActive Publication Date: 2026-01-09SUPCON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411924293.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2026-01-09
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In existing automated control systems, different types of I/O modules cannot be substituted for each other, resulting in an increase in the number of I/O modules, high system cost, complex assembly and difficult maintenance, and problems of idle or insufficient channel resources.

Method used

Design a general-purpose I/O module that can adapt to multiple channel types, including AI, DI, AO, and DO signals, through controllable switches and signal conditioning circuits. Utilize a control unit to execute control logic for different signal types to achieve flexible signal conversion and diagnostics.

Benefits of technology

It reduces the types and number of I/O modules, lowers system costs and maintenance difficulty, improves resource utilization, adapts to different application needs, and avoids idle and wasted channel resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644887B_ABST
    Figure CN119644887B_ABST
Patent Text Reader

Abstract

The application discloses a universal I / O module and a control method, which can flexibly adapt to various channel types. The universal I / O module comprises a control unit, a controllable switch SW3, a first ADC, a first signal conditioning circuit, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2, a resistor R3, a controllable switch SW2, a DAC and a second signal conditioning circuit. The first end of the SW3 is connected with the input end of the first signal conditioning circuit. The SW5 and the R1 are connected in series and then connected between the first end of the SW3 and the ground. The SW4, the R2 and the R3 are connected in series and then connected between the first end of the SW3 and the ground. The voltage between the R1 and the R2 is input into the input end of the first signal conditioning circuit. The output end of the first signal conditioning circuit is connected with the control unit through the first ADC. The input end of the SW2 is connected with a power supply, the output end of the SW2 is connected with the first end of the SW3, and the SW2 is a P-type switch tube.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automation control, and in particular to a general I / O module and a control method. BACKGROUND

[0002] At present, the I / O (Input / Output) channels of an automation control system are mainly in the form of I / O modules, each I / O module containing multiple I / O channels of the same type, such as AI (Analog Input) channels, DI (Digital Input) channels, AO (Analog Output) channels and DO (Digital Output) channels. However, since I / O modules of different channel types cannot be replaced by each other, as the system scale expands, the number of I / O modules required increases significantly, which can lead to a series of problems, including high system cost, complex system construction, and great difficulty in later maintenance and management. SUMMARY

[0003] In view of the above problems, the present application provides a general I / O module and a control method to enable the same I / O module to flexibly adapt to multiple channel types. The specific scheme is as follows:

[0004] The first aspect of the present application provides a general I / O module, comprising: a control unit, an input unit, an output unit and a controllable switch SW3;

[0005] The input unit comprises: a first analog / digital converter, a first signal conditioning circuit, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2 and a resistor R3;

[0006] The first end of the controllable switch SW3 is connected to the input end of the first signal conditioning circuit; the second end of the controllable switch SW3 simultaneously serves as an analog input AI channel inlet, a digital input DI channel inlet, an analog output AO channel outlet and a digital output DO channel outlet;

[0007] The controllable switch SW5 and the resistor R1 are connected in series and then connected between the first end of the controllable switch SW3 and the ground;

[0008] The controllable switch SW4, the resistor R2 and the resistor R3 are connected in series and then connected between the first end of the controllable switch SW3 and the ground;

[0009] The voltages across the resistor R1 and the resistor R2 are both sent to the input end of the first signal conditioning circuit; the output end of the first signal conditioning circuit is connected to the control unit through the first analog / digital converter;

[0010] The output unit comprises a controllable switch SW2, a digital / analog converter and a second signal conditioning circuit.

[0011] The input end of the controllable switch SW2 is connected to the power supply, and the output end of the controllable switch SW2 is connected to the first end of the controllable switch SW3; the controllable switch SW2 is a P-type switch tube.

[0012] The control unit is connected to the control end of the controllable switch SW2 through the digital / analog converter and the second signal conditioning circuit.

[0013] The control end of the controllable switch SW3, the control end of the controllable switch SW4 and the control end of the controllable switch SW5 are connected to the control unit.

[0014] The control unit is configured to control the controllable switch SW3 and the controllable switch SW5 to be closed and control the controllable switch SW2 and the controllable switch SW4 to be disconnected when the signal type is configured as an AI signal; control the controllable switch SW3 and the controllable switch SW4 to be closed and control the controllable switch SW2 and the controllable switch SW5 to be disconnected when the signal type is configured as a DI signal; control the controllable switch SW3 to be closed and control the controllable switch SW4 and the controllable switch SW5 to be disconnected when the signal type is configured as a DO signal, and control the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit to make the controllable switch SW2 work in a saturation region when the DO signal is at a high level, and control the controllable switch SW2 to be disconnected when the DO signal is at a low level; control the controllable switch SW3 to be closed and control the controllable switch SW4 and the controllable switch SW5 to be disconnected when the signal type is configured as an AO signal, and control the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit to make the controllable switch SW2 work in a variable resistance region.

[0015] In a possible implementation, the universal I / O module further comprises a resistor R5 and a feedback circuit; the feedback circuit is configured to send the voltage across the resistor R5 to the feedback signal receiving end of the second signal conditioning circuit.

[0016] In a possible implementation, the universal I / O module further comprises an anti-backflow diode connected to the output end of the controllable switch SW2.

[0017] In a possible implementation, the universal I / O module further comprises a controllable switch SW1 connected between the power supply and the input end of the controllable switch SW2.

[0018] The control unit is further configured to control the controllable switch SW1 to be open when the signal type is configured as an AI signal; control the controllable switch SW1 to be open when the signal type is configured as a DI signal; control the controllable switch SW1 to be closed when the signal type is configured as a DO signal and the DO signal is at a high level; control the controllable switch SW1 or the controllable switch SW2 to be open when the DO signal is at a low level; and control the controllable switch SW1 to be closed when the signal type is configured as an AO signal.

[0019] In a possible implementation, when the signal type is configured as a DO signal, the control unit is further configured to, in response to a DO signal voltage accuracy diagnosis request, control the controllable switch SW4 to switch to a closed state, and determine whether the voltage accuracy of the DO signal meets a requirement according to a code value of a digital code output by the first analog / digital converter.

[0020] In a possible implementation, the universal I / O module further includes a resistor R4, a third signal conditioning circuit, and a second analog / digital converter; the resistor R4 is connected between an output end of the controllable switch SW2 and a first end of the controllable switch SW3; a voltage across the resistor R4 is sent to an input end of the third signal conditioning circuit; and an output end of the third signal conditioning circuit is connected to the control unit through the second analog / digital converter.

[0021] When the signal type is configured as an AO signal, the control unit is further configured to, in response to an AO signal current accuracy diagnosis request, determine whether the current accuracy of the AO signal meets a requirement according to a code value of a digital code output by the second analog / digital converter.

[0022] In a possible implementation, when the signal type is configured as an AI signal, the control unit is further configured to, in response to a diagnosis request about whether the resistor R1 is invalid, control a branch in which the controllable switch SW2 is located to switch to a closed state, switch the first end of the controllable switch SW3 from inputting an AI signal to outputting an AO signal, and then determine whether the resistor R1 is invalid according to a voltage across the resistor R1; the branch in which the controllable switch SW2 is located is a line between the power supply and the first end of the controllable switch SW3.

[0023] Alternatively, when the signal type is configured as an AI signal, the control unit is further configured to, in response to a diagnosis request about whether there is a leakage current after the branch in which the controllable switch SW4 is located is open, control the branch in which the controllable switch SW2 is located to switch to a closed state, switch the first end of the controllable switch SW3 from inputting an AI signal to outputting an AO signal, and then determine whether there is a leakage current after the branch in which the controllable switch SW4 is located is open according to a voltage across the resistor R1.

[0024] Alternatively, when the signal type is configured as the AI signal, the control unit is further configured to, in response to a diagnosis request of whether there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected, determine whether there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected according to a voltage across the resistor R4.

[0025] In a possible implementation, when the signal type is configured as the DI signal, the control unit is further configured to, in response to a diagnosis request of whether the resistor R2 is failed, control the branch in which the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 is switched from the input DI signal to the output DO signal, and determine whether the resistor R2 is failed according to a voltage across the resistor R3; the branch in which the controllable switch SW2 is located is a line between the power supply and the first end of the controllable switch SW3.

[0026] Alternatively, when the signal type is configured as the DI signal, the control unit is further configured to, in response to a diagnosis request of whether there is a leakage current after the SW5 is disconnected, determine whether there is a leakage current after the SW5 is disconnected according to a voltage across the resistor R1.

[0027] Alternatively, when the signal type is configured as the DI signal, the control unit is further configured to, in response to a diagnosis request of whether there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected, determine whether there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected according to a voltage across the resistor R4.

[0028] In a possible implementation, when the signal type is configured as the AO signal, the control unit is further configured to, in response to a diagnosis request of whether the controllable switch SW5 is short-circuited, determine whether the controllable switch SW5 is short-circuited according to a voltage across the resistor R1.

[0029] Alternatively, when the signal type is configured as the AO signal, the control unit is further configured to, in response to a diagnosis request of whether the controllable switch SW4 is short-circuited, determine whether the controllable switch SW4 is short-circuited according to a voltage across the resistor R2.

[0030] Alternatively, when the signal type is configured as the AO signal, the control unit is further configured to, in response to a diagnosis request of whether the output circuit is faulty, determine whether the output circuit is faulty according to a voltage across the resistor R4; the output circuit is a line between the power supply and the second end of the controllable switch SW3.

[0031] In a possible implementation, when the signal type is configured as the DO signal, the control unit is further configured to, in response to a diagnosis request of whether the controllable switch SW5 is short-circuited, determine whether the controllable switch SW5 is short-circuited according to a voltage across the resistor R1.

[0032] Alternatively, when the signal type is configured as the DO signal, the control unit is further configured to, in response to a diagnosis request of whether the controllable switch SW4 is short-circuited, determine whether the controllable switch SW4 is short-circuited according to a voltage across the resistor R2.

[0033] Or, when the signal type is configured as DO signal, the control unit is further configured to determine whether the output circuit is faulty according to the voltage across the resistor R4 in response to a request for diagnosis of whether the output circuit is faulty;

[0034] Or, when the signal type is configured as DO signal, the control unit is further configured to determine whether the output circuit is faulty according to the voltage across the resistor R4 in response to a request for diagnosis of whether the output circuit is faulty;

[0035] The output circuit is a line from the power supply to the second end of the controllable switch SW3; and the output circuit control circuit is a circuit for driving the switch on the output circuit to be on or off under the control of the control unit.

[0036] The second aspect of the present application provides a control method of a general I / O module, which comprises a control unit, an input unit, an output unit and a controllable switch SW3.

[0037] The input unit comprises a first analog / digital converter, a first signal conditioning circuit, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2 and a resistor R3.

[0038] The first end of the controllable switch SW3 is connected to the input end of the first signal conditioning circuit; and the second end of the controllable switch SW3 is simultaneously connected to the input end of the analog input AI channel, the input end of the digital input DI channel, the output end of the analog output AO channel and the output end of the digital output DO channel.

[0039] The controllable switch SW5 and the resistor R1 are connected in series and then connected between the first end of the controllable switch SW3 and the ground.

[0040] The controllable switch SW4, the resistor R2 and the resistor R3 are connected in series and then connected between the first end of the controllable switch SW3 and the ground.

[0041] The voltage across the resistor R1 and the voltage across the resistor R2 are both sent to the input end of the first signal conditioning circuit; and the output end of the first signal conditioning circuit is connected to the control unit through the first analog / digital converter.

[0042] The output unit comprises a controllable switch SW2, a digital / analog converter and a second signal conditioning circuit.

[0043] The input end of the controllable switch SW2 is connected to a power supply, and the output end of the controllable switch SW2 is connected to the first end of the controllable switch SW3; the controllable switch SW2 is a P-type switch tube;

[0044] The control unit is connected to the control end of the controllable switch SW2 through a digital / analog converter and the second signal conditioning circuit;

[0045] The control end of the controllable switch SW3, the control end of the controllable switch SW4 and the control end of the controllable switch SW5 are connected to the control unit;

[0046] The control method is used for the control unit, and the control method comprises the following steps:

[0047] When the signal type is configured as an AI signal, the controllable switch SW3 and the controllable switch SW5 are controlled to be closed, and the controllable switch SW2 and the controllable switch SW4 are controlled to be disconnected;

[0048] When the signal type is configured as a DI signal, the controllable switch SW3 and the controllable switch SW4 are controlled to be closed, and the controllable switch SW2 and the controllable switch SW5 are controlled to be disconnected;

[0049] When the signal type is configured as a DO signal, the controllable switch SW3 is controlled to be closed, and the controllable switch SW4 and the controllable switch SW5 are controlled to be disconnected; when the DO signal is at a high level, the digital / analog converter is controlled to output a corresponding voltage signal through the second signal conditioning circuit, so that the controllable switch SW2 works in a saturation region; and when the DO signal is at a low level, the controllable switch SW2 is controlled to be disconnected;

[0050] When the signal type is configured as an AO signal, the controllable switch SW3 is controlled to be closed, and the controllable switch SW4 and the controllable switch SW5 are controlled to be disconnected; at the same time, the digital / analog converter is controlled to output a corresponding voltage signal through the second signal conditioning circuit, so that the controllable switch SW2 works in a variable resistance region.

[0051] According to the technical scheme, the control unit in the universal I / O module provided by the application executes different control logics according to different signal type configurations (AI, DI, DO and AO): when configured as an AI signal, the signal is converted into a voltage signal through specific switches and resistors, and is quantized and encoded by a first analog / digital converter after conditioning; DI signal is similar. When configured as a DO signal, the digital / analog converter outputs a voltage to drive the controllable switch SW2, so as to realize high-current output; when configured as an AO signal, the digital / analog converter outputs a voltage to control the on-resistance of the controllable switch SW2, so as to adjust the output current. It can be seen that the universal I / O module can flexibly adapt to different channel types. BRIEF DESCRIPTION OF DRAWINGS

[0052] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with regard to the following detailed description, taken in conjunction with the accompanying drawings. Throughout the drawings, like or similar reference numerals are used to refer to like or similar elements, and the accompanying descriptions in the detailed description make reference to the drawings. It should be understood that the drawings are diagrammatic and schematic representations of exemplary embodiments of the present disclosure, and are not limiting of the scope of the present disclosure.

[0053] Figure 1 An electrical schematic diagram of a universal I / O module provided for the present application;

[0054] Figure 2 An electrical schematic diagram of yet another universal I / O module provided for the present application. DETAILED DESCRIPTION

[0055] In the following elaboration, in order to ensure the accuracy of the cited and the fluency of the reading, the key technical terms, abbreviations or acronyms involved in the text are summarized and explained as follows:

[0056] DCS: Distributed Control System, distributed control system;

[0057] SIS: Safety Instrumented System, safety instrumented system;

[0058] I / O: Input / Output, input / output;

[0059] AI: Analog Input, analog input;

[0060] DI: Digital Input, digital input;

[0061] AO: Analog Output, analog output;

[0062] DO: Digital Output, digital output;

[0063] ADC: Analog-to-Digital Converter, analog / digital converter;

[0064] DAC: Digital-to-Analog Converter, digital / analog converter.

[0065] In the field of automation control, users have increasingly higher requirements for the versatility and flexibility of automation control systems (e.g., DCS systems, SIS systems, etc.). Currently, the I / O channels of automation control systems are mainly in the form of I / O modules, each of which contains multiple (e.g., 8, 16, or 32) I / O channels of the same type, such as AI channels, DI channels, AO channels, and DO channels. However, due to the fact that I / O modules of different channel types cannot be replaced by each other, this traditional mode has some limitations, as follows:

[0066] 1) Due to the fact that I / O modules of different channel types cannot be replaced by each other, as the system scale expands, the number of I / O modules required significantly increases, resulting in higher system costs.

[0067] 2) A large number of I / O modules increase the complexity of system assembly and the difficulty of later maintenance and management.

[0068] 3) Whether in large-scale or small-scale system applications, there may be less demand for certain specific types of channels, which leads to the fact that the channel resources of some I / O modules cannot be fully utilized, resulting in waste of resources and further increase in costs.

[0069] To solve the above problems, the embodiments of the present application provide a universal I / O module, which supports AI signals, DI signals, AO signals, and DO signals (i.e., it can flexibly adapt to AI channels, DI channels, AO channels, and DO channels), thereby effectively solving the above limitations, as follows:

[0070] 1) Since the universal I / O module can support multiple signal types, it is no longer necessary to separately equip dedicated I / O modules for each signal type, which greatly reduces the types and number of I / O modules required by the automation control system, especially in large-scale automation control systems, which can significantly reduce hardware procurement and system costs.

[0071] 2) Since the types and number of I / O modules required are reduced, the complexity of system assembly and the difficulty of later maintenance and management are also greatly reduced.

[0072] 3) The universal I / O module can dynamically allocate I / O channel resources according to actual application requirements, and regardless of how the demand for AI channels, DI channels, AO channels, or DO channels changes, it can meet the changing demands by adjusting the configuration, avoiding the problem of idle or insufficient channel resources due to fixed configuration. This flexibility ensures that each I / O channel can be most effectively utilized, significantly reducing resource waste; especially in small and medium-sized systems or specific application scenarios, more efficient allocation of channel resources can be achieved at a lower cost.

[0073] The general I / O module provided by the embodiments of the present application is described in detail below with reference to the drawings. Those skilled in the art can know that the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems as technology develops and new scenarios appear.

[0074] The terms "first", "second", and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is merely a distinguishing way adopted in the description of the embodiments of the present application for the same attribute objects in the description. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that the processes, methods, systems, products or equipment containing a series of units do not have to be limited to those units, but can include other units not clearly listed or inherent to these processes, methods, products or equipment.

[0075] Referring to Figure 1 The general I / O module provided by the embodiments of the present application includes the following constituent components: a control unit 100, an input unit 200, an output unit 300, and a controllable switch SW3. The specific structures of the constituent components are as follows:

[0076] 1) Input unit 200

[0077] The input unit 200 includes an ADC1 (first analog / digital converter), a first signal conditioning circuit 101, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2, and a resistor R3.

[0078] The first end of the controllable switch SW3 is connected to the input end of the first signal conditioning circuit 101; the second end of the controllable switch SW3 simultaneously serves as an AI channel entrance, a DI channel entrance, an AO channel exit, and a DO channel exit.

[0079] The controllable switch SW5 and the resistor R1 are connected in series and then connected between the first end of the controllable switch SW3 and the ground GND. Figure 1 In this embodiment, only the first end of the controllable switch SW3 sequentially passes through the controllable switch SW5, the resistor R1, and the ground GND as an example.

[0080] The controllable switch SW4, the resistor R2, and the resistor R3 are connected in series and then connected between the first end of the controllable switch SW3 and the ground GND. Figure 1 In this embodiment, only the first end of the controllable switch SW3 sequentially passes through the resistor R3, the controllable switch SW4, and the resistor R2 and then connects to the ground GND as an example.

[0081] The voltage across the resistor R1 and the voltage across the resistor R2 are both sent to the input end of the first signal conditioning circuit 101; the output end of the first signal conditioning circuit 101 is connected to the control unit 100 through the ADC1.

[0082] 2) The output unit 300

[0083] The output unit 300 comprises a controllable switch SW2, a DAC and a second signal conditioning circuit 102.

[0084] The input end of the controllable switch SW2 is connected to the power supply Power, and the output end of the controllable switch SW2 is connected to the first end of the controllable switch SW3.

[0085] The output unit 300 is connected to the control end of the controllable switch SW2 through the DAC and the second signal conditioning circuit 102.

[0086] The control end of the controllable switch SW3, the control end of the controllable switch SW4 and the control end of the controllable switch SW5 are all connected to the control unit 100.

[0087] In the embodiment of the present application, the controllable switch SW2 is a P-type switch tube, for example, a PMOS tube, at this time, the input end, the output end and the control end of the controllable switch SW2 are the source S, the drain D and the gate G of the PMOS tube respectively. The working characteristics of the PMOS tube are as follows:

[0088] 1) The conduction and cutoff of the PMOS tube are mainly controlled by the gate-source voltage VGS (the voltage difference between the gate G and the source S), when the gate-source voltage VGS of the PMOS tube > the turn-on voltage VGSth of the PMOS tube (the turn-on voltage VGSth is negative), the PMOS tube is in the cutoff region, at this time, there is no conduction channel between the drain D and the source S, and the drain current is close to zero.

[0089] 2) When the gate-source voltage VGS < the turn-on voltage VGSth, the PMOS is turned on, allowing current to flow from the source S to the drain D; and when the gate-source voltage VGS < the turn-on voltage VGSth and the drain-source voltage VDS (the voltage difference between the drain D and the source S) > VGS-VGSth, the PMOS tube enters the variable resistance region. In the variable resistance region, the drain D and the source S of the PMOS tube can be regarded as a variable resistance controlled by the gate-source voltage VGS. In the variable resistance region, when the gate-source voltage VGS is constant, the drain current and the drain-source voltage VDS are basically in a linear relationship, and the absolute value of the drain-source voltage of the PMOS tube |VDS| = Rdson x Iload, Rdson represents the on-resistance of the PMOS tube, and Iload represents the drain current.

[0090] 3) When the drain-source voltage VDS decreases to a certain extent, so that the drain-source voltage VDS≤VGS-VGSth, the PMOS tube enters the saturation zone from the variable resistance zone. In the saturation zone, the drain current no longer changes significantly with the change of the drain-source voltage VDS, the drain current of the PMOS tube is basically stable, and the on-resistance of the PMOS tube reaches a minimum.

[0091] Next, taking the P-type switch tube PMOS as an example, the working principle of the embodiments of the application will be described in detail in combination with the working characteristics of the PMOS tube:

[0092] Initially, each controllable switch is in an open state. According to different signal type configurations, Figure 1 The control unit 100 in the general I / O module shown performs different control logics, which are described in detail as follows 1)~4):

[0093] 1) The signal type configuration is an AI signal

[0094] When the signal type configuration is an AI signal, the controllable switch SW3 and the controllable switch SW5 are controlled to be closed, and the controllable switch SW2 and the controllable switch SW4 are controlled to be open (the controllable switch SW2 is open, which means that the controllable switch SW2 is in the cutoff zone). At this time, the AI signal flows to the ground GND through the controllable switch SW3, the controllable switch SW5 and the resistor R1. The AI signal is converted into a voltage signal through the resistor R1, and the voltage signal is modulated to the voltage value that can be collected by the ADC1 through the first signal conditioning circuit 101 (the first signal conditioning circuit 101 usually includes amplification, attenuation, offset, filtering and other functions to ensure that the voltage signal input to the ADC1 is within its specified input range, such as 0~3.3V). The ADC1 quantizes and encodes the input voltage signal to obtain a digital code (the quantization process is to convert a continuous voltage signal into a discrete digital signal, and the quantization accuracy is determined by the resolution of the ADC1; the quantized voltage signal is converted into a binary digital code, and the encoding process follows the internal logic and algorithm of the ADC1), and is transmitted to the control unit 100.

[0095] In one possible implementation, the current range of the AI signal input from the second end of the controllable switch SW3 can be set to 4mA~20mA.

[0096] 2) The signal type configuration is a DI signal

[0097] When the signal type is configured as a DI signal, the controllable switch SW3 and the controllable switch SW4 are controlled to be closed, and the controllable switch SW2 and the controllable switch SW5 are controlled to be disconnected. At this time, the DI signal flows to the ground GND through the controllable switch SW3, the resistor R3, the controllable switch SW4 and the resistor R2. The DI signal is divided by the resistor R3 and the resistor R2, and the voltage signal on the resistor R2 is modulated to a voltage value that can be collected by the ADC1 through the first signal conditioning circuit 101. The ADC1 quantizes and encodes the input voltage signal to obtain a digital code, and transmits the digital code to the control unit 100.

[0098] In a possible implementation, the voltage range of the DI signal input from the second end of the controllable switch SW3 can be set to 0V-24V.

[0099] 3) The signal type is configured as a DO signal

[0100] When the signal type is configured as a DO signal, the controllable switch SW3 is controlled to be closed, and the controllable switch SW4 and the controllable switch SW5 are controlled to be disconnected. At the same time, when the DO signal is at a high level, the control unit 100 controls the DAC to output a maximum voltage, and the voltage signal output by the DAC is output to drive the controllable switch SW2 through the second signal conditioning circuit 102, so that the controllable switch SW2 works in the saturation region to ensure its large-current output capability. At this time, the power supply Power is output to the field instrument through the resistor R5, the controllable switch SW2 and the controllable switch SW3. When the DO signal is at a low level, the controllable switch SW2 is controlled to be disconnected.

[0101] In a possible implementation, the high level of the DO signal output from the second end of the controllable switch SW3 can be set to 24V.

[0102] 4) The signal type is configured as an AO signal

[0103] When the signal type is configured as an AO signal, the controllable switch SW3 is controlled to be closed, and the controllable switch SW4 and the controllable switch SW5 are controlled to be disconnected. At the same time, the control unit 100 sends a command to the DAC, and the DAC outputs a corresponding voltage signal through the second signal conditioning circuit 102 to drive the gate of the controllable switch SW2, so that the controllable switch SW2 works in the variable resistance region. At this time, the on-resistance between the source and the drain of the controllable switch SW2 can be controlled by changing the gate voltage of the controllable switch SW2, so as to control the power supply Power to output different currents.

[0104] In a possible implementation, the current range of the AO signal output from the second end of the controllable switch SW3 can be set to 4mA-20mA.

[0105] In summary, the control unit 100 in the universal I / O module provided in the embodiments of the present application performs different control logics according to different signal type configurations (AI, DI, DO, AO): when configured as an AI signal, the signal is converted into a voltage signal through a specific switch and a resistor, and after conditioning, is quantized and encoded by an ADC1; a DI signal is similar. When configured as a DO signal, a voltage output by a DAC is controlled to drive a controllable switch SW2, so as to realize high-current output; when configured as an AO signal, the on-resistance of the controllable switch SW2 is controlled by controlling the voltage output by the DAC, so as to adjust the output current. It can be seen that the universal I / O module can flexibly adapt to different channel types (AI, DI, DO, AO).

[0106] In a possible implementation, still referring to Figure 1 The control unit 100 in any of the universal I / O modules provided above is further configured to, when the signal type configuration is a DO signal, perform voltage precision diagnosis of the DO signal, and specifically includes: when the signal type configuration is a DO signal, the control unit 100 is further configured to, in response to a DO signal voltage precision diagnosis request, control the controllable switch SW4 to switch to a closed state, at which time the DO signal will generate a voltage division on the resistor R2; the voltage signal on the resistor R2 is modulated to a voltage value that can be collected by the ADC1 through the first signal conditioning circuit 101, the ADC1 quantizes and encodes the input voltage signal to obtain a digital code and transmit the digital code to the control unit 100, and the control unit 100, when the signal type configuration is a DO signal, is further configured to, in response to the DO signal voltage precision diagnosis request, determine whether the voltage precision of the DO signal meets the requirements according to the code value of the digital code output by the ADC1.

[0107] In a possible implementation, the control unit 100 in any of the universal I / O modules provided above is further configured to, when the signal type configuration is an AO signal, perform current precision diagnosis of the AO signal. Specifically, referring to Figure 2 The universal I / O module provided above further includes a resistor R4, a third signal conditioning circuit 103, and an ADC2 (second analog / digital converter); the resistor R4 is connected between the drain of the controllable switch SW2 and the first end of the controllable switch SW3; the voltage across the resistor R4 is sent to the input end of the third signal conditioning circuit 103; and the output end of the third signal conditioning circuit 103 is connected to the control unit 100 through the ADC2. When the signal type configuration is an AO signal, the voltage signal on the resistor R4 is modulated to a voltage value that can be collected by the ADC2 through the third signal conditioning circuit 103, the ADC2 quantizes and encodes the input voltage signal to obtain a digital code, the digital code is transmitted to the control unit 100, and the control unit 100, when the signal type configuration is an AO signal, is further configured to, in response to an AO signal current precision diagnosis request, determine whether the current precision of the AO signal meets the requirements according to the code value of the digital code output by the ADC2.

[0108] In a possible implementation, still referring to Figure 2 The third signal conditioning circuit 103 can comprise a differential amplification circuit.

[0109] In a possible implementation, still referring to Figure 2 Any of the universal I / O modules provided above further comprises a resistor R5 and a feedback circuit 104; the feedback circuit 104 is configured to send the voltage across the resistor R5 to the feedback signal receiving end of the second signal conditioning circuit 102, forming a closed-loop regulation, and keeping the current of the AO signal stable through such a negative feedback structure.

[0110] In a possible implementation, still referring to Figure 2 Any of the universal I / O modules provided above further comprises an anti-inrush diode D1 connected to the output end of the controllable switch SW2. The anti-inrush diode D1 mainly functions to prevent reverse connection conduction, i.e., to prevent energy from flowing back to the power supply Power.

[0111] In a possible implementation, still referring to Figure 2 Any of the universal I / O modules provided above further comprises a controllable switch SW1 connected between the power supply Power and the input end of the controllable switch SW2. The control unit 100 is further configured to, when the signal type is configured as an AI signal, control the controllable switch SW1 to be open; when the signal type is configured as a DI signal, control the controllable switch SW1 to be open; when the signal type is configured as a DO signal, if the DO signal is high, control the controllable switch SW1 to be closed; if the DO signal is low, control the controllable switch SW1 or the controllable switch SW2 to be open; and when the signal type is configured as an AO signal, control the controllable switch SW1 to be closed.

[0112] The controllable switch SW1 can at least have the following functions:

[0113] 1) In some cases, if the power supply Power is directly connected to the source of the PMOS tube without proper protection measures, the PMOS tube or other components in the circuit can be damaged when the current is too large. By connecting a controllable switch SW1 between the power supply Power and the source of the PMOS tube, the power supply Power can be cut off when the current is too large, thereby protecting the circuit from overcurrent damage.

[0114] 2) By connecting a controllable switch SW1 between the power supply and the source of the PMOS tube, the power supply Power can be conveniently cut off when the PMOS tube needs to be repaired or replaced, thereby ensuring the safety and convenience of the repair process.

[0115] In a possible implementation, the control unit in any of the general I / O modules provided above can be a standalone device, or can be configured in a master-slave or master-slave configuration, and is not limited. In addition, the control unit 100 and the control end of the controllable switch SW1, the controllable switch SW3, the controllable switch SW4, and the controllable switch SW5 can also be connected to a corresponding signal conditioning circuit.

[0116] In a possible implementation, any of the general I / O modules provided above containing the resistor R4 can also perform fault diagnosis. Still referring to Figure 2 , according to the different signal type configurations, the control unit 100 executes different fault diagnosis control logics, and the details are described below 1) ~ 4):

[0117] 1) The signal type configuration is AI signal

[0118] When the signal type configuration is AI signal, the AI signal is current sampled through the resistor R1, but if the following faults occur, it may cause the current sampling value to be incorrect: the resistor R1 is invalid, there is a leakage current after the branch where the SW4 is disconnected, and there is a leakage current after the branch where the SW2 is disconnected (the cause can be that the diode D1 is invalid, causing a leakage current, or there is a leakage current after the SW2 is disconnected; the branch where the SW2 is located refers to the line between the power supply Power and the first end of the controllable switch SW3).

[0119] When the signal type configuration is AI signal, the control unit 100 is also used to respond to the diagnosis request of whether the resistor R1 is invalid, to control the branch where the SW2 is located to switch to the closed state, to switch the first end of the SW3 from the input AI signal to the output A0 signal, and to determine whether the resistor R1 is invalid according to the voltage across the resistor R1.

[0120] When the signal type configuration is AI signal, the control unit 100 is also used to respond to the diagnosis request of whether there is a leakage current after the branch where the SW4 is disconnected, to control the branch where the SW2 is located to switch to the closed state, to switch the first end of the SW3 from the input AI signal to the output A0 signal, and to determine whether there is a leakage current after the branch where the SW4 is disconnected according to the voltage across the resistor R1.

[0121] When the signal type is configured as an AI signal, the control unit 100 is further configured to, in response to a diagnosis request of whether there is a leakage current after the branch in which the SW2 is located is disconnected, determine whether there is a leakage current after the branch in which the SW2 is located is disconnected according to a voltage across the resistor R4. Specifically, when the signal type is configured as an AI signal, no current normally passes through the resistor R4, and if there is a leakage current after the branch in which the SW2 is located is disconnected, the leakage current is converted into a voltage signal through the resistor R4. The voltage signal is modulated to a voltage value that can be collected by the ADC2 through the second signal conditioning circuit 102. The ADC2 quantizes and encodes the voltage signal, and the digital code is transmitted to the control unit 100. The control unit 100 determines the size of the output signal of the ADC2 to diagnose whether there is a leakage current after the branch in which the SW2 is located is disconnected.

[0122] 2) The signal type is configured as a DI signal

[0123] When the signal type is configured as a DI signal, the DI signal is voltage sampled through the resistor R2 and the resistor R3. However, if the following faults occur, it may cause the voltage sampling value to be incorrect: the resistor R2 is invalid, there is a leakage current after the controllable switch SW5 is disconnected, and there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected.

[0124] When the signal type is configured as a DI signal, the control unit 100 is further configured to, in response to a diagnosis request of whether the resistor R2 is invalid, control the branch in which the SW2 is located to switch to a closed state, so that the first end of the SW3 is switched from inputting a DI signal to outputting a DO signal. The resistor R3 is used to determine whether the resistor R2 is invalid according to a voltage across the resistor R3.

[0125] When the signal type is configured as a DI signal, the control unit 100 is further configured to, in response to a diagnosis request of whether there is a leakage current after the controllable switch SW5 is disconnected, determine whether there is a leakage current after the controllable switch SW5 is disconnected according to a voltage across the resistor R1.

[0126] When the signal type is configured as a DI signal, the control unit 100 is further configured to, in response to a diagnosis request of whether there is a leakage current after the branch in which the SW2 is located is disconnected, determine whether there is a leakage current after the branch in which the SW2 is located is disconnected according to a voltage across the resistor R4.

[0127] 3) The signal type is configured as an AO signal

[0128] When the signal type is configured as an AO signal, the current signal is output through the SW2. However, if the following faults occur, it may cause the current output value to be incorrect: the SW5 and the SW4 are short-circuited, and the output circuit is faulty (the output circuit is a circuit from the power supply Power to the second end of the controllable switch SW3, for example, the SW3 is open).

[0129] When the signal type is configured as the AO signal, the control unit 100 is further configured to, in response to a diagnosis request of whether the SW5 / SW4 is short-circuited, judge whether the SW5 / SW4 is short-circuited according to the voltage between the resistor R1 and the resistor R2.

[0130] When the signal type is configured as the AO signal, the control unit 100 is further configured to, in response to a diagnosis request of whether the output circuit is faulty, judge whether the output circuit is faulty according to the voltage between the resistor R4.

[0131] 4) The signal type is configured as the DO signal

[0132] When the signal type is configured as the DO signal, the DO signal is controlled to be output through the SW1 and the SW2, but if the following faults occur, the voltage output may be wrong: the SW5 and the SW4 short-circuit fault, the output circuit fault, and the output circuit control circuit fault (the output circuit is a circuit from the line between the power supply Power and the second end of the controllable switch SW3, for example, the SW3 open circuit; the output circuit control circuit is a circuit for driving the switch on the output circuit to be on or off under the control of the control unit 100).

[0133] When the signal type is configured as the DO signal, the control unit 100 is further configured to, in response to a diagnosis request of whether the SW5 / SW4 is short-circuited, judge whether the SW5 / SW4 is short-circuited according to the voltage between the resistor R1 and the resistor R2.

[0134] When the signal type is configured as the DO signal, the control unit 100 is further configured to, in response to a diagnosis request of whether the output circuit is faulty, judge whether the output circuit is faulty according to the voltage between the resistor R4.

[0135] When the signal type is configured as the DO signal, the control unit 100 is further configured to, in response to a diagnosis request of whether the output circuit control circuit is faulty, if the DO signal is at a high level, send an instruction to control the output circuit to be open, and then judge whether the output circuit is faulty according to the voltage between the resistor R4; if the DO signal is at a low level, send an instruction to control the output circuit to be closed, and then judge whether the output circuit is faulty according to the voltage between the resistor R4. Specifically, if the DO signal is output at a high level, the control unit 100 controls the SW1, the SW2 or the SW3 to be open for 1 ms, if the SW1, the SW2 or the SW3 switch control circuit is faulty, the ADC2 will collect the voltage between the resistor R4 to be high voltage in the 1 ms, and the control unit 100 diagnoses the switch control circuit fault condition according to the voltage; similarly, if the DO signal is output at a low level, the control unit 100 controls the output unit to make the SW1, the SW2 and the SW3 closed for 1 ms, if the SW1, the SW2 or the SW3 switch control circuit is faulty, the ADC2 will collect the voltage between the resistor R4 to be low voltage in the 1 ms, and the control unit 100 diagnoses the SW1, the SW2 or the SW3 switch control circuit fault condition according to the voltage.

[0136] Furthermore, the embodiment of the present application also discloses a control method of the universal I / O module, wherein the universal I / O module comprises a control unit, an input unit, an output unit and a controllable switch SW3.

[0137] The input unit comprises a first analog / digital converter, a first signal conditioning circuit, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2 and a resistor R3.

[0138] The first end of the controllable switch SW3 is connected to the input end of the first signal conditioning circuit; and the second end of the controllable switch SW3 simultaneously serves as an analog input AI channel entrance, a digital input DI channel entrance, an analog output AO channel exit and a digital output DO channel exit.

[0139] The controllable switch SW5 and the resistor R1 are connected in series and then connected between the first end of the controllable switch SW3 and the ground.

[0140] The controllable switch SW4, the resistor R2 and the resistor R3 are connected in series and then connected between the first end of the controllable switch SW3 and the ground.

[0141] The voltages across the resistor R1 and the resistor R2 are both sent to the input end of the first signal conditioning circuit; and the output end of the first signal conditioning circuit is connected to the control unit through the first analog / digital converter.

[0142] The output unit comprises a controllable switch SW2, a digital / analog converter and a second signal conditioning circuit.

[0143] The input end of the controllable switch SW2 is connected to a power supply, and the output end of the controllable switch SW2 is connected to the first end of the controllable switch SW3; and the controllable switch SW2 is a P-type switch tube.

[0144] The control unit is connected to the control end of the controllable switch SW2 through the digital / analog converter and the second signal conditioning circuit.

[0145] The control end of the controllable switch SW3, the control end of the controllable switch SW4 and the control end of the controllable switch SW5 are all connected to the control unit.

[0146] The control method is used for the control unit, and the control method comprises the following steps.

[0147] When the signal type is configured as an AI signal, the controllable switch SW3 and the controllable switch SW5 are controlled to be closed, and the controllable switch SW2 and the controllable switch SW4 are controlled to be disconnected.

[0148] When the signal type is configured as a DI signal, the controllable switch SW3 and the controllable switch SW4 are controlled to be closed, and the controllable switch SW2 and the controllable switch SW5 are controlled to be disconnected;

[0149] When the signal type is configured as a DO signal, the controllable switch SW3 is controlled to be closed, and the controllable switch SW4 and the controllable switch SW5 are controlled to be disconnected, and when the DO signal is at a high level, the digital / analog converter is controlled to output a corresponding voltage signal through the second signal conditioning circuit to make the controllable switch SW2 work in a saturation region, and when the DO signal is at a low level, the controllable switch SW2 is controlled to be disconnected;

[0150] When the signal type is configured as an AO signal, the controllable switch SW3 is controlled to be closed, and the controllable switch SW4 and the controllable switch SW5 are controlled to be disconnected, and at the same time, the digital / analog converter is controlled to output a corresponding voltage signal through the second signal conditioning circuit to make the controllable switch SW2 work in a variable resistance region.

[0151] The various embodiments are described in a progressive manner in the specification, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the control method disclosed by the embodiments, since it corresponds to the modules disclosed by the embodiments, the description is relatively simple, and the relevant parts can be referred to the module part.

[0152] The above description of disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the embodiments. Therefore, the embodiments of the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A universal I / O module, characterized by, The universal I / O module comprises a control unit, an input unit, an output unit and a controllable switch SW3. The input unit comprises a first analog / digital converter, a first signal conditioning circuit, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2 and a resistor R3. The first end of the controllable switch SW3 is connected to the input end of the first signal conditioning circuit; the second end of the controllable switch SW3 is simultaneously connected to an analog input AI channel entrance, a digital input DI channel entrance, an analog output AO channel exit and a digital output DO channel exit; The controllable switch SW5 and the resistor R1 are connected in series and then connected between the first end of the controllable switch SW3 and the ground; The controllable switch SW4, the resistor R2 and the resistor R3 are connected in series and then connected between the first end of the controllable switch SW3 and the ground; The voltages across the resistor R1 and the resistor R2 are both sent to the input end of the first signal conditioning circuit; the output end of the first signal conditioning circuit is connected to the control unit through the first analog / digital converter; The output unit comprises a controllable switch SW2, a digital / analog converter and a second signal conditioning circuit. The input end of the controllable switch SW2 is connected to a power supply, and the output end of the controllable switch SW2 is connected to the first end of the controllable switch SW3; the controllable switch SW2 is a P-type switch tube. The control unit is connected to the control end of the controllable switch SW2 through the digital / analog converter and the second signal conditioning circuit; The control ends of the controllable switch SW3, the controllable switch SW4 and the controllable switch SW5 are all connected to the control unit; The control unit is configured to control the controllable switch SW3 and the controllable switch SW5 to be closed and the controllable switch SW2 and the controllable switch SW4 to be disconnected when the signal type is configured as an AI signal; control the controllable switch SW3 and the controllable switch SW4 to be closed and the controllable switch SW2 and the controllable switch SW5 to be disconnected when the signal type is configured as a DI signal; control the controllable switch SW3 to be closed and the controllable switch SW4 and the controllable switch SW5 to be disconnected when the signal type is configured as a DO signal, and control the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit to make the controllable switch SW2 work in a saturation region when the DO signal is at a high level, and control the controllable switch SW2 to be disconnected when the DO signal is at a low level; control the controllable switch SW3 to be closed and the controllable switch SW4 and the controllable switch SW5 to be disconnected when the signal type is configured as an AO signal, and control the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit to make the controllable switch SW2 work in a variable resistance region. The universal I / O module further comprises a resistor R5 and a feedback circuit; the feedback circuit is configured to send the voltage across the resistor R5 to a feedback signal receiving end of the second signal conditioning circuit.

2. The universal I / O module of claim 1, wherein, The universal I / O module further comprises an anti-backflow diode connected to the output end of the controllable switch SW2.

3. The universal I / O module of claim 1, wherein, The universal I / O module further comprises a controllable switch SW1 connected between the power supply and the input end of the controllable switch SW2.

4. The universal I / O module of claim 1, wherein, The universal I / O module further comprises a resistor R5 and a feedback circuit; the feedback circuit is configured to send the voltage across the resistor R5 to a feedback signal receiving end of the second signal conditioning circuit. The universal I / O module further comprises an anti-backflow diode connected to the output end of the controllable switch SW2. The universal I / O module further comprises a controllable switch SW1 connected between the power supply and the input end of the controllable switch SW2. The control unit is further configured to control the controllable switch SW1 to be open when the signal type is configured as an AI signal; control the controllable switch SW1 to be open when the signal type is configured as a DI signal; control the controllable switch SW1 to be closed when the signal type is configured as a DO signal, and control the controllable switch SW1 or the controllable switch SW2 to be open when the DO signal is at a low level; and control the controllable switch SW1 to be closed when the signal type is configured as an AO signal.

5. The universal I / O module of claim 1, wherein, When the signal type is configured as a DO signal, the control unit is further configured to, in response to a DO signal voltage accuracy diagnosis request, control the controllable switch SW4 to switch to a closed state, and determine whether the voltage accuracy of the DO signal meets a requirement according to a code value of a digital code output by the first analog / digital converter.

6. The universal I / O module of claim 1, wherein, The universal I / O module further comprises a resistance R4, a third signal conditioning circuit, and a second analog / digital converter; the resistance R4 is connected between an output end of the controllable switch SW2 and a first end of the controllable switch SW3; a voltage across the resistance R4 is input to an input end of the third signal conditioning circuit; and an output end of the third signal conditioning circuit is connected to the control unit through the second analog / digital converter. When the signal type is configured as an AO signal, the control unit is further configured to, in response to an AO signal current accuracy diagnosis request, determine whether the current accuracy of the AO signal meets a requirement according to a code value of a digital code output by the second analog / digital converter.

7. The universal I / O module of claim 6, wherein, When the signal type is configured as an AI signal, the control unit is further configured to, in response to a diagnosis request about whether the resistance R1 is invalid, control a branch in which the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 is switched from inputting an AI signal to outputting an AO signal, and then determine whether the resistance R1 is invalid according to a voltage across the resistance R1; the branch in which the controllable switch SW2 is located is a line between the power supply and the first end of the controllable switch SW3. Alternatively, when the signal type is configured as an AI signal, the control unit is further configured to, in response to a diagnosis request about whether there is a leakage current after the branch in which the controllable switch SW4 is located is disconnected, control the branch in which the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 is switched from inputting an AI signal to outputting an AO signal, and then determine whether there is a leakage current after the branch in which the controllable switch SW4 is located is disconnected according to a voltage across the resistance R1. Alternatively, when the signal type is configured as an AI signal, the control unit is further configured to, in response to a diagnosis request about whether there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected, determine whether there is a leakage current after the branch in which the controllable switch SW2 is located is disconnected according to a voltage across the resistance R4.

8. The universal I / O module of claim 6, wherein, When the signal type is configured as a DI signal, the control unit is further configured to, in response to a diagnosis request about whether the resistance R2 is invalid, control the branch in which the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 is switched from inputting a DI signal to outputting a DO signal, and then determine whether the resistance R2 is invalid according to a voltage across the resistance R3; the branch in which the controllable switch SW2 is located is a line between the power supply and the first end of the controllable switch SW3. Or, when the signal type is configured as a DI signal, the control unit is further configured to, in response to a diagnosis request for whether there is a leakage current after the SW5 is opened, determine whether there is a leakage current after the SW5 is opened according to a voltage across the resistor R1. Or, when the signal type is configured as a DI signal, the control unit is further configured to, in response to a diagnosis request for whether there is a leakage current after the SW2 branch is opened, determine whether there is a leakage current after the SW2 branch is opened according to a voltage across the resistor R4.

9. The universal I / O module of claim 6, wherein, When the signal type is configured as an AO signal, the control unit is further configured to, in response to a diagnosis request for whether the controllable switch SW5 is short-circuited, determine whether the controllable switch SW5 is short-circuited according to a voltage across the resistor R1. Or, when the signal type is configured as an AO signal, the control unit is further configured to, in response to a diagnosis request for whether the controllable switch SW4 is short-circuited, determine whether the controllable switch SW4 is short-circuited according to a voltage across the resistor R2. Or, when the signal type is configured as an AO signal, the control unit is further configured to, in response to a diagnosis request for whether the output circuit is faulty, determine whether the output circuit is faulty according to a voltage across the resistor R4; the output circuit is a line from the power supply to the second end of the controllable switch SW3.

10. The universal I / O module of claim 6, wherein, When the signal type is configured as a DO signal, the control unit is further configured to, in response to a diagnosis request for whether the controllable switch SW5 is short-circuited, determine whether the controllable switch SW5 is short-circuited according to a voltage across the resistor R1. Or, when the signal type is configured as a DO signal, the control unit is further configured to, in response to a diagnosis request for whether the controllable switch SW4 is short-circuited, determine whether the controllable switch SW4 is short-circuited according to a voltage across the resistor R2. Or, when the signal type is configured as a DO signal, the control unit is further configured to, in response to a diagnosis request for whether the output circuit is faulty, determine whether the output circuit is faulty according to a voltage across the resistor R4. Or, when the signal type is configured as a DO signal, the control unit is further configured to, in response to a diagnosis request for whether the output circuit control circuit is faulty, if the DO signal is at a high level, issue an instruction to control the output circuit to be opened, and then determine whether the output circuit is faulty according to a voltage across the resistor R4; if the DO signal is at a low level, issue an instruction to control the output circuit to be closed, and then determine whether the output circuit is faulty according to a voltage across the resistor R4. The output circuit is a line from the power supply to the second end of the controllable switch SW3; and the output circuit control circuit is a circuit for driving a switch on the output circuit to be opened or closed under the control of the control unit.

11. A control method of a general-purpose I / O module, characterized by, The universal I / O module comprises a control unit, an input unit, an output unit, and a controllable switch SW3. The input unit comprises a first analog / digital converter, a first signal conditioning circuit, a controllable switch SW5, a resistor R1, a controllable switch SW4, a resistor R2, and a resistor R3. The first end of the controllable switch SW3 is connected to an input end of the first signal conditioning circuit; and the second end of the controllable switch SW3 simultaneously serves as an analog input AI channel entrance, a digital input DI channel entrance, an analog output AO channel exit, and a digital output DO channel exit. Controllable switch SW5 and resistor R1 are connected in series and then connected between the first end of controllable switch SW3 and the ground; Controllable switch SW4, resistor R2 and resistor R3 are connected in series and then connected between the first end of controllable switch SW3 and the ground; The voltage across resistor R1 and the voltage across resistor R2 are both input into the input end of the first signal conditioning circuit; the output end of the first signal conditioning circuit is connected to the control unit through the first analog / digital converter; The output unit comprises controllable switch SW2, a digital / analog converter and a second signal conditioning circuit; The input end of controllable switch SW2 is connected to the power supply, the output end of controllable switch SW2 is connected to the first end of controllable switch SW3, and controllable switch SW2 is a P-type switch tube; The control unit is connected to the control end of controllable switch SW2 through the digital / analog converter and the second signal conditioning circuit; The control end of controllable switch SW3, the control end of controllable switch SW4 and the control end of controllable switch SW5 are all connected to the control unit; The control method is applied to the control unit, and the control method comprises: When the signal type is configured as an AI signal, controllable switch SW3 and controllable switch SW5 are controlled to be closed, and controllable switch SW2 and controllable switch SW4 are controlled to be disconnected; When the signal type is configured as a DI signal, controllable switch SW3 and controllable switch SW4 are controlled to be closed, and controllable switch SW2 and controllable switch SW5 are controlled to be disconnected; When the signal type is configured as a DO signal, controllable switch SW3 is controlled to be closed, and controllable switch SW4 and controllable switch SW5 are controlled to be disconnected, and when the DO signal is at a high level, the digital / analog converter is controlled to output a corresponding voltage signal through the second signal conditioning circuit, so that controllable switch SW2 works in the saturation region, and when the DO signal is at a low level, controllable switch SW2 is controlled to be disconnected; When the signal type is configured as an AO signal, controllable switch SW3 is controlled to be closed, and controllable switch SW4 and controllable switch SW5 are controlled to be disconnected, and at the same time, the digital / analog converter is controlled to output a corresponding voltage signal through the second signal conditioning circuit, so that controllable switch SW2 works in the variable resistance region.

Citation Information

Patent Citations

  • Multiplex circuit for chip pins

    CN103716034A

  • Vehicle-mounted antenna state detection circuit

    CN115436718A