Multipurpose switching value detection device

By designing a multi-purpose switching detection device and using dual-channel photorelays and optocouplers to detect switching outputs and inputs in various forms, the problems of cumbersome detection and difficult management in the existing technology have been solved, and the detection forms have been universalized. and program-controlled operation, which improves detection efficiency and flexibility.

CN118731504APending Publication Date: 2024-10-01BEIJING INST OF COMP TECH & APPL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410781925.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing switching signal detection devices are cumbersome to test and inconvenient to manage and maintain, and cannot adapt to the detection needs of multiple types of switching signals.

Method used

A multi-purpose switching detection device is designed, which uses dual-channel photorelays and optocouplers, and uses circuit components such as current-limiting resistors and pull-up resistors to realize various forms of switching output and input detection, and controls the output through software. mode, supports the maximum setting of the number of channels and the detection of multiple forms.

Benefits of technology

It realizes the universal form of switching value detection, simplifies the management of test tooling, supports program-controlled operation, meets the testing needs of various switching value channels, and improves detection efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118731504A_ABST
    Figure CN118731504A_ABST
Patent Text Reader

Abstract

The invention relates to a multipurpose switching value detection device, and belongs to the field of testing. The invention provides a multipurpose on-off input detection device which can detect on-off input of detected equipment in three forms. The switching value detection device can be controlled in a program-controlled manner and can be obtained and controlled through software; the number of the switching value input channels can be set according to the maximum number of the channels of the tested equipment or the switching value channels of the tested equipment can be tested in the form of superposition of multiple channels and the like; on-off input in the on-off detection device achieves form generalization, and the purpose of simplifying test tool management and achieving form generalization is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original patent application with application number 202111128742.9. The application date of the original patent application is September 26, 2021, and the name of the invention is: A multi-purpose switch quantity detection device. Technical Field

[0002] The invention belongs to the field of testing, and specifically relates to a multi-purpose switch quantity detection device, and more particularly to a switch quantity input and output detection method that can be used simultaneously. Background Art

[0003] The switch quantity input and output detection device is an indispensable detection device in the field of industrial control. The commonly used detection method is to detect a certain type of switch quantity signal, such as fixed output and fixed input. Contact for input, contact for output. Due to the large variety of switch quantity signals being tested, there are also many detection devices. One detection device corresponds to one switch quantity signal test. The test is cumbersome in the detection of multiple types of switch quantity signals, and the management, maintenance and calibration of the detection device in the later stage add some work. In view of this phenomenon, a switch quantity input and output detection device is designed and developed. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] The technical problem to be solved by the present invention is how to provide a multi-purpose switch quantity detection device to solve the problems that the existing switch quantity signal detection device has complicated testing and is inconvenient to manage and maintain.

[0006] (II) Technical solution

[0007] In order to solve the above technical problems, the present invention proposes a multi-purpose switch quantity detection device, which is used to detect the switch quantity output of the device under test, including a dual-channel photorelay K1, pins 1 and 2 are the first input ends of K1, pins 7 and 8 are the first output ends of K1, pins 3 and 4 are the second input ends of K1, and pins 5 and 6 are the second output ends of K1; pin 1 of K1 is connected to PWR through a current limiting resistor R1, pin 3 is connected to current limiting resistor R2 and then connected to pin 2, connected to switch quantity input +, pin 4 is connected to switch quantity input -, and is connected to AGND in the detection device, pins 5 and pin 7 are connected to GND, pin 6 is used as the output end detection signal 1 of K1, and is connected to a +3.3V power supply through a pull-up resistor R3, and pin 8 is used as the output end detection signal 2 of K1, and is connected to a +3.3V power supply through a pull-up resistor R4.

[0008] Further, R1 is a 2.7K resistor, R2 is a 2.7K resistor, R3 is a 1K resistor, and R4 is a 1K resistor.

[0009] Further, when the switch output of the device under test is in the first form, the device under test includes a switch S1 and a 24V / 28V DC power supply, the switch S1 is connected to the output of the positive electrode of the 24V / 28V DC power supply in the circuit, and the other end of the switch is connected to the output terminal 1, and the negative electrode of the 24V / 28V DC power supply is directly output to the output terminal 2, or used in the form of a common negative electrode; when using the detection device for detection, the output terminal 1 corresponding to the switch S1 of the device under test is connected to the switch input + of the detection device, the detection device PWR is connected to the positive electrode of the 24V / 28V DC power supply, and the output terminal 2 is connected to the switch input - of the detection device.

