WO2021033356A1 - Control system and control method - Google Patents

Control system and control method Download PDF

Info

Publication number
WO2021033356A1
WO2021033356A1 PCT/JP2020/009960 JP2020009960W WO2021033356A1 WO 2021033356 A1 WO2021033356 A1 WO 2021033356A1 JP 2020009960 W JP2020009960 W JP 2020009960W WO 2021033356 A1 WO2021033356 A1 WO 2021033356A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
unit
address
port
setting
Prior art date
Application number
PCT/JP2020/009960
Other languages
French (fr)
Japanese (ja)
Inventor
久則 五十嵐
西山 佳秀
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2021033356A1 publication Critical patent/WO2021033356A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks

Definitions

  • the present disclosure relates to a technique for relaying communication with an external device in a control system composed of a plurality of units.
  • Patent Document 1 Japanese Unexamined Patent Publication No. 2016-1948078 discloses a PLC capable of accessing a database of an external device.
  • Various functional units can be connected to the control unit.
  • a functional unit there is a relay unit that relays communication with an external device.
  • the control unit and the functional unit are communicated via the internal network.
  • the relay point In order to access the device connected to the control unit from the external device, the relay point from the network between the external device and the relay unit to the internal network and the network from the internal network to the network between the control unit and the device It is necessary to pass through the relay point. That is, the number of hops when accessing the device from an external device is at least 2. Therefore, it takes time and effort to set up the network for communication between the external device and the device.
  • the present disclosure has been made in view of the above problems, and an object of the present disclosure is to set up a network for communicating between two devices connected to the first unit and the second unit constituting a plurality of units, respectively. It is to provide a control system and a control method which can reduce the trouble of the above.
  • the control system is composed of a plurality of units.
  • the plurality of units include a first unit connected to the first network and a second unit capable of communicating with the first unit via the internal network and connected to the second network.
  • the first unit has a first port connected to the internal network.
  • the second unit has a second port connected to the internal network.
  • the second unit further includes a router and a first setting unit.
  • the router relays the packet by using the first routing table in which the network identifier that identifies the network and the address information of the forwarding destination of the packet destined for the device connected to the network are associated with each other.
  • the first setting unit acquires the first network identifier that identifies the first network from the first unit and the first address information assigned to the first port, and associates the first network identifier with the first address information. And set it in the first routing table.
  • a record in which the first network identifier and the first address information are associated with each other is automatically added to the first routing table. Therefore, it takes time and effort to manually set the network to access the device on the first network (hereinafter referred to as "first device") from the device on the second network (hereinafter referred to as "second device”). Is reduced.
  • first device the device on the first network
  • second device the device on the second network
  • the router forwards the packet to the first port. Since the destination of the packet is the first device, the first unit outputs the packet to the first network. As a result, the first device can receive the packet from the second device.
  • the first unit further assigns the first address information to the first port and the second to the second port using a network identifier that is not used in the network settings of the plurality of units. It has an address allocation unit for assigning address information.
  • the first and second address information of each of the first and second ports on the internal network is automatically assigned. Therefore, the trouble of manually setting the network for accessing the first device from the second device is further reduced.
  • the first unit further has a communication unit and a second setting unit.
  • the communication unit relays the packet using the second routing table in which the network identifier that identifies the network and the address information of the forwarding destination of the packet destined for the device connected to the network are associated with each other.
  • the second setting unit sets the second network identifier that identifies the second network and the second address information assigned by the address assignment unit in the second routing table in association with each other.
  • a record in which the second network identifier and the second address information are associated is automatically set in the second routing table. Therefore, the trouble of manually setting the network for accessing the second device from the first device is reduced.
  • the communication unit receives a packet destined for the second device from the first device, the communication unit forwards the packet to the second port. Since the destination of the packet is the second device, the router of the second unit outputs the packet to the second network. As a result, the second device can receive the packet from the first device.
  • the first unit further has a NAPT (Network Address Port Translation) processing unit for translating the source address and port number of the packet addressed to the first network.
  • NAPT Network Address Port Translation
  • a plurality of second devices can be connected to the first device at the same time by using one address information.
  • the second unit and the device (second device) on the second network are connected by VPN (Virtual Private Network).
  • the second device can operate as a device on the internal network.
  • a control method of a control system composed of a plurality of units includes the following first step and second step.
  • the plurality of units include a first unit connected to the first network, and a second unit capable of communicating with the first unit using the internal network and connected to the second network.
  • the first unit has a first port connected to the internal network.
  • the second unit has a second port connected to the internal network.
  • the second unit acquires the first network identifier that identifies the first network from the first unit and the first address information assigned to the first port, and the first network identifier and the first address.
  • This is a step to set a routing table associated with information.
  • the second step is a step in which the second unit relays the packet using the routing table.
  • This disclosure also reduces the time and effort required to set up a network for communicating between two devices connected to the first unit and the second unit, which form a plurality of units.
  • FIG. 1 is a diagram showing a configuration example of a control system according to an embodiment.
  • the control system 1 includes a control unit 100 and a relay unit 200.
  • the control system 1 may further include one or more functional units 300.
  • the control unit 100 is, for example, a PLC.
  • the control unit 100 controls the control target according to a user program designed in advance.
  • the control unit 100 includes a PLC engine 10 that executes a control calculation according to a user program or the like.
  • the PLC engine 10 of the example shown in FIG. 1 has three ports 11 to 13.
  • Port 11 is connected to the internal network NW1.
  • a relay unit 200 and a functional unit 300 are connected to the internal network NW1.
  • the PLC engine 10 can communicate with the relay unit 200 and the functional unit 300 via the internal network NW1.
  • TCP / IP is adopted for the internal network NW1.
  • Port 12 is connected to network NW2.
  • a support device 500 is connected to the network NW2.
  • the PLC engine 10 can communicate with the support device 500 via the network NW2.
  • the support device 500 is realized by using hardware (for example, a general-purpose personal computer) that follows a general-purpose architecture.
  • the support device 500 provides a development environment such as creating a user program executed by the PLC engine 10 of the control unit 100 and setting various information of the control unit 100 and the relay unit 200.
  • Port 13 is connected to network NW3.
  • One or more devices 400 are connected to the network NW3.
  • the PLC engine 10 can communicate with the device 400 via the network NW3.
  • the device 400 includes, for example, various industrial devices for automating the production process.
  • the device 400 includes another PLC, an HMI (Human Machine Interface), and a control target.
  • Controlled objects include, for example, robot controllers that control arm robots, servo drivers that control servo motors, visual sensors for photographing workpieces, pressure sensors, temperature sensors, and other equipment used in the production process. ..
  • the relay unit 200 is connected to the control unit 100 and is in charge of the communication function with the external device.
  • the relay unit 200 includes a router 20 that relays communication with an external device.
  • the example router 20 shown in FIG. 1 has three ports 22 to 24.
  • Port 22 is connected to the internal network NW1.
  • the port 23 is connected to the external network NW4.
  • the router 20 relays communication between the external device 600 connected to the external network NW4 and the control unit 100 and the functional unit 300 connected to the internal network NW1.
  • Port 24 is connected to the external network NW5.
  • the router 20 relays communication between the external device 700 connected to the external network NW5 and the control unit 100 and the functional unit 300 connected to the internal network NW1.
  • Ethernet (registered trademark) is adopted for the external networks NW4 and NW5.
  • the external network NW4 is a WAN (Wide Area Network)
  • the external network NW5 is a LAN (Local Area Network).
  • the router 20 executes packet relay processing based on the preset routing table 25.
  • the routing table 25 is a table in which a network identifier that identifies a network is associated with address information (IP address) of a transfer destination of a packet destined for a device connected to the network.
  • IP address address information
  • the relay unit 200 further includes an application server 21.
  • the application server 21 provides various services related to the control system 1.
  • the application server 21 illustrated in FIG. 1 provides an authentication service that centrally manages user accounts for various units constituting the control system 1. Specifically, the application server 21 collates the user account acquired from the access source device with the registration information, and determines whether or not to allow access according to the collation result.
  • the relay unit 200 operates as an authentication unit.
  • the application server 21 has a port 26 connected to the internal network NW1.
  • the application server 21 acquires a user account and outputs an authentication result via the port 26.
  • the functional unit 300 provides various functions for realizing control of various control targets by the control system 1.
  • the functional unit 300 may typically include an I / O unit, a safety I / O unit, a communication unit, a motion controller unit, a temperature control unit, a pulse counter unit, and the like.
  • the device 400 connected to the network NW3 can be accessed from the external device 600 connected to the external network NW4. If the device 400 can be accessed from the external device 600, the user can check the status of the device 400 via the external network NW4 which is a WAN even if he / she is in a remote place.
  • the relay unit 200 When the relay unit 200 is connected to the control unit 100, the user tends to interpret the control unit 100 and the relay unit 200 as being integrated. Therefore, the user expects to be able to access the device 400 using the external device 600 in the same way as when accessing the device 400 using the support device 500.
  • an internal network NW1 is always constructed between the control unit 100 and the relay unit 200.
  • Communication from the support device 500 to the device 400 may pass through a relay point between the network NW2 and the network NW3.
  • communication from the external device 600 to the device 400 needs to pass through a relay point between the external network NW4 and the internal network NW1 and a relay point between the internal network NW1 and the network NW3. Therefore, the network setting for accessing the device 400 from the external device 600 is more complicated than the network setting for accessing the device 400 from the support device 500. Therefore, it takes time and effort to manually set the network for accessing the device 400 from the external device 600.
  • control system 1 the following processing is performed in order to reduce the trouble of manually setting the network when accessing the device 400 from the external device 600 via the relay unit 200 including the application server 21. Will be executed.
  • control unit 100 automatically assigns a valid IP address in the internal network NW1 to ports 11, 22, 26 connected to the internal network NW1.
  • the relay unit 200 receives from the control unit 100 the network identifier of the network NW3 connected to the port 13 of the PLC engine 10 and the IP address assigned to the port 11 in the internal network NW1.
  • the relay unit 200 sets the routing unit 200 in the routing table 25 in association with the network identification received from the control unit 100 and the IP address of the port 11.
  • the router 20 when the router 20 receives a packet destined for the device 400 connected to the network NW3 from the external device 600, the router 20 refers to the routing table 25 and forwards the packet to the port 11. Since the destination of the packet transferred to the port 11 is the device 400 connected to the network NW3, the PLC engine 10 outputs the packet from the port 13 to the network NW3. As a result, the device 400 can receive the packet from the external device 600.
  • the network identifier of the network NW3 connected to the port 13 of the PLC engine 10 is associated with the address information (IP address) assigned to the port 11 in the internal network NW1. Is automatically set in the routing table 25. Therefore, the trouble of manually setting the network for accessing the device 400 from the external device 600 is reduced.
  • FIG. 2 is a schematic diagram showing a hardware configuration example of a control unit constituting a control system according to the present embodiment.
  • the control unit 100 has a processor 102 such as a CPU (Central Processing Unit) and a GPU (Graphical Processing Unit), a chipset 104, a main storage device 106, and secondary storage as main components. It includes a device 108, a USB (Universal Serial Bus) controller 112, a memory card interface 114, network controllers 116, 118, an internal bus controller 122, and an indicator 124.
  • a processor 102 such as a CPU (Central Processing Unit) and a GPU (Graphical Processing Unit)
  • chipset 104 such as a main storage device 106
  • main storage device 106 main storage device 106
  • secondary storage main components. It includes a device 108, a USB (Universal Serial Bus) controller 112, a memory card interface 114, network controllers 116, 118, an internal bus controller 122, and an indicator 124.
  • USB Universal Serial Bus
  • the processor 102 reads various programs stored in the secondary storage device 108, expands them in the main storage device 106, and executes them to realize control operations related to standard control and various processes as described later. ..
  • the chipset 104 realizes the processing of the control unit 100 as a whole by mediating the exchange of data between the processor 102 and each component.
  • the secondary storage device 108 stores a user program that operates in the execution environment provided by the system program.
  • the USB controller 112 is in charge of exchanging data with an arbitrary information processing device via a USB connection.
  • the memory card interface 114 is configured so that the memory card 115 can be attached and detached, and data such as a control program and various settings can be written to the memory card 115, or data such as a control program and various settings can be written from the memory card 115. It is possible to read it.
  • Each of the network controllers 116 and 118 is in charge of exchanging data with arbitrary devices (for example, support device 500 and device 400) via the network.
  • Network controllers 116, 118 may employ industrial network protocols such as EtherCAT®, EtherNet / IP®, DeviceNet®, CompoNet®.
  • the internal bus controller 122 is in charge of exchanging data with the relay units 200, 1 or a plurality of functional units 300 constituting the control system 1.
  • TCP / IP is used for the internal bus.
  • the indicator 124 notifies the operating state of the control unit 100 and the like, and is composed of one or a plurality of LEDs arranged on the surface of the unit.
  • FIG. 2 shows a configuration example in which the necessary functions are provided by the processor 102 executing the program, and some or all of these provided functions are provided by a dedicated hardware circuit (for example, ASIC). It may be implemented using (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array). Alternatively, the main part of the control unit 100 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, the virtualization technology may be used to execute a plurality of OSs (Operating Systems) having different uses in parallel, and to execute necessary applications on each OS.
  • OSs Operating Systems
  • FIG. 3 is a schematic diagram showing a hardware configuration example of a relay unit constituting a control system according to the present embodiment.
  • the relay unit 200 has a processor 202 such as a CPU and an MPU (Micro Processing Unit), a chipset 204, a main storage device 206, a secondary storage device 208, and the inside as main components. It includes a bus controller 210, a USB controller 212, a memory card interface 214, network controllers 216, 218, and an indicator 224.
  • a processor 202 such as a CPU and an MPU (Micro Processing Unit)
  • MPU Micro Processing Unit
  • the processor 202 realizes various communication functions as described later by reading various programs stored in the secondary storage device 208, deploying them in the main storage device 206, and executing the programs.
  • the chipset 204 realizes the processing of the relay unit 200 as a whole by mediating the exchange of data between the processor 202 and each component.
  • the secondary storage device 208 stores various data such as communication setting information that operates in the execution environment provided by the system program.
  • the internal bus controller 210 is in charge of exchanging data with the control unit 100 and the functional unit 300 via the internal bus.
  • the USB controller 212 is in charge of exchanging data with an arbitrary information processing device via a USB connection.
  • the memory card interface 214 is configured so that the memory card 215 can be attached and detached, and data such as a control program and various settings can be written to the memory card 215, or data such as a control program and various settings can be written from the memory card 215. It is possible to read it.
  • Each of the network controllers 216 and 218 is in charge of exchanging data with and from any device via the network.
  • the network controllers 216 and 218 may employ a general purpose network protocol such as Ethernet®.
  • the relay unit 200 communicates with the external device 600 via the network controller 216 and communicates with the external device 700 via the network controller 218.
  • the indicator 224 notifies the operating state of the relay unit 200, etc., and is composed of one or a plurality of LEDs arranged on the surface of the unit.
  • FIG. 3 shows a configuration example in which the necessary functions are provided by the processor 202 executing the program, and some or all of these provided functions are provided by a dedicated hardware circuit (for example, ASIC). Alternatively, it may be implemented using an FPGA or the like). Alternatively, the main part of the relay unit 200 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, virtualization technology may be used to execute a plurality of OSs having different uses in parallel, and to execute necessary applications on each OS.
  • a general-purpose architecture for example, an industrial personal computer based on a general-purpose personal computer.
  • virtualization technology may be used to execute a plurality of OSs having different uses in parallel, and to execute necessary applications on each OS.
  • FIG. 4 is a diagram showing a functional configuration example of the control unit and the relay unit constituting the control system.
  • FIG. 4 shows a functional configuration related to communication between the internal networks NW1, the networks NW2 and NW3, and the external networks NW4 and NW5.
  • the control unit 100 includes a communication unit 14, a DHCP (Dynamic Host Configuration Protocol) server 15, a NAT (Network Address Port Translation) processing unit 16, a setting unit 17, and a storage unit 18. including.
  • the communication unit 14 is realized by the processor 102 shown in FIG. 2, network controllers 116 and 118, an internal bus controller 122, and the like.
  • the DHCP server 15, the NAT processing unit 16, and the setting unit 17 are realized by the processor 102.
  • the storage unit 18 is realized by the main storage device 106 and the secondary storage device 108.
  • the storage unit 18 stores the routing table 181 and the conversion data 182.
  • the routing table 181 is a table in which a network identifier that identifies a network is associated with address information (IP address) of a transfer destination of a packet destined for a device connected to the network.
  • IP address address information
  • the conversion data 182 is data in which the IP addresses before and after the conversion are associated with each other.
  • the conversion data 182 is temporarily generated by the NAT processing unit 16.
  • the communication unit 14 controls communication between the internal network NW1 and the networks NW2 and NW3.
  • the communication unit 14 confirms the destination of the packet received from any of the internal network NW1 and the networks NW2 and NW3.
  • the communication unit 14 reads the IP address corresponding to the confirmed destination network identifier from the routing table 181.
  • the communication unit 14 forwards the packet to the read IP address.
  • the DHCP server 15 operates as an address assigning unit that assigns an IP address to ports 11, 22, and 26 connected to the internal network NW1.
  • the DHCP server 15 uses a network identifier that is not used in the network settings of all the units (control unit 100, relay unit 200, and functional unit 300) that make up the control system 1 to IP for ports 11, 22, and 26. Assign an address.
  • the NAT processing unit 16 performs NAPT processing between the internal network NW1 and the networks NW2 and NW3.
  • NAPT is a network address translation technology for sharing one IP address among a plurality of terminals. In the NAPT process, the source IP address and port number are translated.
  • the NAT processing unit 16 moves the IP address and port number of the packet source to the IP address and unused port number assigned to port 12. Convert to.
  • the NAT processing unit 16 moves the IP address and port number of the packet source to the IP address and unused port number assigned to the port 13. Convert to.
  • the NAT processing unit 16 generates conversion data 182 in which the IP address and port number before conversion and the IP address and port number after conversion are associated with each other, and stores the generated conversion data 182 in the storage unit 18.
  • the setting unit 17 sets the routing table 181.
  • the setting unit 17 sets the routing table 181 according to the setting data downloaded from the support device 500.
  • the setting unit 17 stores the set routing table 181 in the storage unit 18. The details of the setting method of the routing table 181 by the setting unit 17 will be described later.
  • the relay unit 200 includes a setting unit 28 and a storage unit 29 in addition to the router 20.
  • the setting unit 28 is realized by the processor 202 shown in FIG.
  • the storage unit 29 is realized by the main storage device 206 and the secondary storage device 208.
  • the setting unit 28 sets the routing table 25 stored in the storage unit 29.
  • the setting unit 28 sets the routing table 25 according to the setting data downloaded from the support device 500.
  • the setting unit 28 stores the set routing table 25 in the storage unit 29. The details of the setting method of the routing table 25 by the setting unit 28 will be described later.
  • FIG. 5 is a diagram showing a screen example for network setting of the control unit.
  • the setting screen 50 illustrated in FIG. 5 is displayed on the support device 500.
  • the support device 500 receives an input from the user for the setting screen 50.
  • the setting screen 50 has input fields 51 and 52 for setting the IP addresses of the ports 12 and 13, respectively.
  • the user inputs the IP address pre-assigned to the port 12 in the network NW2 into the input field 51, and inputs the IP address pre-assigned to the port 13 in the network NW3 into the input field 52.
  • the IP address of the port 12 is "192.168.200.1”
  • the IP address of the port 13 is "192.168.250.1”.
  • the network address length of the IP address is 24 bits. Therefore, the network identifier that identifies the network NW2 connected to the port 12 is "192.168.200”.
  • the network identifier that identifies the network NW3 connected to the port 13 is "192.168.250".
  • the setting screen 50 includes input fields 53 and 54 for setting the routing table 181.
  • a network identifier that identifies the network of the packet destination is input, and in the input field 54, the I address of the packet transfer destination is input.
  • "255.255.255.0" is set in advance as a subnet mask, and the first 24 bits of the IP address entered in the input field 53 are used as the network identifier.
  • the setting screen 50 includes a check box 56 for automatically assigning an IP address to a port (ports 11, 22, 26 in the example shown in FIG. 1) connected to the internal network NW1.
  • the setting screen 50 includes a check box 57 for executing NAPT processing between the internal network NW1 and the networks NW2 and NW3.
  • the setting screen 50 includes a check box 58 for executing automatic routing setting to the internal network NW1.
  • the support device 500 generates setting data according to the input to the setting screen 50.
  • the generated setting data is downloaded to the control unit 100.
  • processing according to the setting data is executed.
  • the IP addresses of the ports 12 and 13 are determined according to the input information in the input fields 51 and 52 of the setting screen 50.
  • the setting unit 17 of the control unit 100 adds a record in which the network identifier input in the input field 53 of the setting screen and the IP address input in the input field 54 are associated with the routing table 181. The details of the processing of the control unit 100 when the check boxes 56 to 58 are checked will be described later.
  • FIG. 6 is a diagram showing a screen example for network setting of the relay unit.
  • the setting screen 60 illustrated in FIG. 6 is displayed on the support device 500.
  • the support device 500 receives an input from the user for the setting screen 60.
  • the setting screen 60 has input fields 61 and 62 for setting the IP addresses of the ports 23 and 24, respectively.
  • the user inputs the IP address pre-assigned to the port 23 in the external network NW4 into the input field 61, and inputs the IP address pre-assigned to the port 24 in the external network NW5 into the input field 62.
  • the IP address of the port 23 is “10.0.0.1” and the IP address of the port 24 is “192.168.0.1”.
  • the network address length of the IP address is 24 bits. Therefore, the network identifier that identifies the external network NW4 connected to the port 23 is "10.0.0". The network identifier that identifies the external network NW5 connected to the port 24 is "192.168.0".
  • the setting screen 60 includes input fields 63 and 64 for setting the routing table 25.
  • a network identifier that identifies the network of the packet destination is input in the input field 63, and an I address of the packet transfer destination is input in the input field 64.
  • Note that "255.255.255.0" is preset as the subnet mask, and the first 24 bits of the IP address entered in the input field 63 are used as the network identifier.
  • the setting screen 60 includes a check box 65 for executing automatic routing setting to the internal network NW1.
  • the setting screen 60 includes a check box 66 for setting a VPN (Virtual Private Network) in the external networks NW4 and NW5.
  • the setting screen 60 accepts inputs to the input fields 67 to 69.
  • a pre-common key used for authentication between terminals connected by VPN is input.
  • the input fields 68 and 69 the user name and password used for authentication at the time of VPN connection are input, respectively.
  • the relay unit 200 and the external device 600 are connected by VPN.
  • the distribution address to the user is automatically set based on the IP address entered in the input fields 61 and 62.
  • the distributed addresses are displayed in the display fields 70 and 71. As shown in the figure, an IP address having the same network identifier as the IP address of the port 23 is distributed to the external device 600 connected to the external network NW4. An IP address having the same network identifier as the IP address of the port 24 is distributed to the external device 700 connected to the external network NW5.
  • control system 1 includes one or more functional units 300
  • network settings for one or more functional units 300 are performed using the same setting screen as the setting screen 60 shown in FIG.
  • the DHCP server 15 executes the process of assigning an IP address to the ports 11, 22, and 26 when the check box 56 of the setting screen 50 is checked.
  • FIG. 7 is a diagram for explaining the process of assigning an IP address to a port on the internal network.
  • the DHCP server 15 acquires the network identifier and IP address manually set in the network settings using the setting screens 50 and 60 from all the units (control unit 100, relay unit 200, and functional unit 300). The DHCP server 15 assigns a network identifier that is not used in the network settings of all units to the internal network NW1. In the example shown in FIG. 7, "172.16.250" is assigned as the network identifier of the internal network NW1.
  • the DHCP server 15 assigns an IP address to ports 11, 22, and 26 on the internal network NW1 using the network identifier.
  • the DHCP server 15 assigns an IP address obtained by combining an arbitrary 8-bit host identifier (host address) with the network identifier (network address) of the internal network NW1 to a port on the internal network NW1 in each unit.
  • the DHCP server 15 assigns the IP address “172.162.250.1” to the port 11 of the control unit 100.
  • the DHCP server 15 assigns a predetermined number (for example, 10) of IP addresses to units (relay unit 200 and functional unit 300) other than the control unit 100.
  • the number of IP addresses assigned to each unit is predetermined in consideration of the number of ports normally possessed by the unit.
  • the DHCP server 15 assigns 10 IP addresses "172.126.250.10" to "172.12.250.19" to the ports of the relay unit 200.
  • the relay unit 200 has two ports 22 and 26 as ports connected to the internal network NW1. Therefore, two IP addresses "172.126.250.10” and “172.12.250.11” out of the ten assigned IP addresses are assigned to the ports 22 and 26, respectively.
  • the control system 1 includes one functional unit 300
  • the DHCP server 15 assigns ten IP addresses "172.126.250.20" to "172.126.250.29" to the ports of the functional unit 300. Assign to.
  • the DHCP server 15 may inquire each of the relay unit 200 and the functional unit 300 about the number of ports connected to the internal network NW1.
  • the DHCP server 15 may assign each unit an number of IP addresses according to the response. For example, the relay unit 200 answers "two" to the inquiry from the DHCP server 15. In this case, the DHCP server 15 may assign two IP addresses to the relay unit 200.
  • the IP address may be manually assigned to the port on the internal network NW1.
  • Routing settings for transferring to the internal network in the control unit > Next, the routing table automatic setting for transferring to the internal network NW1 in the control unit 100 will be described.
  • the routing table automatic setting is executed by the setting unit 17 of the control unit 100.
  • the setting unit 17 executes the routing table automatic setting when the check box 58 (see FIG. 5) on the setting screen 50 is checked.
  • FIG. 8 is a diagram illustrating the automatic setting of the routing table for transferring to the internal network in the control unit.
  • the setting unit 17 acquires the IP addresses of the ports 23 and 24 connected to the external networks NW4 and NW5, respectively, from the relay unit 200. Further, the setting unit 17 acquires the IP address of the port 22 connected to the internal network NW1 in the relay unit 200 assigned by the DHCP server 15.
  • the setting unit 17 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 23 and the IP address of the port 22 are associated with each other in the routing table 181.
  • the network identifier included in the IP address of port 23 identifies the external network NW4 connected to port 23. Therefore, when the communication unit 14 of the control unit 100 receives a packet destined for the external device 600 connected to the external network NW4, the communication unit 14 transfers the packet to the port 22 of the relay unit 200 based on the routing table 181. Since the network identifier included in the destination of the packet indicates the external network NW4, the router 20 of the relay unit 200 outputs the packet to the external network NW4. As a result, the external device 600 can receive the packet addressed to itself.
  • the setting unit 17 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 24 is associated with the IP address of the port 22 to the routing table 181.
  • the network identifier included in the IP address of port 24 identifies the external network NW5 connected to port 24. Therefore, when the communication unit 14 of the control unit 100 receives a packet destined for the external device 700 connected to the external network NW5, the communication unit 14 transfers the packet to the port 22 of the relay unit 200 based on the routing table 181. Since the network identifier included in the destination of the packet indicates the external network NW5, the router 20 of the relay unit 200 outputs the packet to the external network NW5. As a result, the external device 700 can receive the packet addressed to itself.
  • the routing table 181 for transferring to the internal network NW1 may be set manually.
  • Routing setting for transferring to the internal network in the relay unit> Next, the routing table automatic setting for transferring to the internal network NW1 in the relay unit 200 will be described.
  • the routing table automatic setting is executed by the setting unit 28 of the relay unit 200.
  • the setting unit 28 executes the routing table automatic setting when the check box 65 (see FIG. 6) on the setting screen 60 is checked.
  • FIG. 9 is a diagram illustrating the automatic setting of the routing table for transferring to the internal network in the relay unit.
  • the setting unit 28 acquires the IP addresses of the ports 12 and 13 connected to the networks NW2 and NW3 from the control unit 100, respectively. Further, the setting unit 28 acquires the IP address of the port 11 connected to the internal network NW1 in the control unit 100 assigned by the DHCP server 15.
  • the setting unit 28 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 12 and the IP address of the port 11 are associated with each other in the routing table 25.
  • the network identifier included in the IP address of port 12 identifies the network NW2 connected to port 12. Therefore, when the router 20 of the relay unit 200 receives a packet destined for the support device 500 connected to the network NW2, the router 20 forwards the packet to the port 11 of the control unit 100 based on the routing table 25. Since the network identifier included in the destination of the packet indicates the network NW2, the communication unit 14 of the control unit 100 outputs the packet to the network NW2. As a result, the support device 500 can receive the packet addressed to itself.
  • the setting unit 17 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 24 is associated with the IP address of the port 22 to the routing table 181.
  • the network identifier included in the IP address of port 24 identifies the external network NW5 connected to port 24. Since the network identifier included in the destination of the packet indicates the network NW3, the communication unit 14 of the control unit 100 outputs the packet to the network NW3. As a result, the device 400 can receive the packet addressed to itself.
  • the routing table 25 for transferring to the internal network NW1 may be set manually.
  • the NAT processing is executed by the NAPT processing unit 16 of the control unit 100.
  • the NAT processing unit 16 executes the NAPT processing when the check box 57 (see FIG. 5) on the setting screen 50 is checked.
  • FIG. 10 is a diagram illustrating NAPT processing.
  • FIG. 10 shows an example of NAPT processing for a packet addressed to the network NW3 (hereinafter, referred to as a “target packet”).
  • the target packet is a packet whose source is the external device 600 with the IP address "10.0.0.2" and the destination is the device 400 with the IP address "192.168.250.2".
  • the NAT processing unit 16 converts the source IP address and port number of the target packet into the IP address and unused port number of the port 13 connected to the network NW3, respectively.
  • the NAT processing unit 16 generates conversion data 182 in which the IP address and port number before conversion and the IP address and port number after conversion are associated with each other, and stores the generated conversion data 182 in the storage unit 18.
  • the device 400 that received the target packet transmits a reply packet to the target packet.
  • the IP address and port number of the source of the target packet are converted into the IP address and the unused port number of the port 13 connected to the network NW3, respectively. Therefore, the device 400 sets the converted IP address and port number as the destination of the reply packet.
  • the NAPT processing unit 16 When the NAPT processing unit 16 receives a reply packet destined for the converted IP address and port number indicated by the translation data 182 from the network NW3, the NAPT processing unit 16 converts the destination of the reply packet. That is, the NAT processing unit 16 converts the destination of the reply packet into the IP address and port number before conversion indicated by the translation data 182. As a result, the destination IP address of the reply packet is converted to the IP address "10.0.0.2" which is the source of the target packet. As a result, the reply packet is transmitted to the external device 600 having the IP address "10.0.0.2" which is the source of the target packet.
  • FIG. 11 is a sequence diagram showing an example of automatic network setting.
  • the network automatic setting shown in FIG. 11 is executed when the check boxes 56 and 58 are checked on the setting screen 50 of FIG. 5 and the check boxes 65 are checked on the setting screen 60 of FIG.
  • the processor 102 of the control unit 100 acquires the configuration information of the relay unit 200 (step S1).
  • the configuration information indicates the model and product number of the relay unit 200.
  • the processor 102 confirms the configuration information of the relay unit 200 (step S2), and starts monitoring the relay unit 200 (step S3). Further, the processor 102 enables the IP addresses of the ports 12 and 13 according to the setting data downloaded from the support device 500 (step S4).
  • the processor 202 of the relay unit 200 confirms the mounting position (port 22 in the example shown in FIG. 1) with the control unit 100 (step S5). Further, the processor 102 enables the IP addresses of the ports 23 and 24 according to the setting data downloaded from the support device 500 (step S6).
  • the processor 202 of the relay unit 200 requests the control unit 100 for the IP address of the port on the internal network NW1 assigned by DHCP (step S7).
  • the processor 102 of the control unit 100 arbitrarily assigns a temporary IP address of each port on the internal network NW1 and distributes the temporary IP address (step S8).
  • the distributed temporary IP address is set (step S9).
  • the processor 202 of the relay unit 200 establishes an IP connection via the internal network NW1 by using the distributed temporary IP address (step S10).
  • the processor 102 of the control unit 100 transmits the configuration information of the control unit 100 to the relay unit 200 (step S11).
  • the configuration information indicates the model and product number of the control unit 100.
  • the processor 202 of the relay unit 200 confirms the configuration information of the control unit 100 (step S12).
  • the processor 202 of the relay unit 200 transmits the IP addresses of the ports 23 and 24 connected to the external networks NW4 and NW5 and the routing table 25 to the control unit 100 (step S13).
  • the IP addresses of ports 23 and 24 and the routing table 25 are preset in the manual network setting using the setting screen 60 shown in FIG.
  • the processor 102 of the control unit 100 assigns a network identifier that is not used in the network settings of all the units to the internal network NW1. Then, the processor 102 determines the IP addresses of all the ports (ports 11, 22, 26) connected to the internal network NW1 by using the network identifier of the internal network NW1 (step S14). The IP address is assigned by DHCP.
  • the processor 102 adds a record associated with the network identifier included in each of the IP addresses of the ports 23 and 24 acquired from the relay unit 200 and the IP address assigned to the port 22 to the routing table 181 (step S15). ).
  • the processor 102 of the control unit 100 instructs the relay unit 200 to release the temporary IP address (step S16). Further, the processor 102 distributes the official IP address determined in step S14 to the relay unit (step S17). In the relay unit 200, the distributed official IP address is set (step S18).
  • the processor 202 of the relay unit 200 establishes an IP connection via the internal network NW1 using the distributed formal IP address (step S19).
  • the processor 102 of the control unit 100 transmits information for addition to the routing table 25 to the relay unit 200 (step S20).
  • the information for addition to the routing table 25 includes the network identifiers of the networks NW2 and NW3 connected to the ports 12 and 13, respectively, and the IP address of the port 11.
  • the processor 202 of the relay unit 200 adds a record in which the network identifiers of the networks NW2 and NW3 are associated with the IP address of the port 11 to the routing table 25 (step S21).
  • control unit 100 and the relay unit 200 relay the packets by using the routing tables 181, 25, respectively.
  • the control system 1 is composed of a plurality of units.
  • the plurality of units include a control unit 100 and a relay unit 200.
  • the control unit 100 is connected to the network NW3 and can communicate with the device 400 via the network NW3.
  • the relay unit 200 can communicate with the control unit 100 via the internal network NW1.
  • the relay unit 200 is connected to the external network NW4 and can communicate with the external device 600 via the external network NW4.
  • the control unit 100 has a port 11 connected to the internal network NW1.
  • the relay unit 200 has a port 22 connected to the internal network NW1.
  • the relay unit 200 further includes a router 20 and a setting unit 28.
  • the router 20 relays a packet by using a routing table 25 in which a network identifier that identifies a network and an address information of a forwarding destination of a packet destined for a device connected to the network are associated with each other.
  • the setting unit 28 acquires the network identifier “192.168.250” that identifies the network NW3 from the control unit 100 and the IP address “172.162.250.1” assigned to the port 11.
  • the setting unit 28 sets the acquired network identifier and the IP address in the routing table 25 in association with each other.
  • the router 20 forwards the packet to the port 11. Since the destination of the packet is the device 400 connected to the network NW3, the control unit 100 outputs the packet from the port 13 to the network NW3. As a result, the device 400 can receive the packet from the external device 600.
  • the control unit 100 further has a DHCP server 15.
  • the DHCP server 15 assigns IP addresses to ports 11 and 22 using network identifiers that are not used in the network settings of a plurality of units. As a result, the IP address of the port on the internal network NW1 is automatically assigned. Therefore, the trouble of manually setting the network for accessing the device 400 from the external device 600 is further reduced.
  • the control unit 100 further includes a communication unit 14 and a setting unit 17.
  • the communication unit 14 relays the packet using the routing table 181.
  • the setting unit 17 sets the network identifier that identifies the external network NW4 and the IP address of the port 22 assigned by the DHCP server 15 in the routing table 181 in association with each other.
  • the network identifier of the external network NW4 and the IP address assigned to the port 22 are associated and automatically set in the routing table 181. Therefore, the trouble of manually setting the network for accessing the external device 600 from the device 400 is reduced.
  • the communication unit 14 forwards the packet to the port 22. Since the destination of the packet is the external device 600 connected to the external network NW4, the router 20 of the relay unit 200 outputs the packet from the port 23 to the external network NW4. As a result, the external device 600 can receive the packet from the device 400.
  • the control unit 100 further has a NAT processing unit 16 for translating the source address and port number of the packet addressed to the network NW3.
  • a plurality of external devices 600 can be connected to the device 400 at the same time by using one IP address.
  • the relay unit 200 and the external device 600 are connected by VPN. As a result, the external device 600 can operate as a device on the internal network NW1.
  • the present embodiment includes the following disclosure.
  • a control system (1) composed of a plurality of units (100, 200, 300).
  • the plurality of units The first unit (100) connected to the first network (NW2, NW3) and A second unit (200) capable of communicating with the first unit (100) via the internal network (NW1) and connected to the second network (NW4, NW5) is included.
  • the first unit (100) has a first port (11) connected to the internal network (NW1).
  • the second unit (200) has a second port (22) connected to the internal network (NW1).
  • the second unit (200) further A router for relaying packets using the first routing table (25) that associates the network identifier that identifies the network with the address information of the forwarding destination of the packet destined for the device connected to the network.
  • the first network identifier that identifies the first network (NW2, NW3) and the first address information assigned to the first port (11) are acquired from the first unit (100), and the first network identifier is obtained.
  • a control system having a first setting unit (28) for associating the first address information with the first address information and setting the first address information in the first routing table.
  • the first unit (100) further The first address information is assigned to the first port (11) by using a network identifier that is not used in the network settings of the plurality of units (100, 200, 300), and the second port (22).
  • the control system (1) according to configuration 1, which has an address allocation unit (15) for assigning a second address information to the device.
  • the first unit (100) further Communication unit for relaying packets using the second routing table (181) that associates the network identifier that identifies the network with the address information of the forwarding destination of the packet destined for the device connected to the network. (14) and In order to associate the second network identifier that identifies the second network (NW4, NW5) with the second address information assigned by the address allocation unit (15) and set it in the second routing table (181).
  • the control system (1) according to the configuration 2 having the second setting unit (17) of the above.
  • the first unit (100) further The control system according to any one of configurations 1 to 3, which has a NAPT (Network Address Port Translation) processing unit (16) for translating the source address and port number of the packet addressed to the first network (NW1). 1).
  • NAPT Network Address Port Translation
  • (Structure 6) It is a control method of a control system (1) composed of a plurality of units (100, 200, 300).
  • the plurality of units The first unit (100) connected to the first network (NW2, NW3) and A second unit (200) capable of communicating with the first unit (100) via the internal network (NW1) and connected to the second network (NW4, NW5) is included.
  • the first unit (100) has a first port (11) connected to the internal network (NW1).
  • the second unit (200) has a second port (22) connected to the internal network (NW1).
  • the control method is
  • the second unit (200) acquires a first network identifier that identifies the first network (NW1) from the first unit (100) and first address information assigned to the first port (11).
  • a control method in which the second unit (200) includes a step of relaying packets using the routing table

