WO2018158829A1 - Control system, master apparatus, slave apparatus and control method - Google Patents

Control system, master apparatus, slave apparatus and control method Download PDF

Info

Publication number
WO2018158829A1
WO2018158829A1 PCT/JP2017/007825 JP2017007825W WO2018158829A1 WO 2018158829 A1 WO2018158829 A1 WO 2018158829A1 JP 2017007825 W JP2017007825 W JP 2017007825W WO 2018158829 A1 WO2018158829 A1 WO 2018158829A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
master device
identifier
data
master
Prior art date
Application number
PCT/JP2017/007825
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 三菱電機株式会社
Priority to PCT/JP2017/007825 priority Critical patent/WO2018158829A1/en
Priority to JP2018505052A priority patent/JPWO2018158829A1/en
Publication of WO2018158829A1 publication Critical patent/WO2018158829A1/en

Links

Images

Classifications

    • 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/40Bus networks

Definitions

  • the present invention relates to a control system, a master device, a slave device, and a control method in which a master device controls a controlled device connected to a slave device.
  • a master device that controls a controlled device such as a sensor or a robot controls the controlled device via a network
  • a part of the control function of the master device is delegated to the slave device, and the controlled device is controlled via the slave device.
  • communication called “safety communication”, for example, control used to reliably stop the device when an abnormality occurs in the device is performed.
  • a master device and a slave device are assigned CID (Connection IDentification) for identifying each device.
  • Each device transmits a frame of safety data including the CID of the communication partner device in the header, and establishes a dedicated safety connection between the master device and the slave device that transmits and receives the frame including the CID.
  • safe communication can be performed between specific devices.
  • Patent Document 1 in a network in which a plurality of master devices and a plurality of slave devices are connected, each device communicates between a specific master device and a slave device by using an identifier that identifies a communication partner device. Techniques for performing are disclosed.
  • the present invention has been made in view of the above, and an object of the present invention is to obtain a control system that performs safety communication capable of increasing the number of controlled devices while controlling an increase in slave devices.
  • the control system of the present invention assigns a first identifier and a second identifier to first data that is data for controlling a controlled device.
  • a master device that generates one frame and transmits it to a slave device; receives a first frame addressed to the own device based on a first identifier; and includes a first frame included in the first frame based on a second identifier.
  • a slave device that outputs the data of 1 to a corresponding controlled device.
  • the control system according to the present invention has an effect that the number of controlled devices can be increased while suppressing an increase in the number of slave devices.
  • FIG. 6 is a flowchart showing processing of a frame processing unit of the master device according to the first embodiment
  • 3 is a flowchart showing processing of a network processing unit of the master device according to the first embodiment.
  • FIG. 3 is a flowchart illustrating processing of the network processing unit of the slave device according to the first embodiment; 3 is a flowchart showing processing of a frame processing unit of the slave device according to the first embodiment.
  • FIG. 3 is a diagram illustrating an example in which the processing circuit of the master device according to the first embodiment is configured by a CPU and a memory. The figure which shows the structural example of the control system concerning Embodiment 2. FIG. The figure which shows the example of the actual system configuration
  • FIG. 10 is a flowchart showing processing of a frame processing unit of the slave device according to the second embodiment. 10 is a flowchart showing processing of a frame processing unit of the slave device according to the second embodiment.
  • FIG. 1 is a diagram illustrating a configuration example of a control system 1 according to the first embodiment of the present invention.
  • the control system 1 includes a master device 10 that controls a controlled device, and slave devices 20 and 30 that perform a part of the functions of the master device.
  • each of the master device 10 and the slave devices 20 and 30 is connected via a network 40.
  • An I / O (Input / Output) device 81 and a robot 82 are connected to the slave device 20.
  • an I / O device 83, a robot 84, and a sensor 85 are connected to the slave device 30.
  • the master device 10 controls the I / O device 81, the robot 82, the I / O device 83, the robot 84, and the sensor 85 that are controlled devices via the network 40 and the slave devices 20 and 30.
  • the master device 10 is, for example, a PLC (Programmable Logic Controller).
  • PLC Programmable Logic Controller
  • FIG. 1 the notation of the I / O device is abbreviated as “I / O”. The same applies to the subsequent figures.
  • the control system 1 shown in FIG. 1 includes one master device and two slave devices. However, this is an example, and there may be two or more master devices, or one or three or more slave devices. It may be. Two controlled devices are connected to the slave device 20, and three controlled devices are connected to the slave device 30, but this is an example, and the number of controlled devices connected to the slave device is one or There may be four or more.
  • the controlled devices connected to the slave devices 20 and 30 are not limited to the I / O devices, robots, and sensors shown in FIG. 1, and may be other devices.
  • the network 40 is, for example, a communication network that performs communication using Ethernet (registered trademark), but is not limited thereto.
  • the configuration of the master device 10 will be described.
  • the master device 10 includes control units 11, 12, 13, frame processing units 14, 15, 16, and a network processing unit 17.
  • the control unit 11 is connected to the frame processing unit 14
  • the control unit 12 is connected to the frame processing unit 15,
  • the control unit 13 is connected to the frame processing unit 16.
  • the frame processing units 14 to 16 are connected to the network processing unit 17.
  • the control units 11 to 13 each correspond to one controlled device connected to the slave devices 20 and 30, and generate first data that is data for controlling the corresponding controlled device. Each of the control units 11 to 13 outputs the generated first data to the connected frame processing unit among the frame processing units 14 to 16. In addition, the control units 11 to 13 are connected to the second device generated by the controlled device via the connected frame processing unit among the slave devices 20 and 30, the network 40, the network processing unit 17, and the frame processing units 14 to 16. Get the data.
  • the control units 11 to 13 perform communication with a corresponding controlled device using a communication protocol corresponding to each controlled device.
  • the control units 11 to 13 perform, for example, safety communication with the controlled device.
  • the first data and the second data are data transmitted and received when the control units 11 to 13 and the controlled device perform safety communication.
  • the operations of the master device 10 and the slave devices 20 and 30 when the control units 11 to 13 and the controlled device perform safety communication will be described.
  • communication performed between the control units 11 to 13 and the controlled device is referred to as safety communication for convenience, but communication for establishing a dedicated safety connection between the master device and the slave device. Or what is necessary is just to communicate preferentially over other communications between a master device and a slave device.
  • the frame processing units 14 to 16 When the frame processing units 14 to 16 obtain the first data from the connected control unit among the control units 11 to 13, respectively, the frame processing units 14 to 16 assign the CID and the sub-CID to the first data, that is, the first frame, that is, the safety Generate data.
  • the frame processing units 14 to 16 output the generated first frame to the network processing unit 17.
  • the CID is an identifier for identifying the individual device, in the example of the control system 1 shown in FIG. 1, the master device 10 and the slave devices 20 and 30.
  • the sub CID is an identifier indicating a data processing path in each device. Let the CID be the first identifier and the sub-CID be the second identifier.
  • the frame processing units 14 to 16 establish a safety connection for performing safety communication with the frame processing unit of the slave device, which will be described later, and perform safety communication.
  • the CID is an identifier for identifying the master device 10 and identifying the slave devices 20 and 30.
  • FIG. 2 is a diagram illustrating an example of a frame format of the first frame, that is, the safety data generated in the frame processing units 14 to 16 of the master device 10 according to the first embodiment.
  • the data portion is the portion where the first data generated by the control units 11 to 13 is stored, and the header and CRC (Cyclic Redundancy Check) portions are assigned by the frame processing units 14 to 16. Part.
  • the frame processing units 14 to 16 generate the first frame by including the CID and the sub-CID in the header part.
  • safety data refers to data transmitted by safety communication.
  • the frame processing units 14 to 16 obtain the second frame, that is, the safety data transmitted from the slave devices 20 and 30 from the network processing unit 17, the header including the CID and the sub-CID from the second frame, and The CRC is removed to obtain the second data, and the obtained second data is output to the connected control unit among the control units 11-13.
  • the frame format of the second frame, that is, the safety data transmitted from the slave devices 20 and 30 is the same as that in FIG.
  • the CID and sub-CID are set in advance for each device and each frame processing unit by the administrator of the control system 1 when the control system 1 is constructed. As will be described later, depending on the specific configuration of the master device 10 and the slave devices 20 and 30, the sub CID may be automatically assigned in each device.
  • the network processing unit 17 When the network processing unit 17 acquires the first frame from the frame processing units 14 to 16, the network processing unit 17 assigns an Ethernet frame header, an application header, and a footer to the first frame, and sends the first frame to the slave device via the network 40. A network frame to be transmitted to 20 and 30 is generated. Based on the CID assigned to the header of the first frame, the network processing unit 17 sets the slave device corresponding to the CID as the destination in the Ethernet frame header, and transmits the network frame to the network 40. Further, when the network processing unit 17 acquires the first frame from the plurality of frame processing units 14 to 16, one network, in this case, a plurality of first frames is assigned to each slave device having the same destination based on the CID. Transmit as one network frame.
  • FIG. 3 is a diagram illustrating an example of a frame format of the network frame when the network processing unit 17 of the master device 10 according to the first embodiment transmits the first frame, that is, the safety data for each slave device.
  • the network processing unit 17 transmits the same CID in the first frame shown in FIG. 2 in one network frame as shown in FIG.
  • the address of the slave device that is the destination is set in the Ethernet frame header based on the CID, as in the case of a general Ethernet frame.
  • the CID may be the same as the address of the slave device or the master device, or may be different from the address as long as the address of the slave device or the master device can be uniquely specified.
  • the master device 10 adds the Ethernet frame header, the application header, and the footer to all the first frames, and assigns the first frame, that is, the network frame including one safety data to the number of the first frames.
  • the number of frames on the network 40 can be reduced as compared with the case where only the transmission is performed.
  • the control system 1 can suppress an increase in traffic on the network 40.
  • the network processing unit 17 is transmitted from the slave devices 20 and 30 based on the destination of the Ethernet frame header of the network frame transmitted from the slave devices 20 and 30, that is, the CID assigned to the header of the second frame.
  • the network frame addressed to its own device is received via the network 40.
  • the network processing unit 17 removes the Ethernet frame header, the application header, and the footer from the network frame, and acquires a second frame, that is, safety data.
  • the network processing unit 17 outputs the second frame to the frame processing unit corresponding to the sub CID among the frame processing units 14 to 16 based on the sub CID assigned to the header of the second frame.
  • the network processing unit 17 transmits the plurality of second frames.
  • each second frame is sent to the frame processing unit corresponding to the sub-CID among the frame processing units 14 to 16 based on the sub-CID assigned to the header of each second frame. 2 frames are output.
  • the frame format when the slave devices 20 and 30 transmit a plurality of second frames as one network frame for each master device having the same destination is the same as that in FIG.
  • the slave device 20 includes a network processing unit 21 and frame processing units 22 and 23.
  • the frame processing unit 22 is connected to the I / O device 81, and the frame processing unit 23 is connected to the robot 82.
  • the frame processing units 22 and 23 are connected to the network processing unit 21.
  • the slave device 30 includes a network processing unit 31 and frame processing units 32, 33, and 34.
  • the frame processing unit 32 is connected to the I / O device 83
  • the frame processing unit 33 is connected to the robot 84
  • the frame processing unit 34 is connected to the sensor 85.
  • the frame processing units 32 to 34 are connected to the network processing unit 31. Since the slave devices 20 and 30 have the same configuration except for the number of frame processing units, the slave device 20 will be described as an example.
  • the network processing unit 21 determines the network frame transmitted from the master device 10 based on the destination of the Ethernet frame header of the network frame transmitted from the master device 10, that is, the CID assigned to the header of the first frame.
  • a network frame addressed to the apparatus is received via the network 40.
  • the network processing unit 21 removes the Ethernet frame header, the application header, and the footer from the network frame, and acquires the first frame, that is, the safety data.
  • the network processing unit 21 outputs the first frame to the frame processing unit corresponding to the sub CID among the frame processing units 22 and 23 based on the sub CID assigned to the header of the first frame.
  • the network processing unit 21 receives a network frame including the plurality of first frames.
  • Each first frame is output to the frame processing unit corresponding to the sub CID among the frame processing units 22 and 23 based on the sub CID assigned to the header of each first frame.
  • the network processing unit 21 acquires the second frame from the frame processing units 22 and 23, the network processing unit 21 adds an Ethernet frame header, an application header, and a footer to the second frame, and sends the second frame via the network 40.
  • a network frame to be transmitted to the master device 10 is generated.
  • the network processing unit 21 sets the master device corresponding to the CID as the destination in the Ethernet frame header, and transmits the network frame to the network 40.
  • the network processing unit 21 acquires the second frame from the plurality of frame processing units 22 and 23, based on the CID, the network processing unit 21 converts the plurality of second frames into one frame for each master device having the same destination, here Transmit as one network frame.
  • the network processing unit 21 transmits the same CID in the second frame in a network frame as shown in FIG. Thereby, the slave device 20 adds the Ethernet frame header, the application header, and the footer to all the second frames, and the second frame, that is, the network frame including one piece of safety data is added to the number of the second frames.
  • the number of frames on the network 40 can be reduced as compared with the case where only the transmission is performed. As a result, the control system 1 can suppress an increase in traffic on the network 40.
  • the frame processing units 22 and 23 When the frame processing units 22 and 23 obtain the first frame, that is, the safety data transmitted from the network processing unit 21 by the master device 10, the frame processing units 22 and 23 remove the header including the CID and the sub-CID and the CRC from the first frame. The first data is acquired, and the acquired first data is output to the controlled device to be connected.
  • the frame processing units 22 and 23 when each of the frame processing units 22 and 23 acquires the second data from the controlled device to be connected, the frame processing units 22 and 23 add the CID and the sub-CID to the second data and generate the second frame, that is, the safety data. .
  • the frame processing units 22 and 23 output the generated second frame to the network processing unit 21. Similar to the frame processing units 14 to 16 of the master device 10, the frame processing units 22 and 23 generate a second frame by adding a header including a CID and a sub-CID and a CRC to the second data.
  • the frame processing units 22 and 23 establish safety connection for performing safety communication with the frame processing unit of the master device described above, and perform safety communication.
  • FIG. 4 is a diagram illustrating an example of an actual system configuration of the control system 1 according to the first embodiment.
  • the master device 10 and the slave devices 20 and 30 constituting the control system 1 are represented by functional blocks. However, in FIG. 4, the device is actually represented in units.
  • the master device 10 includes a network unit 104 and optional (hereinafter referred to as OPU) units 101 to 103.
  • the network unit 104 is a device that implements the network processing unit 17 of FIG.
  • Each OPU unit is a device that realizes one set of control unit and frame processing unit in FIG.
  • the master device 10 may include a base unit, and the network unit 104 and the OPU units 101 to 103 may be connected to the slots of the base unit. In this case, in the master device 10, the number of OPU units is determined by the number of slots in the base unit.
  • the slave device 20 includes a network unit 203 and units 201 and 202.
  • the network unit 203 is a device that implements the network processing unit 21 of FIG.
  • Each unit is a device that realizes one frame processing unit in FIG.
  • the slave device 20 may include a base unit, and the network unit 203 and the units 201 and 202 may be connected to the slots of the base unit. In this case, in the slave device 20, the number of units is determined by the number of slots of the base unit.
  • the CID is a station number set for each device in order to identify each device, and specifically indicates the position of each device in the network 40.
  • the CID may be the address of the master device 10 or the slave devices 20 and 30 as described above.
  • the sub CID is a number set for identifying the physical position in each device, and specifically indicates the slot position of the frame processing unit in each device.
  • the master device 10 when the number of connectable OPU units is determined, sub-CIDs corresponding to the number of connectable OPU units may be set in advance. Thereby, the master device 10 sets the position of the OPU unit corresponding to the controlled device connected to the slave device, so that the sub-CID of the frame processing unit of the OPU unit, specifically the master device 10 shown in FIG. Can be set automatically.
  • the slave devices 20 and 30 when the number of connectable units is determined, sub-CIDs corresponding to the number of connectable units may be set in advance.
  • the slave devices 20 and 30 set the position of the unit corresponding to the frame processing unit of the master device, so that the unit, specifically, the sub CID of the frame processing unit of the slave devices 20 and 30 shown in FIG. Can be set automatically.
  • FIG. 5 is a flowchart showing processing of the frame processing units 14 to 16 of the master device 10 according to the first embodiment.
  • the frame processing units 14 to 16 obtain data from the control units 11 to 13 (step S1).
  • the frame processing units 14 to 16 add the header including the CID and the sub-CID and the CRC to the acquired data, generate safety data, and output it to the network processing unit 17 (step S2).
  • FIG. 6 is a flowchart of a process performed by the network processing unit 17 of the master device 10 according to the first embodiment.
  • the network processing unit 17 first selects one frame processing unit in order to acquire safety data from all the frame processing units (step S11). When the network processing unit 17 acquires the safety data from the selected frame processing unit (step S12), the network processing unit 17 confirms the CID of the safety data (step S13). The network processing unit 17 adds the acquired safety data to the target network frame of the corresponding CID among the network frames generated for each CID, that is, for each destination slave device (step S14).
  • step S15 When there is a frame processing unit that has not been completed for all the frame processing units, that is, there is a frame processing unit that has not been selected (step S15), the network processing unit 17 returns to step S11 and selects the next frame processing unit.
  • the network processing unit 17 repeatedly performs the same processing and ends all the frame processing units, that is, when there is no frame processing unit that has not been selected (step S15)
  • the network processing unit 17 sets each network frame as a destination slave. It transmits to the apparatus (step S16).
  • FIG. 7 is a flowchart of a process performed by the network processing unit 21 of the slave device 20 according to the first embodiment. Since the processing of the slave devices 20 and 30 is the same, the slave device 20 will be described as an example.
  • the network processing unit 21 selects one piece of safety data from the network frame (step S22).
  • the network processing unit 21 extracts the selected safety data from the network frame (step S23), and confirms the sub-CID of the extracted safety data (step S24).
  • the network processing unit 21 outputs the extracted safety data to the sub-CID target frame processing unit (step S25).
  • step S26 If there is unfinished safety data for all safety data, that is, there is safety data that has not been selected (step S26), the network processing unit 21 returns to step S22 and selects the next safety data. The network processing unit 21 ends the process when the same process is repeated and the process is completed for all the safety data, that is, when there is no unselected safety data (step S26).
  • FIG. 8 is a flowchart showing processing of the frame processing units 22 and 23 of the slave device 20 according to the first embodiment.
  • the frame processing units 22 and 23 remove the header and CRC from the acquired safety data and acquire the data for safety communication generated by the control unit of the master device 10 (Ste S31).
  • the frame processing units 22 and 23 output the acquired data to the controlled device to be connected (step S32).
  • each frame processing unit performs the opposite operation. That is, in the slave device 20, the frame processing units 22 and 23 generate safety data and the network processing unit 21 sends the network frame including the safety data to the master device 10 by the same processing as the flowcharts shown in FIGS. Send. Further, in the master device 10, the network processing unit 17 acquires the safety data when the network processing unit 17 receives the network frame by the same processing as the flowcharts shown in FIGS. The data for safety communication generated in step 1 is acquired and output to the control units 11-13.
  • the output destination of the data in step S32 in FIG. 8 is not the controlled device but the control units 11-13.
  • a process in which the master device 10 transmits safety data is defined as a first transmission step, and a process in which the slave device 20 receives safety data is defined as a first reception step. Further, the process in which the slave device 20 transmits safety data is referred to as a second transmission step, and the process in which the master device 10 receives safety data is referred to as a second reception step.
  • the control units 11 to 13, the frame processing units 14 to 16, and the network processing unit 17 are realized by a processing circuit.
  • the processing circuit is, for example, a CPU (Central Processing Unit) that executes a program stored in the memory and a memory.
  • CPU Central Processing Unit
  • FIG. 9 is a diagram illustrating an example in which the processing circuit of the master device 10 according to the first embodiment is configured by a CPU and a memory.
  • the processing circuit includes the CPU 91 and the memory 92
  • each function of the master device 10 is realized by software, firmware, or a combination of software and firmware.
  • Software or firmware is described as a program and stored in the memory 92.
  • each function is realized by the CPU 91 reading and executing the program stored in the memory 92. That is, in the master device 10, the processing circuit includes a memory 92 for storing a program that is executed as a result of transmitting and receiving a frame including two identifiers of CID and sub-CID.
  • the CPU 91 may be a processing device, an arithmetic device, a microprocessor, a microcomputer, a processor, a DSP (Digital Signal Processor), or the like.
  • the memory 92 is, for example, non-volatile or volatile, such as RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), etc.
  • RAM Random Access Memory
  • ROM Read Only Memory
  • flash memory EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), etc.
  • Such semiconductor memory, magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD (Digital Versatile Disc), and the like are applicable.
  • the processing circuit can realize the functions described above by software, firmware, or a combination thereof.
  • the slave devices 20 and 30 described for the hardware configuration of the master device 10 can also be realized by the same hardware configuration as that of the master device 10.
  • the control unit for setting the CID for identifying each device in the master device 10 and the slave devices 20 and 30 and controlling the controlled device in the master device 10.
  • Sub-CIDs are set in the frame processing unit connected to the control unit and the frame processing unit connected to the controlled device in the slave devices 20 and 30, and the master device 10 and the slave devices 20 and 30 have two identifiers, CID and sub-CID. It is decided to generate safety data including and communicate between each device.
  • the control system 1 can increase the number of controlled devices while controlling an increase in the number of slave devices because the master device can control the plurality of controlled devices while the slave device is connected to the plurality of controlled devices. Can do.
  • the control system 1 can simultaneously perform safety communication for a plurality of controlled devices between the master device 10 and the slave devices 20 and 30.
  • the CID for identifying the device and the sub CID for identifying the processing route of the data to the controlled device are used to establish a safety connection corresponding to the combination of the CID and the sub CID.
  • the control system 1 can establish a total of six safety connections even if there are two master devices and two slave devices. . Therefore, the number of safety connections for safety communication can be increased without increasing the number of slave devices.
  • the master device 10 and the slave devices 20 and 30 transmit the safety data addressed to the same device as one network frame for each destination device. Thereby, an increase in the number of frames in the network 40 can be suppressed.
  • the network processing unit 17 of the master device 10 and the network processing units 21 and 31 of the slave devices 20 and 30 only confirm the CID and the sub-CID for the safety data, the safety data itself is affected. Without being transmitted to the network 40.
  • three frame processing units 14 to 16 of the master device 10 are provided, two frame processing units 22 and 23 of the slave device 20 are provided, and three frame processing units 32 to 33 of the slave device 30 are provided. Needless to say, it is not limited to this number. Also, a plurality of frame processing units 14 to 16 of the master device 10, frame processing units 22 and 23 of the slave device 20, and a plurality of frame processing units 32 to 33 of the slave device 30 are described for convenience. There may be a plurality of frames, and the number of frame processing units may be one.
  • the data processing path is used for the sub-CID.
  • an identifier different from the CID that is the first identifier may be provided. You may make it utilize the unique identification number which a control apparatus has.
  • identifiers two types are used: a CID that is a first identifier and a sub-CID that is a second identifier. However, a further identifier following the second identifier is also used. Also good.
  • Embodiment 2 a case will be described in which a master device has a redundant configuration in a control system, and the control system includes a control master device and a standby master device.
  • FIG. 10 is a diagram of a configuration example of the control system 1a according to the second embodiment.
  • the control system 1 a includes a master device 50 that is a master device of a control system, a master device 60 that is a standby master device, and a slave device 70.
  • the control system 1a includes a plurality of master devices.
  • one master device is a master device 50 that is a control-system master device
  • the other master device is a master device 60 that is a standby-system master device.
  • the master device 50 and the slave device 70 are connected via a network 41.
  • the master device 60 and the slave device 70 are connected via the network 42.
  • Master devices 50 and 60 are connected by a tracking line 43.
  • An I / O device 86, a robot 87, and a sensor 88 are connected to the slave device 70.
  • the control system 1a is a system in which the master device 50 and the master device 60 control the I / O device 86, the robot 87, and the sensor 88, which are controlled devices, via the networks 41 and 42 and the slave device 70.
  • the master device 50 which is a control master device, is referred to as a first master device
  • the master device 60 which is a standby master device, is referred to as a second master device.
  • the control system 1a it can be set by the CID that the master device 50 is a control master device and the master device 60 is a standby master device.
  • the slave device 70 can recognize whether the safety data is from the master device 50 or the master device 60 by confirming the destination of the Ethernet frame header of the received network frame, that is, the CID of the safety data.
  • the slave device 70 uses the network frame safety data received from the master device 50, and does not receive the network frame including the safety data from the master device 50.
  • the network frame safety data received from the master device 60 is used.
  • the configuration of the master devices 50 and 60 is the same as that of the master device 10 of the first embodiment.
  • Each of the master devices 50 and 60 independently generates safety data and transmits it to the slave device 70 as a network frame.
  • Master devices 50 and 60 each receive a network frame including safety data from slave device 70.
  • the frame processing units 72 to 74 generate safety data by adding the CID and sub CID of the master device 50 to the data acquired from the controlled device, and output it to the network processing unit 71. To do. Further, the frame processing units 72 to 74 generate safety data by adding the CID and sub-CID of the master device 60 to the data acquired from the controlled device, and output the safety data to the network processing unit 71. As described above, the frame processing units 72 to 74 generate two pieces of safety data for the control system and the standby system. Note that the method of generating individual safety data in the frame processing units 72 to 74 is the same as that of the frame processing units 22 and 23 of the first embodiment. In the frame processing units 72 to 74, the processing when the first frame is acquired from the network processing unit 71 is the same as the frame processing units 22 and 23 of the first embodiment.
  • the network processing unit 71 When the network processing unit 71 acquires the safety data addressed to the master device 50 from the frame processing units 72 to 74, the network processing unit 71 collects the safety data into one network frame and transmits it to the master device 50. Further, when the network processing unit 71 acquires the safety data addressed to the master device 60 from the frame processing units 72 to 74, the network processing unit 71 collects the safety data into one network frame and transmits it to the master device 60.
  • the network processing unit 71 uses the safety data included in the network frame received from the master device 50 when the network frame is received from the master device 50, and the master device when the network frame is received from the master device 60. The network frame received from 60 is discarded. When the network processing unit 71 does not receive a network frame from the master device 50 and receives a network frame from the master device 60, the network processing unit 71 uses the safety data included in the network frame received from the master device 60. The network processing unit 71 acquires safety data from the network frame that has been determined to be used. The processing for the network frame decided to be used in the network processing unit 71 is the same as the network processing unit 21 in the first embodiment.
  • the slave device 70 when the slave device 70 can communicate with both the master device 50 and the master device 60, the slave device 70 performs safety communication between the two master devices. Thus, when the slave device 70 becomes unable to perform safety communication with the master device 50, the slave device 70 can immediately perform safety communication using the safety data received from the master device 60.
  • FIG. 11 is a diagram illustrating an example of an actual system configuration of the control system 1a according to the second embodiment.
  • the master devices 50 and 60 and the slave device 70 constituting the control system 1a are represented by functional blocks, but in FIG. 11, they are represented in units of devices that are actually used.
  • the master device 50 includes a network unit 504 and OPU units 501 to 503.
  • the network unit 504 is a device that implements the network processing unit 57 of FIG.
  • Each OPU unit is a device that realizes one set of control unit and frame processing unit in FIG.
  • the master device 60 has the same configuration.
  • the configuration of master devices 50 and 60 is the same as that of master device 10 of the first embodiment shown in FIG.
  • the slave device 70 includes a network unit 704 and units 701 to 703.
  • the network unit 704 is a device that implements the network processing unit 71 of FIG.
  • Each unit is a device that realizes one frame processing unit in FIG.
  • the configuration of slave device 70 is the same as that of slave devices 20 and 30 of the first embodiment shown in FIG.
  • each of master devices 50 and 60 performs the same processing as master device 10 of the first embodiment shown in the flowcharts of FIGS.
  • the network processing unit 71 of the slave device 70 performs the same processing as the network processing unit 21 of the slave device 20 of the first embodiment shown in the flowchart of FIG.
  • FIG. 12 is a flowchart showing processing of the frame processing units 72 to 74 of the slave device 70 according to the second embodiment.
  • the frame processing units 72 to 74 acquire the safety data from the network processing unit 71
  • the frame processing units 72 to 74 remove the header and CRC from the acquired safety data and are generated by the control unit of the control system master device 50 or the standby system master device 60.
  • Data for secure communication is acquired (step S31).
  • the frame processing units 72 to 74 confirm the master frame data transmitted from which master device. Specifically, when acquiring data from the control system master device 50 (step S41: Yes), the frame processing units 72 to 74 determine to use the data acquired from the control system master device 50 (step S41: Yes). Step S42).
  • step S43: Yes the frame processing units 72 to 74 discard the data acquired from the standby master device 60 (step S44). If the frame processing units 72 to 74 have not acquired data from the standby master device 60 (step S43: No), the processing of step S44 is omitted.
  • step S45 the frame processing units 72 to 74 have acquired data from the standby master device 60 (step S45). To use the data obtained from the master device 60 (step S46). The frame processing units 72 to 74 output the acquired data to the connected controlled device (step S32).
  • FIG. 13 is a flowchart showing processing of the frame processing units 72 to 74 of the slave device 70 according to the second embodiment.
  • the frame processing units 72 to 74 acquire data from the controlled devices to which they are connected (step S51).
  • the frame processing units 72 to 74 generate safety data for the two master devices 50 and 60 using the acquired data, and output them to the network processing unit 71 (step S52).
  • the frame processing units 72 to 74 generate safety data by adding the header including the CID and sub CID of the control system master device 50 and CRC to the acquired data, and output the safety data to the network processing unit 71 To do.
  • the frame processing units 72 to 74 generate safety data by adding the header and CRC including the CID and sub-CID of the standby master device 60 to the acquired data, and output the safety data to the network processing unit 17.
  • the safety data for the control master device 50 acquired from the frame processing units 72 to 74 and the safety data for the standby master device 60 acquired from the frame processing units 72 to 74 are used.
  • the same operation as the network processing unit 17 of the master device 10 of the first embodiment shown in FIG. 6 is performed.
  • Each of the control master device 50 and the standby master device 60 performs the same processing as that of the slave device 20 of the first embodiment shown in the flowcharts of FIGS.
  • the hardware configurations of the master devices 50 and 60 and the slave device 70 are realized by the same configuration as that of the first embodiment shown in FIG.
  • each of the master devices 50 and 60 is the master of the first embodiment. Processing similar to that of the apparatus 10 is performed.
  • the slave device 70 receives safety data from the master device 50
  • the slave device 70 uses the safety data received from the master device 50, while receiving safety data from the master device 60 without receiving safety data from the master device 50.
  • the safety data received from the standby master device 60 is used.
  • safety communication can be performed immediately using the safety data received from the master device 60.
  • the configuration described in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and can be combined with other configurations without departing from the gist of the present invention. It is also possible to omit or change the part.
  • 1, 1a control system 10 50, 60 master device, 11-13, 51-53, 61-63 control unit, 14-16, 22, 23, 32-34, 54-56, 64-66, 72- 74, frame processing unit, 17, 21, 31, 57, 67, 71 network processing unit, 20, 30, 70 slave device, 40, 41, 42 network, 43 tracking line, 81, 83, 86 I / O device, 82 , 84, 87 Robot, 85, 88 Sensor, 101-103, 501-503, 601-603 OPU unit, 104, 203, 304, 504, 604, 704 Network unit, 201, 202, 301-303, 701-703 unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

