Digital data acquisition device and method for injection molding industry
Through the combination of computer terminals and IoT intelligent gateways, the industrial control machine communication data packets of the injection molding machine and its auxiliary equipment are analyzed, and the mapping relationship of production data is established, which solves the problems of poor equipment compatibility in the injection molding industry and inaccurate collection of external sensors, and realizes the Unified data collection and accurate collection of different devices have enhanced the support for digitalization and intelligent manufacturing.
Patent Information
- Application Number
- CN202310636738.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-03
AI Technical Summary
The problems of poor equipment compatibility, small amount of data collected by external sensors and inaccurate acquisition of values in the injection molding industry have limited the implementation of digitalization and intelligent manufacturing.
Design a digital data acquisition device including computer terminals and IoT intelligent gateways, connect the industrial control machine to the injection molding machine and its auxiliary equipment through packet capture software and equipment interconnection software, analyze communication data packets, and establish the original address point table of production data and The mapping relationship of MQTT nodes generates configuration files, and realizes data acquisition and integrated control of different brands, models, interfaces, and protocol devices.
It realizes unified and accurate collection of production data of different brands, models, interfaces, and protocol equipment, enhances equipment compatibility, improves the number and accuracy of data acquisition, and avoids the problem of external sensors being affected by the environment.
Smart Images