Abstract

First and second units are respectively connected to first and second networks. The first and second units respectively have first and second ports connected to an internal network. The second unit has a router for relaying a packet using a first routing table, and a first setting unit for acquiring, from the first unit, a first network identifier for identifying the first network and first address information assigned to the first port, and associating and setting, in the first routing table, the first network identifier and the first address information. Consequently, the time and labor of network setting for performing communication between two devices respectively connected to the first and second units are reduced.

Description

制御システムおよび制御方法Control system and control method
 本開示は、複数のユニットによって構成される制御システムにおいて外部機器との通信を中継するための技術に関する。 The present disclosure relates to a technique for relaying communication with an external device in a control system composed of a plurality of units.
 FA(Factory Automation)を用いた生産現場などでは、各種設備および各設備に配置される各種デバイスに接続されるPLC(Programmable Logic Controller)などの制御ユニットが用いられる。近年、外部機器に接続できる制御ユニットが普及している。このような制御ユニットに関し、特許文献1(特開2016-194808号公報)は、外部機器のデーターベースにアクセスすることができるPLCを開示している。 At production sites using FA (Factory Automation), control units such as PLCs (Programmable Logic Controllers) connected to various equipment and various devices placed in each equipment are used. In recent years, control units that can be connected to external devices have become widespread. Regarding such a control unit, Patent Document 1 (Japanese Unexamined Patent Publication No. 2016-194808) discloses a PLC capable of accessing a database of an external device.