A control system comprises: a master apparatus (10) that assigns a first identifier and a second identifier to first data serving as data for controlling a controlled device, generates a first frame, and transmits the first frame to a slave apparatus; and a slave apparatus (20, 30) that receives, on the basis of the first identifier, the first frame addressed to the slave apparatus, and outputs, on the basis of the second identifier, the first data included in the first frame to a corresponding controlled device.

Description

制御システム、マスタ装置、スレーブ装置および制御方法Control system, master device, slave device, and control method
 本発明は、マスタ装置がスレーブ装置に接続された被制御機器を制御する制御システム、マスタ装置、スレーブ装置および制御方法に関する。 The present invention relates to a control system, a master device, a slave device, and a control method in which a master device controls a controlled device connected to a slave device.
 従来、センサやロボット等の被制御機器を制御するマスタ装置が、ネットワークを介して被制御機器を制御する場合、マスタ装置の制御機能の一部をスレーブ装置に代行させ、スレーブ装置を介して被制御機器を制御することで、マスタ装置自身の負荷を軽減可能な制御システムがある。マスタ装置とスレーブ装置との間では、安全通信と呼ばれる、例えば、装置に異常が発生した場合に装置を確実に停止させる制御などに使用される通信が行われる。このような制御システムでは、マスタ装置およびスレーブ装置に各装置を識別するためのCID(Connection IDentification)が付与されている。各装置が通信相手の装置のCIDをヘッダに含めた安全データのフレームを送信し、CIDを含むフレームを送受信するマスタ装置とスレーブ装置との間で、同フレーム専用の安全コネクションを確立することで、制御システムでは、特定の装置間で安全通信を行うことができる。 Conventionally, when a master device that controls a controlled device such as a sensor or a robot controls the controlled device via a network, a part of the control function of the master device is delegated to the slave device, and the controlled device is controlled via the slave device. There is a control system that can reduce the load on the master device itself by controlling the control device. Between the master device and the slave device, communication called “safety communication”, for example, control used to reliably stop the device when an abnormality occurs in the device is performed. In such a control system, a master device and a slave device are assigned CID (Connection IDentification) for identifying each device. Each device transmits a frame of safety data including the CID of the communication partner device in the header, and establishes a dedicated safety connection between the master device and the slave device that transmits and receives the frame including the CID. In the control system, safe communication can be performed between specific devices.
 特許文献1には、複数のマスタ装置および複数のスレーブ装置が接続されるネットワークにおいて、各装置が通信相手の装置を特定する識別子を用いることで、特定のマスタ装置とスレーブ装置との間で通信を行う技術が開示されている。 In Patent Document 1, in a network in which a plurality of master devices and a plurality of slave devices are connected, each device communicates between a specific master device and a slave device by using an identifier that identifies a communication partner device. Techniques for performing are disclosed.
