[go: up one dir, main page]

WO2012124159A1 - ネットワークシステムにおけるアドレス設定方法 - Google Patents

ネットワークシステムにおけるアドレス設定方法 Download PDF

Info

Publication number
WO2012124159A1
WO2012124159A1 PCT/JP2011/056968 JP2011056968W WO2012124159A1 WO 2012124159 A1 WO2012124159 A1 WO 2012124159A1 JP 2011056968 W JP2011056968 W JP 2011056968W WO 2012124159 A1 WO2012124159 A1 WO 2012124159A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
slave device
slave
assigned
abnormal
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2011/056968
Other languages
English (en)
French (fr)
Inventor
豊 田原
寛仁 水本
成憲 澤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Publication of WO2012124159A1 publication Critical patent/WO2012124159A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5038Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • the present invention relates to an address setting method in a network system having a master device and a slave device.
  • FA Vector's Automation
  • slave devices that collect and control data of production facilities installed in the factory, and a master device (PLC: Programmable Logic Controller) that centrally manages a plurality of slave devices.
  • PLC Programmable Logic Controller
  • the production system is controlled by the network system.
  • Ethernet As an example of an industrial network system for the FA field, development of a technology called industrial Ethernet applying Ethernet (registered trademark) technology is progressing.
  • Industrial Ethernet is also called industrial Ethernet or real-time Ethernet, and is a network in which Ethernet technology and equipment are introduced into the FA field at various layers.
  • EtherCAT Ethernet for Control Automation
  • ETG EtherCAT Technology
  • the address assigned to each slave device is determined centrally at the stage of designing the network configuration, and the address value is assigned to the slave device itself.
  • a design method of setting is adopted. In such a configuration, for example, “address unknown” in which no address value is set in the slave device, or “address unknown” in which there is a slave device in which an address value different from the address determined in the design stage exists Such an address abnormality may also occur.
  • Patent Document 1 proposes a method for supporting address setting of a printer connected to a PC network.
  • Patent Document 2 discloses a method for detecting the presence of a terminal to which an unauthorized IP address is set.
  • Japanese Patent Publication Japanese Patent Laid-Open No. 11-282644 (published Oct. 15, 1999)”
  • Japanese Patent Publication Japanese Patent Laid-Open No. 2008-252924 (Released on October 16, 2008)”
  • the present invention has been made in view of the above circumstances, and an object of the present invention is to easily and online when an address abnormality occurs in a network system composed of a master device and a plurality of slave devices. It is to provide a technique for recovering an address error.
  • a first aspect of the present invention is an address setting method in a network system composed of a master device and a plurality of slave devices, wherein the network system uses a node address uniquely assigned to each slave device.
  • the node address is set in advance in each slave device itself by a processing device built in the master device or connected to the master device.
  • Automatically assigning according to an address value, and the address setting method includes: an acquisition step in which the processing device acquires an address value set in each slave device from all slave devices on the network; The processing device overlaps with the address value set for other slave devices.
  • An abnormal extraction step for extracting a slave device having an address value to be set as an abnormal slave device, and for the slave device that is not an abnormal slave device, the processing device uses the address value set for each slave device as it is.
  • This network system is based on “static address assignment” in which node addresses are automatically assigned according to address values set in advance in the slave device itself.
  • static address assignment for example, when a slave device having an address value overlapping with another slave device is joined to the network, an address is assigned to assign the same node address to a plurality of slave devices. A system error occurs due to duplication.
  • the address values of all slave devices are collected to check whether there is any duplication. If duplication is detected, the address value is not assigned as a node address as it is, but a temporary node address is assigned so that duplication with other address values does not occur. Thereby, address duplication (node address collision) is automatically avoided, and communication using the node address (communication specifying the communication destination node) can be performed.
  • the second aspect of the present invention is a network system composed of a master device and a plurality of slave devices, and obtains an address value preset for each slave device from all slave devices on the network.
  • Acquisition means for extracting the slave device having an address value that overlaps with an address value set for another slave device as an abnormal slave device, and a slave device that is not an abnormal slave device Assigns the address value set for each slave device as it is as a node address, and assigns an address value that is not assigned to another slave device to the abnormal slave device as a temporary node address, and the address Node address assigned by setting means or temporary With over de address
  • a network system characterized in that it comprises communication means for performing communication identifying the communication destination node, the.
  • the third aspect of the present invention is a master device used in a network system composed of a master device and a plurality of slave devices, and is preset in each slave device from all slave devices on the network.
  • Address setting that assigns the address value set for each slave device as it is to the slave device as a node address for slave devices, and assigns the address value that is not assigned to other slave devices as a temporary node address for abnormal slave devices
  • Using the node address of the over-de address or temporary is a master apparatus, characterized in that it comprises communication means for performing communication to identify the destination node, the.
  • the address abnormality when an address abnormality occurs in a network system composed of a master device and a plurality of slave devices, the address abnormality can be recovered easily and online.
  • FIG. 1 It is a figure which shows an example of an address setting process. It is a block diagram explaining the structural example of an industrial network system. It is a figure explaining the communication system of position address mode. It is a flowchart which shows the flow of the slave information collection process performed by the master apparatus.
  • (A) is a diagram showing an example of an address management table
  • (B) is a diagram showing an example of actual configuration information
  • (C) is a diagram showing an example of network configuration information.
  • inspection / allocation process It is a flowchart which shows the flow of an alias change process. It is a figure which shows the modification of an address setting process.
  • an address setting method in a network system conforming to the EtherCAT standard is taken up, but the subject of the present invention is not limited to this. It is composed of a master device and a plurality of slave devices, and has a mode for performing communication specifying a communication destination node using a node address uniquely assigned to each slave device, and the node address is a slave device. Any network system that is automatically (statically) assigned according to the set value can be a target to which the present invention is applied.
  • an industrial network system 100 includes a master device 200 (PLC: Programmable Logic Controller) and a plurality of slave devices 300 directly via a cable 400, an I / O unit 500 provided in the device, and a hub device 700. Alternatively, it is formed by being indirectly connected.
  • the slave device 300 includes a power supply unit, a motor unit, a counter unit, an image unit, a communication unit, an I / O unit, and the like.
  • the master device 200 may be connected to a management device 600 for the user to perform operation settings of the master device 200, display of the operation status of the industrial network system 100, network design, and the like.
  • the management device 600 includes a personal computer installed with a design support tool and a management tool.
  • the address setting process described later is executed by the master device 200 or the management device 600 or by the cooperation of the master device 200 and the management device 600. That is, in the present embodiment, the master device 200 and / or the management device 600 corresponds to a processing device that is an execution subject of the address setting method of the present invention.
  • the hub device 700 has one port (IN port) 701 connected to the upstream side when the master device side is upstream, and a plurality of ports (OUT ports) 702a to 702c connected to the downstream side. .
  • a user can create a desired topology by connecting each device using a cable or a hub device while setting the order or branching.
  • the branch structure can be created not only by the hub device but also by connecting a plurality of slave devices downstream from the slave device.
  • EtherCAT it is possible to divert the cable 400 that is used in a general Ethernet standard, or to manufacture it in an Ethernet equipment manufacturing facility. This realizes cost reduction.
  • Such an industrial network system 100 is installed in, for example, a factory and used as an FA system.
  • the master device 200 transmits an information signal including control data through a network according to programs and operations.
  • the slave device 300 performs device operation based on the received information signal, and rewrite and return processing of the received information signal.
  • Production in a factory including the industrial network system 100 is achieved by the master device controlling the contents and timing of the operation so that the slave device as a whole works together to share the work.
  • the design support tool is provided as a function of the management apparatus 600.
  • the design support tool using the GUI displayed on the display of the management device 600, it is easy to select the slave device model, select the connection order and connection port (topology design), specify the node address assigned to each slave device, etc. Provide users with a design environment that can be done quickly.
  • Position address mode In this mode, the master-slave communication is performed using the position address.
  • the position address is a network address that is addressed in the order of connection when viewed from the master device.
  • FIG. 3 is a diagram for explaining a communication method in the position address mode.
  • a simple topology in which four slave devices 300a to 300d are connected in series to the master device 200 is shown.
  • position addresses of 0x0000, 0xFFFF, 0xFFFE, and 0xFFFD are assigned in the order closer to the master device 200.
  • the master device 200 adds the position address of the destination slave device to the message and transmits the message.
  • each slave device receives the message, it confirms the added address, and if it is “0x0000”, it determines that the message is addressed to itself. On the other hand, if the message is not addressed to itself, the slave device increments the address added to the message (adds 1).
  • the slave device 300c receives the message as addressed to itself.
  • the position address is determined by the physical connection order of the slave devices, there is an advantage that no address abnormality such as address duplication occurs.
  • the position address fluctuates depending on the network state (connection order and number of slave devices, topology, etc.), and is not suitable for performing critical communication. Therefore, communication by position address is used only for low-level communication processing such as collecting slave information at the time of network startup, for example, communication processing related to monitoring and management of slave devices and communication processing related to task execution, etc. Communication using node addresses and logical addresses described below is used.
  • Node Address Mode master-slave communication is performed using a node address that the master device 200 assigns to each slave device 300.
  • Each slave device 300 has an address value set in advance by the user, and this address value is held in a nonvolatile memory in the slave device.
  • the master device 200 reads an address value from each slave device 300 when the network is activated, and in principle assigns a node address having the same value as the address value to each slave device 300.
  • the address value as the setting value is hereinafter referred to as “alias”. Called.
  • this mode is used when event-type message communication specifying the slave device (node) of the communication partner is required, such as communication processing related to monitoring and management of the slave device.
  • the above-mentioned address abnormality may occur.
  • the address duplication node A system error occurs due to an address conflict.
  • an alias is not set for the slave device (address is undecided)
  • an error that a node address cannot be assigned to the slave device occurs.
  • Logical address mode This mode is used for cyclic communication using data called a frame.
  • a frame consists of data of a predetermined length, and a data area assigned to each slave device 300 is provided in the frame.
  • the logical address in this mode corresponds to an address indicating its own data area in the frame.
  • Frames periodically transmitted from the master device 200 pass through all the slave devices 300 in order, and then are returned by the slave device at the rear end (the most downstream side) and returned to the master device 200.
  • Each slave device 300 reads and writes data to and from its own data area when the frame passes through the device. As a result, high-speed data transmission and real-time performance are realized. Communication processing related to task execution is performed exclusively in the logical address mode.
  • FIG. 4 is a flowchart showing a flow of slave information collection processing (network scan processing) executed by the master device 200.
  • FIGS. 1A to 1D are diagrams illustrating an example of address setting processing.
  • the master device 200 executes the processing shown in FIG. 4 when the network is started or when the network configuration is changed (slave device joining or leaving).
  • the master device 200 confirms the number of slave devices present on the network (step S100).
  • This process is executed in the position address mode.
  • the number of slaves is “3”.
  • the master device 200 reads profile information and slave connection information from each of the slave devices 300a to 300c (step S101).
  • the profile information is information for identifying the slave device, and includes, for example, a product code, a vendor ID, a revision number, and the like of the slave device.
  • the slave connection information is information for understanding the connection configuration (topology) of the slave device, and includes, for example, information for specifying the connection destination device and port of the slave device. Based on this information, it is possible to grasp the components of the entire network and their topology.
  • the master device 200 reads the alias set in the slave device from each of the slave devices 300a to 300c, and updates the address management table (step S102).
  • the address management table is information in which aliases of all slave devices 300a to 300c are listed, and is used for address abnormality determination and node address assignment to be described later.
  • FIG. 5A is an example of an address management table obtained from the network of FIG. 1A, and aliases are described as “0x1, 0x2, 0x1” in the order of position addresses.
  • the address management table includes information on the value of the node address assigned to the slave device in addition to the information on the alias of the slave device (however, since the node address assignment is performed in the subsequent processing, the step (At the time of S102, the value of the node address is blank). The processing of steps S101 and S102 is also executed in the position address mode.
  • the master device 200 After executing the processing of steps S101 and S102 for all the slave devices 300a to 300c, the master device 200, based on the profile information, slave connection information, and address management table, actual configuration information representing the configuration of the network. Is created (step S103).
  • FIG. 5B is an example of actual configuration information obtained from the network of FIG.
  • the first slave device 300a is a device identified by “product code: a1, vendor ID: A, revision number: 002 (a1-A-002)”, and device “MASTER” (master device) ) And the alias setting is “0x1”.
  • the second slave device 300b is identified by “a3-A-000” and is connected to the “Out1” port of the device “a1-A-002” (slave device 300a), and the alias setting is “0x2”. It is.
  • the third slave device 300c is identified by “b0-B-005” and connected to the “Out2” port of the device “a3-A-000” (slave device 300b), and the alias setting is “0x1”. It is.
  • FIG. 6 is a flowchart showing the flow of address inspection / assignment processing. This process is executed by the master device 200 following the slave information collection process of FIG.
  • the master device 200 refers to the address management table for the first slave device 300a, thereby confirming whether the alias of the slave device 300a overlaps with the aliases of the other slave devices 300b and 300c (step). S200). If there is no duplication, the process proceeds to step S201. If duplication is detected, the process proceeds to step S204.
  • the master device 200 refers to the address management table, selects an address value that is not assigned to another slave device, and sets the address value as the “temporary node address” in the slave device 300a. .
  • the temporary value is assigned to the temporary node. Select as address. Therefore, the temporary node address “0x3” is assigned to the slave device 300a. This node address assignment is also executed in the position address mode. The value of the assigned node address is written in the address management table as shown on the right side of FIG.
  • the method of selecting a temporary node address is not limited to the above algorithm, and any algorithm may be used as long as address duplication with other slave devices can be avoided.
  • the largest value among the available addresses may be selected, or a certain number of address values may be reserved for the temporary node address in advance and selected from them.
  • the master device 200 confirms whether there is an alias overlap for the second slave device 300b as well (step S200). As shown in FIG. 5A, the alias of the slave device 300b is “0x2”, and there is no address duplication. Therefore, the master device 200 proceeds to step S201, and confirms whether or not the node address described in the network configuration information (setting information) includes one that matches the alias of the slave device 300b.
  • the network configuration information is data acquired from the design support tool or management tool of the management apparatus 600, and is data in which profile information, slave connection information, address information, etc. of each slave apparatus constituting the network system are described. It is.
  • the type of information included in the network configuration information is substantially the same as that included in the actual configuration information shown in FIG. 5B, but the actual configuration information is information collected from the actual network system.
  • the network configuration information is different in that it is design information (information indicating the network configuration intended by the user). If the network system is assembled as designed, the contents of both will be the same, but if the slave device model or connection destination is incorrect or the alias setting is incorrect, the network configuration information and the actual configuration information will not match. Become.
  • step S201 if the network configuration information does not match the slave device alias (address unknown), the process proceeds to step S204, and a temporary node address is assigned. If no alias is set for the slave device (address is undecided), the same network configuration information does not exist, so the process proceeds to step S204 and a temporary node address is assigned.
  • the master device 200 checks the profile information and the slave connection information (step S202). Although not shown, if the profile information and slave connection information do not match, an error message indicating that confirmation is required may be output to the display of the management apparatus 600 or the address setting process may be interrupted. Good.
  • the master device 200 assigns the same value “0x2” as the alias set in the slave device 300b to the slave device 300b as a node address (step S203).
  • the assigned node address value is written in the address management table.
  • the master device 200 confirms whether there is an alias overlap for the third slave device 300c as well (step S200). As shown in FIG. 5A, the alias of the slave device 300c is “0x1”, and there is an address overlap. Therefore, in step S204, the temporary node address “0x4” is assigned to the slave device 300c.
  • FIG. 1B shows a state in which node addresses have been set for all slave devices 300a to 300c. As described above, it is understood that temporary node addresses different from aliases are set in the first and third slave devices 300a and 300c that have caused address duplication.
  • FIG. 7 is a flowchart showing the flow of alias change processing. This process is a process applied to each abnormal slave device when there is a slave device (referred to as an abnormal slave device) to which a temporary node address is assigned in the address check / assignment process of FIG. . In the present embodiment, it is assumed that the following processing is executed by the management device 600 connected to the master device 200.
  • the management device 600 rewrites the alias setting of the abnormal slave device with a new address value (step S300).
  • a new address value is designated by the user who operates the management apparatus 600. Any new address value may be selected as long as it does not overlap with another slave device alias.
  • the management apparatus 600 can automatically determine instead of designating the user (for example, the temporary node address selected in step S204 in FIG. 6 may be selected as a new address value as it is).
  • the process of rewriting the alias setting is performed by node address mode communication using a temporary node address.
  • the management device 600 performs mailbox communication setting for the abnormal slave device to enter the mailbox communication state (step S301). Then, the management device 600 transmits a slave restart request to the abnormal slave device by mailbox communication, and restarts the abnormal slave device (step S302). Thereby, the alias rewritten in step S300 is validated in the slave device. Note that the processing in steps S302 and S303 is also performed by node address mode communication using a temporary node address.
  • the alias setting of the abnormal slave device can be changed to a value that does not overlap with the alias of the other slave device by online work from the management device 600.
  • FIG. 1C shows the alias setting of each slave device after the alias change process. It can be seen that the aliases of the slave devices 300a and 300c that have caused address duplication have been changed to different values.
  • the address information of the network configuration information stored in the management device 600 is updated automatically or by a user operation accordingly.
  • an alias is not assigned as a node address as it is, but another address value is assigned as a temporary node address. Thereby, address duplication (node address collision) is automatically avoided, and communication in the node address mode can be performed. Then, by rewriting the alias setting of the slave device and restarting the slave device using communication in the node address mode, it is possible to change the alias (eliminate the cause of the address abnormality) online. Therefore, offline work such as network system stop and slave device disconnection / setting change can be eliminated, so that the recovery work of address abnormality is much more efficient than before.
  • step S200 in FIG. 6 may be skipped, and the address duplication determination in step S200 may be performed only for a newly joined slave device.
  • the node addresses as aliases are assigned to the slave devices 300a and 300b, and the temporary node address “0x3” is assigned only to the slave device 300c. .
  • a first aspect of the present invention is an address setting method in a network system composed of a master device and a plurality of slave devices, wherein the network system uses a node address uniquely assigned to each slave device.
  • the node address is set in advance in each slave device itself by a processing device built in the master device or connected to the master device.
  • Automatically assigning according to an address value, and the address setting method includes: an acquisition step in which the processing device acquires an address value set in each slave device from all slave devices on the network; The processing device overlaps with the address value set for other slave devices.
  • An abnormal extraction step for extracting a slave device having an address value to be set as an abnormal slave device, and for the slave device that is not an abnormal slave device, the processing device uses the address value set for each slave device as it is.
  • This network system is based on “static address assignment” in which node addresses are automatically assigned according to address values set in advance in the slave device itself.
  • static address assignment for example, when a slave device having an address value overlapping with another slave device is joined to the network, an address is assigned to assign the same node address to a plurality of slave devices. A system error occurs due to duplication.
  • the address values of all slave devices are collected to check whether there is any duplication. If duplication is detected, the address value is not assigned as a node address as it is, but a temporary node address is assigned so that duplication with other address values does not occur. Thereby, address duplication (node address collision) is automatically avoided, and communication using the node address (communication specifying the communication destination node) can be performed.
  • the processing device further includes a changing step of changing an address value set in the abnormal slave device to an address value that does not overlap with an address value set in another slave device. It is preferable. Thereby, an appropriate address value that does not overlap with other slave devices is set for the slave device in which the address abnormality has occurred. Therefore, at least at the next network activation, the appropriate address value after the change is reflected, and a formal node address (not “temporary”) is assigned to the slave device.
  • the processing device may execute the obtaining step, the abnormal extracting step, and the address setting step again.
  • a formal node address according to the changed address value is automatically and promptly assigned to each slave device.
  • the address value set in the abnormal slave device can be automatically determined by the processing device, or can be selected (input) by the user operating the processing device. Further, the re-execution of the address setting after changing the address value may be performed not by the processing apparatus automatically but by a user instruction. Of course, it is possible to reduce the labor and time required for the recovery work more automatically by automating everything, but even in the case of a user operation, according to the present invention, it is possible to give an instruction online from the processing apparatus. Off-line work such as stoppage, slave device detachment, and setting changes can be eliminated, and recovery work can be made much more efficient.
  • the process of changing the address value of the abnormal slave device is performed by communication using the temporary node address assigned to the abnormal slave device.
  • the network system has a mode for performing communication using a position address determined by the connection order when viewed from the master device, and is set to each slave device from all slave devices on the network.
  • the process of acquiring the address value is preferably performed by communication using the position address.
  • a slave device for which an address value is not set is also extracted as an abnormal slave device.
  • an abnormal slave device it is possible to recover from a so-called “address undecided” abnormality.
  • the processing device stores in advance setting information in which a node address to be assigned to each slave device on the network is stored.
  • the processing device matches the node address described in the setting information. It is preferable that a slave device having an address value for which there is nothing to be extracted is also extracted as an abnormal slave device. Thereby, it is possible to recover from the so-called “address unknown” abnormality.
  • the present invention can be specified as an address setting method including at least a part of the above processing, or can be specified as a network system or a master device including at least a part of means for realizing the above processing.
  • Each of the above processes and means can be freely combined as long as no technical contradiction occurs.
  • the second aspect of the present invention is a network system composed of a master device and a plurality of slave devices, and obtains an address value preset for each slave device from all slave devices on the network.
  • Acquisition means for extracting the slave device having an address value that overlaps with an address value set for another slave device as an abnormal slave device, and a slave device that is not an abnormal slave device Assigns the address value set for each slave device as it is as a node address, and assigns an address value that is not assigned to another slave device to the abnormal slave device as a temporary node address, and the address Node address assigned by setting means or temporary With over de address
  • a network system characterized in that it comprises communication means for performing communication identifying the communication destination node, the.
  • the third aspect of the present invention is a master device used in a network system composed of a master device and a plurality of slave devices, and is preset in each slave device from all slave devices on the network.
  • Address setting that assigns the address value set for each slave device as it is to the slave device as a node address for slave devices, and assigns the address value that is not assigned to other slave devices as a temporary node address for abnormal slave devices
  • Using the node address of the over-de address or temporary is a master apparatus, characterized in that it comprises communication means for performing communication to identify the destination node, the.