特開2016-194808号公報Japanese Unexamined Patent Publication No. 2016-194808
 制御ユニットには種々の機能ユニットが接続され得る。機能ユニットとして、外部機器との通信を中継する中継ユニットが存在する。制御ユニットと機能ユニットとは、内部ネットワークを介して通信される。外部機器から制御ユニットに接続されたデバイスにアクセスするためには、外部機器と中継ユニットとの間のネットワークから内部ネットワークへの中継点と、内部ネットワークから制御ユニットとデバイスとの間のネットワークへの中継点とを通過する必要がある。すなわち、外部機器からデバイスにアクセスするときのホップ数は少なくとも2となる。そのため、外部機器とデバイスとの間の通信を行なうためのネットワーク設定に手間がかかる。 Various functional units can be connected to the control unit. As a functional unit, there is a relay unit that relays communication with an external device. The control unit and the functional unit are communicated via the internal network. In order to access the device connected to the control unit from the external device, the relay point from the network between the external device and the relay unit to the internal network and the network from the internal network to the network between the control unit and the device It is necessary to pass through the relay point. That is, the number of hops when accessing the device from an external device is at least 2. Therefore, it takes time and effort to set up the network for communication between the external device and the device.
 本開示は、上記の問題に鑑みてなされたものであり、その目的は、複数のユニットを構成する第1ユニットおよび第2ユニットにそれぞれ接続された2つの機器間の通信を行なうためのネットワーク設定の手間を低減できる制御システムおよび制御方法を提供することである。 The present disclosure has been made in view of the above problems, and an object of the present disclosure is to set up a network for communicating between two devices connected to the first unit and the second unit constituting a plurality of units, respectively. It is to provide a control system and a control method which can reduce the trouble of the above.
 本開示の一例によれば、制御システムは複数のユニットによって構成される。複数のユニットは、第1ネットワークと接続される第1ユニットと、内部ネットワークを介して第1ユニットと通信可能であり、かつ、第2ネットワークと接続される第2ユニットとを含む。第1ユニットは、内部ネットワークに接続される第1ポートを有する。第2ユニットは、内部ネットワークに接続される第2ポートを有する。第2ユニットは、さらに、ルータと、第1設定部とを有する。ルータは、ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けた第1ルーチングテーブルを用いてパケットの中継を行なう。第1設定部は、第1ユニットから第1ネットワークを識別する第1ネットワーク識別子と第1ポートに割り当てられた第1アドレス情報とを取得し、第1ネットワーク識別子と第1アドレス情報とを対応付けて第1ルーチングテーブルに設定する。 According to an example of the present disclosure, the control system is composed of a plurality of units. The plurality of units include a first unit connected to the first network and a second unit capable of communicating with the first unit via the internal network and connected to the second network. The first unit has a first port connected to the internal network. The second unit has a second port connected to the internal network. The second unit further includes a router and a first setting unit. The router relays the packet by using the first routing table in which the network identifier that identifies the network and the address information of the forwarding destination of the packet destined for the device connected to the network are associated with each other. The first setting unit acquires the first network identifier that identifies the first network from the first unit and the first address information assigned to the first port, and associates the first network identifier with the first address information. And set it in the first routing table.
 この開示によれば、第1ネットワーク識別子と第1アドレス情報とを対応付けたレコードが第1ルーチングテーブルに自動的に追加される。そのため、第2ネットワーク上の機器(以下、「第2機器」と称する。)から第1ネットワーク上の機器(以下、「第1機器」と称する。)へアクセスするための手動によるネットワーク設定の手間が低減される。このようにして自動的に設定された第1ルーチングテーブルを用いることにより、ルータは、第1機器を宛先とするパケットを第2機器から受けると、当該パケットを第1ポートに転送する。第1ユニットは、パケットの宛先が第1機器であるため、当該パケットを第1ネットワークに出力する。その結果、第1機器は、第2機器からのパケットを受信できる。 According to this disclosure, a record in which the first network identifier and the first address information are associated with each other is automatically added to the first routing table. Therefore, it takes time and effort to manually set the network to access the device on the first network (hereinafter referred to as "first device") from the device on the second network (hereinafter referred to as "second device"). Is reduced. By using the first routing table automatically set in this way, when the router receives a packet destined for the first device from the second device, the router forwards the packet to the first port. Since the destination of the packet is the first device, the first unit outputs the packet to the first network. As a result, the first device can receive the packet from the second device.
 上述の開示において、第1ユニットは、さらに、複数のユニットのネットワーク設定において使用されていないネットワーク識別子を用いて、第1ポートに対して第1アドレス情報を割り当て、第2ポートに対して第2アドレス情報を割り当てるためのアドレス割り当て部を有する。 In the above disclosure, the first unit further assigns the first address information to the first port and the second to the second port using a network identifier that is not used in the network settings of the plurality of units. It has an address allocation unit for assigning address information.
 この開示によれば、内部ネットワーク上の第1,第2ポートそれぞれの第1,第2アドレス情報が自動的に割り当てられる。そのため、第2機器から第1機器へアクセスするための手動によるネットワーク設定の手間がさらに低減される。 According to this disclosure, the first and second address information of each of the first and second ports on the internal network is automatically assigned. Therefore, the trouble of manually setting the network for accessing the first device from the second device is further reduced.
 上述の開示において、第1ユニットは、さらに、通信部と第2設定部とを有する。通信部は、ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けた第2ルーチングテーブルを用いてパケットの中継を行なう。第2設定部は、第2ネットワークを識別する第2ネットワーク識別子とアドレス割り当て部によって割り当てられた第2アドレス情報とを対応付けて第2ルーチングテーブルに設定する。 In the above disclosure, the first unit further has a communication unit and a second setting unit. The communication unit relays the packet using the second routing table in which the network identifier that identifies the network and the address information of the forwarding destination of the packet destined for the device connected to the network are associated with each other. The second setting unit sets the second network identifier that identifies the second network and the second address information assigned by the address assignment unit in the second routing table in association with each other.
 この開示によれば、第2ネットワーク識別子と第2アドレス情報とを対応付けたレコードが第2ルーチングテーブルに自動的に設定される。そのため、第1機器から第2機器へアクセスするための手動によるネットワーク設定の手間が低減される。このようにして自動的に設定された第2ルーチングテーブルを用いることにより、通信部は、第2機器を宛先とするパケットを第1機器から受けると、当該パケットを第2ポートに転送する。第2ユニットのルータは、パケットの宛先が第2機器であるため、当該パケットを第2ネットワークに出力する。その結果、第2機器は、第1機器からのパケットを受信できる。 According to this disclosure, a record in which the second network identifier and the second address information are associated is automatically set in the second routing table. Therefore, the trouble of manually setting the network for accessing the second device from the first device is reduced. By using the second routing table automatically set in this way, when the communication unit receives a packet destined for the second device from the first device, the communication unit forwards the packet to the second port. Since the destination of the packet is the second device, the router of the second unit outputs the packet to the second network. As a result, the second device can receive the packet from the first device.
 上述の開示において、第1ユニットは、さらに、第1ネットワーク宛のパケットの送信元アドレスおよびポート番号を変換するためのNAPT(Network Address Port Translation)処理部を有する。この開示によれば、1つのアドレス情報を用いて、複数の第2機器を同時に第1機器に接続させることができる。 In the above disclosure, the first unit further has a NAPT (Network Address Port Translation) processing unit for translating the source address and port number of the packet addressed to the first network. According to this disclosure, a plurality of second devices can be connected to the first device at the same time by using one address information.
 上述の開示において、第2ユニットと第2ネットワーク上の機器(第2機器)とはVPN(Virtual Private Network)接続される。この開示によれば、第2機器は、内部ネットワーク上の機器として動作することができる。 In the above disclosure, the second unit and the device (second device) on the second network are connected by VPN (Virtual Private Network). According to this disclosure, the second device can operate as a device on the internal network.
 本開示の一例によれば、複数のユニットによって構成される制御システムの制御方法は、以下の第1のステップと第2のステップとを備える。複数のユニットは、第1ネットワークと接続される第1ユニットと、第1ユニットと内部ネットワークを用いて通信可能であり、かつ、第2ネットワークと接続される第2ユニットとを含む。第1ユニットは、内部ネットワークに接続される第1ポートを有する。第2ユニットは、内部ネットワークに接続される第2ポートを有する。第1のステップは、第2ユニットが、第1ユニットから第1ネットワークを識別する第1ネットワーク識別子と第1ポートに割り当てられた第1アドレス情報とを取得し、第1ネットワーク識別子と第1アドレス情報とを対応付けたルーチングテーブルを設定するステップである。第2のステップは、第2ユニットが、ルーチングテーブルを用いてパケットの中継を行なうステップである。 According to an example of the present disclosure, a control method of a control system composed of a plurality of units includes the following first step and second step. The plurality of units include a first unit connected to the first network, and a second unit capable of communicating with the first unit using the internal network and connected to the second network. The first unit has a first port connected to the internal network. The second unit has a second port connected to the internal network. In the first step, the second unit acquires the first network identifier that identifies the first network from the first unit and the first address information assigned to the first port, and the first network identifier and the first address. This is a step to set a routing table associated with information. The second step is a step in which the second unit relays the packet using the routing table.
 この開示によっても、複数のユニットを構成する第1ユニットおよび第2ユニットにそれぞれ接続された2つの機器間の通信を行なうためのネットワーク設定の手間を低減できる。 This disclosure also reduces the time and effort required to set up a network for communicating between two devices connected to the first unit and the second unit, which form a plurality of units.
 本開示によれば、複数のユニットを構成する第1ユニットおよび第2ユニットにそれぞれ接続された2つの機器間の通信を行なうためのネットワーク設定の手間を低減できる。 According to the present disclosure, it is possible to reduce the time and effort required to set up a network for communicating between two devices connected to the first unit and the second unit, which constitute a plurality of units.
実施の形態に係る制御システムの構成例を示す図である。It is a figure which shows the configuration example of the control system which concerns on embodiment. 本実施の形態に従う制御システムを構成する制御ユニットのハードウェア構成例を示す模式図である。It is a schematic diagram which shows the hardware configuration example of the control unit which comprises the control system according to this embodiment. 本実施の形態に従う制御システムを構成する中継ユニットのハードウェア構成例を示す模式図である。It is a schematic diagram which shows the hardware configuration example of the relay unit which comprises the control system according to this embodiment. 制御システムを構成する制御ユニットおよび中継ユニットの機能構成例を示す図である。It is a figure which shows the functional configuration example of the control unit and a relay unit which make up a control system. 制御ユニットのネットワーク設定のための画面例を示す図である。It is a figure which shows the screen example for the network setting of a control unit. 中継ユニットのネットワーク設定のための画面例を示す図である。It is a figure which shows the screen example for network setting of a relay unit. 内部ネットワーク上のポートへのIPアドレスの割り当て処理を説明する図である。It is a figure explaining the process of assigning an IP address to a port on an internal network. 制御ユニットにおける、内部ネットワークへ転送するためのルーチングテーブル自動設定を説明する図である。It is a figure explaining the routing table automatic setting for transfer to an internal network in a control unit. 中継ユニットにおける、内部ネットワークへ転送するためのルーチングテーブル自動設定を説明する図である。It is a figure explaining the routing table automatic setting for transfer to an internal network in a relay unit. NAPT処理を説明する図である。It is a figure explaining the NAPT process. ネットワーク自動設定の一例を示すシーケンス図である。It is a sequence diagram which shows an example of network automatic setting.
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 An embodiment of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated.
 §1 適用例
 まず、図1を参照して、本発明が適用される場面の一例について説明する。図1は、実施の形態に係る制御システムの構成例を示す図である。