特開2001-257696号公報JP 2001-257696A
 しかしながら、上記従来の技術によれば、安全通信を確保しながら制御システムで制御対象の被制御機器を増やす場合、安全通信を行う為の安全コネクションがマスタ装置とスレーブ装置との間で1つしか確立できないため、被制御機器と接続するスレーブ装置も増やさなければならない。そのため、被制御機器が増えるほどスレーブ装置も増え、ネットワークの構成が大きくなってしまう、という問題があった。 However, according to the above-described conventional technology, when the number of controlled devices to be controlled is increased in the control system while ensuring safety communication, there is only one safety connection between the master device and the slave device for performing safety communication. Since it cannot be established, the number of slave devices connected to controlled devices must be increased. For this reason, there is a problem that as the number of controlled devices increases, the number of slave devices also increases and the network configuration increases.
 本発明は、上記に鑑みてなされたものであって、スレーブ装置の増加を抑えつつ制御対象の被制御機器を増やすことが可能な安全通信を行う制御システムを得ることを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to obtain a control system that performs safety communication capable of increasing the number of controlled devices while controlling an increase in slave devices.
 上述した課題を解決し、目的を達成するために、本発明の制御システムは、被制御機器を制御するデータである第1のデータに、第1の識別子および第2の識別子を付与して第1のフレームを生成し、スレーブ装置に送信するマスタ装置と、第1の識別子に基づいて自装置宛の第1のフレームを受信し、第2の識別子に基づいて第1のフレームに含まれる第1のデータを、対応する被制御機器に出力するスレーブ装置と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, the control system of the present invention assigns a first identifier and a second identifier to first data that is data for controlling a controlled device. A master device that generates one frame and transmits it to a slave device; receives a first frame addressed to the own device based on a first identifier; and includes a first frame included in the first frame based on a second identifier. And a slave device that outputs the data of 1 to a corresponding controlled device.
 本発明にかかる制御システムは、スレーブ装置の増加を抑えつつ制御対象の被制御機器を増やすことができる、という効果を奏する。 The control system according to the present invention has an effect that the number of controlled devices can be increased while suppressing an increase in the number of slave devices.
実施の形態1にかかる制御システムの構成例を示す図The figure which shows the structural example of the control system concerning Embodiment 1. FIG. 実施の形態1にかかるマスタ装置のフレーム処理部において生成される第1のフレームすなわち安全データのフレームフォーマットの例を示す図The figure which shows the example of the frame format of the 1st flame | frame produced | generated in the frame process part of the master apparatus concerning Embodiment 1, ie, safety data. 実施の形態1にかかるマスタ装置のネットワーク処理部において第1のフレームすなわち安全データをスレーブ装置毎にまとめて送信するときのネットワークフレームのフレームフォーマットの例を示す図The figure which shows the example of the frame format of a network frame when the network process part of the master apparatus concerning Embodiment 1 transmits the 1st frame, ie, safety data, for every slave apparatus collectively. 実施の形態1にかかる制御システムの実際のシステム構成の例を示す図The figure which shows the example of the actual system configuration | structure of the control system concerning Embodiment 1. FIG. 実施の形態1にかかるマスタ装置のフレーム処理部の処理を示すフローチャート6 is a flowchart showing processing of a frame processing unit of the master device according to the first embodiment; 実施の形態1にかかるマスタ装置のネットワーク処理部の処理を示すフローチャート3 is a flowchart showing processing of a network processing unit of the master device according to the first embodiment. 実施の形態1にかかるスレーブ装置のネットワーク処理部の処理を示すフローチャートFIG. 3 is a flowchart illustrating processing of the network processing unit of the slave device according to the first embodiment; 実施の形態1にかかるスレーブ装置のフレーム処理部の処理を示すフローチャート3 is a flowchart showing processing of a frame processing unit of the slave device according to the first embodiment. 実施の形態1にかかるマスタ装置の処理回路をCPUおよびメモリで構成する場合の例を示す図FIG. 3 is a diagram illustrating an example in which the processing circuit of the master device according to the first embodiment is configured by a CPU and a memory. 実施の形態2にかかる制御システムの構成例を示す図The figure which shows the structural example of the control system concerning Embodiment 2. FIG. 実施の形態2にかかる制御システムの実際のシステム構成の例を示す図The figure which shows the example of the actual system configuration | structure of the control system concerning Embodiment 2. FIG. 実施の形態2にかかるスレーブ装置のフレーム処理部の処理を示すフローチャート10 is a flowchart showing processing of a frame processing unit of the slave device according to the second embodiment. 実施の形態2にかかるスレーブ装置のフレーム処理部の処理を示すフローチャート10 is a flowchart showing processing of a frame processing unit of the slave device according to the second embodiment.
 以下に、本発明の実施の形態にかかる制御システム、マスタ装置、スレーブ装置および制御方法を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 Hereinafter, a control system, a master device, a slave device, and a control method according to an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
実施の形態1.
 図1は、本発明の実施の形態1にかかる制御システム1の構成例を示す図である。制御システム1は、被制御機器を制御するマスタ装置10と、マスタ装置の機能の一部を代行するスレーブ装置20,30と、を備える。制御システム1において、マスタ装置10およびスレーブ装置20,30の各装置は、ネットワーク40を介して接続されている。スレーブ装置20には、I/O(Input/Output)機器81およびロボット82が接続されている。また、スレーブ装置30には、I/O機器83、ロボット84、およびセンサ85が接続されている。制御システム1は、マスタ装置10が、ネットワーク40およびスレーブ装置20,30を介して、被制御機器であるI/O機器81、ロボット82、I/O機器83、ロボット84、およびセンサ85を制御するシステムである。マスタ装置10は、例えば、PLC(Programmable Logic Controller)である。なお、図1ではI/O機器の表記を「I/O」と省略している。以降の図についても同様とする。