[0010] Further, when the switch output of the device under test is in the second form, the device under test includes a switch S1 and a 24V / 28V DC power supply, the switch S1 is connected to the negative pole of the 24V / 28V DC power supply in the circuit, and the other end of the switch is connected to the output terminal 2. The positive pole of the 24V / 28V DC power supply is directly output to the output terminal 1, or is used in the form of a common positive pole; when using the detection device for detection, the output terminal 1 connected to the positive pole of the 24V / 28V DC power supply of the device under test is connected to the detection device PWR, and the output terminal 2 corresponding to the switch S1 of the device under test is connected to the switch input + of the detection device, and the detection device AGND is connected to the negative pole of the 24V / 28V DC power supply.

[0011] Furthermore, when the switch output of the device under test is in the third form, the device under test includes a switch S1, which is in the form of a contact pair, and the two ends of the switch S1 are led out to the output terminal 1 and the output terminal 2; when using the detection device for detection, the two output ends of the device under test are connected to the switch input + and the switch input - of the detection device, and the PWR and AGND of the detection device are connected to a 24V / 28V DC power supply.

[0012] The invention provides a multi-purpose switch quantity detection device, which is used for detecting the switch quantity input of a device under test, and comprises photorelays K1, K2 and K3, wherein pins 1 and 2 of the photorelays K1, K2 and K3 are first input ends of the photorelays, pins 7 and 8 are first output ends of the photorelays, pins 3 and 4 are second input ends of the photorelays, and pins 5 and 6 are second output ends of the photorelays; pin 1 of the photorelays K1, K2 and K3 is connected to the positive pole of a 3.3V power supply of a control circuit through current limiting resistors R1, R2 and R3 respectively, pins 2 and pin 3 of the photorelays K1, K2 and K3 are all connected, pin 7 of the photorelay K1 is connected to pin 6 of the photorelay K2 and pin 5 of the photorelay K3, and pin 6 of the photorelay K1 is connected to pin 8 of the photorelay K2 and pin 4 of the photorelay K3. 8, pins 6 and 7 of the photorelay K3 are connected, pin 4 of the photorelay K1 is used as the control circuit signal S1, pins 4 of the photorelays K2 and K3 are used as output mode control terminals Mode1# and Mode1 respectively, pin 8 of the photorelay K1 is used as the output terminal OUT1-, pin 5 is used as the output terminal OUT1+, pin 7 of the photorelay K2 is connected to PWR, and pin 5 is connected to AGND; for the photorelay K1, the photorelay K1 controls the signal output of the detection device through the control circuit signal S1, the photorelay K2 sets the output mode of the detection device to the active output mode through the control circuit signal Mode1#, and the photorelay K3 sets the output mode of the detection device to the contact switch mode through the control circuit signal Mode1, and Mode1 and Mode1# are mutually exclusive.

[0013] Furthermore, the photorelays K1, K2 and K3 are all AQW212EHA.

[0014] Further, when the switch quantity input of the device under test is in the first form, the device under test includes an optocoupler D1, the optocoupler D1 is a dual-channel input, D1 pins 1 and 2 are first channel inputs, and pins 3 and 4 are second channel inputs; D1 pins 1 and 3 are input positive terminals, connected to the positive pole of the 24V / 28V power supply through current limiting resistors R1 and R2, D1 pins 2 and 4 are input negative terminals, KIN1 and KIN2 are led out through terminals, KIN1 and KIN2 are 2-way switch quantity input signal input terminals, and when the signal input terminals KIN1 and KIN2 are connected to the negative pole of the 24V / 28V power supply, the switch If the quantity input is valid, the corresponding D1 pin 7 and pin 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC and pin 5 is grounded; when using the detection device for detection, connect the KIN1 port of the device under test to the output terminal OUT1- of the detection device, connect the PWR and AGND of the detection device to the 24V / 28V power supply of the switch signal, and set the output mode of the detection device to the active output mode to detect the KIN1 port of the device under test; after waiting for the KIN1 port to be tested, connect the KIN2 port to the output terminal OUT1- of the detection device for detection.