§1 Application example First, an example of a situation in which the present invention is applied will be described with reference to FIG. FIG. 1 is a diagram showing a configuration example of a control system according to an embodiment.
 制御システム1は、制御ユニット100と中継ユニット200とを備える。制御システム1は、さらに1または複数の機能ユニット300を備えていてもよい。 The control system 1 includes a control unit 100 and a relay unit 200. The control system 1 may further include one or more functional units 300.
 制御ユニット100は、たとえば、PLCである。制御ユニット100は、予め設計されたユーザプログラムに従って、制御対象を制御する。制御ユニット100は、ユーザプログラム等に従った制御演算を実行するPLCエンジン10を含む。図1に示す例のPLCエンジン10は、3つのポート11~13を有する。 The control unit 100 is, for example, a PLC. The control unit 100 controls the control target according to a user program designed in advance. The control unit 100 includes a PLC engine 10 that executes a control calculation according to a user program or the like. The PLC engine 10 of the example shown in FIG. 1 has three ports 11 to 13.
 ポート11は、内部ネットワークNW1に接続される。内部ネットワークNW1には、中継ユニット200および機能ユニット300が接続される。これにより、PLCエンジン10は、内部ネットワークNW1を介して中継ユニット200および機能ユニット300と通信可能となる。内部ネットワークNW1には、例えばTCP/IPが採用される。 Port 11 is connected to the internal network NW1. A relay unit 200 and a functional unit 300 are connected to the internal network NW1. As a result, the PLC engine 10 can communicate with the relay unit 200 and the functional unit 300 via the internal network NW1. For example, TCP / IP is adopted for the internal network NW1.
 ポート12は、ネットワークNW2に接続される。ネットワークNW2には例えばサポート装置500が接続される。これにより、PLCエンジン10は、ネットワークNW2を介してサポート装置500と通信可能となる。 Port 12 is connected to network NW2. For example, a support device 500 is connected to the network NW2. As a result, the PLC engine 10 can communicate with the support device 500 via the network NW2.
 サポート装置500は、一例として、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコン)を用いて実現される。サポート装置500は、制御ユニット100のPLCエンジン10で実行されるユーザプログラムの作成、制御ユニット100および中継ユニット200の各種情報の設定などの開発環境を提供する。 As an example, the support device 500 is realized by using hardware (for example, a general-purpose personal computer) that follows a general-purpose architecture. The support device 500 provides a development environment such as creating a user program executed by the PLC engine 10 of the control unit 100 and setting various information of the control unit 100 and the relay unit 200.
 ポート13は、ネットワークNW3に接続される。ネットワークNW3には1または複数のデバイス400が接続される。これにより、PLCエンジン10は、ネットワークNW3を介してデバイス400と通信可能となる。 Port 13 is connected to network NW3. One or more devices 400 are connected to the network NW3. As a result, the PLC engine 10 can communicate with the device 400 via the network NW3.
 デバイス400は、例えば生産工程を自動化するための種々の産業用機器を含む。一例として、デバイス400は、他のPLC、HMI(Human Machine Interface)、制御対象を含む。制御対象は、例えば、アームロボットを制御するロボットコントローラ、サーボモータを制御するサーボドライバ、ワークを撮影するための視覚センサ、圧力センサ、温度センサ、および生産工程で利用されるその他の機器などを含む。 The device 400 includes, for example, various industrial devices for automating the production process. As an example, the device 400 includes another PLC, an HMI (Human Machine Interface), and a control target. Controlled objects include, for example, robot controllers that control arm robots, servo drivers that control servo motors, visual sensors for photographing workpieces, pressure sensors, temperature sensors, and other equipment used in the production process. ..
 ネットワークNW2,NW3には、例えばEtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などの産業用ネットワークプロトコルが採用される。 For networks NW2 and NW3, for example, industrial network protocols such as EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), and CompoNet (registered trademark) are adopted.
 中継ユニット200は、制御ユニット100に接続され、外部機器との間の通信機能を担当する。中継ユニット200は、外部機器との間の通信を中継するルータ20を備える。図1に示す例のルータ20は、3つのポート22~24を有する。 The relay unit 200 is connected to the control unit 100 and is in charge of the communication function with the external device. The relay unit 200 includes a router 20 that relays communication with an external device. The example router 20 shown in FIG. 1 has three ports 22 to 24.
 ポート22は、内部ネットワークNW1に接続される。ポート23は、外部ネットワークNW4に接続される。ルータ20は、外部ネットワークNW4に接続される外部機器600と内部ネットワークNW1に接続される制御ユニット100および機能ユニット300との間の通信を中継する。 Port 22 is connected to the internal network NW1. The port 23 is connected to the external network NW4. The router 20 relays communication between the external device 600 connected to the external network NW4 and the control unit 100 and the functional unit 300 connected to the internal network NW1.
 ポート24は、外部ネットワークNW5に接続される。ルータ20は、外部ネットワークNW5に接続される外部機器700と内部ネットワークNW1に接続される制御ユニット100および機能ユニット300との間の通信を中継する。 Port 24 is connected to the external network NW5. The router 20 relays communication between the external device 700 connected to the external network NW5 and the control unit 100 and the functional unit 300 connected to the internal network NW1.
 外部ネットワークNW4,NW5には例えばEthernet(登録商標)が採用される。図1に示す例では、外部ネットワークNW4はWAN(Wide Area Network)であり、外部ネットワークNW5はLAN(Local Area Network)である。 For example, Ethernet (registered trademark) is adopted for the external networks NW4 and NW5. In the example shown in FIG. 1, the external network NW4 is a WAN (Wide Area Network), and the external network NW5 is a LAN (Local Area Network).
 ルータ20は、予め設定されたルーチングテーブル25に基づいてパケットの中継処理を実行する。ルーチングテーブル25は、ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報(IPアドレス)とを対応付けたテーブルである。ルータ20は、パケットを受けると、当該パケットの宛先のネットワーク識別子に対応するIPアドレスをルーチングテーブルから読み出す。ルータ20は、読み出したIPアドレスにパケットを転送する。 The router 20 executes packet relay processing based on the preset routing table 25. The routing table 25 is a table in which a network identifier that identifies a network is associated with address information (IP address) of a transfer destination of a packet destined for a device connected to the network. When the router 20 receives a packet, it reads the IP address corresponding to the network identifier of the destination of the packet from the routing table. The router 20 forwards the packet to the read IP address.
 中継ユニット200は、さらにアプリケーションサーバ21を含む。アプリケーションサーバ21は、制御システム1に関する各種サービスを提供する。図1に例示されるアプリケーションサーバ21は、制御システム1を構成する各種ユニットについてのユーザアカウントを一元的に管理する認証サービスを提供する。具体的には、アプリケーションサーバ21は、アクセス元の機器から取得したユーザアカウントと登録情報との照合し、照合結果に応じてアクセスの認否を判定する。アプリケーションサーバ21がこのような認証サービスを提供することにより、中継ユニット200は、認証ユニットとして動作する。 The relay unit 200 further includes an application server 21. The application server 21 provides various services related to the control system 1. The application server 21 illustrated in FIG. 1 provides an authentication service that centrally manages user accounts for various units constituting the control system 1. Specifically, the application server 21 collates the user account acquired from the access source device with the registration information, and determines whether or not to allow access according to the collation result. When the application server 21 provides such an authentication service, the relay unit 200 operates as an authentication unit.
 アプリケーションサーバ21は、内部ネットワークNW1に接続されたポート26を有する。アプリケーションサーバ21は、ポート26を介して、ユーザアカウントの取得や認証結果の出力を行なう。 The application server 21 has a port 26 connected to the internal network NW1. The application server 21 acquires a user account and outputs an authentication result via the port 26.
 機能ユニット300は、制御システム1による様々な制御対象に対する制御を実現するための各種機能を提供する。機能ユニット300は、典型的には、I/Oユニット、セーフティI/Oユニット、通信ユニット、モーションコントローラユニット、温度調整ユニット、パルスカウンタユニットなどを包含し得る。 The functional unit 300 provides various functions for realizing control of various control targets by the control system 1. The functional unit 300 may typically include an I / O unit, a safety I / O unit, a communication unit, a motion controller unit, a temperature control unit, a pulse counter unit, and the like.
 図1に示す制御システム1では、外部ネットワークNW4に接続された外部機器600からネットワークNW3に接続されたデバイス400にアクセス可能であることが望まれる。外部機器600からデバイス400にアクセス可能であれば、ユーザは、遠隔地にいたとしても、WANである外部ネットワークNW4を介してデバイス400の状態を確認できる。 In the control system 1 shown in FIG. 1, it is desired that the device 400 connected to the network NW3 can be accessed from the external device 600 connected to the external network NW4. If the device 400 can be accessed from the external device 600, the user can check the status of the device 400 via the external network NW4 which is a WAN even if he / she is in a remote place.
 制御ユニット100に中継ユニット200が接続されると、ユーザは、制御ユニット100と中継ユニット200とが一体化されているように解釈する傾向にある。そのため、ユーザは、サポート装置500を用いてデバイス400にアクセスするときと同じように、外部機器600を用いてデバイス400にアクセスできることを期待する。 When the relay unit 200 is connected to the control unit 100, the user tends to interpret the control unit 100 and the relay unit 200 as being integrated. Therefore, the user expects to be able to access the device 400 using the external device 600 in the same way as when accessing the device 400 using the support device 500.
 しかしながら、制御ユニット100と中継ユニット200とはそれぞれ別々のプロセッサ上で動作しているため、制御ユニット100と中継ユニット200との間に内部ネットワークNW1が必ず構築される。サポート装置500からデバイス400への通信は、ネットワークNW2とネットワークNW3との中継点を通過すればよい。一方、外部機器600からデバイス400への通信は、外部ネットワークNW4と内部ネットワークNW1との中継点と、内部ネットワークNW1とネットワークNW3との中継点とを通過する必要がある。従って、外部機器600からデバイス400へアクセスするためのネットワーク設定は、サポート装置500からデバイス400にアクセスするためのネットワーク設定よりも複雑である。そのため、外部機器600からデバイス400へアクセスするためのネットワーク設定を手動で行なう場合に手間がかかる。 However, since the control unit 100 and the relay unit 200 are operating on different processors, an internal network NW1 is always constructed between the control unit 100 and the relay unit 200. Communication from the support device 500 to the device 400 may pass through a relay point between the network NW2 and the network NW3. On the other hand, communication from the external device 600 to the device 400 needs to pass through a relay point between the external network NW4 and the internal network NW1 and a relay point between the internal network NW1 and the network NW3. Therefore, the network setting for accessing the device 400 from the external device 600 is more complicated than the network setting for accessing the device 400 from the support device 500. Therefore, it takes time and effort to manually set the network for accessing the device 400 from the external device 600.
 中継ユニット200の代わりに物理NIC(Network Interface Card)を制御ユニット100に取り付け、当該物理NICおよび制御ユニット100を介して、外部機器600からデバイス400へアクセスすることが考えられる。この場合、ネットワーク設定の手間が簡略化される。しかしながら、物理NICにはプロセッサが搭載されないため、図1に示すアプリケーションサーバ21の機能を制御ユニット100のPLCエンジン10で実行させることになる。その結果、PLCエンジン10の演算負荷が増大する。 It is conceivable to attach a physical NIC (Network Interface Card) to the control unit 100 instead of the relay unit 200, and access the device 400 from the external device 600 via the physical NIC and the control unit 100. In this case, the trouble of network setting is simplified. However, since the physical NIC is not equipped with a processor, the function of the application server 21 shown in FIG. 1 is executed by the PLC engine 10 of the control unit 100. As a result, the computing load of the PLC engine 10 increases.
 本実施の形態に係る制御システム1では、アプリケーションサーバ21を含む中継ユニット200を介して外部機器600からデバイス400へアクセスする際の手動によるネットワーク設定の手間を低減するため、以下のような処理が実行される。 In the control system 1 according to the present embodiment, the following processing is performed in order to reduce the trouble of manually setting the network when accessing the device 400 from the external device 600 via the relay unit 200 including the application server 21. Will be executed.
 まず、制御ユニット100は、内部ネットワークNW1に接続されるポート11,22,26に対して、内部ネットワークNW1で有効なIPアドレスを自動的に割り当てる。 First, the control unit 100 automatically assigns a valid IP address in the internal network NW1 to ports 11, 22, 26 connected to the internal network NW1.
 次に、中継ユニット200は、制御ユニット100から、PLCエンジン10のポート13に接続されるネットワークNW3のネットワーク識別子と、内部ネットワークNW1内においてポート11に割当てられたIPアドレスとを受ける。中継ユニット200は、制御ユニット100から受けた当該ネットワーク識別と当該ポート11のIPアドレスとを対応付けてルーチングテーブル25に設定する。 Next, the relay unit 200 receives from the control unit 100 the network identifier of the network NW3 connected to the port 13 of the PLC engine 10 and the IP address assigned to the port 11 in the internal network NW1. The relay unit 200 sets the routing unit 200 in the routing table 25 in association with the network identification received from the control unit 100 and the IP address of the port 11.
 これにより、ルータ20は、ネットワークNW3に接続されたデバイス400を宛先とするパケットを外部機器600から受けると、ルーチングテーブル25を参照して当該パケットをポート11に転送する。PLCエンジン10は、ポート11に転送されたパケットの宛先がネットワークNW3に接続されたデバイス400であるため、当該パケットをポート13からネットワークNW3に出力する。その結果、デバイス400は、外部機器600からのパケットを受信できる。 As a result, when the router 20 receives a packet destined for the device 400 connected to the network NW3 from the external device 600, the router 20 refers to the routing table 25 and forwards the packet to the port 11. Since the destination of the packet transferred to the port 11 is the device 400 connected to the network NW3, the PLC engine 10 outputs the packet from the port 13 to the network NW3. As a result, the device 400 can receive the packet from the external device 600.
 このように、本実施の形態によれば、PLCエンジン10のポート13に接続されるネットワークNW3のネットワーク識別子と、内部ネットワークNW1内においてポート11に割り当てられたアドレス情報(IPアドレス)とを対応付けてルーチングテーブル25に自動的に設定される。そのため、外部機器600からデバイス400へアクセスするための手動によるネットワーク設定の手間が低減される。 As described above, according to the present embodiment, the network identifier of the network NW3 connected to the port 13 of the PLC engine 10 is associated with the address information (IP address) assigned to the port 11 in the internal network NW1. Is automatically set in the routing table 25. Therefore, the trouble of manually setting the network for accessing the device 400 from the external device 600 is reduced.
 §2 具体例
 次に、本実施の形態に係る制御システム1の具体例について説明する。
§2 Specific example Next, a specific example of the control system 1 according to the present embodiment will be described.
 <A.制御ユニットのハードウェア構成例>
 図2は、本実施の形態に従う制御システムを構成する制御ユニットのハードウェア構成例を示す模式図である。図2に示されるように、制御ユニット100は、主たるコンポーネントとして、CPU(Central Processing Unit)やGPU(Graphical Processing Unit)などのプロセッサ102と、チップセット104と、主記憶装置106と、二次記憶装置108と、USB(Universal Serial Bus)コントローラ112と、メモリカードインターフェイス114と、ネットワークコントローラ116,118と、内部バスコントローラ122と、インジケータ124とを含む。
