Relay device, control device, and computer-readable recording medium having program recorded thereon
The relay device addresses high communication loads in industrial systems by switching update methods and managing data storage, ensuring timely and updated information delivery to higher-level servers, thus reducing load on industrial machinery.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- FANUC LTD
- Filing Date
- 2024-12-10
- Publication Date
- 2026-06-18
AI Technical Summary
Industrial machinery communication systems face high communication loads due to frequent data retrieval requests from higher-level servers, leading to outdated information responses and increased load on industrial machinery.
A relay device that switches between periodic and synchronous update methods for variable data, managing communication through first and second communication units, and includes a data storage unit to store and update data based on method instructions.
Reduces communication load on industrial machinery by ensuring timely and updated information delivery to higher-level servers, allowing for efficient management of industrial machine data.
Smart Images

Figure JP2024043658_18062026_PF_FP_ABST
Abstract
Description
A relay device, a control device, and a computer-readable recording medium on which a program is stored. 【0001】 This disclosure relates to a relay device, a control device, and a computer-readable recording medium on which a program is stored. 【0002】 In recent years, various types of data have been collected from industrial machinery or control devices that control industrial machinery for use in the maintenance and management of industrial machinery (for example, Patent Document 1). In industrial machinery that communicates with multiple higher-level servers, requests to read information (a collection of multiple variables) arrive individually from multiple higher-level servers, and even if the same information is being read, individual responses are required, which increases the communication load with the industrial machinery. 【0003】 Furthermore, even with only one upstream server, unnecessarily high-frequency data retrieval increases the communication load with industrial machinery. Therefore, a relay device is placed between the upstream server and the industrial machinery, which periodically reads and stores information from the industrial machinery. When a data retrieval request arrives from the upstream server, the relay device responds with the stored information, thereby reducing the communication load with the industrial machinery. 【0004】 Japanese Patent Publication No. 2000-228672 【0005】 When a relay device responds to a higher-level server, the higher-level server retrieves information periodically read by the relay device. This means the retrieved information may be from a point in time before the higher-level server made the request, potentially preventing it from obtaining the most up-to-date information on the industrial machinery at the time of the request. Therefore, there is a challenge in responding to requests from higher-level servers that require real-time information. In manufacturing environments, there is a need for technology that can provide information acquired at the appropriate time in response to requests. 【0006】The relay device disclosed herein solves the above problem by providing a means to switch for each variable between a periodic update method, in which the variable value is updated by periodically reading from the industrial machine in response to a read request from a higher-level server, and a synchronous update method, in which the variable value is updated by reading from the industrial machine when a read request is received from a higher-level server. 【0007】 Furthermore, one aspect of the present disclosure is a relay device comprising: a first communication unit that communicates with a computer via a first network; a second communication unit that communicates with a control device that controls an industrial machine via a second network; a communication retention data storage unit that stores communication retention data holding communication data exchanged between the first communication unit and the second communication unit; an update method instruction acquisition unit that acquires an update method instruction indicating an update method for the stored communication retention data; and an update execution unit that updates the communication retention data based on the update method instruction acquired from the update method instruction acquisition unit. 【0008】 This is a schematic hardware configuration diagram of a relay device according to one embodiment of the present disclosure. This is a block diagram showing the schematic functions of a relay device according to the first embodiment. This is a schematic diagram showing an example of communication hold data stored in the communication hold data storage unit. This is a schematic diagram of a user interface screen that accepts the specification of synchronous update processing as an update method instruction. This is a schematic diagram of a user interface screen that accepts the specification of periodic update processing as an update method instruction. This is a sequence diagram showing the timing of update processing and value acquisition for a variable for which periodic update processing is specified. This is a sequence diagram showing the timing of update processing and value acquisition for a variable for which synchronous update processing is specified. This is a block diagram showing the schematic functions of a relay device according to the second embodiment. This is a block diagram showing the schematic functions of a relay device according to the third embodiment. This is a block diagram showing the schematic functions of a relay device according to the fourth embodiment. 【0009】 Embodiments of this disclosure will be described below with reference to the drawings. In the following description, components having the same or similar functions will be denoted by the same reference numerals. Duplication of these components may be omitted. 【0010】In this application, "based on XX" means "based on at least XX," and includes cases where it is based on another element in addition to XX. Furthermore, "based on XX" is not limited to cases where XX is used directly, but also includes cases where it is based on something that has been calculated or processed. "XX" is any element (for example, any information). 【0011】 [First Embodiment] Figure 1 is a schematic hardware configuration diagram showing the main parts of a relay device according to the first embodiment of the present disclosure. The relay device 1 according to this embodiment can be implemented, for example, on a control device that controls industrial machinery based on a control program. The relay device 1 according to this embodiment can also be implemented on a higher-level computer such as a personal computer attached to industrial machinery, a personal computer connected to the control device via a wired / wireless network, a server, a fog computer, or a cloud server. In this embodiment, an example is shown in which the relay device 1 is implemented on a computer connected to a control device that controls industrial machinery via a network. 【0012】 The CPU 11 in the relay device 1 according to this embodiment is a processor that controls the relay device 1 as a whole. The CPU 11 reads the system program stored in the ROM 12 via the bus 22 and controls the entire relay device 1 according to the system program. The RAM 13 temporarily stores temporary calculation data, display data, and various data acquired from external sources. 【0013】The non-volatile memory 14 is composed of, for example, a memory or SSD (Solid State Drive) backed up by a battery (not shown), and its stored state is maintained even when the power to the relay device 1 is turned off. The non-volatile memory 14 stores programs and data read from external devices 72 via the interface 15, programs and data input via the input device 71, and programs and data acquired from computers such as the control device 9 that controls the industrial machine 2, the computer 4, the server 5, the fog computer 6, and the cloud server 7 via the networks 3 and 8. The stored data may include, for example, data related to physical quantities such as motor current, voltage, torque, position, speed, and acceleration of the drive unit detected by sensors attached to the industrial machine 2, vibrations and sounds generated in various parts of the industrial machine 2, and data such as processing programs executed by the control device 9 that controls the industrial machine 2 and the values of each parameter. The programs and data stored in the non-volatile memory 14 may be expanded into the RAM 13 when executed / used. In addition, various system programs, such as known analysis programs, are pre-written in the ROM 12. 【0014】 Interface 15 is an interface for connecting the CPU 11 of the relay device 1 to an external device 72 such as a USB device. External devices 72 can read, for example, system programs and configuration data. Furthermore, programs and configuration data created and edited within the relay device 1 can be stored in external storage means via the external device 72. 【0015】 Interface 19 is an interface for connecting the CPU 11 of the relay device 1 to a wired or wireless network 3. The network 3 may communicate using technologies such as a high-speed serial bus, serial communication such as RS-485, Ethernet® communication, optical communication, wireless LAN, Wi-Fi®, or Bluetooth®. A control device 9 that controls at least one industrial machine 2 is connected to the network 3 and exchanges data with the relay device 1. 【0016】Interface 20 is an interface for connecting the CPU 11 of the relay device 1 to a wired or wireless network 8. The network 8 may communicate using technologies such as Ethernet®, optical communication, wireless LAN, Wi-Fi®, or Bluetooth®. Computers such as computer 4, server 5, fog computer 6, and cloud server 7 are connected to the network 8 and exchange data with the relay device 1. 【0017】 In this embodiment, the relay device 1 is shown as being connected to two networks, network 3 and network 8. However, network 3 and network 8 may be the same network. In such a configuration, the control device 9, computer 4, server 5, fog computer 6, and cloud server 7 that control the industrial machine 2 are connected to the same network and exchange data with the relay device 1. 【0018】 The display device 70 displays data obtained as a result of the execution of various data, programs, etc., loaded into memory, via the interface 17. The input device 71, consisting of a keyboard and pointing device, transmits commands, data, etc., based on operator operations to the CPU 11 via the interface 18. 【0019】 Figure 2 is a schematic block diagram showing the functions of the relay device 1 according to the first embodiment of this disclosure. Each function of the relay device 1 according to this embodiment is realized by the CPU 11 of the relay device 1 shown in Figure 1 executing a system program and controlling the operation of each part of the relay device 1. 【0020】 The relay device 1 of this embodiment includes a first communication unit 100, a second communication unit 110, an update method instruction acquisition unit 120, and an update execution unit 130. Furthermore, the RAM 13 to non-volatile memory 14 of the relay device 1 is provided with a communication hold data storage unit 200, which is an area for storing communication hold data that holds communication data exchanged between the first communication unit 100 and the second communication unit 110. 【0021】 In this embodiment, communication between the first communication unit 100 and the second communication unit 110 is performed via the communication data storage unit 200. The communication data storage unit 200 stores the communication data exchanged between the first communication unit 100 and the second communication unit 110 as communication data. The communication data includes data relating to at least one industrial machine 2. In this disclosure, this data relating to the industrial machine 2 is referred to as a variable. A variable includes at least identification information that uniquely identifies the variable (hereinafter referred to as a variable ID) and the value of the variable. A variable may further include information indicating the type of the variable. The communication data may be stored, for example, by storing multiple variables in a table. Alternatively, it may be stored in a tree structure comprising at least one object node and at least one variable node. Variables stored as communication data may be managed by assigning attributes to each variable. 【0022】Figure 3 is a schematic diagram showing an example of communication retention data stored in the communication retention data storage unit 200. In the example in Figure 3, the communication retention data is shown as a tree structure model of the concepts related to the configuration of the industrial machine 2 using object nodes and variable nodes. In Figure 3, for the sake of simplicity, for "industrial machine A," which is one of the industrial machines 2, "industrial machine A" itself and its "machine structure" are made into object nodes, and a variable node related to the object node is provided for each object node, thereby storing information related to "industrial machine A" as communication retention data. In the example in Figure 3, the value of the variable "MachineName" for "industrial machine A" is "MachineA," and the value of the variable "MachineType" is "MachiningCenter." Furthermore, regarding the "machine structure" of "industrial machine A," the value of the variable "Number of axes (Number of Axis)" is "5," the value of the variable "Max Speed 1 of the first axis (MaxSpeed1)" is "5000," and the value of the variable "Current Speed 1 of the first axis (CurrentSpeed1)" is "1000." These variable values are based on values obtained from, for example, industrial machine 2. Alternatively, these variable values are values that have been changed based on a change request from some processing entity. 【0023】The first communication unit 100 communicates with other computers such as computer 4, server 5, fog computer 6, and cloud server 7 via the network 8. The first communication unit 100 receives, for example, a request from another computer to acquire variables related to the industrial machine 2. In response to the acquisition request, it acquires the requested variables related to the industrial machine 2 from the communication data storage unit 200 and transmits them to the requesting computer. This acquisition request includes, for example, information identifying the industrial machine 2 and a variable ID that identifies the variables related to the industrial machine 2. The first communication unit 100 also receives, for example, a request from another computer to change variables related to the industrial machine 2. In response to the change request, it changes the variables related to the industrial machine 2 stored in the communication data storage unit 200. This change request includes, for example, information identifying the industrial machine 2, a variable ID related to the variables of the industrial machine 2, and a specification of the value to be changed. 【0024】 The second communication unit 110 communicates with the control device 9 that controls the industrial machine 2 via the network 3. When the second communication unit 110 receives, for example, a command to acquire information related to the industrial machine 2 from the update execution unit 130, it acquires information related to the specified variables from the industrial machine 2 based on the acquisition command and outputs it to the update execution unit 130. This acquisition command includes, for example, the specification of information related to the variables of the industrial machine 2. Also, when the second communication unit 110 receives, for example, a command to change information related to the industrial machine 2 from the update execution unit 130, it updates the information related to the specified variables in the industrial machine 2 based on the change command. This change command includes, for example, the specification of information related to the variables of the industrial machine 2 and the specification of the value to be changed. 【0025】The update method instruction acquisition unit 120 acquires an update method instruction indicating the method for updating the communication data stored in the communication data storage unit 200. The update method instruction acquisition unit 120 may, for example, display an input screen for the update method instruction on the display device 70 and acquire the update method instruction entered by the user operating the input device 71. Alternatively, the update method instruction may be acquired from computers such as the computer 4, server 5, fog computer 6, and cloud server 7 via the network 8. As an example, the case in which the update method instruction is acquired by user input will be explained using Figures 4 and 5. Figure 4 is a schematic diagram of a user interface screen that accepts the specification of synchronous update processing as the update method instruction. In the example screen in Figure 4, the type of variable in the industrial machine 2 is selected in the leftmost frame, and the variable can be selected by expanding the tree in the second frame from the left. In this figure, the update method of the variable with ID "6073" belonging to the object node "MyData001" of the industrial machine 2 "MyMachine" is set to synchronous update method. On the other hand, Figure 5 is a schematic diagram of a user interface screen that accepts the specification of a periodic update process as an update method instruction. In the example in Figure 5, the update method of the variable with ID "6073" belonging to the object node "MyData001" of the industrial machine 2 "MyMachine" is set to a periodic update method, and the update period is set to 1000 [msec]. By providing such a user interface, the update method for each variable can be set individually. The update method instruction acquired by the update method instruction acquisition unit 120 includes the update method for each variable held in the communication holding data storage unit 200. The update method instruction may be, for example, a periodic update method in which the value of the variable is updated by the second communication unit 110 periodically communicating with the control device 9 that controls the industrial machine 2, or a synchronous update method in which the value of the variable is acquired and updated by communicating with the control device 9 that controls the industrial machine 2 through the second communication unit 110 at the timing when an acquisition request is received from the first communication unit 100. The update method instruction acquired by the update method instruction acquisition unit 120 may be for each variable. If the update method instruction is a periodic update method, it may also include the update period of the variable.The update method instruction acquisition unit 120 outputs the acquired update method instruction to the update execution unit 130. 【0026】 The update execution unit 130 updates the communication retention data stored in the communication retention data storage unit 200 based on the update method instruction input from the update method instruction acquisition unit 120. For variables for which a periodic update method is specified, the update execution unit 130 acquires the value by communicating with the control device 9 that controls the industrial machine 2 via the second communication unit 110 at specified intervals. Then, it updates the value of the variable in the communication retention data with the acquired value. For variables for which a synchronous update method is specified, the update execution unit 130 acquires the value by communicating with the control device 9 that controls the industrial machine 2 via the second communication unit 110 at specified intervals when the first communication unit 100 receives a request to acquire the variable. Then, it updates the value of the variable in the communication retention data with the acquired value. At this time, the first communication unit 100 should wait to access the communication retention data storage unit 200 until the update execution unit 130 has updated the variable in the communication retention data. For example, the system can be implemented such that when a variable specified to use a synchronous update method is read, the communication data storage unit 200 notifies the update execution unit 130, causing the variable to be updated. 【0027】 Furthermore, based on a request for a change in a variable related to the industrial machine 2 received by the first communication unit 100, the update execution unit 130 reflects the change result to the industrial machine 2 via the second communication unit 110 when the value of a variable in the communication data stored in the communication data storage unit 200 is changed. This process may be executed at the time the variable value is changed, or it may be executed at a predetermined interval. 【0028】The following describes the timing of the update of a variable value by the update execution unit 130 and the processing of the acquisition request by the first communication unit 100, using Figures 6 and 7. Figure 6 is a sequence diagram showing the timing of the update process and value acquisition for a variable for which a periodic update method is specified. For a variable value for which a periodic update method is specified, when the update execution unit 130 is ready to update it, it outputs an acquisition command to the second communication unit 110 to acquire information about the industrial machine 2 related to that variable (step S1). In response, the second communication unit 110 sends an acquisition request to the control device 9 that controls the industrial machine 2, which is the target of the variable value acquisition, to acquire information about the industrial machine 2 related to that variable (step S2). When the control device 9 that controls the industrial machine 2 returns an acquisition response to the acquisition request (step S3), the second communication unit 110 responds to the update execution unit 130 with information about the industrial machine 2 as the acquisition result (step S4). The update execution unit 130 updates the values of the variables to be updated in the communication data storage unit 200 based on the information of the industrial machine 2, which is a response from the second communication unit 110 (step S5). These steps S1 to S5 are executed at intervals set in the periodic update method. When the first communication unit 100 receives an acquisition request from the server 5, which is a higher-level computer (step S6), the first communication unit 100 reads the values of the specified variables from the communication data storage unit 200 (steps S7, S8). Then, it transmits the read result as a response to the acquisition request from the server 5 (step S9). 【0029】Figure 7 is a sequence diagram showing the timing of update processing and value acquisition for variables for which a synchronous update method is specified. When the first communication unit 100 receives an acquisition request from the server 5, which is a higher-level computer, for the variable value of a variable for which a synchronous update method is specified (step S10), the first communication unit 100 attempts to read the value of the specified variable from the communication data stored in the communication data storage unit 200 (step S11). The communication data storage unit 200 then notifies the update execution unit 130 that a read has been made for the variable with a synchronous update method (step S12). Upon receiving this notification, the update execution unit 130 outputs an acquisition command to the second communication unit 110 to acquire information about the industrial machine 2 related to the variable (step S13). In response, the second communication unit 110 sends an acquisition request to the control device 9 that controls the industrial machine 2, which is the target of the variable value acquisition, to acquire information about the industrial machine 2 related to the variable (step S14). When the control device 9 that controls the industrial machine 2 returns an acquisition response to the acquisition request (step S15), the second communication unit 110 responds to the update execution unit 130 with information about the industrial machine 2 as the acquisition result (step S16). Based on the information about the industrial machine 2 that is the response from the second communication unit 110, the update execution unit 130 updates the value of the variable to be updated in the communication data storage unit 200 (step S17). Once the variable value is updated, the communication data storage unit 200 returns the variable value to the first communication unit 100 as the result of reading (step S18). Then, it transmits the read result as a response to the acquisition request from the server 5 (step S19). 【0030】 The relay device 1 according to this embodiment, having the above configuration, can periodically read and hold information from the control device 9 that controls the industrial machine 2 and respond to the higher-level computer, while also reading information from the control device 9 that controls the industrial machine 2 and responding with that information when a read request is received from the higher-level computer. This makes it possible to read the latest information from the industrial machine 2. As a secondary effect, it is expected that the communication load with the industrial machine can be reduced. 【0031】The relay device 1 can operate as an OPC UA (OPC Unified Architecture) server or an MTConnect server. In this case, the computer 4, server 5, fog computer 6, and cloud server 7 operate as OPC UA clients or MTConnect clients. By having the relay device 1 centrally manage information related to many industrial machines 2, it is expected that the burden of information management related to the industrial machines 2 on the user will be reduced. 【0032】 [Second Embodiment] The relay device 1 according to the second embodiment will be described below. The relay device 1 according to this embodiment has the same hardware configuration as the relay device 1 according to the first embodiment. 【0033】 Figure 8 is a schematic block diagram showing the functions of the relay device 1 according to the second embodiment of this disclosure. Each function of the relay device 1 according to this embodiment is realized by the CPU 11 of the relay device 1 shown in Figure 1 executing a system program and controlling the operation of each part of the relay device 1. 【0034】 The relay device 1 of this embodiment includes a first communication unit 100, a second communication unit 110, an update method instruction acquisition unit 120, and an update execution unit 130, as well as a communication load measurement unit 140 and a delay time generation unit 150. Furthermore, the RAM 13 to non-volatile memory 14 of the relay device 1 is provided with a communication hold data storage unit 200, which is an area for storing communication hold data that holds communication data exchanged between the first communication unit 100 and the second communication unit 110. 【0035】 The first communication unit 100, the second communication unit 110, and the update method instruction acquisition unit 120 according to this embodiment have the same functions as the first communication unit 100, the second communication unit 110, and the update method instruction acquisition unit 120 according to the first embodiment. 【0036】The communication load measurement unit 140 measures the communication interval of information related to the industrial machine 2 by the second communication unit 110. The communication interval of information related to the industrial machine 2 measured by the communication load measurement unit 140 may be, for example, the communication interval with the industrial machine for each variable. This can be determined by recording and aggregating the time when the update execution unit 130 made an acquisition request from the industrial machine and the time when it made a change request to the industrial machine for the value of each variable. When performing aggregation, statistical processing such as calculating the moving average of the time intervals between information acquisition requests and change requests should be used. The communication load measurement unit 140 also measures the communication interval of information related to the industrial machine 2 by the second communication unit 110. The amount of information communication related to the industrial machine 2 measured by the communication load measurement unit 140 can be calculated by recording the number of bytes of communication packets received by the update execution unit 130 from the control device 9 that controls the industrial machine 2 or transmitted to the control device 9 that controls the industrial machine 2 at regular time intervals, and then calculating the amount of communication using a moving average from the aggregated number of bytes of communication packets. The communication load measurement unit 140 outputs the information related to the measured communication load to the delay time generation unit 150. 【0037】 The delay time generation unit 150 generates delay time information, including a delay time that delays the timing of communication between the second communication unit 110 and the control device 9 that controls the industrial machine 2, based on the communication load information measured by the communication load measurement unit 140. For example, the delay time generation unit 150 determines that the communication interval related to a certain variable measured by the communication load measurement unit 140 is a predetermined threshold I th1 If the time interval is shorter than (for example, 100 [msec]), the timing for acquiring the value of the variable and the timing for reflecting the change in the value of the variable are set to a predetermined time T. delay (For example, it generates delay time information that instructs to delay by 50 [msec].) At this time, the delay time generation unit 150 determines that the communication interval is threshold I th1For variables other than those that fall below a certain threshold, the system may generate delay time information instructing a delay in the acquisition timing or the timing of reflecting changes, or it may generate delay time information uniformly for all variables. Furthermore, the delay time generation unit 150 may, for example, use a predetermined threshold M set by the communication load measurement unit 140 to indicate the amount of communication measured by the communication load measurement unit 140. th1 (For example, delay time information may be generated when the value is greater than 48 [bit / msec]). In this case as well, delay time information may be generated for specific variables, or delay time information may be generated uniformly for all variables. The delay time generation unit 150 generates delay time information when it determines that the communication status in the second communication unit 110 has become congested. Therefore, each threshold should be set appropriately according to the communication capacity of the second communication unit 110. The delay time generation unit 150 outputs the generated delay time information to the update execution unit 130. 【0038】 In this embodiment, the update execution unit 130 acquires information related to the value of a variable from the industrial machine 2, and performs the acquisition of the variable value at a timing delayed by the amount of delay time information generated by the delay time generation unit 150. Based on the result, it updates the variable value in the communication data storage unit 200. Furthermore, when the value of a variable in the communication data storage unit 200 is changed, the update execution unit 130 reflects the change in the variable value to the information of the industrial machine 2, and performs the reflection of the variable value at a timing delayed by the amount of delay time information generated by the delay time generation unit 150. 【0039】 Furthermore, the delay time generation unit 150 may notify the update execution unit 130 to discard the delay time information when it determines that the congested communication situation in the second communication unit 110 has improved. The delay time generation unit 150 may, for example, determine that the communication interval of the variable for which delay time information is generated is a predetermined threshold I th2 (>Threshold I th1When it becomes longer than ), it may be determined that the overcrowded communication situation in the second communication unit 110 has been improved. Further, the delay time generation unit 150, for example, when the communication amount measured by the communication load measurement unit 140 is less than a predetermined threshold value M th1 (< threshold value M th2 ), it may be determined that the overcrowded communication situation in the second communication unit 110 has been improved. 【0040】 The relay device 1 according to the present embodiment having the above configuration can improve the overcrowded communication situation by appropriately delaying the timing of acquiring information of the industrial machine 2 related to the value of the variable and reflecting the changed value of the variable to the industrial machine 2 according to the communication state with the control device 9 that controls the industrial machine 2. 【0041】 [Third Embodiment] Hereinafter, the relay device 1 according to the third embodiment will be described. The relay device 1 according to the present embodiment has the same hardware configuration as the relay device 1 according to the first embodiment. 【0042】 FIG. 9 shows the functions of the relay device 1 according to the third embodiment of the present disclosure as a schematic block diagram. Each function of the relay device 1 according to the present embodiment is realized by the CPU 11 of the relay device 1 shown in FIG. 1 executing a system program and controlling the operations of each part of the relay device 1. 【0043】 In addition to the first communication unit 100, the second communication unit 110, the update method instruction acquisition unit 120, the update execution unit 130, and the communication load measurement unit 140, the relay device 1 of the present embodiment further includes a communication data restriction unit 160. In addition, in the RAM 13 to the non-volatile memory 14 of the relay device 1, a communication holding data storage unit 200, which is an area for storing communication holding data for holding communication data exchanged between the first communication unit 100 and the second communication unit 110, is prepared. 【0044】 The first communication unit 100, the second communication unit 110, and the update method instruction acquisition unit 120 according to the present embodiment have the same functions as the first communication unit 100, the second communication unit 110, and the update method instruction acquisition unit 120 according to the first embodiment. Further, the communication load measurement unit 140 according to the present embodiment has the same function as the communication load measurement unit 140 according to the second embodiment. 【0045】 The communication data restriction unit 160 generates communication data restriction information for restricting communication in the second communication unit 110 based on the communication load measured by the communication load measurement unit 140. This communication data restriction information may, for example, restrict the lower limit of the update period of variables by a periodic update method. In this case, for example, the lower limit of the update period of variables by the periodic update method is set to a predetermined value I min or more. Further, the communication data restriction information may, for example, restrict the upper limit of the number of variables by a periodic update method. Furthermore, the communication data restriction information may, for example, restrict the upper limit of the number of variables by a synchronous update method. The communication data restriction unit 160 outputs the generated communication data restriction information to the update execution unit 130. 【0046】 The update execution unit 130 according to the present embodiment updates the values of variables in the communication holding data under the restriction by the communication data restriction unit 160. When the communication data restriction information generated by the communication data restriction unit 160 restricts the lower limit of the update period of variables by a periodic update method, for example, the update execution unit 130 uniformly sets the lower limit value indicated by the communication data restriction information as the update period for variables whose update period is shorter than the lower limit value indicated by the communication data restriction information. Also, when the communication data restriction information generated by the communication data restriction unit 160 restricts the upper limit of the number of variables by a periodic update method, for example, the update execution unit 130 targets the number of variables indicated by the upper limit value of the communication data restriction information from the variables with a short update period for periodic update, and uniformly stops the update of other variables with periodic update. Furthermore, when the communication data restriction information generated by the communication data restriction unit 160 restricts the upper limit of the number of variables by a synchronous update method, for example, the update execution unit 130 targets the number of variables indicated by the upper limit value of the communication data restriction information from the variables with a high update frequency in order for synchronous update, and treats other variables with synchronous update as variables to be periodically updated with a predetermined update period. 【0047】 Note that when the communication data restriction unit 160 determines that the overcrowded communication situation in the second communication unit 110 has improved, it may notify the update execution unit 130 to discard the communication data restriction information. 【0048】The relay device 1 according to this embodiment, which has the above configuration, can improve congested communication conditions by restricting communication to acquire information about the industrial machine 2 related to the values of variables and to reflect the changed values of variables to the industrial machine 2, depending on the communication status with the control device 9 that controls the industrial machine 2. 【0049】 [Fourth Embodiment] The relay device 1 according to the fourth embodiment will be described below. The relay device 1 according to this embodiment has the same hardware configuration as the relay device 1 according to the first embodiment. 【0050】 Figure 10 is a schematic block diagram showing the functions of the relay device 1 according to the fourth embodiment of this disclosure. Each function of the relay device 1 according to this embodiment is realized by the CPU 11 of the relay device 1 shown in Figure 1 executing a system program and controlling the operation of each part of the relay device 1. 【0051】 The relay device 1 of this embodiment includes a first communication unit 100, a second communication unit 110, an update method instruction acquisition unit 120, and an update execution unit 130, as well as an update method instruction creation unit 170. Furthermore, the RAM 13 to non-volatile memory 14 of the relay device 1 is provided with a communication hold data storage unit 200, which is an area for storing communication hold data that holds communication data exchanged between the first communication unit 100 and the second communication unit 110. 【0052】 The first communication unit 100, the second communication unit 110, and the update execution unit 130 according to this embodiment have the same functions as the first communication unit 100, the second communication unit 110, and the update execution unit 130 according to the first embodiment. 【0053】The update method instruction creation unit 170 creates an update method instruction for communication retained data based on a list of communication retained data stored in the communication retained data storage unit 200. The update method instruction creation unit 170 refers to the communication retained data stored in the communication retained data storage unit 200, for example, based on a command from the user or at predetermined intervals. Then, it creates an update method instruction for each variable based on the attributes attached to each variable included in the communication retained data. Each variable included in the communication retained data stored in the communication retained data storage unit 200 according to this embodiment is assigned attributes such as the priority of updating the variable's value and the update cycle of the variable's value. The priority of updating the variable's value can be set in advance by the user via an interface not shown. The update cycle of the variable's value can be determined by recording the history of when the variable has been updated and assigning a value calculated based on that history as an attribute. The update method instruction creation unit 170 may set variables with a high update priority to be updated using a synchronous update method, and all others to be updated using a periodic update method. Furthermore, variables with short update cycles may be updated using a synchronous update method, while others may be updated using a periodic update method. The number of variables to be updated using the synchronous update method may be determined in advance by the user. The update cycle for variables to be updated using the periodic update method may be determined by referring to, for example, the update cycle attribute of the variable's value. The update method instruction creation unit 170 outputs the created update method instruction to the update method instruction acquisition unit 120. The update method instruction acquisition unit 120 then outputs the update method instruction acquired from the update method instruction creation unit 170 to the update execution unit 130. 【0054】 The relay device 1 according to this embodiment, which has the above configuration, makes it possible to set an appropriate variable update method according to the usage status of each variable. 【0055】[Other Embodiments] In the embodiments described above, an example was shown in which the relay device 1 and the control device 9 that controls the industrial machine 2 are configured as separate entities. When this relay device 1 is mounted on top of the control device 9 that controls the industrial machine 2, it may be configured to hold only information relating to the industrial machine 2 it controls as communication data, or it may be configured to hold information relating to other industrial machines 2 in addition to the information relating to the industrial machine 2 it controls as communication data. 【0056】 While embodiments of this disclosure have been described in detail above, this disclosure is not limited to the individual embodiments described above. These embodiments can be added, replaced, modified, partially deleted, etc., in any way that does not depart from the spirit of the invention or from the idea and intent of this disclosure derived from the claims and their equivalents. For example, the order of operations and processes in the embodiments described above are shown as examples only and are not limited thereto. The same applies when numerical values or mathematical formulas are used in the description of the embodiments described above. 【0057】 The following are annotations relating to embodiments of the present disclosure. (Annotation 1) A relay device (1) according to one aspect of the present disclosure includes: a first communication unit (100) that communicates with a computer via a first network (8); a second communication unit (110) that communicates with a control device (9) that controls an industrial machine (2) via a second network (3); a communication retention data storage unit (200) that stores communication retention data holding communication data exchanged between the first communication unit (100) and the second communication unit (110); an update method instruction acquisition unit (120) that acquires an update method instruction indicating an update method for the stored communication retention data; and an update execution unit (130) that updates the communication retention data based on the update method instruction acquired by the update method instruction acquisition unit (120). 【0058】(Note 2) The communication data held by the relay device (1) according to another aspect of the present disclosure includes one or more variables, and the update method instruction is at least one of the following: a periodic update method in which the second communication unit (110) updates the value of a specified variable by periodically communicating with the industrial machine (2), and a synchronous update method in which the first communication unit (100) updates the value of a specified variable by communicating with the industrial machine (2) through the second communication unit (110) at the acquisition timing when it receives an acquisition request, and the update execution unit (130) executes a process to update the value of a specified variable in the communication data based on the update method instruction. 【0059】 (Note 3) A relay device (1) according to another aspect of the present disclosure further comprises: a communication load measuring unit (140) that measures at least one of the communication interval and the amount of communication via the second communication unit (110) as a communication load; and a delay time generating unit (150) that generates delay time information including a delay time to delay the timing of when the second communication unit (110) communicates with the industrial machine (2) based on the communication load measured by the communication load measuring unit (140), wherein the update execution unit (130) updates the value of a variable in the communication hold data with a delay of the amount of the delay time based on the delay time information generated by the delay time generating unit (150). The relay device according to claim 1. 【0060】 (Note 4) A relay device (1) according to another aspect of the present disclosure further comprises: a communication load measuring unit (140) that measures at least one of the communication interval and the amount of communication via the second communication unit (110) as a communication load; and a communication data limiting unit (160) that, based on the communication load measured by the communication load measuring unit (140), limits at least one of the lower limit of the update cycle of the variable by the periodic update method, the upper limit of the number of variables by the periodic update method, and the upper limit of the number of variables by the synchronous update method, wherein the update execution unit (130) updates the value of the variable in the communication hold data under the limit imposed by the communication data limiting unit. 【0061】(Note 5) The update method instruction acquisition unit (120) of the relay device (1) according to another aspect of the present disclosure acquires the update method instruction via the first network (8). (Note 6) The first communication unit (100) of the relay device (1) according to another aspect of the present disclosure communicates in accordance with the OPC UA or MTConnect communication standard. 【0062】 (Note 7) A control device according to one aspect of the present disclosure is a control device (9) for controlling the industrial machine (2), and includes a relay device (1). 【0063】 (Note 8) A relay device (1) according to another aspect of the present disclosure further comprises an update method instruction creation unit (170) that creates an update method instruction for the communication retained data based on a list of communication retained data stored in the communication retained data storage unit (200), and the update method instruction acquisition unit (120) acquires the update method instruction created by the update method instruction creation unit (170). 【0064】 (Note 9) The communication hold data held by the relay device (1) according to another aspect of the present disclosure includes one or more variables to which attributes are assigned, and the attributes of the variables included in the list of communication hold data include at least one of the priority for updating the value of the variable and the period for updating the value of the variable, and the update method instruction creation unit (170) creates the update method instruction to switch between the periodic update method and the synchronous update method for each variable by classifying the variables with a high update priority or a short update period as variables to be updated using the synchronous update method, and the others as variables to be updated using the periodic update method, based on the attributes of the variables. 【0065】(Note 10) A computer-readable recording medium according to one aspect of the present disclosure records a program that causes a computer to operate as a first communication unit (100) that communicates with a computer via a first network (8), a second communication unit (110) that communicates with a control device (9) that controls an industrial machine (2) via a second network (3), a communication retention data storage unit (200) that stores communication retention data holding communication data exchanged between the first communication unit (100) and the second communication unit (110), an update method instruction acquisition unit (120) that acquires an update method instruction indicating an update method for the stored communication retention data, and an update execution unit (130) that updates the communication retention data based on the update method instruction acquired from the update method instruction acquisition unit (120). 【0066】 1. Relay device 2. Industrial machine 3. Network 4. Computer 5. Server 6. Fog computer 7. Cloud server 8. Network 9. Control device 11. CPU 12. ROM 13. RAM 14. Non-volatile memory 15, 17, 18, 20. Interface 22. Bus 70. Display device 71. Input device 72. External device 100. First communication unit 110. Second communication unit 120. Update method instruction acquisition unit 130. Update execution unit 140. Communication load measurement unit 150. Delay time generation unit 160. Communication data limiting unit 170. Update method instruction creation unit 200. Communication data storage unit
Claims
1. A relay device comprising: a first communication unit that communicates with a computer via a first network; a second communication unit that communicates with a control device that controls industrial machinery via a second network; a communication retention data storage unit that stores communication retention data that holds communication data exchanged between the first communication unit and the second communication unit; an update method instruction acquisition unit that acquires an update method instruction indicating an update method for the stored communication retention data; and an update execution unit that updates the communication retention data based on the update method instruction acquired by the update method instruction acquisition unit.
2. The relay device according to claim 1, wherein the communication-held data includes one or more variables, the update method instruction is at least one of the following: a periodic update method in which the second communication unit updates the value of a specified variable by periodically communicating with the industrial machine, and a synchronous update method in which the first communication unit updates the value of a specified variable by communicating with the industrial machine through the second communication unit at the acquisition timing when it receives an acquisition request, and the update execution unit performs a process to update the value of a specified variable in the communication-held data based on the update method instruction.
3. The relay device according to claim 1, further comprising: a communication load measurement unit that measures at least one of the communication interval and the amount of communication via the second communication unit as a communication load; and a delay time generation unit that generates delay time information, including a delay time to delay the timing of the second communication unit communicating with the industrial machine, based on the communication load measured by the communication load measurement unit, wherein the update execution unit updates the value of a variable in the communication hold data with a delay of the amount of the delay time based on the delay time information generated by the delay time generation unit.
4. The relay device according to claim 2, further comprising: a communication load measurement unit that measures at least one of the communication interval and the amount of communication via the second communication unit as a communication load; and a communication data limiting unit that, based on the communication load measured by the communication load measurement unit, limits at least one of the lower limit of the update cycle of a variable by the periodic update method, the upper limit of the number of variables by the periodic update method, and the upper limit of the number of variables by the synchronous update method, wherein the update execution unit updates the value of the variable in the communication hold data under the limit imposed by the communication data limiting unit.
5. The relay device according to claim 1, wherein the update method instruction acquisition unit acquires update method instructions via a first network.
6. The relay device according to claim 1, wherein the first communication unit communicates in accordance with the OPC UA or MTConnect communication standard.
7. A control device for controlling the industrial machine, comprising the relay device described in claim 1.
8. The relay device according to claim 2, further comprising an update method instruction creation unit that creates an update method instruction for the communication retained data based on a list of communication retained data stored in the communication retained data storage unit, wherein the update method instruction acquisition unit acquires the update method instruction created by the update method instruction creation unit.
9. The relay device according to claim 8, wherein the communication retention data includes one or more variables to which attributes are assigned, the attributes of the variables included in the list of communication retention data include at least one of the priority for updating the value of the variable and the period for updating the value of the variable, and the update method instruction creation unit creates an update method instruction to switch between the periodic update method and the synchronous update method for each variable by classifying, based on the attributes of the variables, variables with a high update priority or a short update period to be updated using the synchronous update method, and the others to be updated using the periodic update method.
10. A computer-readable recording medium that records a program causing a computer to operate as: a first communication unit that communicates with a computer via a first network; a second communication unit that communicates with a control device that controls industrial machinery via a second network; a communication retention data storage unit that stores communication retention data holding communication data exchanged between the first communication unit and the second communication unit; an update method instruction acquisition unit that acquires an update method instruction indicating an update method for the stored communication retention data; and an update execution unit that updates the communication retention data based on the update method instruction acquired from the update method instruction acquisition unit.