Universal I / O module and control method
By designing a general I/O module, using the control unit and signal conditioning circuit to achieve flexible switching of multiple channel types, the problem of I/O modules in the prior art cannot be replaced by each other, and the effect of reducing system costs and improving resource utilization efficiency is achieved.
Patent Information
- Application Number
- CN202411924293.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Since the I/O modules of the existing automation control system cannot be replaced by different channel types, the system costs are high, complex in construction, difficult maintenance and management, and insufficient resource utilization.
A general I/O module is designed to achieve flexible switching of analog input/output and digital input/output through the combination of control unit, input unit and output unit, using controllable switches and signal conditioning circuits.
This general purpose I/O module can flexibly adapt to multiple channel types, reduces the number of I/O modules required by the system, reduces hardware procurement and system costs, simplifies system construction and maintenance management, and improves resource utilization efficiency.
Smart Images

Figure CN119644887A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation control technology, and in particular to a universal I / O module and a control method. Background Art
[0002] At present, the I / O (Input / Output) channels of the automation control system are mainly connected to the system in the form of I / O modules. Each I / O module contains multiple I / O channels of the same type, such as AI (Analog Input) channel, DI (Digital Input) channel, AO (Analog Output) channel and DO (Digital Output) channel. However, since I / O modules of different channel types cannot replace each other, the number of I / O modules required increases significantly as the scale of the system expands, which will lead to a series of problems, including high system cost, complex system assembly, and difficulty in subsequent maintenance and management. Summary of the invention
[0003] In view of the above problems, the present application provides a universal I / O module and control method, so that the same I / O module can flexibly adapt to multiple channel types. The specific scheme is as follows:
[0004] A first aspect of the present application provides a universal I / O module, comprising: a control unit, an input unit, an output unit and a controllable switch SW3;
[0005] The input unit includes: 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 is simultaneously used as the analog input AI channel entrance, the digital input DI channel entrance, the analog output AO channel exit and the digital output DO channel exit;
[0007] The controllable switch SW5 is connected in series with the resistor R1 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 connected between the first end of the controllable switch SW3 and the ground;
[0009] 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; the output end of the first signal conditioning circuit is connected to the control unit via the first analog / digital converter;
[0010] The output unit includes: 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 after passing 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 all connected to the control unit;
[0014] The control unit is used for controlling the controllable switch SW3 and the controllable switch SW5 to be closed, and controlling the controllable switch SW2 and the controllable switch SW4 to be disconnected when the signal type is configured as an AI signal; controlling the controllable switch SW3 and the controllable switch SW4 to be closed, and controlling the controllable switch SW2 and the controllable switch SW5 to be disconnected when the signal type is configured as a DI signal; controlling the controllable switch SW3 to be closed, and controlling the controllable switch SW4 and the controllable switch SW5 to be disconnected when the signal type is configured as a DO signal, and, when the DO signal is at a high level, controlling the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit so that the controllable switch SW2 operates in a saturation region, and when the DO signal is at a low level, controlling the controllable switch SW2 to be disconnected; when the signal type is configured as an AO signal, controlling the controllable switch SW3 to be closed, and controlling the controllable switch SW4 and the controllable switch SW5 to be disconnected, and, at the same time, controlling the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit so that the controllable switch SW2 operates in a variable resistance region.
[0015] In a possible implementation, the universal I / O module further includes: a resistor R5 and a feedback circuit; the feedback circuit is used 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 includes: 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 includes: a controllable switch SW1 connected between the power supply and an input end of the controllable switch SW2;
[0018] The control unit is also used to control the controllable switch SW1 to be disconnected when the signal type is configured as an AI signal; to control the controllable switch SW1 to be disconnected when the signal type is configured as a DI signal; to control the controllable switch SW1 to be closed if the DO signal is at a high level when the signal type is configured as a DO signal; to control the controllable switch SW1 or the controllable switch SW2 to be disconnected if the DO signal is at a low level; and to 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 used to respond 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 the requirements based on the code value of the 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 the output end 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; the output end of the third signal conditioning circuit is connected to the control unit via the second analog / digital converter;
[0021] When the signal type is configured as an AO signal, the control unit is further used to respond to an AO signal current accuracy diagnosis request, and determine whether the current accuracy of the AO signal meets the requirements according to the code value of the 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 used to respond to a diagnosis request of whether the resistor R1 is invalid, control the branch where the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 switches from inputting the AI signal to outputting the A0 signal, and then judge whether the resistor R1 is invalid according to the voltage across the resistor R1; the branch where the controllable switch SW2 is located is a line from the power supply to 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 respond to a diagnosis request of whether there is leakage current after the branch where the controllable switch SW4 is located is disconnected, control the branch where the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 switches from inputting the AI signal to outputting the A0 signal, and then judges whether there is leakage current after the branch where the controllable switch SW4 is located is disconnected according to the voltage across the resistor R1;
[0024] Alternatively, when the signal type is configured as an AI signal, the control unit is further used to respond to a diagnostic request for whether there is leakage current after the branch where the controllable switch SW2 is located is disconnected, and determine whether there is leakage current after the branch where the controllable switch SW2 is located is disconnected based on the voltage across the resistor R4.
[0025] In a possible implementation, when the signal type is configured as a DI signal, the control unit is further used to respond to a diagnosis request of whether the resistor R2 is failed, control the branch where the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 switches from inputting a DI signal to outputting a DO signal, and judge whether the resistor R2 is failed according to the voltage across the resistor R3; the branch where the controllable switch SW2 is located is a line from the power supply to the first end of the controllable switch SW3;
[0026] Alternatively, when the signal type is configured as a DI signal, the control unit is further configured to respond to a diagnostic request for whether there is leakage current after SW5 is disconnected, and determine whether there is leakage current after SW5 is disconnected according to the voltage across the resistor R1;
[0027] Alternatively, when the signal type is configured as a DI signal, the control unit is also used to respond to a diagnostic request for whether there is leakage current after the branch where SW2 is located is disconnected, and determine whether there is leakage current after the branch where the controllable switch SW2 is located is disconnected based on the voltage across the resistor R4.
[0028] In a possible implementation, when the signal type is configured as an AO signal, the control unit is further configured to respond to a diagnosis request of whether the controllable switch SW5 is short-circuited, and determine whether the controllable switch SW5 is short-circuited according to the voltage across the resistor R1;
[0029] Alternatively, when the signal type is configured as an AO signal, the control unit is further configured to respond to a diagnosis request of whether the controllable switch SW4 is short-circuited, and determine whether the controllable switch SW4 is short-circuited according to the voltage across the resistor R2;
[0030] Alternatively, when the signal type is configured as an AO signal, the control unit is also used to respond to a diagnostic request for whether the output circuit is faulty, and determine whether the output circuit is faulty based on the voltage across the resistor R4; the output circuit is the line from the power supply to the second end of the controllable switch SW3.
[0031] In a possible implementation, when the signal type is configured as a DO signal, the control unit is further configured to respond to a diagnosis request of whether the controllable switch SW5 is short-circuited, and determine whether the controllable switch SW5 is short-circuited according to the voltage across the resistor R1;
[0032] Alternatively, when the signal type is configured as a DO signal, the control unit is further configured to respond to a diagnosis request of whether the controllable switch SW4 is short-circuited, and determine whether the controllable switch SW4 is short-circuited according to the voltage across the resistor R2;
[0033] Alternatively, when the signal type is configured as a DO signal, the control unit is further configured to respond to a diagnosis request of whether the output circuit is faulty, and determine whether the output circuit is faulty according to the voltage across the resistor R4;
[0034] Alternatively, when the signal type is configured as a DO signal, the control unit is further used to respond to a diagnosis request of whether the output circuit control circuit is faulty. If the DO signal is at a high level, an instruction to control the output circuit to be disconnected is issued, and then the output circuit is judged to be faulty according to the voltage across the resistor R4; if the DO signal is at a low level, an instruction to control the output circuit to be closed is issued, and then the output circuit is judged to be faulty according to the voltage across the resistor R4;
[0035] The output circuit is a line from the power supply to the second end of the controllable switch SW3; the output circuit control circuit is a circuit that drives the switch on the output circuit to turn on and off under the control of the control unit.
[0036] A second aspect of the present application provides a control method for a universal I / O module, the universal I / O module comprising: a control unit, an input unit, an output unit and a controllable switch SW3;
[0037] The input unit includes: 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; the second end of the controllable switch SW3 is simultaneously used as the analog input AI channel entrance, the digital input DI channel entrance, the analog output AO channel exit and the digital output DO channel exit;
[0039] The controllable switch SW5 is connected in series with the resistor R1 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 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; the output end of the first signal conditioning circuit is connected to the control unit via the first analog / digital converter;
[0042] The output unit includes: 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 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;
[0044] The control unit is connected to the control end of the controllable switch SW2 after passing through the 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 all connected to the control unit;
[0046] The control method should be applied to the control unit, and the control method includes:
[0047] When the signal type is configured as an AI signal, the controllable switches SW3 and SW5 are controlled to be closed, and the controllable switches SW2 and SW4 are controlled to be opened;
[0048] When the signal type is configured as a DI signal, the controllable switches SW3 and SW4 are controlled to be closed, and the controllable switches SW2 and SW5 are controlled to be opened;
[0049] When the signal type is configured as a DO signal, the controllable switch SW3 is controlled to be closed, and the controllable switches SW4 and 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 the controllable switch SW2 operates 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 switches SW4 and SW5 are controlled to be opened. 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 operates in the variable resistance area.
[0051] By means of the above technical solution, the control unit in the universal I / O module provided by the present application executes 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 quantized and encoded by the first analog / digital converter after conditioning; the DI signal is similar. When configured as a DO signal, the output voltage of the digital / analog converter is controlled to drive the controllable switch SW2 to achieve high current output; when configured as an AO signal, the on-resistance of the controllable switch SW2 is controlled by controlling the output voltage of the digital / analog converter 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 THE DRAWINGS
[0052] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0053] Figure 1 An electrical schematic diagram of a universal I / O module provided for this application;
[0054] Figure 2 This is an electrical schematic diagram of another universal I / O module provided in this application. DETAILED DESCRIPTION
[0055] In the following description, in order to ensure the accuracy of the citation and the fluency of reading, the key technical terms, abbreviations or abbreviations involved in the text are summarized and explained as follows:
[0056] DCS:Distributed Control System,distributed control system;
[0057] SIS: Safety Instrumented System, safety instrument 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 increasing requirements for the versatility and flexibility of automation control systems (such as DCS systems, SIS systems, etc.). At present, the I / O channels of automation control systems are mainly connected to the system in the form of I / O modules. Each I / O module contains multiple (such as 8, 16 or 32) I / O channels of the same type, such as AI channels, DI channels, AO channels and DO channels. However, since I / O modules of different channel types cannot replace each other, this traditional model has some limitations, as follows:
[0066] 1) Since I / O modules of different channel types cannot replace each other, as the system scale expands, the number of I / O modules required increases significantly, resulting in higher system costs;
[0067] 2) A large number of I / O modules increases the complexity of system construction and the difficulty of subsequent maintenance and management;
[0068] 3) Whether in large-scale or small-scale system applications, there may be a situation where there is less demand for certain types of channels, which results in the channel resources of some I / O modules not being fully utilized, causing waste of resources and further increase in costs.
[0069] To solve the above problems, the embodiment of the present application provides a universal I / O module, whose signal types support AI signals, DI signals, AO signals and DO signals (that is, it can flexibly adapt to the four channel types of AI channels, DI channels, AO channels and DO channels), thereby effectively solving the above limitations, as follows:
[0070] 1) Since universal I / O modules can support multiple signal types, it is no longer necessary to equip each signal type with a dedicated I / O module, which greatly reduces the types and number of I / O modules required for the automation control system. Especially in large-scale automation control systems, it can significantly reduce hardware procurement and system costs;
[0071] 2) Since the types and number of required I / O modules are reduced, the complexity of system construction and the difficulty of subsequent maintenance and management are also greatly reduced;
[0072] 3) The general I / O module can dynamically allocate I / O channel resources according to actual application requirements. No matter how the demand for AI channels, DI channels, AO channels or DO channels changes, it can meet the changing needs by adjusting the configuration, avoiding the problem of idle or insufficient channel resources caused by fixed configuration. This flexibility ensures that each I / O channel can be used most effectively and significantly reduces resource waste; especially in small and medium-sized systems or specific application scenarios, more efficient channel resource allocation can be achieved at a lower cost.
[0073] A general I / O module provided in an embodiment of the present application is described in detail below in conjunction with the accompanying drawings. A person skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0074] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0075] See also Figure 1 The embodiment of the present application provides a universal I / O module, whose components include: a control unit 100, an input unit 200, an output unit 300 and a controllable switch SW3, and the specific structure of each component is as follows:
[0076] 1) Input unit 200
[0077] The input unit 200 includes: 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 is simultaneously used as the AI channel inlet, the DI channel inlet, the AO channel outlet and the DO channel outlet;
[0079] The controllable switch SW5 is connected in series with the resistor R1 and then connected between the first end of the controllable switch SW3 and the ground GND ( Figure 1 In the example, only the first end of the controllable switch SW3 is sequentially connected to the ground GND through the controllable switch SW5 and the resistor R1);
[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 the example, only the first end of the controllable switch SW3 is taken as an example to pass through the resistor R3, the controllable switch SW4, and the resistor R2 to the ground GND in sequence);
[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 via ADC1 .
[0082] 2) Output unit 300
[0083] The output unit 300 includes: 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 after passing 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, such as a PMOS tube. In this case, 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 refer to the following contents 1) to 3):
[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 is greater than the turn-on voltage VGSth of the PMOS tube (the turn-on voltage VGSth is a negative value), the PMOS tube is in the cut-off region. At this time, there is no conductive 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 source S of the PMOS tube can be regarded as a variable resistor 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 linearly related, and the absolute value of the drain-source voltage of the PMOS tube |VDS|=Rdson×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, making the drain-source voltage VDS ≤ VGS-VGSth, the PMOS tube enters the saturation region from the variable resistance region. In the saturation region, 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 the minimum.
[0091] The following takes the P-type switch tube as a PMOS tube as an example, and combines the working characteristics of the PMOS tube to describe the working principle of the embodiment of the present application in detail:
[0092] Initially, all controllable switches are in the off state. Depending on the signal type configuration, Figure 1 The control unit 100 in the universal I / O module shown executes different control logics, see the following contents 1) to 4 for details):
[0093] 1) Signal type is configured as AI signal
[0094] When the signal type is configured as an AI signal, the controllable switches SW3 and SW5 are controlled to be closed, and the controllable switches SW2 and SW4 are controlled to be disconnected (the controllable switch SW2 is disconnected, which means that the controllable switch SW2 is in the cut-off zone). At this time, the AI signal flows to the ground GND through the controllable switches SW3, 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 a voltage value that can be collected by ADC1 through the first signal conditioning circuit 101 (the first signal conditioning circuit 101 usually includes functions such as amplification, attenuation, offset, and filtering to ensure that the voltage signal input to ADC1 is within its specified input range, such as 0~3.3V). 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 ADC1; the quantized voltage signal is converted into a binary digital code, and the encoding process follows the internal logic and algorithm of ADC1), and is transmitted to the control unit 100.
[0095] In a possible implementation, the current range of the AI signal input from the second end of the controllable switch SW3 may be set to 4 mA to 20 mA.
[0096] 2) The signal type is configured as DI signal
[0097] When the signal type is configured as a DI signal, the controllable switches SW3 and SW4 are controlled to be closed, and the controllable switches SW2 and SW5 are controlled to be opened. 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 ADC1 through the first signal conditioning circuit 101. ADC1 quantizes and encodes the input voltage signal to obtain a digital code, and transmits it 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 may be set to 0V-24V.
[0099] 3) The signal type is configured as 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 switches SW4 and 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 the maximum voltage, and the voltage signal output by the DAC outputs a corresponding voltage signal through the second signal conditioning circuit 102 to drive the controllable switch SW2, so that the controllable switch SW2 operates in the saturation region to ensure its large current output capability. At this time, the power supply Power passes through the resistor R5, the controllable switch SW2, and the controllable switch SW3, and is output to the field instrument; 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 may be set to 24V.
[0102] 4) The signal type is configured as 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 switches SW4 and SW5 are controlled to be opened; 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, and uses the voltage signal to drive the gate of the controllable switch SW2, so that the controllable switch SW2 works in the variable resistance area. 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, thereby controlling 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 may be set to 4 mA to 20 mA.
[0105] In summary, the control unit 100 in the universal I / O module provided in the embodiment of the present application executes 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 resistor, and quantized and encoded by ADC1 after conditioning; the DI signal is similar. When configured as a DO signal, the DAC output voltage is controlled to drive the controllable switch SW2 to achieve high current output; when configured as an AO signal, the on-resistance of the controllable switch SW2 is controlled by controlling the DAC output voltage 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 one possible implementation, see Figure 1 The control unit 100 in any of the general I / O modules provided above is also used to perform voltage accuracy diagnosis of the DO signal when the signal type is configured as a DO signal, specifically including: when the signal type is configured as a DO signal, the control unit 100 is also used to respond to a DO signal voltage accuracy diagnosis request, and control the controllable switch SW4 to switch to a closed state, at which time the DO signal will generate a voltage divider on the resistor R2; the voltage signal on the resistor R2 is modulated to a voltage value that can be collected by ADC1 through the first signal conditioning circuit 101, and ADC1 quantizes and encodes the input voltage signal to obtain a digital code and transmits it to the control unit 100. When the signal type is configured as a DO signal, the control unit 100 also responds to the DO signal voltage accuracy diagnosis request, and can determine whether the voltage accuracy of the DO signal meets the requirements according to the code value of the digital code output by ADC1.
[0107] In a possible implementation, the control unit 100 in any of the above-mentioned universal I / O modules is further configured to perform current accuracy diagnosis of the AO signal when the signal type is configured as an AO signal. Figure 2 The universal I / O module provided above also includes: a resistor R4, a third signal conditioning circuit 103 and ADC2 (a 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; the output end of the third signal conditioning circuit 103 is connected to the control unit 100 via ADC2. When the signal type is configured as an AO signal, the voltage signal on the resistor R4 is modulated to a voltage value that can be collected by ADC2 through the third signal conditioning circuit 103, and ADC2 quantizes and encodes the input voltage signal to obtain a digital code, which is transmitted to the control unit 100. When the signal type is configured as an AO signal, the control unit 100 is also used to respond to the AO signal current accuracy diagnosis request, and judge whether the current accuracy of the AO signal meets the requirements according to the code value of the digital code output by ADC2.
[0108] In one possible implementation, see Figure 2 , the third signal conditioning circuit 103 may include a differential amplifier circuit.
[0109] In one possible implementation, see Figure 2 Any of the universal I / O modules provided above also includes a resistor R5 and a feedback circuit 104; the feedback circuit 104 is used to send the voltage across the resistor R5 to the feedback signal receiving end of the second signal conditioning circuit 102 to form a closed-loop regulation, and the current stability of the AO signal is maintained through such a negative feedback structure.
[0110] In one possible implementation, see Figure 2 Any of the above-mentioned universal I / O modules further includes: an anti-backflow diode D1 connected to the output end of the controllable switch SW2. The anti-backflow diode D1 mainly plays the role of preventing reverse connection conduction, that is, preventing energy from backflowing to the power supply Power.
[0111] In one possible implementation, see Figure 2 Any of the general I / O modules provided above also includes: a controllable switch SW1 connected between the power supply Power and the input end of the controllable switch SW2. The control unit 100 is also used to control the controllable switch SW1 to be disconnected when the signal type is configured as an AI signal; to control the controllable switch SW1 to be disconnected when the signal type is configured as a DI signal; to 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; to control the controllable switch SW1 or the controllable switch SW2 to be disconnected when the DO signal is at a low level; and to control the controllable switch SW1 to be closed when the signal type is configured as an AO signal.
[0112] The functions of the controllable switch SW1 include at least:
[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 may 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) A controllable switch SW1 is connected between the power supply and the source of the PMOS tube, which can conveniently cut off the power supply Power when the PMOS tube needs to be repaired or replaced, thereby ensuring the safety and convenience of the maintenance process.
[0115] In a possible implementation, the control unit in any of the above-mentioned universal I / O modules may be an independent device, or may adopt a one-master-multiple-slave or one-master-one-slave configuration, without limitation. In addition, corresponding signal conditioning circuits may also be added between the control unit 100 and the control ends of the controllable switches SW1, SW3, SW4, and SW5.
[0116] In a possible implementation, any of the above-mentioned universal I / O modules including the resistor R4 can also perform fault diagnosis, see also Figure 2 According to different signal type configurations, the control unit 100 executes different fault diagnosis control logics, see the following contents 1)~4):
[0117] 1) Signal type is configured as AI signal
[0118] When the signal type is configured as AI signal, AI signal samples current through resistor R1. However, the following faults may cause the current sampling value to be wrong: resistor R1 fails, there is leakage current after the branch where SW4 is located is disconnected, and there is leakage current after the branch where SW2 is located is disconnected (the cause may be: diode D1 fails and causes leakage current, or there is leakage current after SW2 is disconnected; the branch where SW2 is located refers to the line between the power supply Power to the first end of the controllable switch SW3).
[0119] When the signal type is configured as an AI signal, the control unit 100 is also used to respond to a diagnostic request for whether the resistor R1 is failed, control the branch where SW2 is located to switch to a closed state, so that the first end of SW3 switches from the input AI signal to the output A0 signal, and judge whether the resistor R1 is failed based on the voltage across the resistor R1.
[0120] When the signal type is configured as an AI signal, the control unit 100 is also used to respond to a diagnostic request for whether there is a leakage current after the branch where SW4 is located is disconnected, control the branch where SW2 is located to switch to a closed state, and switch the first end of SW3 from the input AI signal to the output A0 signal, and determine whether there is a leakage current after the branch where SW4 is located is disconnected based on the voltage across the resistor R1.
[0121] When the signal type is configured as an AI signal, the control unit 100 is also used to respond to a diagnostic request for whether there is leakage current after the branch where SW2 is located is disconnected, and to determine whether there is leakage current after the branch where SW2 is located is disconnected based on the voltage across the resistor R4. Specifically, when the signal type is configured as an AI signal, under normal circumstances, no current passes through the resistor R4. If there is leakage current after the branch where 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 ADC2 through the second signal conditioning circuit 102. ADC2 quantizes and encodes the voltage signal, and transmits the digital code to the control unit 100. The control unit 100 determines the size of the ADC2 output signal to diagnose whether there is leakage current after the branch where SW2 is located is disconnected.
[0122] 2) The signal type is configured as DI signal
[0123] When the signal type is configured as a DI signal, the DI signal samples the voltage through resistors R2 and R3. However, if the following faults occur, the voltage sampling value may be incorrect: resistor R2 fails, there is leakage current after the controllable switch SW5 is disconnected, and there is leakage current after the branch where the controllable switch SW2 is located is disconnected.
[0124] When the signal type is configured as a DI signal, the control unit 100 is also used to respond to a diagnostic request for whether the resistor R2 is failed, control the branch where SW2 is located to switch to a closed state, so that the first end of SW3 switches from an input DI signal to an output DO signal, and judge whether the resistor R2 is failed based on the voltage across the resistor R3.
[0125] When the signal type is configured as a DI signal, the control unit 100 is further configured to respond to a diagnosis request for whether there is leakage current after the controllable switch SW5 is disconnected, and determine whether there is leakage current after the controllable switch SW5 is disconnected according to the voltage across the resistor R1.
[0126] When the signal type is configured as a DI signal, the control unit 100 responds to a diagnosis request for whether there is leakage current after the branch where the controllable switch SW2 is disconnected, and determines whether there is leakage current after the branch where the controllable switch SW2 is disconnected according to the voltage across the resistor R4.
[0127] 3) The signal type is configured as AO signal
[0128] When the signal type is configured as AO signal, the current signal is output through SW2 control. However, the following faults may cause the current output value to be wrong: SW5 and SW4 are short-circuited, and the output circuit fails (the output circuit is the line from the power supply Power to the second end of the controllable switch SW3, for example, SW3 is open).
[0129] When the signal type is configured as an AO signal, the control unit 100 is further configured to respond to a diagnosis request of whether SW5 / SW4 is short-circuited, and determine whether SW5 / SW4 is short-circuited according to the voltage across the resistor R1 / resistor R2.
[0130] When the signal type is configured as an AO signal, the control unit 100 is further configured to respond to a diagnosis request of whether the output circuit is faulty, and determine whether the output circuit is faulty according to the voltage across the resistor R4.
[0131] 4) The signal type is configured as DO signal
[0132] When the signal type is configured as a DO signal, the DO signal is output through SW1 and SW2 control. However, the following faults may cause voltage output errors: SW5 and SW4 short circuit faults, output circuit faults, and output circuit control circuit faults (the output circuit is the line from the power supply Power to the second end of the controllable switch SW3, for example, SW3 is open; the output circuit control circuit is a circuit that drives the switch on the output circuit to turn on and off under the control of the control unit 100).
[0133] When the signal type is configured as a DO signal, the control unit 100 is further configured to respond to a diagnosis request of whether SW5 / SW4 is short-circuited, and determine whether SW5 / SW4 is short-circuited according to the voltage across the resistor R1 / resistor R2.
[0134] When the signal type is configured as a DO signal, the control unit 100 is further configured to respond to a diagnosis request of whether the output circuit is faulty, and determine whether the output circuit is faulty according to the voltage across the resistor R4.
[0135] When the signal type is configured as a DO signal, the control unit 100 is also used to respond to a diagnostic request for whether the output circuit control circuit is faulty. If the DO signal is at a high level, an instruction to control the output circuit to be disconnected is issued, and then whether the output circuit is faulty is determined based on the voltage across the resistor R4; if the DO signal is at a high level, an instruction to control the output circuit to be closed is issued, and then whether the output circuit is faulty is determined based on the voltage across the resistor R4. Specifically, if the DO signal is output at a high level, the control unit 100 controls SW1, SW2 or SW3 to be disconnected for 1ms. If the switch control circuit of SW1, SW2 or SW3 fails, ADC2 will collect the voltage across the resistor R4 as a high voltage during this 1ms, and the control unit 100 uses this to diagnose the fault of the switch control circuit; similarly, if the DO signal is output at a low level, the control unit 100 controls the output unit to close SW1, SW2 and SW3 for 1ms. If the switch control circuit of SW1, SW2 or SW3 fails, ADC2 will collect the voltage across the resistor R4 as a low voltage during this 1ms, and the control unit 100 uses this to diagnose the fault of the switch control circuit of SW1, SW2 or SW3.
[0136] In addition, the embodiment of the present application also discloses a control method of a universal I / O module, wherein the universal I / O module includes: a control unit, an input unit, an output unit, and a controllable switch SW3;
[0137] The input unit includes: 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; the second end of the controllable switch SW3 is simultaneously used as the analog input AI channel entrance, the digital input DI channel entrance, the analog output AO channel exit and the digital output DO channel exit;
[0139] The controllable switch SW5 is connected in series with the resistor R1 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 connected between the first end of the controllable switch SW3 and the ground;
[0141] 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; the output end of the first signal conditioning circuit is connected to the control unit via the first analog / digital converter.
[0142] The output unit includes: 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 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;
[0144] The control unit is connected to the control end of the controllable switch SW2 after passing 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 should be applied to the control unit, and the control method includes:
[0147] When the signal type is configured as an AI signal, the controllable switches SW3 and SW5 are controlled to be closed, and the controllable switches SW2 and SW4 are controlled to be opened;
[0148] When the signal type is configured as a DI signal, the controllable switches SW3 and SW4 are controlled to be closed, and the controllable switches SW2 and SW5 are controlled to be opened;
[0149] When the signal type is configured as a DO signal, the controllable switch SW3 is controlled to be closed, and the controllable switches SW4 and 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 the controllable switch SW2 operates 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 switches SW4 and SW5 are controlled to be opened. 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 operates in the variable resistance area.
[0151] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the control method disclosed in the embodiment, since it corresponds to the module disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the module part description.
[0152] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the embodiments of the present application. Therefore, the embodiments of the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features disclosed herein.
Claims
1. A universal I / O module, characterized in that: include: A control unit, an input unit, an output unit and a controllable switch SW3; The input unit includes: 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 used as the analog input AI channel entrance, the digital input DI channel entrance, the analog output AO channel exit and the digital output DO channel exit; The controllable switch SW5 is connected in series with the resistor R1 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 connected between the first end of the controllable switch SW3 and the ground; 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; the output end of the first signal conditioning circuit is connected to the control unit via the first analog / digital converter; The output unit includes: 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 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; The control unit is connected to the control end of the controllable switch SW2 after passing through the digital / analog converter and the second signal conditioning circuit; 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; The control unit is used for controlling the controllable switch SW3 and the controllable switch SW5 to be closed, and controlling the controllable switch SW2 and the controllable switch SW4 to be disconnected when the signal type is configured as an AI signal; controlling the controllable switch SW3 and the controllable switch SW4 to be closed, and controlling the controllable switch SW2 and the controllable switch SW5 to be disconnected when the signal type is configured as a DI signal; controlling the controllable switch SW3 to be closed, and controlling the controllable switch SW4 and the controllable switch SW5 to be disconnected when the signal type is configured as a DO signal, and, when the DO signal is at a high level, controlling the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit so that the controllable switch SW2 operates in a saturation region, and when the DO signal is at a low level, controlling the controllable switch SW2 to be disconnected; when the signal type is configured as an AO signal, controlling the controllable switch SW3 to be closed, and controlling the controllable switch SW4 and the controllable switch SW5 to be disconnected, and, at the same time, controlling the digital / analog converter to output a corresponding voltage signal through the second signal conditioning circuit so that the controllable switch SW2 operates in a variable resistance region.
2. The universal I / O module according to claim 1, characterized in that: The universal I / O module further includes: a resistor R5 and a feedback circuit; the feedback circuit is used to send the voltage across the resistor R5 to the feedback signal receiving end of the second signal conditioning circuit.
3. The universal I / O module according to claim 1, characterized in that: The universal I / O module further includes: an anti-backflow diode connected to the output end of the controllable switch SW2.
4. The universal I / O module according to claim 1, characterized in that: The universal I / O module further includes: a controllable switch SW1 connected between the power supply and an input end of a controllable switch SW2; The control unit is also used to control the controllable switch SW1 to be disconnected when the signal type is configured as an AI signal; to control the controllable switch SW1 to be disconnected when the signal type is configured as a DI signal; to control the controllable switch SW1 to be closed if the DO signal is at a high level when the signal type is configured as a DO signal; to control the controllable switch SW1 or the controllable switch SW2 to be disconnected if the DO signal is at a low level; and to control the controllable switch SW1 to be closed when the signal type is configured as an AO signal.
5. The universal I / O module according to claim 1, characterized in that: When the signal type is configured as a DO signal, the control unit is further used to respond 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 the requirements based on the code value of the digital code output by the first analog / digital converter.
6. The universal I / O module according to claim 1, characterized in that: 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 the output end 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; the output end of the third signal conditioning circuit is connected to the control unit via the second analog / digital converter; When the signal type is configured as an AO signal, the control unit is further used to respond to an AO signal current accuracy diagnosis request, and determine whether the current accuracy of the AO signal meets the requirements according to the code value of the digital code output by the second analog / digital converter.
7. The universal I / O module according to claim 6, characterized in that: When the signal type is configured as an AI signal, the control unit is further used to respond to a diagnosis request of whether the resistor R1 is invalid, control the branch where the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 switches from inputting the AI signal to outputting the A0 signal, and then judge whether the resistor R1 is invalid according to the voltage across the resistor R1; the branch where the controllable switch SW2 is located is a line from the power supply to 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 respond to a diagnosis request of whether there is leakage current after the branch where the controllable switch SW4 is located is disconnected, control the branch where the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 switches from inputting the AI signal to outputting the A0 signal, and then judges whether there is leakage current after the branch where the controllable switch SW4 is located is disconnected according to the voltage across the resistor R1; Alternatively, when the signal type is configured as an AI signal, the control unit is further used to respond to a diagnostic request for whether there is leakage current after the branch where the controllable switch SW2 is located is disconnected, and determine whether there is leakage current after the branch where the controllable switch SW2 is located is disconnected based on the voltage across the resistor R4.
8. The universal I / O module according to claim 6, characterized in that: When the signal type is configured as a DI signal, the control unit is further used to respond to a diagnosis request of whether the resistor R2 is invalid, control the branch where the controllable switch SW2 is located to switch to a closed state, so that the first end of the controllable switch SW3 switches from inputting a DI signal to outputting a DO signal, and judge whether the resistor R2 is invalid according to the voltage across the resistor R3; the branch where the controllable switch SW2 is located is a line from the power supply to the first end of the controllable switch SW3; Alternatively, when the signal type is configured as a DI signal, the control unit is further configured to respond to a diagnostic request for whether there is leakage current after SW5 is disconnected, and determine whether there is leakage current after SW5 is disconnected according to the voltage across the resistor R1; Alternatively, when the signal type is configured as a DI signal, the control unit is also used to respond to a diagnostic request for whether there is leakage current after the branch where SW2 is located is disconnected, and determine whether there is leakage current after the branch where the controllable switch SW2 is located is disconnected based on the voltage across the resistor R4.
9. The universal I / O module according to claim 6, characterized in that: When the signal type is configured as an AO signal, the control unit is further used to respond to a diagnosis request of whether the controllable switch SW5 is short-circuited, and determine whether the controllable switch SW5 is short-circuited according to the voltage across the resistor R1; Alternatively, when the signal type is configured as an AO signal, the control unit is further configured to respond to a diagnosis request of whether the controllable switch SW4 is short-circuited, and determine whether the controllable switch SW4 is short-circuited according to the voltage across the resistor R2; Alternatively, when the signal type is configured as an AO signal, the control unit is also used to respond to a diagnostic request for whether the output circuit is faulty, and determine whether the output circuit is faulty based on the voltage across the resistor R4; the output circuit is the line from the power supply to the second end of the controllable switch SW3.
10. The universal I / O module according to claim 6, characterized in that: When the signal type is configured as a DO signal, the control unit is further used to respond to a diagnosis request of whether the controllable switch SW5 is short-circuited, and determine whether the controllable switch SW5 is short-circuited according to the voltage across the resistor R1; Alternatively, when the signal type is configured as a DO signal, the control unit is further configured to respond to a diagnosis request of whether the controllable switch SW4 is short-circuited, and determine whether the controllable switch SW4 is short-circuited according to the voltage across the resistor R2; Alternatively, when the signal type is configured as a DO signal, the control unit is further configured to respond to a diagnosis request of whether the output circuit is faulty, and determine whether the output circuit is faulty according to the voltage across the resistor R4; Alternatively, when the signal type is configured as a DO signal, the control unit is further used to respond to a diagnosis request of whether the output circuit control circuit is faulty. If the DO signal is at a high level, an instruction to control the output circuit to be disconnected is issued, and then the output circuit is judged to be faulty according to the voltage across the resistor R4; if the DO signal is at a low level, an instruction to control the output circuit to be closed is issued, and then the output circuit is judged to be faulty according to the voltage across the resistor R4; The output circuit is a line from the power supply to the second end of the controllable switch SW3; the output circuit control circuit is a circuit that drives the switch on the output circuit to turn on and off under the control of the control unit.
11. A control method for a universal I / O module, characterized in that: The universal I / O module includes: a control unit, an input unit, an output unit and a controllable switch SW3; The input unit includes: 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 used as the analog input AI channel entrance, the digital input DI channel entrance, the analog output AO channel exit and the digital output DO channel exit; The controllable switch SW5 is connected in series with the resistor R1 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 connected between the first end of the controllable switch SW3 and the ground; 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; the output end of the first signal conditioning circuit is connected to the control unit via the first analog / digital converter; The output unit includes: 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 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; The control unit is connected to the control end of the controllable switch SW2 after passing through the digital / analog converter and the second signal conditioning circuit; 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; The control method should be applied to the control unit, and the control method includes: When the signal type is configured as an AI signal, the controllable switches SW3 and SW5 are controlled to be closed, and the controllable switches SW2 and SW4 are controlled to be opened; When the signal type is configured as a DI signal, the controllable switches SW3 and SW4 are controlled to be closed, and the controllable switches SW2 and SW5 are controlled to be opened; When the signal type is configured as a DO signal, the controllable switch SW3 is controlled to be closed, and the controllable switches SW4 and 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 the controllable switch SW2 operates in a saturation region, and when the DO signal is at a low level, the controllable switch SW2 is controlled to be disconnected; When the signal type is configured as an AO signal, the controllable switch SW3 is controlled to be closed, and the controllable switches SW4 and SW5 are controlled to be opened. 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 operates in the variable resistance area.
Citation Information
Patent Citations
Multiplex circuit for chip pins
CN103716034A
Universal interface circuit in compatible with MIPI signal output
CN107341118A
Power control by direct drive
CN108885677A
IO module for multiplexing AI channel and DI channel
CN111007819A
IO module for multiplexing AO channel and DO channel
CN111026225A