<A. Control unit hardware configuration example>
FIG. 2 is a schematic diagram showing a hardware configuration example of a control unit constituting a control system according to the present embodiment. As shown in FIG. 2, the control unit 100 has a processor 102 such as a CPU (Central Processing Unit) and a GPU (Graphical Processing Unit), a chipset 104, a main storage device 106, and secondary storage as main components. It includes a device 108, a USB (Universal Serial Bus) controller 112, a memory card interface 114, network controllers 116, 118, an internal bus controller 122, and an indicator 124.
 プロセッサ102は、二次記憶装置108に格納された各種プログラムを読み出して、主記憶装置106に展開して実行することで、標準制御に係る制御演算、および、後述するような各種処理を実現する。チップセット104は、プロセッサ102と各コンポーネントとの間のデータの遣り取りを仲介することで、制御ユニット100全体としての処理を実現する。 The processor 102 reads various programs stored in the secondary storage device 108, expands them in the main storage device 106, and executes them to realize control operations related to standard control and various processes as described later. .. The chipset 104 realizes the processing of the control unit 100 as a whole by mediating the exchange of data between the processor 102 and each component.
 二次記憶装置108には、システムプログラムに加えて、システムプログラムが提供する実行環境上で動作するユーザプログラムが格納される。 In addition to the system program, the secondary storage device 108 stores a user program that operates in the execution environment provided by the system program.
 USBコントローラ112は、USB接続を介して任意の情報処理装置との間のデータの遣り取りを担当する。 The USB controller 112 is in charge of exchanging data with an arbitrary information processing device via a USB connection.
 メモリカードインターフェイス114は、メモリカード115を着脱可能に構成されており、メモリカード115に対して制御プログラムや各種設定などのデータを書込み、あるいは、メモリカード115から制御プログラムや各種設定などのデータを読出すことが可能になっている。 The memory card interface 114 is configured so that the memory card 115 can be attached and detached, and data such as a control program and various settings can be written to the memory card 115, or data such as a control program and various settings can be written from the memory card 115. It is possible to read it.
 ネットワークコントローラ116,118の各々は、ネットワークを介した任意のデバイス(例えば、サポート装置500およびデバイス400)との間のデータの遣り取りを担当する。ネットワークコントローラ116,118は、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などの産業用ネットワークプロトコルを採用してもよい。 Each of the network controllers 116 and 118 is in charge of exchanging data with arbitrary devices (for example, support device 500 and device 400) via the network. Network controllers 116, 118 may employ industrial network protocols such as EtherCAT®, EtherNet / IP®, DeviceNet®, CompoNet®.
 内部バスコントローラ122は、制御システム1を構成する中継ユニット200、1または複数の機能ユニット300との間のデータの遣り取りを担当する。内部バスには、TCP/IPが用いられる。 The internal bus controller 122 is in charge of exchanging data with the relay units 200, 1 or a plurality of functional units 300 constituting the control system 1. TCP / IP is used for the internal bus.
 インジケータ124は、制御ユニット100の動作状態などを通知するものであり、ユニット表面に配置された1または複数のLEDなどで構成される。 The indicator 124 notifies the operating state of the control unit 100 and the like, and is composed of one or a plurality of LEDs arranged on the surface of the unit.
 図2には、プロセッサ102がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(たとえば、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。あるいは、制御ユニット100の主要部を、汎用的なアーキテクチャに従うハードウェア(たとえば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。 FIG. 2 shows a configuration example in which the necessary functions are provided by the processor 102 executing the program, and some or all of these provided functions are provided by a dedicated hardware circuit (for example, ASIC). It may be implemented using (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array). Alternatively, the main part of the control unit 100 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, the virtualization technology may be used to execute a plurality of OSs (Operating Systems) having different uses in parallel, and to execute necessary applications on each OS.
 <B.中継ユニットのハードウェア構成例>
 図3は、本実施の形態に従う制御システムを構成する中継ユニットのハードウェア構成例を示す模式図である。図3に示されるように、中継ユニット200は、主たるコンポーネントとして、CPUやMPU(Micro Processing Unit)などのプロセッサ202と、チップセット204と、主記憶装置206と、二次記憶装置208と、内部バスコントローラ210と、USBコントローラ212と、メモリカードインターフェイス214と、ネットワークコントローラ216,218と、インジケータ224とを含む。
<B. Relay unit hardware configuration example>
FIG. 3 is a schematic diagram showing a hardware configuration example of a relay unit constituting a control system according to the present embodiment. As shown in FIG. 3, the relay unit 200 has a processor 202 such as a CPU and an MPU (Micro Processing Unit), a chipset 204, a main storage device 206, a secondary storage device 208, and the inside as main components. It includes a bus controller 210, a USB controller 212, a memory card interface 214, network controllers 216, 218, and an indicator 224.
 プロセッサ202は、二次記憶装置208に格納された各種プログラムを読み出して、主記憶装置206に展開して実行することで、後述するような各種通信機能を実現する。チップセット204は、プロセッサ202と各コンポーネントとの間のデータの遣り取りを仲介することで、中継ユニット200全体としての処理を実現する。 The processor 202 realizes various communication functions as described later by reading various programs stored in the secondary storage device 208, deploying them in the main storage device 206, and executing the programs. The chipset 204 realizes the processing of the relay unit 200 as a whole by mediating the exchange of data between the processor 202 and each component.
 二次記憶装置208には、システムプログラムに加えて、システムプログラムが提供する実行環境上で動作する通信設定情報などの各種データが格納される。 In addition to the system program, the secondary storage device 208 stores various data such as communication setting information that operates in the execution environment provided by the system program.
 内部バスコントローラ210は、内部バスを介した制御ユニット100や機能ユニット300との間のデータの遣り取りを担当する。 The internal bus controller 210 is in charge of exchanging data with the control unit 100 and the functional unit 300 via the internal bus.
 USBコントローラ212は、USB接続を介して任意の情報処理装置との間のデータの遣り取りを担当する。 The USB controller 212 is in charge of exchanging data with an arbitrary information processing device via a USB connection.
 メモリカードインターフェイス214は、メモリカード215を着脱可能に構成されており、メモリカード215に対して制御プログラムや各種設定などのデータを書込み、あるいは、メモリカード215から制御プログラムや各種設定などのデータを読出すことが可能になっている。 The memory card interface 214 is configured so that the memory card 215 can be attached and detached, and data such as a control program and various settings can be written to the memory card 215, or data such as a control program and various settings can be written from the memory card 215. It is possible to read it.
 ネットワークコントローラ216,218の各々は、ネットワークを介した任意のデバイスとの間のデータの遣り取りを担当する。ネットワークコントローラ216,218は、EtherNet(登録商標)などの汎用的なネットワークプロトコルを採用してもよい。中継ユニット200は、ネットワークコントローラ216を介して外部機器600と通信し、ネットワークコントローラ218を介して外部機器700と通信する。 Each of the network controllers 216 and 218 is in charge of exchanging data with and from any device via the network. The network controllers 216 and 218 may employ a general purpose network protocol such as Ethernet®. The relay unit 200 communicates with the external device 600 via the network controller 216 and communicates with the external device 700 via the network controller 218.
 インジケータ224は、中継ユニット200の動作状態などを通知するものであり、ユニット表面に配置された1または複数のLEDなどで構成される。 The indicator 224 notifies the operating state of the relay unit 200, etc., and is composed of one or a plurality of LEDs arranged on the surface of the unit.
 図3には、プロセッサ202がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(たとえば、ASICまたはFPGAなど)を用いて実装してもよい。あるいは、中継ユニット200の主要部を、汎用的なアーキテクチャに従うハードウェア(たとえば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOSを並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。 FIG. 3 shows a configuration example in which the necessary functions are provided by the processor 202 executing the program, and some or all of these provided functions are provided by a dedicated hardware circuit (for example, ASIC). Alternatively, it may be implemented using an FPGA or the like). Alternatively, the main part of the relay unit 200 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, virtualization technology may be used to execute a plurality of OSs having different uses in parallel, and to execute necessary applications on each OS.
 <C.制御システムの機能構成例>
 図4は、制御システムを構成する制御ユニットおよび中継ユニットの機能構成例を示す図である。図4には、内部ネットワークNW1と、ネットワークNW2,NW3と、外部ネットワークNW4,NW5との間の通信に関する機能構成が示される。
<C. Control system function configuration example>
FIG. 4 is a diagram showing a functional configuration example of the control unit and the relay unit constituting the control system. FIG. 4 shows a functional configuration related to communication between the internal networks NW1, the networks NW2 and NW3, and the external networks NW4 and NW5.
 図4に示されるように、制御ユニット100は、通信部14と、DHCP(Dynamic Host Configuration Protocol)サーバ15と、NAPT(Network Address Port Translation)処理部16と、設定部17と、記憶部18とを含む。通信部14は、図2に示すプロセッサ102と、ネットワークコントローラ116,118および内部バスコントローラ122などによって実現される。DHCPサーバ15、NAPT処理部16および設定部17は、プロセッサ102によって実現される。記憶部18は、主記憶装置106および二次記憶装置108によって実現される。 As shown in FIG. 4, the control unit 100 includes a communication unit 14, a DHCP (Dynamic Host Configuration Protocol) server 15, a NAT (Network Address Port Translation) processing unit 16, a setting unit 17, and a storage unit 18. including. The communication unit 14 is realized by the processor 102 shown in FIG. 2, network controllers 116 and 118, an internal bus controller 122, and the like. The DHCP server 15, the NAT processing unit 16, and the setting unit 17 are realized by the processor 102. The storage unit 18 is realized by the main storage device 106 and the secondary storage device 108.
 記憶部18は、ルーチングテーブル181と変換データ182とを記憶する。ルーチングテーブル181は、ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報(IPアドレス)とを対応付けたテーブルである。ルーチングテーブル181は設定部17によって設定される。 The storage unit 18 stores the routing table 181 and the conversion data 182. The routing table 181 is a table in which a network identifier that identifies a network is associated with address information (IP address) of a transfer destination of a packet destined for a device connected to the network. The routing table 181 is set by the setting unit 17.
 変換データ182は、変換前後のIPアドレスを対応付けたデータである。変換データ182は、NAPT処理部16によって一時的に生成される。 The conversion data 182 is data in which the IP addresses before and after the conversion are associated with each other. The conversion data 182 is temporarily generated by the NAT processing unit 16.
 通信部14は、内部ネットワークNW1およびネットワークNW2,NW3の間の通信を制御する。 The communication unit 14 controls communication between the internal network NW1 and the networks NW2 and NW3.
 例えば、通信部14は、内部ネットワークNW1およびネットワークNW2,NW3のいずれかから受けたパケットの宛先を確認する。通信部14は、確認した宛先のネットワーク識別子に対応するIPアドレスをルーチングテーブル181から読み出す。通信部14は、読み出したIPアドレスにパケットを転送する。 For example, the communication unit 14 confirms the destination of the packet received from any of the internal network NW1 and the networks NW2 and NW3. The communication unit 14 reads the IP address corresponding to the confirmed destination network identifier from the routing table 181. The communication unit 14 forwards the packet to the read IP address.
 DHCPサーバ15は、内部ネットワークNW1に接続されるポート11,22,26に対してIPアドレスを割り当てるアドレス割り当て部として動作する。DHCPサーバ15は、制御システム1を構成する全ユニット(制御ユニット100、中継ユニット200および機能ユニット300)のネットワーク設定において使用されていないネットワーク識別子を用いて、ポート11,22,26に対してIPアドレスを割り当てる。 The DHCP server 15 operates as an address assigning unit that assigns an IP address to ports 11, 22, and 26 connected to the internal network NW1. The DHCP server 15 uses a network identifier that is not used in the network settings of all the units (control unit 100, relay unit 200, and functional unit 300) that make up the control system 1 to IP for ports 11, 22, and 26. Assign an address.
 NAPT処理部16は、内部ネットワークNW1とネットワークNW2,NW3との間でNAPT処理を行なう。NAPTとは、1つのIPアドレスを複数の端末で共有するためのネットワークアドレス変換技術である。NAPT処理では、送信元のIPアドレスおよびポート番号が変換される。 The NAT processing unit 16 performs NAPT processing between the internal network NW1 and the networks NW2 and NW3. NAPT is a network address translation technology for sharing one IP address among a plurality of terminals. In the NAPT process, the source IP address and port number are translated.
 ネットワークNW2を宛先とするパケットを内部ネットワークNW1から受けた場合、NAPT処理部16は、パケットの送信元のIPアドレスおよびポート番号を、ポート12に割り当てられたIPアドレスおよび未使用のポート番号に動的に変換する。ネットワークNW2を宛先とするパケットを内部ネットワークNW1から受けた場合、NAPT処理部16は、パケットの送信元のIPアドレスおよびポート番号を、ポート13に割り当てられたIPアドレスおよび未使用のポート番号に動的に変換する。 When a packet destined for network NW2 is received from internal network NW1, the NAT processing unit 16 moves the IP address and port number of the packet source to the IP address and unused port number assigned to port 12. Convert to. When a packet destined for the network NW2 is received from the internal network NW1, the NAT processing unit 16 moves the IP address and port number of the packet source to the IP address and unused port number assigned to the port 13. Convert to.
 NAPT処理部16は、変換前のIPアドレスおよびポート番号と、変換後のIPアドレスおよびポート番号とを対応付けた変換データ182を生成し、生成した変換データ182を記憶部18に格納する。 The NAT processing unit 16 generates conversion data 182 in which the IP address and port number before conversion and the IP address and port number after conversion are associated with each other, and stores the generated conversion data 182 in the storage unit 18.
 設定部17は、ルーチングテーブル181を設定する。設定部17は、サポート装置500からダウンロードされた設定データに従ってルーチングテーブル181を設定する。設定部17は、設定したルーチングテーブル181を記憶部18に格納する。設定部17によるルーチングテーブル181の設定方法の詳細について後述する。 The setting unit 17 sets the routing table 181. The setting unit 17 sets the routing table 181 according to the setting data downloaded from the support device 500. The setting unit 17 stores the set routing table 181 in the storage unit 18. The details of the setting method of the routing table 181 by the setting unit 17 will be described later.
 図4に示されるように、中継ユニット200は、ルータ20の他に、設定部28および記憶部29を含む。設定部28は、図3に示すプロセッサ202によって実現される。記憶部29は、主記憶装置206および二次記憶装置208によって実現される。 As shown in FIG. 4, the relay unit 200 includes a setting unit 28 and a storage unit 29 in addition to the router 20. The setting unit 28 is realized by the processor 202 shown in FIG. The storage unit 29 is realized by the main storage device 206 and the secondary storage device 208.
 設定部28は、記憶部29に格納されるルーチングテーブル25を設定する。設定部28は、サポート装置500からダウンロードされた設定データに従ってルーチングテーブル25を設定する。設定部28は、設定したルーチングテーブル25を記憶部29に格納する。設定部28によるルーチングテーブル25の設定方法の詳細について後述する。 The setting unit 28 sets the routing table 25 stored in the storage unit 29. The setting unit 28 sets the routing table 25 according to the setting data downloaded from the support device 500. The setting unit 28 stores the set routing table 25 in the storage unit 29. The details of the setting method of the routing table 25 by the setting unit 28 will be described later.
 <D.制御ユニットのネットワーク設定のための画面>
 図5は、制御ユニットのネットワーク設定のための画面例を示す図である。図5に例示される設定画面50は、サポート装置500に表示される。サポート装置500は、設定画面50に対するユーザからの入力を受け付ける。
<D. Screen for network setting of control unit>
FIG. 5 is a diagram showing a screen example for network setting of the control unit. The setting screen 50 illustrated in FIG. 5 is displayed on the support device 500. The support device 500 receives an input from the user for the setting screen 50.
 設定画面50は、ポート12,13のIPアドレスをそれぞれ設定するための入力欄51,52を有する。ユーザは、ネットワークNW2においてポート12に予め割り当てられたIPアドレスを入力欄51に入力し、ネットワークNW3においてポート13に予め割り当てられたIPアドレスを入力欄52に入力する。図5に示す例では、ポート12のIPアドレスは「192.168.200.1」であり、ポート13のIPアドレスは「192.168.250.1」である。また、IPアドレスにおけるネットワークアドレス長は24ビットである。そのため、ポート12に接続されたネットワークNW2を識別するネットワーク識別子は「192.168.200」である。ポート13に接続されたネットワークNW3を識別するネットワーク識別子は「192.168.250」である。 The setting screen 50 has input fields 51 and 52 for setting the IP addresses of the ports 12 and 13, respectively. The user inputs the IP address pre-assigned to the port 12 in the network NW2 into the input field 51, and inputs the IP address pre-assigned to the port 13 in the network NW3 into the input field 52. In the example shown in FIG. 5, the IP address of the port 12 is "192.168.200.1", and the IP address of the port 13 is "192.168.250.1". The network address length of the IP address is 24 bits. Therefore, the network identifier that identifies the network NW2 connected to the port 12 is "192.168.200". The network identifier that identifies the network NW3 connected to the port 13 is "192.168.250".
 設定画面50は、ルーチングテーブル181を設定するための入力欄53,54を含む。入力欄53には、パケットの宛先のネットワークを識別するネットワーク識別子が入力され、入力欄54には、パケットの転送先のIアドレスが入力される。なお、サブネットマスクとして「255.255.255.0」が予め設定されており、入力欄53に入力されたIPアドレスのうちの先頭の24ビットがネットワーク識別子として使用される。 The setting screen 50 includes input fields 53 and 54 for setting the routing table 181. In the input field 53, a network identifier that identifies the network of the packet destination is input, and in the input field 54, the I address of the packet transfer destination is input. In addition, "255.255.255.0" is set in advance as a subnet mask, and the first 24 bits of the IP address entered in the input field 53 are used as the network identifier.
 設定画面50は、内部ネットワークNW1に接続されるポート(図1に示す例ではポート11,22,26)に対するIPアドレスの自動割り当てを実行するためのチェックボックス56を含む。 The setting screen 50 includes a check box 56 for automatically assigning an IP address to a port ( ports 11, 22, 26 in the example shown in FIG. 1) connected to the internal network NW1.
 設定画面50は、内部ネットワークNW1とネットワークNW2,NW3との間のNAPT処理を実行するためのチェックボックス57を含む。 The setting screen 50 includes a check box 57 for executing NAPT processing between the internal network NW1 and the networks NW2 and NW3.
 さらに、設定画面50は、内部ネットワークNW1へのルーチング自動設定を実行するためのチェックボックス58を含む。 Further, the setting screen 50 includes a check box 58 for executing automatic routing setting to the internal network NW1.
 サポート装置500は、設定画面50に対する入力に従って設定データを生成する。生成された設定データは、制御ユニット100にダウンロードされる。制御ユニット100では、設定データに従った処理が実行される。例えば、設定画面50の入力欄51,52への入力情報に従って、ポート12,13のIPアドレスが確定される。制御ユニット100の設定部17は、設定画面の入力欄53に入力されたネットワーク識別子と、入力欄54に入力されたIPアドレスとを対応付けたレコードをルーチングテーブル181に追加する。チェックボックス56~58がチェックされたときの制御ユニット100の処理の詳細については後述する。 The support device 500 generates setting data according to the input to the setting screen 50. The generated setting data is downloaded to the control unit 100. In the control unit 100, processing according to the setting data is executed. For example, the IP addresses of the ports 12 and 13 are determined according to the input information in the input fields 51 and 52 of the setting screen 50. The setting unit 17 of the control unit 100 adds a record in which the network identifier input in the input field 53 of the setting screen and the IP address input in the input field 54 are associated with the routing table 181. The details of the processing of the control unit 100 when the check boxes 56 to 58 are checked will be described later.
 <E.中継ユニットのネットワーク設定のための画面>
 図6は、中継ユニットのネットワーク設定のための画面例を示す図である。図6に例示される設定画面60は、サポート装置500に表示される。サポート装置500は、設定画面60に対するユーザからの入力を受け付ける。
<E. Screen for network setting of relay unit>
FIG. 6 is a diagram showing a screen example for network setting of the relay unit. The setting screen 60 illustrated in FIG. 6 is displayed on the support device 500. The support device 500 receives an input from the user for the setting screen 60.
 設定画面60は、ポート23,24のIPアドレスをそれぞれ設定するための入力欄61,62を有する。ユーザは、外部ネットワークNW4においてポート23に予め割り当てられたIPアドレスを入力欄61に入力し、外部ネットワークNW5においてポート24に予め割り当てられたIPアドレスを入力欄62に入力する。図6に示す例では、ポート23のIPアドレスは「10.0.0.1」であり、ポート24のIPアドレスは「192.168.0.1」である。また、IPアドレスにおけるネットワークアドレス長は24ビットである。そのため、ポート23に接続された外部ネットワークNW4を識別するネットワーク識別子は「10.0.0」である。ポート24に接続された外部ネットワークNW5を識別するネットワーク識別子は「192.168.0」である。 The setting screen 60 has input fields 61 and 62 for setting the IP addresses of the ports 23 and 24, respectively. The user inputs the IP address pre-assigned to the port 23 in the external network NW4 into the input field 61, and inputs the IP address pre-assigned to the port 24 in the external network NW5 into the input field 62. In the example shown in FIG. 6, the IP address of the port 23 is “10.0.0.1” and the IP address of the port 24 is “192.168.0.1”. The network address length of the IP address is 24 bits. Therefore, the network identifier that identifies the external network NW4 connected to the port 23 is "10.0.0". The network identifier that identifies the external network NW5 connected to the port 24 is "192.168.0".
 設定画面60は、ルーチングテーブル25を設定するための入力欄63,64を含む。入力欄63には、パケットの宛先のネットワークを識別するネットワーク識別子が入力され、入力欄64には、パケットの転送先のIアドレスが入力される。なお、サブネットマスクとして「255.255.255.0」が予め設定されており、入力欄63に入力されたIPアドレスのうちの先頭の24ビットがネットワーク識別子として使用される。 The setting screen 60 includes input fields 63 and 64 for setting the routing table 25. A network identifier that identifies the network of the packet destination is input in the input field 63, and an I address of the packet transfer destination is input in the input field 64. Note that "255.255.255.0" is preset as the subnet mask, and the first 24 bits of the IP address entered in the input field 63 are used as the network identifier.
 設定画面60は、内部ネットワークNW1へのルーチング自動設定を実行するためのチェックボックス65を含む。 The setting screen 60 includes a check box 65 for executing automatic routing setting to the internal network NW1.
 設定画面60は、外部ネットワークNW4,NW5にVPN(Virtual Private Network)を設定するためのチェックボックス66を含む。チェックボックス66がチェックされると、設定画面60は、入力欄67~69への入力を受け付ける。入力欄67には、VPN接続される端末間の認証を行なう際に用いられる事前共通鍵が入力される。入力欄68,69には、VPN接続の際の認証に用いられるユーザ名およびパスワードがそれぞれ入力される。入力欄67~69への入力を行なうことにより、例えば、中継ユニット200と外部機器600とはVPN接続される。 The setting screen 60 includes a check box 66 for setting a VPN (Virtual Private Network) in the external networks NW4 and NW5. When the check box 66 is checked, the setting screen 60 accepts inputs to the input fields 67 to 69. In the input field 67, a pre-common key used for authentication between terminals connected by VPN is input. In the input fields 68 and 69, the user name and password used for authentication at the time of VPN connection are input, respectively. By inputting to the input fields 67 to 69, for example, the relay unit 200 and the external device 600 are connected by VPN.
 さらに、チェックボックス66がチェックされると、入力欄61,62に入力されたIPアドレスに基づいて、ユーザへの配布アドレスが自動的に設定される。配布されたアドレスは、表示欄70,71に表示される。図示されるように、外部ネットワークNW4に接続される外部機器600には、ポート23のIPアドレスと同じネットワーク識別子を有するIPアドレスが配布される。外部ネットワークNW5に接続される外部機器700には、ポート24のIPアドレスと同じネットワーク識別子を有するIPアドレスが配布される。 Furthermore, when the check box 66 is checked, the distribution address to the user is automatically set based on the IP address entered in the input fields 61 and 62. The distributed addresses are displayed in the display fields 70 and 71. As shown in the figure, an IP address having the same network identifier as the IP address of the port 23 is distributed to the external device 600 connected to the external network NW4. An IP address having the same network identifier as the IP address of the port 24 is distributed to the external device 700 connected to the external network NW5.
 制御システム1が1または複数の機能ユニット300を含む場合には、図6に示す設定画面60と同様の設定画面を用いて、1または複数の機能ユニット300に対するネットワーク設定が行なわれる。 When the control system 1 includes one or more functional units 300, network settings for one or more functional units 300 are performed using the same setting screen as the setting screen 60 shown in FIG.
 <F.内部ネットワークに接続されるポートへのIPアドレスの割り当て>
 次に、DHCPサーバ15による、内部ネットワークNW1上のポート11,22,26へのIPアドレスの割り当て処理について説明する。DHCPサーバ15は、設定画面50のチェックボックス56がチェックされた場合に、ポート11,22,26へのIPアドレスの割り当て処理を実行する。
<F. Assigning an IP address to a port connected to the internal network>
Next, the process of assigning an IP address to ports 11, 22, and 26 on the internal network NW1 by the DHCP server 15 will be described. The DHCP server 15 executes the process of assigning an IP address to the ports 11, 22, and 26 when the check box 56 of the setting screen 50 is checked.
 図7は、内部ネットワーク上のポートへのIPアドレスの割り当て処理を説明する図である。 FIG. 7 is a diagram for explaining the process of assigning an IP address to a port on the internal network.
 DHCPサーバ15は、設定画面50,60を用いたネットワーク設定において手動設定されたネットワーク識別子およびIPアドレスを全ユニット(制御ユニット100、中継ユニット200および機能ユニット300)から取得する。DHCPサーバ15は、全ユニットのネットワーク設定において使用されていないネットワーク識別子を内部ネットワークNW1に対して割り当てる。図7に示す例では、「172.16.250」が内部ネットワークNW1のネットワーク識別子として割り当てられている。 The DHCP server 15 acquires the network identifier and IP address manually set in the network settings using the setting screens 50 and 60 from all the units (control unit 100, relay unit 200, and functional unit 300). The DHCP server 15 assigns a network identifier that is not used in the network settings of all units to the internal network NW1. In the example shown in FIG. 7, "172.16.250" is assigned as the network identifier of the internal network NW1.
 DHCPサーバ15は、当該ネットワーク識別子を用いて、内部ネットワークNW1上のポート11,22,26に対してIPアドレスを割り当てる。DHCPサーバ15は、内部ネットワークNW1のネットワーク識別子(ネットワークアドレス)に任意の8ビットのホスト識別子(ホストアドレス)を組み合わせたIPアドレスを、各ユニットにおける内部ネットワークNW1上のポートに割り当てる。 The DHCP server 15 assigns an IP address to ports 11, 22, and 26 on the internal network NW1 using the network identifier. The DHCP server 15 assigns an IP address obtained by combining an arbitrary 8-bit host identifier (host address) with the network identifier (network address) of the internal network NW1 to a port on the internal network NW1 in each unit.
 図7に示す例では、DHCPサーバ15は、IPアドレス「172.16.250.1」を制御ユニット100のポート11に対して割り当てる。 In the example shown in FIG. 7, the DHCP server 15 assigns the IP address “172.162.250.1” to the port 11 of the control unit 100.
 さらに、DHCPサーバ15は、制御ユニット100以外のユニット(中継ユニット200および機能ユニット300)に対して、予め定められた個数(例えば10個)のIPアドレスを割り当てる。各ユニットに割り当てられるIPアドレスの個数は、ユニットが通常有するポートの個数を考慮して予め定められる。図7に示す例では、DHCPサーバ15は、10個のIPアドレス「172.16.250.10」~「172.16.250.19」を中継ユニット200のポートに対して割り当てる。図1に示す例では、中継ユニット200は、内部ネットワークNW1に接続されるポートとして2つのポート22,26を有する。そのため、割り当てられた10個のIPアドレスのうち2つのIPアドレス「172.16.250.10」,「172.16.250.11」がポート22,26にそれぞれ割り当てられる。さらに、制御システム1が1つの機能ユニット300を備える場合、DHCPサーバ15は、10個のIPアドレス「172.16.250.20」~「172.16.250.29」を機能ユニット300のポートに対して割り当てる。 Further, the DHCP server 15 assigns a predetermined number (for example, 10) of IP addresses to units (relay unit 200 and functional unit 300) other than the control unit 100. The number of IP addresses assigned to each unit is predetermined in consideration of the number of ports normally possessed by the unit. In the example shown in FIG. 7, the DHCP server 15 assigns 10 IP addresses "172.126.250.10" to "172.12.250.19" to the ports of the relay unit 200. In the example shown in FIG. 1, the relay unit 200 has two ports 22 and 26 as ports connected to the internal network NW1. Therefore, two IP addresses "172.126.250.10" and "172.12.250.11" out of the ten assigned IP addresses are assigned to the ports 22 and 26, respectively. Further, when the control system 1 includes one functional unit 300, the DHCP server 15 assigns ten IP addresses "172.126.250.20" to "172.126.250.29" to the ports of the functional unit 300. Assign to.
 なお、DHCPサーバ15は、中継ユニット200および機能ユニット300の各々に対して、内部ネットワークNW1に接続されるポート数を問い合わせてもよい。DHCPサーバ15は、回答に応じた個数のIPアドレスを各ユニットに割り当ててもよい。例えば、中継ユニット200は、DHCPサーバ15からの問い合わせに対して「2個」を回答する。この場合、DHCPサーバ15は、2個のIPアドレスを中継ユニット200に割り当てればよい。 Note that the DHCP server 15 may inquire each of the relay unit 200 and the functional unit 300 about the number of ports connected to the internal network NW1. The DHCP server 15 may assign each unit an number of IP addresses according to the response. For example, the relay unit 200 answers "two" to the inquiry from the DHCP server 15. In this case, the DHCP server 15 may assign two IP addresses to the relay unit 200.
 設定画面50のチェックボックス56がチェックされない場合、内部ネットワークNW1上のポートへのIPアドレスの割り当てが手動で行なわれてもよい。 If the check box 56 on the setting screen 50 is not checked, the IP address may be manually assigned to the port on the internal network NW1.
 <G.制御ユニットにおける内部ネットワークへ転送するためのルーチング設定>
 次に、制御ユニット100における、内部ネットワークNW1へ転送するためのルーチングテーブル自動設定について説明する。当該ルーチングテーブル自動設定は、制御ユニット100の設定部17によって実行される。設定部17は、設定画面50のチェックボックス58(図5参照)がチェックされた場合に、ルーチングテーブル自動設定を実行する。
<G. Routing settings for transferring to the internal network in the control unit>
Next, the routing table automatic setting for transferring to the internal network NW1 in the control unit 100 will be described. The routing table automatic setting is executed by the setting unit 17 of the control unit 100. The setting unit 17 executes the routing table automatic setting when the check box 58 (see FIG. 5) on the setting screen 50 is checked.
 図8は、制御ユニットにおける、内部ネットワークへ転送するためのルーチングテーブル自動設定を説明する図である。設定部17は、外部ネットワークNW4,NW5にそれぞれ接続するポート23,24のIPアドレスを中継ユニット200から取得する。さらに、設定部17は、DHCPサーバ15によって割り当てられた、中継ユニット200において内部ネットワークNW1に接続されたポート22のIPアドレスを取得する。 FIG. 8 is a diagram illustrating the automatic setting of the routing table for transferring to the internal network in the control unit. The setting unit 17 acquires the IP addresses of the ports 23 and 24 connected to the external networks NW4 and NW5, respectively, from the relay unit 200. Further, the setting unit 17 acquires the IP address of the port 22 connected to the internal network NW1 in the relay unit 200 assigned by the DHCP server 15.
 図8に示されるように、設定部17は、ポート23のIPアドレスに含まれる24ビットのネットワーク識別子(ネットワークアドレス)とポート22のIPアドレスとを対応付けたレコードをルーチングテーブル181に追加する。ポート23のIPアドレスに含まれるネットワーク識別子は、ポート23に接続される外部ネットワークNW4を識別する。そのため、制御ユニット100の通信部14は、外部ネットワークNW4に接続される外部機器600を宛先とするパケットを受けると、ルーチングテーブル181に基づいて、当該パケットを中継ユニット200のポート22に転送する。中継ユニット200のルータ20は、パケットの宛先に含まれるネットワーク識別子が外部ネットワークNW4を示すことから、当該パケットを外部ネットワークNW4に出力する。これにより、外部機器600は、自身宛のパケットを受信できる。 As shown in FIG. 8, the setting unit 17 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 23 and the IP address of the port 22 are associated with each other in the routing table 181. The network identifier included in the IP address of port 23 identifies the external network NW4 connected to port 23. Therefore, when the communication unit 14 of the control unit 100 receives a packet destined for the external device 600 connected to the external network NW4, the communication unit 14 transfers the packet to the port 22 of the relay unit 200 based on the routing table 181. Since the network identifier included in the destination of the packet indicates the external network NW4, the router 20 of the relay unit 200 outputs the packet to the external network NW4. As a result, the external device 600 can receive the packet addressed to itself.
 同様に、設定部17は、ポート24のIPアドレスに含まれる24ビットのネットワーク識別子(ネットワークアドレス)とポート22のIPアドレスとを対応付けたレコードをルーチングテーブル181に追加する。ポート24のIPアドレスに含まれるネットワーク識別子は、ポート24に接続される外部ネットワークNW5を識別する。そのため、制御ユニット100の通信部14は、外部ネットワークNW5に接続される外部機器700を宛先とするパケットを受けると、ルーチングテーブル181に基づいて、当該パケットを中継ユニット200のポート22に転送する。中継ユニット200のルータ20は、パケットの宛先に含まれるネットワーク識別子が外部ネットワークNW5を示すことから、当該パケットを外部ネットワークNW5に出力する。これにより、外部機器700は、自身宛のパケットを受信できる。 Similarly, the setting unit 17 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 24 is associated with the IP address of the port 22 to the routing table 181. The network identifier included in the IP address of port 24 identifies the external network NW5 connected to port 24. Therefore, when the communication unit 14 of the control unit 100 receives a packet destined for the external device 700 connected to the external network NW5, the communication unit 14 transfers the packet to the port 22 of the relay unit 200 based on the routing table 181. Since the network identifier included in the destination of the packet indicates the external network NW5, the router 20 of the relay unit 200 outputs the packet to the external network NW5. As a result, the external device 700 can receive the packet addressed to itself.
 なお、設定画面50のチェックボックス58がチェックされない場合、内部ネットワークNW1へ転送するためのルーチングテーブル181の設定が手動で行なわれてもよい。 If the check box 58 on the setting screen 50 is not checked, the routing table 181 for transferring to the internal network NW1 may be set manually.
 <H.中継ユニットにおける内部ネットワークへ転送するためのルーチング設定>
 次に、中継ユニット200における、内部ネットワークNW1へ転送するためのルーチングテーブル自動設定について説明する。当該ルーチングテーブル自動設定は、中継ユニット200の設定部28によって実行される。設定部28は、設定画面60のチェックボックス65(図6参照)がチェックされた場合に、ルーチングテーブル自動設定を実行する。
<H. Routing setting for transferring to the internal network in the relay unit>
Next, the routing table automatic setting for transferring to the internal network NW1 in the relay unit 200 will be described. The routing table automatic setting is executed by the setting unit 28 of the relay unit 200. The setting unit 28 executes the routing table automatic setting when the check box 65 (see FIG. 6) on the setting screen 60 is checked.
 図9は、中継ユニットにおける、内部ネットワークへ転送するためのルーチングテーブル自動設定を説明する図である。設定部28は、ネットワークNW2,NW3にそれぞれ接続するポート12,13のIPアドレスを制御ユニット100から取得する。さらに、設定部28は、DHCPサーバ15によって割り当てられた、制御ユニット100において内部ネットワークNW1に接続されたポート11のIPアドレスを取得する。 FIG. 9 is a diagram illustrating the automatic setting of the routing table for transferring to the internal network in the relay unit. The setting unit 28 acquires the IP addresses of the ports 12 and 13 connected to the networks NW2 and NW3 from the control unit 100, respectively. Further, the setting unit 28 acquires the IP address of the port 11 connected to the internal network NW1 in the control unit 100 assigned by the DHCP server 15.
 図9に示されるように、設定部28は、ポート12のIPアドレスに含まれる24ビットのネットワーク識別子(ネットワークアドレス)とポート11のIPアドレスとを対応付けたレコードをルーチングテーブル25に追加する。ポート12のIPアドレスに含まれるネットワーク識別子は、ポート12に接続されるネットワークNW2を識別する。そのため、中継ユニット200のルータ20は、ネットワークNW2に接続されるサポート装置500を宛先とするパケットを受けると、ルーチングテーブル25に基づいて、当該パケットを制御ユニット100のポート11に転送する。制御ユニット100の通信部14は、パケットの宛先に含まれるネットワーク識別子がネットワークNW2を示すことから、当該パケットをネットワークNW2に出力する。これにより、サポート装置500は、自身宛のパケットを受信できる。 As shown in FIG. 9, the setting unit 28 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 12 and the IP address of the port 11 are associated with each other in the routing table 25. The network identifier included in the IP address of port 12 identifies the network NW2 connected to port 12. Therefore, when the router 20 of the relay unit 200 receives a packet destined for the support device 500 connected to the network NW2, the router 20 forwards the packet to the port 11 of the control unit 100 based on the routing table 25. Since the network identifier included in the destination of the packet indicates the network NW2, the communication unit 14 of the control unit 100 outputs the packet to the network NW2. As a result, the support device 500 can receive the packet addressed to itself.
 同様に、設定部17は、ポート24のIPアドレスに含まれる24ビットのネットワーク識別子(ネットワークアドレス)とポート22のIPアドレスとを対応付けたレコードをルーチングテーブル181に追加する。ポート24のIPアドレスに含まれるネットワーク識別子は、ポート24に接続される外部ネットワークNW5を識別する。制御ユニット100の通信部14は、パケットの宛先に含まれるネットワーク識別子がネットワークNW3を示すことから、当該パケットをネットワークNW3に出力する。これにより、デバイス400は、自身宛のパケットを受信できる。 Similarly, the setting unit 17 adds a record in which the 24-bit network identifier (network address) included in the IP address of the port 24 is associated with the IP address of the port 22 to the routing table 181. The network identifier included in the IP address of port 24 identifies the external network NW5 connected to port 24. Since the network identifier included in the destination of the packet indicates the network NW3, the communication unit 14 of the control unit 100 outputs the packet to the network NW3. As a result, the device 400 can receive the packet addressed to itself.
 なお、設定画面60のチェックボックス65がチェックされない場合、内部ネットワークNW1へ転送するためのルーチングテーブル25の設定が手動で行なわれてもよい。 If the check box 65 on the setting screen 60 is not checked, the routing table 25 for transferring to the internal network NW1 may be set manually.
 <I.NAPT処理>
 次に、制御ユニット100にて実行されるNAPT処理について説明する。当該NAPT処理は、制御ユニット100のNAPT処理部16によって実行される。NAPT処理部16は、設定画面50のチェックボックス57(図5参照)がチェックされた場合に、NAPT処理を実行する。
<I. NAPT processing>
Next, the NAT processing executed by the control unit 100 will be described. The NAT processing is executed by the NAPT processing unit 16 of the control unit 100. The NAT processing unit 16 executes the NAPT processing when the check box 57 (see FIG. 5) on the setting screen 50 is checked.
 図10は、NAPT処理を説明する図である。図10には、ネットワークNW3宛のパケット(以下、「対象パケット」と称する。)に対するNAPT処理の一例が示される。対象パケットは、IPアドレス「10.0.0.2」の外部機器600を送信元とし、IPアドレス「192.168.250.2」のデバイス400を宛先とするパケットである。NAPT処理部16は、対象パケットにおける送信元のIPアドレスおよびポート番号を、ネットワークNW3に接続されたポート13のIPアドレスおよび未使用のポート番号にそれぞれ変換する。NAPT処理部16は、変換前のIPアドレスおよびポート番号と、変換後のIPアドレスおよびポート番号とを対応付けた変換データ182を生成し、生成した変換データ182を記憶部18に格納する。 FIG. 10 is a diagram illustrating NAPT processing. FIG. 10 shows an example of NAPT processing for a packet addressed to the network NW3 (hereinafter, referred to as a “target packet”). The target packet is a packet whose source is the external device 600 with the IP address "10.0.0.2" and the destination is the device 400 with the IP address "192.168.250.2". The NAT processing unit 16 converts the source IP address and port number of the target packet into the IP address and unused port number of the port 13 connected to the network NW3, respectively. The NAT processing unit 16 generates conversion data 182 in which the IP address and port number before conversion and the IP address and port number after conversion are associated with each other, and stores the generated conversion data 182 in the storage unit 18.
 対象パケットを受けたデバイス400は、当該対象パケットに対する返信パケットを送信する。上述したように、対象パケットの送信元のIPアドレスおよびポート番号は、ネットワークNW3に接続されたポート13のIPアドレスおよび未使用のポート番号にそれぞれ変換されている。そのため、デバイス400は、変換後のIPアドレスおよびポート番号を返信パケットの宛先として設定する。 The device 400 that received the target packet transmits a reply packet to the target packet. As described above, the IP address and port number of the source of the target packet are converted into the IP address and the unused port number of the port 13 connected to the network NW3, respectively. Therefore, the device 400 sets the converted IP address and port number as the destination of the reply packet.
 NAPT処理部16は、変換データ182によって示される変換後のIPアドレスおよびポート番号を宛先とする返信パケットをネットワークNW3から受けると、当該返信パケットの宛先を変換する。すなわち、NAPT処理部16は、返信パケットの宛先を変換データ182によって示される変換前のIPアドレスおよびポート番号に変換する。これにより、返信パケットの宛先のIPアドレスは、対象パケットの送信元であるIPアドレス「10.0.0.2」に変換される。その結果、返信パケットは、対象パケットの送信元であるIPアドレス「10.0.0.2」の外部機器600に送信される。 When the NAPT processing unit 16 receives a reply packet destined for the converted IP address and port number indicated by the translation data 182 from the network NW3, the NAPT processing unit 16 converts the destination of the reply packet. That is, the NAT processing unit 16 converts the destination of the reply packet into the IP address and port number before conversion indicated by the translation data 182. As a result, the destination IP address of the reply packet is converted to the IP address "10.0.0.2" which is the source of the target packet. As a result, the reply packet is transmitted to the external device 600 having the IP address "10.0.0.2" which is the source of the target packet.
 <J.ネットワーク自動設定におけるシーケンス>
 図11は、ネットワーク自動設定の一例を示すシーケンス図である。図11に示すネットワーク自動設定は、図5の設定画面50においてチェックボックス56,58がチェックされ、かつ、図6の設定画面60においてチェックボックス65がチェックされたときに実行される。
<J. Sequence in automatic network setting>
FIG. 11 is a sequence diagram showing an example of automatic network setting. The network automatic setting shown in FIG. 11 is executed when the check boxes 56 and 58 are checked on the setting screen 50 of FIG. 5 and the check boxes 65 are checked on the setting screen 60 of FIG.
 制御ユニット100および中継ユニット200の電源がオンされると、制御ユニット100のプロセッサ102は、中継ユニット200の構成情報を取得する(ステップS1)。当該構成情報は、中継ユニット200の機種および品番などを示す。プロセッサ102は、中継ユニット200の構成情報を確認し(ステップS2)、中継ユニット200の監視をスタートさせる(ステップS3)。さらに、プロセッサ102は、サポート装置500からダウンロードした設定データに従って、ポート12,13のIPアドレスを有効にする(ステップS4)。 When the power of the control unit 100 and the relay unit 200 is turned on, the processor 102 of the control unit 100 acquires the configuration information of the relay unit 200 (step S1). The configuration information indicates the model and product number of the relay unit 200. The processor 102 confirms the configuration information of the relay unit 200 (step S2), and starts monitoring the relay unit 200 (step S3). Further, the processor 102 enables the IP addresses of the ports 12 and 13 according to the setting data downloaded from the support device 500 (step S4).
 中継ユニット200のプロセッサ202は、制御ユニット100との装着位置(図1に示す例ではポート22)を確認する(ステップS5)。さらに、プロセッサ102は、サポート装置500からダウンロードした設定データに従って、ポート23,24のIPアドレスを有効にする(ステップS6)。 The processor 202 of the relay unit 200 confirms the mounting position (port 22 in the example shown in FIG. 1) with the control unit 100 (step S5). Further, the processor 102 enables the IP addresses of the ports 23 and 24 according to the setting data downloaded from the support device 500 (step S6).
 次に、中継ユニット200のプロセッサ202は、DHCPによって割り当てられた、内部ネットワークNW1上のポートのIPアドレスを制御ユニット100に要求する(ステップS7)。制御ユニット100のプロセッサ102は、内部ネットワークNW1上の各ポートの一時的なIPアドレスを任意に割り当て、当該一時的なIPアドレスを配布する(ステップS8)。中継ユニット200では、配布された一時的なIPアドレスが設定される(ステップS9)。 Next, the processor 202 of the relay unit 200 requests the control unit 100 for the IP address of the port on the internal network NW1 assigned by DHCP (step S7). The processor 102 of the control unit 100 arbitrarily assigns a temporary IP address of each port on the internal network NW1 and distributes the temporary IP address (step S8). In the relay unit 200, the distributed temporary IP address is set (step S9).
 中継ユニット200のプロセッサ202は、配布された一時的なIPアドレスを用いて、内部ネットワークNW1を介したIP接続を確立する(ステップS10)。IP接続が確立されると、制御ユニット100のプロセッサ102は、制御ユニット100の構成情報を中継ユニット200に送信する(ステップS11)。当該構成情報は、制御ユニット100の機種および品番などを示す。中継ユニット200のプロセッサ202は、制御ユニット100の構成情報を確認する(ステップS12)。 The processor 202 of the relay unit 200 establishes an IP connection via the internal network NW1 by using the distributed temporary IP address (step S10). When the IP connection is established, the processor 102 of the control unit 100 transmits the configuration information of the control unit 100 to the relay unit 200 (step S11). The configuration information indicates the model and product number of the control unit 100. The processor 202 of the relay unit 200 confirms the configuration information of the control unit 100 (step S12).
 中継ユニット200のプロセッサ202は、外部ネットワークNW4,NW5にそれぞれ接続されるポート23,24のIPアドレスとルーチングテーブル25とを制御ユニット100に送信する(ステップS13)。ポート23,24のIPアドレスおよびルーチングテーブル25は、図6に示す設定画面60を用いた手動のネットワーク設定において予め設定されている。 The processor 202 of the relay unit 200 transmits the IP addresses of the ports 23 and 24 connected to the external networks NW4 and NW5 and the routing table 25 to the control unit 100 (step S13). The IP addresses of ports 23 and 24 and the routing table 25 are preset in the manual network setting using the setting screen 60 shown in FIG.
 制御ユニット100に1または複数の機能ユニット300が接続されている場合、上記のステップS1~S13は、当該1または複数の機能ユニット300の各々についても実行される。 When one or more functional units 300 are connected to the control unit 100, the above steps S1 to S13 are also executed for each of the one or more functional units 300.
 ステップS13の後、制御ユニット100のプロセッサ102は、全てのユニットのネットワーク設定において使用されていないネットワーク識別子を内部ネットワークNW1に割り当てる。そして、プロセッサ102は、内部ネットワークNW1のネットワーク識別子を用いて、内部ネットワークNW1に接続される全ポート(ポート11,22,26)のIPアドレスを決定する(ステップS14)。当該IPアドレスは、DHCPによって割り当てられる。 After step S13, the processor 102 of the control unit 100 assigns a network identifier that is not used in the network settings of all the units to the internal network NW1. Then, the processor 102 determines the IP addresses of all the ports ( ports 11, 22, 26) connected to the internal network NW1 by using the network identifier of the internal network NW1 (step S14). The IP address is assigned by DHCP.
 さらに、プロセッサ102は、中継ユニット200から取得したポート23,24の各々のIPアドレスに含まれるネットワーク識別子とポート22に割り当てたIPアドレスとを対応付けたレコードをルーチングテーブル181に追加する(ステップS15)。 Further, the processor 102 adds a record associated with the network identifier included in each of the IP addresses of the ports 23 and 24 acquired from the relay unit 200 and the IP address assigned to the port 22 to the routing table 181 (step S15). ).
 次に、制御ユニット100のプロセッサ102は、一時的なIPアドレスのリリースを中継ユニット200に指示する(ステップS16)。さらに、プロセッサ102は、ステップS14において決定した正式なIPアドレスを中継ユニットに配布する(ステップS17)。中継ユニット200では、配布された正式なIPアドレスが設定される(ステップS18)。 Next, the processor 102 of the control unit 100 instructs the relay unit 200 to release the temporary IP address (step S16). Further, the processor 102 distributes the official IP address determined in step S14 to the relay unit (step S17). In the relay unit 200, the distributed official IP address is set (step S18).
 中継ユニット200のプロセッサ202は、配布された正式なIPアドレスを用いて、内部ネットワークNW1を介したIP接続を確立する(ステップS19)。IP接続が確立されると、制御ユニット100のプロセッサ102は、ルーチングテーブル25への追加のための情報を中継ユニット200に送信する(ステップS20)。ルーチングテーブル25への追加のための情報は、ポート12,13にそれぞれ接続されるネットワークNW2,NW3のネットワーク識別子と、ポート11のIPアドレスとを含む。中継ユニット200のプロセッサ202は、ネットワークNW2,NW3のネットワーク識別子とポート11のIPアドレスとを対応付けたレコードをルーチングテーブル25に追加する(ステップS21)。 The processor 202 of the relay unit 200 establishes an IP connection via the internal network NW1 using the distributed formal IP address (step S19). When the IP connection is established, the processor 102 of the control unit 100 transmits information for addition to the routing table 25 to the relay unit 200 (step S20). The information for addition to the routing table 25 includes the network identifiers of the networks NW2 and NW3 connected to the ports 12 and 13, respectively, and the IP address of the port 11. The processor 202 of the relay unit 200 adds a record in which the network identifiers of the networks NW2 and NW3 are associated with the IP address of the port 11 to the routing table 25 (step S21).
 ステップS1~S21によりネットワーク自動設定処理が実行された後、制御ユニット100および中継ユニット200は、ルーチングテーブル181,25をそれぞれ用いて、パケットの中継を行なう。 After the network automatic setting process is executed in steps S1 to S21, the control unit 100 and the relay unit 200 relay the packets by using the routing tables 181, 25, respectively.
 <K.作用・効果>
 以上のように、制御システム1は複数のユニットによって構成される。複数のユニットは、制御ユニット100と中継ユニット200とを含む。制御ユニット100は、ネットワークNW3と接続され、ネットワークNW3を介してデバイス400と通信可能である。中継ユニット200は、内部ネットワークNW1を介して制御ユニット100と通信可能である。さらに、中継ユニット200は、外部ネットワークNW4と接続され、外部ネットワークNW4を介して外部機器600と通信可能である。制御ユニット100は、内部ネットワークNW1に接続されるポート11を有する。中継ユニット200は、内部ネットワークNW1に接続されるポート22を有する。中継ユニット200は、さらに、ルータ20と設定部28とを有する。ルータ20は、ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けたルーチングテーブル25を用いてパケットの中継を行なう。設定部28は、制御ユニット100からネットワークNW3を識別するネットワーク識別子「192.168.250」とポート11に割り当てられたIPアドレス「172.16.250.1」とを取得する。設定部28は、取得したネットワーク識別子とIPアドレスとを対応付けてルーチングテーブル25に設定する。
<K. Action / effect>
As described above, the control system 1 is composed of a plurality of units. The plurality of units include a control unit 100 and a relay unit 200. The control unit 100 is connected to the network NW3 and can communicate with the device 400 via the network NW3. The relay unit 200 can communicate with the control unit 100 via the internal network NW1. Further, the relay unit 200 is connected to the external network NW4 and can communicate with the external device 600 via the external network NW4. The control unit 100 has a port 11 connected to the internal network NW1. The relay unit 200 has a port 22 connected to the internal network NW1. The relay unit 200 further includes a router 20 and a setting unit 28. The router 20 relays a packet by using a routing table 25 in which a network identifier that identifies a network and an address information of a forwarding destination of a packet destined for a device connected to the network are associated with each other. The setting unit 28 acquires the network identifier “192.168.250” that identifies the network NW3 from the control unit 100 and the IP address “172.162.250.1” assigned to the port 11. The setting unit 28 sets the acquired network identifier and the IP address in the routing table 25 in association with each other.
 上記の構成によれば、ネットワークNW3のネットワーク識別子とポート11に割り当てられたIPアドレスとを対応付けたレコードがルーチングテーブル25に自動的に追加される。そのため、外部機器600からデバイス400へアクセスするための手動によるネットワーク設定の手間が低減される。 According to the above configuration, a record in which the network identifier of the network NW3 and the IP address assigned to the port 11 are associated with each other is automatically added to the routing table 25. Therefore, the trouble of manually setting the network for accessing the device 400 from the external device 600 is reduced.
 このようにして自動的に設定されたルーチングテーブル25を用いることにより、ルータ20は、デバイス400を宛先とするパケットを外部機器600から受けると、当該パケットをポート11に転送する。制御ユニット100は、パケットの宛先がネットワークNW3に接続されたデバイス400であるため、当該パケットをポート13からネットワークNW3に出力する。その結果、デバイス400は、外部機器600からのパケットを受信できる。 By using the routing table 25 automatically set in this way, when the router 20 receives a packet destined for the device 400 from the external device 600, the router 20 forwards the packet to the port 11. Since the destination of the packet is the device 400 connected to the network NW3, the control unit 100 outputs the packet from the port 13 to the network NW3. As a result, the device 400 can receive the packet from the external device 600.
 制御ユニット100は、DHCPサーバ15をさらに有する。DHCPサーバ15は、複数のユニットのネットワーク設定において使用されていないネットワーク識別子を用いて、ポート11,22に対してIPアドレスを割り当てる。これにより、内部ネットワークNW1上のポートのIPアドレスが自動的に割り当てられる。そのため、外部機器600からデバイス400へアクセスするための手動によるネットワーク設定の手間がさらに低減される。 The control unit 100 further has a DHCP server 15. The DHCP server 15 assigns IP addresses to ports 11 and 22 using network identifiers that are not used in the network settings of a plurality of units. As a result, the IP address of the port on the internal network NW1 is automatically assigned. Therefore, the trouble of manually setting the network for accessing the device 400 from the external device 600 is further reduced.
 制御ユニット100は、さらに、通信部14と設定部17とを有する。通信部14は、ルーチングテーブル181を用いてパケットの中継を行なう。設定部17は、外部ネットワークNW4を識別するネットワーク識別子とDHCPサーバ15によって割り当てられたポート22のIPアドレスとを対応付けてルーチングテーブル181に設定する。 The control unit 100 further includes a communication unit 14 and a setting unit 17. The communication unit 14 relays the packet using the routing table 181. The setting unit 17 sets the network identifier that identifies the external network NW4 and the IP address of the port 22 assigned by the DHCP server 15 in the routing table 181 in association with each other.
 上記の構成によれば、外部ネットワークNW4のネットワーク識別子とポート22に割り当てられたIPアドレスとを対応付けてルーチングテーブル181に自動的に設定される。そのため、デバイス400から外部機器600へアクセスするための手動によるネットワーク設定の手間が低減される。 According to the above configuration, the network identifier of the external network NW4 and the IP address assigned to the port 22 are associated and automatically set in the routing table 181. Therefore, the trouble of manually setting the network for accessing the external device 600 from the device 400 is reduced.
 このようにして自動的に設定されたルーチングテーブル181を用いることにより、通信部14は、外部機器600を宛先とするパケットをデバイス400から受けると、当該パケットをポート22に転送する。中継ユニット200のルータ20は、パケットの宛先が外部ネットワークNW4に接続された外部機器600であるため、当該パケットをポート23から外部ネットワークNW4に出力する。その結果、外部機器600は、デバイス400からのパケットを受信できる。 By using the routing table 181 automatically set in this way, when the communication unit 14 receives a packet destined for the external device 600 from the device 400, the communication unit 14 forwards the packet to the port 22. Since the destination of the packet is the external device 600 connected to the external network NW4, the router 20 of the relay unit 200 outputs the packet from the port 23 to the external network NW4. As a result, the external device 600 can receive the packet from the device 400.
 制御ユニット100は、さらに、ネットワークNW3宛のパケットの送信元アドレスおよびポート番号を変換するためのNAPT処理部16を有する。これにより、1つのIPアドレスを用いて、複数の外部機器600を同時にデバイス400に接続させることができる。 The control unit 100 further has a NAT processing unit 16 for translating the source address and port number of the packet addressed to the network NW3. Thereby, a plurality of external devices 600 can be connected to the device 400 at the same time by using one IP address.
 中継ユニット200と外部機器600とはVPN接続される。これにより、外部機器600は、内部ネットワークNW1上の機器として動作することができる。 The relay unit 200 and the external device 600 are connected by VPN. As a result, the external device 600 can operate as a device on the internal network NW1.
 <L.付記>
 以上のように、本実施の形態は以下のような開示を含む。
<L. Addendum>
As described above, the present embodiment includes the following disclosure.
 (構成1)
 複数のユニット(100,200,300)によって構成される制御システム(1)であって、
 前記複数のユニットは、
  第1ネットワーク(NW2,NW3)と接続される第1ユニット(100)と、
  内部ネットワーク(NW1)を介して前記第1ユニット(100)と通信可能であり、かつ、第2ネットワーク(NW4,NW5)と接続される第2ユニット(200)とを含み、
 前記第1ユニット(100)は、前記内部ネットワーク(NW1)に接続される第1ポート(11)を有し、
 前記第2ユニット(200)は、前記内部ネットワーク(NW1)に接続される第2ポート(22)を有し、
 前記第2ユニット(200)は、さらに、
  ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けた第1ルーチングテーブル(25)を用いてパケットの中継を行なうためのルータ(20)と、
  前記第1ユニット(100)から前記第1ネットワーク(NW2,NW3)を識別する第1ネットワーク識別子と前記第1ポート(11)に割り当てられた第1アドレス情報とを取得し、前記第1ネットワーク識別子と前記第1アドレス情報とを対応付けて前記第1ルーチングテーブルに設定するための第1設定部(28)とを有する、制御システム。
(Structure 1)
A control system (1) composed of a plurality of units (100, 200, 300).
The plurality of units
The first unit (100) connected to the first network (NW2, NW3) and
A second unit (200) capable of communicating with the first unit (100) via the internal network (NW1) and connected to the second network (NW4, NW5) is included.
The first unit (100) has a first port (11) connected to the internal network (NW1).
The second unit (200) has a second port (22) connected to the internal network (NW1).
The second unit (200) further
A router for relaying packets using the first routing table (25) that associates the network identifier that identifies the network with the address information of the forwarding destination of the packet destined for the device connected to the network. 20) and
The first network identifier that identifies the first network (NW2, NW3) and the first address information assigned to the first port (11) are acquired from the first unit (100), and the first network identifier is obtained. A control system having a first setting unit (28) for associating the first address information with the first address information and setting the first address information in the first routing table.
 (構成2)
 前記第1ユニット(100)は、さらに、
  前記複数のユニット(100,200,300)のネットワーク設定において使用されていないネットワーク識別子を用いて、前記第1ポート(11)に対して前記第1アドレス情報を割り当て、前記第2ポート(22)に対して第2アドレス情報を割り当てるためのアドレス割り当て部(15)を有する、構成1に記載の制御システム(1)。