[0015] Further, when the switch input of the device under test is in the second form, the device under test includes an optocoupler D1, the optocoupler D1 is a dual-channel input, D1 pins 1 and 2 are first channel inputs, and pins 3 and 4 are second channel inputs; D1 pins 1 and 3 are input positive terminals, connected to external lead-out terminals KIN1 and KIN2 through current limiting resistors R1 and R2, D1 pins 2 and 4 are input negative terminals, connected to the negative electrode of the 24V / 28V power supply; KIN1 and KIN2 are 2-way switch input signal input terminals, and when the signal input terminals KIN1 and KIN2 are connected to the positive electrode of the 24V / 28V power supply, the switch The quantity input is valid; the corresponding D1 pin 7 and pin 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded; when using the detection device for detection, the KIN1 port of the device under test is connected to the output terminal OUT1+ of the detection device, the detection device PWR and AGND are connected to the 24V / 28V power supply of the switch signal, and the output mode of the detection device is set to the active output mode to detect the KIN1 port of the device under test; after waiting for the test of the KIN1 port, connect the KIN2 port to the output terminal OUT1+ of the detection device for detection.

[0016] Further, when the switch input of the device under test is in the third form, the device under test includes an optocoupler D1, the optocoupler D1 is a dual-channel input, D1 pins 1 and 2 are first channel inputs, pins 3 and 4 are second channel inputs, D1 pins 1 and 3 are input positive terminals, connected to the positive pole of the 24V / 28V power supply through current limiting resistors R1 and R2, D1 pins 2 and 4 are input negative terminals, KIN1+ and KIN2+ are led out through terminals, and KIN1- and KIN2- terminals are connected to the negative pole of the 24V / 28V power supply; the switch input signal is a pair of contact pairs, KIN1+ and KIN1- are first channel signal input terminals, KIN2+ and KIN2- are second channel signal input terminals, and the KIN1+ and KIN2+ terminals of the signal input terminals are connected to the negative pole of the 24V / 28V power supply through the current limiting resistors R1 and R2. + port and KIN1- port are short-circuited, and the switch input is valid. Similarly, KIN2+ and KIN2- ports are short-circuited, and the switch input is valid; the corresponding D1 pins 7 and 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded; when using the detection device for detection, connect the KIN1+ and KIN1- ports of the device under test to the output terminals OUT1+ and OUT1- of the detection device, and set the output mode of the detection device to the contact switch mode to detect the KIN1+ and KIN1- ports; after waiting for the test of the KIN1+ and KIN2- ports, connect the KIN2+ and KIN2- ports to the output terminals OUT1+ and OUT1- of the detection device for detection.

[0017] (III) Beneficial effects

[0018] The present invention provides a multi-purpose switch quantity detection device, which has the following advantages:

[0019] The switch quantity detection device can be program-controlled and acquired and controlled through software;

[0020] The number of switch input and output channels can be set to the maximum according to the number of channels of the device under test or through multiple superpositions to meet the test of the switch channels of the device under test;

[0021] The switch input and switch output in the switch detection device are both standardized in form, so as to achieve the purpose of simplifying the management of test tools and standardizing the form. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 The first form of the switch quantity output of the device under test of the present invention;

[0023] Figure 2 The second form of the switch quantity output of the device under test of the present invention;

[0024] Figure 3 The third form of the switch quantity output of the device under test of the present invention;

[0025] Figure 4 It is a switch output signal test circuit of the detection device of the present invention;

[0026] Figure 5 It is the first form of the switch quantity input signal of the device under test of the present invention;

[0027] Figure 6 This is the second form of the switch quantity input signal of the device under test of the present invention;

[0028] Figure 7 It is the third form of the switch quantity input signal of the device under test of the present invention;

[0029] Figure 8 The invention discloses a switch quantity input signal testing circuit for the detection device. DETAILED DESCRIPTION

[0030] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0031] like Figures 1 to 3 As shown in the figure, there are three forms of switch output of the device under test, which provide switch output signals to the outside through switch control closure. Figure 1 The first form of the switch output of the device under test is shown, which is to control the on and off of the positive pole of the 24V / 28V DC power supply to realize the output of the switch signal. The device under test includes a switch S1 and a 24V / 28V DC power supply. The switch S1 is connected to the output of the positive pole of the 24V / 28V DC power supply in the circuit, and the other end of the switch is connected to the output terminal 1. The negative pole of the 24V / 28V DC power supply is directly output to the output terminal 2, or used in the form of a common negative pole.

