Controller, field device, control method and distributed system

By setting the first offline IP address in the controller's identification message, the IP address management and allocation of the field device is directly completed in one identification message, the problem of field device startup delay in the distributed system is solved and the equipment is improved startup performance.

CN119493397APending Publication Date: 2025-02-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311052661.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In a distributed system, when the field device starts, it is necessary to identify the device identifier and set a unique online IP address through multiple message interactions, resulting in an increase in startup delay and reducing the device's startup performance.

Method used

By setting the first offline IP address in the identification message of the controller, the IP address management and allocation of the field device is realized, and the number of packet interactions is reduced, and the device query and IP address setting are directly completed in one identification message.

Benefits of technology

It reduces the startup delay of the field equipment, improves the startup performance of the equipment, reduces the number of packet interactions, and improves the processing performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493397A_ABST
    Figure CN119493397A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a controller, field equipment, a control method and a distributed system, and is applied to the technical field of industrial field equipment control management. An offline IP address corresponding to at least one field device is stored in the controller. The controller is configured to send an identification message to the at least one field device. The identification message comprises a first device identifier. The first device identification is for indicating a first field device of the at least one field device. The identification message is used to query the first field device. A first reply message is received from the first field device. The first response message is used for indicating that the first field device exists. When the identification message further comprises the first offline IP address, the identification message is further used for indicating the first field device to set the first offline IP address as the online IP address of the first field device. The first offline IP address is an offline IP address corresponding to the first field device in the first file. According to the embodiment, the starting time delay of the field equipment is reduced through the operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automation equipment control, and in particular to a controller, a field device, a control method and a distributed system. Background Art

[0002] In the application of industrial automation, the automatic control of industrial sites can be realized based on distributed systems. In the distributed system, at least one controller, at least one field device and at least one detector are included. In actual engineering operations, the field devices can be controlled and managed by the controller, and the field devices can be debugged or diagnosed by the detector.

[0003] In order to ensure the normal operation of the distributed system, each field device needs to have a unique Internet Protocol (IP) address. Therefore, when each field device is started, the controller needs to identify the device ID of each field device and set a unique online IP address for the identified field device. In this process, the controller needs to interact with the field device multiple times to identify the device ID of the field device that is running and start, and set a unique online IP address. The process of multiple message interactions will increase the delay of the field device startup, thereby reducing the startup performance of the field device. Summary of the invention

[0004] The embodiments of the present application provide a controller, a field device, a control method and a distributed system, which reduce the startup delay of the field device and improve the startup performance of the field device.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a controller in which a first file is stored. The first file includes an offline IP address corresponding to at least one field device. The controller is used to: send an identification message to at least one field device. The identification message includes a first device identifier. The first device identifier is used to indicate a first field device among at least one field device. The identification message is used to: query the first field device. Receive a first response message from the first field device. The first response message is used to indicate: the first field device exists. When the identification message also includes the first offline IP address, the identification message is also used to: instruct the first field device to set the first offline IP address to the online IP address of the first field device. The first offline IP address is the offline IP address corresponding to the first field device in the first file.

[0007] In the embodiment of the present application, the first field device is a field device in the startup phase. By setting the first offline IP address in the identification message, a query is made with one identification message to see whether the first field device exists, and the online IP address is set for the first field device. The number of messages exchanged during the startup of the first field device is reduced, thereby reducing the startup delay of the field device and improving the startup performance of the field device.

[0008] In a possible implementation, when the identification message includes the first offline IP address, the identification message also includes a storage identification field. When the storage identification field is a first value, the identification message is specifically used to: instruct the first field device to set the first offline IP address to the first online IP address of the first field device. The first online IP address is an online IP address valid for the first field device during the current startup operation phase. When the storage identification field is a second value, the identification message is specifically used to: instruct the first field device to set the first offline IP address to the second online IP address of the first field device; the second online IP address is an online IP address valid for the first field device during the current startup operation phase and subsequent startup operation phases. In an embodiment of the present application, a storage identification field is added to the identification message. Different types of online IP addresses are set by the value of the storage identification field. Among them, the first online IP address is a temporary IP address, that is, after the first field device started this time loses power, the online IP address becomes invalid when the first field device is subsequently started. The second online IP address is a permanent IP address, that is, after the first field device started this time loses power, in the subsequent startup phase of the first field device, the valid online IP address can still be maintained when the first field device works normally.

[0009] In a possible implementation, the first response message includes at least one of an online IP address, a first device identifier, and a MAC address of the first field device. In an embodiment of the present application, after the first field device processes the identification message, it can feed back the first response message to the controller. At the same time, the controller can be informed of relevant device information about the first field device through the first response message, such as the online IP address, the first device identifier, and the MAC address of the first field device.

[0010] In a possible implementation, the controller is further used to: send a setting message to the first field device when the first offline IP address is not included in the identification message. The setting message is used to: instruct the first field device to set the first offline IP address as the online IP address of the first field device. A second response message is received from the first field device; the second response message is used to indicate that the setting message has been executed. In an embodiment of the present application, in a scenario where the identification message including the first offline IP address is used to manage and allocate the IP address of the field device, the present solution can also be compatible with a solution that uses an identification message that does not include the first offline IP address and a setting message that includes the first offline IP address to manage and allocate the IP address of the field device.

[0011] In a second aspect, an embodiment of the present application further provides a field device, which is used to: receive an identification message from a controller. The identification message includes a first device identifier. The first device identifier is used to indicate a first field device of at least one field device. The identification message is used to: query the first field device. When the field device is the first field device: send a first response message to the controller according to the identification message. The first response message is used to indicate: the first field device exists. If the identification message also includes a first offline IP address, the first offline IP address is set as the online IP address of the first field device.