(Structure 2)
The first unit (100) further
The first address information is assigned to the first port (11) by using a network identifier that is not used in the network settings of the plurality of units (100, 200, 300), and the second port (22). The control system (1) according to configuration 1, which has an address allocation unit (15) for assigning a second address information to the device.
 (構成3)
 前記第1ユニット(100)は、さらに、
  ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けた第2ルーチングテーブル(181)を用いてパケットの中継を行なうための通信部(14)と、
  前記第2ネットワーク(NW4,NW5)を識別する第2ネットワーク識別子と前記アドレス割り当て部(15)によって割り当てられた前記第2アドレス情報とを対応付けて前記第2ルーチングテーブル(181)に設定するための第2設定部(17)とを有する、構成2に記載の制御システム(1)。
(Structure 3)
The first unit (100) further
Communication unit for relaying packets using the second routing table (181) that associates the network identifier that identifies the network with the address information of the forwarding destination of the packet destined for the device connected to the network. (14) and
In order to associate the second network identifier that identifies the second network (NW4, NW5) with the second address information assigned by the address allocation unit (15) and set it in the second routing table (181). The control system (1) according to the configuration 2 having the second setting unit (17) of the above.
 (構成4)
 前記第1ユニット(100)は、さらに、
  前記第1ネットワーク(NW1)宛のパケットの送信元アドレスおよびポート番号を変換するためのNAPT(Network Address Port Translation)処理部(16)を有する、構成1から3のいずれかに記載の制御システム(1)。