[0032] like Figure 2 The second form of the switch output of the device under test is shown, which is to control the on and off of the negative pole of the 24V / 28V DC power supply to realize the switch output signal. The device under test includes a switch S1 and a 24V / 28V DC power supply. The switch S1 is connected to the negative pole of the 24V / 28V DC power supply in the circuit, and the other end of the switch is connected to the output terminal 2. The positive pole of the 24V / 28V DC power supply is directly output to the output terminal 1, or used in the form of a common positive pole.

[0033] like Figure 3 The third form of the switch output of the device under test is shown. The device under test includes a switch S1, which is in the form of a contact pair, and the two ends of the switch S1 are externally led to output terminals 1 and 2. When the switch S1 is closed, the two contacts are conductive, and when S1 is open, the two contacts are open.

[0034] The three types of switch output signals are reflected in specific practical applications. The corresponding detection devices also need to have three forms. Common detection devices need to make three forms of detection interfaces to test switch output signals. A switch output detection device is designed for the three switch output forms, which can be connected to the above three forms with the same interface.

[0035] like Figure 4 As shown, the schematic diagram is a schematic diagram of a detection device for three forms of switch output of the device under test, and the detection device includes a dual-channel photorelay K1, pins 1 and 2 are the first input end of K1, pins 7 and 8 are the first output end of K1, pins 3 and 4 are the second input end of K1, and pins 5 and 6 are the second output end of K1. Pin 1 of K1 is connected to PWR through a current limiting resistor R1, pin 3 is connected to current limiting resistor R2 and then connected to pin 2, connected to switch input +, pin 4 is connected to switch input -, and connected to AGND in the detection device, pins 5 and 7 are connected to GND, pin 6 is used as the output end of K1 to detect signal 1, and is connected to a +3.3V power supply through a pull-up resistor R3, and pin 8 is used as the output end of K1 to detect signal 2, and is connected to a +3.3V power supply through a pull-up resistor R4. Among them, R1 is a 2.7K resistor, R2 is a 2.7K resistor, R3 is a 1K resistor, and R4 is a 1K resistor. The switch input + and switch input - are the input points of the detection device. The switch input - is connected to AGND in the detection device. The output detection signal 1 and the output detection signal 2 are the output points of the detection device. PWR and AGND are the switch power supplies shared by the detection device and the device under test, and the adapted power supply voltage is 24V / 28V.

[0036] Detection Figure 1 When the first switch output form of the device under test is shown, use Figure 4 The detection device is used for detection. Connect the output terminal 1 corresponding to the right side of the switch S1 of the device under test to the switch input + of the detection device, and connect the detection device PWR to the positive pole of the 24V / 28V DC power supply. Connect the output terminal 2 to the switch input - of the detection device. This form belongs to the common ground connection method. The actual device under test may not have the corresponding output terminal 2. Connect the detection device AGND to the negative pole of the 24V / 28V DC power supply. When using the detection device for testing, when the switch S1 of the device under test is in the disconnected state, the first path of the input end of the detection device K1 is turned on, and the second path is turned on. Both the detection signal 1 and the detection signal 2 are low level, indicating that the switch quantity of the device under test has no output signal. When the switch S1 of the device under test is in the closed state, the first path of the detection device K1 is not turned on, and the second path is turned on. The detection signal 1 signal is high level, and the detection signal 2 signal is low level, indicating that the switch quantity of the device under test has an output signal.

[0037] Detection Figure 2When the second switch output form of the device under test is shown, use Figure 4 The detection device is used for detection. Connect the output terminal 1 connected to the positive pole of the 24V / 28V DC power supply of the device under test with the PWR of the detection device. This form belongs to the common positive connection method. The actual device under test may not have the output terminal 1 connected to the positive pole of the 24V / 28V DC power supply. Connect the PWR of the detection device with the positive pole of the 24V / 28V DC power supply. The output terminal 2 corresponding to the right side of the switch S1 of the device under test is connected to the switch input + of the detection device, and the detection device AGND is connected to the negative pole of the 24V / 28V DC power supply. When using the detection device for testing, when the switch S2 of the device under test is in the disconnected state, the first path of the input end of the detection device K1 is turned on, the second path is turned on, and the detection signal 1 and the detection signal 2 are both low level, indicating that the switch quantity of the device under test has no output signal. When the switch S1 of the device under test is in the closed state, the first path of the detection device K1 is turned on, the second path is not turned on, the detection signal 1 signal is low level, and the detection signal 2 signal is high level, indicating that the switch quantity of the device under test has an output signal.