Embodiment 1 FIG.
FIG. 1 is a diagram illustrating a configuration example of a control system 1 according to the first embodiment of the present invention. The control system 1 includes a master device 10 that controls a controlled device, and slave devices 20 and 30 that perform a part of the functions of the master device. In the control system 1, each of the master device 10 and the slave devices 20 and 30 is connected via a network 40. An I / O (Input / Output) device 81 and a robot 82 are connected to the slave device 20. In addition, an I / O device 83, a robot 84, and a sensor 85 are connected to the slave device 30. In the control system 1, the master device 10 controls the I / O device 81, the robot 82, the I / O device 83, the robot 84, and the sensor 85 that are controlled devices via the network 40 and the slave devices 20 and 30. System. The master device 10 is, for example, a PLC (Programmable Logic Controller). In FIG. 1, the notation of the I / O device is abbreviated as “I / O”. The same applies to the subsequent figures.
 図1に示す制御システム1では、マスタ装置を1つおよびスレーブ装置を2つ備えているが、一例であり、マスタ装置を2つ以上にしてもよいし、スレーブ装置を1つまたは3つ以上にしてもよい。スレーブ装置20には2つの被制御機器が接続され、スレーブ装置30には3つの被制御機器が接続されているが、一例であり、スレーブ装置に接続される被制御機器の数は1つまたは4つ以上であってもよい。また、スレーブ装置20,30に接続される被制御機器は、図1に示すI/O機器、ロボット、およびセンサに限定されず、他の機器であってもよい。ネットワーク40は、例えば、イーサネット(登録商標)による通信を行う通信ネットワークであるが、これに限定されるものではない。 The control system 1 shown in FIG. 1 includes one master device and two slave devices. However, this is an example, and there may be two or more master devices, or one or three or more slave devices. It may be. Two controlled devices are connected to the slave device 20, and three controlled devices are connected to the slave device 30, but this is an example, and the number of controlled devices connected to the slave device is one or There may be four or more. The controlled devices connected to the slave devices 20 and 30 are not limited to the I / O devices, robots, and sensors shown in FIG. 1, and may be other devices. The network 40 is, for example, a communication network that performs communication using Ethernet (registered trademark), but is not limited thereto.
 マスタ装置10の構成について説明する。マスタ装置10は、制御部11,12,13と、フレーム処理部14,15,16と、ネットワーク処理部17と、を備える。マスタ装置10では、制御部11はフレーム処理部14と接続し、制御部12はフレーム処理部15と接続し、制御部13はフレーム処理部16と接続している。また、フレーム処理部14~16は、ネットワーク処理部17と接続している。 The configuration of the master device 10 will be described. The master device 10 includes control units 11, 12, 13, frame processing units 14, 15, 16, and a network processing unit 17. In the master device 10, the control unit 11 is connected to the frame processing unit 14, the control unit 12 is connected to the frame processing unit 15, and the control unit 13 is connected to the frame processing unit 16. The frame processing units 14 to 16 are connected to the network processing unit 17.
 制御部11~13は、各々、スレーブ装置20,30に接続されている1つの被制御機器に対応し、対応する被制御機器を制御するデータである第1のデータを生成する。制御部11~13は、各々、生成した第1のデータを、フレーム処理部14~16のうち接続するフレーム処理部に出力する。また、制御部11~13は、スレーブ装置20,30、ネットワーク40、ネットワーク処理部17、およびフレーム処理部14~16のうち接続するフレーム処理部を介して、被制御機器で生成された第2のデータを取得する。制御部11~13は、対応する被制御機器との間で、各被制御機器に応じた通信プロトコルによる通信を行う。制御部11~13は、被制御機器との間で、例えば、安全通信を行う。第1のデータおよび第2のデータは、制御部11~13および被制御機器が安全通信を行うときに送受信されるデータである。以降の説明では、一例として、制御部11~13および被制御機器が安全通信を行うときの、マスタ装置10およびスレーブ装置20,30の動作について説明する。なお、本実施の形態において、制御部11~13と被制御機器との間で行われる通信は、便宜上安全通信と呼ぶが、マスタ装置とスレーブ装置との間に専用の安全コネクションを確立する通信や、マスタ装置とスレーブ装置との間に他の通信よりも優先して通信するものであれば良い。 The control units 11 to 13 each correspond to one controlled device connected to the slave devices 20 and 30, and generate first data that is data for controlling the corresponding controlled device. Each of the control units 11 to 13 outputs the generated first data to the connected frame processing unit among the frame processing units 14 to 16. In addition, the control units 11 to 13 are connected to the second device generated by the controlled device via the connected frame processing unit among the slave devices 20 and 30, the network 40, the network processing unit 17, and the frame processing units 14 to 16. Get the data. The control units 11 to 13 perform communication with a corresponding controlled device using a communication protocol corresponding to each controlled device. The control units 11 to 13 perform, for example, safety communication with the controlled device. The first data and the second data are data transmitted and received when the control units 11 to 13 and the controlled device perform safety communication. In the following description, as an example, the operations of the master device 10 and the slave devices 20 and 30 when the control units 11 to 13 and the controlled device perform safety communication will be described. In the present embodiment, communication performed between the control units 11 to 13 and the controlled device is referred to as safety communication for convenience, but communication for establishing a dedicated safety connection between the master device and the slave device. Or what is necessary is just to communicate preferentially over other communications between a master device and a slave device.
 フレーム処理部14~16は、各々、制御部11~13のうち接続する制御部から第1のデータを取得すると、第1のデータに、CIDおよびサブCIDを付与して第1のフレームすなわち安全データを生成する。フレーム処理部14~16は、生成した第1のフレームをネットワーク処理部17に出力する。ここで、CIDとは、個々の装置、図1に示す制御システム1の例では、マスタ装置10およびスレーブ装置20,30を識別するための識別子である。サブCIDとは、各装置内においてデータの処理経路を示す識別子である。CIDを第1の識別子とし、サブCIDを第2の識別子とする。フレーム処理部14~16は、後述するスレーブ装置のフレーム処理部との間で、安全通信を行うための安全コネクションを確立して安全通信を行う。CIDは、マスタ装置10を識別し、スレーブ装置20,30を識別するための識別子である。 When the frame processing units 14 to 16 obtain the first data from the connected control unit among the control units 11 to 13, respectively, the frame processing units 14 to 16 assign the CID and the sub-CID to the first data, that is, the first frame, that is, the safety Generate data. The frame processing units 14 to 16 output the generated first frame to the network processing unit 17. Here, the CID is an identifier for identifying the individual device, in the example of the control system 1 shown in FIG. 1, the master device 10 and the slave devices 20 and 30. The sub CID is an identifier indicating a data processing path in each device. Let the CID be the first identifier and the sub-CID be the second identifier. The frame processing units 14 to 16 establish a safety connection for performing safety communication with the frame processing unit of the slave device, which will be described later, and perform safety communication. The CID is an identifier for identifying the master device 10 and identifying the slave devices 20 and 30.
 図2は、実施の形態1にかかるマスタ装置10のフレーム処理部14~16において生成される第1のフレームすなわち安全データのフレームフォーマットの例を示す図である。図2において、データの部分が制御部11~13で生成された第1のデータが格納される部分であり、ヘッダおよびCRC(Cyclic Redundancy Check)の部分がフレーム処理部14~16で付与される部分である。フレーム処理部14~16は、ヘッダ部分にCIDおよびサブCIDを含めて第1のフレームを生成する。なお、安全データとは、安全通信で送信するデータを言う。 FIG. 2 is a diagram illustrating an example of a frame format of the first frame, that is, the safety data generated in the frame processing units 14 to 16 of the master device 10 according to the first embodiment. In FIG. 2, the data portion is the portion where the first data generated by the control units 11 to 13 is stored, and the header and CRC (Cyclic Redundancy Check) portions are assigned by the frame processing units 14 to 16. Part. The frame processing units 14 to 16 generate the first frame by including the CID and the sub-CID in the header part. Note that safety data refers to data transmitted by safety communication.
 また、フレーム処理部14~16は、ネットワーク処理部17から、スレーブ装置20,30によって送信された第2のフレームすなわち安全データを取得すると、第2のフレームからCIDおよびサブCIDを含むヘッダ、およびCRCを除去して第2のデータを取得し、取得した第2のデータを、制御部11~13のうち接続する制御部に出力する。スレーブ装置20,30から送信される第2のフレームすなわち安全データのフレームフォーマットは、図2と同様である。 Further, when the frame processing units 14 to 16 obtain the second frame, that is, the safety data transmitted from the slave devices 20 and 30 from the network processing unit 17, the header including the CID and the sub-CID from the second frame, and The CRC is removed to obtain the second data, and the obtained second data is output to the connected control unit among the control units 11-13. The frame format of the second frame, that is, the safety data transmitted from the slave devices 20 and 30 is the same as that in FIG.
 CIDおよびサブCIDについては、制御システム1の管理者などが、制御システム1の構築時に予め各装置および各フレーム処理部に対して設定しておく。なお、後述するように、マスタ装置10およびスレーブ装置20,30の具体的な構成によっては、各装置において、サブCIDを自動設定で割り当てるようにしてもよい。 The CID and sub-CID are set in advance for each device and each frame processing unit by the administrator of the control system 1 when the control system 1 is constructed. As will be described later, depending on the specific configuration of the master device 10 and the slave devices 20 and 30, the sub CID may be automatically assigned in each device.
 ネットワーク処理部17は、フレーム処理部14~16から第1のフレームを取得すると、第1のフレームにイーサネットフレームヘッダ、アプリケーションヘッダ、およびフッダを付与し、第1のフレームをネットワーク40経由でスレーブ装置20,30に送信するためのネットワークフレームを生成する。ネットワーク処理部17は、第1のフレームのヘッダに付与されたCIDに基づいて、CIDに対応するスレーブ装置を宛先としてイーサネットフレームヘッダに設定し、ネットワークフレームをネットワーク40に送信する。また、ネットワーク処理部17は、複数のフレーム処理部14~16から第1のフレームを取得すると、CIDに基づいて、宛先が同じスレーブ装置毎に複数の第1のフレームを1つのフレーム、ここでは1つのネットワークフレームにして送信する。 When the network processing unit 17 acquires the first frame from the frame processing units 14 to 16, the network processing unit 17 assigns an Ethernet frame header, an application header, and a footer to the first frame, and sends the first frame to the slave device via the network 40. A network frame to be transmitted to 20 and 30 is generated. Based on the CID assigned to the header of the first frame, the network processing unit 17 sets the slave device corresponding to the CID as the destination in the Ethernet frame header, and transmits the network frame to the network 40. Further, when the network processing unit 17 acquires the first frame from the plurality of frame processing units 14 to 16, one network, in this case, a plurality of first frames is assigned to each slave device having the same destination based on the CID. Transmit as one network frame.
 図3は、実施の形態1にかかるマスタ装置10のネットワーク処理部17において第1のフレームすなわち安全データをスレーブ装置毎にまとめて送信するときのネットワークフレームのフレームフォーマットの例を示す図である。ネットワーク処理部17は、図2に示す第1のフレームにおいてCIDが同一のものについて、図3に示すように1つのネットワークフレームにまとめて送信する。なお、図示していないが、一般的なイーサネットフレームと同様、イーサネットフレームヘッダには、CIDに基づいて宛先となるスレーブ装置のアドレスが設定されているものとする。CIDについては、スレーブ装置またはマスタ装置のアドレスと同一であってもよいし、スレーブ装置またはマスタ装置のアドレスが一意に特定できればアドレスと異なっていてもよい。これにより、マスタ装置10は、全ての第1のフレームにイーサネットフレームヘッダ、アプリケーションヘッダ、およびフッダを付与して、第1のフレームすなわち安全データが1つ含まれるネットワークフレームを第1のフレームの数だけ送信する場合と比較して、ネットワーク40上のフレーム数を減少させることができる。この結果、制御システム1では、ネットワーク40のトラフィックの増加を抑制することができる。 FIG. 3 is a diagram illustrating an example of a frame format of the network frame when the network processing unit 17 of the master device 10 according to the first embodiment transmits the first frame, that is, the safety data for each slave device. The network processing unit 17 transmits the same CID in the first frame shown in FIG. 2 in one network frame as shown in FIG. Although not shown, it is assumed that the address of the slave device that is the destination is set in the Ethernet frame header based on the CID, as in the case of a general Ethernet frame. The CID may be the same as the address of the slave device or the master device, or may be different from the address as long as the address of the slave device or the master device can be uniquely specified. As a result, the master device 10 adds the Ethernet frame header, the application header, and the footer to all the first frames, and assigns the first frame, that is, the network frame including one safety data to the number of the first frames. The number of frames on the network 40 can be reduced as compared with the case where only the transmission is performed. As a result, the control system 1 can suppress an increase in traffic on the network 40.
 また、ネットワーク処理部17は、スレーブ装置20,30から送信されたネットワークフレームのイーサネットフレームヘッダの宛先、すなわち第2のフレームのヘッダに付与されたCIDに基づいて、スレーブ装置20,30から送信されたネットワークフレームのうち自装置宛のネットワークフレームを、ネットワーク40を介して受信する。ネットワーク処理部17は、自装置宛のネットワークフレームを受信すると、ネットワークフレームからイーサネットフレームヘッダ、アプリケーションヘッダ、およびフッダを除去し、第2のフレームすなわち安全データを取得する。ネットワーク処理部17は、第2のフレームのヘッダに付与されたサブCIDに基づいて、フレーム処理部14~16のうちサブCIDに対応するフレーム処理部に第2のフレームを出力する。 Further, the network processing unit 17 is transmitted from the slave devices 20 and 30 based on the destination of the Ethernet frame header of the network frame transmitted from the slave devices 20 and 30, that is, the CID assigned to the header of the second frame. The network frame addressed to its own device is received via the network 40. When the network processing unit 17 receives the network frame addressed to itself, the network processing unit 17 removes the Ethernet frame header, the application header, and the footer from the network frame, and acquires a second frame, that is, safety data. The network processing unit 17 outputs the second frame to the frame processing unit corresponding to the sub CID among the frame processing units 14 to 16 based on the sub CID assigned to the header of the second frame.
 ネットワーク処理部17は、スレーブ装置20,30が自装置と同様、宛先が同じマスタ装置毎に複数の第2のフレームを1つのネットワークフレームにして送信している場合、複数の第2のフレームを含むネットワークフレームを受信すると、各第2のフレームを、各第2のフレームのヘッダに付与されたサブCIDに基づいて、フレーム処理部14~16のうちサブCIDに対応するフレーム処理部に各第2のフレームを出力する。スレーブ装置20,30が同じ宛先のマスタ装置毎に複数の第2のフレームを1つのネットワークフレームにして送信している場合のフレームフォーマットは、図3と同様である。 When the slave devices 20 and 30 are transmitting a plurality of second frames as one network frame for each master device having the same destination, the network processing unit 17 transmits the plurality of second frames. When the network frame including the received frame is received, each second frame is sent to the frame processing unit corresponding to the sub-CID among the frame processing units 14 to 16 based on the sub-CID assigned to the header of each second frame. 2 frames are output. The frame format when the slave devices 20 and 30 transmit a plurality of second frames as one network frame for each master device having the same destination is the same as that in FIG.
 つぎに、スレーブ装置20,30の構成について説明する。スレーブ装置20は、ネットワーク処理部21と、フレーム処理部22,23と、を備える。スレーブ装置20では、フレーム処理部22はI/O機器81と接続し、フレーム処理部23はロボット82と接続している。また、フレーム処理部22,23は、ネットワーク処理部21と接続している。スレーブ装置30は、ネットワーク処理部31と、フレーム処理部32,33,34と、を備える。スレーブ装置30では、フレーム処理部32はI/O機器83と接続し、フレーム処理部33はロボット84と接続し、フレーム処理部34はセンサ85と接続している。また、フレーム処理部32~34は、ネットワーク処理部31と接続している。スレーブ装置20,30については、フレーム処理部の数を除けば同様の構成のため、スレーブ装置20を例にして説明する。 Next, the configuration of the slave devices 20 and 30 will be described. The slave device 20 includes a network processing unit 21 and frame processing units 22 and 23. In the slave device 20, the frame processing unit 22 is connected to the I / O device 81, and the frame processing unit 23 is connected to the robot 82. The frame processing units 22 and 23 are connected to the network processing unit 21. The slave device 30 includes a network processing unit 31 and frame processing units 32, 33, and 34. In the slave device 30, the frame processing unit 32 is connected to the I / O device 83, the frame processing unit 33 is connected to the robot 84, and the frame processing unit 34 is connected to the sensor 85. The frame processing units 32 to 34 are connected to the network processing unit 31. Since the slave devices 20 and 30 have the same configuration except for the number of frame processing units, the slave device 20 will be described as an example.
 ネットワーク処理部21は、マスタ装置10から送信されたネットワークフレームのイーサネットフレームヘッダの宛先、すなわち第1のフレームのヘッダに付与されたCIDに基づいて、マスタ装置10から送信されたネットワークフレームのうち自装置宛のネットワークフレームを、ネットワーク40を介して受信する。ネットワーク処理部21は、自装置宛のネットワークフレームを受信すると、ネットワークフレームからイーサネットフレームヘッダ、アプリケーションヘッダ、およびフッダを除去し、第1のフレームすなわち安全データを取得する。ネットワーク処理部21は、第1のフレームのヘッダに付与されたサブCIDに基づいて、フレーム処理部22,23のうちサブCIDに対応するフレーム処理部に第1のフレームを出力する。 The network processing unit 21 determines the network frame transmitted from the master device 10 based on the destination of the Ethernet frame header of the network frame transmitted from the master device 10, that is, the CID assigned to the header of the first frame. A network frame addressed to the apparatus is received via the network 40. When the network processing unit 21 receives the network frame addressed to itself, the network processing unit 21 removes the Ethernet frame header, the application header, and the footer from the network frame, and acquires the first frame, that is, the safety data. The network processing unit 21 outputs the first frame to the frame processing unit corresponding to the sub CID among the frame processing units 22 and 23 based on the sub CID assigned to the header of the first frame.
 ネットワーク処理部21は、マスタ装置10が同じ宛先のスレーブ装置毎に複数の第1のフレームを1つのネットワークフレームにして送信している場合、複数の第1のフレームを含むネットワークフレームを受信すると、各第1のフレームを、各第1のフレームのヘッダに付与されたサブCIDに基づいて、フレーム処理部22,23のうちサブCIDに対応するフレーム処理部に各第1のフレームを出力する。 When the master device 10 transmits a plurality of first frames as one network frame for each slave device having the same destination, the network processing unit 21 receives a network frame including the plurality of first frames. Each first frame is output to the frame processing unit corresponding to the sub CID among the frame processing units 22 and 23 based on the sub CID assigned to the header of each first frame.
 また、ネットワーク処理部21は、フレーム処理部22,23から第2のフレームを取得すると、第2のフレームにイーサネットフレームヘッダ、アプリケーションヘッダ、およびフッダを付与し、第2のフレームをネットワーク40経由でマスタ装置10に送信するためのネットワークフレームを生成する。ネットワーク処理部21は、第2のフレームのヘッダに付与されたCIDに基づいて、CIDに対応するマスタ装置を宛先としてイーサネットフレームヘッダに設定し、ネットワークフレームをネットワーク40に送信する。また、ネットワーク処理部21は、複数のフレーム処理部22,23から第2のフレームを取得すると、CIDに基づいて、宛先が同じマスタ装置毎に複数の第2のフレームを1つのフレーム、ここでは1つのネットワークフレームにして送信する。 Further, when the network processing unit 21 acquires the second frame from the frame processing units 22 and 23, the network processing unit 21 adds an Ethernet frame header, an application header, and a footer to the second frame, and sends the second frame via the network 40. A network frame to be transmitted to the master device 10 is generated. Based on the CID assigned to the header of the second frame, the network processing unit 21 sets the master device corresponding to the CID as the destination in the Ethernet frame header, and transmits the network frame to the network 40. Further, when the network processing unit 21 acquires the second frame from the plurality of frame processing units 22 and 23, based on the CID, the network processing unit 21 converts the plurality of second frames into one frame for each master device having the same destination, here Transmit as one network frame.
 ネットワーク処理部21は、第2のフレームにおいてCIDが同一のものについて、図3に示すようにネットワークフレームにまとめて送信する。これにより、スレーブ装置20は、全ての第2のフレームにイーサネットフレームヘッダ、アプリケーションヘッダ、およびフッダを付与して、第2のフレームすなわち安全データが1つ含まれるネットワークフレームを第2のフレームの数だけ送信する場合と比較して、ネットワーク40上のフレーム数を減少させることができる。この結果、制御システム1では、ネットワーク40のトラフィックの増加を抑制することができる。 The network processing unit 21 transmits the same CID in the second frame in a network frame as shown in FIG. Thereby, the slave device 20 adds the Ethernet frame header, the application header, and the footer to all the second frames, and the second frame, that is, the network frame including one piece of safety data is added to the number of the second frames. The number of frames on the network 40 can be reduced as compared with the case where only the transmission is performed. As a result, the control system 1 can suppress an increase in traffic on the network 40.
 フレーム処理部22,23は、ネットワーク処理部21から、マスタ装置10によって送信された第1のフレームすなわち安全データを取得すると、第1のフレームからCIDおよびサブCIDを含むヘッダ、およびCRCを除去して第1のデータを取得し、取得した第1のデータを、接続する被制御機器に出力する。 When the frame processing units 22 and 23 obtain the first frame, that is, the safety data transmitted from the network processing unit 21 by the master device 10, the frame processing units 22 and 23 remove the header including the CID and the sub-CID and the CRC from the first frame. The first data is acquired, and the acquired first data is output to the controlled device to be connected.
 また、フレーム処理部22,23は、各々、接続する被制御機器から第2のデータを取得すると、第2のデータに、CIDおよびサブCIDを付与して第2のフレームすなわち安全データを生成する。フレーム処理部22,23は、生成した第2のフレームをネットワーク処理部21に出力する。フレーム処理部22,23は、マスタ装置10のフレーム処理部14~16と同様、第2のデータに、CIDおよびサブCIDを含むヘッダ、およびCRCを付与して第2のフレームを生成する。フレーム処理部22,23は、前述のマスタ装置のフレーム処理部との間で、安全通信を行うための安全コネクションを確立して安全通信を行う。 In addition, when each of the frame processing units 22 and 23 acquires the second data from the controlled device to be connected, the frame processing units 22 and 23 add the CID and the sub-CID to the second data and generate the second frame, that is, the safety data. . The frame processing units 22 and 23 output the generated second frame to the network processing unit 21. Similar to the frame processing units 14 to 16 of the master device 10, the frame processing units 22 and 23 generate a second frame by adding a header including a CID and a sub-CID and a CRC to the second data. The frame processing units 22 and 23 establish safety connection for performing safety communication with the frame processing unit of the master device described above, and perform safety communication.
 ここで、実際の制御システム1の構成について説明する。図4は、実施の形態1にかかる制御システム1の実際のシステム構成の例を示す図である。図1では制御システム1を構成するマスタ装置10およびスレーブ装置20,30を機能ブロックで表していたが、図4では、実際に使用される機器の単位で示している。 Here, the actual configuration of the control system 1 will be described. FIG. 4 is a diagram illustrating an example of an actual system configuration of the control system 1 according to the first embodiment. In FIG. 1, the master device 10 and the slave devices 20 and 30 constituting the control system 1 are represented by functional blocks. However, in FIG. 4, the device is actually represented in units.
 マスタ装置10は、ネットワークユニット104、およびオプション(以下、OPUとする。)ユニット101~103から構成される。ネットワークユニット104は、図1のネットワーク処理部17を実現する機器である。各OPUユニットは、図1における1組の制御部およびフレーム処理部を実現する機器である。このように、マスタ装置10では、OPUユニットを増設することによって、制御部およびフレーム処理部の組み合わせを簡単に増やすことができる。なお、図4では省略しているが、マスタ装置10は、ベースユニットを備え、ネットワークユニット104およびOPUユニット101~103がベースユニットの各スロットに接続された構成であってもよい。この場合、マスタ装置10では、ベースユニットのスロット数によってOPUユニットの数が決定される。 The master device 10 includes a network unit 104 and optional (hereinafter referred to as OPU) units 101 to 103. The network unit 104 is a device that implements the network processing unit 17 of FIG. Each OPU unit is a device that realizes one set of control unit and frame processing unit in FIG. As described above, in the master device 10, the number of combinations of control units and frame processing units can be easily increased by adding OPU units. Although not shown in FIG. 4, the master device 10 may include a base unit, and the network unit 104 and the OPU units 101 to 103 may be connected to the slots of the base unit. In this case, in the master device 10, the number of OPU units is determined by the number of slots in the base unit.
 スレーブ装置20,30については、ユニットの数を除けば同様の構成のため、スレーブ装置20を例にして説明する。スレーブ装置20は、ネットワークユニット203、およびユニット201,202から構成される。ネットワークユニット203は、図1のネットワーク処理部21を実現する機器である。各ユニットは、図1における1つのフレーム処理部を実現する機器である。このように、スレーブ装置20では、ユニットを増設することによって、フレーム処理部を簡単に増やすことができる。なお、図4では省略しているが、スレーブ装置20は、ベースユニットを備え、ネットワークユニット203およびユニット201,202がベースユニットの各スロットに接続された構成であってもよい。この場合、スレーブ装置20では、ベースユニットのスロット数によってユニットの数が決定される。 Since the slave devices 20 and 30 have the same configuration except for the number of units, the slave device 20 will be described as an example. The slave device 20 includes a network unit 203 and units 201 and 202. The network unit 203 is a device that implements the network processing unit 21 of FIG. Each unit is a device that realizes one frame processing unit in FIG. Thus, in the slave device 20, the number of frame processing units can be easily increased by adding more units. Although omitted in FIG. 4, the slave device 20 may include a base unit, and the network unit 203 and the units 201 and 202 may be connected to the slots of the base unit. In this case, in the slave device 20, the number of units is determined by the number of slots of the base unit.
 図4に示す制御システム1において、CIDは、各装置を識別するために各装置に設定された局番であり、具体的にネットワーク40内での各装置の位置を示すものである。CIDは、前述のように、マスタ装置10またはスレーブ装置20,30のアドレスであってもよい。また、サブCIDは、各装置内での物理的な位置を識別するため設定された番号であり、具体的に各装置内でのフレーム処理部のスロット位置を示すものである。 In the control system 1 shown in FIG. 4, the CID is a station number set for each device in order to identify each device, and specifically indicates the position of each device in the network 40. The CID may be the address of the master device 10 or the slave devices 20 and 30 as described above. The sub CID is a number set for identifying the physical position in each device, and specifically indicates the slot position of the frame processing unit in each device.
 なお、マスタ装置10では、接続可能なOPUユニットの数が決まっている場合、予め接続可能なOPUユニットの数の分のサブCIDを設定しておいてもよい。これにより、マスタ装置10は、スレーブ装置に接続された被制御機器に対応するOPUユニットの位置を設定することで、OPUユニット、具体的に図1に示すマスタ装置10のフレーム処理部のサブCIDを自動設定することができる。同様に、スレーブ装置20,30では、接続可能なユニットの数が決まっている場合、予め接続可能なユニットス数の分のサブCIDを設定しておいてもよい。これにより、スレーブ装置20,30は、マスタ装置のフレーム処理部に対応するユニットの位置を設定することで、ユニット、具体的に図1に示すスレーブ装置20,30のフレーム処理部のサブCIDを自動設定することができる。 In the master device 10, when the number of connectable OPU units is determined, sub-CIDs corresponding to the number of connectable OPU units may be set in advance. Thereby, the master device 10 sets the position of the OPU unit corresponding to the controlled device connected to the slave device, so that the sub-CID of the frame processing unit of the OPU unit, specifically the master device 10 shown in FIG. Can be set automatically. Similarly, in the slave devices 20 and 30, when the number of connectable units is determined, sub-CIDs corresponding to the number of connectable units may be set in advance. Thus, the slave devices 20 and 30 set the position of the unit corresponding to the frame processing unit of the master device, so that the unit, specifically, the sub CID of the frame processing unit of the slave devices 20 and 30 shown in FIG. Can be set automatically.
 つづいて、制御システム1で行われる安全通信において、マスタ装置10からスレーブ装置20,30に安全データを送信するときの各装置の処理について説明する。 Next, processing of each device when safety data is transmitted from the master device 10 to the slave devices 20 and 30 in the safety communication performed in the control system 1 will be described.
 図5は、実施の形態1にかかるマスタ装置10のフレーム処理部14~16の処理を示すフローチャートである。制御部11~13が被制御機器に対する安全通信用のデータを生成すると、フレーム処理部14~16は、制御部11~13からデータを取得する(ステップS1)。フレーム処理部14~16は、取得したデータに、CIDおよびサブCIDを含むヘッダ、およびCRCを付与して安全データを生成し、ネットワーク処理部17に出力する(ステップS2)。 FIG. 5 is a flowchart showing processing of the frame processing units 14 to 16 of the master device 10 according to the first embodiment. When the control units 11 to 13 generate data for safety communication with respect to the controlled device, the frame processing units 14 to 16 obtain data from the control units 11 to 13 (step S1). The frame processing units 14 to 16 add the header including the CID and the sub-CID and the CRC to the acquired data, generate safety data, and output it to the network processing unit 17 (step S2).
 図6は、実施の形態1にかかるマスタ装置10のネットワーク処理部17の処理を示すフローチャートである。ネットワーク処理部17は、全てのフレーム処理部から安全データを取得するため、まず、1つのフレーム処理部を選択する(ステップS11)。ネットワーク処理部17は、選択したフレーム処理部から安全データを取得すると(ステップS12)、安全データのCIDを確認する(ステップS13)。ネットワーク処理部17は、取得した安全データを、CID毎すなわち宛先のスレーブ装置毎に生成したネットワークフレームのうち該当するCIDの対象のネットワークフレームに追加する(ステップS14)。ネットワーク処理部17は、全てのフレーム処理部について終了していない、すなわち選択していないフレーム処理部がある場合(ステップS15)、ステップS11に戻って次のフレーム処理部を選択する。ネットワーク処理部17は、同様の処理を繰り返し行って全てのフレーム処理部について終了した場合、すなわち選択していないフレーム処理部がない場合(ステップS15)、CIDに基づいて各ネットワークフレームを宛先のスレーブ装置に送信する(ステップS16)。 FIG. 6 is a flowchart of a process performed by the network processing unit 17 of the master device 10 according to the first embodiment. The network processing unit 17 first selects one frame processing unit in order to acquire safety data from all the frame processing units (step S11). When the network processing unit 17 acquires the safety data from the selected frame processing unit (step S12), the network processing unit 17 confirms the CID of the safety data (step S13). The network processing unit 17 adds the acquired safety data to the target network frame of the corresponding CID among the network frames generated for each CID, that is, for each destination slave device (step S14). When there is a frame processing unit that has not been completed for all the frame processing units, that is, there is a frame processing unit that has not been selected (step S15), the network processing unit 17 returns to step S11 and selects the next frame processing unit. When the network processing unit 17 repeatedly performs the same processing and ends all the frame processing units, that is, when there is no frame processing unit that has not been selected (step S15), the network processing unit 17 sets each network frame as a destination slave. It transmits to the apparatus (step S16).
 マスタ装置10では、フレーム処理部14~16およびネットワーク処理部17が、上記で説明した図5および図6に示す処理を周期的に行っているものとする。 In the master device 10, it is assumed that the frame processing units 14 to 16 and the network processing unit 17 periodically perform the processing shown in FIGS. 5 and 6 described above.
 図7は、実施の形態1にかかるスレーブ装置20のネットワーク処理部21の処理を示すフローチャートである。スレーブ装置20,30の処理は同様のため、スレーブ装置20を例にして説明する。ネットワーク処理部21は、マスタ装置10からネットワークフレームを受信すると(ステップS21)、ネットワークフレームから1つの安全データを選択する(ステップS22)。ネットワーク処理部21は、ネットワークフレームから、選択した安全データを取り出し(ステップS23)、取り出した安全データのサブCIDを確認する(ステップS24)。ネットワーク処理部21は、取り出した安全データを、サブCIDの対象のフレーム処理部に出力する(ステップS25)。ネットワーク処理部21は、全ての安全データについて終了していない、すなわち選択していない安全データがある場合(ステップS26)、ステップS22に戻って次の安全データを選択する。ネットワーク処理部21は、同様の処理を繰り返し行って全ての安全データについて終了した場合、すなわち選択していない安全データがない場合(ステップS26)、処理を終了する。 FIG. 7 is a flowchart of a process performed by the network processing unit 21 of the slave device 20 according to the first embodiment. Since the processing of the slave devices 20 and 30 is the same, the slave device 20 will be described as an example. When receiving a network frame from the master device 10 (step S21), the network processing unit 21 selects one piece of safety data from the network frame (step S22). The network processing unit 21 extracts the selected safety data from the network frame (step S23), and confirms the sub-CID of the extracted safety data (step S24). The network processing unit 21 outputs the extracted safety data to the sub-CID target frame processing unit (step S25). If there is unfinished safety data for all safety data, that is, there is safety data that has not been selected (step S26), the network processing unit 21 returns to step S22 and selects the next safety data. The network processing unit 21 ends the process when the same process is repeated and the process is completed for all the safety data, that is, when there is no unselected safety data (step S26).
 図8は、実施の形態1にかかるスレーブ装置20のフレーム処理部22,23の処理を示すフローチャートである。フレーム処理部22,23は、ネットワーク処理部21から安全データを取得すると、取得した安全データからヘッダおよびCRCを除去し、マスタ装置10の制御部で生成された安全通信用のデータを取得する(ステップS31)。フレーム処理部22,23は、取得したデータを、接続する被制御機器に出力する(ステップS32)。 FIG. 8 is a flowchart showing processing of the frame processing units 22 and 23 of the slave device 20 according to the first embodiment. When acquiring the safety data from the network processing unit 21, the frame processing units 22 and 23 remove the header and CRC from the acquired safety data and acquire the data for safety communication generated by the control unit of the master device 10 ( Step S31). The frame processing units 22 and 23 output the acquired data to the controlled device to be connected (step S32).
 マスタ装置10からスレーブ装置20,30に安全データを送信する動作について説明したが、スレーブ装置20,30からマスタ装置に安全データを送信する場合、安全データの流れが反対になり、各フレーム処理部および各ネットワーク処理部は反対の動作をすることになる。すなわち、スレーブ装置20では、図5および図6に示すフローチャートと同様の処理によって、フレーム処理部22,23が安全データを生成し、ネットワーク処理部21が安全データを含むネットワークフレームをマスタ装置10に送信する。また、マスタ装置10では、図7および図8に示すフローチャートと同様の処理によって、ネットワーク処理部17がネットワークフレームを受信すると安全データを取得し、フレーム処理部14~16が安全データから被制御機器で生成された安全通信用のデータを取得して制御部11~13に出力する。マスタ装置10の場合、図8のステップS32でのデータの出力先は、被制御機器ではなく制御部11~13となる。マスタ装置10が安全データを送信する処理を第1の送信ステップとし、スレーブ装置20が安全データを受信する処理を第1の受信ステップとする。また、スレーブ装置20が安全データを送信する処理を第2の送信ステップとし、マスタ装置10が安全データを受信する処理を第2の受信ステップとする。 The operation of transmitting safety data from the master device 10 to the slave devices 20 and 30 has been described. However, when safety data is transmitted from the slave devices 20 and 30 to the master device, the flow of safety data is reversed, and each frame processing unit Each network processing unit performs the opposite operation. That is, in the slave device 20, the frame processing units 22 and 23 generate safety data and the network processing unit 21 sends the network frame including the safety data to the master device 10 by the same processing as the flowcharts shown in FIGS. Send. Further, in the master device 10, the network processing unit 17 acquires the safety data when the network processing unit 17 receives the network frame by the same processing as the flowcharts shown in FIGS. The data for safety communication generated in step 1 is acquired and output to the control units 11-13. In the case of the master device 10, the output destination of the data in step S32 in FIG. 8 is not the controlled device but the control units 11-13. A process in which the master device 10 transmits safety data is defined as a first transmission step, and a process in which the slave device 20 receives safety data is defined as a first reception step. Further, the process in which the slave device 20 transmits safety data is referred to as a second transmission step, and the process in which the master device 10 receives safety data is referred to as a second reception step.
 つづいて、マスタ装置10のハードウェア構成について説明する。マスタ装置10において、制御部11~13、フレーム処理部14~16、およびネットワーク処理部17は処理回路により実現される。処理回路は、例えば、メモリに格納されるプログラムを実行するCPU(Central Processing Unit)およびメモリである。 Next, the hardware configuration of the master device 10 will be described. In the master device 10, the control units 11 to 13, the frame processing units 14 to 16, and the network processing unit 17 are realized by a processing circuit. The processing circuit is, for example, a CPU (Central Processing Unit) that executes a program stored in the memory and a memory.
 図9は、実施の形態1にかかるマスタ装置10の処理回路をCPUおよびメモリで構成する場合の例を示す図である。処理回路がCPU91およびメモリ92で構成される場合、マスタ装置10の各機能は、ソフトウェア、ファームウェア、またはソフトウェアとファームウェアとの組み合わせにより実現される。ソフトウェアまたはファームウェアはプログラムとして記述され、メモリ92に格納される。処理回路では、メモリ92に記憶されたプログラムをCPU91が読み出して実行することにより、各機能を実現する。すなわち、マスタ装置10において、処理回路は、CIDおよびサブCIDの2つの識別子を含むフレームを送受信することが結果的に実行されることになるプログラムを格納するためのメモリ92を備える。また、これらのプログラムは、マスタ装置10の手順および方法をコンピュータに実行させるものであるともいえる。ここで、CPU91は、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、プロセッサ、またはDSP(Digital Signal Processor)などであってもよい。また、メモリ92とは、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable ROM)、EEPROM(登録商標)(Electrically EPROM)などの、不揮発性または揮発性の半導体メモリ、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、またはDVD(Digital Versatile Disc)などが該当する。 FIG. 9 is a diagram illustrating an example in which the processing circuit of the master device 10 according to the first embodiment is configured by a CPU and a memory. When the processing circuit includes the CPU 91 and the memory 92, each function of the master device 10 is realized by software, firmware, or a combination of software and firmware. Software or firmware is described as a program and stored in the memory 92. In the processing circuit, each function is realized by the CPU 91 reading and executing the program stored in the memory 92. That is, in the master device 10, the processing circuit includes a memory 92 for storing a program that is executed as a result of transmitting and receiving a frame including two identifiers of CID and sub-CID. Further, it can be said that these programs cause the computer to execute the procedure and method of the master device 10. Here, the CPU 91 may be a processing device, an arithmetic device, a microprocessor, a microcomputer, a processor, a DSP (Digital Signal Processor), or the like. The memory 92 is, for example, non-volatile or volatile, such as RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), etc. Such semiconductor memory, magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD (Digital Versatile Disc), and the like are applicable.
 このように、処理回路は、ソフトウェア、ファームウェア、またはこれらの組み合わせによって、上述の各機能を実現することができる。 As described above, the processing circuit can realize the functions described above by software, firmware, or a combination thereof.
 なお、マスタ装置10のハードウェア構成について説明した、スレーブ装置20,30についても、マスタ装置10と同様のハードウェア構成によって実現可能である。 The slave devices 20 and 30 described for the hardware configuration of the master device 10 can also be realized by the same hardware configuration as that of the master device 10.
 以上説明したように、本実施の形態によれば、マスタ装置10およびスレーブ装置20,30に各装置を識別するためのCIDを設定し、マスタ装置10において被制御機器を制御するための制御部と接続するフレーム処理部、およびスレーブ装置20,30において被制御機器と接続するフレーム処理部にサブCIDを設定し、マスタ装置10およびスレーブ装置20,30が、2つの識別子であるCIDおよびサブCIDを含む安全データを生成して、各装置間で通信を行うこととした。これにより、制御システム1は、スレーブ装置が複数の被制御機器と接続しつつ、マスタ装置が複数の被制御機器を制御できるため、スレーブ装置の増加を抑えつつ制御対象の被制御機器を増やすことができる。また、制御システム1は、マスタ装置10とスレーブ装置20,30との間で、複数の被制御機器についての安全通信を同時に行うことができる。 As described above, according to the present embodiment, the control unit for setting the CID for identifying each device in the master device 10 and the slave devices 20 and 30 and controlling the controlled device in the master device 10. Sub-CIDs are set in the frame processing unit connected to the control unit and the frame processing unit connected to the controlled device in the slave devices 20 and 30, and the master device 10 and the slave devices 20 and 30 have two identifiers, CID and sub-CID. It is decided to generate safety data including and communicate between each device. As a result, the control system 1 can increase the number of controlled devices while controlling an increase in the number of slave devices because the master device can control the plurality of controlled devices while the slave device is connected to the plurality of controlled devices. Can do. In addition, the control system 1 can simultaneously perform safety communication for a plurality of controlled devices between the master device 10 and the slave devices 20 and 30.
 すなわち、従来技術では、装置を識別するための識別子としてCIDしか無かった為、CIDの数を増やしたとしてもマスタ装置とスレーブ装置との間で1つの安全コネクションしか確立できなかったところ、本実施の形態では、装置を識別するCIDと、データの被制御機器への処理経路を識別するサブCIDとを用い、CIDとサブCIDの組合せに応じた安全コネンクションを確立する。これにより、制御システム1は、例えば、CIDが2つ、サブCIDが3つある場合、マスタ装置が2台、スレーブ装置が2台であっても、計6つの安全コネクションを確立することができる。よって、スレーブ装置を増すことなく、安全通信の為の安全コネクションを増やすことができる。 That is, in the prior art, since there is only a CID as an identifier for identifying a device, even if the number of CIDs is increased, only one safety connection can be established between the master device and the slave device. In this form, the CID for identifying the device and the sub CID for identifying the processing route of the data to the controlled device are used to establish a safety connection corresponding to the combination of the CID and the sub CID. Thereby, for example, when there are two CIDs and three sub CIDs, the control system 1 can establish a total of six safety connections even if there are two master devices and two slave devices. . Therefore, the number of safety connections for safety communication can be increased without increasing the number of slave devices.
 また、マスタ装置10およびスレーブ装置20,30は、安全データの送信の際、同じ装置宛の安全データを宛先の装置毎に1つのネットワークフレームにして送信する。これにより、ネットワーク40内のフレーム数の増加を抑えることができる。 Further, when transmitting the safety data, the master device 10 and the slave devices 20 and 30 transmit the safety data addressed to the same device as one network frame for each destination device. Thereby, an increase in the number of frames in the network 40 can be suppressed.
 また、マスタ装置10のネットワーク処理部17およびスレーブ装置20,30のネットワーク処理部21,31は、安全データに対してはCIDおよびサブCIDを確認するだけのため、安全データ自体には影響を与えないでネットワーク40へ送信することができる。 Further, since the network processing unit 17 of the master device 10 and the network processing units 21 and 31 of the slave devices 20 and 30 only confirm the CID and the sub-CID for the safety data, the safety data itself is affected. Without being transmitted to the network 40.
 なお、本実施の形態において、マスタ装置10のフレーム処理部14~16は3つ、スレーブ装置20のフレーム処理部22、23は2つ、スレーブ装置30のフレーム処理部32~33は3つ設けられているが、この個数に限られないは言うまでもない。また、マスタ装置10のフレーム処理部14~16、スレーブ装置20のフレーム処理部22、23、スレーブ装置30のフレーム処理部32~33は、便宜的に複数記載しているが、データの処理経路が複数あればよく、フレーム処理部は1つであっても良い。 In the present embodiment, three frame processing units 14 to 16 of the master device 10 are provided, two frame processing units 22 and 23 of the slave device 20 are provided, and three frame processing units 32 to 33 of the slave device 30 are provided. Needless to say, it is not limited to this number. Also, a plurality of frame processing units 14 to 16 of the master device 10, frame processing units 22 and 23 of the slave device 20, and a plurality of frame processing units 32 to 33 of the slave device 30 are described for convenience. There may be a plurality of frames, and the number of frame processing units may be one.
 また、本実施の形態において、データの処理経路をサブCIDに利用しているが、要は、第1の識別子であるCIDと異なる識別子を設けるようにすれば良く、サブCIDとして、例えば、被制御機器が有するユニークな識別番号を利用するようにしても良い。 In the present embodiment, the data processing path is used for the sub-CID. In short, an identifier different from the CID that is the first identifier may be provided. You may make it utilize the unique identification number which a control apparatus has.
 また、本実施の形態において、第1の識別子であるCIDと、第2の識別子であるサブCIDの2種類の識別子を用いているが、第2の識別子に続く更なる識別子も用いるようにしても良い。 In the present embodiment, two types of identifiers are used: a CID that is a first identifier and a sub-CID that is a second identifier. However, a further identifier following the second identifier is also used. Also good.