[0012] In a possible implementation, when the identification message includes the first offline IP address, the identification message also includes a storage identification field. The field device is specifically used to: when the storage identification field is a first value, set the first offline IP address as the first online IP address of the first field device according to the identification message. The first online IP address is an online IP address valid for the current startup operation phase of the first field device. When the storage identification field is a second value, set the first offline IP address as the second online IP address of the first field device according to the identification message. The second online IP address is an online IP address valid for the current startup operation phase and subsequent startup operation phases of the first field device.

[0013] In a possible implementation, the first response message includes at least one of an online IP address, a first device identifier, and a MAC address of the first field device.

[0014] In a possible implementation, the field device is further configured to: when the first offline IP address is not included in the identification message, receive a setting message from the controller. The setting message is used to indicate: the first offline IP address is set as the online IP address of the first field device. According to the setting message, the first offline IP address is set as the online IP address of the first field device, and a second response message is sent to the controller. The second response message is used to indicate that the setting message has been executed.

[0015] In a third aspect, an embodiment of the present application further provides a control method, which is executed by a controller. A first file is stored in the controller. The first file includes an offline IP address corresponding to at least one field device. The method includes: sending an identification message to at least one field device. The identification message includes a first device identifier. The first device identifier is used to indicate a first field device among at least one field device. The identification message is used to: query the first field device. Receive a first response message from the first field device. The first response message is used to indicate: the first field device exists. When the identification message also includes the first offline IP address, the identification message is also used to: instruct the first field device to set the first offline IP address to the online IP address of the first field device. The first offline IP address is the offline IP address corresponding to the first field device in the first file.

[0016] In a possible implementation, when the identification message includes the first offline IP address, the identification message also includes a storage identification field. When the storage identification field is a first value, the identification message is specifically used to: instruct the first field device to set the first offline IP address as the first online IP address of the first field device. The first online IP address is an online IP address valid for the first field device during the current startup operation phase. When the storage identification field is a second value, the identification message is specifically used to: instruct the first field device to set the first offline IP address as the second online IP address of the first field device. The second online IP address is an online IP address valid for the first field device during the current startup operation phase and subsequent startup operation phases.

[0017] In a possible implementation, the first response message includes at least one of an online IP address, a first device identifier, and a MAC address of the first field device.

[0018] In a possible implementation, the method further includes: when the identification message does not include the first offline IP address, sending a setting message to the first field device. The setting message is used to instruct the first field device to set the first offline IP address as the online IP address of the first field device. A second response message is received from the first field device. The second response message is used to indicate that the setting message has been executed.

[0019] In a fourth aspect, an embodiment of the present application further provides a control method, which is executed by a field device. The method includes: receiving an identification message from a controller. The identification message includes a first device identifier. The first device identifier is used to indicate a first field device of at least one field device. The identification message is used to: query the first field device. When the field device is the first field device: send a first response message to the controller according to the identification message. The first response message is used to indicate: the first field device exists. If the identification message also includes a first offline IP address, the first offline IP address is set as the online IP address of the first field device.

[0020] In a possible implementation, when the identification message includes the first offline IP address, the identification message also includes a storage identification field. The above setting of the first offline IP address as the online IP address of the first field device includes: when the storage identification field is a first value, setting the first offline IP address as the first online IP address of the field device according to the identification message. The first online IP address is an online IP address valid for the first field device during the current startup operation phase. When the storage identification field is a second value, setting the first offline IP address as the second online IP address of the field device according to the identification message. The second online IP address is an online IP address valid for the first field device during the current startup operation phase and subsequent startup operation phases.

[0021] In a possible implementation, the first response message includes at least one of an online IP address, a first device identifier, and a MAC address of the first field device.

[0022] In a possible implementation, the method further includes: when the identification message does not include the first offline IP address, receiving a setting message from the controller. The setting message is used to indicate: setting the first offline IP address as the online IP address of the first field device. According to the setting message, the first offline IP address is set as the online IP address of the first field device, and a second response message is sent to the controller. The second response message is used to indicate that the setting message has been executed.

[0023] In a fifth aspect, an embodiment of the present application further provides a distributed system, which includes the controller described in the first aspect above, and the field device described in the second aspect above.

[0024] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium comprising instructions. When the instructions are executed on the distributed system as described in the fifth aspect, the distributed system executes the control method as described in the third aspect, and / or executes the control method as described in the fourth aspect.

[0025] Regarding the technical principles and beneficial effects of the second, third, fourth, fifth and sixth aspects, please refer to the relevant description of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of an application architecture of the PROFINET standard;

[0027] Figure 2 A schematic diagram of the structure of a distributed system provided in an embodiment of the present application;

[0028] Figure 3 A schematic flow chart of a first control method provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of a processing flow of a field device based on a first control method provided in an embodiment of the present application;

[0030] Figure 5 A schematic flow chart of a second control method provided in an embodiment of the present application;

[0031] Figure 6 A schematic flow chart of a third control method provided in an embodiment of the present application;

[0032] Figure 7 A schematic diagram of a processing flow of a field device compatible with a first control method and a third control method provided in an embodiment of the present application;

[0033] Figure 8 A schematic flow chart of another third control method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] It should be noted that the terms "first", "second", etc. involved in the embodiments of the present application are only used to distinguish features of the same type and cannot be understood as indicating relative importance, quantity, order, etc.

