Devices for connecting the inputs and / or outputs of a programmable logic controller to field devices
The self-learning circuit automatically detects the PLC card type and determines the appropriate connection, which solves the difficult connection problem between field equipment and PLC and ensures the normal operation and safety of the equipment.
Patent Information
- Application Number
- CN202110076055.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-20
- Filing Date
- 2021-01-20
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-01-20
AI Technical Summary
Existing technology makes it difficult to ensure proper connection between field devices and PLCs, resulting in equipment failure to operate properly and possible damage.
A self-learning circuit is provided that is able to automatically detect the type of PLC card and determine the appropriate connections between sensors and input cards and actuators and output cards of the PLC by identifying breaks, shorts, or expected impedance of signals. The circuit includes a processor, buffer, and switch that determines the type of pin through program control.
It realizes automatic identification and ensures the proper connection between PLC input card and output card and field equipment, avoiding equipment damage and operation failure caused by incorrect connection.
Smart Images

Figure CN113138583B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to industrial control of field devices. More specifically, the present invention relates to a novel apparatus that is self-learning and capable of identifying input and output cards used by a programmable logic controller (PLC), and capable of adapting the signal path between the field device and the PLC based on the type of input and output cards used by the PLC, thereby ensuring that the PLC and the field device are properly connected. Background Art
[0002] Various field devices are often used in different industrial applications. An example of a field device is a valve mechanically coupled to a solenoid for changing the position of the valve (i.e., moving the valve to its fully open position, fully closed position, or a desired intermediate position between the fully open position and the fully closed position of the valve). Such a field device may also include one or more sensors. Such sensors may, for example, be used to determine whether the valve is fully open or fully closed or to determine the opening angle of the valve. Such sensors may also be used to determine the flow through the valve.
[0003] Control of the operation of field devices such as the valves described above is typically provided by a PLC. When the PLC is appropriately connected to the field device, the PLC receives signals from sensors of the field device. In response to the sensor signals, the PLC's internal programming, and often inputs received from other sources, the PLC issues control signals to the solenoid to change the position of the valve.
[0004] It is true that if the PLC is to receive signals from sensors of field devices and transmit control signals to field devices, proper connection between field devices and PLC is necessary. Improper connection not only makes the field devices inoperable, but also can damage the PLC or field devices.
[0005] There are three types of input and output cards used by general PLCs. These three types include NPN, PNP, and push-pull configurable cards. Each actuator (such as a solenoid) and sensor used by a field device generally includes at least three pins connected to the PLC. These pins include a positive supply (V+), a negative return (V-), and a signal. These pins can also appear in three forms, namely NPN, PNP, and push-pull configurable pins. In order for the type of sensor to match the type of card, the field device must be properly connected to the PLC. Similarly, the actuator should match the type of PLC card it is connected to.
[0006] For example, an NPN sensor uses an NPN or N-channel transistor to "sink" current into a signal pin when in operation. NPN sensors are suitable for wiring with a PLC's sourcing input card that has an internal resistor that is pulled up (typically to 24V). When the sensor sends a "non-operational" signal, the PLC card's pull-up resistor pulls the signal up, which is interpreted as a binary "0" by the PLC's processor.
[0007] PNP sensors operate in a different manner. PNP sensors operate using a PNP or P-channel transistor to "source" current to the signal pin. PNP sensors are used with "sinking" input PLC cards that have internal resistors that pull down to 0V. When the sensor signals a "non-operational" signal, the PLC card's pull-down resistor pulls the signal down, which is interpreted as a binary "0" by the PLC's processor.
[0008] Push-Pull / configurable (PPC) sensors have both NPN and PNP transistors, both of which can be used with both source and sink PLC input cards. However, there is inconsistency as to whether the operating state should be "active high" or "active low". The logic of the processor can be adjusted to select "active high" or "active low" as the operating state.
[0009] In addition to the three pin sensors described above involving a single signal pin, several devices include multiple signal pins, so that more than three wires are used to connect the sensor to the PLC. There are also several manufacturers that offer two-wire (two-pin) sensors. These sensors can be wired to either NPN or PNP PLC cards, but are not compatible with all PLC cards.
[0010] In addition to the various three-wire inputs to the PLC cards described above, the outputs from the PLC to the field devices vary. For example, a solenoid can be connected to the PLC using two pins. One pin is always wired to either V+ or V-, and the other pin is wired to the PLC's output card. To make the proper connection, the user needs to know whether the PLC supplies V+ or V- on its signal (output) line. The user will then know whether to wire the other pin of the field device to V+ or V-. A similar problem exists with a two-pin solenoid.
[0011] As should be clear from the foregoing, given the diversity of PLCs, sensor types, and actuator types used in field devices, it is often difficult to properly connect a field device to a PLC.
[0012] There is a real need for a device that is self-learning and can determine and establish appropriate connections between input and output cards of a PLC and field devices. Summary of the invention
[0013] The above problems are solved by providing a circuit suitable for testing, sensing and ultimately determining the type of PLC card connected to each input and output of a field device. The circuit is located between the PLC and the field device (or located within the PLC or field device). The circuit automatically detects the type of PLC card. The device determines whether the signal is open, shorted, or has the expected (correct) impedance.
[0014] In its simplest form, the device of the present invention includes one of two discrete circuit configurations. The first circuit (referred to herein as "DI") is a self-learning input suitable for identifying the proper connection of the sensor output of the field device to the input card of the PLC. The second circuit (referred to herein as "DO") is a self-learning output suitable for identifying the proper connection of the sensor output of the field device to the output card of the PLC. The DI configuration includes a processor, which can be an independent processor or can be the same as the processor used by the PLC or the field device. The DI configuration also includes a buffer, a pull-up resistor, a pull-down resistor, a pull-up switch, a pull-down switch, an upper drive switch, and a lower drive switch. Each of these switches can be a MOSFET switch suitable for being controlled by a processor. The program-controlled processor operates these switches to determine the proper connection of the sensor of the field device to the input card of the PLC. When the field device includes multiple sensors, a repeated DI configuration can be provided, that is, a DI configuration is set for each sensor.
[0015] The DO configuration also includes a processor, which may also be an independent processor or may be the same processor as that used by the PLC, field device or DI configuration. The DO configuration also includes a second buffer, a second pull-up resistor, a second pull-down resistor, a second pull-up switch, a second pull-down switch and a pull-up / pull-down resistor. The program-controlled processor operates these switches (which may also be MOSFET switches) to determine the proper connection of the actuator of the field device to the output card of the PLC. When the field device includes multiple actuators, a repeated DO configuration can be provided to set an independent DO configuration for each actuator. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] From the following detailed description of the preferred embodiments, especially when combined with the attached Figure 1 The features, objects and advantages of the present invention will become more apparent to those skilled in the art when considering the accompanying drawings, in which like reference numerals represent corresponding parts throughout the several views:
[0017] Figure 1 is a schematic diagram of an embodiment of a direct input (DI) circuit of the present invention;
[0018] Figure 2 and Figure 3A flow chart is shown together, which shows Figure 1 The steps taken to determine the appropriate connection between the PLC input card and the sensor output;
[0019] Figure 4 is a schematic diagram of an embodiment of a direct output (DO) circuit of the present invention;
[0020] Figures 5 to 8 A flow chart is shown together, which shows Figure 4 The steps taken to determine the appropriate connection between the output card of the PLC and the input of the actuator;
[0021] Fig. 9 It is connected between the PLC input card and the field equipment. Figure 1 Schematic diagram of DI;
[0022] Fig.10 It is connected between the PLC output card and the field equipment Figure 4 Schematic diagram of DO;
[0023] Fig.11 It shows three Figure 4 A schematic diagram of a DO circuit of the type shown being integrated into a PLC input card, wherein the PLC input card is coupled to three different field device sensors, which may be part of a single field device or may be three different field devices;
[0024] Fig.12 It shows three Figure 1 A schematic diagram of a DI circuit of the type shown being integrated into a PLC input card, wherein the PLC output card is coupled to three different actuators, which may be part of a single field device or may be three different field devices;
[0025] Fig.13 A schematic diagram of a field device. Two Figure 1 The type of DI circuit shown and the two Figure 4 DO circuits of the type shown are integrated into field devices, with the DI circuits being used to couple various sensors of the field device to a PLC input card, and the DO circuits being used to couple various actuators to a PLC output card. DETAILED DESCRIPTION
[0026] The description of the specific embodiments should be understood in conjunction with the accompanying drawings, which should be considered part of the overall written description of the invention. In the specification, relative terms, such as "below", "above", "horizontal", "vertical", "above", "below", "up", "down", "top" and "bottom" and their derivatives (for example, "horizontally", "downward", "upward", etc.), should be understood as referring to the orientation described later or as shown in the drawings in the description. These relative terms are used for convenience of description and do not require that the device be constructed or operated in a particular direction. Unless otherwise expressly stated, terms such as "connected to", "connected", "attached to", "attached", "coupled to" and "coupled" are used interchangeably and refer to one structure or surface being fixed to another structure or surface, or being made as a whole.
[0027] In its simplest form, the apparatus of the present invention comprises one of two discrete circuit configurations, such as Figure 1 Discrete Input (DI) circuit 1 shown or Figure 4 The discrete output circuit (Discrete Output, DO) 2 shown. Other forms of the device include both the DI circuit 1 and the DO circuit 2. Other forms of the device also include multiple DI circuits 1, or multiple DO circuits, or even multiple DI circuits 1 and multiple DO circuits 2. See Figures 11 to 13 .
[0028] like Fig. 9 As shown in Figure 1, DI 1 is connected between the input card of the PLC and the field device (especially the sensor of the field device). Fig.10 As shown, DO 2 is connected between the output card of the PLC and the field device (e.g., the actuator of the field device, such as a solenoid). Fig. 9 and Fig.10 DI 1 and DO 2 are shown as independent components, both of which can be integrated into the PLC or the field device.
[0029] Figure 1 The illustrated DI 1 includes a first controller 10, a first buffer 12, a pull-up resistor 14, and a pull-down resistor 16. The first controller 10 is adapted to actuate four MOSFET switches, namely a first pull-up switch 18, a first pull-down switch 20, an upper drive switch 22, and a lower drive switch 24. The DI 1 also includes three ports: a first positive supply (V+) 25, a first voltage return (V-) 26, and a first signal 27.
[0030] Figure 4DO2 is shown to include a second controller 30, a second buffer 32, and a pull-up / pull-down resistor 34. The controller 30 is adapted to actuate two MOSFET switches, namely a second pull-up switch 36 and a second pull-down switch 38. DO2 also includes three ports, namely a second positive supply (V+) 40, a second voltage return (V-) 43, and a second signal 44.
[0031] even though Figure 1 and Figure 4 While two separate controllers 10 and 30 are shown, other embodiments of the present invention may include a single controller that combines the functionality of controllers 10 and 30. In other embodiments, the functions performed by controllers 10 and 30 may be performed by a controller of a PLC or a controller of a field device.
[0032] In other embodiments shown in the drawings, the controller 10 causes the device to execute a series of steps to determine the type of input card of the PLC connected to the sensor. These steps are Figure 2 and Figure 3 Shown in.
[0033] In step 50, controller 10 closes switch 22 and switch 24. Switches 22 and 24 are maintained in their closed (non-conductive) state until the type of PLC card wired to signal port 27 is determined. Current is caused to flow through resistor 14 by closing switch 18 and opening switch 20, thereby placing a signal at controller 10 via buffer 12.
[0034] After a predetermined time has passed, the controller 10 executes step 51. More specifically, the buffer 12 senses the voltage and converts the voltage into a logic 1 or 0 that is transmitted to the controller 10. The controller 10 determines whether the logic of the input level is the same as the logic established by the activated pull-up resistor (i.e., resistor 14 or resistor 16) and the buffer 12. If the logics of the two are the same, the controller 10 executes step 52. If the logics of the two are not the same, the controller 10 executes step 53.
[0035] In step 52, switches 18 and 20 are actuated to effectively change the pull-up resistor 14 or 16 in use, so that the pull-up becomes a pull-down or the pull-down becomes a pull-up. After a predetermined time interval, step 51 is repeated. If the logic of the input level of signal port 27 is now different from the logic of the activated pull-up resistor (i.e., resistor 14 or resistor 16), the controller 10 performs step 53 to identify whether resistor 14 or resistor 16 is then activated. If resistor 14 is activated, the controller 10 knows that signal port 27 is attached to a sink / PNP input card of the PLC, and the controller 10 performs step 54. If resistor 16 is activated, the controller 10 knows that signal port 27 is attached to a source / NPN input card of the PLC, and the controller 10 performs step 55.
[0036] Steps 54 and 55 both include opening MOSFET switches 18 and 20 to block current flow through both resistors 14 and 16. Step 54 includes the additional step of using "active high" logic on the sink / PNP input card attached to the sensor's PLC to operate switches 22 and 24. (The PNP input card has a sink resistor tied to ground.) Step 55 includes the additional step of allowing the use of "active low" logic on the source / NPN input card attached to the sensor's PLC instead. (The NPN input card has a source resistor tied high.)
[0037] After executing step 54 or 55, the controller 10 continues to perform normal sensor operation in step 56. The controller 10 also performs a test in step 57 to determine whether the output of the sensor is short-circuited. When the user connects to the device, the user may first temporarily (due to the user's mistake) connect the signal line of the device to the V+ or V- of the power supply, which will cause the self-learning algorithm to produce an erroneous determination result. By restarting the test, it is ensured that the self-learning algorithm will determine the correct card type even if the user accidentally shorts the signal line. As long as no short circuit is detected, the controller 10 continues to perform normal sensor operation. If any short circuit is detected by the controller 10, the controller 10 returns to step 50 and repeats the process including the above steps 50 to 56.
[0038] In addition, the controller 30 executes Figures 5 to 8 Specifically, at step 60, resistor 34 is turned on via disconnect switch 38. In this case, signal 44 is a current sink and therefore a PNP output card of the PLC is sought. Controller 30 waits for a predetermined time interval to expire before proceeding to step 62.
[0039] At step 62, controller 30 determines whether the logic of the input level is the same as the logic of resistor 34. If the logic of the two is the same, step 63 is executed so that switches 36 and 38 are actuated to effectively change the direction of resistor 34 so that the pull-up becomes a pull-down or the pull-down becomes a pull-up. After the predetermined time interval has expired, step 62 is executed again.
[0040] When the controller 30 determines in step 62 that the logic of the input level is not the same as the logic of the resistor 34, the controller performs a test in step 64. In step 64, the controller determines whether the resistor 34 is then driven by the switch 36 or the switch 38. Then, if the switch 38 is driving the resistor 34, the controller 30 performs a step 65; and if the switch 36 is driving the resistor 34, the controller 30 performs a step 66. More specifically, if the switch 38 is driving the resistor 34, the output card of the PLC is determined to be a source / PNP output card or a push-pull output card. If the switch 36 is driving the resistor 34, the output card of the PLC is a sink / NPN output card or a push-pull output card.
[0041] When step 65 is executed, switch 38 remains closed and switch 36 remains open. Alternatively, when step 66 is executed, switch 36 remains closed and switch 38 remains open. In either case, sufficient current is drawn to the circuit to be compatible with the diagnostic output card (which leaks current when turned off, looking for an open circuit), and the controller proceeds to step 67.
[0042] Normal sensor operation is performed at step 67, and the controller periodically executes step 68 to identify whether the input logic state has changed, which indicates that now is the right time to test the push-pull output card. As long as no change in the state of the input logic is detected, the controller continues to execute steps 67 and 68.
[0043] Once a change in the input logic state is detected, the controller executes step 69. Here, the controller checks whether the last executed step was step 65 or step 66. If the last executed step was step 65, the controller 30 then executes step 70. If the last executed step was step 66, the controller 30 then executes step 71. Steps 70 and 71 allow the controller to determine whether the output card of the PLC is a push-pull output card. When step 70 is executed, switch 38 is closed and switch 36 is open. Alternatively, when step 71 is executed, switch 38 is open and switch 36 is closed.
[0044] After executing step 70 or 71, the controller 30 waits for the predetermined time interval to expire, then executes step 72 and checks again whether the input logic is the same as the logic of the resistor 34. If the two logics are the same, the controller 30 determines the input card of the PLC in step 73 to determine that it is not a push-pull card. Therefore, as determined in steps 65 and 66, the output card of the PLC is a source / PNP output card or a sink / NPN output card. The controller 30 then executes step 75.
[0045] Alternatively, if the controller 30 determines at step 72 that the input logic is not the same as the logic of the resistor 34 , the controller 30 identifies that the output card of the PLC is a push-pull card at step 74 . Next, the controller executes step 76 .
[0046] At step 75, if the controller 30 has previously determined that the output card of the PLC is a source / PNP card, the controller 30 proceeds to step 77, and if the controller 30 has previously determined that the output card of the PLC is a sink / NPN card, the controller 30 proceeds to step 78. If the output card of the PLC is a source / PNP card, switch 36 is opened and switch 38 is closed at step 77. If a sink / NPN card is detected, switch 36 is closed and switch 38 is opened at step 78. If the output card of the PLC is a push-pull output card, at step 76, the push-pull output card is assumed to be an active high logic, and the controller 30 closes switch 38 and opens switch 36. This assumption is made based on the way most push-pull output cards are manufactured. If this assumption is proven to be wrong, the internal programming of the PLC and / or the output card can be reprogrammed to make this assumption correct. After performing the appropriate steps of steps 76, 77 and 78, the controller 30 performs normal control operations at step 80.
[0047] Those skilled in the art will understand from the above description that Figure 1 and Figure 4 Circuit and implementation Figure 2 , Figure 3 and Figures 5 to 8 The program of operations reflected in the flowchart of is combined to achieve two important effects. First, the input card type and output card type of the PLC to which the field device is attached are identified. Second, appropriate connections are established between those input cards and output cards and the field device.
[0048] Those skilled in the art will also appreciate that modifications may be made without departing from the present invention. For example, the DI circuit and DO circuit described above may be integrated into the circuitry of a PLC card. More specifically, one or more DI circuits 1 may be integrated into a PLC output card. This is because the "DI" circuit transmits data to the input of another device such as a field device. The PLC output card sends data to the input of a field device to control the actuator of the field device. In other cases, the PLC output card only provides power to the field device. Fig.12 In the example shown, three DI circuits are integrated into a PLC output card. These DI circuits are respectively coupled to three different actuators. These actuators can be part of the same field device or three different field devices.
[0049] Likewise, the DO circuit can be integrated into a PLC input card. This is because the DO circuit receives data from the output of another device, which allows the PLC input card to receive data from the output of a field device. Fig.11 An example is shown where three DO circuits 2 are integrated into a PLC input card. Each DO circuit 2 is connected to an individual sensor of a field device. These sensors can be part of the same field device or three different field devices.
[0050] Fig.13 Two DI circuits 1 and two DO circuits 2 integrated into a field device are shown, the field device having two actuators and two sensors. The DI circuit 1 is used to couple the sensors of the field device to the PLC input card of the PLC. The DO circuit 2 is used to connect the two actuators of the field device to the PLC output card of the PLC.
[0051] The present invention has been described herein in considerable detail in order to comply with the patent statutes and to provide those skilled in the art with the information necessary to apply the novel principles and to construct and use the desired embodiments. However, it should be understood that the present invention can be implemented by particularly different devices and that various modifications can be made without departing from the scope of the invention itself.
Claims
1. A device for determining the type of card used by a programmable logic controller (PLC) to connect a field device to the programmable logic controller, comprising: a first controller, at least one positive voltage supply, at least one negative voltage return, and a discrete input circuit DI, the discrete input circuit comprising a first buffer, a pull-up resistor, a pull-down resistor, a first pull-up switch, a first pull-down switch, a serially connected upper drive switch, and a lower drive switch connected between the positive voltage supply and the negative voltage return, a first signal port connected to a first branch point between the pull-up resistor and the pull-down resistor, a second branch point between the upper drive switch and the lower drive switch, and an input terminal of the first buffer, and wherein the controller is connected in a controlling relationship to each of the first pull-up switch, the first pull-down switch, the upper drive switch, and the lower drive switch.
2. The device according to claim 1, characterized in that When the discrete input circuit is connected to a programmable logic controller input card, the first controller is suitable for controlling the first pull-up switch, the first pull-down switch, the upper drive switch and the lower drive switch of the discrete input circuit for testing, so that the first controller can determine the type of the programmable logic controller input card connected to the discrete input circuit.
3. The device according to claim 1, characterized in that The device further includes a discrete output circuit DO, which includes a second buffer, the pull-up resistor / the pull-down resistor, a second pull-up switch, a second pull-down switch, and a second signal port.
4. The device according to claim 3, characterized in that When the discrete output circuit is connected to a programmable logic controller output card, the first controller is also suitable for controlling the second pull-up switch and the second pull-down switch of the discrete output circuit for testing, so that the first controller can determine the type of the programmable logic controller output card connected to the discrete output circuit. The device according to claim 3 , further comprising a second controller.
6. The device according to claim 5, characterized in that When the discrete output circuit is connected to a programmable logic controller output card, the second controller is suitable for controlling the second pull-up switch and the second pull-down switch of the discrete output circuit for testing, so that the second controller can determine the type of the programmable logic controller output card connected to the discrete output circuit.
7. The device according to claim 1, characterized in that The first controller also controls the field device.
8. The device according to claim 1, characterized in that The first controller also controls the programmable logic controller.
9. The device according to claim 1, characterized in that The device is integrated into a programmable logic controller output card.
10. The device according to claim 1, characterized in that The device is attached to a programmable logic controller input card.
11. The device according to claim 1, characterized in that The apparatus includes a plurality of said discrete input circuits, each of said discrete input circuits being adapted to be coupled to a separate programmable logic controller input card and identifying the type of said programmable logic controller input card coupled thereto.
12. An apparatus for determining the type of card used by a programmable logic controller (PLC) to connect a field device to the programmable logic controller, comprising: a first controller, at least one positive voltage supply, at least one negative voltage return, and a discrete output circuit DO, the discrete output circuit comprising a first buffer, a pull-up / pull-down resistor, a pull-up switch, a pull-down switch, and a signal port, the signal port being coupled to a branch point between the pull-up switch and the pull-down switch connected in series via the pull-up / pull-down resistor, the pull-up switch and the pull-down switch being connectable between the positive voltage supply and the negative voltage return, The input end of the first buffer is bound to the signal port, and the first controller provides control input for the pull-up switch and the pull-down switch.
13. The device according to claim 12, characterized in that When the discrete output circuit is connected to a programmable logic controller output card, the first controller is adapted to control the pull-up switch and the pull-down switch of the discrete output circuit for testing, so that the first controller can determine the type of the programmable logic controller output card connected to the discrete output circuit.
14. The device according to claim 12, characterized in that The device is integrated into a programmable logic controller input card.
15. The device according to claim 12, characterized in that The device is connected to a programmable logic controller output card.
16. The device according to claim 12, characterized in that The first controller also controls the field device.
17. The device according to claim 12, characterized in that The first controller also controls the programmable logic controller.
18. The device according to claim 12, characterized in that The apparatus includes a plurality of the discrete output circuits, each of the discrete output circuits being adapted to be coupled to a separate programmable logic controller output card and identifying the type of the programmable logic controller output card coupled thereto.
19. An apparatus for determining the type of card used by a programmable logic controller (PLC) to properly connect a field device to the programmable logic controller, comprising: controller, connections for a positive voltage supply, a negative voltage return, a discrete input circuit DI for determining the type of input card used with the programmable logic controller, and a discrete output circuit DO for determining the type of output card used with the programmable logic controller, The discrete input circuit includes a first buffer, a pull-up resistor, a pull-down resistor, a first pull-up switch, a first pull-down switch, an upper drive switch and a lower drive switch connected in series, which are connected between the positive voltage supply and the negative voltage return, and a first signal port connected to a first branch point between the pull-up resistor and the pull-down resistor, a second branch point between the upper drive switch and the lower drive switch, and an input terminal connected to the first buffer, wherein the controller is connected in a controlling relationship to each of the first pull-up switch, the first pull-down switch, the upper drive switch, and the lower drive switch, The discrete output circuit includes a second buffer, a pull-up / pull-down resistor, a second pull-up switch, a second pull-down switch, and a second signal port, wherein the second signal port is coupled to a branch point between the second pull-up switch and the second pull-down switch connected in series via the pull-up / pull-down resistor, the pull-up switch and the pull-down switch are connected between the positive voltage supply and the negative voltage return, wherein the input end of the second buffer is bound to the second signal port, and the controller provides control inputs for the second pull-up switch and the second pull-down switch.
20. A method for determining a type of input card used by a programmable logic controller (PLC) to connect a field device to the programmable logic controller, the method comprising: a. Provide a device according to any one of claims 1-11, b. connecting the discrete input circuit to a programmable logic controller input card, c. Determine the type of the PLC input card to which the discrete input circuit is connected.
21. The method according to claim 20, characterized in that The step of determining the type of the programmable logic controller input card connected to the discrete input circuit comprises the following sub-steps: a. Turn off the upper drive switch and the lower drive switch until the type of the programmable logic controller input card is determined, b. closing the first pull-up switch and opening the first pull-down switch so that current flows through the pull-up resistor, thereby providing a signal to the controller via the first buffer, c. determining whether the logic of the input level is the same as the logic established by the pull-up resistor and the first buffer, d. opening the first pull-up switch and closing the first pull-down switch to allow current to flow through the pull-down resistor, e. determining whether the logic of the input level is the same as the logic established by the pull-down resistor and the first buffer, f. Identifying the type of the programmable logic controller input card connected to the discrete input circuit based on the determination results of sub-steps c. and e.
22. The method of claim 21 further comprising the step of performing normal sensor operation until the output is shorted, followed by repeating sub-steps a. to f.
23. The method of claim 20 including the additional step of connecting the field device to the apparatus and performing normal sensing and control operations.
24. A method for determining a type of output card used by a programmable logic controller (PLC) to connect a field device to the programmable logic controller, the method comprising: a. Provide a device according to any one of claims 12-18, b. connecting the discrete output circuit to a programmable logic controller output card, and c. Determine the type of the PLC output card to which the discrete output circuit is connected.
25. The method according to claim 24, characterized in that The step of determining the type of the programmable logic controller output card connected to the discrete output circuit comprises the following sub-steps: a. Closing the pull-up switch to turn on the pull-up / pull-down resistor, b. Determine whether the logic of the input level is the same as the logic of the pull-up / pull-down resistor, c. actuating the pull-up switch and the pull-down switch to effectively change the direction of the pull-up / pull-down resistor, d. Determine again whether the logic of the input level is the same as the logic of the pull-up / pull-down resistor, e. Preliminarily identifying the type of the programmable logic controller output card connected to the discrete output circuit based on the determination results of the additional sub-steps b. and d., namely (i) NPN or push-pull configurable output card, or (ii) PNP or push-pull configurable output card.
26. The method of claim 25, further comprising the step of performing normal control operation until a change in logic state of the PLC output card connected to the discrete output circuit is detected.
27. The method according to claim 25, characterized in that After detecting a change in the logic state of the programmable logic controller output card, the states of the pull-up switch and the pull-down switch are adjusted to determine a combination of the states of the pull-up switch and the pull-down switch, wherein the combination causes the logic state of the programmable logic controller output card to be the same as its logic state at the pull-up / pull-down resistor, thereby making a final determination of the type of the programmable logic controller output card connected to the discrete output circuit.
28. The method according to claim 27, characterized in that If a push-pull PLC output card is detected, a test will be performed to determine if the push-pull PLC output card has a valid high logic.
29. The method of claim 28, further comprising the step of programming any push-pull PLC output card detected to have an active high logic.