実施の形態2.
 実施の形態2では、制御システムにおいてマスタ装置が冗長構成になっており、制御システムが制御系のマスタ装置および待機系のマスタ装置を備える場合について説明する。
Embodiment 2. FIG.
In the second embodiment, a case will be described in which a master device has a redundant configuration in a control system, and the control system includes a control master device and a standby master device.
 図10は、実施の形態2にかかる制御システム1aの構成例を示す図である。制御システム1aは、制御系のマスタ装置であるマスタ装置50と、待機系のマスタ装置であるマスタ装置60と、スレーブ装置70と、を備える。制御システム1aは、複数のマスタ装置を備える。制御システム1aにおいて、複数のマスタ装置のうち、1つのマスタ装置が制御系のマスタ装置であるマスタ装置50であり、他のマスタ装置が待機系のマスタ装置であるマスタ装置60である。制御システム1aにおいて、マスタ装置50およびスレーブ装置70は、ネットワーク41を介して接続されている。マスタ装置60およびスレーブ装置70は、ネットワーク42を介して接続されている。マスタ装置50,60は、トラッキング線43によって接続されている。スレーブ装置70には、I/O機器86、ロボット87、およびセンサ88が接続されている。制御システム1aは、マスタ装置50およびマスタ装置60が、ネットワーク41,42およびスレーブ装置70を介して、被制御機器であるI/O機器86、ロボット87、およびセンサ88を制御するシステムである。なお、制御系のマスタ装置であるマスタ装置50を第1のマスタ装置とし、待機系のマスタ装置であるマスタ装置60を第2のマスタ装置とする。 FIG. 10 is a diagram of a configuration example of the control system 1a according to the second embodiment. The control system 1 a includes a master device 50 that is a master device of a control system, a master device 60 that is a standby master device, and a slave device 70. The control system 1a includes a plurality of master devices. In the control system 1a, of the plurality of master devices, one master device is a master device 50 that is a control-system master device, and the other master device is a master device 60 that is a standby-system master device. In the control system 1a, the master device 50 and the slave device 70 are connected via a network 41. The master device 60 and the slave device 70 are connected via the network 42. Master devices 50 and 60 are connected by a tracking line 43. An I / O device 86, a robot 87, and a sensor 88 are connected to the slave device 70. The control system 1a is a system in which the master device 50 and the master device 60 control the I / O device 86, the robot 87, and the sensor 88, which are controlled devices, via the networks 41 and 42 and the slave device 70. The master device 50, which is a control master device, is referred to as a first master device, and the master device 60, which is a standby master device, is referred to as a second master device.
 制御システム1aでは、CIDによって、マスタ装置50が制御系のマスタ装置であり、マスタ装置60が待機系のマスタ装置であることを設定することができる。スレーブ装置70は、受信したネットワークフレームのイーサネットフレームヘッダの宛先、すなわち安全データのCIDを確認することによって、安全データがマスタ装置50またはマスタ装置60からのものか把握することができる。スレーブ装置70は、マスタ装置50から安全データを含むネットワークフレームを受信した場合はマスタ装置50から受信したネットワークフレームの安全データを使用し、マスタ装置50から安全データを含むネットワークフレームを受信せずマスタ装置60から安全データを含むネットワークフレームを受信した場合はマスタ装置60から受信したネットワークフレームの安全データを使用する。 In the control system 1a, it can be set by the CID that the master device 50 is a control master device and the master device 60 is a standby master device. The slave device 70 can recognize whether the safety data is from the master device 50 or the master device 60 by confirming the destination of the Ethernet frame header of the received network frame, that is, the CID of the safety data. When the slave device 70 receives the network frame including the safety data from the master device 50, the slave device 70 uses the network frame safety data received from the master device 50, and does not receive the network frame including the safety data from the master device 50. When a network frame including safety data is received from the device 60, the network frame safety data received from the master device 60 is used.
 図10において、マスタ装置50,60の構成は、実施の形態1のマスタ装置10と同様の構成である。マスタ装置50,60は、各々、独立して安全データを生成し、ネットワークフレームにしてスレーブ装置70に送信する。また、マスタ装置50,60は、各々、スレーブ装置70から安全データを含むネットワークフレームを受信する。 In FIG. 10, the configuration of the master devices 50 and 60 is the same as that of the master device 10 of the first embodiment. Each of the master devices 50 and 60 independently generates safety data and transmits it to the slave device 70 as a network frame. Master devices 50 and 60 each receive a network frame including safety data from slave device 70.
 図10において、スレーブ装置70では、フレーム処理部72~74は、被制御機器から取得したデータに、マスタ装置50のCIDおよびサブCIDを付与して安全データを生成し、ネットワーク処理部71に出力する。また、フレーム処理部72~74は、被制御機器から取得したデータに、マスタ装置60のCIDおよびサブCIDを付与して安全データを生成し、ネットワーク処理部71に出力する。このように、フレーム処理部72~74は、制御系用と待機系用に2つの安全データを生成する。なお、フレーム処理部72~74において、個々の安全データを生成する方法は、実施の形態1のフレーム処理部22,23などと同様である。また、フレーム処理部72~74において、ネットワーク処理部71から第1のフレームを取得したときの処理は、実施の形態1のフレーム処理部22,23などと同様である。 In FIG. 10, in the slave device 70, the frame processing units 72 to 74 generate safety data by adding the CID and sub CID of the master device 50 to the data acquired from the controlled device, and output it to the network processing unit 71. To do. Further, the frame processing units 72 to 74 generate safety data by adding the CID and sub-CID of the master device 60 to the data acquired from the controlled device, and output the safety data to the network processing unit 71. As described above, the frame processing units 72 to 74 generate two pieces of safety data for the control system and the standby system. Note that the method of generating individual safety data in the frame processing units 72 to 74 is the same as that of the frame processing units 22 and 23 of the first embodiment. In the frame processing units 72 to 74, the processing when the first frame is acquired from the network processing unit 71 is the same as the frame processing units 22 and 23 of the first embodiment.
 ネットワーク処理部71は、フレーム処理部72~74からマスタ装置50宛の安全データを取得すると、安全データを1つのネットワークフレームにまとめてマスタ装置50に送信する。また、ネットワーク処理部71は、フレーム処理部72~74からマスタ装置60宛の安全データを取得すると、安全データを1つのネットワークフレームにまとめてマスタ装置60に送信する。 When the network processing unit 71 acquires the safety data addressed to the master device 50 from the frame processing units 72 to 74, the network processing unit 71 collects the safety data into one network frame and transmits it to the master device 50. Further, when the network processing unit 71 acquires the safety data addressed to the master device 60 from the frame processing units 72 to 74, the network processing unit 71 collects the safety data into one network frame and transmits it to the master device 60.
 また、ネットワーク処理部71は、マスタ装置50からネットワークフレームを受信したときはマスタ装置50から受信したネットワークフレームに含まれる安全データを使用し、マスタ装置60からもネットワークフレームを受信したときはマスタ装置60から受信したネットワークフレームを廃棄する。ネットワーク処理部71は、マスタ装置50からネットワークフレームを受信せずマスタ装置60からネットワークフレームを受信したときはマスタ装置60から受信したネットワークフレームに含まれる安全データを使用する。ネットワーク処理部71は、使用することを決定したネットワークフレームから安全データを取得する。ネットワーク処理部71における、使用することを決定したネットワークフレームに対する処理は、実施の形態1のネットワーク処理部21などと同様である。 The network processing unit 71 uses the safety data included in the network frame received from the master device 50 when the network frame is received from the master device 50, and the master device when the network frame is received from the master device 60. The network frame received from 60 is discarded. When the network processing unit 71 does not receive a network frame from the master device 50 and receives a network frame from the master device 60, the network processing unit 71 uses the safety data included in the network frame received from the master device 60. The network processing unit 71 acquires safety data from the network frame that has been determined to be used. The processing for the network frame decided to be used in the network processing unit 71 is the same as the network processing unit 21 in the first embodiment.
 このように、制御システム1aでは、スレーブ装置70は、マスタ装置50およびマスタ装置60の両方と通信を行うことができる場合、2つのマスタ装置との間で安全通信を行う。これにより、スレーブ装置70は、マスタ装置50と安全通信ができなくなった場合、すぐにマスタ装置60から受信した安全データを使用して安全通信を行うことができる。 Thus, in the control system 1a, when the slave device 70 can communicate with both the master device 50 and the master device 60, the slave device 70 performs safety communication between the two master devices. Thus, when the slave device 70 becomes unable to perform safety communication with the master device 50, the slave device 70 can immediately perform safety communication using the safety data received from the master device 60.
 実際の制御システム1aの構成について説明する。図11は、実施の形態2にかかる制御システム1aの実際のシステム構成の例を示す図である。図10では制御システム1aを構成するマスタ装置50,60およびスレーブ装置70を機能ブロックで表していたが、図11では、実際に使用される機器の単位で示している。 The configuration of the actual control system 1a will be described. FIG. 11 is a diagram illustrating an example of an actual system configuration of the control system 1a according to the second embodiment. In FIG. 10, the master devices 50 and 60 and the slave device 70 constituting the control system 1a are represented by functional blocks, but in FIG. 11, they are represented in units of devices that are actually used.
 マスタ装置50は、ネットワークユニット504、およびOPUユニット501~503から構成される。ネットワークユニット504は、図10のネットワーク処理部57を実現する機器である。各OPUユニットは、図10における1組の制御部およびフレーム処理部を実現する機器である。マスタ装置60も同様の構成である。マスタ装置50,60の構成は、図4に示す実施の形態1のマスタ装置10と同様の構成である。 The master device 50 includes a network unit 504 and OPU units 501 to 503. The network unit 504 is a device that implements the network processing unit 57 of FIG. Each OPU unit is a device that realizes one set of control unit and frame processing unit in FIG. The master device 60 has the same configuration. The configuration of master devices 50 and 60 is the same as that of master device 10 of the first embodiment shown in FIG.
 スレーブ装置70は、ネットワークユニット704、およびユニット701~703から構成される。ネットワークユニット704は、図10のネットワーク処理部71を実現する機器である。各ユニットは、図10における1つのフレーム処理部を実現する機器である。スレーブ装置70の構成は、図4に示す実施の形態1のスレーブ装置20,30と同様の構成である。 The slave device 70 includes a network unit 704 and units 701 to 703. The network unit 704 is a device that implements the network processing unit 71 of FIG. Each unit is a device that realizes one frame processing unit in FIG. The configuration of slave device 70 is the same as that of slave devices 20 and 30 of the first embodiment shown in FIG.
 つづいて、制御システム1aで行われる安全通信において、マスタ装置50,60からスレーブ装置70に安全データを送信するときの各装置の処理について説明する。この場合、マスタ装置50,60は、各々が、図5および図6のフローチャートで示される実施の形態1のマスタ装置10と同様の処理を行う。また、スレーブ装置70のネットワーク処理部71は、図7のフローチャートで示される実施の形態1のスレーブ装置20のネットワーク処理部21と同様の処理を行う。 Next, processing of each device when safety data is transmitted from the master devices 50 and 60 to the slave device 70 in the safety communication performed in the control system 1a will be described. In this case, each of master devices 50 and 60 performs the same processing as master device 10 of the first embodiment shown in the flowcharts of FIGS. Further, the network processing unit 71 of the slave device 70 performs the same processing as the network processing unit 21 of the slave device 20 of the first embodiment shown in the flowchart of FIG.
 図12は、実施の形態2にかかるスレーブ装置70のフレーム処理部72~74の処理を示すフローチャートである。フレーム処理部72~74は、ネットワーク処理部71から安全データを取得すると、取得した安全データからヘッダおよびCRCを除去し、制御系のマスタ装置50または待機系のマスタ装置60の制御部で生成された安全通信用のデータを取得する(ステップS31)。フレーム処理部72~74は、どのマスタ装置から送信されたネットワークフレームのデータかを確認する。具体的に、フレーム処理部72~74は、制御系のマスタ装置50からのデータを取得した場合(ステップS41:Yes)、制御系のマスタ装置50から取得したデータを使用することを決定する(ステップS42)。フレーム処理部72~74は、待機系のマスタ装置60からもデータを取得した場合(ステップS43:Yes)、待機系のマスタ装置60から取得したデータを廃棄する(ステップS44)。フレーム処理部72~74は、待機系のマスタ装置60からもデータを取得していない場合(ステップS43:No)、ステップS44の処理を省略する。フレーム処理部72~74は、制御系のマスタ装置50からデータを取得していない場合(ステップS41:No)、待機系のマスタ装置60からデータを取得したことになり(ステップS45)、待機系のマスタ装置60から取得したデータを使用することを決定する(ステップS46)。フレーム処理部72~74は、取得したデータを、接続する被制御機器に出力する(ステップS32)。 FIG. 12 is a flowchart showing processing of the frame processing units 72 to 74 of the slave device 70 according to the second embodiment. When the frame processing units 72 to 74 acquire the safety data from the network processing unit 71, the frame processing units 72 to 74 remove the header and CRC from the acquired safety data and are generated by the control unit of the control system master device 50 or the standby system master device 60. Data for secure communication is acquired (step S31). The frame processing units 72 to 74 confirm the master frame data transmitted from which master device. Specifically, when acquiring data from the control system master device 50 (step S41: Yes), the frame processing units 72 to 74 determine to use the data acquired from the control system master device 50 (step S41: Yes). Step S42). If the frame processing units 72 to 74 also acquire data from the standby master device 60 (step S43: Yes), the frame processing units 72 to 74 discard the data acquired from the standby master device 60 (step S44). If the frame processing units 72 to 74 have not acquired data from the standby master device 60 (step S43: No), the processing of step S44 is omitted. When the frame processing units 72 to 74 have not acquired data from the control master device 50 (step S41: No), the frame processing units 72 to 74 have acquired data from the standby master device 60 (step S45). To use the data obtained from the master device 60 (step S46). The frame processing units 72 to 74 output the acquired data to the connected controlled device (step S32).
 つぎに、スレーブ装置70からマスタ装置50,60に安全データを送信する場合について説明する。図13は、実施の形態2にかかるスレーブ装置70のフレーム処理部72~74の処理を示すフローチャートである。フレーム処理部72~74は、各々が接続する被制御機器からデータを取得する(ステップS51)。フレーム処理部72~74は、取得したデータを用いて2つのマスタ装置50,60用の安全データを生成し、ネットワーク処理部71に出力する(ステップS52)。具体的に、フレーム処理部72~74は、取得したデータに、制御系のマスタ装置50のCIDおよびサブCIDを含むヘッダ、およびCRCを付与して安全データを生成し、ネットワーク処理部71に出力する。また、フレーム処理部72~74は、取得したデータに、待機系のマスタ装置60のCIDおよびサブCIDを含むヘッダ、およびCRCを付与して安全データを生成し、ネットワーク処理部17に出力する。 Next, a case where safety data is transmitted from the slave device 70 to the master devices 50 and 60 will be described. FIG. 13 is a flowchart showing processing of the frame processing units 72 to 74 of the slave device 70 according to the second embodiment. The frame processing units 72 to 74 acquire data from the controlled devices to which they are connected (step S51). The frame processing units 72 to 74 generate safety data for the two master devices 50 and 60 using the acquired data, and output them to the network processing unit 71 (step S52). Specifically, the frame processing units 72 to 74 generate safety data by adding the header including the CID and sub CID of the control system master device 50 and CRC to the acquired data, and output the safety data to the network processing unit 71 To do. In addition, the frame processing units 72 to 74 generate safety data by adding the header and CRC including the CID and sub-CID of the standby master device 60 to the acquired data, and output the safety data to the network processing unit 17.
 ネットワーク処理部71の処理については、フレーム処理部72~74から取得した制御系のマスタ装置50用の安全データ、およびフレーム処理部72~74から取得した待機系のマスタ装置60用の安全データに対して、図6に示す実施の形態1のマスタ装置10のネットワーク処理部17と同様の動作を行う。 Regarding the processing of the network processing unit 71, the safety data for the control master device 50 acquired from the frame processing units 72 to 74 and the safety data for the standby master device 60 acquired from the frame processing units 72 to 74 are used. On the other hand, the same operation as the network processing unit 17 of the master device 10 of the first embodiment shown in FIG. 6 is performed.
 制御系のマスタ装置50および待機系のマスタ装置60では、各々が、図7および図8のフローチャートに示す実施の形態1のスレーブ装置20と同様の処理を行う。 Each of the control master device 50 and the standby master device 60 performs the same processing as that of the slave device 20 of the first embodiment shown in the flowcharts of FIGS.
 マスタ装置50,60およびスレーブ装置70のハードウェア構成については、図9に示す実施の形態1と同様の構成により実現される。 The hardware configurations of the master devices 50 and 60 and the slave device 70 are realized by the same configuration as that of the first embodiment shown in FIG.
 以上説明したように、本実施の形態によれば、制御システム1aが制御系のマスタ装置50および待機系のマスタ装置60を備える場合、マスタ装置50,60の各々が、実施の形態1のマスタ装置10と同様の処理を行う。また、スレーブ装置70は、マスタ装置50から安全データを受信した場合、マスタ装置50から受信した安全データを使用し、一方、マスタ装置50から安全データを受信せずマスタ装置60から安全データを受信した場合、待機系のマスタ装置60から受信した安全データを使用する。これにより、制御システム1aでは、スレーブ装置70がマスタ装置50と安全通信ができなくなった場合、すぐにマスタ装置60から受信した安全データを使用して安全通信を行うことができる。 As described above, according to the present embodiment, when the control system 1a includes the control master device 50 and the standby master device 60, each of the master devices 50 and 60 is the master of the first embodiment. Processing similar to that of the apparatus 10 is performed. When the slave device 70 receives safety data from the master device 50, the slave device 70 uses the safety data received from the master device 50, while receiving safety data from the master device 60 without receiving safety data from the master device 50. In this case, the safety data received from the standby master device 60 is used. Thereby, in the control system 1a, when the slave device 70 becomes unable to perform safety communication with the master device 50, safety communication can be performed immediately using the safety data received from the master device 60.
 以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。 The configuration described in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and can be combined with other configurations without departing from the gist of the present invention. It is also possible to omit or change the part.
 1,1a 制御システム、10,50,60 マスタ装置、11~13,51~53,61~63 制御部、14~16,22,23,32~34,54~56,64~66,72~74 フレーム処理部、17,21,31,57,67,71 ネットワーク処理部、20,30,70 スレーブ装置、40,41,42 ネットワーク、43 トラッキング線、81,83,86 I/O機器、82,84,87 ロボット、85,88 センサ、101~103,501~503,601~603 OPUユニット、104,203,304,504,604,704 ネットワークユニット、201,202,301~303,701~703 ユニット。 1, 1a control system 10, 50, 60 master device, 11-13, 51-53, 61-63 control unit, 14-16, 22, 23, 32-34, 54-56, 64-66, 72- 74, frame processing unit, 17, 21, 31, 57, 67, 71 network processing unit, 20, 30, 70 slave device, 40, 41, 42 network, 43 tracking line, 81, 83, 86 I / O device, 82 , 84, 87 Robot, 85, 88 Sensor, 101-103, 501-503, 601-603 OPU unit, 104, 203, 304, 504, 604, 704 Network unit, 201, 202, 301-303, 701-703 unit.