[0035] The terms "exemplary" or "for example" and the like in the embodiments of the present application are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the related concepts in a specific way.

[0036] The terms "coupling" and "connection" involved in the embodiments of the present application should be understood in a broad sense. For example, they may refer to a direct physical connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.

[0037] First, some basic concepts involved in the embodiments of the present application are explained:

[0038] In today's automation engineering field, such as automobile factories and logistics warehouses, distributed systems can be used to achieve automated control of industrial sites. In a distributed system, there are at least one controller, at least one field device, and at least one manager. In actual engineering operations, the field device can be controlled and managed by the controller to control at least one field device to perform corresponding functions. A typical controller is a high-level controller that contains process I / O parameter tables and user programs. The controller is an active communication party that parameters and configures the connected field devices. The controller performs cyclic / non-cyclic data exchange with the field device and handles alarms. At the same time, the field device can be debugged or diagnosed through the detector. The field device is a communication party that can send process IO data to the controller and report critical system status (including diagnostic and alarm information). The requirements for device feasibility and communication cycle are getting higher and higher. Different field buses (such as PROFIBUS bus, CAN bus, etc.) may be run in the field devices of some factories to meet the functional and performance requirements of factory operators. However, these chaotic or high-latency communication protocols are not in the economic interests of manufacturers or factory operators. The PROFINET standard protocol launched by PROFIBUS and PROFINET International (PI) can solve this problem. The PROFINET standard protocol was designed to replace PROFIBUS technology. PROFINET can be used to transmit priority-controlled applications with strict time requirements within the same system / subsystem.

[0039] PROFINET is an open industrial Ethernet standard for automation launched by PI. It is compatible with TCP / IP standard and allows running IT standard applications. It is a real-time Ethernet, such as Figure 1As shown in the figure, it is the network architecture diagram of PROFINET protocol. PROFINET protocol can be seamlessly integrated with the distributed system of traditional fieldbus to protect existing assets. From the network architecture diagram of PROFINET protocol, it can be seen that PROFINET technology opens the protocol channel of transport layer and network layer, which is compatible with the original IT applications that conform to the traditional network protocol, such as factory ERP system, diagnostic system, etc. Some non-real-time standard data can be obtained / set through the traditional network protocol channel, including: device parameters, diagnostic parameters, channel information for negotiating user data, etc. In the transport layer, the transmission control protocol (TCP) or the user datagram protocol (UDP) can be used. In the network layer, the Internet protocol (IP) can be used. At the same time, the real-time channel is also defined separately in PROFINET technology, in which the real-time data of field devices are transmitted based on Ethernet, such as: IO data transmission, cyclic status data, event-triggered information, etc.

[0040] PROFINET technology can realize the communication interaction between IO controller (input / output controller, IOC) and IO field device (input / output controller, IOD) based on the discovery and basic configuration protocol (DCP) protocol of PROFINET protocol. The DCP protocol is a component of the PROFINET protocol suite / protocol family and is the abbreviation of "discovery and basic configuration protocol". Users can use the DCP protocol based on engineering tools and IOC to discover field devices, identify field device information, and set field device parameters (such as PROFINET device name and IP address) on the PROFINET system network. PROFINET DCP is an Ethernet link layer protocol and provides multiple services. This protocol is usually used in PROFINET systems to handle network address and name management, because each PROFINET device is assigned a unique device name (for example: "filler-cab1") and IP address (such as: 192.168.1.2). The main services provided by the PROFINET DCP protocol include: identify all operations, identify operations, set operations, set flash operations, get operations, and hello operations, etc. Some of these services use multicast messages, which means that the message will be transmitted to a group of PROFINET field devices (i.e., multiple IODs), while other services use unicast messages, which are only transmitted to specific PROFINET field devices (i.e., a single IOD).

[0041] The present application embodiment proposes a distributed system, such as Figure 2 As shown, the distributed system 100 includes at least one controller 10 and at least one field device 20. The controller 10 and the at least one field device 20 can establish a communication connection based on Ethernet. Different field devices 20 in the at least one field device 20 have different device identifiers (i.e., different device names). When the field device 20 is started, the controller 10 needs to establish a communication connection with the field device 20. After the communication connection is established, the controller 10 can control and interact with the field device 20. In order to ensure the reliability of the distributed system 100, before the communication connection is established between the controller 10 and the field device 20, the IP address of the first field device 21 in the startup state in the field device 20 needs to be allocated and managed by the controller 10.

[0042] For example, one of the at least one field device 20 may be an IO field device, a drive field device, or a power supply field device.

[0043] based on Figure 2 The distributed system 100 shown in FIG. 1 can use a first control method to allocate and manage IP addresses when the field device 20 is started, such as Figure 3 As shown, the first control method includes the following operations of step S110 to step S140:

[0044] S110 : The controller 10 sends a first identification message.

[0045] In some possible implementations, when the first field device 21 in the at least one field device 20 is started, the controller 10 sends a first identification message, the first identification message including a first device identifier. The first device identifier is used to indicate the first field device 21 in the at least one field device 20. The identification message is used to query the first field device 21.

[0046] Exemplarily, the first identification message is an identify message of the DCP protocol. The identify message includes the device name of the first field device 21, and the device name is the first device identifier. The identify message is a broadcast message or a multicast message, and the controller 10 sends the first identification message to at least one field device 20. Each field device 20 that receives the first identification message needs to determine whether the first identification identifier (i.e., the device name) is consistent with the device name of the field device 20. If not, the field device 20 will discard the first identification message. For the first field device 21, its device name corresponds to the first device identifier. After the first field device 21 receives the first identification message, it will process the first identification message.