Landscapes

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

Abstract

 ネットワークシステムにおいて、アドレス異常が生じた場合に、簡単に且つオンラインでアドレス異常を復旧するための技術を提供する。マスター装置が、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に設定されているアドレス値を取得し、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する。そして、マスター装置は、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てる。

Description

ネットワークシステムにおけるアドレス設定方法
 本発明は、マスター装置とスレーブ装置を有するネットワークシステムにおけるアドレス設定方法に関する。
 FA(Factory Automation)においては、工場内に設置される生産設備のデータ収集及び制御を行う各種のスレーブ装置と、複数のスレーブ装置を集中管理するマスター装置(PLC:Programmable Logic Controller)などから構成されるネットワークシステムにより生産設備の制御が行われる。
 FAの分野を対象とした産業用ネットワークシステムの一例として、イーサネット(登録商標)の技術を適用した産業用イーサネットと呼ばれる技術の開発が進んでいる。産業用イーサネットは、工業用イーサネットまたはリアルタイムイーサネットとも呼ばれ、イーサネットの技術や機器を様々なレイヤーでFA分野に導入したネットワークである。産業用イーサネットとして様々な団体がオープンな規格を制定し公開しており、ETG(EtherCAT Technology Group)が推進するEtherCAT(Ethernet for Control Automation Technology:登録商標)もその一つである。
 この種の産業用ネットワークシステムにおいては、ネットワーク上の各スレーブ装置(ネットワークノード)に対して割り当てたネットワークアドレスを用いて、各種のメッセージ通信が行われる。ネットワークアドレスの設定の仕方には、予め設定された静的なアドレスを用いるもの、動的にアドレスを割り当てるものなど、いくつかの方法が知られているが、いずれの場合であっても、各スレーブ装置にアドレスが適切に設定されていることがネットワークシステムの正常運用の前提となる。アドレス異常で最も多いケースは、複数のスレーブ装置に同一のアドレスが割り当てられてしまう「アドレス重複」である。
 また、産業用ネットワークシステムでは、各スレーブ装置の確実な動作を保証するため、ネットワーク構成を設計する段階で各スレーブ装置に割り当てるアドレスを一元的に決定してしまい、そのアドレス値をスレーブ装置自体に設定しておく、という設計手法が採られることが多い。このような構成にあっては、例えば、スレーブ装置にアドレス値が設定されていない「アドレス未定」や、設計段階で決めたアドレスと異なるアドレス値が設定されたスレーブ装置が存在する「アドレス未知」といったアドレス異常も発生し得る。
 従来、このようなアドレス異常が発生した場合には、ネットワークシステムを停止し、異常のあるスレーブ装置を特定し、当該スレーブ装置をネットワークから物理的に離脱してアドレスの再設定を行い、ネットワークシステムを再起動する必要があり、この一連の復旧作業に要する労力及び時間が問題となっていた。特に、工場などで既に実運用されているシステムの場合には、復旧作業のために一時的に生産ラインを停めなければならず、それによる生産効率の低下は甚大である。なお、アドレス異常の問題は、EtherCATに限らず、既存の他のネットワークシステム(例えば、TCP/IP、DeviceNet、CompoNetなど)でも同様に生じ得る。
 アドレス重複の検知や事前防止に関しては、様々な手法が提案されている。例えば、特許文献1では、PCネットワークに接続されたプリンタのアドレス設定を支援するための方法が提案されている。また、特許文献2には、不正なIPアドレスが設定された端末の存在を検知するための方法が開示されている。
 しかしながら、アドレス異常が生じた場合に、作業者の手を煩わせることなく、自動でアドレス異常を復旧するような仕組みは、従来存在していなかった。