Claims (10)

  1.  被制御機器を制御するデータである第1のデータに、第1の識別子および第2の識別子を付与して第1のフレームを生成し、スレーブ装置に送信するマスタ装置と、
     前記第1の識別子に基づいて自装置宛の第1のフレームを受信し、前記第2の識別子に基づいて前記第1のフレームに含まれる前記第1のデータを、対応する前記被制御機器に出力するスレーブ装置と、
     を備えることを特徴とする制御システム。
    A master device that generates a first frame by giving a first identifier and a second identifier to first data that is data for controlling a controlled device, and transmits the first frame to a slave device;
    Based on the first identifier, the first frame addressed to the device is received, and based on the second identifier, the first data included in the first frame is transmitted to the corresponding controlled device. A slave device to output,
    A control system comprising:
  2.  前記マスタ装置は、前記第1の識別子に基づいて、宛先が同じスレーブ装置毎に複数の第1のフレームを1つのフレームにして送信する、
     ことを特徴とする請求項1に記載の制御システム。
    The master device transmits a plurality of first frames as one frame for each slave device having the same destination based on the first identifier.
    The control system according to claim 1.
  3.  前記マスタ装置を複数備え、1つのマスタ装置が制御系のマスタ装置である第1のマスタ装置、他のマスタ装置が待機系のマスタ装置である第2のマスタ装置の場合、
     前記第1のマスタ装置および前記第2のマスタ装置は、各々が前記第1のフレームを生成して前記スレーブ装置に送信し、
     前記スレーブ装置は、前記第1のマスタ装置から第1のフレームを受信した場合、前記第1のマスタ装置から受信した第1のフレームに含まれる第1のデータを前記被制御機器に出力し、前記第1のマスタ装置から第1のフレームを受信せず前記第2のマスタ装置から第1のフレームを受信した場合、前記第2のマスタ装置から受信した第1のフレームに含まれる第1のデータを前記被制御機器に出力する、
     ことを特徴とする請求項1または2に記載の制御システム。
    In the case of a second master device comprising a plurality of the master devices, one master device being a control master device, and the other master device being a standby master device,
    Each of the first master device and the second master device generates the first frame and transmits it to the slave device,
    When the slave device receives the first frame from the first master device, the slave device outputs the first data included in the first frame received from the first master device to the controlled device, When the first frame is received from the second master device without receiving the first frame from the first master device, the first frame included in the first frame received from the second master device Outputting data to the controlled device;
    The control system according to claim 1 or 2, wherein
  4.  前記スレーブ装置は、前記被制御機器から取得したデータである第2のデータに前記第1の識別子および前記第2の識別子を付与し、第2のフレームを生成して前記マスタ装置に送信し、
     前記マスタ装置は、前記第1の識別子に基づいて自装置宛の第2のフレームを受信し、前記第2のフレームに含まれる前記第2のデータを取得する、
     ことを特徴とする請求項1から3のいずれか1つに記載の制御システム。
    The slave device assigns the first identifier and the second identifier to second data that is data acquired from the controlled device, generates a second frame, and transmits the second frame to the master device.
    The master device receives a second frame addressed to the device based on the first identifier, and acquires the second data included in the second frame.
    The control system according to any one of claims 1 to 3, wherein:
  5.  前記スレーブ装置は、前記第1の識別子に基づいて、宛先が同じマスタ装置毎に複数の第2のフレームを1つのフレームにして送信する、
     ことを特徴とする請求項4に記載の制御システム。
    The slave device transmits a plurality of second frames as one frame for each master device having the same destination based on the first identifier.
    The control system according to claim 4.
  6.  前記マスタ装置を複数備え、1つのマスタ装置が制御系のマスタ装置である第1のマスタ装置、他のマスタ装置が待機系のマスタ装置である第2のマスタ装置の場合、
     前記スレーブ装置は、前記第2のデータに、前記第1のマスタ装置の第1の識別子および前記第2の識別子を付与し、第2のフレームを生成して前記第1のマスタ装置に送信し、また、前記第2のデータに、前記第2のマスタ装置の第1の識別子および前記第2の識別子を付与し、第2のフレームを生成して前記第2のマスタ装置に送信し、
     前記第1のマスタ装置および前記第2のマスタ装置は、前記第1の識別子に基づいて自装置宛の第2のフレームを受信し、前記第2のフレームに含まれる前記第2のデータを取得する、
     ことを特徴とする請求項4または5に記載の制御システム。
    In the case of a second master device comprising a plurality of the master devices, one master device being a control master device, and the other master device being a standby master device,
    The slave device adds the first identifier of the first master device and the second identifier to the second data, generates a second frame, and transmits the second frame to the first master device. In addition, the first identifier of the second master device and the second identifier are given to the second data, and a second frame is generated and transmitted to the second master device.
    The first master device and the second master device receive a second frame addressed to the first device based on the first identifier, and acquire the second data included in the second frame To
    6. The control system according to claim 4 or 5, wherein:
  7.  前記第1の識別子は、個々の装置を識別するための識別子であり、
     前記第2の識別子は、各装置内において前記データの処理経路を示す識別子である、
     ことを特徴とする請求項1から6のいずれか1つに記載の制御システム。
    The first identifier is an identifier for identifying an individual device,
    The second identifier is an identifier indicating a processing path of the data in each device.
    The control system according to any one of claims 1 to 6, wherein:
  8.  スレーブ装置とともに制御システムを構成するマスタ装置であって、
     前記スレーブ装置に接続された被制御機器を制御するデータである第1のデータを生成する制御部と、
     前記第1のデータに、第1の識別子および第2の識別子を付与して第1のフレームを生成するフレーム処理部と、
     前記フレーム処理部で生成された第1のフレームを、前記第1の識別子に基づいて、前記第1の識別子で示されるスレーブ装置に送信するネットワーク処理部と、
     を備えることを特徴とするマスタ装置。
    A master device that constitutes a control system together with a slave device,
    A control unit that generates first data that is data for controlling a controlled device connected to the slave device;
    A frame processing unit for generating a first frame by giving a first identifier and a second identifier to the first data;
    A network processing unit for transmitting the first frame generated by the frame processing unit to the slave device indicated by the first identifier based on the first identifier;
    A master device comprising:
  9.  マスタ装置とともに制御システムを構成するスレーブ装置であって、
     第1の識別子および第2の識別子が付与され前記マスタ装置から送信された第1のフレームのうち、前記第1の識別子に基づいて自装置宛の第1のフレームを受信すると、前記第2の識別子に基づいて、前記第1のフレームを前記第2の識別子に対応するフレーム処理部に出力するネットワーク処理部と、
     前記第1のフレームから前記マスタ装置で生成されたデータである第1のデータを取得し、接続する被制御機器に出力する前記フレーム処理部と、
     を備えることを特徴とするスレーブ装置。
    A slave device constituting a control system together with a master device,
    When a first frame addressed to itself is received based on the first identifier among first frames transmitted from the master device to which a first identifier and a second identifier are assigned, the second frame A network processing unit for outputting the first frame to a frame processing unit corresponding to the second identifier based on an identifier;
    The frame processing unit that acquires first data that is data generated by the master device from the first frame and outputs the first data to a controlled device to be connected;
    A slave device comprising:
  10.  マスタ装置およびスレーブ装置を備えた制御システムにおける制御方法であって、
     前記マスタ装置が、被制御機器を制御するデータである第1のデータに、第1の識別子および第2の識別子を付与して第1のフレームを生成し、前記スレーブ装置に送信する第1の送信ステップと、
     前記スレーブ装置が、前記第1の識別子に基づいて自装置宛の前記第1のフレームを受信し、前記第2の識別子に基づいて前記第1のフレームに含まれる前記第1のデータを対応する前記被制御機器に出力する第1の受信ステップと、
     を含むことを特徴とする制御方法。
    A control method in a control system including a master device and a slave device,
    The master device generates a first frame by adding a first identifier and a second identifier to first data that is data for controlling a controlled device, and transmits the first frame to the slave device. Sending step;
    The slave device receives the first frame addressed to itself based on the first identifier, and corresponds the first data included in the first frame based on the second identifier. A first receiving step of outputting to the controlled device;
    The control method characterized by including.