[0047] For example, as shown in Table 1 below, the message format and message content examples of the identify message are as follows:

[0048] Table 1 Example of message format and message content when the identify message is the first identification message

[0049]

[0050] In Table 1, the content of the Dest Addr field is the destination device MAC address. Because the identify message of the DCP protocol is a multicast message, the value of this field can be fixed as: 01-0e-cf-00-00-00. The content of the Src Addr field is the source device MAC address (i.e., the MAC address of the controller 10 that sends the identify message). The content of the Ether Type field is the Ethernet type (EtherNet type), the identifier of the Ethernet frame, which is a 16-bit number assigned by IEEE. Its content can be 0x8100, which represents that the subsequent payload field carries a virtual local area network (VLAN) header. VLAN field, that is, VLAN header. The VLAN ID of the DCP protocol identify message is 0 and the priority is 0. The content of the VLAN field is 0x8892, which means that the subsequent payload is a PROFINET protocol message. The Frame ID field represents the identify message of the DCP protocol in the PROFINET protocol, and its value is fixed to 0xfefe. The DCP Header field is the message header information of the DCP protocol, and the content ① thereof represents that the content of this field includes information such as message type, identifier and message length. The Name of Station field represents the station name information of the field device 20, and the content ② thereof includes the device name (i.e., the first device identifier) ​​of the destination device (i.e., the first field device 21) of the identify message, etc. The field length of the Name of Station field is 4+n, where n is the length of the name string of the device name. The FCS field is the message check identifier field, and the content thereof is used for message check.

[0051] S120 : The first field device 21 sends an identification response signal.

[0052] Exemplarily, when the first field device 21 receives the identify message, the identify message contains the first device identifier (i.e., the device name of the first field device 21). The identify message is used to identify and search for the first field device 21. After the first field device 21 receives the first identification message, it sends an identification response signal to the controller 10. The identification response signal carries the IP address of the first field device 21.

[0053] In some possible implementations, a first file is stored in the controller 10. The first file is configuration data, also known as a generic station description file (GSD), which is an initial file provided by the manufacturer, contains the technical characteristics of the device, and can be used to configure the field device 20, etc., and then set the relevant parameters and device names offline. That is, in the development stage of the distributed system 100, the engineer writes the configuration data in the controller 10 through the system engineering tool, and the configuration data includes at least one offline IP address corresponding to the field device 20. In the early stage of design, the offline IP address is corresponding to the unique field device 20. For a certain first field device 21, the first field device 21 can be a field device that is started for the first time during the product life cycle. At this time, the online IP address of the first field device 21 is the initial IP address (for example, 0.0.0.0). The first field device 21 can be a field device that is started multiple times during the product life cycle. In this case, the online IP address of the first field device 21 at the time of this startup may be its corresponding offline IP address, or it may be the initial IP address, or it may be the IP address set by the user in the previous startup process.

[0054] S130 : The controller 10 sends a first setting message to the first field device 21 .

[0055] In some possible implementations, when the controller 10 determines that the online IP address of the first field device 21 is not the corresponding offline IP address after receiving the IP address of the first field device 21, it is necessary to perform the operation of S130 to set the online IP address of the first field device 21 to the corresponding offline IP address. The first setting message includes the corresponding offline IP address of the first field device 21 in the first file. The online IP address of the first field device 21 is set to the corresponding offline IP address through the first setting message.

[0056] Exemplarily, the first setting message is a set message of the DCP protocol, which is a unicast message, that is, a message sent by the controller 10 alone to the first field device 21. The offline IP address corresponding to the first field device 21 is set as its online IP address through the set message.

[0057] S140 : The first field device 21 sends a setting response signal to the controller 10 .

[0058] In the embodiment of the present application, after the first field device 21 sets the corresponding offline IP address as the online IP address of the first field device 21, it outputs a setting response signal to the controller 10. The setting response signal indicates that the setting of the IP address has been completed. After receiving the setting response signal, the controller 10 can subsequently establish a communication connection with the first field device 21.

[0059] In some possible implementations, after step S120, if the online IP address of the first field device 21 is the corresponding offline IP address in the first file, there is no need to perform the operations of step S130 and step S140, and the controller 10 can subsequently directly establish a communication connection with the first field device 21.

[0060] For example, Figure 4 As shown, it is a schematic diagram of the processing flow of the field device 20 when the first control method is adopted. First, the field device 20 receives the first identification message, and the first identification message is a multicast message. Multiple field devices 20 will receive the first identification message. Therefore, the field device 20 needs to determine whether the first device identifier (i.e., the device name) in the first identification message is the device name of the field device 20. If not, the first identification message is discarded and the processing flow ends. If so, the field device 20 is the first field device 21 indicated by the first device identifier of the first identification message. At this time, the first field device 21 will return an identification response message to the controller 10 according to the first identification message. Then, if the controller 10 does not send the first setting message to the first field device 21, the first field device 21 ends the processing flow. If the controller 10 sends the first setting message to the first field device 21, the first field device 21 sets the online IP address according to the first setting message, and sends a setting response message to the controller 10 according to the first setting message. Exemplarily, in addition to setting the online IP address, some other device parameters of the first field device 21 may also be set or modified through the first setting message.