日本国公開特許公報「特開平11-282644号公報(1999年10月15日公開)」 日本国公開特許公報「特開2008-252924号公報(2008年10月16日公開)」
 本発明は上記実情に鑑みてなされたものであって、その目的とするところは、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムにおいて、アドレス異常が生じた場合に、簡単に且つオンラインでアドレス異常を復旧するための技術を提供することにある。
 本発明の第1態様は、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムにおけるアドレス設定方法であって、前記ネットワークシステムは、各スレーブ装置に一意に割り当てられるノードアドレスを用いて通信先のノードを特定した通信を行うモードを有しており、前記ノードアドレスは、前記マスター装置に内蔵され、又は、前記マスター装置に接続された処理装置によって、各スレーブ装置自身に予め設定されているアドレス値に従って自動的に割り当てられるものであり、前記アドレス設定方法は、前記処理装置が、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に設定されているアドレス値を取得する取得ステップと、前記処理装置が、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出ステップと、前記処理装置が、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定ステップと、を含むことを特徴とするアドレス設定方法である。
 このネットワークシステムにおいては、スレーブ装置自身に予め設定されているアドレス値に従ってノードアドレスが自動的に割り当てられる「静的なアドレス付与」が基本となる。このような静的なアドレス付与の場合、例えば、他のスレーブ装置と重複するアドレス値をもつスレーブ装置をネットワークに加入してしまったりすると、複数のスレーブ装置に同一のノードアドレスを割り当てようとしてアドレス重複によるシステムエラーが発生する。
 そこで本発明では、最初に、すべてのスレーブ装置のアドレス値を収集して、重複がないかを確認する。そして、重複が検出された場合は、アドレス値をそのままノードアドレスとして割り当てるのではなく、他のアドレス値と重複が生じないように、仮のノードアドレスを割り当てる。これにより、アドレス重複(ノードアドレスの衝突)が自動的に回避され、ノードアドレスを用いた通信(通信先のノードを特定した通信)を行うことが可能となる。
 例えば、本発明の第2態様は、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムであって、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に予め設定されているアドレス値を取得する取得手段と、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出手段と、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定手段と、前記アドレス設定手段で割り当てられたノードアドレス又は仮のノードアドレスを用いて、通信先のノードを特定した通信を行う通信手段と、を有することを特徴とするネットワークシステムである。
 また、本発明の第3態様は、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムで用いられるマスター装置であって、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に予め設定されているアドレス値を取得する取得手段と、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出手段と、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定手段と、前記アドレス設定手段で割り当てられたノードアドレス又は仮のノードアドレスを用いて、通信先のノードを特定した通信を行う通信手段と、を有することを特徴とするマスター装置である。
 本発明によれば、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムにおいて、アドレス異常が生じた場合に、簡単に且つオンラインでアドレス異常を復旧することができる。