PCT/JP2017/007825 2017-02-28 2017-02-28 Control system, master apparatus, slave apparatus and control method WO2018158829A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2017/007825 WO2018158829A1 (en) 2017-02-28 2017-02-28 Control system, master apparatus, slave apparatus and control method
JP2018505052A JPWO2018158829A1 (en) 2017-02-28 2017-02-28 Control system, master device, slave device, and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/007825 WO2018158829A1 (en) 2017-02-28 2017-02-28 Control system, master apparatus, slave apparatus and control method

Publications (1)

Publication Number Publication Date
WO2018158829A1 true WO2018158829A1 (en) 2018-09-07

Family

ID=63370432

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/007825 WO2018158829A1 (en) 2017-02-28 2017-02-28 Control system, master apparatus, slave apparatus and control method

Country Status (2)

Country Link
JP (1) JPWO2018158829A1 (en)
WO (1) WO2018158829A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020123945A (en) * 2019-01-30 2020-08-13 富士電機株式会社 Terminal device, communication system, and communication method of terminal device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016174718A1 (en) * 2015-04-27 2016-11-03 三菱電機株式会社 Communication device, receiving device, address duplication determination method and address duplication determination program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09331284A (en) * 1996-06-12 1997-12-22 Toyo Commun Equip Co Ltd Radio relay system
JP3791290B2 (en) * 2000-02-29 2006-06-28 富士ゼロックス株式会社 Communication apparatus and communication method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016174718A1 (en) * 2015-04-27 2016-11-03 三菱電機株式会社 Communication device, receiving device, address duplication determination method and address duplication determination program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020123945A (en) * 2019-01-30 2020-08-13 富士電機株式会社 Terminal device, communication system, and communication method of terminal device
JP7443678B2 (en) 2019-01-30 2024-03-06 富士電機株式会社 Terminal device, communication system, and communication method of terminal device