[0038] Detection Figure 3 When the third switch output form of the device under test is shown, use Figure 4 The detection device is used for detection. Connect the two output terminals of the device under test to the switch input + and switch input - of the detection device, and connect the PWR and AGND of the detection device to a 24V / 28V DC power supply. When using the detection device for testing, when the switch S1 of the device under test is in the disconnected state, the first path of the input terminal of the detection device K1 is turned on, the second path is turned on, and both the detection signal 1 and the detection signal 2 are low level, indicating that the switch quantity of the device under test has no output signal. When the switch S1 of the device under test is in the closed state, the first path of the detection device K1 is turned on, the second path is not turned on, the detection signal 1 signal is low level, and the detection signal 2 signal is high level, indicating that the switch quantity of the device under test has an output signal.

[0039] When the test result of the switch quantity output detection device of the device under test shows that there is no output signal of the switch quantity, the detection signal 1 and the detection signal 2 of the detection device are both low level, and one of the detection signal 1 and the detection signal 2 is high level, indicating that the switch quantity has an output signal. It can be judged whether the switch quantity of the device under test outputs a signal based on the output form of the switch quantity of the device under test and the detection signal 1 and the detection signal 2 of the detection device.

[0040] like Figures 5 to 7 As shown in the figure, there are three forms of switch input of the device under test, which need to be used Figure 8 detection device to detect.

[0041] like Figure 5 The figure shows the first type of switch input circuit diagram of the device under test. Figure 8The output signal is isolated as a switch input signal by the optocoupler D1 and then input to the user device from the output end of the optocoupler D1. The user device is a computer or FPGA and other devices. The device under test includes an optocoupler D1, which has a dual-channel input. D1 pins 1 and 2 are the first channel inputs, and pins 3 and 4 are the second channel inputs. D1 pins 1 and 3 are the positive input terminals, which are connected to the positive pole of the 24V / 28V power supply through current limiting resistors R1 and R2. D1 pins 2 and 4 are the negative input terminals, and KIN1 and KIN2 are led out through terminals. KIN1 and KIN2 are the two-way switch input signal input terminals. When the signal input terminals KIN1 and KIN2 are connected to the negative pole of the 24V / 28V power supply, the switch input is valid, and the corresponding D1 pins 7 and 6 output corresponding signals KINS1 and KINS2 for use by the user device; pin 8 is connected to VCC, and pin 5 is grounded.

[0042] like Figure 6 The following is the circuit diagram of the second switch input form of the device under test. Figure 8 The output signal is isolated as a switch input signal by the optocoupler D1 and then input to the device through the output end of the optocoupler D1. The device under test includes an optocoupler D1, which has a dual-channel input. D1 pins 1 and 2 are the first channel inputs, and pins 3 and 4 are the second channel inputs. D1 pins 1 and 3 are the positive input terminals, which are connected to the external lead-out terminals KIN1 and KIN2 through current limiting resistors R1 and R2. D1 pins 2 and 4 are the negative input terminals, which are connected to the negative pole of the 24V / 28V power supply. KIN1 and KIN2 are the 2-way switch input signal input terminals. When the signal input terminals KIN1 and KIN2 are connected to the positive pole of the 24V / 28V power supply, the switch input is valid. Corresponding D1 pins 7 and 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded.