アドレス設定処理の一例を示す図である。 産業用ネットワークシステムの構成例を説明するブロック図である。 ポジションアドレスモードの通信方式を説明する図である。 マスター装置により実行されるスレーブ情報収集処理の流れを示すフローチャートである。 (A)はアドレス管理テーブルの一例を示す図であり、(B)は実構成情報の一例を示す図であり、(C)はネットワーク構成情報の一例を示す図である。 アドレス検査・割当処理の流れを示すフローチャートである。 エイリアス変更処理の流れを示すフローチャートである。 アドレス設定処理の変形例を示す図である。
 以下、図面を参照しつつ、本発明の好適な実施の形態を説明する。以下の実施形態ではEtherCATの規格に即したネットワークシステムにおけるアドレス設定方法を取り上げるが、本発明の対象はこれに限られない。マスター装置と複数のスレーブ装置とから構成され、各スレーブ装置に一意に割り当てられるノードアドレスを用いて通信先のノードを特定した通信を行うモードを有しており、且つ、そのノードアドレスがスレーブ装置の設定値に従って自動的に(静的に)割り当てられる仕組みのネットワークシステムであれば、本発明を適用する対象とすることができる。
 (産業用ネットワークシステムの構成)
 まず、図2を用いて本発明が対象とする産業用ネットワークシステムの構成例を示す。本図において、産業用ネットワークシステム100は、マスター装置200(PLC:Programmable Logic Controller)と複数のスレーブ装置300とが、ケーブル400や装置に備わるI/Oユニット500、ハブ装置700を介して直接的又は間接的に接続されることにより形成される。スレーブ装置300には、電源ユニット,モータユニット,カウンタユニット,画像ユニット,通信ユニット,I/Oユニット等がある。マスター装置200には、ユーザがマスター装置200の動作設定、産業用ネットワークシステム100の動作状態の表示、ネットワークの設計など行うための管理装置600が接続されることもある。管理装置600は設計支援ツールや管理ツールがインストールされたパーソナルコンピュータなどにより構成される。
 後述するアドレス設定処理は、マスター装置200若しくは管理装置600により実行され、又は、マスター装置200と管理装置600の協働により実行される。すなわち、本実施形態では、マスター装置200及び/又は管理装置600が、本発明のアドレス設定方法の実行主体である処理装置に対応する。
 ハブ装置700は、マスター装置側を上流としたときに、上流側に接続する1つのポート(INポート)701と、下流側に接続する複数のポート(OUTポート)702a~702cを有している。利用者は各装置をケーブルやハブ装置を用いて順序や分岐を設定しながら接続することにより、所望のトポロジを作ることができる。分岐構造は、ハブ装置だけではなく、スレーブ装置が下流側に複数のスレーブ装置を接続することによっても作ることができる。
 EtherCATにおいてはケーブル400に関して、一般のイーサネットの規格で使用されるものの転用や、イーサネット用機器の製造設備での製造が可能である。これにより費用削減を実現している。
 このような産業用ネットワークシステム100は、例えば工場等に敷設されFAシステムとして利用される。マスター装置200は、プログラムやオペレーションに従い、ネットワークを通じて制御データを含む情報信号を送信する。スレーブ装置300は、情報信号に含まれるマスター装置からのリクエストへの応答として、受信した情報信号に基づく装置動作や、受信した情報信号の書き換えおよび返送処理を行う。産業用ネットワークシステム100を含む工場における生産は、マスター装置が動作の内容やタイミングを制御することによりスレーブ装置全体が連動して作業を分担することにより達成される。
 なお、産業用ネットワークシステム100を設計する際にはスレーブ装置間の接続順序やハブ装置におけるポート番号といったようなトポロジを意識した設計を行うことが必要になる。しかし通常のユーザがSEやカスタマーエンジニアのような専門知識や経験を有しているとは限らない。そこで、グラフィカルな表示によりトポロジを理解しやすくして設計作業を助けるための設計支援ツールを提供することが好ましい。設計支援ツールは、管理装置600の一機能として提供される。設計支援ツールでは、管理装置600のディスプレイに表示されたGUIを使って、スレーブ装置の機種選択、接続順序や接続ポートの選択(トポロジの設計)、各スレーブ装置に割り当てるノードアドレスの指定などを簡単に行うことのできる設計環境をユーザに提供する。
 (マスター-スレーブ間通信のモード)
 本実施形態の産業用ネットワークシステム100では、マスター装置200とスレーブ装置300との間の通信方式として、ポジションアドレスモード、ノードアドレスモード、論理アドレスモードの3つのモードが用意されている。以下、詳しく説明する。
 (1)ポジションアドレスモード
 このモードは、ポジションアドレスを用いてマスター-スレーブ間通信を行うものである。ポジションアドレスとは、マスター装置から見たときの接続順でアドレッシングされるネットワークアドレスである。
 図3は、ポジションアドレスモードの通信方式を説明する図である。この例では、説明の簡単のために、マスター装置200に対して4台のスレーブ装置300a~300dが直列状に接続された単純なトポロジを示している。このようなトポロジの場合、マスター装置200に近い順に、0x0000,0xFFFF,0xFFFE,0xFFFDというポジションアドレスが割り当てられる。
 ポジションアドレスモードでは、マスター装置200は、宛先となるスレーブ装置のポジションアドレスをメッセージに付加し、メッセージを送信する。各スレーブ装置は、メッセージを受信すると、付加されているアドレスを確認し、それが「0x0000」であれば自分宛てのメッセージであると判断する。一方、自分宛てのメッセージでない場合は、スレーブ装置は、メッセージに付加されているアドレスをインクリメントする(1を足す)。
 例えば、3番目のスレーブ装置300c宛てにメッセージを送る場合は、「0xFFFE」がメッセージに付加される。そうすると、1番目のスレーブ装置300a、2番目のスレーブ装置300bを通過する過程で、メッセージに付加されているアドレスが順次インクリメントされ、3番目のスレーブ装置300cに到達する際に「0x0000」となる。その結果、スレーブ装置300cが当該メッセージを自分宛てのものとして受信することになる。
 なお、ポジションアドレスは、スレーブ装置の物理的な接続順で決まるため、アドレス重複などのアドレス異常が発生しないという利点がある。しかし、ポジションアドレスはネットワーク状態(スレーブ装置の接続順や数、トポロジなど)に依存して変動してしまうため、クリティカルな通信を行うのには適していない。したがって、ポジションアドレスによる通信は、例えばネットワーク起動時のスレーブ情報の収集等の低レベルの通信処理にのみ利用され、スレーブ装置の監視や管理に関わる通信処理やタスク実行に関わる通信処理などには、次に述べるノードアドレスや論理アドレスを用いた通信が利用される。
 (2)ノードアドレスモード
 このモードは、マスター装置200が各スレーブ装置300に割り当てるノードアドレスを用いてマスター-スレーブ間通信を行うものである。各スレーブ装置300には、ユーザによって予めアドレス値が設定されており、このアドレス値はスレーブ装置内の不揮発性メモリに保持されている。マスター装置200は、ネットワークの起動時に各スレーブ装置300からアドレス値を読み取り、原則、そのアドレス値と同じ値のノードアドレスを各スレーブ装置300に割り当てる。なお、スレーブ装置に設定されている設定値としてのアドレス値を、スレーブ装置に割り当てられ通信に利用されるノードアドレスのアドレス値と明確に区別するため、設定値としてのアドレス値を以下「エイリアス」と称する。
 このようにノードアドレスは静的に付与されるアドレスであるため、ネットワーク状態に依存しない通信が可能である(つまり、たとえネットワーク状態が変化してもノードアドレスは変化しない。)。したがって、例えば、スレーブ装置の監視や管理に関わる通信処理など、通信相手先のスレーブ装置(ノード)を特定したイベント型のメッセージ通信が必要な場合に、このモードが利用される。
 ただし、静的なアドレス付与に関しては、前述したようなアドレス異常が発生する可能性がある。すなわち、ネットワーク上に同じエイリアス設定のスレーブ装置が存在している場合や、稼働中のネットワークに新たに追加したスレーブ装置が他のスレーブ装置と同じエイリアス設定であった場合には、アドレス重複(ノードアドレスの衝突)によるシステムエラーが発生する。また、スレーブ装置にエイリアスが設定されていない場合(アドレス未定)は、スレーブ装置に対しノードアドレスを付与できないというエラーが発生する。
 (3)論理アドレスモード
 このモードは、フレームと呼ばれるデータを用いたサイクリック通信に用いられるものである。フレームは所定長のデータからなり、フレーム内には各スレーブ装置300にそれぞれ割り当てられたデータ領域が設けられている。本モードにおける論理アドレスとは、フレーム内の自分のデータ領域を指し示すアドレスに対応するものである。
 マスター装置200から周期的に発信されるフレームは、すべてのスレーブ装置300を順に通過した後、後端(最下流)のスレーブ装置で折り返され、マスター装置200に戻される。各スレーブ装置300は、フレームが自装置内を通過する際に、フレーム内の自分のデータ領域に対しデータの読み書きを行う。これにより、高速なデータ伝送とリアルタイム性を実現している。タスク実行に関わる通信処理はもっぱら論理アドレスモードで行われる。
 (アドレス設定処理)
 次に、図1、図4~図7を参照して、本発明の実施形態に係るアドレス設定処理について詳しく説明する。
 (1)スレーブ情報の収集
 図4は、マスター装置200により実行されるスレーブ情報収集処理(ネットワークスキャン処理)の流れを示すフローチャートである。また、図1(A)~図1(D)は、アドレス設定処理の一例を示す図である。
 ネットワーク起動時や、ネットワーク構成の変更(スレーブ装置の加入や離脱)があった時などに、図4に示す処理がマスター装置200により実行される。まず、マスター装置200は、ネットワーク上に存在するスレーブ装置の数を確認する(ステップS100)。例えば、マスター装置200から送出されたデータ(初期値=0)を各スレーブ装置300a~300cでカウントアップし、結果をマスター装置200に返送することで、スレーブ装置の総数を取得可能である。この処理はポジションアドレスモードで実行される。図1(A)の例では、スレーブ数は「3」となる。
 次に、マスター装置200は、各々のスレーブ装置300a~300cから、プロファイル情報とスレーブ接続情報を読み出す(ステップS101)。プロファイル情報とは、スレーブ装置を識別するための情報であって、例えば、スレーブ装置のプロダクトコード、ベンダID、リビジョン番号などを含んでいる。また、スレーブ接続情報とは、スレーブ装置の接続構成(トポロジ)を理解するための情報であって、例えば、スレーブ装置の接続先の装置とポートを特定する情報などを含んでいる。これらの情報に基づき、ネットワーク全体の構成要素とそのトポロジを把握することができる。
 次に、マスター装置200は、各々のスレーブ装置300a~300cから、スレーブ装置内に設定されているエイリアスを読み出し、アドレス管理テーブルを更新する(ステップS102)。アドレス管理テーブルとは、すべてのスレーブ装置300a~300cのエイリアスがリストされた情報であり、後述するアドレス異常の判定やノードアドレスの割り当てに利用されるものである。
 図5(A)は、図1(A)のネットワークから得られたアドレス管理テーブルの例であり、ポジションアドレス順に「0x1,0x2,0x1」のようにエイリアスが記述されている。なお、アドレス管理テーブルは、スレーブ装置のエイリアスの情報に加え、スレーブ装置に割り当てられたノードアドレスの値の情報も含んでいる(ただし、ノードアドレスの割り当てはこの後の処理で行われるため、ステップS102の時点ではノードアドレスの値は空欄となっている。)。ステップS101、S102の処理もポジションアドレスモードで実行される。
 ステップS101、S102の処理をすべてのスレーブ装置300a~300cに対して実行した後、マスター装置200は、プロファイル情報、スレーブ接続情報、及びアドレス管理テーブルを元に、当該ネットワークの構成を表す実構成情報を作成する(ステップS103)。
 図5(B)は、図1(A)のネットワークから得られた実構成情報の例である。この例では、1番目のスレーブ装置300aは、「プロダクトコード:a1、ベンダID:A、リビジョン番号:002(a1-A-002)」で識別される装置であり、装置「MASTER」(マスター装置)の「Out1」ポートに接続されており、エイリアス設定が「0x1」であることが示されている。また、2番目のスレーブ装置300bは、「a3-A-000」で識別され、装置「a1-A-002」(スレーブ装置300a)の「Out1」ポートに接続されており、エイリアス設定が「0x2」である。また、3番目のスレーブ装置300cは、「b0-B-005」で識別され、装置「a3-A-000」(スレーブ装置300b)の「Out2」ポートに接続されており、エイリアス設定が「0x1」である。
 (2)アドレス異常の検査とアドレスの割り当て
 図6は、アドレス検査・割当処理の流れを示すフローチャートである。この処理は、図4のスレーブ情報収集処理に続いて、マスター装置200により実行されるものである。
 マスター装置200は、まず1番目のスレーブ装置300aについて、アドレス管理テーブルを参照することにより、当該スレーブ装置300aのエイリアスが他のスレーブ装置300b、300cのエイリアスと重複していないかを確認する(ステップS200)。重複が無い場合はステップS201の処理、重複が検出された場合はステップS204の処理へ進む。
 図1(A)、図5(A)に示すように、スレーブ装置300aのエイリアスは「0x1」であり、スレーブ装置300cのエイリアスと同一である。それゆえ、マスター装置200は、ステップS204において、アドレス管理テーブルを参照して他のスレーブ装置に割り当てられていないアドレス値を選び、そのアドレス値を「仮のノードアドレス」としてスレーブ装置300aに設定する。本実施形態では、アドレス管理テーブルに記述されたエイリアス及びノードアドレス(つまり、割り当て予定のアドレス値と割り当て済みのアドレス値)を除いた空きアドレスの中で、最も小さな値のものを、仮のノードアドレスとして選択する。したがって、スレーブ装置300aには、仮のノードアドレス「0x3」が割り当てられる。このノードアドレスの割り当てもポジションアドレスモードで実行される。割り当てられたノードアドレスの値は、図5(A)の右側に示すように、アドレス管理テーブルに書き込まれる。
 なお、仮のノードアドレスの選び方は上記のアルゴリズムに限られず、他のスレーブ装置とのアドレス重複が回避できさえすればどのようなアルゴリズムを用いてもよい。例えば、空きアドレスの中で最も大きい値のものを選んでもよいし、予め一定数のアドレス値を仮のノードアドレス用に確保しておき、その中から選んでもよい。
 次に、マスター装置200は、2番目のスレーブ装置300bに対しても同様に、エイリアスの重複がないかを確認する(ステップS200)。図5(A)に示すように、スレーブ装置300bのエイリアスは「0x2」であり、アドレス重複は無い。それゆえ、マスター装置200は、ステップS201に進み、ネットワーク構成情報(設定情報)に記載されているノードアドレスの中にスレーブ装置300bのエイリアスと一致するものが含まれているか否かを確認する。
 ネットワーク構成情報の一例を図5(C)に示す。ネットワーク構成情報とは、管理装置600の設計支援ツール又は管理ツールから取得されるデータであって、ネットワークシステムを構成する各スレーブ装置のプロファイル情報、スレーブ接続情報、アドレス情報などが記述されているデータである。ネットワーク構成情報に含まれる情報の種類は、図5(B)に示す実構成情報に含まれるものと実質的に同じであるが、実構成情報が実際のネットワークシステムから収集した情報であるのに対し、ネットワーク構成情報は設計上の情報(ユーザが意図するネットワーク構成を示している情報)である点で異なる。ネットワークシステムが設計通りに組み上げられている場合は両者の内容は同じになるが、スレーブ装置の機種や接続先を間違えたり、エイリアス設定を間違えたりすると、ネットワーク構成情報と実構成情報とが不一致となる。
 ステップS201において、スレーブ装置のエイリアスと一致するものがネットワーク構成情報に存在しなかった場合(アドレス未知)は、ステップS204の処理に進み、仮のノードアドレスが割り当てられる。またスレーブ装置にエイリアスが設定されていなかった場合(アドレス未定)も、やはりネットワーク構成情報に同じものが存在しないことから、ステップS204の処理に進み、仮のノードアドレスが割り当てられる。
 スレーブ装置300bのエイリアス「0x2」と一致するものがネットワーク構成情報に含まれていたら、マスター装置200は、プロファイル情報とスレーブ接続情報についても照合する(ステップS202)。図示はしていないが、プロファイル情報やスレーブ接続情報が不一致であった場合は、確認を要する旨のエラーメッセージを管理装置600のディスプレイなどに出力したり、アドレス設定処理を中断したりしてもよい。
 その後、マスター装置200は、スレーブ装置300bに対して、当該スレーブ装置300bに設定されていたエイリアスと同じ値「0x2」をノードアドレスとして割り当てる(ステップS203)。割り当てられたノードアドレスの値は、アドレス管理テーブルに書き込まれる。
 次に、マスター装置200は、3番目のスレーブ装置300cに対しても同様に、エイリアスの重複がないかを確認する(ステップS200)。図5(A)に示すように、スレーブ装置300cのエイリアスは「0x1」であり、アドレス重複がある。それゆえ、ステップS204において、仮のノードアドレス「0x4」がスレーブ装置300cに対して割り当てられる。
 図1(B)は、すべてのスレーブ装置300a~300cにノードアドレスの設定が完了した状態を示している。上記のように、アドレス重複を起こしていた1番目と3番目のスレーブ装置300a、300cには、エイリアスとは異なる、仮のノードアドレスが設定されていることが分かる。
 以上の処理によってアドレス重複の無いノードアドレスの割り当てが行われ、以降は、ポジションアドレスモードだけでなく、ノードアドレスモードでのメッセージ通信も行えるようになる。
 (3)エイリアスの変更
 図7は、エイリアス変更処理の流れを示すフローチャートである。この処理は、図6のアドレス検査・割当処理において仮のノードアドレスが割り当てられたスレーブ装置(異常スレーブ装置と称す。)が存在した場合に、各異常スレーブ装置に対して適用される処理である。本実施形態では、マスター装置200に接続された管理装置600によって、以下の処理が実行されるものとする。
 管理装置600は、異常スレーブ装置のエイリアス設定を、新たなアドレス値に書き換える(ステップS300)。本実施形態では、管理装置600を操作するユーザによって新たなアドレス値が指定されるものとする。新たなアドレス値は、他のスレーブ装置のエイリアスと重複しない限りどのような値を選んでもよい。もちろん、ユーザが指定するのではなく、管理装置600が自動で決定することもできる(例えば、図6のステップS204で選ばれた仮のノードアドレスをそのまま新たなアドレス値に選んでもよい。)。なお、エイリアス設定を書き換える処理は、仮のノードアドレスを利用したノードアドレスモードの通信により行われる。
 次に、管理装置600は、異常スレーブ装置に対してmailbox通信設定を行い、mailbox通信状態にする(ステップS301)。そして、管理装置600は、mailbox通信により異常スレーブ装置にスレーブリスタート要求を送信し、異常スレーブ装置を再起動する(ステップS302)。これにより、当該スレーブ装置において、ステップS300で書き換えたエイリアスが有効化される。なお、ステップS302、S303の処理も、仮のノードアドレスを利用したノードアドレスモードの通信により行われる。
 以上の処理によって、管理装置600からのオンライン作業により、異常スレーブ装置のエイリアス設定を、他のスレーブ装置のエイリアスと重複しない値に変更することができる。図1(C)は、エイリアス変更処理後の各スレーブ装置のエイリアス設定を示している。アドレス重複を起こしていたスレーブ装置300aと300cのエイリアスが別の値に変更されていることが分かる。なお、スレーブ装置のエイリアスを変更した場合には、それに合わせて、管理装置600に記憶されているネットワーク構成情報のアドレス情報も自動又はユーザ操作により更新する。
 (4)アドレスの再設定
 図7で述べた方法により異常スレーブ装置のエイリアス設定を変更した後、マスター装置200は、図6のアドレス検査・割当処理を再実行する。これにより、自動的かつ速やかに、変更後のエイリアス設定に従った正式なノードアドレスが各スレーブ装置300a~300cに割り当てられる(図1(D)参照)。
 以上述べたように、本実施形態のアドレス設定方法では、エイリアスの重複が検出された場合は、エイリアスをそのままノードアドレスとして割り当てるのではなく、別のアドレス値を仮のノードアドレスとして割り当てる。これにより、アドレス重複(ノードアドレスの衝突)が自動的に回避され、ノードアドレスモードによる通信を行うことが可能となる。そして、ノードアドレスモードによる通信を利用して、スレーブ装置のエイリアス設定の書き換えとスレーブ装置のリスタートを行うことで、オンラインによりエイリアスの変更(アドレス異常原因の解消)が可能となる。したがって、ネットワークシステムの停止やスレーブ装置の離脱・設定変更などのオフライン作業を排除できるため、従来に比べてアドレス異常の復旧作業が格段に効率化される。
 (変形例)
 上記実施形態では、スレーブ情報収集処理(図4)においてアドレス重複が検出されたすべてのスレーブ装置、すなわち図1(B)の例ではスレーブ装置300aと300cの両方に対して、仮のノードアドレスを割り当てるようにしている。しかし、アドレスが重複しているスレーブ装置のうち、1つはエイリアス設定どおりのノードアドレスを割り当て、残りのものに仮のノードアドレスを割り当てるようにしても、アドレス重複は解消される。
 例えば、図8(A)に示すように、稼働中のネットワークシステムに対し、重複アドレスをもつ新たなスレーブ装置300cを加入するケースを想定する。このような場合、既に稼働中の部分(スレーブ装置300a、300b)には影響を及ぼさないようにすべきである。そこで、既に稼働中のスレーブ装置の場合は図6のステップS200をスキップし、新たに加入したスレーブ装置についてのみステップS200のアドレス重複判定を行うようにするとよい。そうすると、図8(B)に示すように、スレーブ装置300a、300bに対してはエイリアスどおりのノードアドレスが割り当てられ、スレーブ装置300cに対してのみ仮のノードアドレス「0x3」が割り当てられることとなる。その後のエイリアス変更処理等は上記実施形態のものと同様である。この方法によれば、稼働中のスレーブ装置のノードアドレスを変更することなく、アドレス重複を回避できるため、生産ライン等に影響を及ぼすリスクを最小限に抑えることができる。
 本発明の第1態様は、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムにおけるアドレス設定方法であって、前記ネットワークシステムは、各スレーブ装置に一意に割り当てられるノードアドレスを用いて通信先のノードを特定した通信を行うモードを有しており、前記ノードアドレスは、前記マスター装置に内蔵され、又は、前記マスター装置に接続された処理装置によって、各スレーブ装置自身に予め設定されているアドレス値に従って自動的に割り当てられるものであり、前記アドレス設定方法は、前記処理装置が、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に設定されているアドレス値を取得する取得ステップと、前記処理装置が、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出ステップと、前記処理装置が、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定ステップと、を含むことを特徴とするアドレス設定方法である。
 このネットワークシステムにおいては、スレーブ装置自身に予め設定されているアドレス値に従ってノードアドレスが自動的に割り当てられる「静的なアドレス付与」が基本となる。このような静的なアドレス付与の場合、例えば、他のスレーブ装置と重複するアドレス値をもつスレーブ装置をネットワークに加入してしまったりすると、複数のスレーブ装置に同一のノードアドレスを割り当てようとしてアドレス重複によるシステムエラーが発生する。
 そこで本発明では、最初に、すべてのスレーブ装置のアドレス値を収集して、重複がないかを確認する。そして、重複が検出された場合は、アドレス値をそのままノードアドレスとして割り当てるのではなく、他のアドレス値と重複が生じないように、仮のノードアドレスを割り当てる。これにより、アドレス重複(ノードアドレスの衝突)が自動的に回避され、ノードアドレスを用いた通信(通信先のノードを特定した通信)を行うことが可能となる。
 本発明のアドレス設定方法においては、前記処理装置が、異常スレーブ装置に設定されているアドレス値を、他のスレーブ装置に設定されているアドレス値と重複しないアドレス値に変更する変更ステップをさらに含むことが好ましい。これにより、アドレス異常が生じていたスレーブ装置に対し、他のスレーブ装置と重複しない適切なアドレス値が設定される。したがって、少なくとも次回のネットワーク起動時には、変更後の適切なアドレス値が反映され、当該スレーブ装置に対して(「仮」ではない)正式なノードアドレスが割り当てられることとなる。
 好ましくは、前記変更ステップにより異常スレーブ装置のアドレス値を変更した後、前記処理装置が、前記取得ステップ、前記異常抽出ステップ、及び前記アドレス設定ステップを再び実行するとよい。これにより、自動的かつ速やかに、変更後のアドレス値に従った正式なノードアドレスが各スレーブ装置に割り当てられる。
 なお、異常スレーブ装置に設定するアドレス値については、処理装置が自動で決定することもできるし、処理装置を操作するユーザが選択(入力)することもできる。また、アドレス値変更後のアドレス設定の再実行に関しても、処理装置が自動で行うのではなく、ユーザの指示により行ってもよい。もちろん全てを自動化するほうが復旧作業に要する労力及び時間をより短縮することができるが、たとえユーザ操作の場合であっても、本発明によれば処理装置からオンラインで指示が可能であるため、システムの停止やスレーブ装置の離脱・設定変更などのオフライン作業を排除でき、復旧作業が格段に効率化される。
 異常スレーブ装置のアドレス値を変更する処理は、当該異常スレーブ装置に割り当てられた仮のノードアドレスを用いた通信により行われるものであることが好ましい。また、前記ネットワークシステムは、マスター装置から見たときの接続順によって決まるポジションアドレスを用いて通信を行うモードを有しており、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に設定されているアドレス値を取得する処理は、前記ポジションアドレスを用いた通信により行われることが好ましい。
 また、前記異常抽出ステップでは、アドレス値が設定されていないスレーブ装置も異常スレーブ装置として抽出されることが好ましい。これにより、所謂「アドレス未定」の異常についても復旧することができる。
 また、前記処理装置は、ネットワーク上の各スレーブ装置に割り当てるべきノードアドレスが記載されている設定情報を予め記憶しており、前記異常抽出ステップでは、前記設定情報に記載されているノードアドレスに一致するものがないアドレス値が設定されているスレーブ装置も異常スレーブ装置として抽出されることが好ましい。これにより、所謂「アドレス未知」の異常についても復旧することができる。
 なお、本発明は、上記処理の少なくとも一部を含むアドレス設定方法として特定することもできるし、上記処理を実現する手段の少なくとも一部を含むネットワークシステム又はマスター装置として特定することもできる。上記処理や手段の各々は、技術的な矛盾が生じない限りにおいて、自由に組み合わせることが可能である。
 例えば、本発明の第2態様は、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムであって、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に予め設定されているアドレス値を取得する取得手段と、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出手段と、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定手段と、前記アドレス設定手段で割り当てられたノードアドレス又は仮のノードアドレスを用いて、通信先のノードを特定した通信を行う通信手段と、を有することを特徴とするネットワークシステムである。
 また、本発明の第3態様は、マスター装置と複数のスレーブ装置とから構成されるネットワークシステムで用いられるマスター装置であって、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に予め設定されているアドレス値を取得する取得手段と、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出手段と、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定手段と、前記アドレス設定手段で割り当てられたノードアドレス又は仮のノードアドレスを用いて、通信先のノードを特定した通信を行う通信手段と、を有することを特徴とするマスター装置である。
 100:産業用ネットワークシステム
 200:マスター装置
 300、300a、300b、300c、300d:スレーブ装置
 600:管理装置