Figure CN119071313A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of injection molding data collection, and in particular to a digital data collection device and method for the injection molding industry. Background Art
[0002] Digitalization and intelligent manufacturing in the injection molding industry is one of the important directions of industrial development today. It covers all aspects of the manufacturing process, from design, mold manufacturing, injection molding, quality inspection to logistics and distribution. Digital technology and intelligent manufacturing concepts are of great significance to improving production efficiency and product quality.
[0003] Through data collection, various parameters and indicators in the production process can be monitored and controlled in real time, and transmitted to the data analysis system for statistical analysis. This plays a significant role in the production efficiency, quality, safety and other aspects of industrial enterprises.
[0004] However, the injection molding industry is a discrete industry. The brands and models of controllers and auxiliary equipment of various machines vary, and the software and hardware systems are incompatible. Data collection is a complex process that requires the integration of various brands, models, and program versions of industrial computers on the market, and compatibility with various interfaces and protocols. In addition, traditional external sensors are used to collect data from injection molding equipment. Because the equipment has few external interfaces and the external sensors are affected by the external environment, there are problems such as small amount of collected data and inaccurate collected values. Therefore, data collection has become a stumbling block to the realization of digitalization and intelligent manufacturing in the injection molding industry. Summary of the invention
[0005] In view of the problems of poor equipment compatibility, small amount of data collected by external sensors and inaccurate collected values in traditional digital data collection in the injection molding industry, the present invention provides a digital data collection device and method for the injection molding industry, which realizes the collection and integrated control of production data of equipment of different brands, models, interfaces and protocols.
[0006] The solution of the present invention to solve the above technical problems is as follows: construct a digital data acquisition device for the injection molding industry to collect production data of injection molding machines and their auxiliary equipment, and the acquisition device includes a computer terminal and an Internet of Things intelligent gateway.
[0007] The computer terminal is installed with packet capture software and device interconnection software, wherein: the device interconnection software is used to configure the connection between the computer terminal and the injection molding machine and its auxiliary equipment industrial control computer lower computer; the packet capture software is used to capture the data packets communicated between the injection molding machine and its auxiliary equipment industrial control computer upper and lower computers, determine the address of each production data through the packet capture result, establish the mapping relationship between the original address point table of each production data and the MQTT node, and generate the Internet of Things intelligent gateway configuration file;
[0008] The IoT smart gateway is connected to the industrial computer of the injection molding machine and its auxiliary equipment through wired form to collect data on the production site and integrate the production data of equipment of different brands, models, interfaces and protocols; the IoT smart gateway includes the following modules:
[0009] Input module: used to establish a connection with the lower computer of the industrial computer of the injection molding machine and its auxiliary equipment through wired mode, and read the communication data between the upper and lower computers of the industrial computer;
[0010] Parsing module: used to parse the communication data between the upper and lower computers of the industrial computer output by the input module according to the communication protocol of the upper and lower computers of the industrial computer, extract the production data according to the address in the configuration file output by the computer terminal, and when it is detected that the value of the production data has changed, convert the extracted data into the data format of the MQTT protocol to obtain the required MQTT data node. The same parameters of different types of injection molding machines or auxiliary equipment correspond to the same MQTT data node to achieve the unification of data protocols;
[0011] Output module: used to send the data nodes converted by the parsing module to the MQTT server through the MQTT client.
[0012] Preferably, the packet capture software installed on the computer terminal includes serial port packet capture software and network port packet capture software, and the IoT smart gateway needs to support serial port and network port data input.
[0013] Preferably, the software of the IoT smart gateway can be upgraded locally via a USB flash drive, directly connected via a network cable and wirelessly, or remotely upgraded via a wireless connection.
[0014] The present invention also provides a digital data collection method for the injection molding industry, which uses a computer terminal and an Internet of Things intelligent gateway to collect production data of an injection molding machine and its auxiliary equipment, wherein the computer terminal is used to determine the mapping relationship between the original address point table of production data and the MQTT node by capturing packets, and the Internet of Things intelligent gateway is used to collect production data according to the mapping relationship between the original address point table of production data and the MQTT node. The method comprises the following steps:
[0015] S1) Capture the communication data packets of the injection molding machine or auxiliary equipment industrial computer and the upper and lower computers through the computer terminal, parse the data packets, screen the production data, determine the corresponding relationship between each production data and its address, establish the mapping relationship between the original address point table of the injection molding machine or auxiliary equipment and the MQTT node, generate a configuration file, and initialize the configuration of the Internet of Things smart gateway;
[0016] S2) Connect the IoT smart gateway to the injection molding machine or auxiliary equipment industrial computer one-to-one through wired means to collect data on the production site, unify the production data of equipment of different brands, models, interfaces, and protocols into the MQTT protocol, and send it to the MQTT server to achieve integrated management and control.
[0017] Preferably, for the configuration file generated in step S1), the configuration file can be reused for the same model of industrial computers; in the configuration files of injection molding machines or auxiliary equipment of different protocol types, the same parameters correspond to the same MQTT data node to achieve the unification of data protocols.
[0018] Preferably, the specific steps of S2) include:
[0019] S21) The IoT smart gateway is connected to the lower computer of the injection molding machine or the auxiliary equipment industrial computer by wire;
[0020] S22) Power off and restart the injection molding machine or auxiliary equipment, capture the communication data packets between the upper and lower computers of the industrial computer of the injection molding machine or auxiliary equipment, parse the communication data packets according to the communication protocol between the upper and lower computers of the industrial computer, filter out invalid content according to the configuration file generated in S1), detect whether the production data of the corresponding address in the configuration file generated in S1) has changed, and when the value of the production data has changed, convert the data format of the changed value according to the MQTT protocol, package it into MQTT protocol data, and send it to the MQTT server according to the MQTT node mapping relationship.
[0021] Preferably, the specific steps of S1) include:
[0022] S11) connecting the injection molding machine and its auxiliary equipment through a computer terminal, using packet capture software to capture data packets when the equipment is turned on, and saving the captured data packets to the computer terminal;
[0023] S12) Select valuable production data through the upper computer interface of the industrial computer of the injection molding machine or auxiliary equipment, modify the value of the production data, trigger the communication between the upper and lower computers, use the packet capture software to capture the communication message, parse the message, extract the address value and the corresponding production data value, and confirm whether the captured and parsed production data is correct, and record the correspondence between the production data address and the production data name; repeat this step to obtain the correspondence between the address and the production data name of all valuable production data; compare with the data packet captured at the time of startup in step S11) to determine whether any important production data is missing.
[0024] S13) For all the production data screened out in S12), a mapping relationship between the original address point table of the injection molding machine or the auxiliary equipment industrial computer and the MQTT node is established, and the IoT smart gateway is configured.
[0025] Preferably, the step S11) includes:
[0026] S111) physically connecting the injection molding machine or the auxiliary equipment industrial computer to the computer terminal;
[0027] S112) configuring the connection between the computer terminal and the injection molding machine or the auxiliary equipment industrial computer lower computer in the equipment interconnection software;
[0028] S113) Open the packet capture software, set the filtering conditions, and start the message monitoring state;
[0029] S114) The injection molding machine or the auxiliary equipment industrial computer is powered off and restarted to capture the startup data packet.
[0030] Preferably, the S13) specifically refers to searching for annotations, variable types, and units of each valuable production data according to the interface of the injection molding machine or auxiliary equipment industrial computer host computer, combining the correspondence between the production data address and the production data name in the S12), establishing a mapping relationship between the original address point table of the injection molding machine or auxiliary equipment industrial computer and the MQTT node, generating a configuration file, and using the configuration file to configure the Internet of Things smart gateway.
[0031] Preferably, the connection method in step S21) can be RS232, RS485 or RJ45.
[0032] The implementation of the digital data acquisition device and method for the injection molding industry of the present invention can bring the following beneficial effects: by capturing the data packets when the upper computer and the lower computer of the industrial control computer of the injection molding machine and its auxiliary equipment communicate, and then parsing according to the protocol, the data acquisition method of extracting valuable production data is applicable to injection molding machines and their auxiliary equipment of all brands, models, software versions, interfaces and protocols, and the equipment compatibility is strong; the injection molding machine or auxiliary equipment is connected one-to-one with the Internet of Things intelligent gateway, each Internet of Things intelligent gateway collects the production data of one device, and converts the collection results into MQTT protocol data. The same parameters of different types of injection molding machines or auxiliary equipment correspond to the same MQTT data node, realizing the unification of data protocols; the data of all Internet of Things intelligent gateways are finally concentrated to the upper cloud server through the workshop switch, realizing the integrated control of production data; at the same time, because the production data collected is in the internal address of the industrial control computer of the production equipment, it is not limited by the external interface of the equipment, and the amount of production data collected is more than the external sensor collection method; and the production data in the internal address of the industrial control computer of the production equipment is not as easily affected by the external environment as the external sensor data, and the value of the production data is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1It is a schematic diagram of an application scenario of the present invention.
[0034] Figure 2 This is the connection and flow chart of the IoT smart gateway of the present invention.
[0035] Figure 3 This is a diagram of the host computer entity of an embodiment of the present invention.
[0036] Figure 4 This is a physical diagram of the lower computer according to an embodiment of the present invention.
[0037] Figure 5 This is the mapping result diagram of the original address point table and MQTT node of an S7 protocol injection molding machine industrial computer.
[0038] Figure 6 This is a mapping result diagram of the original address point table and MQTT node of an injection molding machine industrial computer using the Modbus protocol.
[0039] Figure 7 This is a schematic diagram of the RJ45 interface connection of the Internet of Things smart gateway of the present invention.
[0040] Figure 8 This is a schematic diagram of the serial port connection of the Internet of Things smart gateway of the present invention. DETAILED DESCRIPTION
[0041] The definition of industrial computer refers to industrial control computer, which is a general term for tools that use bus structure to detect and control production processes, electromechanical equipment and process equipment. Industrial computer has important computer attributes and characteristics, such as computer CPU, hard disk, memory, peripherals and interfaces, operating system, control network and protocol, computing power, friendly human-computer interface such as display screen, touch screen, etc. At present, the main categories of industrial computer are: IPC (PC bus industrial computer), PLC (programmable control system), DCS (distributed control system), FCS (field bus system) and CNC (numerical control system). The control module of the injection molding machine used in the injection molding industry belongs to the industrial computer, and the control module of the auxiliary equipment of the injection molding machine such as dryer, mold temperature controller, suction machine, hot runner, etc. also belongs to the industrial computer.
[0042] Industrial computers are usually divided into upper computers and lower computers. The upper computer refers to a computer that can directly issue control commands, usually a PC, usually with a screen and buttons. The lower computer is a computer that directly controls the equipment to obtain the equipment status, usually a PLC or a single-chip microcomputer. The command issued by the upper computer is first given to the lower computer, and the lower computer then interprets the command into the corresponding timing signal to directly control the corresponding equipment. The lower computer reads the equipment status data (usually analog) from time to time, converts it into a digital signal and feeds it back to the upper computer. The upper and lower computer communication protocols of industrial computers are diverse. Common upper and lower computer communication protocols of industrial computers for injection molding machines include Modbus tcp, Modbus rtu, S7, RS-485, UDP, PROFIBUS, Ethernet, PPI, etc.
[0043] Data acquisition sensors are devices that convert physical quantities in reality into signals that can be recognized by computers and transmit these signals to computers. Data acquisition sensors are widely used in the collection of parameters such as temperature, humidity, pressure, flow, current, and voltage.
[0044] At present, most of the data collection on the market is obtained through sensors, but the industrial computers in the injection molding industry have internal algorithms, which leads to differences between the data obtained by the industrial computers and the data obtained by the sensors. For example, for the temperature parameters of the injection molding machine, the data collected by the external temperature sensor and the equipment industrial computer are quite different. Some production data is stored in the memory of the industrial computer. If no external interface is provided, it cannot be collected through external sensors, such as the SPC data of the first mold of the injection molding machine product and the process data of product debugging.
[0045] In order to present the real and rich real-time data inside the industrial computer of the injection molding industry, in the technical solution of the present invention, no external sensor is connected, but the data packets of the communication between the upper and lower computers inside the industrial computer are captured one by one, and then the valuable real-time production data inside the industrial computer is extracted through protocol analysis, data parsing and data processing. The extracted production data is converted into the MQTT data protocol to obtain the required MQTT data node. The same parameters of different types of injection molding machines or auxiliary equipment correspond to the same MQTT data node to achieve data unification. All the collected production data are finally concentrated on the upper cloud server through the workshop switch, realizing the integrated control of production data.
[0046] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0047] The digital data acquisition device for the injection molding industry provided by the present invention is used to collect production data of an injection molding machine and its auxiliary equipment. The acquisition device includes a computer terminal and an Internet of Things intelligent gateway.
[0048] The computer terminal is installed with packet capture software and device interconnection software, wherein: the device interconnection software is used to configure the connection between the computer terminal and the injection molding machine and its auxiliary equipment industrial control computer lower computer; the packet capture software is used to capture the data packets communicated between the injection molding machine and its auxiliary equipment industrial control computer upper and lower computers, determine the address of each production data through the packet capture result, establish the mapping relationship between the original address point table of each production data and the MQTT node, and generate the Internet of Things intelligent gateway configuration file;
[0049] The IoT smart gateway is connected to the industrial computer of the injection molding machine and its auxiliary equipment through wired form to collect data on the production site and integrate the production data of equipment of different brands, models, interfaces and protocols.
[0050] like Figure 1 The schematic diagram of the application scenario of the present invention is shown, where the IoT smart gateway is connected to the injection molding machine or the injection molding machine auxiliary equipment one-to-one, wherein the upper and lower computer communication protocols of the injection molding machine or the injection molding machine auxiliary equipment include Modbus tcp, Modbus rtu, S7, RS-485, UDP, PROFIBUS, Ethernet, PPI, etc. The IoT smart gateway sends the collected data to the upper workshop edge computing server through the workshop switch, and then reaches the cloud server through the workshop edge computing server. The workshop TV board and mobile terminal obtain data through the cloud server for visual display.
[0051] like Figure 2 The figure shows the connection and flow chart of the IoT smart gateway of the present invention, which includes the following modules:
[0052] Input module: used to establish a connection with the lower computer of the industrial computer of the injection molding machine and its auxiliary equipment through wired mode, and read the communication data between the upper and lower computers of the industrial computer;
[0053] Parsing module: used to parse the communication data between the upper and lower computers of the industrial computer output by the input module according to the communication protocol of the upper and lower computers of the industrial computer, extract the production data according to the address in the configuration file output by the computer terminal, and when it is detected that the value of the production data has changed, convert the extracted data into the data format of the MQTT protocol to obtain the required MQTT data node. The same parameters of different types of injection molding machines or auxiliary equipment correspond to the same MQTT data node to achieve the unification of data protocols;
[0054] Output module: used to send the data nodes converted by the parsing module to the MQTT server through the MQTT client.
[0055] The packet capture software installed on the computer terminal includes serial port packet capture software and network port packet capture software. Common serial port packet capture software includes AccessPort, and common network port packet capture tools include Wireshark packet capture software and TAP packet capture tool plug-in.
[0056] The IoT smart gateway needs to support serial port and network port data input. The embodiment of the present invention uses different IoT smart gateway products to support serial port and network port respectively.
[0057] The software of the IoT smart gateway can be locally upgraded via a USB flash drive, directly connected via a network cable and wirelessly, or remotely upgraded via a wireless connection.
[0058] The present invention also provides a digital data collection method for the injection molding industry, which uses a computer terminal and an Internet of Things intelligent gateway to collect production data of an injection molding machine and its auxiliary equipment. The computer terminal is used to determine the mapping relationship between the original address point table of production data and the MQTT node by capturing packets, and the Internet of Things intelligent gateway is used to collect production data according to the mapping relationship between the original address point table of production data and the MQTT node. The method includes the following steps:
[0059] S1) Capture the communication data packets of the injection molding machine or auxiliary equipment industrial computer and the upper and lower computers through the computer terminal, parse the data packets, screen the production data, determine the corresponding relationship between each production data and its address, establish the mapping relationship between the original address point table of the injection molding machine or auxiliary equipment and the MQTT node, generate a configuration file, and initialize the configuration of the Internet of Things smart gateway;
[0060] S2) Connect the IoT smart gateway to the injection molding machine or auxiliary equipment industrial computer one-to-one through wired means to collect data on the production site, unify the production data of equipment of different brands, models, interfaces, and protocols into the MQTT protocol, and send it to the MQTT server to achieve integrated management and control.
[0061] For the configuration file generated in step S1), the configuration file can be reused for the same model of industrial computers; in the configuration files of injection molding machines or auxiliary equipment of different protocol types, the same parameters correspond to the same MQTT data node to achieve the unification of data protocols.
[0062] The specific steps of S2) include:
[0063] S21) The IoT smart gateway is connected to the lower computer of the injection molding machine or the auxiliary equipment industrial computer by wire;
[0064] S22) Power off and restart the injection molding machine or auxiliary equipment, capture the communication data packets between the upper and lower computers of the industrial computer of the injection molding machine or auxiliary equipment, parse the communication data packets according to the communication protocol between the upper and lower computers of the industrial computer, filter out invalid content according to the configuration file generated in S1), detect whether the production data of the corresponding address in the configuration file generated in S1) has changed, and when the value of the production data has changed, convert the data format of the changed value according to the MQTT protocol, package it into MQTT protocol data, and send it to the MQTT server according to the MQTT node mapping relationship.
[0065] The specific steps of S1) include:
[0066] S11) connecting the injection molding machine and its auxiliary equipment through a computer terminal, using packet capture software to capture data packets when the equipment is turned on, and saving the captured data packets to the computer terminal;
[0067] S12) Select valuable production data through the upper computer interface of the industrial computer of the injection molding machine or auxiliary equipment, modify the value of the production data, trigger the communication between the upper and lower computers, use the packet capture software to capture the communication message, parse the message, extract the address value and the corresponding production data value, and confirm whether the captured and parsed production data is correct, and record the correspondence between the production data address and the production data name; repeat this step to obtain the correspondence between the address and the production data name of all valuable production data; compare with the data packet captured at the time of startup in step S11) to determine whether any important production data is missing.
[0068] S13) For all the production data screened out in S12), a mapping relationship between the original address point table of the injection molding machine or the auxiliary equipment industrial computer and the MQTT node is established, and the IoT smart gateway is configured.
[0069] The step S11) comprises:
[0070] S111) physically connecting the injection molding machine or the auxiliary equipment industrial computer to the computer terminal;
[0071] S112) configuring the connection between the computer terminal and the injection molding machine or the auxiliary equipment industrial computer lower computer in the equipment interconnection software;
[0072] S113) Open the packet capture software, set the filtering conditions, and start the message monitoring state;
[0073] S114) The injection molding machine or the auxiliary equipment industrial computer is powered off and restarted to capture the startup data packet.
[0074] The S13) specifically refers to searching for annotations, variable types, and units of each valuable production data according to the interface of the injection molding machine or auxiliary equipment industrial computer host computer, combining the correspondence between the production data address and the production data name in the S12), establishing a mapping relationship between the original address point table of the injection molding machine or auxiliary equipment industrial computer and the MQTT node, generating a configuration file, and using the configuration file to configure the IoT smart gateway.
[0075] The connection method in step S21) can be RS232, RS485 or RJ45.
[0076] In order to better illustrate the practical application of the present invention, an actual example is provided below for illustration.
[0077] In this example, the data to be collected is the production data of an injection molding machine. The brand of the injection molding machine is Demark from Germany. The upper computer software system of the injection molding machine industrial computer is MCGS touch screen configuration software. Figure 3 The picture shown is the corresponding upper computer, including the panel screen display area, action key area, number key area, direction key area, mode key area, function key area, shortcut key area and electrical switch area; the lower computer is Siemens S7-300 SMART PLC, such as Figure 4 The following is a picture of the corresponding lower computer, including power module, CPU module, communication module, digital input module, digital output module, analog input module, and analog output module. The communication protocol between the upper computer and the lower computer is S7 protocol, and the upper computer and the lower computer are connected through the RJ45 network port.
[0078] First, the communication data packet between the upper and lower computers when the injection molding machine is turned on is captured through the computer terminal, the value of the production data is modified through the UI interface of the industrial computer host computer, and the packet is captured again to confirm the correspondence between the address and name of each production data to complete the initialization configuration of the intelligent gateway.
[0079] The steps to capture the communication data packets of the upper and lower computers of the injection molding machine through the computer terminal are as follows:
[0080] 1) Prepare the computer terminal and connect the lower PLC to the computer through the RJ45 interface. In order to allow the lower computer to be connected to the upper computer and the computer terminal at the same time, you can add a two-way network cable, one end of which is connected to the lower computer, and the other end is connected to the upper computer and the computer terminal. Obtain the IP address of the computer terminal, the IP address and port number of the lower PLC.
[0081] 2) Install KepServer V6.4 and Wireshark packet capture software on the computer terminal.
[0082] 3) Configure the connection between the computer terminal and the lower PLC in KepServer;
[0083] 4) Open the Wireshark packet capture software, set the filtering conditions according to the source IP address and destination IP address, and start the message monitoring state;
[0084] 5) Turn off the power of the injection molding machine and restart it to capture the startup data packet.
[0085] 6) Check the machine status through the upper computer touch screen. After the startup is completed, stop packet capture in the Wireshark packet capture software on the computer terminal and save the captured data packets.
[0086] 7) Analyze the boot data packet through Wireshark. The communication between the upper and lower computers in this example is not a simple TCP communication. After the TCP three-way handshake, it is necessary to send two S7 protocol connection verifications. After two connection verifications, real data interaction is carried out. The upper computer sends a data read request to the lower computer through a read data send message, and the lower computer returns data to the upper computer through a read data return message. The characteristics of the read data send message are that the value of the POSCTR field in the Header part of the seventh layer application layer S7Communication is 1 (indicating Job), and the value of the Function field in the Parameter part is 0x04 (indicating Read Var); the Protocol Data Unit Reference in the Header indicates the data address, the value of the Item count field in the Parameter part is the number of data read, and the Item field part is the transmission size, length, DB value, storage area and address of each data. The characteristics of the read data return message are that the value of the POSCTR field in the Header part of the seventh layer application layer S7Communication is 3 (indicating Ack_Data), and the value of the Function field in the Parameter part is 0x04 (indicating Read Var); the Protocol Data Unit Reference in the Header indicates the data address, the value of the Item count field in the Parameter part is the number of data items returned, and the Data part is the specific data content returned.
[0087] 8) Select valuable production data through the upper computer interface of the industrial computer of the injection molding machine, such as mold adjustment, melt pressure speed back pressure position, mold closing pressure speed position, ejector pressure speed position delay, holding pressure speed time, injection pressure speed time position, seat entry and exit pressure speed delay, mold opening pressure speed position, loosening pressure speed, temperature setting value, temperature upper deviation, temperature lower deviation and other process data, modify the value of production data, trigger the communication between the upper and lower computers, use the packet capture software to capture the communication message, parse the message, extract the address value and the corresponding production data value, and confirm whether the captured and parsed production data is correct, record the corresponding relationship between the production data address and the production data name; repeat this step to obtain the corresponding relationship between the address of all valuable production data and the production data name. Combined with the data packet at the time of startup, confirm whether the value selected from the upper computer interface is missing.
[0088] 9) According to the interface of the injection molding machine's industrial computer host computer, find the annotations, variable types, and units of each valuable production data, and combine the correspondence between the production data address and the production data name to establish the mapping relationship between the original address point table of the injection molding machine or auxiliary equipment industrial computer and the MQTT node, generate a configuration file, and configure the IoT smart gateway. The same model of industrial computers can reuse configuration files. The same parameters in industrial computers with different protocols are eventually mapped to the same MQTT node to achieve data unification. Figure 5 The figure shows the original address point table of an S7 protocol injection molding machine industrial computer and the mapping table of MQTT nodes. The "S7 protocol" column indicates the original address in the S7 protocol injection molding machine industrial computer, the "MQTT data" column indicates the converted collected data value, and the "MQTT node" column indicates the corresponding MQTT node name. Figure 6 The figure shows the original address point table of a Modbus protocol injection molding machine industrial computer and the mapping table of MQTT nodes. The "Modbus address" column indicates the original address in the Modbus protocol injection molding machine industrial computer, the "MQTT data" column indicates the converted collected data value, and the "MQTT node" column indicates the corresponding MQTT node name. The original addresses of the same parameter in the two tables are different, but the MQTT nodes are the same.
[0089] After the initialization configuration of the IoT smart gateway is completed, connect the input end of the IoT smart gateway to the lower computer Siemens S7-300 SMART PLC to start data collection. The specific steps are as follows:
[0090] 1) Establish a physical connection between the IoT smart gateway and the lower computer. In this example, the injection molding machine industrial computer and the lower computer are connected via an RJ45 interface, so an IoT smart gateway that captures RJ45 interface data is selected. The RJ45 interface IoT smart gateway provided in the embodiment of the present invention is equipped with a WAN port and two LAN ports. Figure 7 The figure shows the connection diagram of the RJ45 interface of the IoT smart gateway. Referring to the diagram, the LAN ports of the host computer and the slave computer are respectively connected to a LAN port of the IoT smart gateway.
[0091] 2) Power off and restart the injection molding machine, receive data from the RJ45 interface, and save it to the flash storage area of the IoT smart gateway after receiving it. In the process of receiving data from the RJ45 interface, use the general network communication API to create a socket file descriptor through the socket() interface, bind the network card through the bind() interface, and receive data through the recvform() interface.
[0092] 3) Parse the message according to the protocol. The TPKT header field of the S7 protocol of Siemens PLC consists of four bytes. The first byte is fixed to 0x03, the second byte is fixed to 0x00, and the third and fourth bytes represent the total length of the message bytes. Therefore, the message is parsed by locating to the beginning of 0x0300, and then obtaining the total length of the message bytes through the following third and fourth bytes, and then reading the total length of the message bytes - 4 bytes, which is the end position of the message. Copy the entire message to an array, taking buffer[] as an example, then the message length = 256*buffer[2]+buffer[3], buffer[8] = 0x01 means sending the message, buffer[8] = 0x03 means returning the message, data address = 256*buffer
[11] +buffer
[12] , buffer
[17] = 0x04 means data read instruction, buffer
[17] = 0x05 means data write instruction. In the data sending message and the data returning message, the positions of the data length field and the data content are different. The specific position of each field can be determined by combining the PC packet capture software.
[0093] What needs to be parsed are the read data return message and the write data send message. Other types of messages can be ignored. If the data address is in the configuration file, extract the data value from the message and compare it with the last production data value of the address in the locally saved address data value backup table. If the data value has changed, package the new production data value into MQTT protocol data and send it to the MQTT server according to the MQTT node mapping relationship. If the data address in the read data return message and the write data send message is not in the configuration file, combine the data length to determine whether the read data block contains part of the address in the configuration file. For the address that is included, read the production data value of the address. If there is a change, package the new production data value into MQTT protocol data and send it to the MQTT server according to the MQTT node mapping relationship. Every time the data is updated, the locally saved address data value backup table is synchronously updated.
[0094] 4) Power off and restart, completion of the first mold of the product, parameter modification, configuration import and other events will trigger the data interaction between the upper and lower computers. At this time, if the production data value in the initialization configuration file is modified, it will be detected by the IoT smart gateway and the updated value will be sent to the MQTT server.
[0095] The data collected by the IoT smart gateway is converted into the MQTT protocol and sent to the MQTT server because of the convenience of the MQTT protocol. The MQTT client does not need to be synchronized when sending and receiving information. When there is a data update, the IoT smart gateway can directly publish the MQTT message without worrying about the subsequent processing of the message.
[0096] In the actual production environment, there can be one or more MQTT servers. When there are multiple MQTT servers, each IoT smart gateway can customize which MQTT server to connect to. In order to facilitate production data traceability, the client ID of the IoT smart gateway needs to include information corresponding to the connected device, such as "customer name_device name_number".
[0097] If the upper and lower computers are connected via an RJ45 interface, the TAP packet capture tool plug-in can be used on the computer terminal instead of the Wireshark packet capture software to capture data packets.
[0098] If the upper and lower computers are connected via a serial port, when capturing packets at the computer terminal, it is necessary to connect the lower computer of the central control computer through the serial port. In order to allow the lower computer to be connected to the upper computer and the computer terminal at the same time, it is necessary to add a one-to-two serial port cable, one end of which is connected to the lower computer, and the other end is connected to the upper computer and the computer terminal respectively. To capture packets on the computer, a serial port packet capture tool should be used, such as AccessPort. When using an IoT smart gateway for data collection, a serial IoT smart gateway needs to be selected. The serial IoT smart gateway provided in the embodiment of the present invention is provided with a first serial port COM1 and a second serial port COM2, corresponding to the two serial ports, and 4 serial port indicator lights, namely TX1, RX1, TX2, and RX2. Figure 8 The figure shows the serial port connection diagram of the IoT smart gateway. The RxD and GND pins of the first serial port COM1 of the IoT smart gateway are connected to the RxD pin 2 and GND pin 5 of the serial port of the lower computer respectively, which are used to receive data sent from the upper computer to the lower computer. The RxD pin of the second serial port COM2 is connected to the TxD pin 3 of the serial port of the lower computer, which is used to receive data sent from the lower computer to the upper computer. In order to allow the lower computer to be connected to the upper computer and the IoT smart gateway at the same time, it is necessary to add a one-to-two serial port line, one end of which is connected to the lower computer, and the other end is connected to the upper computer and the IoT smart gateway. When receiving serial port data through the IoT smart gateway, it is necessary to pay attention to the settings of the baud rate, data bit, stop bit and parity check must match the corresponding parameters used when communicating with the upper and lower computers.
[0099] In the embodiments of the present invention, the IoT smart gateway is connected to the injection molding machine or its auxiliary equipment in a one-to-one relationship; the configuration files of the IoT smart gateway of the same model can be reused; the configuration files of IoT smart gateways of different protocols are different; the codes of the data parsing part of IoT smart gateways of different protocols are the same. The software of the IoT smart gateway can be upgraded locally via a USB flash drive, directly connected via a network cable and wirelessly, or remotely via a wireless connection.
[0100] The implementation of the digital data acquisition device and method for the injection molding industry of the present invention can bring the following beneficial effects: by capturing the data packets when the upper and lower computers of the industrial control computers of the injection molding machine and its auxiliary equipment communicate, and then analyzing the data according to the technical solution of the protocol, there is no need for the equipment manufacturer to open the protocol, and it is applicable to injection molding machines and their auxiliary equipment of all brands, models, software versions, interfaces and protocols, and the equipment compatibility is strong; the injection molding machine or the auxiliary equipment is connected one-to-one with the Internet of Things smart gateway, and the data of different protocols are finally converted into the MQTT protocol, realizing the unification of the data protocol; the data of all Internet of Things smart gateways are finally concentrated on the upper cloud server through the workshop switch, realizing the integrated control of production data; at the same time, because the production data collected is in the internal address of the industrial control computer of the production equipment, it is not limited by the external interface of the equipment, and the amount of production data collected is more than that of the external sensor collection method; and the production data in the internal address of the industrial control computer of the production equipment is not as easily affected by the external environment as the external sensor data, and the value of the production data is more accurate.
[0101] The above are only specific implementations of the present invention, which cannot be used to limit the scope of the present invention. Equivalent changes made by ordinary technicians in this technical field based on this creation, as well as changes known to technicians in this field, should still fall within the scope of the present invention.
Claims
1. A digital data acquisition device for the injection molding industry, used to collect production data of injection molding machines and their auxiliary equipment, characterized in that: The digital data acquisition device for the injection molding industry includes: Computer terminals; IoT smart gateway; The computer terminal is installed with packet capture software and device interconnection software, wherein: the device interconnection software is used to configure the connection between the computer terminal and the injection molding machine and its auxiliary equipment industrial control computer lower computer; the packet capture software is used to capture the data packets communicated between the injection molding machine and its auxiliary equipment industrial control computer upper and lower computers, determine the address of each production data through the packet capture result, establish the mapping relationship between the original address point table of each production data and the MQTT node, and generate the Internet of Things intelligent gateway configuration file; The IoT smart gateway is connected to the industrial computer of the injection molding machine and its auxiliary equipment through wired form to collect data on the production site and integrate the production data of equipment of different brands, models, interfaces and protocols; the IoT smart gateway includes the following modules: Input module: used to establish a connection with the lower computer of the industrial computer of the injection molding machine and its auxiliary equipment through wired mode, and read the communication data between the upper and lower computers of the industrial computer; Parsing module: used to parse the communication data between the upper and lower computers of the industrial computer output by the input module according to the communication protocol of the upper and lower computers of the industrial computer, extract the production data according to the address in the configuration file output by the computer terminal, and when it is detected that the value of the production data has changed, convert the extracted data into the data format of the MQTT protocol to obtain the required MQTT data node. The same parameters of different types of injection molding machines or auxiliary equipment correspond to the same MQTT data node to achieve the unification of data protocols; Output module: used to send the data nodes converted by the parsing module to the MQTT server through the MQTT client.
2. The digital data acquisition device for the injection molding industry according to claim 1 is characterized in that: The packet capture software installed on the computer terminal includes serial port packet capture software and network port packet capture software, and the IoT smart gateway needs to support serial port and network port data input.
3. The digital data acquisition device for the injection molding industry according to claim 1 is characterized in that: The software of the IoT smart gateway can be locally upgraded via a USB flash drive, directly connected via a network cable and wirelessly, or remotely upgraded via a wireless connection.
4. A digital data collection method for the injection molding industry, characterized in that: The production data of the injection molding machine and its auxiliary equipment are collected using a computer terminal and an Internet of Things intelligent gateway, wherein the computer terminal is used to determine the mapping relationship between the original address point table of the production data and the MQTT node by capturing packets, and the Internet of Things intelligent gateway is used to collect the production data according to the mapping relationship between the original address point table of the production data and the MQTT node. The method comprises the following steps: S1) Capture the communication data packets of the injection molding machine or auxiliary equipment industrial computer and the upper and lower computers through the computer terminal, parse the data packets, screen the production data, determine the corresponding relationship between each production data and its address, establish the mapping relationship between the original address point table of the injection molding machine or auxiliary equipment and the MQTT node, generate a configuration file, and initialize the configuration of the Internet of Things smart gateway; S2) Connect the IoT smart gateway to the injection molding machine or auxiliary equipment industrial computer one-to-one through wired means to collect data on the production site, unify the production data of equipment of different brands, models, interfaces, and protocols into the MQTT protocol, and send it to the MQTT server to achieve integrated management and control.
5. The method for digital data collection in the injection molding industry according to claim 4, characterized in that: For the configuration file generated in step S1), the configuration file can be reused for the same model of industrial computers; in the configuration files of injection molding machines or auxiliary equipment of different protocol types, the same parameters correspond to the same MQTT data node to achieve the unification of data protocols.
6. The method for digital data collection in the injection molding industry according to claim 4, characterized in that: The specific steps of S2) include: S21) The IoT smart gateway is connected to the lower computer of the injection molding machine or the auxiliary equipment industrial computer by wire; S22) Power off and restart the injection molding machine or auxiliary equipment, capture the communication data packets between the upper and lower computers of the industrial computer of the injection molding machine or auxiliary equipment, parse the communication data packets according to the communication protocol between the upper and lower computers of the industrial computer, filter out invalid content according to the configuration file generated in S1), detect whether the production data of the corresponding address in the configuration file generated in S1) has changed, and when the value of the production data has changed, convert the data format of the changed value according to the MQTT protocol, package it into MQTT protocol data, and send it to the MQTT server according to the MQTT node mapping relationship.
7. The method for digital data collection in the injection molding industry according to claim 4, characterized in that: The specific steps of S1) include: S11) connecting the injection molding machine and its auxiliary equipment through a computer terminal, using packet capture software to capture data packets when the equipment is turned on, and saving the captured data packets to the computer terminal; S12) Select valuable production data through the upper computer interface of the industrial computer of the injection molding machine or auxiliary equipment, modify the value of the production data, trigger the communication between the upper and lower computers, use the packet capture software to capture the communication message, parse the message, extract the address value and the corresponding production data value, and confirm whether the captured and parsed production data is correct, and record the correspondence between the production data address and the production data name; repeat this step to obtain the correspondence between the address and the production data name of all valuable production data; compare with the data packet captured at the time of startup in step S11) to determine whether any important production data is missing; S13) For all the production data screened out in S12), a mapping relationship between the original address point table of the injection molding machine or the auxiliary equipment industrial computer and the MQTT node is established, and the IoT smart gateway is configured.
8. The method for digital data collection in the injection molding industry according to claim 7, characterized in that: The step S11) comprises: S111) physically connecting the injection molding machine or the auxiliary equipment industrial computer to the computer terminal; S112) configuring the connection between the computer terminal and the injection molding machine or the auxiliary equipment industrial computer lower computer in the equipment interconnection software; S113) Open the packet capture software, set the filtering conditions, and start the message monitoring state; S114) The injection molding machine or the auxiliary equipment industrial computer is powered off and restarted to capture the startup data packet.
9. The method for digital data collection in the injection molding industry according to claim 7, characterized in that: The S13) specifically refers to searching for annotations, variable types, and units of each valuable production data according to the interface of the injection molding machine or auxiliary equipment industrial computer host computer, combining the correspondence between the production data address and the production data name in the S12), establishing a mapping relationship between the original address point table of the injection molding machine or auxiliary equipment industrial computer and the MQTT node, generating a configuration file, and using the configuration file to configure the IoT smart gateway.
10. The method for digital data collection in the injection molding industry according to claim 6, characterized in that: The connection method in step S21) can be RS232, RS485 or RJ45.