[0061] In this application Figure 3 In the embodiment described, the first control method can be used to allocate and manage IP addresses for the activated field devices 20. Figure 3In the embodiment shown, after the IP address is set in step S140, multiple stages of message interaction are required in the subsequent process of establishing a communication connection. It takes about 3 to 4 seconds for the field device 20 to start from power-on to establish a communication connection with the controller 10. This time is relatively long and it is difficult to meet the demand for the field device 20 to start quickly and put into production in industrial production. If the IP setting stage in step S130 and step S140 fails, the entire startup process needs to be re-executed, which takes longer. At the same time, because some field devices 20 do not save the online IP address set before power failure after power failure, it is necessary to reset the online IP address after each power failure and restart. The longer startup process will always reduce the startup performance of these field devices 20.

[0062] based on Figure 2 The distributed system 100 shown in FIG. 1 can use the second control method to allocate and manage IP addresses when the field device 20 is started, such as Figure 5 As shown, the second control method includes the following operations of step S210 to step S240:

[0063] S210 , setting the online IP address of the field device 20 to a self-set IP address.

[0064] For example, before the distributed system 100 starts running, an engineer can send a second setting message including a self-set IP address to the field device 20 through the system engineering tool X. The online IP address of the field device 20 is set to the self-set IP address through the second setting message.

[0065] For example, before the distributed system 100 is started, an engineer can directly modify the online IP address of the field device 20 to a self-set IP address through the human-machine interface on the field device 20 .

[0066] S220: The controller 10 sends a second identification message.

[0067] In some possible implementations, when the first field device 21 in the at least one field device 20 is started, the controller 10 sends a second identification message, and the second identification message includes a first device identifier. The first device identifier is used to indicate the first field device 21 in the at least one field device 20. The identification message is used to query the first field device 21. For the technical principle and technical content of the second identification message in step S220, reference can be made to the relevant description of the first identification message in the aforementioned first control method, which will not be repeated here.

[0068] S230: The first field device 21 sends an identification response signal.

[0069] In the embodiment of step S230 of the present application, the identification response signal sent by the first field device 21 includes the self-set IP address set in step S210.

[0070] In the embodiment of step S230 of the present application, regarding the technical principle and technical content of the first field device 21 sending the identification response signal, reference may be made to the relevant description in the aforementioned first control method, which will not be repeated here.

[0071] S240: The controller 10 determines whether the IP addresses are consistent.

[0072] Exemplarily, a first file is stored in the controller 10. Usually, engineers use the offline IP address that corresponds to the first file as the self-set IP address to manage and allocate the IP address before starting the first field device 21. Therefore, in step S240, the set online IP address is generally the corresponding offline IP address in the first file. For the relevant description of the first file, please refer to the description of the first control method mentioned above, which will not be repeated here.

[0073] After the determination in step S240 is completed, the online IP address is consistent with the offline IP address, and the subsequent operation of establishing a communication connection can be performed.

[0074] In this application Figure 5 In the second control method of the illustrated embodiment, the engineer manually sets the IP address based on step S210 before starting the field device 20. Then when the field device 20 starts, the operations from step S220 onwards normally execute the relevant processes of the PROFINET protocol. In the process of executing the relevant processes of the PROFINET protocol, because the self-set IP address is an offline IP address, the set online IP address is kept consistent with the corresponding offline IP address, so that the interaction of the setting message and the setting response message can be skipped during the normal execution of the PROFINET protocol. However, because this solution requires manual IP setting before startup, the startup time is longer. At the same time, if the self-set IP address does not correspond one-to-one to the offline IP address, the entire startup process needs to be terminated and the aforementioned process needs to be re-executed. Figure 3 The first control method in the embodiment.

[0075] In order to reduce the startup time of the field device 20 and improve the startup performance, Figure 2 The distributed system 100 shown in FIG. 1 can use the third control method to allocate and manage IP addresses when the field device 20 is started, such as Figure 6 As shown, the third control method includes the following operations of step S310 to step S340:

[0076] S310. The controller 10 sends a third identification message.

[0077] In some possible implementations, the third identification message includes the first device identifier and the first offline IP address.

[0078] For example, in Figure 2 In the architecture, the controller 10 is used to: send a third identification message to at least one field device 20. The third identification message includes a first device identifier and a first offline IP address. The first device identifier is used to indicate a first field device 21 in the at least one field device 20. The third identification message is used to: query the first field device 21, and instruct the first field device 21 to set the first offline IP address as the online IP address of the first field device 21; the first offline IP address is the offline IP address corresponding to the first field device 21 in the first file.

[0079] Exemplarily, the third identification message is an identify message in the DCP protocol, and a field is extended in the third identification message to carry the first offline IP address information. In some examples, the field can be extended in the format of IP Parameter Block, or TLV byte format, or JSON string format to carry the first offline IP address information.

[0080] For example, as shown in Table 2 below, an example of the message format and message content of the identify message when the format extension field of the IP Parameter Block is adopted:

[0081] Table 2 Example of message format and message content when the identify message is the third identification message

[0082]

[0083]

[0084] In Table 2, the IP Parameter Block field is used to carry the first offline IP address. Its content ③ includes the first offline IP address, which is the offline IP address corresponding to the first device identifier in the first file, that is, the offline IP address corresponding to the first field device 21 in the startup phase. For the description of other fields in Table 2, please refer to the relevant description of the aforementioned Table 1, which will not be repeated here.

[0085] Exemplarily, when the IP Parameter Block field is used in the third identification message to carry the first offline IP address, the specific content of the IP Parameter Block field is shown in Table 3 below:

