Method and device for PLC control, electronic equipment and storage medium
By having the PLC module respond to user selection instructions, determine the target execution device and select the target channel, the problem of low connectivity caused by PLC program modification is solved, and efficient connectivity and cost reduction between the PLC and the execution device are achieved.
Patent Information
- Application Number
- CN202410268527.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-08
- Publication Date
- 2025-09-09
AI Technical Summary
When the existing PLC is connected to the execution device, if it is necessary to replace the execution device with a different brand or model, the PLC program needs to be modified again, resulting in software code redundancy and increased workload, and low connection efficiency.
The PLC module responds to the user's selection instruction, determines the target execution device, and selects the target channel from multiple channels to be selected, so that the output point of the PLC is connected to the target execution device, realizing rapid connection between the PLC and the execution device.
Different execution devices can be controlled without modifying the PLC program, which improves the connection efficiency between PLC and execution devices and reduces usage costs.
Smart Images

Figure CN120610508A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation technology, and in particular to a method and device, electronic equipment, and storage medium for PLC control. Background Art
[0002] Programmable Logic Controllers (PLCs), a new type of general-purpose industrial automatic control device, are based on traditional sequential controllers and integrate computer technology, microelectronics, automatic control technology, digital technology, and communication network technology. They are a key pillar of modern industrial control. Therefore, PLCs are widely used in various industrial control fields.
[0003] For users, industrial automation requires a wide variety of actuators, each of varying types and brands. These devices often require vastly different PLC control logic. Therefore, when using PLCs to control actuators, every time a manufacturer switches to a different brand or model of actuator, the PLC program must be re-added, modified, and retested. This inevitably leads to redundant software code and wasted work during software development, integration, and subsequent maintenance. This inefficiently connects the PLC to the actuators, further increasing costs for users during software development, integration, and subsequent maintenance.
[0004] During the implementation of the embodiments of the present disclosure, it was found that at least the following problems exist in the related art:
[0005] Usually, the points of the PLC correspond one-to-one to the execution devices. If the controlled execution device needs to be replaced, the control logic of the PLC program needs to be added or modified for each execution device separately, resulting in redundancy of software code and waste of workload, thereby making the communication between the PLC and the execution device inefficient.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention
[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0008] The embodiments of the present disclosure provide a method and apparatus, an electronic device, and a storage medium for PLC control to improve the communication efficiency between the PLC and an execution device.
[0009] In some embodiments, the PLC includes multiple channels to be selected, and the PLC is controlled to select one channel to be selected from the multiple channels to be selected to connect to the execution device; the method for PLC control includes: determining the target execution device in response to the user's selection instruction; determining the first target channel from the multiple channels to be selected based on the target execution device; triggering the output point of the PLC to be connected to the first target channel, so that the PLC is connected to the target execution device.
[0010] In some embodiments, the PLC includes multiple channels to be selected, and the PLC is controlled to select one channel to be selected from the multiple channels to be selected to connect with the execution device; the device for PLC control includes: a determination module, configured to determine the target execution device in response to a user's selection instruction; a selection module, configured to determine a first target channel from the multiple channels to be selected according to the target execution device; a connection module, configured to trigger the output point of the PLC to connect with the first target channel, so that the PLC is connected with the target execution device.
[0011] In some embodiments, the electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method for PLC control as described above through the computer program.
[0012] In some embodiments, the storage medium includes stored program instructions, which are executed by a processor to implement the method for PLC control as described above.
[0013] The method and apparatus, electronic device, and storage medium for PLC control provided by the embodiments of the present disclosure can achieve the following technical effects:
[0014] The present invention determines the target execution device in response to a user's selection instruction, identifies a target channel corresponding to the target execution device from multiple selectable channels that can communicate with the execution device, and then triggers a PLC output point to connect to the target channel, thereby connecting the PLC output point to the target execution device. This allows different execution devices to be controlled through a single PLC output point. This eliminates the need to re-modify the PLC program, enabling multiple PLC functions and improving the efficiency of communication between the PLC and the execution devices.
[0015] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by corresponding drawings. These exemplary descriptions and drawings do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation. In addition,
[0017] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0018] Figure 2 is a schematic diagram of a method for PLC control provided by an embodiment of the present disclosure;
[0019] Figure 3 is a schematic diagram of another method for PLC control provided by an embodiment of the present disclosure;
[0020] Figure 4 is a schematic diagram of another method for PLC control provided by an embodiment of the present disclosure;
[0021] Figure 5 is a schematic diagram of another method for PLC control provided by an embodiment of the present disclosure;
[0022] Figure 6 is a schematic diagram of a device for PLC control provided by an embodiment of the present disclosure;
[0023] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In order to be able to understand the features and technical content of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The accompanying drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the sake of convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] The method for PLC control provided by the embodiment of the present disclosure is applied to electronic devices. In some embodiments, the electronic device is a computer or a server. The electronic device can communicate with the PLC module and the execution device by connecting to the Internet, Bluetooth, WiFi, etc. For example, in combination with Figure 1 As shown, the electronic device is a server, and the server 101, the PLC module 102 and the execution device 103 all communicate with each other via the Internet. Figure 1 As shown, server 101 sends the user's selection instruction to PLC module 102. In response to the user's selection instruction, PLC module 102 determines execution device 103. Based on execution device 103, PLC module 102 determines a target channel from multiple candidate channels and triggers the point of PLC module 102 to connect to the target channel, thereby connecting the PLC to the target execution device. In other embodiments, the electronic device is a PLC module.
[0027] Combine Figure 2 As shown, an embodiment of the present disclosure provides a method for PLC control, wherein the PLC includes multiple channels to be selected, and the PLC is controlled to select one channel from the multiple channels to be selected to connect to an execution device. The method includes:
[0028] Step S201: The electronic device determines a target execution device in response to a user's selection instruction.
[0029] In step S202 , the electronic device determines a first target channel from a plurality of candidate channels according to a target execution device.
[0030] In step S203, the electronic device triggers the output point of the PLC to be connected to the first target channel, so that the PLC is connected to the target execution device.
[0031] The PLC control method provided by the embodiments of the present disclosure determines the target execution device in response to a user's selection instruction, determines the target channel corresponding to the target execution device from multiple selectable channels that can communicate with the execution device, and then triggers the PLC output point to connect to the target channel, thereby connecting the PLC output point to the target execution device. This allows the control of different execution devices through a single PLC output point. This eliminates the need to re-modify the PLC program, enabling multiple uses of the PLC and improving the efficiency of communication between the PLC and the execution devices.
[0032] Optionally, the selection instruction is an instruction for the user to select an execution device, and determining the target execution device in response to the user's selection instruction includes: the electronic device determines the execution device selected by the user as the target execution device in response to the user's selection instruction.
[0033] Optionally, the executing device is a frequency converter. The user can use the touchscreen of the electronic device to select a frequency converter as the target frequency converter from a selection of multiple brands and models. Each frequency converter corresponds to a signal output channel, and each signal output channel corresponds to a selectable channel of the PLC. After determining that the frequency converter selected by the user is the target frequency converter, the PLC controls the selection of one of the multiple selectable channels and connects it to the target frequency converter. Displaying and selecting frequency converters on the touchscreen allows the user to more intuitively understand and select the model and brand of the frequency converter.
[0034] Optionally, the electronic device determining the first target channel from a plurality of channels to be selected based on the target execution device includes: the electronic device determining a signal transmission channel of the target execution device based on the target execution device. The electronic device determining the first target channel from the plurality of channels to be selected based on the signal transmission channel of the target execution device.
[0035] Optionally, the electronic device determines a first target channel from a plurality of candidate channels based on the signal transmission channel of the target execution device, including: the electronic device performs a search operation in a preset second data table using the signal transmission channel of the target execution device to find a target candidate channel corresponding to the signal transmission channel of the target execution device. The second data table stores a correspondence between the signal transmission channels of execution devices and the target candidate channels. The electronic device determines the target candidate channel from the candidate channels as the first target channel.
[0036] By using the correspondence between the signal transmission channel of the execution device and the target candidate channel to determine the first target channel, the target channel can be quickly obtained from multiple candidate channels, which is conducive to improving the matching efficiency between the execution device and the candidate channels.
[0037] In one embodiment, the execution device is a frequency converter, and the brands of the selected frequency converters include Brand A, Brand B, and Brand C. If the user selects Brand A as the frequency converter brand through the touch screen, the PLC identifies Brand A as the target execution device and, based on the signal transmission channel corresponding to Brand A, determines a first target channel from multiple candidate channels. Finally, the PLC output is connected to the first target channel, establishing communication between the PLC and Brand A.
[0038] Combine Figure 3 As shown, the embodiment of the present disclosure provides another method for PLC control, for example, the selection instruction is an instruction for the user to select an execution device. The method includes:
[0039] Step S301 : In response to a user's selection instruction, the electronic device determines the execution device selected by the user as a target execution device.
[0040] Step S302: The electronic device determines a signal transmission channel of the target execution device according to the target execution device.
[0041] Step S303: The electronic device determines a first target channel from a plurality of candidate channels according to the signal transmission channel of the target execution device.
[0042] In step S304, the electronic device triggers the output point of the PLC to be connected to the first target channel, so that the PLC is connected to the target execution device.
[0043] The PLC control method provided by the embodiments of the present disclosure determines the target execution device in response to a user's selection instruction, determines a first target channel corresponding to the target execution device from multiple selectable channels that can communicate with the execution device, and triggers a PLC output point to connect to the first target channel, thereby connecting the PLC output point to the target execution device. This allows the control of different execution devices through a single PLC output point. This eliminates the need to re-modify the PLC program, enabling multiple uses of the PLC, improving the efficiency of the communication between the PLC and the execution device, and further reducing the cost of using the PLC.
[0044] Optionally, the selection instruction is an instruction for a user to select a data collection device. The electronic device, in response to the user's selection instruction, determines the target execution device, including: the electronic device, in response to the user's selection instruction, determines the data collection device selected by the user as the target data collection device. The electronic device determines the target execution device based on the target data collection device.
[0045] Optionally, the data acquisition device is a temperature sensor, and the execution device is a frequency converter. A user can use the touch screen of the electronic device to select a temperature sensor from a plurality of temperature sensors of different brands and models as a target data collection device. Displaying and selecting temperature sensors on the touch screen allows the user to more intuitively understand and select the model and brand of the temperature sensor.
[0046] Optionally, the electronic device determines the target execution device based on the target data acquisition device, including: the electronic device uses the target data acquisition device to perform a search operation in a preset first data table to find an alternative execution device corresponding to the target data acquisition device. The first data table stores a correspondence between data acquisition devices and alternative execution devices. The electronic device determines the found alternative execution device as the target execution device.
[0047] By using the correspondence between the data acquisition device and the alternative execution device to determine the target execution device, the target execution device can be obtained more quickly from multiple execution devices, thereby reducing the matching time between devices and improving matching efficiency.
[0048] In one embodiment, the execution device is a frequency converter, and the data acquisition device is a temperature sensor. The brands of the frequency converters to be selected include Brand A, Brand B, and Brand C, and the models of the temperature sensors to be selected include Model A and Model B. If the model of the temperature sensor to be selected selected by the user through the touch screen is Model A, the Model A temperature sensor is determined as the target data collection device, and the frequency converter of the corresponding brand is automatically determined as the target execution device based on the first data table, for example, the Brand A frequency converter. Optionally, after the Model A temperature sensor is determined as the target data collection device, the touch screen prompts the customer whether to use the frequency converter of the corresponding brand stored in the first data table as the target execution device. If the customer selects no, the frequency converter reselected by the customer through the touch screen is used as the target execution device.
[0049] Optionally, after determining the data acquisition device selected by the user as the target data acquisition device, the method further includes: the electronic device determining a second target channel from the plurality of channels to be selected based on the target data acquisition device, and the electronic device triggering an input point of a PLC to connect to the second target channel, thereby connecting the PLC to the target data acquisition device.
[0050] Optionally, the data acquisition device is a temperature sensor. A user can use the touch screen of the electronic device to select a temperature sensor from a plurality of temperature sensors of different brands and models as a target temperature sensor. Each temperature sensor corresponds to a signal input channel, and each signal input channel corresponds to a selected channel of the PLC.
[0051] Optionally, the electronic device determines the second target channel from a plurality of channels to be selected based on the target data acquisition device, including: the electronic device determines a signal transmission channel of the target data acquisition device based on the target data acquisition device. The electronic device determines the second target channel from the plurality of channels to be selected based on the signal transmission channel of the target data acquisition device.
[0052] Optionally, the electronic device determines the second target channel from a plurality of candidate channels based on the signal transmission channel of the target data acquisition device, including: the electronic device uses the signal transmission channel of the target data acquisition device to perform a search operation in a preset third data table to find the target candidate channel corresponding to the signal transmission channel of the target data acquisition device. The third data table stores the correspondence between the signal transmission channel of the data acquisition device and the target candidate channels. The electronic device determines the target candidate channel from the candidate channels as the second target channel.
[0053] By utilizing the correspondence between the signal transmission channel of the data acquisition device and the target candidate channel to determine the second target channel, the target channel can be quickly acquired from multiple candidate channels, which is beneficial to improving the matching efficiency between the data acquisition device and the candidate channels.
[0054] In one embodiment, after determining that the temperature sensor selected by the user is the target temperature sensor, such as Model A temperature sensor, the PLC is controlled to select a candidate channel from multiple candidate channels to connect to Model A temperature sensor. After the PLC connects to Model A temperature sensor, it receives data collected by Model A temperature sensor via input points and can send it to an electronic device such as a computer or server for processing or storage. In the event of a different brand of temperature sensor, such as Model B, the PLC is again controlled to determine a third target channel corresponding to Model B temperature sensor from the multiple candidate channels. The PLC then triggers the input points of the PLC to connect to the third target channel, allowing the PLC to connect to Model B temperature sensor, thereby receiving data collected by Model B temperature sensor and sending it to an electronic device such as a computer or server for processing or storage.
[0055] In this way, different data acquisition devices can be controlled through a single PLC input point without having to re-modify the PLC program. This allows the PLC to be used for multiple purposes, improves the efficiency of the connection between the PLC and data acquisition devices, and further reduces the cost of using the PLC.
[0056] Combine Figure 4 As shown, the embodiment of the present disclosure provides another method for PLC control, for example, the selection instruction is an instruction for the user to select a data acquisition device. The method includes:
[0057] Step S401: The electronic device determines the data collection device selected by the user as the target data collection device in response to the user's selection instruction.
[0058] In step S402 , the electronic device determines a second target channel from a plurality of channels to be selected according to the target data acquisition device.
[0059] In step S403, the electronic device triggers the input point of the PLC to be connected to the second target channel, so that the PLC is connected to the target data acquisition device.
[0060] The method for PLC control provided by the embodiments of the present disclosure determines a target data acquisition device in response to a user's selection instruction, determines a target channel corresponding to the target data acquisition device from multiple selectable channels that can communicate with the data acquisition device, and connects the PLC output point to the second target channel by triggering the PLC output point to connect to the target data acquisition device. This enables reception of different data acquisition devices through a single PLC input point. This eliminates the need to re-modify the PLC program, enabling the PLC to be used for multiple purposes, improving the efficiency of communication between the PLC and data acquisition devices, and further reducing the cost of using the PLC.
[0061] Optionally, after the electronic device triggers the output point of the PLC to be connected to the first target channel so that the PLC is connected to the target execution device, the electronic device further includes: the electronic device triggers the target execution device to operate according to the control instruction output by the PLC point.
[0062] Combine Figure 5 As shown, an embodiment of the present disclosure provides another method for PLC control, the method comprising:
[0063] Step S501: The electronic device determines a target execution device in response to a user's selection instruction.
[0064] Step S502: The electronic device determines a first target channel from a plurality of candidate channels according to a target execution device.
[0065] In step S503, the electronic device triggers the output point of the PLC to be connected to the first target channel, so that the PLC is connected to the target execution device.
[0066] In step S504, the electronic device triggers the target execution device to run according to the control instructions output by the PLC point.
[0067] In one embodiment, the execution device is a frequency converter. After the output point of the PLC is connected to the first target channel, the PLC is connected to the target execution device, for example, the target execution device is a brand A frequency converter. The PLC calls the PLC program to determine the motor speed corresponding to the brand A frequency converter, and outputs the above-mentioned motor speed as a control instruction through the output point to make the motor run. In the case of replacing the frequency converter of another brand, such as brand B, the PLC is controlled again to determine the fourth target channel corresponding to the brand B frequency converter from multiple channels to be selected, and then triggers the output point of the PLC to be connected to the above-mentioned fourth target channel, so that the PLC is connected to the target execution device, thereby controlling the corresponding motor to run according to the control instruction.
[0068] In this way, a single PLC output point can control different actuators without revising the PLC program. This allows for multiple uses of the PLC, improves the efficiency of the connection between the PLC and actuators, and further reduces the cost of using the PLC.
[0069] Combine Figure 6 As shown, an embodiment of the present disclosure provides an apparatus 600 for PLC control, comprising: a determination module 601, a selection module 602, and a connection module 603. The determination module 601 is configured to determine a target execution device in response to a user's selection instruction. The selection module 602 is configured to determine a first target channel from a plurality of candidate channels based on the target execution device. The connection module 603 is configured to trigger the output point of the PLC to be connected to the first target channel, thereby connecting the PLC to the target execution device.
[0070] The PLC control device provided by the embodiments of the present disclosure determines a target execution device in response to a user's selection instruction, determines a target channel corresponding to the target execution device from multiple selectable channels that can communicate with the execution device, and triggers a PLC output point to connect to the target channel, thereby connecting the PLC output point to the target execution device. This allows different execution devices to be controlled through a single PLC output point. This eliminates the need to re-modify the PLC program, enabling multiple uses of the PLC and improving the efficiency of communication between the PLC and the execution devices.
[0071] Optionally, the selection instruction is an instruction for the user to select an execution device. The determination module is configured to determine the target execution device in response to the user's selection instruction in the following manner: in response to the user's selection instruction, determine the execution device selected by the user as the target execution device.
[0072] Optionally, the selection instruction is an instruction for a user to select a data acquisition device. The determination module is configured to determine the target execution device in response to the user's selection instruction by: determining the data acquisition device selected by the user as the target data acquisition device in response to the user's selection instruction; and determining the target execution device based on the target data acquisition device.
[0073] Optionally, the determination module is further configured to determine the target execution device based on the target data acquisition device by performing a search operation in a preset first data table using the target data acquisition device to find an alternative execution device corresponding to the target data acquisition device. The first data table stores a correspondence between data acquisition devices and alternative execution devices. The found alternative execution device is determined as the target execution device.
[0074] Optionally, the selection module is configured to determine the first target channel from the plurality of channels to be selected based on the target execution device by: determining a signal transmission channel of the target execution device based on the target execution device; and determining the first target channel from the plurality of channels to be selected based on the signal transmission channel of the target execution device.
[0075] Optionally, the selection module is configured to determine a first target channel from a plurality of candidate channels based on the signal transmission channel of the target execution device by performing a search operation in a preset second data table using the signal transmission channel of the target execution device to find a target candidate channel corresponding to the signal transmission channel of the target execution device. The second data table stores a correspondence between the signal transmission channels of execution devices and the target candidate channels. The target candidate channel from the candidate channels is determined as the first target channel.
[0076] Optionally, the apparatus for PLC control further includes: an execution module configured to trigger the target execution device to operate according to the control instructions output by the PLC point.
[0077] Combine Figure 7 As shown, an embodiment of the present disclosure provides an electronic device 700, including a processor 701 and a memory 702. Optionally, the device may further include a communication interface 703 and a bus 704. The processor 701, the communication interface 703, and the memory 702 may communicate with each other via the bus 704. The communication interface 703 may be used for information transmission. The processor 701 may call the logic instructions in the memory 702 to execute the method for PLC control of the above embodiment.
[0078] The electronic device provided by the embodiments of the present disclosure determines the target execution device by responding to a user's selection instruction, determines the target channel corresponding to the target execution device from multiple channels that can be connected to the execution device, and triggers the PLC output point to connect to the target channel, thereby connecting the PLC output point to the target execution device. This allows the control of different execution devices through a single PLC output point. This eliminates the need to re-modify the PLC program, enabling multiple uses of the PLC and improving the efficiency of the connection between the PLC and the execution device.
[0079] In addition, the logic instructions in the memory 702 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0080] The memory 702 , as a computer-readable storage medium, may be used to store software programs, computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure.
[0081] The processor 701 executes the program instructions / modules stored in the memory 702 to perform functional applications and data processing, that is, to implement the method for PLC control in the above embodiment.
[0082] The memory 702 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 702 may include high-speed random access memory and non-volatile memory.
[0083] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium includes stored program instructions, and the program instructions are executed by a processor to implement the above-mentioned method for PLC control.
[0084] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0085] The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code, or a transient storage medium.
[0086] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible variations. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to also include plural forms. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variations "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method or device that includes the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between each embodiment can be referenced to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can be found in the description of the method part.
[0087] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0088] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, and can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of the present disclosure may be integrated into a processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
[0089] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for PLC control, characterized in that: The PLC includes a plurality of channels to be selected, and the PLC is controlled to select one of the channels to be selected and connected to the execution device; the method includes: In response to a user's selection instruction, determining a target execution device; Determining a first target channel from a plurality of candidate channels according to a target execution device; The output point of the PLC is triggered to be connected to the first target channel, so that the PLC is connected to the target execution device.
2. The method according to claim 1, characterized in that The selection instruction is an instruction for a user to select an execution device. In response to the user's selection instruction, determining a target execution device includes: In response to a selection instruction from a user, the execution device selected by the user is determined as a target execution device.
3. The method according to claim 1, characterized in that The selection instruction is an instruction for the user to select a data acquisition device; in response to the user's selection instruction, determining the target execution device includes: In response to a user's selection instruction, determining the data collection device selected by the user as a target data collection device; A target execution device is determined according to the target data acquisition device.
4. The method according to claim 3, characterized in that Determining a target execution device according to the target data acquisition device includes: Using the target data acquisition device to perform a search operation in a preset first data table to find an alternative execution device corresponding to the target data acquisition device; the first data table stores a correspondence between data acquisition devices and alternative execution devices; The found candidate execution device is determined as the target execution device.
5. The method according to claim 1, wherein Determining a first target channel from a plurality of candidate channels according to a target execution device includes: Determine the signal transmission channel of the target execution device according to the target execution device; A first target channel is determined from a plurality of candidate channels according to a signal transmission channel of the target execution device.
6. The method according to claim 5, characterized in that Determining a first target channel from a plurality of candidate channels according to a signal transmission channel of the target execution device includes: performing a search operation in a preset second data table using the signal transmission channel of the target execution device to find a target candidate channel corresponding to the signal transmission channel of the target execution device; the second data table stores a correspondence between the signal transmission channel of the execution device and the target candidate channel; A target candidate channel among the candidate channels is determined as a first target channel.
7. The method according to claims 1 to 6, characterized in that After the output point of the PLC is triggered to be connected to the first target channel so that the PLC is connected to the target execution device, the method further includes: The target execution device is triggered to run according to the control instructions output by the PLC point.
8. A device for controlling a PLC, characterized in that: The PLC includes a plurality of channels to be selected, and the PLC is controlled to select one of the channels to be selected to be connected to the execution device; the device includes: a determination module, configured to determine a target execution device in response to a user's selection instruction; A selection module is configured to determine a first target channel from a plurality of channels to be selected according to a target execution device; The communication module is configured to trigger the output point of the PLC to be connected to the first target channel, so that the PLC is connected to the target execution device.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method for PLC control according to any one of claims 1 to 7 through the computer program.
10. A storage medium, characterized in that: The storage medium includes stored program instructions, and the program instructions are executed by a processor to implement the method for PLC control according to any one of claims 1 to 7.