Claims (9)

  1.  マスター装置と複数のスレーブ装置とから構成されるネットワークシステムにおけるアドレス設定方法であって、
     前記ネットワークシステムは、各スレーブ装置に一意に割り当てられるノードアドレスを用いて通信先のノードを特定した通信を行うモードを有しており、
     前記ノードアドレスは、前記マスター装置に内蔵され、又は、前記マスター装置に接続された処理装置によって、各スレーブ装置自身に予め設定されているアドレス値に従って自動的に割り当てられるものであり、
     前記アドレス設定方法は、
     前記処理装置が、ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に設定されているアドレス値を取得する取得ステップと、
     前記処理装置が、他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出ステップと、
     前記処理装置が、異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定ステップと、
    を含むことを特徴とするアドレス設定方法。
  2.  前記処理装置が、異常スレーブ装置に設定されているアドレス値を、他のスレーブ装置に設定されているアドレス値と重複しないアドレス値に変更する変更ステップをさらに含むことを特徴とする請求項1に記載のアドレス設定方法。
  3.  前記変更ステップにより異常スレーブ装置のアドレス値を変更した後、前記処理装置が、前記取得ステップ、前記異常抽出ステップ、及び前記アドレス設定ステップを再び実行することを特徴とする請求項2に記載のアドレス設定方法。
  4.  異常スレーブ装置のアドレス値を変更する処理は、当該異常スレーブ装置に割り当てられた仮のノードアドレスを用いた通信により行われることを特徴とする請求項2又は3に記載のアドレス設定方法。
  5.  前記異常抽出ステップでは、アドレス値が設定されていないスレーブ装置も異常スレーブ装置として抽出されることを特徴とする請求項1~4のうちいずれか1項に記載のアドレス設定方法。
  6.  前記処理装置は、ネットワーク上の各スレーブ装置に割り当てるべきノードアドレスが記載されている設定情報を予め記憶しており、
     前記異常抽出ステップでは、前記設定情報に記載されているノードアドレスに一致するものがないアドレス値が設定されているスレーブ装置も異常スレーブ装置として抽出されることを特徴とする請求項1~5のうちいずれか1項に記載のアドレス設定方法。
  7.  前記ネットワークシステムは、マスター装置から見たときの接続順によって決まるポジションアドレスを用いて通信を行うモードを有しており、
     ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に設定されているアドレス値を取得する処理は、前記ポジションアドレスを用いた通信により行われることを特徴とする請求項1~6のうちいずれか1項に記載のアドレス設定方法。
  8.  マスター装置と複数のスレーブ装置とから構成されるネットワークシステムであって、
     ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に予め設定されているアドレス値を取得する取得手段と、
     他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出手段と、
     異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定手段と、
     前記アドレス設定手段で割り当てられたノードアドレス又は仮のノードアドレスを用いて、通信先のノードを特定した通信を行う通信手段と、
    を有することを特徴とするネットワークシステム。
  9.  マスター装置と複数のスレーブ装置とから構成されるネットワークシステムで用いられるマスター装置であって、
     ネットワーク上のすべてのスレーブ装置から、各スレーブ装置に予め設定されているアドレス値を取得する取得手段と、
     他のスレーブ装置に設定されているアドレス値と重複するアドレス値が設定されているスレーブ装置を、異常スレーブ装置として抽出する異常抽出手段と、
     異常スレーブ装置でないスレーブ装置に対しては各スレーブ装置に設定されていたアドレス値をそのままノードアドレスとして割り当て、異常スレーブ装置に対しては他のスレーブ装置に割り当てられてないアドレス値を仮のノードアドレスとして割り当てるアドレス設定手段と、
     前記アドレス設定手段で割り当てられたノードアドレス又は仮のノードアドレスを用いて、通信先のノードを特定した通信を行う通信手段と、
    を有することを特徴とするマスター装置。