[0086] For example, in Figure 2In the architecture, because the third identification message is an identify message. The identify message is a multicast message (or a broadcast message). Therefore, at least one field device 20 is used to: receive the third identification message from the controller 10. When a certain field device 20 among the at least one field device 20 is the first field device 21 (that is, when a certain field device 20 is in the startup phase), because the third identification message also includes the first offline IP address, the first field device 21 sets the first offline IP address as the online IP address of the first field device 21 according to the information carried by the third identification message.

[0087] In some possible implementations, the third identification message further includes a storage identification field. When the storage identification field is a first value, the third identification message is specifically used to instruct the first field device 21 to set the first offline IP address as the first online IP address of the first field device 21. The first online IP address is an online IP address valid for the current startup operation phase of the first field device 21. When the storage identification field is a second value, the third identification message is specifically used to instruct the first field device 21 to set the first offline IP address as the second online IP address of the first field device 21. The second online IP address is an online IP address valid for the current startup operation phase and subsequent startup operation phases of the first field device 21. In an embodiment of the present application, the online IP address set for the first field device 21 may be a temporary IP address or a permanent IP address. Among them, the temporary IP address is an online IP address valid for the current power-on startup operation phase. When the first field device 21 is powered off and then restarted, the online IP address set in the previous startup operation phase becomes invalid. The permanent IP address is an online IP address that is still valid in the startup operation phase after the first field device 21 is powered off and then restarted. It should be noted that the permanent IP address referred to in the embodiment of the present application does not remain unchanged forever, but is an online IP address that can remain unchanged without being affected by abnormal working conditions before the first field device 21 actively or passively performs an IP setting operation.

[0088] Table 3 Example of the message format and message content of the IP Parameter Block field of the identify message

[0089]

[0090] As shown in Table 3, the content of the Option field is a fixed value IP(1). The content of the Suboption field is a fixed value IP Parameter(2). The content of the DCP Block Length field is a fixed value 14. The content of the Block Qualifier field is a storage identification field, which indicates that the first offline IP address is set to a temporary IP address or a permanent IP address through the value of the storage identification field. The content of the IP addres field is the first offline IP address, for example: 192.168.0.5. The content of the Subnetmask field is the subnet mask, for example: 255.255.255.0. The content of the Standard Gateway field is the default gateway, for example: 192.168.0.1.

[0091] Exemplarily, when the value of the storage identification field is a first value (e.g., 0), the first field device 21 sets the first offline IP address as the online IP address, but does not save the first offline IP address. At this time, the online IP address after setting is the first online IP address (i.e., a temporary IP address). When the value of the storage identification field is a second value (e.g., 1), the first field device 21 sets the first offline IP address as the online IP address, and saves the first offline IP address. In the subsequent startup phase of the first field device 21, the saved first offline IP address can be set as the online IP address. At this time, the online IP address after setting is the second online IP address (i.e., a permanent IP address).

[0092] S320: The first field device 21 sends a first response signal.

[0093] For example, in Figure 2 In the illustrated architecture, after the first field device 21 sets the online IP address according to the third identification message, it sends a first response message to the controller 10. The first response message is used to indicate that the first field device 21 exists. The controller 10 is used to receive the first response message from the first field device 21.

[0094] In the embodiment of the present application, after the first field device 21 sets the online IP address according to the third identification message, it feeds back the first response signal to the controller 10. Because the third identification message is an identify message, one function of the first response signal is to respond to the third identification message to inform the controller 10 that there is a first field device 21 corresponding to the first device identifier in the third identification message. In addition, because the third identification message also includes the first offline IP address. Therefore, after the controller 10 receives the first response signal, the first response signal can also indicate that the first field device 21 has set the first offline IP address as the online IP address.

[0095] In some examples, the first response message may not include the IP address information of the first field device 21. In the entire startup process, the first field device 21 sets the IP address according to the third identification signal. Therefore, after the controller 10 receives the first response signal, it can be determined that the online IP address of the first field device 21 is the first offline IP address in the third identification signal.

[0096] In some examples, the first response message may include at least one of an online IP address, a first device identifier, and a MAC address of the first field device 21 .

[0097] In this application Figure 6 In the third control method of the embodiment shown in FIG. 1 , after the operation of step S320 is completed, the allocation and management of the IP address of the first field device 21 in the startup phase is completed. Figure 6 In the embodiment shown, the allocation and management of the IP address of the field device 20 can be completed through two interactive messages (i.e., the third identification message and the first response message). Figure 3 In the embodiment shown, four interactive messages (i.e., the first identification message, the identification response message, the first setting message, and the setting response message) are required to complete the solution of allocating and managing the IP address of the field device 20, which reduces two interactive messages. The embodiment of the present application achieves the completion of the first identification message and the first setting message based on the third identification message by setting a field in the third identification message to carry the first offline IP address, thereby reducing the startup time of the field device 20 and improving the processing performance of the distributed system 100.

[0098] In some possible implementations, based on Figure 6 The third control method shown can also be compatible with Figure 3 The first control method shown.