Also Published As

Publication number Publication date
JPWO2018158829A1 (en) 2019-03-07

Similar Documents

Publication Publication Date Title
EP3619896B1 (en) Mechanism and apparatus for path protection when using compressed segment routing label stacks
JP6053003B2 (en) Transmission system, transmission apparatus, and transmission method
US10218600B2 (en) Path computation element hierarchical software defined network control
US8971342B2 (en) Switch and flow table controlling method
US10728142B2 (en) Network services across non-contiguous subnets of a label switched network separated by a non-label switched network
US10624089B2 (en) Network system and communication method
WO2012111222A1 (en) Network system and network flow tracking method
US9654394B2 (en) Multi-tenant system, switch, controller and packet transferring method
TW201421232A (en) Method, apparatus and computer program product for performing failover in a redundancy group
CN107078924A (en) The method, apparatus and system of two-way converting detection are carried out to aggregated links
US10326681B2 (en) System and method to analyze route information in a network
US20170054680A1 (en) Control method, information processing apparatus, and storage medium
US10355976B2 (en) Methods, nodes and system for establishing independent network paths
JP4172490B2 (en) Programmable controller
US9344399B2 (en) Relay server and relay communication system
WO2018158829A1 (en) Control system, master apparatus, slave apparatus and control method
US9948598B2 (en) Delivery control device, data delivery system, delivery control method, and non-transitory computer readable medium storing delivery control program
JP5814849B2 (en) Open flow network system and data communication method
WO2019065353A1 (en) Control device, communication system, communication method
JP5882694B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
US10021014B2 (en) Avoiding routing interruption during transition to a virtual entity
JP2018148337A (en) Communication system
JP4191099B2 (en) SIP signal conversion method, SIP-ALG device, SIP signal conversion program, and recording medium
JP6631065B2 (en) Communication path switching apparatus, control method of communication path switching apparatus, and program
JP6728981B2 (en) Node device and communication system

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018505052

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 17898785

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: 17898785

Country of ref document: EP

Kind code of ref document: A1