A general detection circuit and device for a PLC source-drain digital output module
By constructing detection circuits for source and sink current paths, the universality problem of PLC digital output module detection devices is solved, automatic detection of source and sink modules is achieved, and measurement efficiency is improved.
Patent Information
- Application Number
- CN202411910156.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing PLC digital output module detection devices cannot achieve universal detection of source-type and sink-type digital output modules, resulting in cumbersome disassembly and assembly processes and low measurement efficiency.
An NPN transistor, a first diode, a second diode, a first resistor and a second resistor are used to construct source and sink current paths. The current path is automatically switched through a detection circuit to achieve universal detection of PLC source and sink digital output modules.
It realizes automatic switching detection of PLC digital output modules, improves measurement efficiency, reduces repeated disassembly and assembly steps, and is suitable for load performance measurement of source and sink type digital output modules.
Smart Images

Figure CN119781367B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of industrial control automation, and particularly relates to a universal detection circuit and device for a source-drain type digital output module of a PLC. BACKGROUND
[0002] In a PLC (programmable logic controller), digital output modules are usually divided into source type and drain type, wherein the source type digital output module can provide current to the load, i.e. the current flows out of the common terminal of the PLC, passes through the load, and returns to the negative terminal of the external power supply or the ground wire, and the drain type digital output module is opposite to the source type digital output module, i.e. the current from the positive terminal of the external power supply passes through the load and flows into the common terminal of the PLC.
[0003] In order to measure the load capacity of the PLC digital output module, a detection device is usually connected to the common terminal of the PLC digital output module for direct measurement. However, in the prior art, the conventional PLC digital output module detection device includes a source type digital output module detection device and a drain type digital output module detection device, which correspond to the detection of the source type digital output module and the drain type digital output module, respectively. The two devices cannot be used universally. When the PLC device has both source type digital output modules and drain type digital output modules and shares a common terminal, two detection devices need to be prepared to meet the measurement requirements of different types of digital output modules. The disassembly and assembly process is complicated, and the measurement efficiency is low. SUMMARY
[0004] The present application provides a universal detection circuit and device for a source-drain type digital output module of a PLC to solve the technical problem that the conventional PLC digital output module detection circuit and device cannot realize universal detection of source type digital output modules and drain type digital output modules in the prior art.
[0005] To solve the above problems, the technical solution of the present application is as follows: a universal detection circuit for a source-drain type digital output module of a PLC, comprising: an NPN type transistor, a first diode, a second diode, a first resistor and a second resistor.
[0006] The base of the NPN type transistor is connected to a first terminal, the collector of the NPN type transistor is connected to a power supply terminal, the emitter of the NPN type transistor is connected to a ground terminal, and the first terminal and a second terminal are connected to the common terminal of the source type and / or drain type digital output module of the PLC.
[0007] The first diode and the second diode are in parallel connection, the cathode of the first diode is connected with the second terminal, the anode of the first diode is connected with the first end of the first resistor, the second end of the first resistor is connected with the collector of the NPN triode, and the power supply terminal, the first resistor, the first diode to the second terminal form a drain type current path; the anode of the second diode is connected with the second terminal, the cathode of the second diode is connected with the first end of the second resistor, the second end of the second resistor is connected with the collector of the NPN triode, and the second terminal, the second diode, the second resistor, the NPN triode to the ground terminal form a source type current path.
[0008] When the first terminal and the second terminal are connected with the common terminal of the PLC digital output module, the universal detection circuit is based on the low level output by the PLC drain type digital output module, the NPN triode is cut off, the current flows from the power supply terminal to the second terminal through the first resistor and the first diode in turn, the drain type current path is turned on, and the load performance of the PLC drain type digital output module is measured; the universal detection circuit is based on the high level output by the PLC source type digital output module, the NPN triode is turned on, the current flows from the second terminal to the ground terminal through the second diode, the second resistor and the NPN triode in turn, the source type current path is turned on, and the load performance of the PLC source type digital output module is measured.
[0009] Preferably, the drain type current path comprises a first branch and a second branch, the first common node of the first branch and the second branch is connected with the collector of the NPN triode, and the second common node of the first branch and the second branch is connected with the anode of the first diode.
[0010] The first resistor is arranged in series in the first branch, a third resistor and a first light emitting diode are arranged in series in the second branch, the first end of the third resistor is connected with the first common node of the first branch and the second branch, the second end of the third resistor is connected with the anode of the first light emitting diode, and the cathode of the first light emitting diode is connected with the second common node of the first branch and the second branch.
[0011] Preferably, the source type current path comprises a third branch and a fourth branch, the third common node of the third branch and the fourth branch is connected with the collector of the NPN triode, and the fourth common node of the third branch and the fourth branch is connected with the cathode of the second diode.
[0012] The second resistor is arranged in series in the third branch, the fourth resistor and the second light emitting diode are arranged in series in the fourth branch, the first end of the fourth resistor is connected with the third common node of the third branch and the fourth branch, the second end of the fourth resistor is connected with the cathode of the second light emitting diode, and the anode of the second light emitting diode is connected with the fourth common node of the third branch and the fourth branch.
[0013] Preferably, a fifth resistor is arranged in series between the power supply end and the collector of the NPN triode, and the fifth resistor is used for limiting the current amplitude transmitted from the power supply end to the collector of the NPN triode.
[0014] Preferably, the resistance of the first resistor is 100Ω, the resistance of the fifth resistor is 100Ω, and the resistance of the third resistor is 5KΩ.
[0015] Preferably, the resistance of the second resistor is 200Ω, and the resistance of the fourth resistor is 10KΩ.
[0016] Preferably, an acceleration capacitor is arranged in parallel between the base and the emitter of the NPN triode, and the acceleration capacitor is used for increasing the charge discharge efficiency of the NPN triode in the process of switching between the drain type current path and the source type current path.
[0017] Preferably, a sixth resistor is arranged in series between the first terminal and the base of the NPN triode, and the sixth resistor is used for limiting the current amplitude transmitted from the first terminal to the base of the NPN triode.
[0018] Based on the same concept, the application further provides a universal detection device of a PLC source-drain type digital quantity output module, which is equipped with the universal detection circuit of the PLC source-drain type digital quantity output module as described in any one of the above embodiments, and is used for realizing the load universal detection function of the PLC source type or drain type digital quantity output module.
[0019] Compared with the prior art, the application has the following advantages and positive effects due to the above technical solutions:
[0020] The application provides a universal detection circuit and device of a PLC source-drain type digital quantity output module. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 The application provides a structural diagram of the universal detection circuit of the PLC source-drain type digital quantity output module.
[0022] Figure 2 The application provides a current flow direction diagram of the measurement circuit of the source type digital quantity output module.
[0023] Figure 3 The application provides a current flow direction diagram of the measurement circuit of the source type digital quantity output module. DETAILED DESCRIPTION
[0024] The application provides a universal detection circuit and device of a PLC source-drain type digital quantity output module.
[0025] First embodiment
[0026] Referring to Figure 1 The application provides a universal detection circuit and device of a PLC source-drain type digital quantity output module.
[0027] Specifically, the universal detection circuit of the PLC source-drain type digital quantity output module is provided with a first connection terminal U1 and a second connection terminal U2, and the first connection terminal U1 and the second connection terminal U2 are actually kept in a common connection state, that is, when the universal detection circuit provided in the embodiment is connected to the common terminal of the PLC source type and / or drain type digital quantity output module, the level signals output by the PLC source type and drain type digital quantity output module are synchronously transmitted to the first connection terminal U1 and the second connection terminal U2.
[0028] The universal detection circuit of the PLC source-drain type digital quantity output module is internally provided with an NPN type triode, a first diode D1, a second diode D2, a first resistor R1 and a second resistor R2. The base of the NPN type triode is connected to the first connection terminal U1, the collector of the NPN type triode is connected to a power supply terminal VCC, and the emitter of the NPN type triode is connected to a ground terminal. In the embodiment, the power supply terminal VCC can output a voltage of +24V.
[0029] The first diode D1 and the second diode D2 are arranged in parallel. The cathode of the first diode D1 is connected to the second connection terminal U2, the anode of the first diode D1 is connected to the first end of the first resistor R1, the second end of the first resistor R1 is connected to the collector of the NPN type triode, and the power supply terminal VCC, the first resistor R1, the first diode D1 and the second connection terminal U2 form a drain type current path. The anode of the second diode D2 is connected to the second connection terminal U2, the cathode of the second diode D2 is connected to the first end of the second resistor R2, the second end of the second resistor R2 is connected to the collector of the NPN type triode, and the second connection terminal U2, the second diode D2, the second resistor R2 and the NPN type triode form a source type current path.
[0030] For the NPN type triode, when the base input is high, the NPN type triode is turned on, and the current can be transmitted from the collector to the emitter. Conversely, when the base input is low, the NPN type triode is cut off, and the current path between the collector and the emitter is turned off. For the first diode D1 and the second diode D2, they can respectively allow current to be input from the anode end, conduct unidirectionally and output from the cathode end.
[0031] Referring to Figures 2-3 In the conventional source-drain type digital quantity output module detection circuit of the PLC, since the source type digital quantity output module outputs a high level, the measurement circuit main body design of the source type digital quantity output module is as shown in Figure 2 The one side connection terminal of the measurement circuit is connected to the common terminal of the source type digital quantity output module, and the other side connection terminal of the measurement circuit is grounded. Conversely, the drain type digital quantity output module outputs a low level, and the measurement circuit main body design of the drain type digital quantity output module is as shown in Figure 3As shown, the one-side connecting terminal of the measuring circuit is connected with the common terminal of the sink-type digital output module, and the other-side connecting terminal of the measuring circuit is connected with the power supply terminal.
[0032] In the embodiment, a universal measuring circuit for the source-type digital output module and the sink-type digital output module is provided. When the universal measuring circuit is connected with the common terminal of the sink-type digital output module, the common terminal of the sink-type digital output module outputs low level, i.e. the first connecting terminal U1 and the first connecting terminal U2 are both low level, so the NPN-type transistor is cut off, the power supply terminal VCC outputs current, the current is transmitted to the second connecting terminal U2 through the first resistor R1 and the first diode D1 in the sink-type current path. When the universal measuring circuit is connected with the common terminal of the source-type digital output module, the common terminal of the source-type digital output module outputs high level, i.e. the first connecting terminal U1 and the first connecting terminal U2 are both high level, so the NPN-type transistor is turned on, the first connecting terminal U2 outputs current, the current is transmitted to the ground terminal through the second diode D2, the second resistor R2 in the source-type current path, and the current path from the collector to the emitter of the NPN-type transistor.
[0033] In summary, the embodiment provides a universal measuring circuit for the PLC source-sink-type digital output module. According to the high or low level output by the common terminal of the connected PLC digital output module, the current is automatically selected and switched to flow through the sink-type current path or the source-type current path, so as to meet the wiring requirements of the measuring circuit for the sink-type digital output module and the source-type digital output module in a single measuring circuit, and realize the universal measuring function for the sink-type digital output module and the source-type digital output module.
[0034] Next, the specific structure of the universal measuring circuit for the PLC source-sink-type digital output module provided in the embodiment will be described in further detail.
[0035] Preferably, in the embodiment, the sink-type current path includes a first branch and a second branch, the first common node of the first branch and the second branch is connected with the collector of the NPN-type transistor, and the second common node of the first branch and the second branch is connected with the anode of the first diode D1, i.e. the first branch and the second branch are in parallel.
[0036] The first resistor R1 is connected in series in the first branch, the second resistor R3 and the first light emitting diode LED1 are connected in series in the second branch, the first end of the third resistor R3 is connected to the first common node of the first branch and the second branch, the second end of the third resistor R3 is connected to the anode of the first light emitting diode LED1, and the cathode of the first light emitting diode LED1 is connected to the second common node of the first branch and the second branch. When the drain type current path is turned on, the current can flow into the anode of the first light emitting diode LED1 and flow out of the cathode of the first light emitting diode LED1, so that the first light emitting diode LED1 can emit light, indicating that the drain type current path is in an on state at this time, that is, the PLC digital output module detected by the universal detection circuit at this time is a drain type digital output module. The third resistor R3 is used to limit the current amplitude flowing through the second branch, preventing the first light emitting diode LED1 from being damaged due to excessive current.
[0037] Similarly, the source type current path includes a third branch and a fourth branch, the third common node of the third branch and the fourth branch is connected to the collector of the NPN type transistor, and the fourth common node of the third branch and the fourth branch is connected to the cathode of the second diode D2, that is, the third branch and the fourth branch are in parallel.
[0038] The second resistor R2 is connected in series in the third branch, the fourth resistor R4 and the second light emitting diode LED2 are connected in series in the fourth branch, the first end of the fourth resistor R4 is connected to the third common node of the third branch and the fourth branch, the second end of the fourth resistor R4 is connected to the cathode of the second light emitting diode LED2, and the anode of the second light emitting diode LED2 is connected to the fourth common node of the third branch and the fourth branch. Therefore, when the source type current path is turned on, the current can flow into the anode of the second light emitting diode LED2 and flow out of the cathode of the second light emitting diode LED2, so that the first light emitting diode LED2 can emit light, indicating that the source type current path is in an on state at this time, that is, the PLC digital output module detected by the universal detection circuit at this time is a source type digital output module. The fourth resistor R4 is used to limit the current amplitude flowing through the fourth branch, preventing the second light emitting diode LED2 from being damaged due to excessive current.
[0039] Preferably, in the embodiment, the fifth resistor R5 is connected in series between the power supply terminal VCC and the collector of the NPN transistor. When the drain type current path is turned on, the power supply terminal VCC outputs current. The current first flows through the fifth resistor R5, then flows through the first resistor R1 and the second resistor R2 connected in parallel, and finally is transmitted to the second terminal U2. By measuring the voltage across the fifth resistor R5 and the first resistor R1, the actual current flowing through the fifth resistor R5 and the first resistor R1 can be calculated according to Ohm's law, and the load capacity and performance of the PLC drain type digital output module can be evaluated and verified. At the same time, when the source type current path is turned on, the power supply terminal VCC will also output current in addition to the second terminal U2. Therefore, the fifth resistor R5 connected in series between the power supply terminal VCC and the collector of the NPN transistor can be used to limit the current flowing into the collector of the NPN transistor from the power supply terminal VCC, preventing the NPN transistor from being burned out due to excessive current.
[0040] Specifically, in the embodiment, the resistance value of the first resistor R1 is selected to be 100Ω, the resistance value of the fifth resistor R5 is selected to be 100Ω, and the resistance value of the third resistor R3 is 5KΩ. The smaller resistance values of the first resistor R1 and the fifth resistor R5 are used in combination with the +24V voltage output by the power supply terminal VCC to generate a larger measurement current in the drain type current path, thereby improving the load measurement accuracy of the PLC drain type digital output module. At the same time, the larger resistance value of the third resistor R3 is used to limit the current flowing through the first light emitting diode LED1, preventing the first light emitting diode LED1 from being damaged due to overcurrent.
[0041] Similarly, the resistance value of the second resistor is selected to be 200Ω, and the resistance value of the fourth resistor is 10KΩ, thereby improving the load measurement accuracy of the PLC source type digital output module and preventing the second light emitting diode LED2 from being damaged due to overcurrent.
[0042] Preferably, in the embodiment, an acceleration capacitor C1 is connected in parallel between the base and the emitter of the NPN transistor. The capacitance value of the acceleration capacitor C1 is selected to be 100pF. During the switching process of the NPN transistor between the on state and the off state, a certain amount of charge will accumulate between the base and the emitter of the NPN transistor. The accumulation and release of the charge will affect the switching speed of the NPN transistor. Therefore, the acceleration capacitor C1 is provided to provide an additional path for the charge discharge of the NPN transistor, thereby improving the switching speed of the NPN transistor and increasing the switching efficiency of the source type digital output module detection and the drain type digital output module detection. At the same time, the acceleration capacitor C1 can prevent voltage spikes from occurring in the switching process of the NPN transistor, thereby protecting the general detection circuit from being damaged.
[0043] Preferably, the sixth resistor R6 is connected in series between the power supply end and the base of the NPN triode, the resistance of the sixth resistor R6 is selected as 1KΩ, and the sixth resistor R6 is used to limit the maximum current flowing into the base of the NPN triode from the first terminal U1, so as to prevent the excessive base current from damaging the NPN triode.
[0044] Second embodiment
[0045] Based on the same concept, the application further provides a universal detection device of the PLC source-drain type digital output module, which is internally equipped with the universal detection circuit of the PLC source-drain type digital output module as described in any one of the first embodiments, can measure the voltage values between the load resistors of the source type current path and the drain type current path in the universal detection circuit, and further calculate the actual current flowing through the load resistor according to Ohm's law, so as to evaluate and verify the actual load capacity and performance of the PLC source type or drain type digital output module.
[0046] Through the embodiment, the load function universal detection of the source type digital output module and the drain type digital output module can be realized, without providing two corresponding groups of detection devices specially for the source type digital output module and the drain type digital output module, so as to realize the automatic measurement function of the PLC source type or drain type digital output module during switching output, effectively improve the measurement operation efficiency, and reduce the use cost.
[0047] The embodiments of the application are described in detail above with reference to the drawings, but the application is not limited to the above-described embodiments. Even if various changes are made to the application, if the changes belong to the scope of the claims of the application and equivalent technologies thereof, they still fall within the protection scope of the application.
Claims
1. A general detection circuit of a PLC source-drain digital output module, characterized in that, The utility model relates to a kind of universal detection circuit, including: NPN triode, first diode, second diode, first resistance and second resistance; The base of the NPN triode is connected with the first terminal, the collector of the NPN triode is connected with the power supply terminal, the emitter of the NPN triode is connected with the ground terminal, and the first terminal and the second terminal are connected with the common terminal of PLC source type and / or drain type digital output module; The first diode and the second diode are connected in parallel, the cathode of the first diode is connected with the second terminal, the anode of the first diode is connected with the first end of the first resistance, the second end of the first resistance is connected with the collector of the NPN triode, the power supply terminal, the first resistance, the first diode to the second terminal form a drain type current path; the anode of the second diode is connected with the second terminal, the cathode of the second diode is connected with the first end of the second resistance, the second end of the second resistance is connected with the collector of the NPN triode, the second terminal, the second diode, the second resistance, the NPN triode to the ground terminal form a source type current path; When the first terminal and the second terminal are connected with the common terminal of PLC digital output module, the universal detection circuit is based on the low level output by PLC drain type digital output module, the NPN triode is cut off, the current flows from the power supply terminal to the second terminal through the first resistance and the first diode, the drain type current path is turned on, and the load performance of PLC drain type digital output module is measured; the universal detection circuit is based on the high level output by PLC source type digital output module, the NPN triode is turned on, the current flows from the second terminal to the ground terminal through the second diode, the second resistance and the NPN triode, the source type current path is turned on, and the load performance of PLC source type digital output module is measured.
2. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 1, wherein, The drain type current path includes a first branch and a second branch, the first common node of the first branch and the second branch is connected with the collector of the NPN triode, and the second common node of the first branch and the second branch is connected with the anode of the first diode; The first resistance is connected in series in the first branch, the third resistance and the first light emitting diode are connected in series in the second branch, the first end of the third resistance is connected with the first common node of the first branch and the second branch, the second end of the third resistance is connected with the anode of the first light emitting diode, and the cathode of the first light emitting diode is connected with the second common node of the first branch and the second branch.
3. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 1, wherein, The source type current path includes a third branch and a fourth branch, the third common node of the third branch and the fourth branch is connected with the collector of the NPN triode, and the fourth common node of the third branch and the fourth branch is connected with the cathode of the second diode; The second resistor is connected in series in the third branch, the fourth resistor and the second light emitting diode are connected in series in the fourth branch, the first end of the fourth resistor is connected with the third common node of the third branch and the fourth branch, the second end of the fourth resistor is connected with the cathode of the second light emitting diode, and the anode of the second light emitting diode is connected with the fourth common node of the third branch and the fourth branch.
4. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 1, wherein, A fifth resistor is connected in series between the power supply end and the collector of the NPN transistor, and the fifth resistor is used for limiting the current amplitude transmitted from the power supply end to the collector of the NPN transistor.
5. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 4, wherein, The resistance of the first resistor is defined as 100Ω, the resistance of the fifth resistor is defined as 100Ω, and the resistance of the third resistor is defined as 5KΩ.
6. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 3, wherein, The resistance of the second resistor is defined as 200Ω, and the resistance of the fourth resistor is defined as 10KΩ.
7. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 1, wherein, A speed-up capacitor is connected in parallel between the base and the emitter of the NPN transistor, and the speed-up capacitor is used for increasing the charge discharge efficiency of the NPN transistor in the process of switching between the drain-type current path and the source-type current path.
8. The universal detection circuit for a PLC source-drain digital output module as claimed in claim 1, wherein, A sixth resistor is connected in series between the first terminal and the base of the NPN transistor, and the sixth resistor is used for limiting the current amplitude transmitted from the first terminal to the base of the NPN transistor.
9. A general detection device of a PLC source-drain type digital quantity output module, characterized in that, A general detection circuit provided with the PLC source-drain type digital output module according to any one of claims 1-8 is used for realizing the general detection function of the load of the PLC source-type or drain-type digital output module.
Citation Information
Patent Citations
Digital quantity output circuit, digital quantity output device and digital quantity output system
CN113098489A
Underground power supply improved additional direct current power supply type leakage protection device
CN221574866U