[0099] For example, Figure 7 FIG. 2 is a schematic diagram of the processing flow of the field device 20 when the third control method is adopted. Figure 7It can be seen that when the field device 20 receives the identification message, because the identification message (i.e., the identify message) is a multicast message, the field device 20 first needs to determine whether the first device identifier (i.e., the device name) in the identification message is consistent with the device identifier of the field device 20. When the device identifiers are inconsistent, the field device 20 discards the received identification message and ends the processing flow. When the device identifiers are consistent, it means that the field device 20 is the first field device 21. Then, the first field device 21 starts to process the identification message: when the identification message does not include the first offline IP address, it means that the identification message is the first identification message, and the first field device 21 sends an identification response message to the controller 10 according to the first identification message; when the identification message includes the first offline IP address, it means that the identification message is the third identification message, and the first field device 21 sets the first offline IP address to the online IP address according to the third identification message, and sends a first response signal to the controller 10, and then the first field device 21 can end the processing flow of IP address management and allocation of the third control method. For the first identification message: if the first field device 21 does not receive the first setting message after sending the identification response signal, the processing flow ends; if the first field device 21 receives the first setting message after sending the identification response signal, the online IP address is set according to the first setting message. And, after setting the online IP address, the first field device 21 sends a setting response message to the controller 10. After sending the setting response message, the IP address management and allocation process of the first control method ends. In the embodiment of the present application, if Figure 3 The first control method is a control method of the DCP protocol of the traditional PROFINET protocol. The embodiment of the present application can be implemented by adopting Figure 6 On the basis of the third control method shown, the processing flow of the traditional PROFINET protocol recorded in the first control method can also be executed.

[0100] In some possible implementations, the third control method is performed as follows Figure 6 and Figure 7 After the processing operations of IP address management and allocation described in step S310 and step S320, the communication connection between the controller 10 and the first field device 21 can be established. Figure 8 As shown, at this time, the third control method further includes the following operations of step S330 to step S3X0 based on step S310 and step S320:

[0101] S330 : The controller 10 sends an address resolution protocol (ARP) message.

[0102] In the embodiment of the present application, after the controller 10 receives the first response signal, it can be determined that the first field device 21 exists, and the online IP address of the first field device 21 can be determined. Then, the controller 10 can send an APR message to check whether the relevant offline IP address in the offline configuration data (i.e., the first file) of the controller 10 has a corresponding online IP address.

[0103] S340: The first field device 21 sends an ARP response message.

[0104] In the embodiment of the present application, because the first field device 21 has set the first offline IP address to the corresponding online IP address. After receiving the ARP message, if the first field device 21 works normally, the online IP address is consistent with the offline IP address in the configuration data, and the first field device 21 will send an ARP reply message to the controller 10 to inform the controller 10 that the online IP address of the first field device 21 is consistent with the offline IP address in the configuration data. Through this process, the mapping of the IP address and the MAC address of the first field device 21 is also achieved. After completing the ARP response, the communication connection can be officially established.

[0105] S350: Establish a communication connection.

[0106] In some possible implementations, the communication connection includes the establishment of a communication connection of an application relationship (AR) and the establishment of a communication connection of a communication relationship (CR). Exemplarily, the controller 10 sends an AR and CR connection message to the first field device 21. The first field device 21 feeds back an AR and CR connection response message.

[0107] In some possible implementations, the communication connection includes the exchange of configuration data: the controller 10 sends a configuration data message to the first field device 21 , and the first field device 21 feeds back a configuration data response message to the controller 10 .

[0108] In some possible implementations, the communication connection includes the exchange of verification information: the controller 10 sends a verification message to the first field device 21 , and the first field device 21 feeds back a verification response message to the controller 10 .

[0109] In the embodiment of the present application, through the operations of the above steps S330 to S350 , after the management and allocation of the IO addresses are realized, the establishment of the communication connection between the controller 10 and the first field device 21 is completed.

[0110] The embodiment of the present application provides a controller, a field device, a control method and a distributed system. The distributed system includes a controller and a field device. During the startup process of the field device, the controller manages and allocates the IP address of the field device through an identification message including a first offline IP address. Compared with the scheme of managing and allocating the IP address of the field device by using an identification message that does not include the first offline IP address and a setting message that includes the first offline IP address, this scheme reduces the interaction of the two messages, reduces the startup delay of the field device, and improves the startup performance of the field device. Taking the use of the traditional PROFINET protocol to realize the startup of the field device and the communication connection with the controller as an example, a total of 12 message interactions are required. After the identification message including the first offline IP address is adopted, the startup of the field device and the communication connection with the controller only require 10 message interactions in the entire stage. At the same time, in the scenario of using the identification message including the first offline IP address to manage and allocate the IP address of the field device, it is also compatible with the scheme of managing and allocating the IP address of the field device by using the identification message that does not include the first offline IP address and the setting message including the first offline IP address.

[0111] The present application also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the distributed system described in the above embodiment, the distributed system executes the control method described in the above embodiment (for example Figure 3 , Figure 6 , Figure 7 and Figure 8 Control method related to the embodiment shown).

[0112] The processor involved in the embodiments of the present application may be a chip. For example, it may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0113] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0114] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0115] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0118] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0119] In addition, each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.

[0120] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A controller, characterized in that: The controller stores a first file; the first file includes an offline IP address corresponding to at least one field device; the controller is used to: Sending an identification message to at least one field device; the identification message includes a first device identifier; the first device identifier is used to indicate a first field device in the at least one field device; the identification message is used to: query the first field device; receiving a first response message from the first field device; the first response message is used to indicate that the first field device exists; When the identification message also includes a first offline IP address, the identification message is also used to: instruct the first field device to set the first offline IP address as the online IP address of the first field device; the first offline IP address is the offline IP address corresponding to the first field device in the first file.

2. The controller according to claim 1, characterized in that: When the identification message includes the first offline IP address, the identification message further includes a storage identification field; When the storage identification field is a first value, the identification message is specifically used to: instruct the first field device to set the first offline IP address to the first online IP address of the first field device; the first online IP address is the online IP address of the first field device that is valid during the current startup operation phase; When the storage identification field is a second value, the identification message is specifically used to: instruct the first field device to set the first offline IP address as the second online IP address of the first field device; the second online IP address is the online IP address of the first field device that is valid during the current startup operation phase and subsequent startup operation phases.