PCT/JP2011/056968 2011-03-15 2011-03-23 ネットワークシステムにおけるアドレス設定方法 Ceased WO2012124159A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-056411 2011-03-15
JP2011056411A JP5212509B2 (ja) 2011-03-15 2011-03-15 ネットワークシステムにおけるアドレス設定方法

Publications (1)

Publication Number Publication Date
WO2012124159A1 true WO2012124159A1 (ja) 2012-09-20

Family

ID=46830267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/056968 Ceased WO2012124159A1 (ja) 2011-03-15 2011-03-23 ネットワークシステムにおけるアドレス設定方法

Country Status (2)

Country Link
JP (1) JP5212509B2 (ja)
WO (1) WO2012124159A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014134866A (ja) * 2013-01-08 2014-07-24 New Japan Radio Co Ltd 通信システム
WO2020184034A1 (ja) * 2019-03-14 2020-09-17 オムロン株式会社 制御システムおよび制御装置
US12019419B2 (en) 2019-03-14 2024-06-25 Omron Corporation Control system and control apparatus
US12117786B2 (en) 2019-03-14 2024-10-15 Omron Corporation Control system and control apparatus

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491337B (zh) * 2018-04-03 2021-04-23 苏州和欣致远节能科技有限公司 一种实现群组控制的方法
JP7547079B2 (ja) * 2020-05-15 2024-09-09 キヤノン株式会社 マスタスレーブ通信システムおよびその制御方法
US12149500B2 (en) 2022-12-30 2024-11-19 Yokogawa Electric Corporation Alias configuration management

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1174915A (ja) * 1997-08-29 1999-03-16 Nec Corp Tcp/ipネットワークにおけるipアドレスの自動設定方法
WO2008152807A1 (ja) * 2007-06-13 2008-12-18 Panasonic Corporation Macアドレスの重複解消方法、ネットワーク機器管理システム、サーバーおよび情報機器

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1174915A (ja) * 1997-08-29 1999-03-16 Nec Corp Tcp/ipネットワークにおけるipアドレスの自動設定方法
WO2008152807A1 (ja) * 2007-06-13 2008-12-18 Panasonic Corporation Macアドレスの重複解消方法、ネットワーク機器管理システム、サーバーおよび情報機器

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014134866A (ja) * 2013-01-08 2014-07-24 New Japan Radio Co Ltd 通信システム
WO2020184034A1 (ja) * 2019-03-14 2020-09-17 オムロン株式会社 制御システムおよび制御装置
JP2020150451A (ja) * 2019-03-14 2020-09-17 オムロン株式会社 制御システムおよび制御装置
JP7070479B2 (ja) 2019-03-14 2022-05-18 オムロン株式会社 制御システムおよび制御装置
US12019419B2 (en) 2019-03-14 2024-06-25 Omron Corporation Control system and control apparatus
US12117786B2 (en) 2019-03-14 2024-10-15 Omron Corporation Control system and control apparatus
US12356218B2 (en) 2019-03-14 2025-07-08 Omron Corporation Control system and control apparatus