(Structure 4)
The first unit (100) further
The control system according to any one of configurations 1 to 3, which has a NAPT (Network Address Port Translation) processing unit (16) for translating the source address and port number of the packet addressed to the first network (NW1). 1).
 (構成5)
 前記第2ユニット(200)と前記第2ネットワーク上の機器(600)とはVPN(Virtual Private Network)接続される、構成1から4のいずれかに記載の制御システム(1)。
(Structure 5)
The control system (1) according to any one of configurations 1 to 4, wherein the second unit (200) and the device (600) on the second network are connected by VPN (Virtual Private Network).
 (構成6)
 複数のユニット(100,200,300)によって構成される制御システム(1)の制御方法であって、
 前記複数のユニットは、
  第1ネットワーク(NW2,NW3)と接続される第1ユニット(100)と、
  内部ネットワーク(NW1)を介して前記第1ユニット(100)と通信可能であり、かつ、第2ネットワーク(NW4,NW5)と接続される第2ユニット(200)とを含み、
 前記第1ユニット(100)は、前記内部ネットワーク(NW1)に接続される第1ポート(11)を有し、
 前記第2ユニット(200)は、前記内部ネットワーク(NW1)に接続される第2ポート(22)を有し、
 前記制御方法は、
 前記第2ユニット(200)が、前記第1ユニット(100)から前記第1ネットワーク(NW1)を識別する第1ネットワーク識別子と前記第1ポート(11)に割り当てられた第1アドレス情報とを取得し、前記第1ネットワーク識別子と前記第1アドレス情報とを対応付けたルーチングテーブル(25)を設定するステップと、
 前記第2ユニット(200)が、前記ルーチングテーブル(25)を用いてパケットの中継を行なうステップとを備える、制御方法。