3. The controller according to claim 1 or 2, characterized in that: The first response message includes at least one of the online IP address, the first device identifier, and a MAC address of the first field device.

4. The controller according to any one of claims 1 to 3, characterized in that: The controller is also used for: When the identification message does not include the first offline IP address, sending a setting message to the first field device; the setting message is used to: instruct the first field device to set the first offline IP address as the online IP address of the first field device; receiving a second response message from the first field device; The second response message is used to indicate that the setting message has been executed.

5. A field device, characterized in that: The field device is used to: Receive an identification message from the controller; the identification message includes a first device identifier; the first device identifier is used to indicate a first field device of at least one field device; the identification message is used to: query the first field device; When the field device is the first field device: Sending a first response message to the controller according to the identification message; the first response message is used to indicate that the first field device exists; If the identification message further includes a first offline IP address, the first offline IP address is set as the online IP address of the first field device.

6. The field device according to claim 5, characterized in that When the identification message includes the first offline IP address, the identification message also includes a storage identification field; and the field device is specifically used for: When the storage identification field is a first value, the first offline IP address is set as the first online IP address of the first field device according to the identification message; the first online IP address is the online IP address that is valid during the startup operation phase of the first field device; When the storage identification field is a second value, the first offline IP address is set as the second online IP address of the first field device according to the identification message; the second online IP address is the online IP address of the first field device that is valid during the current startup operation phase and subsequent startup operation phases.

7. The field device according to claim 5 or 6, characterized in that The first response message includes at least one of the online IP address, the first device identifier, and a MAC address of the first field device.

8. The field device according to any one of claims 5 to 7, characterized in that: The field device is also used to: When the identification message does not include the first offline IP address, receiving a setting message from the controller; the setting message is used to instruct: setting the first offline IP address to the online IP address of the first field device; According to the setting message, setting the first offline IP address as the online IP address of the first field device, and sending a second response message to the controller; The second response message is used to indicate that the setting message has been executed.

9. A control method, characterized in that: The method is executed by a controller; a first file is stored in the controller; the first file includes an offline IP address corresponding to at least one field device; the method includes: Sending an identification message to at least one field device; the identification message includes a first device identifier; the first device identifier is used to indicate a first field device in the at least one field device; the identification message is used to: query the first field device; receiving a first response message from the first field device; the first response message is used to indicate that the first field device exists; When the identification message also includes a first offline IP address, the identification message is also used to: instruct the first field device to set the first offline IP address as the online IP address of the first field device; the first offline IP address is the offline IP address corresponding to the first field device in the first file.

10. The control method according to claim 9, characterized in that: When the identification message includes the first offline IP address, the identification message further includes a storage identification field; When the storage identification field is a first value, the identification message is specifically used to: instruct the first field device to set the first offline IP address to the first online IP address of the first field device; the first online IP address is the online IP address of the first field device that is valid during the current startup operation phase; When the storage identification field is a second value, the identification message is specifically used to: instruct the first field device to set the first offline IP address as the second online IP address of the first field device; the second online IP address is the online IP address of the first field device that is valid during the current startup operation phase and subsequent startup operation phases.

11. The control method according to claim 9 or 10, characterized in that: The first response message includes at least one of the online IP address, the first device identifier, and a MAC address of the first field device.

12. The control method according to any one of claims 9 to 11, characterized in that: The method further comprises: When the identification message does not include the first offline IP address, sending a setting message to the first field device; the setting message is used to: instruct the first field device to set the first offline IP address as the online IP address of the first field device; A second response message is received from the first field device; the second response message is used to indicate that the setting message has been executed.

13. A control method, characterized in that: The method is performed by a field device; the method comprises: Receive an identification message from the controller; the identification message includes a first device identifier; the first device identifier is used to indicate a first field device of at least one field device; the identification message is used to: query the first field device; When the field device is the first field device: Sending a first response message to the controller according to the identification message; the first response message is used to indicate that the first field device exists; If the identification message further includes a first offline IP address, the first offline IP address is set as the online IP address of the first field device.

14. The control method according to claim 13, characterized in that: When the identification message includes the first offline IP address, the identification message further includes a storage identification field; and setting the first offline IP address as the online IP address of the first field device includes: When the storage identification field is a first value, the first offline IP address is set as the first online IP address of the field device according to the identification message; the first online IP address is the online IP address that is valid during the startup operation phase of the first field device; When the storage identification field is a second value, the first offline IP address is set as the second online IP address of the field device according to the identification message; the second online IP address is the online IP address that is valid for the first field device during the current startup operation phase and subsequent startup operation phases.

15. The control method according to claim 13 or 14, characterized in that: The first response message includes at least one of an online IP address, a first device identifier, and a MAC address of the first field device.

16. The control method according to any one of claims 13 to 15, characterized in that: The method further comprises: When the identification message does not include the first offline IP address, receiving a setting message from the controller; the setting message is used to instruct: setting the first offline IP address to the online IP address of the first field device; According to the setting message, the first offline IP address is set as the online IP address of the first field device, and a second response message is sent to the controller; the second response message is used to indicate that the setting message has been executed.

17. A distributed system, characterized in that: The distributed system comprises a controller as claimed in any one of claims 1 to 4, and a field device as claimed in any one of claims 5 to 8.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions; when the instructions are executed on the distributed system as described in claim 17, the distributed system executes the control method as described in any one of claims 9-12, and / or executes the control method as described in any one of claims 13-16.