[0043] like Figure 7 The figure shows the third type of switch input circuit diagram of the device under test. Figure 8The output signal is isolated by the optocoupler D1 as a switching input signal and then input to the device through the output end of the optocoupler D1. The device under test includes an optocoupler D1, which has a dual-channel input. Pins 1 and 2 of D1 are the first channel inputs, and pins 3 and 4 are the second channel inputs. Pins 1 and 3 of D1 are the positive input terminals, which are connected to the positive pole of the 24V / 28V power supply through current limiting resistors R1 and R2. Pins 2 and 4 of D1 are the negative input terminals, and KIN1+ and KIN2+ are led out through the terminals. The KIN1- and KIN2- terminals are connected to the negative pole of the 24V / 28V power supply. The switching input signal is a pair of contact pairs, KIN1+ and KIN1- are the first channel signal input terminals, and KIN2+ and KIN2- are the second channel signal input terminals. When the KIN1+ port and the KIN1- port of the signal input terminal are short-circuited, the switching input is valid. Similarly, when the KIN2+ and KIN2- ports are short-circuited, the switching input is valid. Corresponding D1 pin 7 and pin 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded.

[0044] The three types of switch input signals are reflected in specific practical applications. The corresponding detection devices also need to have three forms. Common detection devices need to make three forms of detection interfaces to test switch output signals. A switch input detection device is designed for the three switch input forms, which can be connected to the above three forms with the same interface. Figure 8 As shown. The detection device is used to detect the switch input of the device under test, including photorelays K1, K2, and K3. The output terminals OUT1+ and OUT1- are the output terminals of the detection device. S1 is the signal for controlling the output of the detection device, and the low level is valid. Mode1 and Mode1# are the output mode controls of the detection device. Their signals are mutually exclusive. The detection device defaults to Mode1 as high level and Mode1# as low level. The output mode is the active output mode, that is, the output terminals OUT1+ and OUT1- are connected to the 24V / 28V power supply. When Mode1 is low level and Mode1# is high level, the output mode of the detection device is the contact switch mode, that is, the output terminals OUT1+ and OUT1- are short-circuited. PWR and AGND are the power input terminals of the switch signal of the detection device, which are connected to the 24V / 28V power supply.

[0045] Photorelays K1, K2 and K3 are all AQW212EHA.

[0046] The working principle of the detection device is to realize the output mode and signal output of the detection device by controlling three dual-path photorelays. Pins 1 and 2 of the photorelays K1, K2, and K3 are the first input ends of the photorelays, pins 7 and 8 are the first output ends of the photorelays, pins 3 and 4 are the second input ends of the photorelays, and pins 5 and 6 are the second output ends of the photorelays. Pin 1 of photorelays K1, K2 and K3 is connected to the positive pole of the 3.3V power supply of the control circuit through current limiting resistors R1, R2 and R3 respectively, pin 2 and pin 3 of photorelays K1, K2 and K3 are connected, pin 7 of photorelay K1 is connected to pin 6 of photorelay K2 and pin 5 of photorelay K3, pin 6 of photorelay K1 is connected to pin 8 of photorelay K2 and pin 8 of photorelay K3, pins 6 and 7 of photorelay K3 are connected, pin 4 of photorelay K1 is used as the control circuit signal S1, pin 4 of photorelays K2 and photorelay K3 are used as output mode control terminals Mode1# and Mode1 respectively, pin 8 of photorelay K1 is used as output terminal OUT1-, pin 5 is used as output terminal OUT1+, pin 7 of photorelay K2 is connected to PWR, and pin 5 is connected to AGND.

[0047] The photorelay K1 controls the signal output of the detection device through the control circuit signal S1. When the control circuit signal S1 is at a low level, the input end of the photorelay K1 is turned on, and the first output end corresponding to K1 pins 7 and 8 is turned on, and the second output end of pins 5 and 6 is turned on. K1 pin 5 is connected to the output terminal OUT1+, and pin 8 is connected to the output terminal OUT1-, that is, the output terminals OUT1+ and OUT1- are connected through the conduction of the output end of K1, OUT1+ is connected to the pins 8 of K2 and K3 through K1 pin 6, and OUT1- is connected to the pins 6 of K2 and the pin 5 of K3 through K1 pin 7. The working mode of the photorelays K2 and K3 is the same as that of K1. The photorelay K2 sets the output mode of the detection device to the active output mode through the control circuit signal Mode1#. The photorelay K3 sets the output mode of the detection device to the contact switch mode through the control circuit signal Mode1. Because Mode1 and Mode1# are mutually exclusive, only one of the devices K2 and K3 can work. Avoid short circuit of 24V / 28V power supply when K2 and K3 work at the same time, which may damage components in the detection device or 24V / 28V power supply.

