A control method, device and storage medium of a device
By calculating the expected waiting time of the equipment and dynamically matching the number of PLCs, the problem of low utilization of programmable controllers was solved, achieving resource conservation and efficient equipment operation, and avoiding equipment downtime due to PLC failure.
Patent Information
- Application Number
- CN202310554957.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-05-16
AI Technical Summary
In the existing technology, the utilization rate of programmable logic controllers (PLCs) in mechanical equipment is low, resulting in waste of resources and energy, and the controller needs to be replaced to restore normal operation when the equipment fails.
By receiving the number of PLCs, the number of devices, and the percentage of running time, the expected waiting time of the devices is calculated, the number of PLCs is dynamically matched, and the normal PLC is automatically switched to maintain device operation in case of failure.
Reducing the number of PLCs lowers costs and energy consumption, improves equipment operating efficiency, and prevents equipment downtime due to PLC failures.
Smart Images

Figure CN116643532B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of electrical control, and in particular to a method, apparatus and storage medium for controlling a device. Background Technology
[0002] Currently, lifting and traversing mechanical equipment accounts for more than 90% of all mechanical equipment. Lifting and traversing mechanical equipment usually adopts a method of one programmable controller per set of equipment.
[0003] In the prior art, when the number of devices is large, the number of programmable controllers also increases accordingly, that is, the number of programmable controllers matches the number of devices.
[0004] In actual use, the controller is only needed during equipment operation. The equipment is mainly used for parking vehicles, and its operating time accounts for about 10%, with the majority of the time spent in a non-operational state. Therefore, in existing technologies, the controller is also in a long-term non-operational state, resulting in low utilization, high cost, and waste of resources and energy. Moreover, when the controller of a device malfunctions, the faulty controller needs to be removed and a new controller installed to restore the equipment to normal operation. Summary of the Invention
[0005] In view of the above analysis, this application aims to provide a control method, apparatus and storage medium for a device to solve at least one of the above-mentioned technical problems.
[0006] Firstly, one or more embodiments of this specification provide a method for controlling a device, including:
[0007] The number of PLC programmable logic controllers receiving external input, the number of devices to be controlled, and the percentage of average operating time of the devices to be controlled;
[0008] The expected waiting time of the devices to be controlled is determined based on the number of PLCs, the number of devices to be controlled, and the average running time percentage.
[0009] Match the corresponding number of PLCs according to the expected value.
[0010] Further, determining the expected waiting time of the controlled device based on the number of PLCs, the number of devices to be controlled, and the average operating time percentage includes:
[0011] The expected waiting time of the controlled device is calculated using the following formula:
[0012]
[0013] Where m represents the number of devices to be controlled, n represents the number of PLCs, p represents the percentage of average running time, and T represents the expected value of waiting time.
[0014] Further, determining the expected waiting time of the controlled device based on the number of PLCs, the number of devices to be controlled, and the average operating time percentage includes:
[0015] Determine the value ranges for the number of PLCs, the number of devices to be controlled, and the percentage of average running time, respectively;
[0016] Based on the range of values and the formula, multiple expected values are determined.
[0017] Further, matching a corresponding number of PLCs according to the expected value includes:
[0018] From the plurality of expected values, determine the smallest expected value;
[0019] Based on the minimum expected value, determine the corresponding number of PLCs and the number of devices to be controlled;
[0020] Based on the determined number of PLCs and the number of devices to be controlled, match the corresponding number of PLCs.
[0021] Furthermore, the method also includes:
[0022] Check for any faulty PLCs;
[0023] When a faulty PLC is present, the backup PLC is activated based on the number of PLCs corresponding to the expected value and the number of faulty PLCs.
[0024] Secondly, embodiments of this application provide a device control method apparatus, comprising a receiving module, a data processing module, and a control module;
[0025] The receiving module is used to receive external inputs of the number of PLC programmable logic controllers, the number of devices to be controlled, and the average operating time percentage of the devices to be controlled;
[0026] The data processing module is used to determine the expected waiting time of the devices to be controlled based on the number of PLCs, the number of devices to be controlled, and the average running time percentage.
[0027] The control module is used to match a corresponding number of PLCs according to the expected value.
[0028] Furthermore, the data processing module is used to calculate the expected waiting time of the device to be controlled using the following formula:
[0029]
[0030] Where m represents the number of devices to be controlled, n represents the number of PLCs, p represents the percentage of average running time, and T represents the expected value of waiting time.
[0031] Furthermore, the data processing module is used to determine the value ranges of the number of PLCs, the number of devices to be controlled, and the average running time percentage; and to determine multiple expected values based on the value ranges and the formula.
[0032] Furthermore, the control module is used to determine the smallest expected value from the plurality of expected values; determine the corresponding number of PLCs and the number of devices to be controlled based on the smallest expected value; and match the corresponding number of PLCs based on the determined number of PLCs and the number of devices to be controlled.
[0033] Thirdly, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed, implement the method described in any one of the first aspects.
[0034] Compared with the prior art, this application can achieve at least the following technical effects:
[0035] This application treats the average operating time percentage of equipment as a probability, thus transforming the solution for equipment waiting time into a solution for expected value. This allows for quantitative prediction of equipment waiting time, providing an intuitive basis for selecting the appropriate number of PLCs. Subsequently, based on the expected equipment waiting time, a corresponding number of PLCs are matched to reduce the number of PLCs and idle operating time, thereby improving efficiency, reducing costs, and saving energy. This application employs a method of multiple PLCs controlling multiple devices. When one PLC fails, the system can automatically connect another normally functioning PLC to control the device, solving the problem in the traditional method of one PLC controlling one device where a device cannot operate if the PLC of one device fails. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a flowchart illustrating a device control method provided for one or more embodiments of this specification. Detailed Implementation
[0038] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0039] The reason why existing technologies use a one-to-one correspondence between the controlled device and the PLC is as follows:
[0040] 1. In real-world scenarios, the number of devices to be controlled and PLCs is often large, resulting in complex combinations of these devices and PLCs. Therefore, adopting a one-to-one correspondence between the controlled devices and PLCs can save time in handling complex situations.
[0041] 2. In real-world scenarios, the start-up time and working time of the devices to be controlled are uncertain, making it difficult to determine the waiting time of each device in advance.
[0042] To address the above scenario, this application provides a device control method, comprising the following steps:
[0043] Step 1: Receive external inputs for the number of PLCs, the number of devices to be controlled, and the percentage of average running time of the devices to be controlled.
[0044] In this embodiment, the average operating time percentage of the controlled device is the ratio of the device's working time to the total time during a specific period. For example, if the device works for 1 hour between 6 PM and 8 PM, then the average operating time percentage of the controlled device is 0.5. The number of PLCs, the number of controlled devices, and the average operating time percentage of the controlled devices can be a specific number or a range of values.
[0045] Step 2: Determine the expected waiting time of the devices to be controlled based on the number of PLCs, the number of devices to be controlled, and the average running time percentage.
[0046] In this embodiment, since the proportion of the average operating time of the device to be controlled is dimensionless, the proportion of the average operating time is treated as a probability to facilitate the quantification of the waiting time of the device to be processed. The formula for calculating the expected value of the waiting time of the device to be controlled is as follows:
[0047]
[0048] Where m represents the number of devices to be controlled, n represents the number of PLCs, p represents the percentage of average running time, and T represents the expected waiting time. It should be noted that i-n+1 represents the number of cycles. One cycle is the duration of the PLC's operating state during one control cycle.
[0049] In this application embodiment, there are two scenarios for calculating the expected waiting time:
[0050] Scene 1
[0051] The user determines the number of PLCs, the number of devices to be controlled, and the average uptime percentage. For example, if the user decides to use 3 PLCs to control 5 devices and the average uptime percentage is 0.8, only the device waiting time needs to be calculated. In this case, simply input the above parameters into the formula.
[0052] Scene 2
[0053] The user is unsure of the number of PLCs, the number of devices to be controlled, and the percentage of average running time. For example, the user may not know how many PLCs to select to control the devices, nor how many devices to select to reduce waiting time. In this case, the user can input a range of values for one or more of the following: the number of PLCs, the number of devices to be controlled, and the percentage of average running time. Accordingly, the program in this application determines the range of values for the number of PLCs, the number of devices to be controlled, and the percentage of average running time; based on the range of values and the formula, multiple expected values are determined.
[0054] For example, if the user inputs the number of PLCs: 1-3, the number of devices to be controlled: 5, and the average running time percentage: 8; the calculation result using the aforementioned formula is:
[0055] When using 3 controllers, T = 1.065 ≈ 1 equipment operation cycle. That is, for 5 sets of mechanical parking equipment, using 3 controllers will increase the waiting time of the 5 sets of equipment by about 1 equipment operation cycle during peak hours.
[0056] When two controllers are used, T = 2.007 ≈ 2 equipment operation cycles. That is, for 5 sets of mechanical parking equipment, using two controllers will increase the waiting time of the 5 sets of equipment by about 2 equipment operation cycles during peak hours.
[0057] When using one controller, T = 3.000 ≈ 3 equipment operation cycles. That is, for 5 sets of mechanical parking equipment, using one controller will increase the waiting time of the 5 sets of equipment by about 3 equipment operation cycles during peak hours.
[0058] Step 3: Match the corresponding number of PLCs according to the expected value.
[0059] In this embodiment, for scenario 1, if the user is not satisfied with the expected value, the number of PLCs, the number of devices to be controlled, and the average running time percentage can be adjusted. Then, the aforementioned formula is used to recalculate until the user's requirements are met. Finally, the appropriate number of PLCs is matched according to the corresponding expected value.
[0060] For scenario 2, the minimum expected value is determined from multiple expected values; based on the minimum expected value, the corresponding number of PLCs and the number of devices to be controlled are determined; and based on the determined number of PLCs and the number of devices to be controlled, the appropriate number of PLCs are matched. Furthermore, users can select the appropriate expected value based on actual needs, and this expected value does not necessarily have to be the minimum. For example, in the example of step 2, the user can choose to match 2 PLCs after comprehensively considering cost and efficiency.
[0061] In the existing technology, to ensure equipment operation in the event of a PLC failure, users typically need to prepare some spare PLCs. Based on the above scenario, to maintain work efficiency, it is necessary to replace the faulty PLC promptly. In this embodiment, the system detects the presence of a faulty PLC; when a faulty PLC is found, it automatically connects to another normally functioning PLC, thus maintaining normal equipment operation without replacing the PLC. For example, if three PLCs are currently operating, and one PLC suddenly fails, to ensure work efficiency, one of the two normally functioning PLCs is automatically connected.
[0062] This application provides a device control method apparatus, including: a receiving module, a data processing module, and a control module;
[0063] The receiving module is used to receive external inputs of the number of PLC programmable logic controllers, the number of devices to be controlled, and the average operating time percentage of the devices to be controlled;
[0064] The data processing module is used to determine the expected waiting time of the devices to be controlled based on the number of PLCs, the number of devices to be controlled, and the average running time percentage.
[0065] The control module is used to match a corresponding number of PLCs according to the expected value.
[0066] In this embodiment of the application, the data processing module is used to calculate the expected waiting time of the device to be controlled using the following formula:
[0067]
[0068] Where m represents the number of devices to be controlled, n represents the number of PLCs, p represents the percentage of average running time, and T represents the expected value of waiting time.
[0069] In this embodiment of the application, the data processing module is used to determine the value ranges of the number of PLCs, the number of devices to be controlled, and the average running time percentage; and to determine multiple expected values based on the value ranges and the formula.
[0070] In this embodiment of the application, the control module is used to determine the smallest expected value from the plurality of expected values; determine the corresponding number of PLCs and the number of devices to be controlled based on the smallest expected value; and match the corresponding number of PLCs based on the determined number of PLCs and the number of devices to be controlled.
[0071] This application provides a storage medium for storing computer-executable instructions, which, when executed, implement the methods described in any of the above embodiments.
[0072] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0073] In the 1930s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement to the methodology cannot be implemented using a hardware physical module. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0074] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0075] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0076] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.
[0077] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0078] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0081] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0082] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0083] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0084] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0085] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0086] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0087] The above description is merely an embodiment of this document and is not intended to limit the scope of this document. Various modifications and variations can be made to this document by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this document should be included within the scope of the claims of this document.
Claims
1. A method for controlling a device, characterized in that, include: The PLCs receiving external input include the number of PLCs, the number of devices to be controlled, and the average operating time percentage of the devices to be controlled. The average operating time percentage of the devices to be controlled is the ratio of the device's working time to the total time during a specific period. The number of PLCs is the number required to control the devices to be controlled. The expected waiting time of the devices to be controlled is determined based on the number of PLCs, the number of devices to be controlled, and the average running time percentage. Match the corresponding number of PLCs according to the expected value; The step of determining the expected waiting time of the controlled devices based on the number of PLCs, the number of devices to be controlled, and the average operating time percentage includes: The expected waiting time of the controlled device is calculated using the following formula: Where m represents the number of devices to be controlled, n represents the number of PLCs, p represents the percentage of average running time, T represents the expected value of waiting time, and i-n+1 represents the number of cycles; one cycle is the duration of the PLC's running state in one control cycle.
2. The method according to claim 1, characterized in that, The step of determining the expected waiting time of the controlled devices based on the number of PLCs, the number of devices to be controlled, and the average operating time percentage includes: Determine the value ranges for the number of PLCs, the number of devices to be controlled, and the percentage of average running time, respectively; Based on the range of values and the formula, multiple expected values are determined.
3. The method according to claim 2, characterized in that, The step of matching a corresponding number of PLCs according to the expected value includes: From the plurality of expected values, determine the smallest expected value; Based on the minimum expected value, determine the corresponding number of PLCs and the number of devices to be controlled; Match the appropriate number of PLCs based on the minimum expected value and the number of devices to be controlled.
4. The method according to claim 1, characterized in that, The method further includes: Check for any faulty PLCs; When a faulty PLC is present, the backup PLC is activated based on the number of PLCs corresponding to the expected value and the number of faulty PLCs.
5. A control method or apparatus for a device, characterized in that, include: The module consists of a receiving module, a data processing module, and a control module. The receiving module is used to receive the number of PLCs, the number of devices to be controlled, and the average running time percentage of the devices to be controlled from external input. The average running time percentage of the devices to be controlled is the ratio of the working time of the devices to the total time in a specific period. The number of PLCs is the number required to control the devices to be controlled. The data processing module is used to determine the expected waiting time of the devices to be controlled based on the number of PLCs, the number of devices to be controlled, and the average running time percentage. The control module is used to match a corresponding number of PLCs according to the expected value; The data processing module is used to calculate the expected waiting time of the controlled device using the following formula: Where m represents the number of devices to be controlled, n represents the number of PLCs, p represents the percentage of average running time, T represents the expected value of waiting time, and i-n+1 represents the number of cycles; one cycle is the duration of the PLC's running state in one control cycle.
6. The apparatus according to claim 5, characterized in that, The data processing module is used to determine the value ranges of the number of PLCs, the number of devices to be controlled, and the average running time percentage; and to determine multiple expected values based on the value ranges and the formula.
7. The apparatus according to claim 6, characterized in that, The control module is used to determine the minimum expected value from the plurality of expected values; determine the corresponding number of PLCs and the number of devices to be controlled based on the minimum expected value; and match the corresponding number of PLCs based on the number of PLCs and the number of devices to be controlled corresponding to the minimum expected value.
8. A storage medium, characterized in that, Used to store computer-executable instructions, which, when executed, implement the method of any one of claims 1-4.
Citation Information
Patent Citations
Configuration method, device and apparatus for number of self-service apparatuses in service website
CN111160793A