Method for interfacing an execution device with a programmable logic controller, control system and storage medium
By setting signal input identifiers on PLC pins and associating them with the pin addresses of the actuators, the problem of cumbersome wiring between the PLC and the actuators is solved, and connection efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, when wiring PLCs and actuators, it is necessary to strictly follow the pin correspondence. If the wiring is incorrect, the wiring needs to be checked and changed again, which is tedious and time-consuming.
A signal input identifier is set on each pin of the PLC. When a signal input is identified, an actuator is connected, and the actuator performs an action to generate an input signal. The pin address is determined and associated based on the identifier.
This makes the interface connection between the actuator and the PLC more convenient and faster, reducing wiring errors and troubleshooting time.
Smart Images

Figure CN119247869B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of programmable logic controller control, and more particularly to a method for interface connection of an execution device and a programmable logic controller, a control system and a storage medium. BACKGROUND
[0002] A programmable logic controller (PLC) is a digital logic controller for real-time control of automation, which is widely used in the current industrial control field. When the programmable logic controller exchanges information with an execution device, 0 or 1 of a signal point is often used to represent a specific physical meaning. For example, when the signal of a certain signal point is 1, it represents the closed state of the execution device, i.e. signal input. When the signal of the signal point is 0, it represents that the execution device is not in the closed state, i.e. no signal input. One pin on the programmable logic controller generally corresponds to one signal point. The programmable logic controller generally has multiple pins connected to the execution device to receive the feedback signal of the execution device.
[0003] At present, when the programmable logic controller is connected to one or more execution devices, each pin is generally defined to correspond to the input signal of the execution device. Therefore, when the programmable logic controller is connected to the execution device, the execution device needs to be strictly connected according to each pin corresponding to it. If the connection is wrong, the line needs to be rechecked and changed, which is tedious and time-consuming. SUMMARY
[0004] The application provides a method for interface connection of an execution device and a programmable logic controller, which can facilitate the interface connection of the execution device and the programmable logic controller.
[0005] The technical solution adopted by the application is a method for interface connection of an execution device and a programmable logic controller, which comprises the following method:
[0006] A signal input identifier is set for each pin of the programmable logic controller. When the pin receives a signal, the signal input identifier can be identified.
[0007] The execution device is connected to the pin.
[0008] The execution device performs an action, and the corresponding pin generates an input signal.
[0009] The pin address corresponding to the input signal generated by the execution action is determined according to the identified signal input identifier, and the pin address is associated with the execution action corresponding to the execution device.
[0010] That is, the method for connecting the execution device and the interface of the programmable logic controller, first, the signal input identifier is set for each pin of the programmable logic controller, when the pin receives the signal input, the signal input identifier can be identified, then the execution device is connected with the pin of the programmable logic controller, then the execution device is controlled to execute the action, so that the corresponding pin generates the input signal, the pin address corresponding to the input signal generated by the execution device when executing the action is determined according to the identified signal input identifier, finally, the pin address is associated with the execution action corresponding to the execution device, when all the execution actions of the execution device are associated with the corresponding pin address in the above manner, the connection between the execution device and the interface of the programmable logic controller is completed, which makes the connection between the execution device and the interface of the programmable logic controller more convenient and fast.
[0011] Optionally, the association between the pin address and the execution action corresponding to the execution device further comprises:
[0012] An IO address is defined for each pin of the programmable logic controller respectively;
[0013] The IO address corresponding to the pin is associated with the execution action corresponding to the execution device.
[0014] Optionally, the input signal of each pin comprises 0 and 1, and the association between the pin address and the execution action corresponding to the execution device further comprises:
[0015] Judging whether the input signal of the pin is 0 or 1;
[0016] The input signal of the pin after the judgment is associated with the execution action corresponding to the execution device.
[0017] Optionally, the determination of whether the input signal of the pin is 0 or 1 further comprises:
[0018] The input signal of the pin is ANDed with the binary number 1 to determine whether the input signal of the pin is 0 or 1.
[0019] Optionally, the ANDing of the input signal of the pin with the binary number 1 further comprises:
[0020] The pins of the programmable logic controller are arranged in sequence;
[0021] The input signal of each pin is obtained, and the pin signal of each pin is arranged according to the arrangement sequence of the pin;
[0022] determining the position of the input signal generated by the execution action in the execution device in all the input signals of the pins according to the signal input identifier, and offsetting the input signal generated by the execution action in the execution device to the first bit of the input signals of all the pins according to the position;
[0023] performing AND operation between the first bit in all the input signals of the pins and binary number 1, and performing AND operation between the input signals of the other pins and binary number 0.
[0024] Optionally, the method further comprises:
[0025] defining a variable address for each execution action of the execution device;
[0026] determining the pin address corresponding to the input signal generated by the execution action according to the identified signal input identifier;
[0027] associating the corresponding pin address with the variable address corresponding to the execution action by indirect addressing.
[0028] Optionally, the method further comprises:
[0029] converting the IO address of the corresponding pin to a decimal indirect address through address conversion;
[0030] accessing the indirect address by the variable address corresponding to the execution action.
[0031] Optionally, the signal input identifier is an indicator light on a display interface for indicating whether each pin has signal input.
[0032] A control system comprising an execution device and a programmable logic controller, wherein the execution device and the programmable logic controller are connected by the method for connecting an execution device and a programmable logic controller.
[0033] A computer readable storage medium, wherein instructions are stored in the computer readable storage medium, and the data storage device executes the instructions to implement the method for connecting an execution device and a programmable logic controller. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0035] Figure 1 One of the flowcharts of the method for connecting the interface of the execution device and the programmable logic controller according to the embodiments of the present application;
[0036] Figure 2 The second flowchart of the method for connecting the interface of the execution device and the programmable logic controller according to the embodiments of the present application;
[0037] Figure 3 The third flowchart of the method for connecting the interface of the execution device and the programmable logic controller according to the embodiments of the present application;
[0038] Figure 4 The fourth flowchart of the method for connecting the interface of the execution device and the programmable logic controller according to the embodiments of the present application;
[0039] Figure 5 The fifth flowchart of the method for connecting the interface of the execution device and the programmable logic controller according to the embodiments of the present application. Specific embodiments
[0040] In order to make the technical problems, technical solutions and beneficial effects of the present application more clearly understood, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0041] It should be noted that when a structure is referred to as "fixed to" or "disposed on" another structure, it can be directly on the other structure or indirectly on the other structure. When a structure is referred to as "connected to" another structure, it can be directly connected to the other structure or indirectly connected to the other structure.
[0042] It should be understood that the terms "length", "width", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and therefore cannot be understood as indicating or implying that the device or structure referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0043] In addition, the terms "first", "second", etc. are used only for descriptive purposes and should not be construed as implying or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include one or more features. In some application descriptions, the meaning of "multiple" is two or more, unless otherwise explicitly specified.
[0044] Referring to Figure 1 The execution device and the method for connecting the programmable logic controller interface provided by the application comprises the following steps:
[0045] Step S100, signal input identification is set for each pin of the programmable logic control, and when the pin receives an input signal, the signal input identification can be identified.
[0046] Specifically, after setting the signal input identification for each pin of the programmable logic control, when any pin has signal input, the signal input identification can be identified, that is, the pin of the signal input can be known through the signal input identification. The identification of the signal input identification can be identified by manual judgment or by system judgment.
[0047] Step S300, connecting the execution device to the pin.
[0048] Specifically, the pin on the execution device is connected to the pin of the programmable logic controller, and it can be understood that each pin on the execution device is connected to a pin of the programmable logic controller.
[0049] Step S500, the execution device executes the action, and the corresponding pin generates the input signal.
[0050] Specifically, the execution device can control the execution device to execute the action, and it can be understood that when the execution device executes the action, the execution device sends a signal to the pin connected to the pin through a certain pin, so that the corresponding pin of the programmable logic controller can generate an input signal. For example, the execution device is a clamp, which can control the clamp to execute the clamping action and the releasing action, respectively. When the clamp executes the clamping action, the clamp can send a signal to the pin connected to the pin through a certain pin, and when the clamp executes the releasing action, the clamp can also send a signal to the pin connected to the pin through a certain pin, and each pin connected to the pin can generate a corresponding input signal. When the execution device has multiple execution actions, the execution device can be controlled to execute each action in turn, so that each pin connected to the execution device can generate an input signal.
[0051] Step S700, determining the pin address corresponding to the input signal generated by the execution device performing the action according to the identified signal input identifier, and associating the pin address with the execution action corresponding to the execution device.
[0052] It can be understood that when the execution device performs a certain action, one of the plurality of pins of the programmable logic controller can receive a signal generated when the execution device performs the action. Since each pin is respectively provided with a signal input identifier, the signal input identifier corresponding to the pin with signal input can be identified, and it can be determined which pin address transmits the signal to the programmable logic controller when the execution device performs the action, and the pin address is associated with the execution action corresponding to the execution device.
[0053] In addition, when the execution device includes a plurality of execution actions, the execution device can be sequentially caused to perform each action. The execution device determines the pin address corresponding to each action during the execution of each action through the signal input identifier, and respectively associates the pin address with the corresponding execution action, thereby completing the association between each execution action of the execution device and the corresponding pin address in the programmable logic controller.
[0054] That is, in the method for connecting the execution device and the programmable logic controller, a signal input identifier is first set for each pin of the programmable logic controller. When the pin receives a signal input, the signal input identifier can be identified. Then, the execution device is connected to the pin of the programmable logic controller. Next, the execution device is controlled to perform an action to cause the corresponding pin to generate an input signal. The pin address corresponding to the input signal generated by the execution device when performing the action is determined according to the identified signal input identifier. Finally, the pin address is associated with the execution action corresponding to the execution device. When all execution actions of the execution device are associated with the corresponding pin address in the above manner, the connection between the execution device and the interface of the programmable logic controller is completed. This method makes the connection between the execution device and the interface of the programmable logic controller more convenient and fast.
[0055] Further, in some embodiments, in order to facilitate the association between the pin and the execution action corresponding to the execution device, referring to Figure 2 , the step S700 of associating the pin address with the execution action corresponding to the execution device further includes the following steps:
[0056] Step S710a, defining an IO address for each pin of the programmable logic controller.
[0057] For example, when the pin of the programmable logic controller has 8 pins, the address defined by the pin of the programmable logic controller can be I10.0-I10.7.
[0058] Step S720a, associating the IO address corresponding to the pin with the execution action corresponding to the execution device.
[0059] For example, the execution action of the execution device is clamping, and the IO address corresponding to the pin is I10.0. The address I10.0 can be associated with the execution action of the execution device, that is, when the execution device executes the clamping action, the clamping signal is input through the I10.0 address.
[0060] In some embodiments, the signal input through the pin of the execution device includes 0 and 1. For example, when the signal input through the pin of the execution device is 1 when the execution device executes the action such as clamping action, it means that the execution device does not execute the clamping action when the signal input through the pin of the execution device is 0. Therefore, the step of associating the pin address with the execution action corresponding to the execution device in step S700 can further include the following steps:
[0061] Step S730a, determining whether the input signal of the pin is 0 or 1.
[0062] It should be noted that the "pin" in the determination of the input signal of the pin refers to whether the input signal of the pin corresponding to the execution action of the execution device is 0 or 1.
[0063] Step S740a, associating the input signal of the pin after the determination with the execution action corresponding to the execution device.
[0064] For example, when the input signal of the execution device is determined to be 1, the input signal of the corresponding pin is confirmed to be 1, and is associated with the execution action corresponding to the execution device. That is, when the input signal of the corresponding pin is 1, it can be determined that the execution device has executed the execution action.
[0065] Specifically, referring to Figure 3 , the step of determining whether the input signal of the pin is 0 or 1 in step S730a can further include the following steps:
[0066] Step S731a, performing an AND operation between the input signal of the pin and the binary number 1 to determine whether the input signal of the pin is 0 or 1.
[0067] Further, in order to determine that the binary number 1 can accurately perform the AND operation with the input signal of the pin corresponding to the execution action of the execution device, the step of performing the AND operation between the input signal of the pin and the binary number 1 in step S731 can further include:
[0068] Step S7311a, arranging the pins of the programmable logic controller in order.
[0069] For example, when the programmable logic controller has 8 pins, the 8 pins are arranged in order.
[0070] Step S7312a, the input signal of each pin is acquired, and the pin signal of each pin is arranged according to the arrangement order of the pin.
[0071] Step S7313a, the position of the input signal generated by the execution action in the execution device in all the input signals of the pins is determined according to the signal input identifier, and the input signal generated by the execution action in the execution device is offset to the first position of all the input signals of the pins according to the position.
[0072] For example, when the input signal generated by the execution action in the execution device is in the fourth position of all the input signals of the pins, all the input signals of the pins are offset to the right by four positions, so that the input signal generated by the execution action in the execution device is in the first position of all the input signals of the pins. It can be understood that in the program, the input signal is generally the first position from the right, and the calculation is from right to left.
[0073] Step S7314a, the first position of all the input signals of the pins is subjected to AND operation with the binary number 1, and the input signals of the other pins are subjected to AND operation with the binary number 0.
[0074] The above method can ensure that the input signal of the pin corresponding to the execution action of the execution device can be subjected to AND operation with the binary number 1, so that it can be accurately judged that the input signal of the pin corresponding to the execution action is 0 or 1.
[0075] In addition, in some embodiments, referring to Figure 4 Step S700, the pin address corresponding to the input signal generated by the execution action is determined according to the identified signal input identifier, and the pin address is associated with the execution action corresponding to the execution device. Other methods can also be used, and the method can include the following steps:
[0076] Step S710b, a variable address is defined for each execution action of the execution device.
[0077] For example, when the execution action of the execution device includes two actions such as clamping and unclamping, a variable address can be defined for the clamping action and the unclamping action of the execution device in the programmable logic controller, respectively. For example, MD210 represents the variable address of the clamping action, and MD310 represents the variable address of the unclamping action.
[0078] Step S720b, the pin address corresponding to the input signal generated by the execution action is determined according to the identified signal input identifier.
[0079] Step S730b, associating the corresponding pin address with the variable address corresponding to the execution action by means of indirect addressing.
[0080] Further, referring to Figure 5 , step S730b, the associating the corresponding pin address with the variable address corresponding to the execution action by means of indirect addressing further comprises:
[0081] Step S731b, converting the IO address of the corresponding pin into a decimal indirect address by address conversion.
[0082] For example, when the IO address of the corresponding pin is I10.0, I10.0 is converted into 10x8=80 by address conversion.
[0083] Step S732b, accessing the indirect address by the variable address corresponding to the execution action.
[0084] For example, when the IO address of the corresponding pin is I10.0, and the variable address corresponding to the execution action is MD264, MD264=10x8=80, that is, I
MD264
[0085] In addition, in some embodiments, in order to facilitate the user to determine through the signal input identifier after wiring the execution device with the programmable logic controller that the signal inputted by the execution device when executing the action is through which pin, the signal input identifier can be set as an indicator light on the display interface for indicating whether each pin has signal input, for example, when a certain indicator light is on, it means that the pin corresponding to the indicator light has signal input, that is, the execution device executes a certain action through the pin input signal.
[0086] The application also provides a control system comprising an execution device and a programmable logic controller, wherein the execution device and the programmable logic controller are connected by the method for connecting the execution device and the programmable logic controller of the application, so as to improve the convenience and speed of the interface connection between the execution device and the programmable logic controller.
[0087] The application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, and the data storage device executes the instructions so that the data storage device implements the method for connecting the execution device and the programmable logic controller of the application.
[0088] The above is only a preferred embodiment of the application, and is not used to limit the application, and any modification, equivalent replacement and improvement made within the spirit and principle of the application shall be included in the protection scope of the application.
Claims
1. A method for interface connection between an execution device and a programmable logic controller, characterized in that, Including the following methods: A signal input identifier is set for each pin of the programmable logic controller, and the signal input identifier can be identified when the pin receives an input signal; Connect the actuators to the pins respectively; The actuator performs an action, and the corresponding pin generates an input signal; The pin address corresponding to the input signal generated by the execution action is determined based on the identified signal input identifier, and the pin address is associated with the execution action corresponding to the execution device. The input signal of each pin includes 0 and 1, and associating the pin address with the execution action corresponding to the execution device further includes: Determine whether the input signal of the pin is 0 or 1; The input signal of the pin after the judgment is associated with the execution action corresponding to the execution device; The step of determining whether the input signal of the pin is 0 or 1 further includes: Perform an AND operation between the input signal of the pin and the binary number 1 to determine whether the input signal of the pin is 0 or 1; The step of performing an AND operation between the input signal of the pin and the binary number 1 further includes: Arrange the pins of the programmable logic controller in sequence; Acquire the input signal of each of the pins, and arrange the pin signals of each pin according to the pin arrangement order; The position of the input signal generated by the action performed in the actuator is determined according to the signal input identifier, and the input signal generated by the action performed in the actuator is shifted to the first position of the input signals of all the pins according to the position. The first bit of the input signal of all the aforementioned pins is ANDed with the binary number 1, and the input signals of the other pins are ANDed with the binary number 0.
2. The method for interface connection between the execution device and the programmable logic controller as described in claim 1, characterized in that, Associating the pin address with the execution action corresponding to the execution device further includes: Define an I / O address for each pin of the programmable logic controller; Associating the I / O address corresponding to the pin with the execution action corresponding to the execution device.
3. The method for interface connection between the execution device and the programmable logic controller as described in claim 2, characterized in that, The step of determining the pin address corresponding to the input signal generated by the execution action based on the identified signal input identifier, and associating the pin address with the execution action corresponding to the execution device, further includes: Define a variable address for each execution action of the execution device; The pin address corresponding to the input signal generated by the executed action is determined based on the identified signal input identifier; The corresponding pin address is associated with the variable address corresponding to the executed action by means of indirect addressing.
4. The method for interface connection between the execution device and the programmable logic controller as described in claim 3, characterized in that, The method of associating the corresponding pin address with the variable address corresponding to the executed action through indirect addressing further includes: The corresponding pin's I / O address is converted to a decimal indirect address using address translation; The variable address corresponding to the execution action is made to access the indirect address.
5. The method for interface connection between the execution device and the programmable logic controller as described in claim 1, characterized in that, The signal input identifier is an indicator light on the display interface used to indicate whether each pin has a signal input.
6. A control system, characterized in that, It includes an execution device and a programmable logic controller, wherein the execution device and the programmable logic controller are connected using the method of interface connection between the execution device and the programmable logic controller as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that the data storage device executes to enable the data storage device to implement the method of interface connection between the execution device and the programmable logic controller as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Start control method and device, chip and debugging system thereof
CN116755919A