Fine-grained acquisition method, equipment and system for equipment action data
By configuring the double buffer zone and preset coding protocol on the programmable logic controller, monitoring the action signals of production line equipment, fine-grained acquisition of equipment action data is realized, solving the problem of insufficient correlation of equipment action data in the prior art, and improving the accuracy and correlation of data.
Patent Information
- Application Number
- CN202510695372.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-05-28
AI Technical Summary
The prior art lacks fine-grained operation data collection of production line equipment, and cannot capture the instantaneous actions of production line equipment, resulting in insufficient correlation between equipment action data and production line equipment actions.
By configuring the double buffer zone and preset coding protocol on the programmable logic controller, the action start and end signals of the production line equipment are monitored, the action recording event is triggered, and the action encoding and timestamp are paired and stored, so that the fine-grained collection of action data is achieved.
The fine-grainedness of equipment action data is improved, the correlation between equipment action data and production line equipment actions is ensured, and event-driven data collection is realized to ensure that each action is recorded in detail.
Smart Images

Figure CN120215453A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital information transmission, and particularly to a method, device, and system for fine-grained acquisition of equipment action data. Background Art
[0002] The data generated in the entire process of product manufacturing on the production line is mainly production management data, which is mainly used to plan the production process, determine the time arrangement and resource allocation of products at each production stage, and ensure the orderly progress of production.
[0003] With the development of intelligent manufacturing technology, the requirements for the fine-grainedness of data by industrial artificial intelligence (AI) are increasing day by day. However, most of the current production management data focuses on macro-level production management and decision support, while ignoring the action details of production line equipment at the micro level, that is, the equipment action data related to the product manufacturing process.
[0004] Specifically, during the manufacturing process of products, the equipment action data of production line equipment is seriously lacking. Even if there is a small amount of equipment action data collection, most of them adopt a fixed-cycle collection mode. This collection method can only determine the key node actions of production line equipment in the production process, but cannot capture its instantaneous actions. Therefore, how to improve the fine-grainedness of equipment action data and ensure the association between equipment action data and the actions of production line equipment is an urgent problem to be solved in this application. Summary of the Invention
[0005] This application provides a method, device, and system for fine-grained acquisition of equipment action data, which improves the fine-grainedness of equipment action data and ensures the association between equipment action data and the actions of production line equipment.
[0006] The first aspect of this application provides a method for fine-grained acquisition of equipment action data. This method is applied to a programmable logic controller, and the method includes:
[0007] When an action start signal or action end signal of the production line equipment is monitored, an action recording event is triggered, and then the action recording event is encoded through a preset encoding protocol to obtain an action code, and the encoding time is obtained according to the trigger time of the action recording event; where the action code is used to indicate the action type of the production line equipment;
[0008] According to the action code and the encoding time, the action recording data of the action recording event is obtained;
[0009] The action recording data is transmitted to a data storage terminal; where the data storage terminal is used to parse the action recording data to obtain the action code and the encoding time, and obtain the equipment action data according to the action code and the encoding time.
[0010] In a possible design, the action recording event is encoded through a preset encoding protocol to obtain an action code, including:
[0011] Determine a target point address from multiple preset point addresses of the programmable logic controller; wherein, the programmable logic controller is used to control the production line equipment to perform an action corresponding to the action type through the target point address;
[0012] Encode the action recording event through the encoding protocol and the target point address to obtain an action code.
[0013] In a possible design, the action recording event is encoded through the encoding protocol and the target point address to obtain an action code, including:
[0014] Obtain the input / output type of the target point address and the level change of the target point address when the action recording event is triggered;
[0015] Obtain a first interval code according to the input / output type, a second interval code according to the target point address, and a third interval code according to the level change;
[0016] Obtain an action code according to the first interval code, the second interval code, and the third interval code.
[0017] In a possible design, for the target point address, when an action start signal or an action end signal of the production line equipment is monitored, an action recording event is triggered, including:
[0018] Continuously monitor the level state of the target point address through the edge trigger mechanism of the point address;
[0019] When it is monitored that the level state of the target point address changes, it is determined that an action start signal or an action end signal of the production line equipment is monitored, and then the action recording event is triggered.
[0020] In a possible design, the level change is obtained according to the change result of the level state of the target point address; the encoding time is obtained through a preset timestamp mechanism according to the time point recorded when the level state of the target point address changes.
[0021] In a possible design, if the programmable logic controller is configured with two buffer areas of the same capacity, then transmitting the action recording data to the data storage terminal includes:
[0022] Designate one of the two buffer areas that is not full as the primary buffer area, and designate the other buffer area of the two buffer areas as the backup buffer area;
[0023] Write the action recording data into the primary buffer area;
[0024] When the primary buffer is full, transfer the data written in the primary buffer to the data storage terminal;
[0025] Exchange the specified results of the primary buffer and the secondary buffer.
[0026] In a possible design, the data storage terminal is specifically configured to store the data recorded at the start of an action and the data recorded at the end of an action in pairs according to the triggering order of the action recording events; wherein, the data recorded at the start of an action includes the action type and the encoding time corresponding to the action start signal, and the data recorded at the end of an action includes the action type and the encoding time corresponding to the action end signal.
[0027] In a possible design, an equipment action data table is pre-stored in the data storage terminal, and the action types of the data recorded at the start of an action and the data recorded at the end of an action are preset in the equipment action data table;
[0028] Then the data storage terminal is specifically configured to write the encoding time corresponding to each action type into the equipment action data table.
[0029] The second aspect of the present application provides a fine-grained acquisition device for equipment action data, and the device includes:
[0030] A programmable logic controller, configured to execute the fine-grained acquisition method for equipment action data in the first aspect.
[0031] The third aspect of the present application provides a fine-grained acquisition system for equipment action data, and the system includes:
[0032] The fine-grained acquisition device for equipment action data as in the second aspect, and a data storage terminal and multiple production line equipments that are communicatively connected to the fine-grained acquisition device for equipment action data.
[0033] A fine-grained acquisition method, device and system for equipment action data provided by the present application. The method includes: when an action start signal or an action end signal of a production line equipment is monitored, triggering an action recording event, then encoding the action recording event through a preset encoding protocol to obtain an action code, and obtaining an encoding time according to the triggering time of the action recording event; obtaining action recording data of the action recording event according to the action code and the encoding time; transmitting the action recording data to a data storage terminal; the data storage terminal is used for parsing the action recording data to obtain the action code and the encoding time, and obtaining equipment action data according to the action code and the encoding time. The following technical effects are achieved: the programmable logic controller converts the actions of the production line equipment into digital action codes and encoding times through action recording events and an encoding protocol, improves the fine-grained degree of the equipment action data, and ensures the association between the equipment action data and the actions of the production line equipment; the programmable logic controller triggers the action recording events of each action by monitoring the action start signal or the action end signal, realizes event-driven data acquisition, and ensures that each action of the production line equipment is recorded in detail. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.
[0035] Figure 1 It is a schematic diagram of the scenario of the fine-grained acquisition method for equipment action data provided by the embodiment of the present application;
[0036] Figure 2 It is a schematic diagram of the system architecture of the programmable logic controller provided by the embodiment of the present application;
[0037] Figure 3 It is a schematic flow chart of the fine-grained acquisition method for equipment action data provided by the embodiment of the present application Figure 1 ;
[0038] Figure 4 It is a schematic flow chart of the fine-grained acquisition method for equipment action data provided by the embodiment of the present application Figure 2 。
[0039] REFERENCE MARKS:
[0040] 110 - Production line equipment; 120 - Programmable logic controller; 121 - Point address; 122 - Data recording module; 123 - Buffer; 130 - Data storage terminal; 140 - Data analysis terminal. Detailed Implementation Modes
[0041] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation modes described in the following exemplary embodiments do not represent all implementation modes consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0042] In the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily mean different. It should be noted that in the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner. In the present application, "at least one" means one or more, and "a plurality" means two or more.
[0043] It should be noted that "when... " in the present application can be at the instant when a certain situation occurs or within a period of time after a certain situation occurs. The present application does not make specific limitations on this. In addition, a method for fine-grained collection of equipment operation data provided in the present application is only an example, and the method for fine-grained collection of equipment operation data may also include more or less content. The user information (including but not limited to user device information and user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards, and corresponding operation entrances are provided for the user to choose to authorize or refuse.
[0044] For the convenience of clearly describing the technical solutions of the present application, the following briefly introduces some terms and technologies involved in the present application:
[0045] Industrial Artificial Intelligence: It refers to the application of artificial intelligence technology in the industrial field to optimize manufacturing processes, improve quality control, predict maintenance needs and enhance supply chain efficiency, etc. Industrial AI uses technical means such as machine learning, deep learning and data analysis to analyze and process production data, so as to provide support for decision-making.
[0046] Programmable Logic Controller (PLC): It refers to a digital computing operation electronic system designed specifically for industrial production environments, mainly used to control various types of electromechanical processes or devices. PLCs can perform a series of operations such as logic, sequence, timing, and counting through programming to adapt to different production requirements.
[0047] To clearly understand the technical solution of this application, the solutions of the prior art will be introduced in detail first.
[0048] In the context of the deep advancement of the manufacturing industry towards digitization and intelligentization, the data generated in the entire process of product manufacturing on the production line has grown exponentially, mainly production management data. Production management data is mainly used to plan the production process and determine the time arrangement and resource allocation of products at each production stage to ensure the orderly progress of production.
[0049] With the development of intelligent manufacturing technology, the requirements of industrial AI for the fine-grainedness of data are increasing day by day. However, most of the current production management data focuses on production management and decision support at the macroscopic level, while ignoring the action details of production line equipment at the microscopic level, that is, the equipment action data related to the product manufacturing process.
[0050] Specifically, during the product manufacturing process, the equipment action data of production line equipment is severely lacking. Even if there is a small amount of equipment action data collection, it mostly adopts a fixed-cycle collection mode (for example, collecting once per second). This collection method can only determine the key node actions of production line equipment in the production process, but cannot capture its instantaneous actions (such as the operation timing of the robotic arm and the sensor trigger record). In this case, it is difficult to form a complete equipment operation timing chain, resulting in insufficient integrity and accuracy of the data.
[0051] Due to the lack of an effective association between sufficient equipment action data and the actions of production line equipment, when industrial artificial intelligence conducts equipment pre-diagnosis, it is difficult to accurately predict equipment failures due to insufficient data support and cannot take maintenance measures in advance, which may lead to production interruptions and increase production costs. At the same time, when industrial artificial intelligence conducts efficiency analysis, it cannot comprehensively evaluate the operating efficiency and collaborative effects of each production line equipment in the production process, limiting the maximum improvement of production efficiency.
[0052] In summary, the current methods for collecting and storing equipment action data can no longer meet the needs of the development of intelligent manufacturing. Therefore, how to improve the fine-grainedness of equipment action data and ensure the association between equipment action data and the actions of production line equipment is an urgent problem to be solved in this application.
[0053] Therefore, in response to the above problems, it was found in the research that to solve this problem, first, two buffer areas with the same capacity are configured on the PLC, and a fine-grained data acquisition method driven by events is adopted. When the production line equipment starts or ends an operation, the PLC records the system time and pairs the operation code with the time stamp and stores them in the currently active buffer area. The dual-buffer design allows one buffer area to be automatically switched to another when it is full, and at the same time, the data in the full-load buffer area is sent to the data storage terminal. At the same time, at the data storage terminal, the received data is parsed according to the pre-defined coding protocol and saved in pairs according to the start and end of the operation.
[0054] Based on the above creative findings, the technical solution of this application is proposed.
[0055] The following introduces the application scenarios of the fine-grained acquisition method for equipment operation data provided by this application.
[0056] Figure 1 It is a schematic diagram of the scenario of the fine-grained acquisition method for equipment operation data provided by an embodiment of this application. It should be noted that Figure 1 The example shown is only an example of the scenario where this application can be applied to help those skilled in the art understand the technical content of this application, but it does not mean that this application cannot be used in other devices, systems, environments or scenarios.
[0057] As Figure 1 shown, the application scenario includes: a plurality of production line equipment 110, a programmable logic controller 120, a data storage terminal 130, and a data analysis terminal 140.
[0058] The production line equipment 110 is used to perform preset operations to complete the corresponding production line product manufacturing process. Exemplarily, in a wheel hub processing production line, for the drilling process of the wheel hub, the production line equipment 110 may include a conveyor belt, a clamping device, a drilling device, and a machine vision positioning device. Among them, the clamping device realizes the stable clamping of the wheel hub through the expansion and contraction of the cylinder, so the clamping device includes a fixture cylinder, an intake hole solenoid valve and an exhaust hole solenoid valve controlled by the programmable logic controller 120; these two valves are respectively responsible for supplying gas to and exhausting gas from the cylinder to realize the clamping and releasing actions.
[0059] The programmable logic controller 120 is simultaneously communicatively connected to a plurality of production line equipment 110. The programmable logic controller 120 can be an integrated PLC or a modular PLC, etc. according to the structural form classification; it can be a small PLC, a medium PLC or a large PLC, etc. according to the input / output (I / O) point scale classification; it can be a general-purpose PLC, a high-performance PLC or a safety-type PLC, etc. according to the functional characteristics classification.
[0060] Figure 2This is a schematic diagram of the system architecture of the programmable logic controller provided by the embodiments of the present application. As Figure 1 and Figure 2 shown, the programmable logic controller 120 serves as the core data source of the production line and is used to execute the fine-grained acquisition method of the equipment action data in the embodiments of the present application. Specifically, a plurality of point addresses 121 are configured on the programmable logic controller 120. Each production line equipment 110, or a component of each production line equipment 110 (in the above example, the production line equipment 110 is a clamping device, and the components of the production line equipment 110 are the intake hole solenoid valve and the exhaust hole solenoid valve), is connected to at least one point address 121. Then, the programmable logic controller 120 is used to control the corresponding production line equipment 110 to execute preset actions through these point addresses 121. When the production line equipment 110 starts or ends an action, the corresponding point address 121 is triggered. For example, when the action execution starts, the point address 121 is triggered by a rising edge (Positive, P), that is, a change from low level to high level; when the action execution ends, the point address 121 is triggered by a falling edge (Negative, N), that is, a change from high level to low level.
[0061] A data recording module 122 is also configured on the programmable logic controller 120. The data recording module 122 records the timestamp of each action signal trigger and the corresponding action code to ensure that each action recording event has a unique identifier.
[0062] A buffer 123 is also configured on the programmable logic controller 120, which is used to temporarily store the data generated by the data recording module to ensure that the data can be transmitted to the data storage terminal 130 orderly even under high load conditions.
[0063] The data storage terminal 130 is communicatively connected to the programmable logic controller 120, and it can be a dedicated data server or a cloud storage service. The data storage terminal 130 is used to parse and store the data transmitted by the programmable logic controller 120, and finally form complete equipment action data.
[0064] The data analysis terminal 140 is communicatively connected to the data storage terminal 130, and it can be a dedicated data server or a cloud storage service. An industrial AI is installed on the data analysis terminal 140, which is used to perform equipment pre-diagnosis and / or efficiency analysis on multiple production line equipments 110 according to the equipment action data stored in the data storage terminal 130.
[0065] In other application scenarios, the data storage terminal 130 and the data analysis terminal 140 can be two independent physical servers, or different virtual partitions of the same physical server.
[0066] In other application scenarios, the number of programmable logic controllers 120 is multiple, and each programmable logic controller 120 is used to execute the fine-grained acquisition method of the equipment action data in the above embodiments. Then, the data storage terminal 130 stores the equipment action data corresponding to each programmable logic controller 120 at the same time.
[0067] In other application scenarios, the number of data storage terminals 130 is multiple, and the programmable logic controller 120 transmits data to each data storage terminal 130 simultaneously. Then, each data storage terminal 130 stores the equipment action data.
[0068] The technical solution of the present application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings of the specification.
[0069] Figure 3 Schematic flow of the fine-grained acquisition method of the equipment action data provided by the embodiments of the present application Figure 1 As Figure 3 shown, in the embodiments of the present application, the execution subject can be a programmable logic controller. Then, the fine-grained acquisition method of the equipment action data provided by the embodiments of the present application includes the following steps:
[0070] S301. When a start signal or an end signal of the action of the production line equipment is monitored, an action recording event is triggered. Then, the action recording event is encoded through a preset encoding protocol to obtain an action code, and the encoding time is obtained according to the triggering time of the action recording event.
[0071] Specifically, the start signal and the end signal of the action are electrical signals or other forms of signals sent by the production line equipment or directly by the programmable logic controller, indicating the start or end of the action of a certain production line equipment. For example, in the above example, when the machine vision instrument detects that the hub reaches the specified position, it sends a start signal of the clamping device's action to the programmable logic controller, and the programmable logic controller controls the clamping device to clamp the hub; when the drilling equipment completes the drilling work of the hub, it sends an end signal of the clamping device's action to the programmable logic controller, and the programmable logic controller controls the clamping device to release the hub. Another example is that in the above example, when the programmable logic controller controls the clamping device to clamp the hub according to the preset program, it is determined that the start signal of the clamping device's action is monitored, and when it controls the clamping device to release the hub, it is determined that the end signal of the clamping device is monitored.
[0072] When the programmable logic controller monitors the above signals, it will trigger an action recording event and start the data recording actions for action encoding and encoding time. Specifically, once the action recording event is triggered, the programmable logic controller encodes this event through a preset encoding protocol, generates an action encoding, and records the encoding time when the action occurs. Among them, the encoding protocol is a set of predefined rules used to convert the action type into an action encoding in digital or character form and associate it with the occurrence time. The encoding protocol not only converts the action type into an easily processed form but also ensures compatibility between different systems and data consistency. The action encoding is used to indicate the action type of the production line equipment, such as the clamping action and drilling action in the above example; the encoding time is the exact time point of the action recording event, usually accurate to the second or even millisecond level.
[0073] S302. Obtain the action recording data of the action recording event according to the action encoding and encoding time.
[0074] Specifically, the action recording data is a set of information containing the action encoding and its corresponding encoding time, which is the basic data for further analysis.
[0075] S303. Transmit the action recording data to the data storage terminal.
[0076] Specifically, the programmable logic controller transmits the generated action recording data to the data storage terminal. The transmission process can be real-time, that is, for each generated action recording data, the programmable logic controller transmits it to the data storage terminal; the transmission process can also be periodic, that is, the programmable logic controller first stores the generated action recording data in its own buffer area, and then transmits it to the data storage terminal uniformly at fixed time intervals or when the buffer area is full.
[0077] After receiving the action recording data, the data storage terminal is used to parse the action recording data to obtain the action encoding and encoding time. Specifically, according to the above preset encoding protocol or other encoding protocols, the action encoding is converted into an understandable action type, such as specific actions like clamping, releasing, and drilling. At the same time, the accurate timestamp corresponding to this action type, that is, the encoding time, is extracted from the action recording data.
[0078] The data storage terminal is also used to obtain the equipment action data according to the action encoding and encoding time. Specifically, the data storage terminal stores the action encoding or the action type it indicates, as well as its corresponding encoding time. Through this associated storage method, the equipment action data is obtained.
[0079] Further, to ensure the accuracy and logic of the data, the data storage terminal stores the data in the trigger order of the action record events. This means that the data corresponding to the action start signal of a certain action is stored before the data corresponding to the action end signal of that action. Meanwhile, during the storage process, the action type and its corresponding encoding time are saved simultaneously. This method helps to clearly understand the occurrence time and type of each action during subsequent analysis.
[0080] Further, the data storage terminal can store the action type and the encoding time based on the action type, that is, the data storage terminal stores the action type and the encoding time corresponding to the action start signal and the action end signal of each action together; or, the data storage terminal can also store the action type and the encoding time based on the encoding time. If the encoding time of an action is before that of another action, this order will also be maintained in the final storage result.
[0081] A fine-grained acquisition method for equipment action data provided by an embodiment of the present application includes: when an action start signal or an action end signal of a production line equipment is monitored, triggering an action record event, then encoding the action record event through a preset encoding protocol to obtain an action code, and obtaining an encoding time according to the trigger time of the action record event; obtaining action record data of the action record event according to the action code and the encoding time; transmitting the action record data to a data storage terminal; the data storage terminal is used to parse the action record data to obtain the action code and the encoding time, and obtain equipment action data according to the action code and the encoding time. The following technical effects are achieved: The programmable logic controller converts the actions of the production line equipment into digital action codes and encoding times through the action record events and the encoding protocol, improving the fine-grainedness of the equipment action data and ensuring the association between the equipment action data and the actions of the production line equipment; the programmable logic controller triggers the action record events of each action by monitoring the action start signal or the action end signal, realizing event-driven data acquisition and ensuring that every action of the production line equipment is recorded in detail.
[0082] Figure 4 Schematic flow of the fine-grained acquisition method for equipment action data provided by an embodiment of the present application Figure 2 As Figure 4 shown, the fine-grained acquisition method for equipment action data provided by an embodiment of the present application is a further refinement based on the fine-grained acquisition method for equipment action data provided by an Figure 3 embodiment. The fine-grained acquisition method for equipment action data provided by this embodiment of the application includes the following steps.
[0083] S401. Trigger an action recording event when an action start signal or an action end signal of the production line equipment is monitored.
[0084] S402. Determine a target point address from multiple preset point addresses of the programmable logic controller.
[0085] Specifically, multiple preset point addresses are configured on the programmable logic controller, and each preset point address corresponds to a specific action or state of the production line equipment. Then, the multiple preset point addresses of the programmable logic controller are associated with different actions or states. This step requires selecting one of these preset point addresses as the target point address. The programmable logic controller is used to control the production line equipment to perform the action corresponding to the action type through the target point address.
[0086] After executing S402, encode the action recording event through an encoding protocol and the target point address to obtain an action code. Specifically, combine the data corresponding to the action recording event with the point address through a preset encoding protocol and the selected target point address to generate a unique action code. This action code not only contains an indication of the action type but also implicitly associates with specific hardware resources. Then this step includes:
[0087] S403. Obtain the input / output type of the target point address and the level change of the target point address when the action recording event is triggered.
[0088] Specifically, the input / output type refers to the functional attribute of the target point address in the programmable logic controller, that is, whether this point is used to receive external signals, i.e., input, or to send control instructions, i.e., output. This determines how the point interacts with external devices. The level change refers to the change in the voltage state of the target point address, usually manifested as a conversion between high and low levels. The level change can be used to represent the action recording event corresponding to the action start signal or the action end signal.
[0089] Then, obtaining the input / output type of the target point address can clarify whether it is used as an input or an output during the data acquisition process; at the same time, monitor the level change of the target point address when the action recording event is triggered.
[0090] S404. Obtain a first interval code according to the input / output type, a second interval code according to the target point address, and a third interval code according to the level change.
[0091] Specifically, a first interval code is generated according to the obtained input / output type, and this code reflects the functional characteristics of the target point address; a second interval code is generated according to the information of the target point address itself, and this code helps to identify which specific hardware resource is activated; a third interval code is generated according to the level change pattern, and this code describes the specific electrical state change when the action occurs.
[0092] S405. Obtain an action code according to the first interval code, the second interval code, and the third interval code.
[0093] Specifically, the first interval code, the second interval code, and the third interval code obtained in the above steps are merged to form a complete action code. This code synthesizes all relevant information of the input / output type, the specific point address, and the level change, and can accurately describe an action record event.
[0094] After executing S405, continue to execute S406.
[0095] S406. Obtain an encoding time according to the trigger time of the action record event.
[0096] S407. Obtain the action record data of the action record event according to the action code and the encoding time.
[0097] S408. Transmit the action record data to the data storage terminal.
[0098] The technical effect of the embodiment of this application is that: an action code is generated according to the target point address, its input / output type, and the level change, so that each action record event not only contains the information of the action type, but also is associated with the specific hardware resource and the electrical state change, improving the accuracy and uniqueness of the action record and reducing the possibility of misjudgment.
[0099] In a possible design, for the target point address, S401 includes:
[0100] S4011. Continuously monitor the level state of the target point address through the edge trigger mechanism of the point address.
[0101] Specifically, the edge trigger mechanism of the point address is a method for detecting the change of the input signal, and particularly focuses on the rising edge trigger and the falling edge trigger of the signal level. For a programmable logic controller, through this mechanism, the state transition of a specific hardware resource can be accurately captured.
[0102] S4012. When it is monitored that the level state of the target point address changes, it is determined that the action start signal or the action end signal of the production line equipment is monitored.
[0103] S4013. Trigger the action record event.
[0104] Specifically, based on the change in the level state, the programmable logic controller interprets this change as the action start signal and action end signal of the production line equipment, and then triggers the action record event. For example, a rising edge trigger may indicate the start of an action, while a falling edge trigger may indicate the end of an action.
[0105] In a possible design, the level change is obtained according to the change result of the level state of the target point address.
[0106] Specifically, for example, when the change result of the level state indicates a change from low level to high level, the level change is a rising edge trigger, and the third area code is defined as 0; when the change result of the level state indicates a change from high level to low level, the level change is a falling edge trigger, and the third area code is defined as 1.
[0107] The encoding time is obtained through a preset timestamp mechanism based on the time point recorded when the level state of the target point address changes.
[0108] Specifically, the timestamp mechanism is a method for recording the exact time when an event occurs. By providing information about the time dimension for data, it makes the processing and analysis of data more orderly and efficient. For the pulse width modulation (PWM) signal of the change result of the level state, since its time period is at the millisecond (ms) and microsecond (us) levels, timer interrupts can be used to accurately record the time points of its rising edge and falling edge. Specifically, in the PWM signal, by recording the time points of the rising edge and falling edge, the high level time and the total period can be calculated, thus achieving accurate recording of the level state.
[0109] The technical effect of the embodiment of the present application is: by triggering the action record event through the change result of the level state, it can quickly and accurately respond to any level change at the point address, ensuring that every action of the production line equipment can be captured in time.
[0110] In a possible design, the programmable logic controller is configured with two buffer areas of the same capacity. A buffer area refers to the area in the programmable logic controller used to temporarily store data. Then S405 includes:
[0111] S4051. Designate one of the two buffer areas that is not full as the primary buffer area, and designate the other buffer area as the secondary buffer area.
[0112] Specifically, the primary buffer refers to the buffer that is currently designated for writing new action record data. Specifically, when a new action record event is triggered, the action record data is written to this buffer. The secondary buffer is opposite to the primary buffer. It is not directly used for writing new action record data in the current cycle, but is prepared to be converted into the primary buffer when needed. The settings of the primary buffer and the secondary buffer ensure that there is always an available buffer to store new action record data.
[0113] S4052: Write the action record data to the primary buffer.
[0114] S4053: When the primary buffer is full, transfer the data written in the primary buffer to the data storage terminal.
[0115] Specifically, all new action record data is written into the currently designated primary buffer until the buffer reaches its capacity limit. At this time, the data stored in the primary buffer will be in the form of data packets and transmitted to a more permanent data storage terminal for storage through a general industrial network protocol such as the User Datagram Protocol (UDP) to free up the space of this buffer.
[0116] S4054: Exchange the designated results of the primary buffer and the secondary buffer.
[0117] Specifically, when the primary buffer is full, the original primary buffer becomes the new secondary buffer, and the original secondary buffer becomes the new primary buffer.
[0118] The technical effect of the embodiment of this application is that through double-buffer alternating transmission, while not affecting the collection of action record data, it alleviates the instantaneous network load pressure, avoids data congestion, and improves the stability of the programmable logic controller operation.
[0119] In a possible design, the data storage terminal is specifically used to store the action start record data and the action end record data in pairs according to the trigger order of the action record events.
[0120] Specifically, the action start record data includes the action type and the encoding time corresponding to the action start signal. The action end record data is similar to the action start record data and includes the action type and the encoding time corresponding to the action end signal.
[0121] Whenever an action starts and the corresponding action record event for recording data is triggered, the corresponding action end record data for recording data will also be captured in pairs. These two related records will be stored together in the data storage terminal while maintaining their chronological order unchanged. Each pair of records will contain the action start record data and the corresponding action end record data.
[0122] The technical effect of the embodiment of this application is that the data storage terminal stores the action type and encoding time according to the trigger order of the action record events, improving the accuracy and logic of the equipment action data.
[0123] In a possible design, an equipment action data table is pre-stored in the data storage terminal, and the action types of the action start record data and the action end record data are preset in the equipment action data table.
[0124] Then the data storage terminal is specifically configured to write the encoding time corresponding to each action type into the equipment action data table.
[0125] The following is a specific case of the drilling process for the hub in the hub processing production line provided by the embodiment of this application. This case includes the following steps.
[0126] The first step: Obtain the action code and encoding time based on the triggered action record event.
[0127] The encoding protocol of the action code adopts a 5-bit encoding rule. The first area encoding is classified according to the input / output type of the target point address. When the point is an input, the first area encoding is defined as 1; when the point is an output, the first area encoding is defined as 0. The second area encoding is classified for the 2nd to 4th bits of the target point address, and the second area encoding is defined as the target point address itself. The last area encoding is classified according to the level change of the target point address. When the level change is triggered by a rising edge, the third area encoding is defined as 0; when the level change is triggered by a falling edge, the third area encoding is defined as 1.
[0128] Table 1 is the action code table for the cylinder to clamp and release the hub provided by the embodiment of this application. As shown in Table 1, when the cylinder clamps and releases the hub, the action code is expressed as:
[0129] Table 1
[0130]
[0131] When the hub release starts, the programmable logic controller transmits a release start instruction to the exhaust hole solenoid valve of the clamping device. The point address corresponding to this instruction is configured as an output signal, so its first area encoding is 0; the start of hub clamping is similar, and its first area encoding is also 0.
[0132] After the exhaust hole solenoid valve of the clamping device performs the corresponding action and lasts for a period of time, or when the monitoring device such as the pressure sensor equipped on the clamping device detects that the hub release has ended successfully, the clamping device determines that the hub release has ended and transmits an instruction to the programmable logic controller. The point address corresponding to this instruction is configured as an input signal, and its first area code is 1; the hub clamping end is similar, and its first area code is also 1.
[0133] Step 2: According to the action code and the coding time, obtain the action record data of the action record event. The programmable logic controller temporarily stores these action record data.
[0134] Table 2 is the storage data table of the programmable logic controller provided by the embodiment of the present application. As shown in Table 2, N groups of action codes and coding times, and their storage forms in the programmable logic controller are expressed as:
[0135] Table 2
[0136]
[0137] Step 3: Transmit the action record data to the data storage terminal, and the data storage terminal stores the action type and the coding time to obtain the equipment action data.
[0138] Table 3 is the equipment action data table provided by the embodiment of the present application. As shown in Table 3, the storage form of the equipment action data table in the data storage terminal is expressed as:
[0139] Table 3
[0140]
[0141] Among them, the start time refers to the coding time corresponding to the action start signal, and the end time refers to the coding time corresponding to the action end signal.
[0142] Furthermore, in the whole process of product manufacturing on the production line, the actions of the production line equipment are predefined and will not be easily changed. Therefore, the equipment action data table can be pre-stored in the data storage terminal, and the contents of the first 3 columns in the table, that is, the action type column, the variable name column of the action type, and the coding time column, can also be preset. After the data storage terminal parses the action record data, it only needs to write the parsed coding time to the position corresponding to the variable name column of the coding time.
[0143] The embodiment of the present application also provides a fine-grained acquisition device for equipment action data. This device includes: a programmable logic controller, which is used to execute the fine-grained acquisition method of equipment action data in the above method embodiment.
[0144] The fine-grained acquisition device for equipment action data provided by the embodiments of the present application can execute Figures 3 to 4 the technical solutions of the method embodiments shown in Figures 3 to 4 which are similar to the method embodiments shown in
[0145] The embodiments of the present application also provide a fine-grained acquisition system for equipment action data. The system includes: a fine-grained acquisition device for equipment action data as in the above device embodiments, and a data storage terminal and multiple production line equipments communicatively connected to the fine-grained acquisition device for equipment action data.
[0146] The fine-grained acquisition system for equipment action data provided by the embodiments of the present application is similar to Figure 1 the application scenarios shown in Figures 3 to 4 and the fine-grained acquisition device for equipment action data of the system can execute Figures 3 to 4 the technical solutions of the method embodiments shown in
[0147] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the drawings. However, those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A fine-grained acquisition method for equipment action data, characterized in that, When the method is applied to a programmable logic controller, the method includes: When an action start signal or an action end signal of a production line equipment is monitored, an action recording event is triggered, and then the action recording event is encoded through a preset encoding protocol to obtain an action code, and an encoding time is obtained according to the triggering time of the action recording event; wherein, the action code is used to indicate the action type of the production line equipment; According to the action code and the encoding time, action recording data of the action recording event is obtained; The action recording data is transmitted to a data storage terminal; wherein, the data storage terminal is used to analyze the action recording data to obtain the action code and the encoding time, and obtain equipment action data according to the action code and the encoding time.
2. The fine-grained acquisition method of equipment action data according to claim 1, characterized in that The encoding the action recording event through a preset encoding protocol to obtain an action code includes: Determine a target point address from multiple preset point addresses of the programmable logic controller; wherein, the programmable logic controller is used to control the production line equipment to execute an action corresponding to the action type through the target point address; Encode the action recording event through the encoding protocol and the target point address to obtain the action code.
3. The fine-grained acquisition method of equipment action data according to claim 2, characterized in that The encoding the action recording event through the encoding protocol and the target point address to obtain the action code includes: Obtain the input / output type of the target point address and the level change of the target point address when the action recording event is triggered; Obtain a first interval code according to the input / output type, obtain a second interval code according to the target point address, and obtain a third interval code according to the level change; Obtain the action code according to the first interval code, the second interval code and the third interval code.
4. The fine-grained acquisition method of equipment action data according to claim 3, characterized in that For the target point address, the triggering an action recording event when an action start signal or an action end signal of a production line equipment is monitored includes: Continuously monitor the level state of the target point address through an edge triggering mechanism of the point address; When it is monitored that the level state of the target point address changes, it is determined that an action start signal or an action end signal of the production line equipment is monitored, and then the action recording event is triggered.
5. The fine-grained acquisition method of equipment action data according to claim 4, characterized in that The level change is obtained according to the change result of the level state of the target point address; the encoding time is obtained through a preset timestamp mechanism according to the time point recorded when the level state of the target point address changes.
6. The method for fine-grained acquisition of equipment action data according to any one of claims 1 to 5, characterized in that When the programmable logic controller is configured with two buffer areas of the same capacity, the transmitting the action recording data to a data storage terminal includes: Designate an unfilled buffer area among the two buffer areas as the primary buffer area, and designate the other buffer area among the two buffer areas as the secondary buffer area; Write the action recording data into the primary buffer area; When the primary buffer area is filled, transmit the data written in the primary buffer area to the data storage terminal; Exchange the specified results of the primary buffer and the secondary buffer.
7. The fine-grained acquisition method of equipment action data according to any one of claims 1 to 5, characterized in that, The data storage terminal is specifically configured to store the data recorded at the start of the action and the data recorded at the end of the action in pairs according to the trigger order of the action recording event; wherein, the data recorded at the start of the action includes the action type and the encoding time corresponding to the action start signal, and the data recorded at the end of the action includes the action type and the encoding time corresponding to the action end signal.
8. The fine-grained acquisition method of equipment action data according to claim 7, characterized in that An equipment action data table is pre-stored in the data storage terminal, and the action types of the data recorded at the start of the action and the data recorded at the end of the action are preset in the equipment action data table. Then the data storage terminal is specifically configured to write the encoding time corresponding to each action type into the equipment action data table.
9. A fine-grained acquisition device for equipment action data, characterized in that, The device includes: A programmable logic controller for executing the fine-grained acquisition method of the equipment action data according to any one of claims 1 to 8.
10. A fine-grained acquisition system for equipment action data, characterized in that, The system includes: The fine-grained acquisition device for equipment action data according to claim 9, and a data storage terminal and a plurality of production line equipments that are communicatively connected to the fine-grained acquisition device for equipment action data.
Citation Information
Patent Citations
Log file encoding, analyzing and storing method and device
CN110362547A
Processor performance event dynamic monitoring method based on simulation
CN110688289A
Automatic line production task dynamic scheduling method
CN111650895A
Log recording method and device applied to small-capacity storage area and medium
CN112199053A
Bottleneck station searching method, system and device and storage medium
CN114326640A