[0048] Detection Figure 5 When the first switch input form of the device under test is shown, use Figure 8The detection device is used for detection. Connect the KIN1 port of the device under test to the output terminal OUT1- of the detection device, and connect the detection device PWR and AGND to the 24V / 28V power supply of the switch signal. Set the output mode of the detection device to the active output mode. When the detection device S1 is at a high level, the detection device is in an open circuit state and no signal is output. When S1 is at a low level, the output signal OUT- of the detection device is connected to AGND, and the switch input of the device under test is valid. The KIN2 port of the device under test is another switch input channel. You can wait until the KIN1 port is tested and then connect the KIN2 port to the output terminal OUT1- of the detection device for detection, or use the detection device to detect other output ports at the same time with the same principle.

[0049] Detection Figure 6 When the second switch input form of the device under test is shown, use Figure 8 The detection device is used for detection. Connect the KIN1 port of the device under test to the output terminal OUT1+ of the detection device, and connect the detection device PWR and AGND to the 24V / 28V power supply of the switch signal. Set the output mode of the detection device to the active output mode. When the detection device S1 is at a high level, the detection device is in an open circuit state and no signal is output. When S1 is at a low level, the detection device output signal OUT1+ is connected to PWR, and the switch input of the device under test is valid. The KIN2 port of the device under test is another switch input channel. You can wait until the KIN1 port is tested and then connect the KIN2 port to the output terminal OUT1+ of the detection device for detection, or use the detection device to detect other output ports at the same time with the same principle.

[0050] Detection Figure 7 When the third switch input form of the device under test is shown, use Figure 8 The detection device is used for detection. Connect the KIN1+ and KIN1- ports of the device under test to the output terminals OUT1+ and OUT1- of the detection device, and set the output mode of the detection device to the contact switch mode. When the detection device S1 is at a high level, the detection device is in an open circuit state and no signal is output. When S1 is at a low level, the detection device output signals OUT1+ and OUT1- are turned on, and the switch input of the device under test is valid. The KIN2+ and KIN2- ports of the device under test are another switch input channel. You can wait until the KIN1+ and KIN2- ports are tested and then connect the KIN2+ and KIN2- ports to the output terminals OUT1+ and OUT1- of the detection device for detection, or use the detection device to detect other output ports at the same time with the same principle.

[0051] The present invention has the following advantages:

[0052] The switch quantity detection device can be program-controlled and acquired and controlled through software;

[0053] The number of switch input and output channels can be set to the maximum according to the number of channels of the device under test or through multiple superpositions to meet the test of the switch channels of the device under test;

[0054] The switch input and switch output in the switch detection device are both standardized in form, so as to achieve the purpose of simplifying the management of test tools and standardizing the form.

[0055] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A multi-purpose switch quantity detection device, characterized in that: The detection device is used to detect the switch input of the device under test, including photorelays K1, K2 and K3, pins 1 and 2 of the photorelays K1, K2 and K3 are the first input ends of the photorelays, pins 7 and 8 are the first output ends of the photorelays, pins 3 and 4 are the second input ends of the photorelays, and pins 5 and 6 are the second output ends of the photorelays; pin 1 of the photorelays K1, K2 and K3 is connected to the positive pole of a 3.3V power supply of a control circuit through current limiting resistors R1, R2 and R3 respectively, pins 2 and pin 3 of the photorelays K1, K2 and K3 are all connected, pin 7 of the photorelay K1 is connected to pin 6 of the photorelay K2 and pin 5 of the photorelay K3, pin 6 of the photorelay K1 is connected to pin 8 of the photorelay K2 and pin 8 of the photorelay K3, and pin 1 of the photorelay K3 is connected to pin 2 of the photorelay K2 and pin 3 of the photorelay K3. Pins 6 and 7 are connected, pin 4 of photorelay K1 serves as control circuit signal S1, pin 4 of photorelay K2 and photorelay K3 serve as output mode control terminals Mode1# and Mode1 respectively, pin 8 of photorelay K1 serves as output terminal OUT1-, pin 5 serves as output terminal OUT1+, pin 7 of photorelay K2 is connected to PWR, and pin 5 is connected to AGND; for photorelay K1, photorelay K1 controls the signal output of the detection device through control circuit signal S1, photorelay K2 sets the output mode of the detection device to active output mode through control circuit signal Mode1#, photorelay K3 sets the output mode of the detection device to contact switch mode through control circuit signal Mode1, and Mode1 and Mode1# are mutually exclusive.