(Structure 6)
It is a control method of a control system (1) composed of a plurality of units (100, 200, 300).
The plurality of units
The first unit (100) connected to the first network (NW2, NW3) and
A second unit (200) capable of communicating with the first unit (100) via the internal network (NW1) and connected to the second network (NW4, NW5) is included.
The first unit (100) has a first port (11) connected to the internal network (NW1).
The second unit (200) has a second port (22) connected to the internal network (NW1).
The control method is
The second unit (200) acquires a first network identifier that identifies the first network (NW1) from the first unit (100) and first address information assigned to the first port (11). Then, the step of setting the routing table (25) in which the first network identifier and the first address information are associated with each other, and
A control method in which the second unit (200) includes a step of relaying packets using the routing table (25).
 本発明の実施の形態について説明したが、今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 Although the embodiments of the present invention have been described, the embodiments disclosed this time should be considered to be exemplary in all respects and not restrictive. The scope of the present invention is indicated by the claims and is intended to include all modifications within the meaning and scope equivalent to the claims.
 1 制御システム、10 PLCエンジン、11~13,22~24,26 ポート、14 通信部、15 DHCPサーバ、16 NAPT処理部、17,28 設定部、18,29 記憶部、20 ルータ、21 アプリケーションサーバ、25,181 ルーチングテーブル、50,60 設定画面、51~54,61~64,67~69 入力欄、56~58,65,66 チェックボックス、70,71 表示欄、100 制御ユニット、102,202 プロセッサ、104,204 チップセット、106,206 主記憶装置、108,208 二次記憶装置、112,212 USBコントローラ、114,214 メモリカードインターフェイス、115,215 メモリカード、116,118,216,218 ネットワークコントローラ、122,210 内部バスコントローラ、124,224 インジケータ、182 変換データ、200 中継ユニット、300 機能ユニット、400 デバイス、500 サポート装置、600,700 外部機器、NW1 内部ネットワーク、NW2,NW3 ネットワーク、NW4,NW5 外部ネットワーク。 1 controller system, 10 PLC engine, 11-13, 22-24, 26 ports, 14 communication unit, 15 DHCP server, 16 NAPT processing unit, 17, 28 setting unit, 18, 29 storage unit, 20 router, 21 application server. , 25,181 Routine table, 50,60 setting screen, 51-54,61-64,67-69 input field, 56-58,65,66 check box, 70,71 display field, 100 control unit, 102,202 Processor, 104,204 chipset, 106,206 main memory, 108,208 secondary storage, 112,212 USB controller, 114,214 memory card interface, 115,215 memory card, 116,118,216,218 networks Controller, 122,210 internal bus controller, 124,224 indicator, 182 conversion data, 200 relay unit, 300 functional unit, 400 device, 500 support device, 600,700 external device, NW1 internal network, NW2, NW3 network, NW4 NW5 external network.

Claims (6)

  1.  複数のユニットによって構成される制御システムであって、
     前記複数のユニットは、
      第1ネットワークと接続される第1ユニットと、
      内部ネットワークを介して前記第1ユニットと通信可能であり、かつ、第2ネットワークと接続される第2ユニットとを含み、
     前記第1ユニットは、前記内部ネットワークに接続される第1ポートを有し、
     前記第2ユニットは、前記内部ネットワークに接続される第2ポートを有し、
     前記第2ユニットは、さらに、
      ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けた第1ルーチングテーブルを用いてパケットの中継を行なうためのルータと、
      前記第1ユニットから前記第1ネットワークを識別する第1ネットワーク識別子と前記第1ポートに割り当てられた第1アドレス情報とを取得し、前記第1ネットワーク識別子と前記第1アドレス情報とを対応付けて前記第1ルーチングテーブルに設定するための第1設定部とを有する、制御システム。
    A control system consisting of multiple units
    The plurality of units
    The first unit connected to the first network and
    It includes a second unit that can communicate with the first unit via an internal network and is connected to the second network.
    The first unit has a first port connected to the internal network.
    The second unit has a second port connected to the internal network.
    The second unit further
    A router for relaying packets using a first routing table that associates a network identifier that identifies a network with the address information of the forwarding destination of packets destined for a device connected to the network.
    The first network identifier that identifies the first network and the first address information assigned to the first port are acquired from the first unit, and the first network identifier and the first address information are associated with each other. A control system having a first setting unit for setting in the first routing table.
  2.  前記第1ユニットは、さらに、
      前記複数のユニットのネットワーク設定において使用されていないネットワーク識別子を用いて、前記第1ポートに対して前記第1アドレス情報を割り当て、前記第2ポートに対して第2アドレス情報を割り当てるためのアドレス割り当て部を有する、請求項1に記載の制御システム。
    The first unit further
    Address allocation for assigning the first address information to the first port and assigning the second address information to the second port by using a network identifier that is not used in the network settings of the plurality of units. The control system according to claim 1, which has a part.
  3.  前記第1ユニットは、さらに、
      ネットワークを識別するネットワーク識別子と、当該ネットワークに接続される機器を宛先とするパケットの転送先のアドレス情報とを対応付けた第2ルーチングテーブルを用いてパケットの中継を行なうための通信部と、
      前記第2ネットワークを識別する第2ネットワーク識別子と前記アドレス割り当て部によって割り当てられた前記第2アドレス情報とを対応付けて前記第2ルーチングテーブルに設定するための第2設定部とを有する、請求項2に記載の制御システム。
    The first unit further
    A communication unit for relaying packets using a second routing table in which a network identifier that identifies a network and an address information of a packet forwarding destination destined for a device connected to the network are associated with each other.
    A claim having a second network identifier that identifies the second network and a second setting unit for associating the second address information assigned by the address allocation unit and setting the second address information in the second routing table. 2. The control system according to 2.
  4.  前記第1ユニットは、さらに、
      前記第1ネットワーク宛のパケットの送信元アドレスおよびポート番号を変換するためのNAPT(Network Address Port Translation)処理部を有する、請求項1から3のいずれか1項に記載の制御システム。
    The first unit further
    The control system according to any one of claims 1 to 3, further comprising a NAPT (Network Address Port Translation) processing unit for translating a source address and a port number of a packet addressed to the first network.
  5.  前記第2ユニットと前記第2ネットワーク上の機器とはVPN(Virtual Private Network)接続される、請求項1から4のいずれか1項に記載の制御システム。 The control system according to any one of claims 1 to 4, wherein the second unit and the device on the second network are connected by VPN (Virtual Private Network).
  6.  複数のユニットによって構成される制御システムの制御方法であって、
     前記複数のユニットは、
      第1ネットワークに接続される第1ユニットと、
      前記第1ユニットと内部ネットワークを用いて通信可能であり、かつ、第2ネットワークと接続される第2ユニットとを含み、
     前記第1ユニットは、前記内部ネットワークに接続される第1ポートを有し、
     前記第2ユニットは、前記内部ネットワークに接続される第2ポートを有し、
     前記制御方法は、
     前記第2ユニットが、前記第1ユニットから前記第1ネットワークを識別する第1ネットワーク識別子と前記第1ポートに割り当てられた第1アドレス情報とを取得し、前記第1ネットワーク識別子と前記第1アドレス情報とを対応付けたルーチングテーブルを設定するステップと、
     前記第2ユニットが、前記ルーチングテーブルを用いてパケットの中継を行なうステップとを備える、制御方法。
    A control method for a control system consisting of multiple units.
    The plurality of units
    The first unit connected to the first network and
    It includes a second unit that can communicate with the first unit using the internal network and is connected to the second network.
    The first unit has a first port connected to the internal network.
    The second unit has a second port connected to the internal network.
    The control method is
    The second unit acquires the first network identifier that identifies the first network from the first unit and the first address information assigned to the first port, and the first network identifier and the first address. Steps to set up a routing table that associates information with
    A control method in which the second unit includes a step of relaying packets using the routing table.
PCT/JP2020/009960 2019-08-19 2020-03-09 Control system and control method WO2021033356A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019149727A JP2021034773A (en) 2019-08-19 2019-08-19 Control system and control method
JP2019-149727 2019-08-19

Publications (1)

Publication Number Publication Date
WO2021033356A1 true WO2021033356A1 (en) 2021-02-25

Family

ID=74660785

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/009960 WO2021033356A1 (en) 2019-08-19 2020-03-09 Control system and control method

Country Status (2)

Country Link
JP (1) JP2021034773A (en)
WO (1) WO2021033356A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7297178B1 (en) 2022-08-01 2023-06-23 三菱電機株式会社 Simulation program, simulation device, simulation system and simulation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10164118A (en) * 1996-11-29 1998-06-19 Anritsu Corp Inter-lan connecting device
JP2004064379A (en) * 2002-07-29 2004-02-26 Nec Corp Router and program
JP2018528703A (en) * 2015-09-14 2018-09-27 シーメンス アクチエンゲゼルシヤフトSiemens Aktiengesellschaft Method for setting modular control device of industrial automation system and modular control device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10164118A (en) * 1996-11-29 1998-06-19 Anritsu Corp Inter-lan connecting device
JP2004064379A (en) * 2002-07-29 2004-02-26 Nec Corp Router and program
JP2018528703A (en) * 2015-09-14 2018-09-27 シーメンス アクチエンゲゼルシヤフトSiemens Aktiengesellschaft Method for setting modular control device of industrial automation system and modular control device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKESHITA, TAKAFUMI ET AL.: "Introduction of mastering TCP/IP 5th edition", 3.7.7 VPN VIRTUAL PRIVATE NETWORK, 25 December 2012 (2012-12-25), pages 130 - 265 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7297178B1 (en) 2022-08-01 2023-06-23 三菱電機株式会社 Simulation program, simulation device, simulation system and simulation method
WO2024028932A1 (en) * 2022-08-01 2024-02-08 三菱電機株式会社 Simulation program, simulation device, simulation system, and simulation method

Also Published As

Publication number Publication date
JP2021034773A (en) 2021-03-01

Similar Documents

Publication Publication Date Title
US9654394B2 (en) Multi-tenant system, switch, controller and packet transferring method
US9686316B2 (en) Layer-2 security for industrial automation by snooping discovery and configuration messages
US11336751B2 (en) Method for operating a fieldbus system and gateway
CN108183935B (en) Method for providing network communication between IP devices via internet
EP3309818B1 (en) Relay device and manufacturing system
WO2015189932A1 (en) Relay device and air conditioning system
EP2432194B1 (en) Method, device and system for information synchronization
JP4172490B2 (en) Programmable controller
US9344399B2 (en) Relay server and relay communication system
WO2021033356A1 (en) Control system and control method
JP4849340B2 (en) Programmable controller and unit
JP2023017800A (en) Communication between controller and controlled device through wireless network
KR102312516B1 (en) Apparatus and method for port forwarding control to support a virtual private network service
EP1584158A1 (en) Building management system with remote configuration
US10594551B2 (en) Modular industrial automation device and method for configuring a modular industrial automation device
US10374834B2 (en) Modular industrial automation appliance and method for transmitting messages via a backplane bus system of the modular industrial automation appliance
CN110870257B (en) Assigning digital resources within a local, modular computer network (edge cloud)
JP2007081456A (en) Converter
EP1249747A1 (en) Control system and method for controlling processes
JP2007096539A (en) Conversion apparatus
WO2012132833A1 (en) Connection setting information administration system
EP3340542A1 (en) Method for configuring a device connected to a field bus
JP2013115777A (en) Relay server and relay communication system
JP4671056B2 (en) Programmable controller and communication unit
JP2001344129A (en) Remote maintenance system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20855670

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20855670

Country of ref document: EP

Kind code of ref document: A1