Also Published As

Publication number Publication date
JP2012195659A (ja) 2012-10-11
JP5212509B2 (ja) 2013-06-19

Similar Documents

Publication Publication Date Title
JP5212509B2 (ja) ネットワークシステムにおけるアドレス設定方法
JP5858037B2 (ja) ネットワークシステム、マスター装置およびネットワークシステムの制御方法
EP3702857B1 (en) Redundancy in a network centric process control system
EP2688002B1 (en) Design assistance device of a network system
EP3300339B1 (en) Topology based internet protocol (ip) addressing
US9178760B2 (en) Method and apparatus for configuring network nodes
CN108156016B (zh) 通信系统、通信装置以及通信方法
US10412041B2 (en) Internet protocol (IP) addressing using an industrial control program
CN103052922A (zh) 用于配置控制设备的方法
CN105359110A (zh) 故障监测方法、控制和数据传输设备以及控制装置
JP2002268707A (ja) コントローラ及びツール並びにそれらにより構成されるシステム
CN108376111B (zh) 信息处理装置、信息处理方法和计算机可读取的存储介质
US20180019933A1 (en) Information processing apparatus, information processing program, and information processing method
WO2008075631A1 (ja) Plc分散制御システム
US11165745B2 (en) Control system, controller, and control method
CN102339048A (zh) 用于运行自动化装置的方法
US8793417B2 (en) Integration of field devices in a distributed system
US20170006072A1 (en) Controller and Method for Setting Up Communication Links to Redundantly Operated Controllers in an Industrial Automation System
JP2018136745A (ja) 制御システム、制御装置および制御プログラム
CN109324922A (zh) 嵌入式节点的自动固件升级
JP5921781B2 (ja) プログラマブルコントローラおよびプログラマブルコントローラの制御方法
CN113545013B (zh) 网络管理装置、管理方法以及记录介质
JP6455891B2 (ja) 監視装置、通信障害自動復旧システム、方法及びプログラム

Legal Events

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

Ref document number: 11860731

Country of ref document: EP

Kind code of ref document: A1

DPE2 Request for preliminary examination filed before expiration of 19th month from priority date (pct application filed from 20040101)
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11860731

Country of ref document: EP

Kind code of ref document: A1