2. The multi-purpose switch quantity detection device according to claim 1, characterized in that: Photorelays K1, K2 and K3 are all AQW212EHA.

3. The multi-purpose switch quantity detection device according to claim 1 or 2, characterized in that: When the switch input of the device under test is in the first form, the device under test includes an optocoupler D1, which is a dual-channel input. Pins 1 and 2 of D1 are the first channel inputs, and pins 3 and 4 are the second channel inputs; pins 1 and 3 of D1 are the positive input terminals, which are connected to the positive pole of the 24V / 28V power supply through current limiting resistors R1 and R2, and pins 2 and 4 of D1 are the negative input terminals. KIN1 and KIN2 are led out through terminals. KIN1 and KIN2 are 2-way switch input signal input terminals. When the signal input terminals KIN1 and KIN2 are connected to the negative pole of the 24V / 28V power supply, the switch input Valid, corresponding D1 pin 7 and pin 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded; when using the detection device for detection, connect the KIN1 port of the device under test to the output terminal OUT1- of the detection device, connect the detection device PWR and AGND to the 24V / 28V power supply of the switch signal, and set the output mode of the detection device to the active output mode to detect the KIN1 port of the device under test; after waiting for the test of the KIN1 port, connect the KIN2 port to the output terminal OUT1- of the detection device for detection.

4. The multi-purpose switch quantity detection device according to claim 1 or 2, characterized in that: When the switch input of the device under test is in the second form, the device under test includes an optocoupler D1, which is a dual-channel input. Pins 1 and 2 of D1 are the first channel inputs, and pins 3 and 4 are the second channel inputs; Pins 1 and 3 of D1 are the positive input terminals, which are connected to the external lead-out terminals KIN1 and KIN2 through current limiting resistors R1 and R2; Pins 2 and 4 of D1 are the negative input terminals, which are connected to the negative electrode of the 24V / 28V power supply; KIN1 and KIN2 are the 2-way switch input signal input terminals. When the signal input terminals KIN1 and KIN2 are connected to the positive electrode of the 24V / 28V power supply, the switch output The input is valid; the corresponding D1 pin 7 and pin 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded; when using the detection device for detection, the KIN1 port of the device under test is connected to the output terminal OUT1+ of the detection device, the detection device PWR and AGND are connected to the 24V / 28V power supply of the switch signal, and the output mode of the detection device is set to the active output mode to detect the KIN1 port of the device under test; after waiting for the test of the KIN1 port, the KIN2 port is connected to the output terminal OUT1+ of the detection device for detection.

5. The multi-purpose switch quantity detection device according to claim 1 or 2, characterized in that: When the switch input of the device under test is in the third form, the device under test includes an optocoupler D1, which is a dual-channel input. Pins 1 and 2 of D1 are the first channel inputs, and pins 3 and 4 are the second channel inputs. Pins 1 and 3 of D1 are the positive input terminals, which are connected to the positive pole of the 24V / 28V power supply through current limiting resistors R1 and R2. Pins 2 and 4 of D1 are the negative input terminals, and KIN1+ and KIN2+ are led out through terminals, and KIN1- and KIN2- terminals are connected to the negative pole of the 24V / 28V power supply. The switch input signal is a pair of contact pairs, KIN1+ and KIN1- are the first channel signal input terminals, KIN2+ and KIN2- are the second channel signal input terminals, and the KIN1+ port of the signal input terminal is connected to the positive pole of the 24V / 28V power supply through the current limiting resistors R1 and R2. Short-circuited with the KIN1- port, the switch input is valid. Similarly, short-circuited with the KIN2+ and KIN2- ports, the switch input is valid; the corresponding D1 pins 7 and 6 output corresponding signals KINS1 and KINS2 for use by the device; pin 8 is connected to VCC, and pin 5 is grounded; when using the detection device for detection, connect the KIN1+ and KIN1- ports of the device under test to the output terminals OUT1+ and OUT1- of the detection device, and set the output mode of the detection device to the contact switch mode to detect the KIN1+ and KIN1- ports; after waiting for the test of the KIN1+ and KIN2- ports, connect the KIN2+ and KIN2- ports to the output terminals OUT1+ and OUT1- of the detection device for detection.