Data control method, device, storage medium and terminal device based on PLC equipment
By splitting the closed-loop program of the PLC device into a minimum closed-loop action and adding monitoring logic code, the security automation control and physical security protection of the PLC device are realized, which solves the problem that PLC device data cannot be safely automated and automated execution, and improves the safety of the device Sex and flexibility.
Patent Information
- Application Number
- CN202210234521.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-10
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-03-10
AI Technical Summary
When applying digital twin technology on the manufacturing side, the PLC device side data cannot safely and automatically execute the decision-making control instructions after simulation analysis, and the existing equipment control logic instructions cannot be interrupted or changed process actions when executing, which can easily lead to physical safety injuries.
By splitting the closed-loop program of the minimum work task into the execution program of the minimum closed-loop operation, and inserting monitoring logic code between the logic blocks, detecting the triggering conditions in real time, triggering the execution of the next logical block when the conditions are met, otherwise the PLC device will be suspended and the work will be avoided Safety damage caused by physical brake of emergency stop button.
It realizes the safety and automation control of PLC equipment, avoids physical safety damage, improves the safety and flexibility of the equipment, and allows self-test and safe interruption during execution.
Smart Images

Figure CN114594723B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic communication technology, and in particular to the field of data control technology based on PLC equipment, and in particular to a data control method, device, storage medium and terminal device based on PLC equipment. Background Art
[0002] When applying digital twin technology on the manufacturing side, it is currently only possible to relatively safely input data from the PLC device side to the twin system, and realize the twin system's collection and simulation analysis of device data. It is impossible to input the decision-making control instructions made after simulation analysis to the equipment for safe and automated execution.
[0003] The execution of the current equipment control PLC instructions is usually triggered once the PLC equipment completes a task, and is executed continuously until the current task is completed. For example, the handling robot arm equipment is started to carry a material from A to X height, and then turns Y angle clockwise to B, and the robot arm returns to position A. This kind of logic control instruction and control instruction connection is based on an overall closed loop of a work task. To start execution, the entire closed loop logic must be fully executed before it ends. If there is a need to interrupt or change the execution process action, it can only be achieved immediately by physically cutting off the sensor power or operating the software on site, which will cause physical safety damage to the equipment due to inertia and pulses. Summary of the invention
[0004] The embodiments of the present application provide a data control method, apparatus, storage medium and terminal device based on PLC equipment, which splits the minimum work task closed-loop program into the execution program of the minimum closed-loop action and keeps it in a minimum logic block together with the control parameters, and adds a monitoring logic code that allows real-time variables between the program logic blocks between the minimum closed-loop actions, so as to detect whether the preset trigger condition is met at the end of the execution of the previous logic block, and trigger the subsequent logic block to start execution when the preset trigger condition is met. When there is a logic block that does not meet the preset trigger condition, the current logic block will control the PLC equipment to suspend work based on its own safety control strategy, which is different from the physical brake of the emergency stop button, so as to avoid physical safety damage to the PLC equipment.
[0005] On the one hand, an embodiment of the present application provides a data control method based on a PLC device, including:
[0006] Loading a preset control program, wherein the control program includes a plurality of logic units associated together in an execution order, and inserting a monitoring logic code between two adjacent logic units, wherein the monitoring logic code is used to detect whether a preset trigger condition is satisfied when the execution of the preceding logic unit ends, and triggering the subsequent logic unit to start execution when the preset trigger condition is satisfied;
[0007] The multiple logic units are executed in sequence according to the execution order, and the PLC device is controlled to suspend operation when any of the logic units fails to meet the preset trigger condition.
[0008] In the data control method based on the PLC device described in the embodiment of the present application, the method further includes:
[0009] Receiving a parameter modification request based on a digital twin system that is pre-communicatively connected with the PLC device;
[0010] Parsing the parameter modification request to obtain control parameters;
[0011] The preset trigger condition is modified according to the control parameter.
[0012] In the data control method based on PLC equipment described in the embodiment of the present application, the same control parameters issued by the digital twin system at different times are overwritten without performing time series accumulation control.
[0013] In the data control method based on PLC equipment described in the embodiment of the present application, the digital twin system modifies the control parameters of the preset trigger condition in real time through the system interface. After the control parameters are changed, it will only take effect on the judgment of the most recent preset trigger condition.
[0014] In the data control method based on a PLC device described in an embodiment of the present application, when a certain logic unit does not meet the preset trigger condition, controlling the PLC device to suspend operation includes:
[0015] When there is a certain logic unit that does not meet the preset trigger condition, the PLC device is controlled to pause based on the safety control strategy corresponding to the preset trigger condition.
[0016] In the data control method based on the PLC device described in the embodiment of the present application, the method further includes:
[0017] When there is a certain logic unit that meets the preset trigger condition, the subsequent logic unit is controlled to be triggered and executed after a preset time interval.
[0018] In the data control method based on a PLC device described in an embodiment of the present application, the PLC device is a robotic arm.
[0019] Accordingly, another aspect of the embodiment of the present application further provides a data control device based on a PLC device, comprising:
[0020] A loading module, used to load a preset control program, wherein the control program includes a plurality of logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units, wherein the monitoring logic code is used to detect whether a preset trigger condition is satisfied when the execution of the preceding logic unit ends, and trigger the subsequent logic unit to start execution when the preset trigger condition is satisfied;
[0021] The execution module is used to execute the multiple logic units in sequence according to the execution order, and control the PLC device to suspend operation when there is a logic unit that does not meet the preset trigger condition.
[0022] Correspondingly, another aspect of the embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the data control method based on a PLC device as described above.
[0023] Correspondingly, on the other hand, an embodiment of the present application further provides a terminal device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the data control method based on the PLC device as described above.
[0024] The embodiment of the present application provides a data control method, apparatus, storage medium and terminal device based on PLC equipment. The method loads a preset control program, wherein the control program includes multiple logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units. The monitoring logic code is used to detect whether a preset trigger condition is met when the execution of the previous logic unit ends, and trigger the subsequent logic unit to start execution when the preset trigger condition is met; the multiple logic units are executed in sequence according to the execution order, and the PLC equipment is controlled to suspend operation when any of the logic units does not meet the preset trigger condition. The embodiment of the present application splits the minimum work task closed-loop program into the execution program of the minimum closed-loop action and maintains it in a minimum logic block together with the control parameters. A monitoring logic code that allows real-time variables is added between the program logic blocks between the minimum closed-loop actions to detect whether the preset trigger condition is met at the end of the execution of the previous logic block, and triggers the subsequent logic block to start execution when the preset trigger condition is met. When a certain logic block does not meet the preset trigger condition, the current logic block will control the PLC device to suspend work based on its own safety control strategy. Different from the physical brake of the emergency stop button, it avoids physical safety damage to the PLC device. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0026] Figure 1 A flow chart of a data control method based on a PLC device provided in an embodiment of the present application.
[0027] Figure 2 A schematic diagram of the structure of a data control device based on a PLC device provided in an embodiment of the present application.
[0028] Figure 3 Another structural schematic diagram of a data control device based on a PLC device provided in an embodiment of the present application.
[0029] Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0031] The embodiment of the present application provides a data control method based on a PLC device, and the data control method based on a PLC device can be applied to a terminal device, which can be a computer or other device.
[0032] When applying digital twin technology on the manufacturing side, it is currently only possible to relatively safely input data from the PLC device side to the twin system, and realize the twin system's collection and simulation analysis of device data. It is impossible to input the decision-making control instructions made after simulation analysis to the equipment for safe and automated execution.
[0033] The execution of the current equipment control PLC instructions is usually triggered once the PLC equipment completes a task, and is executed continuously until the current task is completed. For example, the handling robot arm equipment is started to carry a material from A to X height, and then turns Y angle clockwise to B, and the robot arm returns to position A. This kind of logic control instruction and control instruction connection is based on an overall closed loop of a work task. To start execution, the entire closed loop logic must be fully executed before it ends. If there is a need to interrupt or change the execution process action, it can only be achieved immediately by physically cutting off the sensor power or operating the software on site, which will cause physical safety damage to the equipment due to inertia and pulses.
[0034] In order to solve the above technical problems, the embodiment of the present application provides a data control method based on PLC equipment. Using the data control method based on PLC equipment provided by the embodiment of the present application, the minimum work task closed-loop program is split into the execution program of the minimum closed-loop action and maintained in a minimum logic block with the control parameters. A monitoring logic code that allows real-time variables is added between the program logic blocks between the minimum closed-loop actions to detect whether the preset trigger condition is met at the end of the execution of the previous logic block, and trigger the subsequent logic block to start execution when the preset trigger condition is met. When there is a logic block that does not meet the preset trigger condition, the current logic block will control the PLC device to suspend work based on its own safety control strategy, which is different from the physical brake of the emergency stop button to avoid physical safety damage to the PLC device.
[0035] See also Figure 1 , Figure 1 A flow chart of a data control method based on a PLC device provided in an embodiment of the present application. The data control method based on a PLC device is applied to a terminal device. The method may include the following steps:
[0036] Step 101, load a preset control program, wherein the control program includes a plurality of logic units associated together in an execution order, and inserts a monitoring logic code between two adjacent logic units, wherein the monitoring logic code is used to detect whether a preset trigger condition is met at the end of execution of a previous logic unit, and trigger the subsequent logic unit to start execution when the preset trigger condition is met.
[0037] In this embodiment, multiple logic units can be used to start PLC equipment such as a robotic arm, control the robotic arm to carry a material from A to a height of X, turn clockwise at an angle of Y to B, and the robotic arm returns to position A. Each process of the robotic arm is controlled by a logic unit. This solution can detect in real time whether the previous logic unit execution meets the preset trigger condition when the action ends by splitting the original closed-loop control program into an execution program of the minimum closed-loop action and maintaining it in a minimum logic unit with the control parameters, and inserting a monitoring logic code between two adjacent logic units. When the preset trigger condition is met, the subsequent logic unit is triggered to start execution. Once a certain logic unit does not meet the preset trigger condition, the current logic block will control the PLC device to suspend work based on its own safety control strategy. Different from the control program used in the prior art, which is based on an overall closed-loop program, once the program starts to execute, the entire closed-loop logic must be fully executed before it ends. For example, once the trigger condition is met, the robotic arm will execute the control instructions such as clamping, lifting, and turning without interruption. During the execution process, when emergency stop and safety protection active shutdown control instructions are executed, the execution of the program cannot be guaranteed to be safely interrupted. Generally, physical measures are directly used to terminate the mechanical movement, which will cause physical impact on the equipment and damage the safety of the equipment. That is, the existing technology lacks a monitoring link for the control node, and it is impossible to perform a self-check operation after completing a process, resulting in low safety.
[0038] Step 102: execute the plurality of logic units in sequence according to the execution order, and control the PLC device to suspend operation when any of the logic units fails to meet the preset trigger condition.
[0039] In this embodiment, multiple logic units are executed in sequence according to the execution order, and the execution results of each logic unit are monitored at the same time. When there is a logic unit that does not meet the preset trigger condition, the PLC device is controlled to pause based on the safety control strategy corresponding to the preset trigger condition.
[0040] In some embodiments, the method further comprises:
[0041] Receiving a parameter modification request based on a digital twin system that is pre-communicatively connected with the PLC device;
[0042] Parsing the parameter modification request to obtain control parameters;
[0043] The preset trigger condition is modified according to the control parameter.
[0044] In this embodiment, the control parameter in the preset trigger condition is a variable (set to Boolean type, default is yes) that can be defined in real time by the external system (i.e., the digital twin system), and participates in controlling whether to continue the next minimum action program when the minimum action program logic is executed. The control parameter only plays a role in the judgment of the necessary conditions being met outside the minimum action program, and is not allowed to become the abnormal signal input judgment of the protection program. The same control parameter issued by the digital twin at different times is overwritten, and no timing accumulation control is performed.
[0045] The digital twin system makes real-time parameter changes (yes / no) to control parameters through the system interface (OPC UA, http, etc.). After the parameters are changed, only the most recent trigger condition judgment will be effective, and the control instructions participate as necessary incomplete conditions for the execution of the PLC program.
[0046] In some embodiments, the method further comprises:
[0047] When there is a certain logic unit that meets the preset trigger condition, the subsequent logic unit is controlled to be triggered and executed after a preset time interval.
[0048] In this embodiment, the logic unit behind the control is triggered to execute after a preset time interval, so that it has a delay, allowing the device to execute after the inertia is released, which greatly reduces the physical safety damage of the device.
[0049] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0050] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.
[0051] As can be seen from the above, the data control method based on PLC equipment provided in the embodiment of the present application is through loading a pre-set control program, wherein the control program includes multiple logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units, and the monitoring logic code is used to detect whether the preset trigger condition is met at the end of the execution of the previous logic unit, and trigger the subsequent logic unit to start execution when the preset trigger condition is met; the multiple logic units are executed in sequence according to the execution order, and when there is a logic unit that does not meet the preset trigger condition, the PLC device is controlled to suspend work. By utilizing the data control method based on PLC equipment provided in the embodiment of the present application, the minimum work task closed-loop program is split into the execution program of the minimum closed-loop action and maintained in a minimum logic block together with the control parameters. A monitoring logic code that allows real-time variables is added between the program logic blocks between the minimum closed-loop actions to detect whether the preset trigger condition is met at the end of the execution of the previous logic block, and to trigger the subsequent logic block to start execution when the preset trigger condition is met. When a certain logic block does not meet the preset trigger condition, the current logic block will control the PLC device to suspend work based on its own safety control strategy. This is different from the physical brake of the emergency stop button, so as to avoid physical safety damage to the PLC device.
[0052] The embodiment of the present application further provides a data control device based on a PLC device, and the data control device based on a PLC device can be integrated in a terminal device, which can be a smart phone, a tablet computer, or other device.
[0053] See also Figure 2 , Figure 2 A schematic diagram of the structure of a data control device based on a PLC device provided in an embodiment of the present application. The data control device 30 based on a PLC device may include:
[0054] A loading module 31 is used to load a preset control program, wherein the control program includes a plurality of logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units, wherein the monitoring logic code is used to detect whether a preset trigger condition is satisfied when the execution of the previous logic unit ends, and trigger the subsequent logic unit to start execution when the preset trigger condition is satisfied;
[0055] The execution module 32 is used to execute the multiple logic units in sequence according to the execution order, and control the PLC device to suspend operation when there is a logic unit that does not meet the preset trigger condition.
[0056] In some embodiments, the device also includes a modification module for receiving a parameter modification request based on a digital twin system that is pre-communicatively connected to the PLC device; parsing the parameter modification request to obtain a control parameter; and modifying the preset trigger condition according to the control parameter.
[0057] In some embodiments, the same control parameters issued by the digital twin system at different times are overwritten without performing timing accumulation control.
[0058] In some embodiments, the digital twin system modifies the control parameters of the preset trigger condition in real time through the system interface. After the control parameters are changed, it will only take effect on the judgment of the most recent preset trigger condition.
[0059] In some embodiments, the execution module 32 is used to control the PLC device to pause based on the safety control strategy corresponding to the preset trigger condition when there is a certain logic unit that does not meet the preset trigger condition.
[0060] In some embodiments, the device further includes a delay module, which is used to control the subsequent logical unit to be triggered and executed after a preset time interval when there is a certain logical unit that meets the preset trigger condition.
[0061] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.
[0062] As can be seen from the above, the data control device 30 based on the PLC device provided in the embodiment of the present application loads a preset control program through the loading module 31, wherein the control program includes multiple logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units, and the monitoring logic code is used to detect whether the preset trigger condition is met at the end of the execution of the previous logic unit, and trigger the subsequent logic unit to start execution when the preset trigger condition is met; the execution module 32 executes the multiple logic units in sequence according to the execution order, and controls the PLC device to suspend work when there is a logic unit that does not meet the preset trigger condition.
[0063] See also Figure 3 , Figure 3Another structural diagram of a data control device based on a PLC device provided in an embodiment of the present application, the data control device based on a PLC device 30 includes a memory 120, one or more processors 180, and one or more application programs, wherein the one or more application programs are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a loading module 31 and an execution module 32. For example, the structure and connection relationship of the above components may be as follows:
[0064] The memory 120 can be used to store applications and data. The applications stored in the memory 120 include executable codes. The applications can be composed of various functional modules. The processor 180 executes various functional applications and data processing by running the applications stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.
[0065] The processor 180 is the control center of the device, and uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the device and processes data by running or executing applications stored in the memory 120, and calling data stored in the memory 120, so as to monitor the device as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs.
[0066] Specifically in this embodiment, the processor 180 will load the executable code corresponding to the process of one or more applications into the memory 120 according to the following instructions, and the processor 180 will run the application stored in the memory 120 to implement various functions:
[0067] A loading module 31 is used to load a preset control program, wherein the control program includes a plurality of logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units, wherein the monitoring logic code is used to detect whether a preset trigger condition is satisfied when the execution of the previous logic unit ends, and trigger the subsequent logic unit to start execution when the preset trigger condition is satisfied;
[0068] The execution module 32 is used to execute the multiple logic units in sequence according to the execution order, and control the PLC device to suspend operation when there is a logic unit that does not meet the preset trigger condition.
[0069] In some embodiments, the device also includes a modification module for receiving a parameter modification request based on a digital twin system that is pre-communicatively connected to the PLC device; parsing the parameter modification request to obtain a control parameter; and modifying the preset trigger condition according to the control parameter.
[0070] In some embodiments, the same control parameters issued by the digital twin system at different times are overwritten without performing timing accumulation control.
[0071] In some embodiments, the digital twin system modifies the control parameters of the preset trigger condition in real time through the system interface. After the control parameters are changed, it will only take effect on the judgment of the most recent preset trigger condition.
[0072] In some embodiments, the execution module 32 is used to control the PLC device to pause based on the safety control strategy corresponding to the preset trigger condition when there is a certain logic unit that does not meet the preset trigger condition.
[0073] In some embodiments, the device further includes a delay module, which is used to control the subsequent logical unit to be triggered and executed after a preset time interval when there is a certain logical unit that meets the preset trigger condition.
[0074] The embodiment of the present application also provides a terminal device, which can be a smart phone, a computer, a tablet computer, or other device.
[0075] See also Figure 4 , Figure 4 The schematic diagram of the structure of the terminal device provided in the embodiment of the present application is shown, and the terminal device can be used to implement the data control method based on the PLC device provided in the above embodiment. The terminal device 1200 can be a smart phone or a tablet computer.
[0076] like Figure 4 As shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 4 The structure of the terminal device 1200 shown in the figure does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0077] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 110 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks.
[0078] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data control method based on the PLC device in the above embodiment. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. The vibration reminder mode can be automatically selected according to the current scene of the terminal device to perform data control based on the PLC device, which can not only ensure that scenes such as meetings are not disturbed, but also ensure that users can perceive incoming calls, thereby improving the intelligence of the terminal device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the terminal device 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0079] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 131), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 131 may include a touch detection device and a touch controller. The touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, other input devices 132 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0080] The display unit 140 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal device 1200, which may be composed of graphics, text, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 4 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.
[0081] The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the terminal device 1200 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; As for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the terminal device 1200, they will not be repeated here.
[0082] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 1200. The audio circuit 160 can transmit the received audio data to the speaker 161 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the processor 180 for processing, and then sent to another terminal through the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earplug jack to provide communication between an external headset and the terminal device 1200.
[0083] The terminal device 1200 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Figure 4 The transmission module 170 is shown, but it is understandable that it is not a necessary component of the terminal device 1200 and can be omitted as needed without changing the essence of the invention.
[0084] The processor 180 is the control center of the terminal device 1200. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the terminal device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.
[0085] The terminal device 1200 also includes a power supply 190 for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can realize functions such as managing discharge and power consumption. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0086] Although not shown, the terminal device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 also includes a memory 120 and one or more programs, wherein one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. One or more programs include instructions for performing the following operations:
[0087] A loading instruction is used to load a preset control program, wherein the control program includes multiple logic units associated together in an execution order, and a monitoring logic code is inserted between two adjacent logic units, and the monitoring logic code is used to detect whether a preset trigger condition is met when the previous logic unit is executed, and trigger the subsequent logic unit to start execution when the preset trigger condition is met.
[0088] An execution instruction is used to execute the multiple logic units in sequence according to the execution order, and control the PLC device to suspend operation when there is a logic unit that does not meet the preset trigger condition.
[0089] In some embodiments, the program also includes modification instructions for receiving a parameter modification request based on a digital twin system that is pre-communicatively connected to the PLC device; parsing the parameter modification request to obtain a control parameter; and modifying the preset trigger condition according to the control parameter.
[0090] In some embodiments, the same control parameters issued by the digital twin system at different times are overwritten without performing timing accumulation control.
[0091] In some embodiments, the digital twin system modifies the control parameters of the preset trigger condition in real time through the system interface. After the control parameters are changed, it will only take effect on the judgment of the most recent preset trigger condition.
[0092] In some embodiments, the execution instruction is used to control the PLC device to pause based on a safety control strategy corresponding to the preset trigger condition when a certain logic unit fails to meet the preset trigger condition.
[0093] In some embodiments, the program further includes a delay instruction for controlling a subsequent logic unit to be triggered and executed after a preset time interval when there is a certain logic unit that meets the preset trigger condition.
[0094] The embodiment of the present application also provides a terminal device, which can be a smart phone, a computer, or other device.
[0095] As can be seen from the above, the embodiment of the present application provides a terminal device 1200, and the terminal device 1200 performs the following steps:
[0096] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the data control method based on the PLC device described in any of the above embodiments.
[0097] It should be noted that, for the data control method based on PLC device described in the present application, ordinary testers in the field can understand that the whole or part of the process of implementing the data control method based on PLC device described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in the memory of the terminal device, and executed by at least one processor in the terminal device, and the execution process may include the process of the embodiment of the data control method based on PLC device. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
[0098] For the data control device based on the PLC device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.
[0099] The above is a detailed introduction to the data control method, device, storage medium and terminal device based on PLC equipment provided by the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data control method based on PLC equipment, characterized in that: include: Loading a preset control program, wherein the control program includes a plurality of logic units associated together in an execution order, and inserting a monitoring logic code between two adjacent logic units, wherein the monitoring logic code is used to detect whether a preset trigger condition is satisfied when the execution of the preceding logic unit ends, and triggering the subsequent logic unit to start execution when the preset trigger condition is satisfied; Execute the multiple logic units in sequence according to the execution order, and control the PLC device to suspend operation when any of the logic units fails to meet the preset trigger condition; Receiving a parameter modification request based on a digital twin system that is pre-communicatively connected with the PLC device; Parsing the parameter modification request to obtain control parameters; Modify the preset trigger condition according to the control parameter; The same control parameters issued by the digital twin system at different times are overwritten without sequential accumulation control; The digital twin system modifies the control parameters of the preset trigger condition in real time through the system interface. After the control parameters are changed, it will only take effect on the judgment of the most recent preset trigger condition.
2. The data control method according to claim 1, characterized in that: When a certain logic unit fails to meet the preset trigger condition, controlling the PLC device to suspend operation includes: When there is a certain logic unit that does not meet the preset trigger condition, the PLC device is controlled to pause based on the safety control strategy corresponding to the preset trigger condition.
3. The data control method according to claim 1, characterized in that: The method further comprises: When there is a certain logic unit that meets the preset trigger condition, the subsequent logic unit is controlled to be triggered and executed after a preset time interval.
4. The data control method according to claim 3, characterized in that: The PLC device is a robotic arm.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the data control method based on a PLC device as described in any one of claims 1 to 4.
6. A terminal device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the data control method based on a PLC device as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Sequence stepping control system based on PLC
CN107765630A
Fluidized bed boiler operation optimization method and system based on digital twinning
CN113339787A
