Communication control device and control communication system
The communication control device improves performance and data handling in control systems by associating partial data with attributes for packet exchange, resolving issues of data consistency and capacity in complex control systems.
Patent Information
- Application Number
- JP2024543484
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-06-16
AI Technical Summary
Control systems face issues with data consistency and capacity limitations in data exchanges between control devices and input/output devices, particularly due to simultaneous access to data buffers, which become more pronounced with increasing sophistication and speed requirements, making it difficult to meet the demands for advanced data processing and larger communication volumes.
A communication control device with a calculation unit, communication unit, and data storage unit that associates partial data with attributes for packet exchange, ensuring exclusive control and improved performance.
Enhances communication and calculation performance while accommodating increased data volumes, addressing the challenges of data consistency and capacity limitations in complex control systems.
Smart Images

Figure 0007753559000001 
Figure 0007753559000002 
Figure 0007753559000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a control communication system, a communication control device, a control data processing method, and a control data processing program. [Background technology]
[0002] Patent Document 1 shows a communication node equipped with a communication controller and a data processing device to increase processing performance independently of the CPU processing performance. The communication controller transmits information to be transmitted to a transmission path and stores information received from the transmission path in a storage device. The data processing device calculates the transmission time of the own communication node based on the received information and information preset in the own communication node, counts the calculated transmission time from the point in time when it detects the end of writing by the communication controller, and notifies the communication controller of a transmission command.
[0003] Non-Patent Document 1 defines elements and rules for describing both a communication network profile and a device profile in an Ethernet-based control system. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2000-76163 [Non-patent literature]
[0005] [Non-Patent Document 1] ISO14745-4 “Industrial Automation Systems and integration Open systems application integration frameworks Part 4 Reference description for Ethernet-based control systems” Summary of the Invention [Problem to be solved by the invention]
[0006] The control systems that support social infrastructure consist of sensors, controllers, and actuators. The sensors acquire the state of physical objects and input it into the controller, the controller calculates control command values to instruct the actuators, and the actuators act on the physical objects based on the control command values. The control system performs the desired control by, for example, periodically repeating this series of processes.
[0007] Examples of such control systems include factory automation (FA) in factories, process automation (PA) in chemical plants, semiconductor manufacturing equipment, semiconductor inspection equipment, etc. Further examples include medical equipment, distributed control systems, power grid control systems, power generation plants, water and sewage treatment systems, and steelmaking control systems.
[0008] In large-scale or complex control systems, multiple sensors, controllers, and actuators are connected via a network. Control network technology is evolving to meet the requirements of such systems, including time constraints (e.g., maximum delay), cost, reliability, and application-specific requirements.
[0009] In particular, driven by the increasing scale and sophistication of control systems and the recent advances in industrial IoT, the control networks that make up control systems are being required to achieve faster communication speeds, shorter control communication cycles, and larger communication volumes.In addition to improved communication performance, the control systems themselves are being required to perform advanced data processing, such as artificial intelligence (AI) processing and statistical processing, in order to realize industrial IoT.
[0010] As a method for meeting these needs, control systems that incorporate Ethernet into their control networks, such as Industrial Ethernet (registered trademark), are known to increase communication capacity. Furthermore, in such control systems, in response to the increasing speed and performance of embedded processors, high-performance embedded processors are sometimes installed not only on the control device side but also on the input / output device side.
[0011] However, when focusing on the configuration of such a control system, even if the communication capacity between the control device and the input / output device is increased, there are issues with the exchange of data between the communication interface on the input / output device and the calculation function (processor, etc.), as described below.
[0012] <Issues of limited internal RAM capacity> Generally, data between a control device and an I / O device is exchanged via a data buffer on the I / O device. That is, command values from the control device are stored in the data buffer via communication and extracted by the calculation function (processor, etc.) of the I / O device. Similarly, sensor data from the I / O device is stored in the data buffer and transmitted to the control device via communication. When storing and retrieving data in the data buffer, it is necessary to maintain the consistency of the data in the data buffer.
[0013] On the other hand, depending on the device, simultaneous access to the same address may cause stored or read data to become indeterminate. Also, consistency may need to be maintained for a significant area, rather than just a single element of the data buffer. Given this requirement, consider a case where accesses to a specific area of the data buffer by a communication function and an arithmetic function occur almost simultaneously, and due to the difference in access speed, one access overtakes the other in terms of the accessed address. In this case, the data on the overtaken side has been updated midway, meaning that data consistency has been lost.
[0014] These issues become more apparent as control systems become more sophisticated, i.e., as the communication cycles of control devices and the control cycles of input / output devices become shorter and faster. To solve these issues, a special mechanism for exclusive control is required in the data buffer. In addition, high-speed processing is required to keep up with the increasing performance of control systems.
[0015] These requirements make it difficult to use external RAM (Random Access Memory) or non-volatile storage media, and instead encourage the use of built-in RAM with special mechanisms. However, one issue with such built-in RAM is that it is generally difficult to increase the data capacity, making it difficult to respond to the increasing input / output data, another requirement of control systems.
[0016] <Demand for separation of calculation functions (processors)> Another issue is that the demands on control systems are not just for higher performance control, but are also diversifying, including the application of AI processing, etc. To meet these demands, it is desirable to have an input / output device with a configuration that separates communication functions from calculation functions.
[0017] It is difficult to solve the above problems with the transfer memory method disclosed in Patent Document 1 and Non-Patent Document 1. An object of the present invention is to solve, for example, the above problems.
[0018] The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings. [Means for solving the problem]
[0019] In one embodiment, to solve the above problem, a communication control device is provided that has a calculation unit that processes control data, a communication unit that transmits packets including the control data, and a data storage unit that has an exclusive control function. The calculation unit associates the position of each of two or more partial data that make up the control data with an attribute related to the packet communicated by the communication unit, and exchanges the partial data with the communication unit via the data storage unit. [Effects of the Invention]
[0020] According to one embodiment, communication performance and calculation performance can be improved, and an increase in data volume can be accommodated. [Brief explanation of the drawings]
[0021] [Figure 1] 1 is a schematic diagram illustrating a configuration example of a control communication system according to an embodiment. [Figure 2] 2 is a block diagram showing an example of the hardware configuration of a control device appearing in FIG. 1. FIG. [Figure 3] 2 is a block diagram showing an example of a functional configuration of a control device in FIG. 1. FIG. [Figure 4] 2 is a block diagram showing an example of the hardware configuration of the control target device in FIG. 1. [Figure 5] 5 is a block diagram showing an example of a functional configuration of a communication control IC for a controlled device in FIG. 4. [Figure 6] 6 is a block diagram showing an example of the functional configuration of a communication processing unit in FIG. 5. [Figure 7] 4 is a flowchart showing an example of a transmission procedure by the control device in FIG. 3. [Figure 8] 5 and 6 are flow charts showing an example of a receiving procedure by the controlled device. [Figure 9] FIG. 6 is a flow chart showing an example of an integrated management procedure for received data by the control target device. [Figure 10] 5 and 6 are flow charts showing an example of a transmission procedure by the controlled device. [Figure 11] FIG. 10 is a flowchart showing an example of an integrated management procedure for transmission data by a control target device. [Figure 12] 4 is a flowchart showing an example of a receiving procedure by the control device in FIG. 3. [Figure 13] FIG. 4 is a flow chart showing an example of a procedure in which the communication schedule configuration unit in FIG. 3 determines a communication schedule. [Figure 14A]FIG. 14 is a schematic diagram showing a specific example of a communication schedule determined by the flow shown in FIG. 13. [Figure 14B] FIG. 14 is a schematic diagram showing a specific example of a communication schedule determined by the flow shown in FIG. 13. [Figure 14C] FIG. 14C is a schematic diagram showing a specific example different from FIG. 14B. [Figure 14D] FIG. 14C is a schematic diagram showing a specific example that is further different from that of FIG. 14B. [Figure 15A] 10 is a diagram illustrating a specific example of the operation of the control target device in FIG. 9. FIG. [Figure 15B] 15B is a diagram showing an example of allocation of logical addresses to each control target device in FIG. 15A and setting of FMMUs to the control target devices. [Figure 15C] 15B is a diagram showing an example of allocation of each area in a data storage unit and setting of a SyncManager in the control target device shown in FIG. 15A. FIG. [Figure 15D] 15B is a diagram showing an example of data allocation to an integrated data storage unit by a data integration management unit in the control target device shown in FIG. 15A. FIG. [Figure 16] 1 is a schematic diagram illustrating an example of a problem that occurs when an error occurs in time management between a control device and a controlled device. [Figure 17A] 7 is a time chart showing an example of an operation when the data integration management unit in FIG. 6 writes input data into a data storage unit, on the assumption that time synchronization is performed. [Figure 17B] 7 is a time chart showing an example of an operation when the data integration management unit in FIG. 6 writes input data into the data storage unit, on the assumption that time synchronization is not performed. [Figure 18] 17C is a time chart showing an example of operation obtained by modifying FIG. 17B. [Figure 19] 7 is a time chart showing an example of an operation when the data integration management unit in FIG. 6 writes input data into a data storage unit, on the assumption that retransmission or route redundant communication is performed. [Figure 20A]FIG. 10 is a schematic diagram illustrating an example of a situation in which a path abnormality occurs between control target devices; [Figure 20B] FIG. 20B is a schematic diagram showing an example of a situation different from that shown in FIG. 20A. [Figure 21] 7 is a schematic diagram showing an example of the configuration of an integrated data storage unit in FIG. 6. FIG. [Figure 22A] 5 is a block diagram showing a modified example of the hardware configuration of the control target device shown in FIG. 4. FIG. [Figure 22B] FIG. 22B is a block diagram showing a configuration example different from that shown in FIG. 22A. [Figure 23] 2 is a schematic diagram showing a modified configuration example of the control communication system shown in FIG. 1. FIG. [Figure 24] 7 is a block diagram showing a modified configuration example of the functional configuration of the communication processing unit shown in FIG. 6. FIG. DETAILED DESCRIPTION OF THE INVENTION
[0022] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In all drawings for explaining the embodiments, the same components are generally designated by the same reference numerals, and repeated description thereof will be omitted.
[0023] <Outline of control communication system> Fig. 1 is a schematic diagram showing an example of the configuration of a control communication system according to an embodiment. In Fig. 1, a control device (first communication control device) 120 communicates with and controls control target devices (second communication control devices) 121a-121d via a control network 122. In the specification, the control target devices 121a-121d are collectively referred to as control target devices 121. In detail, the control device 120 transmits control command values to the control target devices 121, such as sensors and actuators, acquires measurement values, sensor information, and the like from the control target devices 121, and executes various settings for the control target devices 121, by sending and receiving communication packets to the control target devices 121.
[0024] The control device 120 is a device that exchanges sampling data, control commands, and status signals within each control system, such as a controller within a semiconductor manufacturing device or semiconductor inspection device, a central control device of a DCS (Distributed Control System), a protection control device of a power system, etc. The control device 120 may store multiple pieces of data within the same control system in a packet.
[0025] Furthermore, the control device 120 may support software virtualization technology or software container technology, and may virtualize an application or an OS (Operating System) so that it can be managed as a container.
[0026] Specific examples of the control device 120 include a dedicated controller, an industrial PC, a control computer, a DCS controller, a MEC (Multi-access Edge Computing) device, a computer cloud or server, a SCADA (Supervisory Control and Data Acquisition) server, etc. Further examples include a PLC (Programmable Logic Controller), an IED (Intelligent Electronic Device), a protection control device, a cloud server, etc.
[0027] The controlled device 121 is a device such as a sensor or actuator, and executes device control and device setting in accordance with a control command received from the control device 120 via the control network 122. The controlled device 121 also acquires the state and information of the device and transmits it to the control device 120 via the control network 122. The controlled device 121 may have only the function of inputting information like a sensor, may have only the function of outputting information like an actuator, or may have both input and output functions.
[0028] Specific examples of the control target device 121 include industrial robots such as mobile robots, humanoid robots, and robot arms, AGVs (Automated Guided Vehicles), AMRs (Autonomous Mobile Robots), etc. Further examples include autonomous mobile objects or remote-controlled mobile objects, chip mounters, machine tool tables, processing equipment, machine tools, semiconductor manufacturing equipment, semiconductor inspection equipment, etc.
[0029] Further, specific examples of the controlled device 121 include medical equipment such as clinical testing equipment, or power equipment such as motors, inverters, servo amplifiers, servo motors, circuit breakers, and disconnectors in manufacturing equipment, and various sensors (encoders, temperature sensors, pressure sensors, etc.), etc. Alternatively, examples include dedicated controllers, industrial personal computers, control computers, DCS controllers, SCADA devices, PLCs, smartphones and communication devices equipped with wireless communication interfaces, IEDs (Intelligent Electronic Devices), MUs (Merging Units), protection and control devices, etc.
[0030] The control network 122 is a network that connects the control device 120 and the control target device 121. Specific examples of the control network 122 include networks based on IEEE 802.3 (Ethernet), including control networks such as EtherCAT (registered trademark), IEC61784, and TSN (Time Sensitive Networking). Examples of IEEE 802.3 include standards that support communication speeds such as 100 Mbps, 1 Gbps, multi-gigabit Ethernet, and 10 Gbps, as well as the use of jumbo frames.
[0031] Specific examples of the control network 122 include core networks in wireless networks such as 5G, 6G, and 4G. Further examples include wired networks such as CAN (Controller Area Network: registered trademark), RS-232C, and USB (Universal Serial Bus: registered trademark), and various wireless networks such as Bluetooth (registered trademark).
[0032] Examples of higher-level protocols in the protocol stack include communication protocols based on OPC UA (Unified Architecture), DDS (Data Distribution Service), and SBI (Service Based Interface). Other examples include REST API, HTTP / 2, OpenAPI, JSON (JavaScript Object Notation) data, and IEC 61850. These protocols may be layered. For example, the OPC UA standard may be applied to the contents of the data area on TSN.
[0033] In the embodiments, EtherCAT will be used as an example. An EtherCAT network mainly has the following features (a) to (c).
[0034] (a) A control device 120 and a control target device 121 are connected, and a control packet sent from the control device 120 passes through one or more control target devices 121 in order and returns to the control device 120. Examples of topology include a line type, a ring type, and a star type. If necessary, a relay device compatible with EtherCAT is used. (b) One control packet may contain control data for each of the multiple control target devices 121. This allows the control device 120 to send and receive fewer packets than if the control device 120 sent and received packets individually to each of the multiple control target devices 121. (c) When a control packet containing control commands for each of the multiple control target devices 121 is sent from the control device 120, it is transferred to each control target device 121 in order according to the connection order of the network, and then returns to the control device 120 from which it was sent.
[0035] The control system 123 is composed of a control device 120, a controlled device 121, and a control network 122. Specific examples of the control system 123 include semiconductor manufacturing equipment, semiconductor testing equipment, medical equipment such as clinical testing equipment, and control systems such as DCS for FA (Factory Automation) and PA (Process Automation). Other examples include remote control systems via wireless networks, monitoring and protection control systems in the power field, industrial equipment, in-vehicle systems, control systems in construction machinery and railway vehicles, railway ground signal systems, and control systems in aircraft.
[0036] Alternatively, the control system 123 may be a component of these devices or systems. For example, it may be a chamber of an etching device or a sputtering device, which are semiconductor manufacturing devices, a manufacturing line of an FA system, a device constituting a DCS, an in-vehicle system, or a partial element of an aircraft control system.
[0037] The control system management device 124 is a device that connects to the control device 120 and controls and manages the control device 120. The control system management device 124, for example, sets and acquires control parameters and control policies for the control device 120 to execute control. The control system management device 124 may also divide functions of the control device 120 in terms of time resolution. That is, the control system management device 124 may control the control parameters, target values, etc. of the control device 120 in a control period that is relatively long compared to the control period executed by the control device 120. In another aspect, while the control device 120 executes automatic control, the control system management device 124 may be used for manual control by a system operator.
[0038] Alternatively, the control system management device 124 may set the configuration of the control system 123. Specifically, this may include setting parameters and operation modes in the control device 120 and the control target device 121. Alternatively, this may include address allocation when mapping the control target device 121 to a logical address, or setting the control target device 121 related to setting the logical address.
[0039] When making these settings, the control system management device 124 may determine a datagram to be used for the settings, and transfer the determined information to the control device 120, causing it to be transmitted by the control device 120. These may be executed as generation, editing, and management of EtherCAT Slave Information (ESI) and EtherCAT Network Information (ENI) in EtherCAT.
[0040] In this way, when the control system management device 124 is used to configure the control system 123, the configuration may be performed not only in an online state in which the control system 123 is operating, but also in an offline state before the control system 123 is operated. When performing these configurations, the connection between the control system management device 124 and the control device 120, or the connection between the control system management device 124 and the control target device 121, may be performed only during the configuration. Furthermore, the control system management device 124 may be directly connected to the control target device 121 without going through the control device 120. Note that the connection referred to here includes not only a physical connection via the control network 122 or a network cable, but also a logical connection such as a communication protocol and software for configuration.
[0041] A specific example of the control system management device 124 may be implemented in the same manner as the control device 120. The control system management device 124 may be connected to the control device 120 via the control network 122, or may be connected to the control device 120 via a network independent of the control network 122.
[0042] 1, in addition to the control system 123 having the various implementation forms described above, there is also an IoT system that uses artificial intelligence on the cloud or a computer to analyze information collected via the control network 122 and improve the performance of the control system 123. These implementation forms may include local 5G, private 5G, and public 5G.
[0043] <Hardware configuration of the control device 120> Fig. 2 is a block diagram showing an example of the hardware configuration of the control device 120 in Fig. 1. In Fig. 2, a CPU 101 transfers a program from a nonvolatile storage medium 105 to a memory 104 and executes it. Examples of the execution processing program include an operating system (hereinafter referred to as an OS) and an application program that runs on the OS. The program that runs on the CPU 101 acquires operation settings and status information of the communication control IC 102.
[0044] The communication control IC 102 receives a transmission request and transmission data from software running on the CPU 101, and transmits the transmission data to the control network 122 using the PHY 103. The communication control IC 102 also transfers data received from the control network 122 via the PHY 103 to the CPU 101, memory 104, and non-volatile storage medium 105 via the bus 106.
[0045] Examples of implementation of the communication control IC 102 include an IC such as an FPGA (Field Programmable Gate Array), a CPLD (Complex Programmable Logic Device), an ASIC (Application Specific Integrated Circuit), a gate array, etc. Alternatively, the communication control IC 102 may be configured as an integrated part of the CPU 101.
[0046] The communication control IC 102 may also be configured as an IEEE 802.3 communication device including a MAC layer and a PHY layer. In this case, the function of the PHY 103 may be included in the communication control IC 102. That is, implementation examples of the communication control IC 102 include an IEEE 802.3 standard MAC (Media Access Control) chip, a PHY (Physical Layer) chip, and a combined MAC and PHY chip. The communication control IC 102 may also be included in the CPU 101 or a chipset that controls information paths within the computer. Although the configuration in FIG. 2 shows one communication control IC 102, there may be multiple communication control ICs 102.
[0047] The PHY 103 is a transceiver IC that implements a function for communicating with the control network 122. An example of a communication standard provided by the PHY 103 is an IEEE 802.3 PHY (physical layer) chip. In the configuration of FIG. 2, the PHY 103 and the communication control IC 102 are connected, and therefore, the processing of the IEEE 802.3 MAC (Media Access Control) layer is included in the communication control IC 102.
[0048] However, a configuration in which an IC providing the MAC function is disposed between the communication control IC 102 and the PHY 103, or a configuration in which a communication IC combining an IC providing the MAC function and the PHY 103 is connected to the communication control IC 102, is also possible. The PHY 103 may be included in the communication control IC 102. Also, the configuration in Figure 2 shows one PHY 103. Regarding the quantitative relationship between the communication control IC 102 and the PHY 103, there may be one or more PHYs 103 for one communication control IC 102.
[0049] Memory 104 is a temporary storage area for CPU 101 to operate, and stores the OS, application programs, etc. transferred from nonvolatile storage medium 105. Nonvolatile storage medium 105 is an information storage medium and is used to store the OS, applications, device drivers, etc., programs for operating CPU 101, and the results of program execution. Examples of nonvolatile storage medium 105 include a hard disk drive (HDD), a solid state drive (SSD), and flash memory. Examples of easily removable external storage media include a floppy disk (FD), CD, DVD, Blu-ray (registered trademark), USB memory, and compact flash.
[0050] The bus 106 connects the CPU 101, the communication control IC 102, the memory 104, and the nonvolatile storage medium 105. Examples of the bus 106 include a PCI bus, an ISA bus, a PCI Express bus, an on-chip bus, a system bus, and a memory bus.
[0051] <Functional configuration of the control device 120> Fig. 3 is a block diagram showing an example of the functional configuration of the control device 120 in Fig. 1. In Fig. 3, a calculation unit 160 executes control calculations, information processing calculations, etc. Examples of such calculations include processing sensor information received from the control target device 121 based on a predetermined control law and calculating a control command for driving the control target device 121. Other examples include filtering and statistical processing applied to sensor values, and statistical processing of a set of sensor values over a predetermined period of time in the past.
[0052] Examples of the predetermined control law include control processing based on control engineering theory or AI, such as feedback control or feedforward control. For example, control methods that can change the state depending on past information, such as I (integral) control or state machine control, are exemplified. Other examples include status management (detection of failures or dangerous states) for the controlled device 121, equipment management and asset management (software version management and updates, etc.), preventive maintenance, CBM (Condition Based Maintenance), and statistical processing such as AI or machine learning processing for remaining life prediction.
[0053] Furthermore, if the controlled object device 121 is a moving body, examples of the predetermined control law include determining the direction of movement and the target moving position, speed control, acceleration control, stopping, deceleration, etc. If the controlled object device 121 is an industrial robot arm, examples of the predetermined control law include control commands for the motors of each articulated joint, control of the tip position of the robot arm, or trajectory control of the robot arm. As described above, the controlled object device 121 is diverse and may be not only an actuator but also a simple sensor, so the calculation unit 160 executes control according to the type of the controlled object device 121. For example, the calculation unit 160 may be configured by the CPU 101 or an application running on the CPU 101.
[0054] The transmission data storage unit 161 is a functional unit that stores data to be transmitted. The transmission data storage unit 161 holds data generated by the calculation unit 160 when executing predetermined control or information processing for individual or multiple control target devices 121. The held data is extracted by the communication schedule unit 162. The transmission data storage unit 161 may manage data in units of communication cycles or control cycles determined by the control or information processing executed by the calculation unit 160 and the control target devices 121. The transmission data storage unit 161 may be implemented, for example, as either the memory 104 or the nonvolatile storage medium 105, or both.
[0055] The communication scheduler 162 extracts data from the transmission data storage unit 161 at a predetermined timing, processes the data as necessary, and transfers it to the transmitter 167. An example of data processing is shaping the data into a communication format defined by the communication protocol of the control network 122. An example of shaping the data into the communication format is adding a header and FCS. At this time, the communication scheduler 162 may hold information required for shaping the data into the communication format. Such information includes header parameters defined by the communication format.
[0056] The communication scheduler 162 may receive a communication schedule from the communication schedule composing unit 164 and divide or combine data extracted from the transmission data storage unit 161 in accordance with the communication schedule. Furthermore, the communication scheduler 162 may determine parameters such as headers in accordance with the communication schedule composed by the communication schedule composing unit 164. Therefore, the constituent units of the data stored in the transmission data storage unit 161 may differ from the constituent units of the data transferred by the communication scheduler 162 to the transmitter 167.
[0057] Furthermore, the communication scheduler 162 may determine the timing of transferring the shaped data to the transmitter 167 in accordance with the communication schedule configured by the communication schedule configuration unit 164. The communication scheduler 162 is configured from one or more of the CPU 101 or an application running on the CPU 101, the communication control IC 102, and the PHY 103.
[0058] The control system information storage unit 163 stores information about the control system 123. Specifically, examples of the information to be stored include processing requirements for control processing and information processing executed on the control system 123, and configuration requirements for the control device 120 and the control target device 121. Examples of such requirements include a control cycle, a communication cycle, and the input / output capacity of the control target device 121.
[0059] Alternatively, examples of processing requirements and configuration requirements include the number of control devices 120 and control target devices 121, the specifications and performance of computer resources, communication performance, and the configuration of the communication network. Further examples include the frequency and number of cores of the CPU 101, bit width, architecture, storage capacity and communication throughput of the memory 104 and nonvolatile storage medium 105, transfer throughput of the bus 106, and the communication bandwidth and connection distance of the control network 122. Computer resources such as the CPU, memory, and nonvolatile storage medium include both the control device 120 and the control target device 121. If the control network 122 includes a relay device, the computer resources and communication performance of the relay device are included.
[0060] The control system information storage unit 163 may have information to be stored manually input by a system operator or the like, or may dynamically collect information on the control device 120, the controlled device 121, and the control network 122 using information collection software or a predetermined communication protocol. Examples of such a communication protocol include SNMP (Simple Network Management Protocol) and access to a predetermined register (e.g., a register indicating the model number of a slave IC) in EtherCAT. The control system information storage unit 163 is configured by combining the CPU 101, an application running on the CPU 101, or both with the memory 104 or the nonvolatile storage medium 105.
[0061] The communication schedule configuration unit 164 configures a communication schedule based on the information stored in the control system information storage unit 163, and notifies the communication schedule unit 162. The communication schedule configuration unit 164 cooperates with the logical address determination unit 165 and the datagram configuration determination unit 166 to configure the communication schedule.
[0062] The communication schedule constructed by the communication schedule construction unit 164 includes information on allocation of address space of each control target device 121 to the logical address space, which is also a virtual area, information on datagram size, information on the logical address of the access destination and command, and information on transmission timing and communication cycle. The communication schedule construction unit 164 is constructed by one or more of the CPU 101 or an application running on the CPU 101, the communication control IC 102, and the PHY 103.
[0063] The logical address determination unit 165 determines the allocation of the address space of each control target device 121 to the logical address space based on the information stored in the control system information storage unit 163. This address space allocation can be performed multiple times in response to requests and feedback from the communication schedule configuration unit 164 and the datagram configuration determination unit 166.
[0064] The method using logical address space is a method of allocating inputs and outputs of actuators and sensors in a predetermined address space. In the method using logical address space, any data area (i.e., physical inputs and outputs) possessed by each slave is allocated to a single virtual logical address space. The size of the area and the allocation method can be freely set. The logical address determination unit 165 is composed of one or more of the CPU 101, an application running on the CPU 101, the communication control IC 102, and the PHY 103.
[0065] The datagram configuration determination unit 166 determines the configuration of the datagram to be transmitted by the communication schedule unit 162 based on the information stored in the control system information storage unit 163 and the allocation of the logical address space determined by the logical address determination unit 165. Examples of the datagram configuration determined by the datagram configuration determination unit 166 include the size of each datagram and parameters on the header (such as the logical address space to be accessed).
[0066] The logical address space to which the physical address space of a certain control target device 121 is assigned may be accessed not only by a single datagram but also by datagrams divided into multiple pieces. The datagram configuration determination unit 166 is configured by one or more of the CPU 101 or an application running on the CPU 101, the communication control IC 102, and the PHY 103.
[0067] The transmitter 167 is a transmission function unit that transmits packets from the control device 120 to the control network 122. The transmitter 167 is exemplified by being configured with either the communication control IC 102 or the PHY 103, or both.
[0068] The receiving unit 168 is a receiving function unit that receives packets from the control network 122. The receiving unit 168 may verify the FCS (Frame Check Sequence) to determine the validity of the received packet, or may discard a received packet that is determined to be abnormal. The receiving unit 168 may be configured, for example, by either the communication control IC 102 or the PHY 103, or both.
[0069] The received data integration management unit 169 determines the storage location on the received data storage unit 170 for the received data transferred from the receiving unit 168, and transfers the data to the received data storage unit 170. At this time, since the received packet is in a format defined by the communication protocol of the control network 122, the received data integration management unit 169 may extract the necessary header and data portion. The received data integration management unit 169 is configured by one or more of the CPU 101 or an application running on the CPU 101, the communication control IC 102, and the PHY 103.
[0070] The received data storage unit 170 is a functional unit that stores received data. The received data storage unit 170 receives the results of execution of predetermined control or information processing from an individual or multiple control target devices 121 and stores the results as data. The stored data is extracted by the calculation unit 160. The received data storage unit 170 may manage data in units of communication cycles or control cycles determined by the control or information processing executed by the calculation unit 160 and the control target device 121. The received data storage unit 170 may be implemented as either the memory 104 or the non-volatile storage medium 105, or both.
[0071] The timekeeping unit 171 is a functional unit that manages the passage of time. The timekeeping unit 171 measures the elapsed time of events within each functional unit or between functional units in Fig. 3, and times the occurrence time of a specific event. The time may be absolute time based on a global positioning system (GPS) or the like, the time of the control device 120 itself, or a synchronized time based on a reference time within the control system 123. For example, in EtherCAT, the control target device 121 that is compatible with the Distributed Clock Protocol (DC) and is closest to the control device 120 may be used as the reference time.
[0072] Events that are measured by the timing unit 171 include the sending and receiving times of a specified communication frame or datagram, the data transfer time between functional units, and the data processing time or data retention period within a functional unit. Alternatively, the timing unit 171 generates an interrupt when a specified time has elapsed or when a specified time has been reached, and notifies other functional units of this. In this case, the timing unit 171 may periodically generate and notify interrupts. An example of the implementation of the timing unit 171 is a timing device (a quartz oscillator or a timer device) of the CPU 101 or the communication control IC 102, and the memory 104 or the non-volatile storage medium 105 may be used as a means for storing the measured time.
[0073] 3, one transmitter 167 and one receiver 168 are shown, but if a plurality of communication control ICs 102 and PHYs 103 are provided, a plurality of transmitters 167 and a plurality of receivers 168 may be included.
[0074] <Hardware Configuration of Control Target Device 121> Fig. 4 is a block diagram showing an example of the hardware configuration of the controlled device 121 in Fig. 1. Here, the controlled device 121 conforming to the EtherCAT specification defined in Communication Profile Family 12 of IEC 61158 and IEC 61784 Part 2 will be described as an example. However, the controlled device 121 is not limited to the EtherCAT specification.
[0075] 4, a CPU 101 controls a communication control IC 130 for a controlled device via a bus 106. Although not shown in the figure, the CPU 101 may control sensors and actuators via peripheral devices connected to the CPU 101.
[0076] The communication control IC 130 for the controlled device communicates with the control network 122 via multiple PHYs 103a-103d. In this specification, the multiple PHYs 103a-103d are collectively referred to as PHYs 103. The communication control IC 130 for the controlled device is a dedicated IC that complies with the EtherCAT specification defined in Communication Profile Family 12 of IEC 61158 and IEC 61784 Part 2. The communication control IC 130 for the controlled device may use a non-volatile storage medium 105 to store and reference information necessary for communication.
[0077] The control target device communication control IC 130 is connected to the CPU 101 via a bus 106, but may also be directly connected to the CPU 101 using a dedicated bus. Alternatively, either or both of a memory 104 and a nonvolatile storage medium 105 dedicated to the control target device communication control IC 130 may be provided separately to store information required for processing by the control target device communication control IC 130.
[0078] The input / output device 131 is an input / output interface for acquiring sensor values from sensors constituting the control target device 121 and for controlling actuators constituting the control target device 121. Examples of the input / output device 131 include various actuators such as motors, various sensors (encoders, temperature sensors, pressure sensors, image sensors, cameras, etc.), various digital input / output ICs, analog input / output ICs, driver ICs, etc.
[0079] 4 shows one signal line from the input / output device 131, but there may be multiple lines depending on the configuration of the controlled device 121. Also, the controlled device 121 may be configured to include multiple input / output devices 131. The input / output device 131 may only input information to a connected sensor, or only output information to a connected actuator, or may have both input and output functions. Also, the controlled device communication control IC 130 may include any one or more of the CPU 101, memory 104, and nonvolatile storage medium 105, to form a one-chip type communication control IC.
[0080] <Functional configuration of the communication control IC 130 for the controlled device> Fig. 5 is a block diagram showing an example of the functional configuration of the communication control IC 130 for the controlled device in Fig. 4. In Fig. 5, four sets of communication port functions are provided by combining multiple communication transfer control units 141a-141d and multiple communication units 142a-142d. In this specification, the multiple communication transfer control units 141a-141d are collectively referred to as communication transfer control unit 141, and the multiple communication units 142a-142d are collectively referred to as communication unit 142. Note that the number of communication ports is not limited to four.
[0081] The communication processing unit 140 is connected between the communication transfer control unit 141a and the communication transfer control unit 141d, which are related to the two communication port functions. The communication processing unit 140 is an IC that executes communication processing in accordance with the EtherCAT specification, and an EtherCAT Processor Unit (EPU) is an example of its implementation. The communication processing unit 140 may be configured by connecting it to other calculation functions and input / output functions.
[0082] The communication transfer control unit 141 is a functional unit that transfers a received packet to an adjacent communication transfer control unit 141 or a paired communication unit 142. The transfer direction between the communication transfer control units 141 is constant within the control target device communication control IC 130, and is in the order of communication transfer control units 141a, b, c, and d. In addition, the communication transfer control unit 141 transfers the packet to the communication unit 142 or to an adjacent communication transfer control unit 141, depending on the setting from the communication processing unit 140 and the connection state of the communication path to which the communication unit 142 connects.
[0083] The communication unit 142 is a functional unit that connects to the control network 122 and communicates in accordance with the communication protocol of the control network 122. In detail, the communication unit 142 is configured by a transmission unit 167 and a reception unit 168 similar to those in Fig. 3. For example, the communication unit 142 is configured by either or both of the communication control IC 130 for the controlled device and the PHY 103.
[0084] The input / output unit 143 is an input / output function for acquiring sensor values from sensors constituting the control target device 121 and for controlling actuators constituting the control target device 121. The input / output unit 143 is exemplified by being configured with an input / output device 131. The bus 144 is a communication line for connecting with one or more of the CPU 101, the memory 104, the nonvolatile storage medium 105, and the input / output device 131, and is exemplified by being configured with a bus 106.
[0085] Fig. 6 is a block diagram showing an example of the functional configuration of the communication processing unit 140 in Fig. 5. In Fig. 6, the communication connection unit 150 is a functional unit for connecting the communication processing unit 140 and the communication transfer control unit 141. In Fig. 6, one line is shown as a communication line to the external communication transfer control unit 141, but a set of communication lines is provided for each of the communication transfer control units 141 to be connected. Meanwhile, the communication connection unit 150 is internally connected to the address conversion unit 151 and the access exclusion control unit 152. Note that the communication connection unit 150 may directly access the data storage unit 153. The communication connection unit 150 is exemplified by being configured with the bus 106.
[0086] The address conversion unit 151 is a functional unit that converts addresses between two different address systems. For example, in EtherCAT, this is exemplified by conversion between logical addresses and physical addresses. The address conversion unit 151 connects to the communication connection unit 150 and the access exclusion control unit 152, and refers to the EtherCAT datagram in the communication packet transmitted from the communication connection unit 150. The address conversion unit 151 converts the logical addresses in LRD (Logical Memory Read), LWR (Logical Memory Write), and LRW (Logical Memory Read Write), which are commands that specify logical addresses in the datagram, into physical addresses in the data storage unit 153.
[0087] The rule for conversion between logical addresses and physical addresses is set in advance, for example, by communication via the control network 122 or by an application running on the CPU 101 of the control target device 121. The address conversion unit 151 may directly access the data storage unit 153. For example, the address conversion unit 151 may be configured by the communication control IC 130 for the control target device.
[0088] The access exclusion control unit 152 is connected to the communication connection unit 150, the address conversion unit 151, the data storage unit 153, and the data integration management unit 154, and performs exclusion control between input (write) and output (read) access to the data storage unit 153. An example of the access exclusion control unit 152 is a SyncManager in EtherCAT. The access exclusion control unit 152 particularly integrates and manages multiple areas on the data storage unit 153, and automatically converts input access and output access into access to exclusive areas so that simultaneous input and output access is possible. This allows simultaneous input and output access to the data storage unit 153 to be performed without delay.
[0089] The access exclusion control unit 152 performs exclusive control over an area consisting of multiple entries, rather than over one entry specified by one address in the data storage unit 153. The access exclusion control unit 152 may directly access the calculation unit 160. For example, the access exclusion control unit 152 may have a notification means for issuing an interrupt or the like to the calculation unit 160 or the data integration management unit 154 regarding events including the completion of input or output. The access exclusion control unit 152 may be configured, for example, by the communication control IC 130 for the controlled device.
[0090] The data storage unit 153 is a functional unit that stores predetermined settings and data. Examples of information stored in the data storage unit 153 include setting information for the operation of the control target device communication control IC 130 and the communication processing unit 140, status information, and information exchanged between the control device 120 and the control target device 121 (for example, control command values and sensor information acquired by an input device). The data storage unit 153 is, for example, configured by one or more of the control target device communication control IC 130, memory 104, and nonvolatile storage medium 105.
[0091] The data integration management unit 154 is connected to the calculation unit 160, the access exclusion control unit 152, and the integrated data storage unit 155, and integrates and manages data acquired from the data storage unit 153 via the access exclusion control unit 152 or data acquired from the calculation unit 160 in the integrated data storage unit 155. Furthermore, as a process in the reverse direction, the data integration management unit 154 outputs data acquired from the integrated data storage unit 155 to the calculation unit 160 or the data storage unit 153.
[0092] The data integration management unit 154 may be configured, for example, by one or more of the CPU 101 or an application running on the CPU 101, the memory 104, the nonvolatile storage medium 105, and the communication control IC 130 for the control target device. Furthermore, when the data integration management unit 154 is configured by an application on the CPU 101, it may be configured by an interrupt task or a general task. This includes delay tasks and periodic tasks that are started by an interrupt. Alternatively, an IC (such as a bus controller, ASIC, FPGA, or CPLD) not shown may be included in the hardware configuration of the control target device 121 in FIG. 4, and the data integration management unit 154 may be configured in the IC.
[0093] The integrated data storage unit 155 is a functional unit that is connected to the data integration management unit 154 and stores data that is integratedly managed by the data integration management unit 154. The integrated data storage unit 155 is, for example, configured by either the memory 104 or the nonvolatile storage medium 105, or both.
[0094] The time synchronization unit 156 executes a time synchronization procedure to synchronize the time of the control target device 121 with a predetermined reference time. Examples of time synchronization methods that can be executed include the Distributed Clock protocol of EtherCAT, IEEE 802.1AS, IEEE 1588, and wireless time synchronization methods such as NTP, SNTP, GPS, and 5G. The time synchronization unit 156 may be configured by one or more of the CPU 101 or an application running on the CPU 101, the PHY 103, and the communication control IC 130 for the control target device.
[0095] <Transmission Procedure of the Control Device 120> Fig. 7 is a flow diagram showing an example of a transmission procedure by the control device 120 in Fig. 3. In Fig. 7, the calculation unit 160 first waits for the timing to start the calculation process of the application (step S001). The execution start timing of the calculation process may be a timing when the calculation process is started at a predetermined cycle, or may be a timing notified periodically by the timer unit 171. Alternatively, it may be a timing based on an interrupt notification from the communication control IC 102 to the CPU 101.
[0096] In terms of the functional units, one or more of the transmission data storage unit 161, communication schedule unit 162, control system information storage unit 163, communication schedule configuration unit 164, transmission unit 167, reception unit 168, received data integration management unit 169, received data storage unit 170, and timing unit 171 notify the calculation unit 160 of an interrupt. In response to this, the calculation unit 160 starts a control application. Examples of the timing of an interrupt from the communication control IC 102 to the CPU 101 or an interrupt from the functional units in FIG. 3 to the calculation unit 160 are as follows:
[0097] When the timer unit 171 periodically interrupts at a predetermined cycle, when a predetermined time is reached, or when a predetermined period of time has elapsed When updating or extracting information stored in the transmission data storage unit 161 When the communication schedule is updated by the communication schedule unit 162, and when the transfer of communication data starts or ends When updating the stored information by the control system information storage unit 163 When the communication schedule is determined by the communication schedule configuration unit 164 or when notification to the communication schedule unit 162 is completed When the transmission unit 167 starts or completes transmission of communication data When the receiving unit 168 starts or completes receiving the received data When the reception data integrated management unit 169 starts or completes extraction of datagrams, when the reception unit 168 starts or completes transfer of reception data, and when transfer to the reception data storage unit 170 starts or completes When updating or extracting information stored in the received data storage unit 170
[0098] Each functional unit may generate an interrupt limited to predetermined communication data, for example, by a predetermined communication partner (control target device 121), a predetermined type of calculation, a data size (for example, comparison with a predetermined threshold), or a processing timing or processing time.
[0099] When it is time to start the calculation process (Y in step S001) in step S001, the calculation unit 160 executes the calculation process (step S002). Examples of such calculation processes include calculation of an output command value based on sensor information acquired by the input / output device 131 and the input / output unit 143 of the control target device 121, statistical processing such as AI for applying IoT, and determination of setting information for the control target device 121.
[0100] Next, the calculation unit 160 writes the transmission data determined and generated in step S002 into the transmission data storage unit 161 (step S003). Then, the communication schedule unit 162 waits for transmission timing (step S004). The transmission timing follows the communication schedule determined by the communication schedule configuration unit 164. In step S004, if the transmission timing arrives (Y in step S004), the communication schedule unit 162 transmits the transmission data to the control network 122 via the transmission unit 167 (step S005).
[0101] Thereafter, the communication scheduler 162 determines whether the transmission of the predetermined set has been completed (step S006). When determining whether the transmission of the predetermined set has been completed, the communication scheduler 162 may determine that the transmission has been completed after a predetermined number of repetitions of transmission, or may determine that the transmission has been completed when the total transmission data size is equal to or greater than a predetermined value. Alternatively, the communication scheduler 162 may determine that the transmission has been completed when the predetermined communication content has been transmitted.
[0102] If it is determined in step S006 that the transmission of the predetermined set has been completed (Y in step S006), the control device 120 determines whether the termination condition has been satisfied (step S007). If the termination condition has been satisfied (Y in step S007), the control device 120 terminates the processing. Examples of the termination condition include reaching a predetermined time, elapse of a predetermined period of time, execution of a predetermined number of transmissions, or the number of transmissions of the predetermined set reaching a threshold value.
[0103] Alternatively, the termination condition may be, for example, that the control system 123 has completed execution of a predetermined control procedure or that a predetermined control performance has been achieved. Alternatively, the termination may be explicitly instructed by a system operator or the like. Alternatively, the termination may be determined based on an abnormality or change occurring in one or more of the control device 120, the controlled device 121, the control network 122, and the control system 123. For example, the occurrence of a serious abnormality or accident that makes it difficult to continue running the control system 123, followed by a safe shutdown, may be exemplified.
[0104] If it is determined in step S006 that the transmission of the predetermined set has not been completed (N in step S006), the process returns to step S004. Also, if the termination condition is not satisfied in step S007, the process returns to step S001. Note that steps S001 to S003 are mainly performed by the calculation unit 160, and steps S004 to S006 are mainly performed by the communication scheduler 162. Therefore, steps S001 to S003 and steps S004 to S006 may be performed in parallel or in parallel.
[0105] <Reception Procedure of Control Target Device 121> 5 and 6. First, the communication unit 142 and the communication transfer control unit 141 wait for reception of a packet via the control network 122 (step S010). If a packet is received in step S010 (Y in step S010), the communication connection unit 150 extracts the datagram that constitutes the received packet (step S011).
[0106] Next, the communication connection unit 150 determines whether the address in the header of the datagram extracted in step S011 is a translation target address (step S012). The translation target address is, for example, a logical address. In addition to the logical address, the communication connection unit 150 may determine whether the address is a translation target address based on a rule that is uniquely determined for translating a predetermined address into a physical address on the control target device 121.
[0107] If the address in the datagram header is an address to be translated in step S012 (Y in step S012), the address translation unit 151 translates the address (step S013). An example of this translation is translation from a logical address to a physical address. After step S013, or if the address in the datagram header is not an address to be translated in step S012 (N in step S012), the access exclusion control unit 152 writes the data of the received datagram to the data storage unit 153 while exclusively controlling access to the data storage unit 153 (step S014).
[0108] Then, the access exclusion control unit 152 notifies the data integration management unit 154 of the completion of writing to the data storage unit 153 (step S015). The notification of the completion of writing may be an interrupt signal, or may be made by changing a predetermined register to a predetermined value. In the latter case, the data integration management unit 154 can detect the completion of writing to the data storage unit 153 by the access exclusion control unit 152 by polling access to the register.
[0109] Then, the control target device 121 determines whether or not the processing of all datagrams in the received packet has been completed (step S016). At this time, the control target device 121 may determine whether or not there is remaining received data, or may determine that the processing of all datagrams has been completed if the MORE bit in the header of the datagram that has been written to the data storage unit 153 is 0 (i.e., the last datagram).
[0110] If it is determined in step S016 that processing of all datagrams has been completed (Y in step S016), the process ends. If it is determined in step S016 that processing of all datagrams has not been completed (N in step S016), the process returns to step S011. The flow in FIG. 8 is executed every time a packet is received. Furthermore, the completion of writing in step S015 may be notified on a packet-by-packet basis rather than on a datagram-by-datagram basis.
[0111] <Integrated Management Procedure When Control Target Device 121 Receives> Fig. 9 is a flow diagram showing an example of the procedure for integrated management of received data by the control target device 121 in Fig. 6. First, the data integrated management unit 154 waits until the data in the data storage unit 153 is updated (step S020). If the data in the data storage unit 153 is updated (Y in step S020), the data integrated management unit 154 determines whether the update is valid (step S021).
[0112] In step S021, the data integration management unit 154 determines whether update data accompanying a packet is valid based on information on the packet, the communication timing of the packet, etc. Specifically, the data integration management unit 154 makes the determination based on, for example, the following determination criteria A1 or A2, or a combination of these.
[0113] Criterion A1: If the control device 120 has a fixed communication cycle, whether the reception time at the control target device 121 has elapsed more than the communication cycle since the previous reception time. For example, if the control device 120 has a communication cycle of 100 microseconds and the reception time at the control target device 121 is 200 microseconds after the previous reception time, it is considered that there are packets that have not been received due to packet loss or the like. On the other hand, if the elapsed time is 100 microseconds, it can be determined that data has been received continuously and the updated data is valid. If there is fluctuation in the processing time of the control device 120 and the control target device 121 and the communication time of the control network 122, for example, a predetermined margin can be added to the threshold value of the elapsed time.
[0114] Criterion A2: When sequence numbers or transmission times at the control device 120 are set on the received data, whether or not they match the values on the previously received data. For example, if the sequence numbers are not consecutive or if the difference in transmission times exceeds a predetermined value, the updated data is considered invalid; otherwise, the updated data can be determined to be valid. The time here may be a synchronized time using a synchronization protocol such as DC, or the time at the control device 120.
[0115] If it is determined in step S021 that the updated data is valid (Y in step S021), the data integration management unit 154 determines an allocation position on the integrated data storage unit 155 (step S023). Then, the data integration management unit 154 allocates the received data to the position on the integrated data storage unit 155 determined in step S023 (step S024).
[0116] Then, the data integration management unit 154 determines whether the integrated data area of the integrated data storage unit 155, in other words, the control data in the integrated data area, is valid (step S025). At this time, the data integration management unit 154 may determine whether the integrated data area is valid based on whether the number of datagrams or the number of repeated packet receptions is equal to or greater than a predetermined value, or may determine whether the total received data size is equal to or greater than a predetermined value. Alternatively, the data integration management unit 154 may determine completion when predetermined communication content is received. If the integrated data area is valid in step S025 (Y in step S025), the data integration management unit 154 validates the integrated data area of the integrated data storage unit 155 (step S026).
[0117] Furthermore, if it is determined in step S021 that the update data is invalid (N in step S021), the data integration management unit 154 executes a corresponding process (step S022). An example of the corresponding process is to notify the calculation unit 160, the access exclusion control unit 152, and the communication connection unit 150 (connection with the data integration management unit 154 is not shown) of the control target device 121 that the update data is invalid. An example of the notification means is an interrupt.
[0118] Alternatively, examples of the corresponding processing include invalidating an area that has already been received and allocated in the integrated data storage unit 155, or invalidating received data that is scheduled to be received in the future. That is, the criterion for determining whether the updated data in step S021 is valid includes whether or not the invalidation processing in step S022 has been performed. Specifically, if the next packet is received after the integrated data storage unit 155 is updated based on the first packet, and the update of the data storage unit 153 associated with the next packet is invalid, the update based on the first packet is also retroactively invalidated.
[0119] Another example is invalidating the invalidation process itself after receiving a predetermined number of packets or datagrams, or after a predetermined time or period has elapsed. Such processing is also included in the corresponding processing of step S022 and the subsequent steps. Alternatively, invalidation of the invalidation process may be performed independently of or in parallel with the procedure shown in FIG. 9.
[0120] After steps S026 and S022, or if the integrated data area is not valid in step S025 (N in step S025), the control target device 121 determines whether to end the process (step S027). The determination of the end condition is the same as step S007 in Fig. 7. In addition, the end may be determined based on the processing result in step S022. For example, the end may be determined when the number of invalidations exceeds a predetermined value.
[0121] The response process in step S022 (such as invalidating an area in the integrated data storage unit 155) is executed starting from the data update in step S020. However, taking into consideration the possibility of a communication abnormality in the control network 122, the response process may be executed after a predetermined time has elapsed (timeout) since the previous event such as data update, packet reception, or allocation to an area in the integrated data storage unit 155.
[0122] Furthermore, in step S023, the data integration management unit 154 may determine the allocation position based on the order of reception or the time of reception. For example, by previously sharing the communication cycle, in other words, the packet communication timing, between the control device 120 and the control target device 121, the control target device 121 can determine which cycle of communication has occurred since the time of reception. In this case, the start time may be shared between the control device 120 and the control target device 121, or the time when the control target device 121 first received the packet after starting processing may be stored in the control target device 121 as the start time. Note that mailbox communication may be used, for example, to share information between the control device 120 and the control target device 121.
[0123] Alternatively, the data sender, in this case, for example, the control device 120, may store information specifying the number of the communication and the allocation position in the communication data in advance. This may be done by using information such as the header, or by using the data area in the packet or datagram. Alternatively, the data sender may store address information indicating the allocation position in the integrated data storage unit 155 in the data area in the packet or datagram in advance. In this case, if the physical address of the internal RAM of the EtherCAT slave is 16 bits (64 kB) and it is expected to have the effect of using a space larger than the internal RAM as the integrated data area, the bit width of the address must be greater than 16 bits.
[0124] In step S025, when the integrated data area of the integrated data storage unit 155 is validated, the data integration management unit 154 may notify the calculation unit 160 of the validation by an interrupt or the like, or may transfer the validated data to the calculation unit 160. Therefore, the integrated data storage unit 155 may have multiple integrated data areas for received data as well. This makes it possible to switch the integrated data area before and after it is determined that the integrated data area is valid in step S025.
[0125] Furthermore, the multiple integrated data areas may be configured, for example, by a ring buffer. Fig. 21 is a schematic diagram showing an example configuration of the integrated data storage unit 155 in Fig. 6. As shown in Fig. 21, when the integrated data storage unit 155 is configured by a ring buffer, the data integration management unit 154 manages the write position and read position for the multiple integrated data areas.
[0126] In steps S025 and S026, the data integration management unit 154 may validate only a partial area and invalidate the area that has not yet been received, rather than validating the area after all the necessary data has been collected. In this case, for example, if the calculation unit 160 accesses an area that has not yet been received, an error may be generated.
[0127] <Transmission Operation of Control Target Device 121> 10 is a flow diagram showing an example of a transmission procedure by the control target device 121 in FIGS. 5 and 6. In FIG. 10, first, the calculation unit 160 waits for the timing to start the calculation process of the application (step S030). The execution start timing of the calculation process may be a timing when the calculation unit 160 is started at a predetermined cycle, or may be a timing when the calculation unit 160 is notified periodically by the time synchronization unit 156 or a timer (not shown). Alternatively, the calculation unit 160 may be started by a notification from each functional unit shown in FIG. 6 to the calculation unit 160 (connections between some functional units and the calculation unit 160 are not shown).
[0128] The timing of notification from the functional unit shown in FIG. 6 to the calculation unit 160 is exemplified as follows. When a packet is received, sent, or transferred by the communication connection unit 150 When address conversion by the address conversion unit 151 starts or ends When the access exclusive control unit 152 writes or reads data to or from the data storage unit 153, or when the access exclusive control unit 152 starts or completes data transfer with the data integration management unit 154. When updating or extracting stored data in the data storage unit 153 When the data integration management unit 154 starts or completes data transfer with the access exclusive control unit 152 or the calculation unit 160 When the data integration management unit 154 writes data to the integrated data storage unit 155, when data is read from the integrated data storage unit 155, or when the integrated data area in the integrated data storage unit 155 is enabled or disabled. When the time synchronization unit 156 interrupts at a predetermined cycle, when a predetermined time is reached, or when a predetermined period of time has elapsed
[0129] 6 may generate notifications limited to specific data, for example, by a specific type of calculation, a data size (e.g., comparison with a specific threshold), or processing timing or processing time.
[0130] In step S030, when it is time to start the calculation process (Y in step S030), the calculation unit 160 acquires data from the integrated data storage unit 155 via the data integration management unit 154 (step S031). Next, the calculation unit 160 executes the calculation process based on the acquired data (step S032). Then, if the calculation unit 160 calculates an output value through the calculation process, it outputs the output value (step S033). The output value is used, for example, to control an actuator or the like.
[0131] Next, the calculation unit 160 acquires input information via the bus 144 from the input / output unit 143 shown in FIG. 5, which corresponds to the input / output device 131 such as a sensor (step S034). The calculation unit 160 transfers the acquired input information to the data integration management unit 154, and the data integration management unit 154 writes the transferred data in the integrated data storage unit 155 (step S035). Then, the processing ends.
[0132] 10, a series of processes are executed in order, but some or more of steps S031, S032, S033, S034, and S035 may be executed in parallel. Also, if the control target device 121 does not have an output device such as an actuator, step S033 may not be executed. Similarly, if the control target device 121 does not have an input device such as a sensor, step S034 may not be executed.
[0133] <Integrated Management Procedure When Control Target Device 121 Sends> Fig. 11 is a flow diagram showing an example of the procedure for integrated management of transmission data by the control target device 121 in Fig. 6. In Fig. 11, first, the data integrated management unit 154 waits until the data in the integrated data storage unit 155 is updated (step S040). When the data in the integrated data storage unit 155 is updated (Y in step S040), the data integrated management unit 154 divides the data (step S041).
[0134] Next, the data integration management unit 154 waits for the timing to transfer the data divided in step S041 (step S042). When the timing to transfer arrives in step S042 (Y in step S042), the data integration management unit 154 transfers the divided data to the access exclusion control unit 152 (step S043).
[0135] Then, the data integration management unit 154 determines whether the transfer of the predetermined set of divided data has been completed (step S044). If it is determined in step S044 that the transfer of the predetermined set of divided data has been completed (Y in step S044), the control target device 121 determines whether the termination condition has been satisfied (step S045). If the termination condition has been satisfied (Y in step S045), the processing ends. The determination of the termination condition is the same as step S007 in FIG. 7.
[0136] The data transferred to the exclusive access control unit 152 in step S043 can be acquired by the control unit 120 through communication using a read command from the control unit 120. If it is determined in step S044 that the transfer of the predetermined set of divided data has not been completed (N in step S044), the process returns to step S042. Also, if the termination condition is not satisfied in step S045 (N in step S045), the process returns to step S040.
[0137] After step S040, the data integration management unit 154 may monitor and compare the timing of data transfer, etc., to determine whether the update data to the integrated data storage unit 155 by the calculation unit 160 is valid. If the update data is not valid, the data integration management unit 154 may issue an external notification, such as an interrupt notification to the calculation unit 160 or a notification to the control device 120.
[0138] The division of the data in step S041 may be, for example, divided into a predetermined number of equal parts. The data integration management unit 154 may also associate attributes for each piece of data divided in step S041 with each piece of data. Examples of such attributes include the position of the divided data within the whole, the size of the divided data, and an identifier or sequence number for identifying the divided data. An area may also be provided on the divided data to hold the attributes.
[0139] Furthermore, in steps S043 and S044, the data integration management unit 154 may notify the calculation unit 160 of the start of data transfer, the completion of transfer, and the completion of a predetermined set by using a means such as an interrupt.
[0140] <Reception operation of the control device 120> Fig. 12 is a flow diagram showing an example of a receiving procedure by the control device 120 in Fig. 3. In Fig. 12, first, the receiving unit 168 waits to receive a packet (step S050). If a packet is received in step S050 (Y in step S050), the received data integration management unit 169 determines whether the received data is valid (step S051). The received data integration management unit 169 determines whether the received data is valid, for example, based on one or a combination of the following criteria B1 to B5.
[0141] Criterion B1: If the control device 120 has a fixed communication cycle, whether the reception time at the control device 120 has elapsed more than the communication cycle since the previous reception time. For example, if the control device 120 has a communication cycle of 100 microseconds and the reception time at the control device 120 is 200 microseconds after the previous reception time, it is considered that there are packets that have not been received due to packet loss or the like. On the other hand, if the elapsed time is 100 microseconds, it can be determined that data has been received continuously and the received data is valid. If there is fluctuation in the processing time of the control device 120 and the controlled device 121 and the communication time of the control network 122, for example, a predetermined margin can be added to the threshold value of the elapsed time.
[0142] Criterion B2: When sequence numbers or transmission times from the control device 120 are set in the received data, whether or not they match the values in the previously received data. For example, if the sequence numbers are not consecutive or if the difference in transmission times exceeds a predetermined value, the received data is considered invalid; otherwise, the received data can be determined to be valid.
[0143] Criterion B3: When the transmission time is recorded in the control device 120, whether it matches the reception time of the received data. If the difference between the reception time and the transmission time (i.e., the communication time) exceeds a predetermined value, the received data is considered invalid; otherwise, the received data can be determined to be valid. If a real-time network with high time determinism is used for the control network 122, the predetermined value for determining the validity of the received data can be determined from the specifications of the control network 122. The transmission time may also be stored on the packet.
[0144] Criterion B4: Whether an error is detected based on an error detection code on the packet. An example of the error detection code is a cyclic redundancy check (CRC).
[0145] Criterion B5: Whether a value at a predetermined position on a packet is a predetermined value. In this case, a method of determining that a packet is valid when the value at a predetermined position on the packet is the predetermined value may be used, or conversely, a method of determining that a packet is invalid may be used. For example, the determination may be made using data updated by the controlled device 121 or the IRQ or WKC value in the EtherCAT datagram header.
[0146] If it is determined that the received data is valid (Y in step S051), the received data integration management unit 169 determines an allocation position for the received data in the received data storage unit 170 (step S052). Then, the received data integration management unit 169 allocates the received data to the position determined in step S052 (step S053). Then, the received data integration management unit 169 determines whether the set of received data is valid (step S054). If it is determined in step S054 that the set of received data is valid (Y in step S054), the received data integration management unit 169 validates the received data in the received data storage unit 170 (step S055).
[0147] On the other hand, if it is determined in step S051 that the received data is invalid (N in step S051), the received data integration management unit 169 executes a corresponding process (step S057). Examples of the corresponding process include an external presentation, including a notification such as an interrupt to the calculation unit 160 of the control device 120.
[0148] Alternatively, examples of the corresponding processing include invalidating an area that has already been received and allocated in the received data storage unit 170, or invalidating data that is scheduled to be received in the future. That is, the criteria for determining whether the received data is valid in step S051 include whether or not the invalidation processing in step S057 has been performed. Note that an example of the corresponding processing includes invalidating the invalidation processing itself after a predetermined number of packets or datagrams have been received, or after a predetermined time or period has elapsed. Such processing is also included in the corresponding processing in step S057 and the subsequent steps. Alternatively, invalidation of the invalidation processing may be performed independently of or in parallel with the procedure shown in FIG. 12.
[0149] Then, after processing step S055, after processing step S057, or when it is determined in step S054 that the received data set is invalid (N in step S054), the control device 120 determines whether the termination condition is satisfied (step S056). If the termination condition is satisfied (Y in step S056), the processing ends. The determination of the termination condition is the same as in step S027 in FIG. 9. In addition, the termination may be determined based on the processing result in step S057. For example, the termination may be determined when the number of invalidations exceeds a predetermined value.
[0150] Furthermore, in step S052, the received data integrated management unit 169 may determine the allocation position based on the order of reception or the time of reception. The control device 120 knows the start time and the communication cycle, so it can determine which cycle the communication is. Alternatively, the data sender, in this case, for example, the control device 120 or the control target device 121, may store information in the communication data specifying which communication it is and the allocation position. In this case, information such as the header may be used, or the data area in the packet or datagram may be used.
[0151] Alternatively, the data sender may store address information in the data area of the packet or datagram, which indicates the allocation location on the received data storage unit 170. In this case, if the physical address of the internal RAM of the EtherCAT slave is 16 bits (64 kB) and it is expected to have the effect of using a space larger than the internal RAM as the integrated data area, the bit width of the address needs to be greater than 16 bits.
[0152] Note that information indicating the allocation position on the received data storage unit 170 is essentially information determined by the control device 120, and therefore may not be stored on the packet, but may instead be stored in association with the identifier of the packet and the allocation position on the received data storage unit 170. In this case, the received data integration management unit 169 may determine the allocation position on the received data storage unit 170 from the identifier of the received packet. This method may also be applied to the data integration management unit 154 described in FIG. 9.
[0153] Furthermore, the response process in step S057 (such as invalidating the area of the received data storage unit 170) is executed starting from the packet reception in step S050. However, in consideration of the possibility of a communication abnormality in the control network 122, the response process may be executed after a predetermined time has elapsed (timeout) since the immediately preceding packet reception, allocation of received data, validation of a received data set, or the like.
[0154] <Example of Operation of the Communication Schedule Unit 162 and the Communication Schedule Composition Unit 164> Fig. 13 is a flow diagram showing an example of the procedure by which the communication schedule configuration unit 164 determines a communication schedule in Fig. 3. Figs. 14A, 14B, 14C, and 14D are schematic diagrams showing specific examples of communication schedules determined by the flow shown in Fig. 13. In Fig. 13, first, the communication schedule configuration unit 164 acquires information about the control system 123 from the control system information storage unit 163 (step S060). As shown in Fig. 14A, the acquired information includes the available data capacity, input / output size, and control period in the data storage unit 153 of each control target device 121.
[0155] The effective data capacity refers to the data size that can be allocated to control communication in the data storage unit 153. In the case of EtherCAT, the capacity of the internal RAM that can be allocated to process data communication, which corresponds to control communication, is one-third of the capacity allocated to mailbox communication, etc., if any, plus the SyncManager that manages exclusive control of the internal RAM. For example, if the data storage unit 153 (internal RAM) is 8 kB and 2 kB is allocated to mailbox communication, the effective data capacity is (8 kB - 2 kB) / 3 = 2 kB.
[0156] The input / output size is the data size to be updated by the control device 120 per control cycle. Here, it is referred to as input / output, but it may be input only or output only. Furthermore, if the EtherCAT LRW command is used, input (read from the perspective of the control device 120) and output (write from the perspective of the control device 120) can be communicated simultaneously, so there is no need to measure the input size and output size separately and add them up. For example, even if the input size (e.g., sensor value) and output size (e.g., command value) each require 2 kB, the input / output size may be 2 kB instead of 4 kB.
[0157] Here, we will use an example where communication is performed using the LRW command. However, input and output may be communicated using the LRD command and LWR command, respectively. Also, the input size and output size do not have to be equal. In this case, input and output may be communicated using the LRD command and LWR command, respectively, or LRW may be used to match the smaller size, and the remaining amount may be communicated using either the LRD command (if the input size is large) or the LWR command (if the output size is large).
[0158] Furthermore, the information acquired by the communication schedule configuration unit 164 from the control system information storage unit 163 includes restrictions and requests regarding the number of FMMUs (Fieldbus Memory Management Units) installed and the number of uses of each control target device 121. The restrictions and requests regarding the number of uses may be for each control target device 121. Similar information may also be included for the SyncManager.
[0159] After executing step S060, the datagram configuration determination unit 166 determines the configuration of the datagram to be transmitted from the control device 120 to the control target device 121 (step S061). For example, the number of datagrams within a control period can be calculated by dividing the input / output size by the available data capacity. Furthermore, if communication is performed at equal intervals, the communication period can be calculated from the number of datagrams.
[0160] In the case of FIG. 14A, the number of datagrams and communication cycle of each control target device 121 are determined by the following (A) to (C). (A) In the case of the controlled device 121A Number of datagrams: 1000B / 500B = 2 Communication cycle: 1ms / 2 = 500μs (B) In the case of the controlled device 121B Number of datagrams: 5000B / 500B = 10 Communication cycle: 10ms / 10 = 1ms (C) Control target device 121C Number of datagrams: 1000B / 1000B = 1 Communication cycle: 1ms / 1 = 1ms
[0161] The datagram configuration determination unit 166 determines the datagram configuration based on the calculated number of datagrams within the control cycle and the communication cycle. At this time, it is necessary to take into consideration the maximum allowable data size that can be communicated, as defined by the protocol of the control network 122. For example, in IEEE 802.3, the maximum allowable data size is 1500 bytes (excluding the header and FCS), and in the case of EtherCAT, one datagram is 1486 bytes. In the case of EtherCAT, overhead such as the header increases with each datagram, so the maximum allowable data size per datagram and for the total number of datagrams decreases.
[0162] 14A, the effective data capacity of the control target devices 121A, 121B, and 121C is less than the maximum allowable data size of EtherCAT, so datagrams can be constructed individually. Alternatively, even if the control target devices 121A and 121B are combined, the total is (500B + 500B = 1000B), which is less than the maximum allowable data size of EtherCAT, so the control target devices 121A and 121B can be combined. On the other hand, if the control target devices 121A and 121C are combined, the total is (500B + 1000B = 1500B), which exceeds the maximum allowable data size of EtherCAT, so the control target devices 121A and 121C cannot be combined. The same applies to the combination of the control target devices 121B and 121C.
[0163] In this way, the datagram configuration determination unit 166 determines the configuration of the datagram taking into consideration the available data capacity and the maximum allowable data size (allowable size of a communication packet and allowable size in datagram units) in the control network 122. In this case, the communication cycle and the number of divisions into partial areas when integrating in the data integration management unit 154 may differ for each control target device 121. In the example described above, the number of divisions into partial areas is 2 for the control target device 121A, 10 for the control target device 121B, and 1 for the control target device 121C.
[0164] Next, based on the datagram configuration determined in step S061, the logical address determination unit 165 determines the allocation of logical addresses in the data storage unit 153 of each control target device 121 (step S062). For example, when datagrams for communicating with the control target devices 121A, 121B, and 121C shown in Fig. 14A are individually configured, there are no restrictions on the allocation of logical addresses, so they can be assigned freely. As an example, the logical address determination unit 165 may assign logical addresses as shown in Fig. 14C.
[0165] On the other hand, when the control target devices 121A and 121B are combined, it is necessary to allocate the data storage units 153 of the control target devices 121A and 121B to continuous areas. In this case, the logical address determination unit 165 may allocate logical addresses as shown in FIG. 14B, for example.
[0166] Next, the communication schedule configuration unit 164 determines the transmission timing of each datagram (step S063). Examples of the transmission timing determined by the communication schedule configuration unit 164 include a communication cycle and a transmission timing offset for each control target device 121. The transmission timing is determined so as to satisfy requirements such as the control cycle, input / output size, and the communication cycle that can be calculated in step S061.
[0167] 14B and 14C show examples of the transmission timing determined in step S063. In FIG. 14B and FIG. 14C, the communication periods of the control target devices 121A, 121B, and 121C are determined to be 500 μs, 1 ms, and 1 ms, respectively. The transmission timing offset for the control target device 121C is determined to be 250 μs. In the case of FIG. 14C, a transmission timing offset is also provided for the control target device 121B.
[0168] 14B and 14C, for example, assuming that the unit time is 1 ms, the number of datagrams of the control target device 121A in the unit time is two, and the size of each datagram is 500 bytes. The number of datagrams of the control target device 121B in the unit time is one, and the size of the datagram is 500 bytes. The number of datagrams of the control target device 121C in the unit time is one, and the size of the datagram is 1000 bytes.
[0169] After step S063, the communication schedule construction unit 164 determines whether a predetermined condition is satisfied (step S064). This determination may be made, for example, by determining whether each or a plurality of steps S061 to S063 have been executed a predetermined number of times. Alternatively, the determination may be made by determining whether a required value is satisfied for one or a plurality of the number of datagrams, the number of packets, and the communication bandwidth utilization rate per predetermined unit time.
[0170] The predetermined unit time is, for example, the maximum communication cycle calculated in step S061. In the cases of Figures 14B and 14C, the communication cycle of the control target devices 121B and 121C is 1 ms, which is the maximum value among the control target devices 121A, 121B, and 121C, and therefore this is regarded as the unit time.
[0171] Also, for example, the required values of the number of datagrams, the number of packets, and the communication bandwidth utilization rate are stored in advance in the control system information storage unit 163. The communication bandwidth utilization rate is the proportion of data communication time per unit time in the control network 122. The data communication time includes, for example, the communication time of the packet (communication frame) itself as well as the communication time of a preamble, a start frame delimiter (SFD), an FCS, an interframe gap (IFG), and the like.
[0172] Alternatively, in step S064, the communication schedule construction unit 164 may determine whether the number of datagrams and the number of packets have reached their ideal values. For example, the ideal number of packets is the maximum value of either the minimum number of packets required based on datagram division or the minimum number of packets required based on the maximum allowable size. In this case, for example, the maximum communication cycle calculated in step S061 is used as the unit time for either.
[0173] 14B and 14C, the unit time, which is the maximum communication cycle, is 1 ms, and the number of datagrams required per unit time for the control target device 121A is 2. On the other hand, the number of datagrams required per unit time for both the control target devices 121B and 121C is 1. Therefore, the minimum number of packets required based on datagram division is determined by the control target device 121A and is 2.
[0174] On the other hand, if the total effective data capacity per unit time in the controlled devices 121A, 121B, and 121C is divided by the maximum allowable size of an EtherCAT datagram and rounded up to an integer, with Ceil() as the ceiling function, we get Ceil((500B × 2 + 500B + 1000B) / 1486B) = 2. As a result, both the minimum required number of packets based on datagram division and the minimum required number of packets based on the maximum allowable size are 2, so the maximum number of packets is 2. The ideal value for the number of datagrams is the same as the ideal value for the number of packets. Therefore, the ideal value for the number of datagrams is 2.
[0175] 14D shows an example of a datagram configuration, logical address assignment, and transmission timing determined to minimize the number of packets and datagrams. In this example, access to the control target device 121C is divided into multiple packets, and the divided accesses to the control target device 121C and the accesses to the control target device 121A are made continuous. For this reason, the data storage unit 153 of the control target device 121A is assigned two logical addresses (A, A').
[0176] In this way, the communication schedule construction unit 164 determines the datagram construction, logical address assignment, and transmission timing based on the available data capacity, input / output size, and control period. This configuration minimizes the number of packets and datagrams, and minimizes communication overhead associated with headers and IFGs. This allows the excess communication bandwidth to be used to perform other communications such as setting and status acquisition signals, and can be used for visualization of the controlled device 121 and the control system 123, and for maintenance and diagnosis using IoT. This allows for more advanced operation of the control system 123, improving its performance and availability as a control system.
[0177] As a solution to the above method of determining a communication schedule, the area of the data storage unit 153 of each control target device 121 is allocated to a continuous logical address space. In addition, the data storage unit 153 of a control target device 121 that transmits multiple datagrams per unit time (the maximum value among the maximum communication cycles of each control target device 121 calculated in step S061) may be allocated to multiple logical addresses. In this case, the data storage units 153 of the same control target device 121 are not allocated to continuous logical addresses, as in the case of the control target device 121A in Fig. 14D.
[0178] This method is used when, as in the case of Fig. 14D, if a datagram is sent with the control target devices 121 consecutively assigned to logical addresses, it will be impossible to store all the data in a single datagram. On the other hand, in Fig. 14D, if the effective data capacity of the control target device 121C is as small as 500B, the number of packets and the number of datagrams can be minimized by assigning logical addresses in the order of the control target devices 121B, 121A, and 121C.
[0179] Specifically, the first datagram may be an LRW command that accesses the control target devices 121B and 121A, and the next datagram every 500 μs may be an LRW command that accesses the control target devices 121A and 121C. In this case, multiple pieces of data to be sent for the control target device 121A can each be stored in a single datagram, so there is no need to assign multiple logical addresses to the control target device 121A.
[0180] 14D, two FMMUs are used in the control target device 121A to allow multiple allocations to logical addresses, or four in the case of both input and output. If the use of one FMMU is restricted to one, the allocation to the logical address of the data storage unit 153 of the control target device 121A may be limited to one location.
[0181] In this way, the number of datagrams becomes three. That is, the second packet in Fig. 14D becomes two datagrams because the logical addresses of the control target device 121A and the divided control target device 121C are not consecutive. On the other hand, since the number of communication packets remains two, the increased overhead can be limited to the size of one datagram, more specifically, the size of the datagram header and WKC. As a specific example of a method, a method is shown in which the communication schedule configuration unit 164 is configured to set the priority relationship and weights of the communication requirements and resource (FMMU) requirements, and the communication schedule configuration unit 164 makes a decision based on that information.
[0182] If the conditions are satisfied in step S064 (Y in step S064), the communication schedule composing unit 164 notifies the communication schedule unit 162 of the determined communication schedule (step S065). The communication schedule unit 162 determines the packet transmission timing based on the communication schedule notified from the communication schedule composing unit 164.
[0183] In addition, when steps S061 to S063 are executed multiple times to plan multiple communication schedules, the best plan based on a predetermined evaluation index is notified to the communication schedule unit 162, for example. The evaluation index is, for example, one of the number of packets, the number of datagrams, and the communication bandwidth utilization rate, or a weighted value of multiple of these. For example, the priority and weight of these evaluation indexes are set in the communication schedule configuration unit 164.
[0184] If the conditions are not satisfied in step S064 (N in step S064), the process returns to step S061. In this case, the return procedure may be step S062 or S063 instead of S061, or may change each time the process returns from step S064. The return destination may be determined based on the determination result of step S064. For example, if the number of packets or the number of datagrams is an ideal value, the process may return to a procedure other than S061.
[0185] Furthermore, based on the determined logical address configuration, the communication schedule configuration unit 164 may determine a datagram for logical address assignment (FMMU setting) to be transmitted to each control target device 121. In this case, at the time of initialization, the control device 120 may include the setting contents of the FMMU in a datagram group and transmit the datagram group to the control target device 121.
[0186] <Exploratory method, optimization method> Furthermore, one or more of the datagram configuration by the datagram configuration determination unit 166 in step S061, the logical address assignment by the logical address determination unit 165 in step S062, and the transmission timing by the communication schedule configuration unit 164 in step S063 may be determined using a search method or an optimization method. These methods include exhaustive search, metaheuristics such as genetic algorithms and particle swarm optimization, and combinatorial optimization algorithms.
[0187] When these search methods and optimization methods are used, the ideal values of the number of datagrams and the number of packets described above may be used as the termination conditions, or one or more of the number of datagrams, the number of packets, and the communication bandwidth utilization rate set by a system operator, etc. When multiple conditions are used, the termination condition may be, for example, satisfying one, more, or all of the multiple conditions.
[0188] <Example of memory integration> Fig. 15A is a diagram illustrating a specific example of the operation of the control target device 121 in Fig. 9. Here, the allocation of logical addresses follows that of Fig. 14B. Fig. 15A shows an example of the configuration of a control system 123 including a control device 120 and control target devices 121A, 121B, and 121C. In Fig. 15A, when focusing on the control target device 121A, the capacity of the data storage unit 153 is set to 4000 bytes, with the following breakdown: Input data: 500 bytes x 3 = 1500 bytes Output data: 500 bytes x 3 = 1500 bytes Mailbox communication: 1000 bytes
[0189] The input data is, for example, sensor information or status information acquired by the control target device 121A, and is data transmitted from the control target device 121A to the control device 120. The output data is, for example, control command information or setting update information for actuator output in the control target device 121A, and is data transmitted from the control device 120 to the control target device 121A. The capacity for each of the input data and output data is three times the data capacity that is originally required due to exclusive control by the SyncManager.
[0190] The input data and output data are combined using an LRW command, and the communication data size is 500 bytes. Fig. 15B is a diagram showing the allocation of logical addresses to each control target device 121 in Fig. 15A and an example of FMMU settings for the control target device 121A. These settings are executed within the initialization command for the control target device 121. As a result, the 500-byte space from logical addresses 0x0001_0000 to 0x0001_01F3 is allocated to the input / output of the control target device 121A.
[0191] Fig. 15C is a diagram showing an example of allocation of each area in data storage unit 153 and setting of SyncManager in controlled device 121A shown in Fig. 15A. Here, settings for mailbox communication are not shown. Since settings are required for both input data and output data, two SyncManagers are used, one for input data and one for output data. Registers and bits not shown are set appropriately.
[0192] 15D is a diagram showing an example of data allocation to integrated data storage unit 155 by data integration management unit 154 in control target device 121A shown in FIG. 15A. As shown in FIG. 14A, control target device 121A has an input / output size of 1000 bytes. Therefore, when processing output data, in other words, control data, data integration management unit 154 needs to integrate and manage two pieces of communication data obtained by dividing the size (1000 bytes) of the output data notified to control target device 121A from control device 120 by 500 bytes, which is the size of the output data of data storage unit 153.
[0193] Similarly, when processing input data, in other words, control data, the data integration management unit 154 needs to integrate and manage two pieces of communication data obtained by dividing the size of the input data (1000 bytes) notified from the control target device 121A to the control device 120 by 500 bytes, which is the size of the input data in the data storage unit 153. In this way, the number of times the input data is integrated and managed can be calculated by dividing the input size of the control target device 121A by the input data size allocated in the data storage unit 153. Similarly, the number of times the output data is integrated and managed can be calculated by dividing the output size of the control target device 121A by the output data size allocated in the data storage unit 153.
[0194] Note that the number of times of integrated management and the number of times of communication are equal when the communication data sizes of the input data and the output data are equal to or larger than the input data size and output data size allocated by the data storage unit 153. On the other hand, when data for the control target device 121 is distributed into multiple datagrams of multiple packets, or when the communication data sizes of the input data and the output data are smaller than the input data size and output data size allocated by the data storage unit 153, the number of times of communication increases. For this reason, the number of times of integrated management and the number of times of communication are not equal.
[0195] The data integration management unit 154 must manage communications and data updates in the data storage unit 153 until the required input and output sizes are obtained. For example, if the communication data size of the datagram that communicates the output data is 1000 bytes and the output data size allocated to the data storage unit 153 is 2000 bytes, the output data size of 2000 bytes will be obtained by two communications (2000 bytes / 1000 bytes=2).
[0196] 15D, in the control target device 121A, two planes of integrated memory areas, memory 110a and memory 110b, are prepared as integrated memory areas constituting the integrated data storage unit 155. This allows the calculation unit 160 to perform calculation processing using memory 110a, which already has all of the necessary partial areas 111a and 111b, until, for example, all of the necessary partial areas 111c and 111d are collected in memory 110b. In this specification, memories 110a and 110b are collectively referred to as memory 110, and partial areas 111a-111d are collectively referred to as partial area 111. The number of planes of memory 110 may be three or more. Furthermore, two planes of memory 110 may be prepared for input data and two planes of memory 110 for output data.
[0197] For example, the operation when communicating a datagram as shown in Fig. 14B from the control device 120 to the control target device 121A will be described. At the time of time offset 0 in the first 1 ms communication period (assumed to be T[0]), the control target device 121A receives a datagram 180a of an LRW command having a total of 1000 bytes of data intended for the control target devices 121A and 121B (corresponding to Y in step S020 and step S021 in Fig. 9). The data integration management unit 154 stores the data corresponding to itself in the datagram 180a in the partial area 111a of the memory 110a (corresponding to steps S023 and S024 in Fig. 9).
[0198] Next, at a time offset of 500 μs in the same communication cycle T[0], the control target device 121A receives a datagram 180c of an LRW command having 500 bytes of data intended for the control target device 121A. The data integration management unit 154 stores the datagram 180c in the partial area 111b of the memory 110a.
[0199] At this point, all partial areas 111a and 111b of memory 110a are prepared (corresponding to Y in step S025 in FIG. 9). In other words, by writing partial data to partial areas 111a and 111b, control data is prepared in memory 110a, which corresponds to the integrated memory area obtained by integrating partial areas 111a and 111b. The data integration management unit 154 notifies the calculation unit 160 and grants the calculation unit 160 access to memory 110a (corresponding to step S026 in FIG. 9). The calculation unit 160 accesses memory 110a to obtain necessary information and executes predetermined calculation processing.
[0200] Thereafter, at a time offset of 0 in the next 1 ms communication cycle (T[1]), the control target device 121A receives the datagram 180a and stores the necessary portion in the partial area 111c of the memory 110b. Subsequently, at a time offset of 500 μs in the same communication cycle T[1], the control target device 121A receives the datagram 180c and stores it in the partial area 111d of the memory 110b.
[0201] At this point, all partial areas 111c and 111d of memory 110b have been collected, so data integration management unit 154 notifies calculation unit 160 and grants calculation unit 160 access rights to memory 110b. Data integration management unit 154 also disables memory 110a or disables access from calculation unit 160, and waits for the reception of output data in the next periodic communication. Thereafter, this series of operations is repeatedly executed.
[0202] From a software perspective, the memory 110 can be expressed by the following pseudo code: unsigned char memory[2]
[1000] ; / / Memory 110a, 110b The data integration management unit 154 grants the calculation unit 160 appropriate access rights to the memory 110 by, for example, processing such as a pointer in C language or encapsulation in object-oriented languages. When switching between the memories 110a and 110b, appropriate exclusive control (such as a semaphore or mutex) is performed. Note that this is the case where access to the memories 110a and 110b is managed by software, but the management of the memories 110a and 110b may be configured by hardware such as an IC or FPGA and hidden from the software.
[0203] Which partial area 111 of which memory 110 the received output data corresponds to may be determined based on the order of reception or the time of reception. By sharing the communication cycle between the control device 120 and the control target device 121 in advance, the control target device 121 can determine which communication cycle it is from the time of reception. In this case, the start time may be shared between the control device 120 and the control target device 121, or the time when the control target device 121 first receives the data after starting processing may be stored in the control target device 121 as the start time.
[0204] For example, mailbox communication may be used to share information between the control device 120 and the control target device 121. Alternatively, information specifying the order of the communication, or specifying either the memory 110 or the partial area 111, or both, may be stored in the communication data. In this case, information such as a header may be used, or a data area on a packet or datagram may be used.
[0205] Alternatively, address information indicating the position of the partial area 111 in the memory 110 may be stored in the data area of the packet or datagram. In this case, if the physical address of the internal RAM of the EtherCAT slave is 16 bits (64 kB) and it is expected that a space larger than the internal RAM will be used as the integrated data area, the bit width of the address needs to be greater than 16 bits.
[0206] Furthermore, when the data integration management unit 154 receives data for a partial area 111, it may enable only that partial area 111 so that the calculation unit 160 can access it. For example, when data for partial area 111a has been received but data for partial area 111b has not been received, the calculation unit 160 may be configured to be able to use the data for partial area 111a.
[0207] In this case, for example, when the calculation unit 160 accesses the partial area 111b, the data integration management unit 154 or the integrated data storage unit 155 is configured to return an error to the calculation unit 160. Also, for example, the data integration management unit 154 or the integrated data storage unit 155 notifies the calculation unit 160 that the partial area 111a is valid and the partial area 111b is invalid. In such a configuration, the memory 110 may have only one surface.
[0208] The same applies to communication of input data such as sensor data acquired by the control target device 121, and the operation is as follows: Note that the memories 110a and 110b used in the following description are for input data, and are provided separately from the memories 110a and 110b for output data described above.
[0209] First, the calculation unit 160 collects necessary input data in the first 1 ms communication cycle and transfers the data to the data integration management unit 154 (corresponding to step S035 in FIG. 10). The data integration management unit 154 writes the transferred input data to the memory 110a (corresponding to Y in step S040 in FIG. 11). The data integration management unit 154 transfers the input data written in the partial area 111a of the memory 110a to the access exclusion control unit 152 so that the input data can be stored in the datagram 180a of the LRW command received at time offset 0 in FIG. 14B (corresponding to step S043 in FIG. 11). The access exclusion control unit 152 writes the transferred input data to the data storage unit 153.
[0210] 14B, the data integration management unit 154 transfers the input data written in the partial area 111b of the memory 110a to the access exclusion control unit 152 so that the input data can be stored in the datagram 180c of the LRW command received at a time offset of 500 μs in FIG. 14B. The access exclusion control unit 152 writes the transferred input data into the data storage unit 153.
[0211] In parallel, once the calculation unit 160 has gathered the necessary input data for the next 1 ms communication cycle, it transfers the data to the data integration management unit 154. In order to maintain the consistency of memory 110a, the data integration management unit 154 writes the new input data transferred from calculation unit 160 to memory 110b. In subsequent periodic operations, the data integration management unit 154 alternately writes the input data transferred from calculation unit 160 to memory 110a and memory 110b.
[0212] In the next communication cycle of 1 ms, the data integration management unit 154 transfers the input data written in the partial area 111c of the memory 110b to the access exclusion control unit 152 so that the input data can be stored in the datagram 180a of the LRW command received with the time offset 0. The access exclusion control unit 152 writes the transferred input data into the data storage unit 153.
[0213] Next, the data integration management unit 154 transfers the input data written in the partial area 111d of the memory 110b to the access exclusion control unit 152 so that the input data can be stored in the datagram 180c of the LRW command received at a time offset of 500 μs. The access exclusion control unit 152 writes the transferred input data into the data storage unit 153. Thereafter, this series of operations is repeatedly executed.
[0214] With the above configuration, even if there is a limit to the storage capacity of the data storage unit 153 when transferring output data from the control device 120 to the control target device 121 and when transferring input data from the control target device 121 to the control device 120, it is possible to communicate data of a larger size in communication with the calculation unit 160. That is, in this example, the storage capacity of the data storage unit 153 is limited to 500 bytes for input data and 500 bytes for output data, but the calculation unit 160 can virtually communicate 1000 bytes of data using memories 110a and 110b that configure the integrated data storage unit 155.
[0215] <Specific Operation of the Control Device 120> The above-described integration and division of output data and input data in the control target device 121 is also the same in the control device 120. In the transmission process from the control device 120 to the control target device 121, integrated data calculated and updated by the calculation unit 160 is written to the transmission data storage unit 161. The communication schedule unit 162 divides and transmits the integrated data written to the transmission data storage unit 161 in accordance with the communication schedule determined by the communication schedule configuration unit 164.
[0216] On the other hand, in the reception process from the control target device 121 to the control device 120, the reception data integration management unit 169 writes the sequentially received information into the reception data storage unit 170, integrates the data, and notifies the calculation unit 160 of the update of the reception data. At this time, either or both of the transmission data storage unit 161 and the reception data storage unit 170 may have the functions of exclusive control of writing and reading and simultaneous execution, similar to the access exclusive control unit 152 in the control target device 121.
[0217] <Timing for writing input data to data storage unit 153> When communicating periodically from the control device 120, the writing of input data from the data integration management unit 154 to the data storage unit 153 via the access exclusive control unit 152 is executed asynchronously at the timing that becomes Y in step S042 in FIG. 11. At this time, a configuration is exemplified in which the communication cycle of the control device 120 is shared with the controlled device 121, and the controlled device 121 manages the timing of step S042 in FIG. 11 for each communication cycle.
[0218] However, in such a configuration, problems such as unupdated data and duplicate updating of data within the same cycle occur due to errors in the time management functions (crystal oscillators and software timers) of the control device 120 and the controlled device 121. In the time management functions of the control device 120 and the controlled device 121, for example, time errors occur due to individual differences in crystal oscillators, so errors accumulate even if the same cycle is measured.
[0219] FIG. 16 is a schematic diagram showing an example of problems when errors occur in time management between the control device 120 and the controlled device 121. As shown in FIG. 16, if the cumulative error in time management becomes large, a cycle shift will occur, and the input data on the data storage unit 153 may be updated repeatedly within the same communication cycle, or the input data may not be updated within a certain communication cycle. When the input data on the data storage unit 153 is updated repeatedly within the communication cycle, the previously updated input data is overwritten and becomes invalid.
[0220] In such a situation, appropriate sensor data and the like will not be transmitted to the control device 120, so control processing and the like will not be calculated appropriately, and as a result, the control performance of the control system 123 will deteriorate. To prevent such a cycle shift, a configuration is exemplified in which the periodic communication from the control device 120 and the writing of input data by the data integration management unit 154 to the data storage unit 153 are synchronized.
[0221] <When time synchronization is performed by DC> For example, the control device 120 and the control target device 121 can be synchronized by a time synchronization protocol such as DC executed by the time synchronization unit 156 in the control target device 121 shown in Fig. 6. Then, the data integration management unit 154 controls the writing of input data to the data storage unit 153 (the timing at which step S042 in Fig. 11 becomes Y) based on the synchronized time.
[0222] Fig. 17A is a time chart showing an example of the operation when the data integration management unit 154 in Fig. 6 writes input data to the data storage unit 153, assuming that time synchronization is performed. Fig. 17A shows a description focusing on one control target device 121. 17A, Tp0 and Tp1 are periodic transmission timings from the control device 120. Dc is a communication delay from the control device 120 to the control target device 121. A real-time network such as EtherCAT can determine Dc with high accuracy and certainty. Di is the time it takes for the data integration management unit 154 to write input data to the data storage unit 153. Di may include a margin that takes into account the maximum value of fluctuations in processing time by the data integration management unit 154 and the access exclusion control unit 152.
[0223] The time TiN (N is a period identifier) at which the data integration management unit 154 starts writing input data, that is, the timing at which Y occurs in step S042 in FIG. 11, can be determined by equation (1). TiN = TpN + Dc - Di …(1)
[0224] To calculate formula (1), for example, TpN or a method for determining TpN is shared in advance between the control device 120 and the controlled device 121. Specifically, for example, if the communication cycle of the control device 120 is 1 ms, a rule may be established such that the control device 120 starts communication when the end of the synchronization time (unit: ns) by DC is a multiple of 1,000,000 ns.
[0225] Alternatively, to calculate formula (1), the next scheduled transmission time may be included in the communication from the control device 120. In this case, the communication is not limited to periodic communication, and the transmission timing of the control device 120, and therefore the timing of writing input data by the data integration management unit 154, can be determined at any communication timing. If the control device 120 and the control target device 121 are time-synchronized, the time at which the data integration management unit 154 starts writing input data can be determined in this way.
[0226] Note that, for example, if the data integration management unit 154 cannot be started before the input data write timing due to implementation constraints such as software (if the input data write timing is not completed in time), the input data may not be written. Furthermore, a predetermined notification means may be used to notify the outside that the input data could not be written in time. This notification allows a system operator or the like to take measures such as reviewing the implementation of the controlled device 121, thereby improving the reliability of the operation of the control system 123. Examples of external notification means include an EtherCAT interrupt (using an IRQ on the datagram header) and visual means such as an LED or a human-machine interface on the controlled device 121 or the control device 120.
[0227] <If time synchronization is not performed> 17B is a time chart showing an example of the operation when the data integration management unit 154 in FIG. 6 writes input data to the data storage unit 153, assuming that time synchronization is not performed. If time synchronization such as DC is not performed due to constraints on the corresponding functions of the control device 120 and the control target device 121 or due to operational reasons of the control system 123, the write timing of the input data by the data integration management unit 154 may be determined as shown in FIG. 17B.
[0228] In Fig. 17B, the data integration management unit 154 uses a timer function (not shown in Fig. 6, etc.) to start a timer every time a packet associated with periodic communication is received from the control device 120, thereby determining the timing of writing input data. In Fig. 17B, P is the communication cycle of the control device 120. Dint is the delay time from when the control target device 121 starts receiving packets from the control device 120 until when it notifies the data integration management unit 154. An interrupt is generally used for this notification. When an interrupt is used, it is configured so that an interrupt occurs when a packet is received or when writing to the internal RAM via the SyncManager. Dw is the set time of the timer.
[0229] At time TiN, the data integration management unit 154 starts writing input data to the data storage unit 153 by an interrupt triggered by a timeout after the timer setting time has elapsed. At this time, the timeout period of the timer can be determined by equation (2). Dw = P - Dc - Dint - (Di - Dc) = P - Dint - Di …(2) Generally, Dint is often very small compared to other parameters, and may be ignored or included in the margins of other parameters.
[0230] In this way, the problem of periodic deviation can be avoided by controlling the writing of input data by the data integration management unit 154 in synchronization with periodic communication from the control device 120. Note that this configuration is based on the premise that the error in the time management functions of the control device 120 and the control target device 121 is sufficiently small, no periodic deviation occurs before a timer timeout occurs, and no problem occurs in which the input data is not updated in time for the reception of periodic packets from the control device 120 due to a time error.
[0231] The data integration management unit 154 may not set a timer, but may write input data in response to periodic packet reception from the control device 120. Alternatively, instead of starting the timer by an interrupt every time a packet is received, the data integration management unit 154 may start the timer by an interrupt due to packet reception and then operate the timer cyclically during a period that is not affected by accumulated errors in the time management function.
[0232] <Synchronization method when packet loss occurs> Fig. 18 is a time chart showing an example of operation that is a modification of Fig. 17B. As shown in Fig. 17B, when a timer is started based on communication from the control device 120, packet loss may occur in the communication from the control device 120. In such a case, the set time of the timer may be updated again, as shown in Fig. 18.
[0233] 18, for example, when the data integration management unit 154 is activated by a timer interrupt (e.g., a timeout) at Ti1, it is illustrated that the data integration management unit 154 sets a period P at the time of Ti1 and starts the timer so that a timeout interrupt occurs at Ti2. Also, taking into consideration that packet loss occurs continuously, it is illustrated that the data integration management unit 154 sets a period P at the time of Ti2 and starts the timer so that a timer interrupt occurs at Ti3. In this way, it is illustrated that the timer is updated every time a timer interrupt occurs.
[0234] Alternatively, the data integration management unit 154 may observe the elapsed time and update the input data each time a period accumulates and elapses. However, in this case, since time errors accumulate due to errors in the time management function, the data integration management unit 154 may correct the timeout period to be updated from the period P based on the accuracy of the time management function.
[0235] For example, if the oscillator accuracy error of the control device 120 and the controlled device 121 is 50 ppm and the period P is 1 ms, then an error of up to 100 ns (100 ns = 1 ms × (50 ppm × 2)) will occur between the control device 120 and the controlled device 121 each time a period elapses. Therefore, when updating the timer setting, the timeout value may be set to the value obtained by subtracting the 100 ns error from the 1 ms period. By generating a timer interrupt early in consideration of the time error, the data integration management unit 154 can update the input data before communication from the control device 120.
[0236] If packet loss continues and it is predicted that the cumulative error of the time management function cannot be ignored, the timer setting may be stopped and an abnormal state may be notified to the outside. Examples of means for notifying the outside include an interrupt by EtherCAT (using an IRQ on the datagram header) and visual means such as an LED or a human machine interface on the controlled device 121 or the control device 120.
[0237] In addition, the data integration management unit 154 may, for example, set the period P as a timeout value in the timer at the timing of Ti1 in Figure 18, and then interrupt the timer at the timing when a packet is received from the control device 120 (for example, Tr2 in Figure 18), and change the timer's setting time (timeout time) back to Dw.
[0238] <Synchronization method for retransmission and redundancy> 19 is a time chart showing an example of the operation when the data integration management unit 154 in FIG. 6 writes input data to the data storage unit 153, assuming that retransmission or route redundancy communication is performed. The control device 120 may perform retransmission or route redundancy communication to improve communication reliability. In this case, the timing of receiving a packet at the control target device 121 may be delayed. In the example shown in FIG. 19, the reception timing Tr2 is delayed to Tr2'. The following describes how to deal with this situation.
[0239] Generally, if the control device 120 is unable to confirm normal communication before a predetermined period (timeout time) has elapsed (for example, if a normal packet is not received), it determines that an abnormality has occurred and retransmits the transmitted packet. In this case, the reception timing is delayed by the timeout time. Furthermore, since retransmissions can be performed multiple times, there is a possibility that a delay equivalent to the timeout time for the number of retransmissions can occur. Furthermore, when route redundant communication is performed, the communication path of the packet can change, and in this case too, the reception timing at the control target device 121 changes. In this case, the reception timing may not only be delayed, but may also be advanced.
[0240] 20A and 20B are schematic diagrams showing an example of a situation in which a path abnormality occurs between the control target device 121b and the control target device 121c. In FIG. 20A, the control device 120 transmits packets from both of the two communication ports consisting of the transmitters 167a and 167b. Focusing on the reception timing of the control target device 121c, when the path is normal, the control target device 121c receives the packet after passing through the control target devices 121a and 121b. On the other hand, when a path abnormality occurs, the control target device 121c receives the packet transmitted from the transmitter 167b as the first and only packet. In this case, the packet reception timing may be earlier than normal.
[0241] 20B, when a path abnormality occurs, the control device 120 transmits a packet from the transmitter 167a, and after receiving the packet at the receiver 168a, transfers the packet to the transmitter 167b. Focusing on the reception timing of the control target device 121c, the communication path becomes longer, so the reception timing of the packet at the control target device 121c is delayed.
[0242] Therefore, the control target device 121 first determines whether the received packet is a packet due to retransmission or route redundancy. In this case, the control target device 121 may make a determination by comparing the reception timing of the packet when there is no abnormality with the reception timing of the packet to be determined, and comparing the time difference with a predetermined threshold. The reception timing of the packet when there is no abnormality may be the time obtained by adding the period P to the previous reception timing when normal. Note that the time of the reception timing may be a time synchronized by a synchronization protocol such as DC, or may be the time of the control target device 121 itself. Since there is no need to compare the time with the control device 120 or other control target devices 121, the time of the control target device 121 itself can be used.
[0243] Alternatively, the control device 120 may indicate that the packet is a retransmission in a parameter (for example, an index in the EtherCAT datagram header) when retransmitting the packet. Furthermore, the control device 120 may indicate the number of retransmissions within the same period. Alternatively, as shown in FIG. 20B, the control device 120 may reflect in a parameter on the packet that the packet is a redundant communication when forwarding the packet from the transmitting unit 167b. For example, the control target device 121 may determine a retransmission or route redundancy when detecting these parameter values for the received packet.
[0244] When receiving packets associated with retransmission or route redundant communication, the control target device 121 may control the update timing of the input data using a timeout value to which the period P is added, as shown in Fig. 18, without updating the timer interrupt due to the received packets. Alternatively, if the delay time of the reception timing is known, the control target device 121 may use that value to change the timeout time of the timer. For example, in the case of retransmission, the control device 120 retransmits after a timeout, so the delay time is known.
[0245] More specifically, the timeout time To is shared between the control device 120 and the controlled device 121, and when the controlled device 121 receives a retransmitted packet, the timeout time To is corrected using equation (3) and the timer is set. Dw' = Dw - To × Cr …(3) Here, Cr is the number of retransmissions, and the control target device 121 can be identified by the control device 120 reflecting the number of retransmissions in a parameter on the packet.
[0246] Even in the case of route redundancy, if the change in communication delay due to a change in the packet communication route is known, the timeout period can be calculated in the same way by substituting To × Cr in equation (3). To make this possible, in the configuration shown in Fig. 20B, the control device 120 reflects the path abnormality location in the parameters on the packet when forwarding the packet to the transmitter 167b, for example.
[0247] At this time, the control device 120 includes in the packet a datagram (for example, a BRD command) that all control target devices 121 respond to and update the WKC, and when the receiving unit 168a receives the packet during a path abnormality, the control device 120 can determine the location of the path abnormality by checking the value of the WKC. Once the control target device 121 knows the location of the path abnormality, it can calculate the delay change due to the path redundancy communication based on the packet transfer time of each control target device 121, the packet transfer time of the control device 120, the cable length between the control target devices 121, etc.
[0248] The above method solves the problems of data not being updated due to a periodic discrepancy and of data being updated multiple times within the same period.The above configuration is not limited to configurations based on EtherCAT, but can also be applied to configurations based on the IEEE 802.3 communication standard with a communication bandwidth of 1 Gbps or more, or communication methods with large frame sizes such as jumbo frames.
[0249] <Assigning the same logical address to multiple slaves> The same logical address may be assigned to different control target devices 121. With this configuration, if data is integrated and managed by the data integration management unit 154 and integrated data storage unit 155 of each control target device 121, high reliability can be achieved through redundancy of processing. For example, by connecting a physically common input / output device to multiple control target devices 121, high reliability of input / output control can be achieved.
[0250] <Dynamic change of division number and communication schedule> The number of divisions into partial regions when integrating in the data integration management unit 154 and the integrated data storage unit 155, and the received data integration management unit 169 and the received data storage unit 170 can be changed depending on the state of the control system 123 and the controlled device 121. This includes changing the control recipe in the control system 123.
[0251] That is, a change in state or a change in control recipe may change the control cycle and input / output size of the controlled device 121. Alternatively, if the control system 123 or the controlled device 121 is a mobile body, the execution operation may change depending on its location. For example, the required control cycle and input / output size may change when a mobile picking robot is simply moving and when it performs a picking operation near a conveyor or another robot. This may also change the number of divisions into partial regions.
[0252] When the control device 120 changes the number of divisions of partial areas, the control period, the input / output size, etc. of the control target device 121, it only has to notify the control target device 121 of the changed information. This notification may be made using mailbox communication or a dedicated format. An example of the dedicated format is one that includes one or more of the fact that information has changed, the type of information that has changed, and the changed value.
[0253] In such a case, for example, the communication schedule composition unit 164 may re-execute the composition of the communication schedule shown in Fig. 13 and Fig. 14A to Fig. 14D. In detail, the communication schedule composition unit 164 may re-execute the composition when the state changes, or may re-execute the composition in advance before the state changes and store the execution result.
[0254] In this way, the communication schedule configuration unit 164 reconfigures the communication schedule in response to a change in the state of the control system 123 or a change in the control recipe. As a result, the components of the communication schedule, such as the allocation of the address space of each control target device 121 to the logical address space, the size of the datagram, the logical address and command of the access destination, the transmission timing, and the communication cycle, can be dynamically changed.
[0255] <Non-constant number of divisions> The number of divided partial regions when integrating them in the data integration management unit 154 and the integrated data storage unit 155, or the received data integration management unit 169 and the received data storage unit 170, does not have to be the same number of periods for each set. For example, the partial regions may be integrated using one period of data in the first set, three periods of data in the next set, five periods of data in the set after that, and so on, with the operation of integrating one period of data, three periods of data, and five periods of data being repeated thereafter.
[0256] Such an operation is effective when the pattern operation accompanying the repetition is appropriate by repeating a routine process by the control system 123. To realize this, for example, a periodic pattern may be stored in advance in the controlled device 121, or the control device 120 may notify the controlled device 121 of the periodic pattern.
[0257] <Discontinuous subregions> The partial areas that are integrated in the data integration management unit 154 and the integrated data storage unit 155, and the received data integration management unit 169 and the received data storage unit 170 do not necessarily have to be consecutive in the order of reception, and may be in any order. This is because the order that the sending side can prepare may be discontinuous, or a situation may arise in which the receiving side cannot necessarily receive the data in order due to packet loss, retransmission, etc.
[0258] By supporting discontinuous partial regions, the transmission order does not need to be continuous, allowing the sender to have flexibility in the data to be sent, and similarly increasing the flexibility of the sender's application. Note that, as a specific example of a method for supporting this, information indicating the order of data can be included in the transmission data that is not sequential.
[0259] <Functional sharing using multiple CPUs and multiple cores> Figures 22A and 22B are block diagrams showing configuration examples obtained by modifying the hardware configuration of the control target device 121 shown in Figure 4. In Figure 22A, a multi-CPU consisting of multiple CPUs 101a and 101b is provided instead of the CPU 101 shown in Figure 4. In Figure 22B, a multi-core CPU 190 having multiple CPU cores 191 is provided instead of the CPU 101 shown in Figure 4.
[0260] 6 may be provided for each of the plurality of CPUs 101a and 101b, or for each of the plurality of CPU cores 191. When the integrated data storage unit 155 is configured using the memory 104 or the nonvolatile storage medium 105, a plurality of memories 104 or nonvolatile storage media 105 may be physically provided, or the storage area of the memory 104 or the nonvolatile storage medium 105 may be divided for each of the plurality of CPUs 101a and 101b, or for each of the plurality of CPU cores 191.
[0261] In the data storage unit 153 in the control target device communication control IC 130, the same storage area may be shared by the multiple CPUs 101a, 101b or the multiple CPU cores 191, or the storage area may be divided among the multiple CPUs 101a, 101b or the multiple CPU cores 191. Furthermore, the communication schedule configuration unit 164 in the control device 120 may determine a communication schedule by regarding the multiple CPUs 101a, 101b or the multiple multi-core CPUs 190 in the control target device 121 as a single communication destination, or may determine a communication schedule by regarding each as an individual communication destination.
[0262] With this configuration, each of the CPUs 101a and 101b or each of the CPU cores 191 can execute its own dedicated function (for example, control, maintenance, diagnosis, preventive maintenance, etc.). As a result, the function and performance of the controlled device 121 can be improved while executing multiple arithmetic functions, and the control system 123 can be made more sophisticated and sophisticated.
[0263] <Multiple Control Devices 120> Fig. 23 is a schematic diagram showing a modified configuration example of the control communication system shown in Fig. 1. In Fig. 23, unlike the case of Fig. 1, a plurality of control devices 120a and 120b control a group of control target devices 121 via an integrated network 200. In the specification, the plurality of control devices 120a and 120b are collectively referred to as control device 120. The control communication system shown in Fig. 23 includes a group of control target devices 121, i.e., a group of control target devices 121 consisting of control target devices 121a-121d and a group of control target devices 121 consisting of control target devices 121e-121g, but may also include a single group of control target devices 121.
[0264] The integrated network 200 is a network that allows multiple control devices 120 to control one or more groups of control target devices 121 while satisfying constraints in constructing the control network 122. A TSN is an example of the integrated network 200. In this case, each individual control device 120 may control (transmit / receive input / output data to / from) a different control target device 121, or multiple control devices 120 may control the same control target device 121.
[0265] An example of a case where the same control target device 121 is controlled by multiple control devices 120 is a case where distributed control of the same control target device 121 is performed between the multiple control devices 120. In this case, the data integration management unit 154 of the control target device 121 may control the allocation position of received data in the integrated data storage unit 155 or transmitted data to the control device 120 based on the identification of the control device 120 when integrally managing input / output data to the integrated data storage unit 155. When identifying the control device 120, a source address on the packet (such as a source MAC address in the header of an IEEE 802.3 frame) may be used, or an identifier of the control device 120 may be included on the packet (for example, an index in an EtherCAT datagram header).
[0266] Note that a control device 120 may adjust the transmission timing with respect to other control devices 120, and may have a different transmission timing. Also, a configuration may be adopted in which communication packets from a control device 120 or a control target device 121 can be received by other control devices 120.
[0267] The above configuration enables integrated management of received data in the received data integrated management unit 169 of the control device 120. Also, distributed control using multiple control devices 120 allows load distribution. Furthermore, when a control device 120 fails, another control device 120 takes over the processing, improving the availability of the control system 123 and making it highly reliable. Alternatively, by adjusting the number of control devices 120 according to the performance requirements of the control system 123, the control system 123 can be operated optimally from the standpoint of device cost, energy consumption, and the like. In other words, the number of control devices 120 may be dynamically changed according to the operating status of the control system 123.
[0268] <SyncManagerとオブジェクトへのアクセス> For example, assume that mailbox communication or process data communication such as CoE (CAN application protocol over EtherCAT) is performed in EtherCAT. In this case, a method is used in which the internal RAM (data storage unit 153) of the control target device 121 is divided, and each divided area is managed and accessed via the SyncManager (exclusive access control unit 152), thereby accessing the object.
[0269] In the embodiment, the provision of the data integration management unit 154 and the integrated data storage unit 155 provides the effect of virtually increasing the effective data capacity of the internal RAM accessible by the SyncManager. As a method for associating objects with the virtually increased effective data capacity in this way, a method of defining a new intermediary object is exemplified.
[0270] The intermediary object manages the correspondence between the partial area included in the received datagram and the location where the object to be accessed is stored in integrated data storage unit 155. Therefore, the components of the intermediary object may include one or more combinations of the index of the object to be accessed and its location in integrated data storage unit 155.
[0271] When a datagram is received and an area in data storage unit 153 mapped by the intermediary object is updated, the intermediary object retrieves the data in the updated area, identifies the received data, and updates the data of the corresponding object in integrated data storage unit 155. Therefore, the actual operation of the intermediary object can be said to be based on the function of data integration management unit 154. As a result, an application running on calculation unit 160 can access a target object by retrieving the data of the required object from the corresponding area in integrated data storage unit 155.
[0272] On the other hand, when data is transmitted from the control target device 121 to the control device 120, the received data integration management unit 169 and the received data storage unit 170 operate in the same manner as the data integration management unit 154 and the integrated data storage unit 155, respectively. That is, the received data integration management unit 169 identifies the received data, determines the corresponding object, and stores the received data in a location on the received data storage unit 170 where the target object is stored. Note that the received data can be identified by using, for example, one or more of a method of recognizing the number of cycles in which the data is received, a method based on the time of reception, or a method of including identification information in the information on the received data.
[0273] The above operations are performed, for example, by using either an SDO (Service Data Object) or a PDO (Process Data Object), or both.
[0274] The relationship between an intermediary object and one or more target objects managed by the intermediary object may be defined as a vendor-specific tag in the ESI or ENI. In this case, examples of information defined in the unique tag include identification information of the received data and information (such as an index) of the object corresponding to the received data. This definition also allows the control device 120 to transmit the relationship between the target objects managed by the intermediary object to the controlled device 121 as an initialization command defined in the ENI.
[0275] Similarly, the index of the intermediary object associated with the SyncManager may be defined in ESI or ENI. Alternatively, the relationship between the target objects managed by the intermediary object may be defined in a unique way other than ESI or ENI.
[0276] As another method for associating an object with a virtually increased effective data capacity, an intermediary object may not be provided, and data integration management unit 154 (received data integration management unit 169 in the case of input data) may manage the data. That is, when a datagram is received and an area in data storage unit 153 is updated, data integration management unit 154 obtains the data in the updated area and identifies the received data, thereby updating the data of the corresponding object in integrated data storage unit 155.
[0277] As is clear from the association with this object, the data integration management unit 154 may integrate a partial area (an area managed by one SyncManager) of the data storage unit 153 (internal RAM) as a partial area and as an integrated data area on the integrated data storage unit 155.
[0278] <Layering, parallelization> Fig. 24 is a block diagram showing a modified functional configuration of the communication processing unit 140 shown in Fig. 6. So far, the integration by the data integration management unit 154 and integrated data storage unit 155 in the control target device 121, and the received data integration management unit 169 and received data storage unit 170 in the control device 120 has been described. The partial areas used in this case may be managed hierarchically or in parallel. That is, as shown in Fig. 24, a plurality of data integration management units 154a-154c and a plurality of integrated data storage units 155a, 155b may be provided hierarchically or in parallel, and each of the data integration management units 154a-154c may integrate the partial areas.
[0279] 24, the data integration management units 154b and 154c are in a parallel relationship with each other and have a hierarchical structure with respect to the data integration management unit 154a. The data integration management unit 154a integrates the partial areas 111a and 111b into the integrated data area 112a using the integrated data storage unit 155a. Specifically, the data integration management unit 154a combines, for example, two sets of received data into one integrated data area 112a. Then, when the integrated data area 112a becomes valid, the data integration management unit 154a transfers the data in the integrated data area 112a to the data integration management units 154b and 154c.
[0280] The data integration managers 154b and 154c further integrate the data into the integrated data area 112a as a partial area. For example, the data integration manager 154b integrates the data from the two integrated data areas 112a from the data integration manager 154a by writing it into the integrated data areas 112b and 112c, and generates data in the integrated data area 112d for the calculation unit 160a. Similarly, the data integration manager 154c integrates the data from the four integrated data areas 112a from the data integration manager 154a by writing it into the integrated data areas 112e-112h, and generates data in the integrated data area 112i for the calculation unit 160b.
[0281] Therefore, integrated data area 112d is configured with data received four times in total, and integrated data area 112i is configured with data received eight times in total. Note that, although the data integration management units 154b and 154c are configured to share the integrated data storage unit 155b in Fig. 24, each of the data integration management units 154b and 154c may be provided with an integrated data storage unit 155b.
[0282] 24, it is possible to provide integrated data suitable for applications that use different amounts of data, and therefore suitable for the calculation unit 160. For example, the calculation unit 160a can execute a control application, and in parallel with this, the calculation unit 160b can execute a diagnostic application or an AI application that analyzes and diagnoses input / output data and the control target device 121.
[0283] Furthermore, when the control system 123 or requirements are changed, the size of the integrated data can be easily changed by adopting a hierarchical structure or a parallel structure. In addition, the size of the integrated data for each calculation unit 160 can be changed without affecting the other calculation units 160. The hierarchical structure or the parallel structure may be configured with one device (e.g., a CPU) or multiple devices (e.g., a CPU, an ASIC, an FPGA).
[0284] <First data deviation> Furthermore, when the control system 123 is started or resumed after an interruption, if the received partial area is not the first data, the received data is discarded until the first data is received. As a method for determining whether the data is the first data, for example, a method for determining from the reception time of the received data or information on the received data. This allows timing to be matched even if the start timings of the control device 120 and the control target device 121 do not match.
[0285] <The effect of being able to use a space larger than the logical address space> By using the method of the embodiment, data received by a command accessing a logical address space can be treated as a partial area, and multiple partial areas can be integrated, making it possible to use a data area larger than the logical address space.
[0286] <Effects of changes, discontinuation of production, discontinuation of sales, and discontinuation of provision> Furthermore, in the method of the embodiment, the partial areas are integrated as an integrated data area by the data integration management unit 154 and the integrated data storage unit 155, which are independent of the access exclusion control unit 152 (SyncManager) and the data storage unit 153 (internal RAM). Therefore, an IC different from the EtherCAT slave IC can be used as the data integration management unit 154 and the integrated data storage unit 155. This improves the flexibility in IC selection, making it possible to use, for example, a high-performance CPU or a CPU or GPU specialized for specific processing. Furthermore, when the CPU being used is upgraded or discontinued, it can be replaced with a different CPU, allowing for flexible response to such upgrades and discontinuations.
[0287] <Overall effect> By using the method of the embodiment, even if there is a limit to the available area of the data storage unit 153 via the access exclusion control unit 152, the integrated management of the data area by the data integration management unit 154 and the integrated data storage unit 155 enables high-speed, large-capacity communication between the control device 120 and the control target device 121. Furthermore, high-speed, large-capacity communication is possible without increasing the effective data capacity (internal RAM capacity) of special hardware such as the access exclusion control unit 152 (SyncManager), thereby reducing component costs.
[0288] Furthermore, the communication schedule configuration unit 164, which includes the logical address determination unit 165 and the datagram configuration determination unit 166, determines the datagram configuration and assigns it to a logical address, thereby suppressing an increase in the number of packets and datagrams and reducing the communication overhead associated with headers and IFGs. This allows for effective use of the communication bandwidth. The surplus communication bandwidth can be used to perform other communications such as setting and status acquisition, and can be used for visualization of the controlled device 121 and the control system 123, and for maintenance and diagnosis using IoT. As a result, the operation of the control system 123 can be enhanced, and the performance and availability of the control system 123 can be improved.
[0289] The invention made by the inventor has been specifically described above based on the embodiments, but the present invention is not limited to the above embodiments and can be modified in various ways without departing from the spirit of the invention. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and the present invention is not necessarily limited to those including all of the described configurations. Furthermore, it is possible to replace part of the configuration of one embodiment with the configuration of another embodiment, or to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace part of the configuration of each embodiment with other configurations.
[0290] For example, the various programs described above may be stored in a non-transitory, tangible, computer-readable recording medium and then supplied to a computer. Examples of such recording media include magnetic recording media such as hard disk drives, optical recording media such as DVDs (Digital Versatile Discs) and Blu-ray Discs, and semiconductor memories such as flash memories and SSDs (Solid State Drives). [Explanation of symbols]
[0291] 110: Memory (integrated data area), 111: Partial area, 120: Control device, 121: Control target device, 123: Control system, 152: Access exclusive control unit, 153: Data storage unit, 154: Data integration management unit, 155: Integrated data storage unit, 160: Calculation unit, 164: Communication schedule configuration unit, 165: Logical address determination unit, 166: Datagram configuration determination unit, 169: Received data integration management unit, 170: Received data storage unit
Claims
1. A calculation unit that processes control data; a communication unit that transmits a packet including the control data; a data storage unit having an exclusive control function; A communication control device having The calculation unit Associating a position in the control data of each of the two or more partial data constituting the control data with an attribute related to the packet communicated by the communication unit; The partial data is exchanged with the communication unit via the data storage unit; determining whether a received first packet is valid based on one or more of information on the packet, a communication timing of the packet, and a validity determination of a second packet received subsequent to the first packet; if it is determined that the first packet is not valid, the partial data included in the first packet is not included in the control data; Communications control device.
2. A calculation unit that processes control data; a communication unit that transmits a packet including the control data; a data storage unit having an exclusive control function; A communication control device having The calculation unit Associating a position in the control data of each of the two or more partial data constituting the control data with an attribute related to the packet communicated by the communication unit; The partial data is exchanged with the communication unit via the data storage unit; Validating and processing the partial data as the control data based on one or more of the number, total size, and content of the partial data; Communications control device.
3. 3. The communication control device according to claim 2, the calculation unit has an area for storing first control data and an area for storing second control data, and processes the second control data that has already been validated until the first control data is validated; Communications control device.
4. A calculation unit that processes control data; a communication unit that transmits a packet including the control data; a data storage unit having an exclusive control function; A communication control device having The calculation unit Associating a position in the control data of each of the two or more partial data constituting the control data with an attribute related to the packet communicated by the communication unit; The partial data is exchanged with the communication unit via the data storage unit; writing the partial data to the data storage unit in synchronization with the communication of the packet by the communication unit; Communications control device.
5. A control communication system including a first communication control device and a second communication control device controlled by the first communication control device, Each of the first communication control device and the second communication control device a calculation unit for processing control data; a communication unit that transmits a packet including the control data; a data storage unit having an exclusive control function; and The calculation unit Associating a position in the control data of each of the two or more partial data constituting the control data with an attribute related to the packet communicated by the communication unit; The partial data is exchanged with the communication unit via the data storage unit; the first communication control device determines a communication schedule including a datagram configuration constituting the packet, a communication timing of the packet, an access destination address of the data storage unit of the second communication control device specified in the packet, and an allocation of a virtual area to the data storage unit of the second communication control device, based on a control period in the second communication control device, a required data capacity per control period, and a capacity of the data storage unit; Control communication system.
6. 6. The control communication system according to claim 5, a plurality of the second communication control devices; The first communication control device calculating the number of datagrams per control period from the required data capacity per control period of the second communication control unit and the capacity of the data storage unit; Calculating a communication period per datagram based on the control period; determining a basic communication cycle having a maximum value among the communication cycles in the plurality of second communication control devices, and determining a concatenation of datagrams so that the amount of packets in the basic communication cycle is equal to or less than an allowable amount; determining allocation of the virtual area to the data storage unit of the second communication control unit based on the configuration of the concatenated datagrams; Control communication system.
7. 6. The control communication system according to claim 5, the first communication control device determines the communication schedule using a search method; Control communication system.
8. 7. The control communication system according to claim 6, The first communication control device a maximum value of the number of transmission datagrams per basic communication cycle required for each of the plurality of second communication control units; the number of packets calculated from the total required data capacity per basic communication cycle in the plurality of second communication control devices and the maximum allowable size per packet; Using determining a plan for the communication schedule when the number of packets per basic communication cycle matches the larger of the maximum value of the number of transmission datagrams or the number of packets calculated from the maximum allowable size per packet; Control communication system.
9. 6. The control communication system according to claim 5, the first communication control unit allocates the data storage unit of the second communication control unit to a plurality of areas in the virtual area; Control communication system.
10. 6. The control communication system according to claim 5, the first communication control device is time-synchronized with the second communication control device; the first communication control device transmits the packet based on a synchronized time; the second communication control device writes the partial data to the data storage unit based on the synchronized time; Control communication system.
11. 6. The control communication system according to claim 5, the calculation unit in the second communication control unit writes the partial data to the data storage unit after a waiting time determined based on a transmission timing of the first communication control unit has elapsed since the communication unit received the packet; Control communication system.
12. 12. The control communication system according to claim 11, the calculation unit in the second communication control device changes the waiting time based on any one of packet loss, retransmission, and transfer to a redundant route of the packet. Control communication system.
13. 6. The control communication system according to claim 5, assigning said control data to a predetermined data structure; the first communication control device and the second communication control device share the allocation of the data structure; Control communication system.
14. 6. The control communication system according to claim 5, the calculation unit in the second communication control device associates a position of the partial data in the control data based on an identifier of the first communication control device; Control communication system.
Citation Information
Patent Citations
Real time communication device and system
JP2000076163A
Monitoring control system, monitoring control device, and controller
WO2015163092A1
Communication control device, communication control method, and communication control program
WO2019142337A1