WO2020184034A1 - 制御システムおよび制御装置 - Google Patents

制御システムおよび制御装置 Download PDF

Info

Publication number
WO2020184034A1
WO2020184034A1 PCT/JP2020/005272 JP2020005272W WO2020184034A1 WO 2020184034 A1 WO2020184034 A1 WO 2020184034A1 JP 2020005272 W JP2020005272 W JP 2020005272W WO 2020184034 A1 WO2020184034 A1 WO 2020184034A1
Authority
WO
WIPO (PCT)
Prior art keywords
slave
slaves
identification information
control device
instruction
Prior art date
Application number
PCT/JP2020/005272
Other languages
English (en)
French (fr)
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 EP20769405.0A priority Critical patent/EP3940997B1/en
Priority to US17/434,782 priority patent/US20220150725A1/en
Priority to CN202080017588.5A priority patent/CN113508561B/zh
Publication of WO2020184034A1 publication Critical patent/WO2020184034A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/21Pc I-O input output
    • G05B2219/21005Several slave modules connected to same I-O of master, multiplexed by master
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/21Pc I-O input output
    • G05B2219/21028Address of module determined by position
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/22Pc multi processor system
    • G05B2219/2228Master detects and configures slaves
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/22Pc multi processor system
    • G05B2219/2231Master slave
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/20Master-slave selection or change arrangements

Definitions

  • the present invention relates to a control system including a network-connected slave and a control device used in the control system.
  • a control system consisting of a control device and one or more slaves connected to the control device via a network is widespread.
  • the slave a device that provides an arbitrary processing function such as an input / output device, robot control, or a visual sensor is assumed.
  • the control device functions as a master.
  • the information for identifying the slave is referred to as a slave ID (identification information), a network ID (identification information), a network address, and a node address.
  • the number of slaves and the connection configuration are appropriately determined according to the control target, and may be added or changed after the fact. In such a case, it is necessary to update the information for identifying each slave as appropriate.
  • Patent Document 1 arbitrarily sets a group name, a device name, a network address, and a node address for each device on a user interface screen for setting a group provided by a support device. Disclose the configuration that can be set.
  • setup change may be frequently performed.
  • setup change it is necessary to reset or change the identification information of the slave.
  • a control system includes a control device that functions as a master, and a plurality of slaves that are network-connected to the control device. Each of the plurality of slaves has identification information.
  • the control device sets the specified identification information for the other specified slaves by executing the first instruction specified as the reference by one of the plurality of slaves. Including means.
  • the identification information can be easily reset or changed.
  • the control device may further include a management means for managing the connection status of a plurality of slaves.
  • Other slaves whose identification information is set by the identification information setting means may specify the connected position by referring to the connection states of the plurality of slaves. According to this configuration, the connected position of the slave to be set can be determined based on the actual connection configuration.
  • the first instruction may include the designation of the port to which the other slave is connected. According to this configuration, the port actually connected to the reference slave may be specified, so that the port can be easily specified.
  • the first instruction may be able to specify identification information for each of a plurality of other slaves. According to this configuration, the time required for setting the identification information for a plurality of slaves can be shortened.
  • Each of the plurality of slaves includes a non-volatile memory for holding the identification information and a volatile memory for holding the set identification information.
  • the identification information setting means may write the specified identification information to both the non-volatile memory and the volatile memory of the other slave. According to this configuration, the contents of the non-volatile memory and the volatile memory of the slave can be updated.
  • the first instruction may be executed as part of a user program executed by the control device. According to this configuration, identification information can be set for the slave without using a support device or the like.
  • the identification information setting means may output information for identifying the slave who failed to set the identification information. According to this configuration, it is possible to facilitate troubleshooting related to the failure of setting the identification information.
  • the control device further provides an identification information reading means for reading the identification information set for the other designated slave by executing the second instruction specified as the reference by one of the plurality of slaves. It may be included. According to this configuration, the identification information can be read from any slave whose identification information is unknown.
  • the control device may have configuration information that defines the connection configuration of a plurality of slaves.
  • the control device may further include invalidation means for invalidating some or all of the slaves included in the definition by the configuration information by executing the third instruction. According to this configuration, even if the configuration information and the actual connection configuration do not match, the processing can be continued without causing an abnormality or the like.
  • a control device that functions as a master.
  • the control device includes a controller for network connection with a plurality of slaves.
  • Each of the plurality of slaves has identification information.
  • the control device sets the specified identification information for the other specified slaves by executing the first instruction specified as the reference by one of the plurality of slaves. Including means.
  • the identification information can be easily reset or changed.
  • FIG. It is a schematic diagram which shows an example of the actual configuration information held by the actual configuration management component shown in FIG. It is a schematic diagram which shows an example of the abnormal termination result output by the slave ID setting instruction which concerns on this embodiment. It is a figure for demonstrating the content of the setup change using the slave ID setting instruction which concerns on this embodiment. It is a figure which shows the main part of the user program corresponding to the setup change shown in FIG. It is a figure for demonstrating the change of the connection state corresponding to the setup change shown in FIG. It is a figure for demonstrating the change of the configuration information corresponding to the setup change shown in FIG. It is a figure which shows an example of the user program for prompting the restart of a slave using the slave ID setting instruction according to this embodiment. It is a figure which shows an example of the user program for realizing the information presentation when the execution of the slave ID setting instruction according to this embodiment fails.
  • FIG. 1 is a schematic diagram showing an overall configuration example of the control system 1 according to the present embodiment.
  • the control system 1 has, as main components, a control device 100 that functions as a master, and one or more slaves 200-1, 200-2, ... (A network connection with the control device 100).
  • slave 200 A network connection with the control device 100.
  • slave 200 it is also collectively referred to as “slave 200”.
  • the network connecting the control device 100 and one or more slaves 200 typically includes EtherCAT®, EtherNet / IP®, DeviceNet®, CompoNet®, and the like. It is preferable to adopt an industrial network.
  • EtherCAT is adopted will be described as a typical example, but other standards or protocols may be adopted.
  • each of the slaves 200 has identification information that can be identified from the control device 100 that functions as a master.
  • identification information can be used as such identification information (details will be described later)
  • any identification information can be used without being limited to the "slave ID”.
  • the control device can arbitrarily reset or change the slave ID (identification information) set in any slave 200 (hereinafter, also collectively referred to as "setting").
  • the control device 100 designates one of the plurality of slaves 200 as a reference, and specifies the slave 200 to be set based on the designated slave 200. To do. Then, the control device 100 sets the designated slave ID for the specified slave 200.
  • the term “master” is a general term for an entity or function that manages data transmission in a network of interest.
  • the “master” may include the device itself that manages the data transmission.
  • slave is a term that is paired with a master, and is a general term for an entity or a function that transmits data under the control of the master of the network in the network of interest.
  • the “slave” may include the device itself that performs data transmission.
  • master and slave are terms for distinguishing functional differences related to data transmission in the network of interest, and the functions and relationships other than data transmission are particularly limited. It's not something.
  • configuration information means information indicating a definition such as a configuration held by a control device or another device.
  • the "Position Address” means an address determined according to a predetermined rule according to the topology on the network. For example, “0”, “0xffff”, “0xfffe”, and so on may be assigned in order from the master.
  • the "slave ID” (Slave ID) means the identification information given to each slave in order to prevent the master from making a mistake between devices by comparing with the configuration information.
  • the "slave ID” is arbitrarily set by the master, and it is determined whether or not the slave is connected to the correct position.
  • the “slave ID” is also referred to as a "node address”.
  • the “node address” may be set by a rotary switch or the like arranged on the slave, but the “slave ID” will be described below assuming that the "slave ID” can be reset or changed from the master side.
  • unknown slave means a slave whose actual configuration does not match the corresponding setting of the master configuration information. That is, the “unknown slave” means a slave that is located at a position different from the original position defined by the configuration information.
  • FIG. 2 is a schematic diagram for explaining the background technology according to the present embodiment.
  • FIG. 2 shows a configuration example in which two control devices 100-1 and 100-2 control a production line, respectively.
  • FIG. 2A shows an example in which the manufacturing module 30 is arranged on the conveyor 20 and the manufacturing module 40 is arranged on the conveyor 22.
  • the control device 100-1 controls the manufacturing module 30, and the control device 100-2 controls the manufacturing module 40.
  • FIG. 2B shows a configuration example in which the manufacturing module 30 is moved from the conveyor 20 to the conveyor 22.
  • the control device 100-2 controls the manufacturing module 30 and the manufacturing module 40.
  • the controlled object of the control device 100 and the connected device may change.
  • the correspondence to such a setup change will be described below.
  • FIG. 3 is a diagram showing an example of configuration information held by the control device 100 shown in FIG.
  • FIG. 4 is a diagram for explaining a change in the configuration information according to the setup change shown in FIG.
  • Each of the control devices 100-1 and 100-2 has configuration information (corresponding to configuration information 134 shown in FIG. 5) that defines a connection configuration of a plurality of slaves 200 as shown in FIG. More specifically, in the configuration information shown in FIG. 3, a junction slave 200J is connected to the control device 100, and a slave constituting the manufacturing module 30 is connected to one port of the junction slave 200J. The slaves that make up the manufacturing module 40 are connected to another port.
  • FIG. 4 (A) shows a setting example of the control devices 100-1 and 100-2 corresponding to the configuration example shown in FIG. 2 (A), and FIG. 4 (B) is shown in FIG. 2 (B).
  • a setting example of the control devices 100-1 and 100-2 corresponding to the configuration example is shown.
  • the slave setting corresponding to the manufacturing module that does not actually exist is invalidated. More specifically, in the case of FIG. 4A, the setting related to the manufacturing module 40 of the control device 100-1 is invalidated, and the setting related to the manufacturing module 30 of the control device 100-2 is invalidated. .. Further, in the case of FIG. 4B, the settings related to the manufacturing modules 30 and 40 of the control device 100-1 are invalidated.
  • the configuration information of the control device 100 includes the information corresponding to the maximum configuration that can be connected, and the settings for unnecessary slaves are invalidated according to the configuration that is actually connected. , Can handle various setup changes.
  • the slave ID in addition to invalidating a part or all of the configuration information as described above, the slave ID can be reset or changed. By realizing such resetting or changing of the slave ID, the adaptability to the setup change can be further enhanced.
  • FIG. 5 is a schematic diagram showing a hardware configuration example of the control device 100 constituting the control system according to the present embodiment.
  • the controller 100 includes a processor 102, a chipset 104, a main memory 106, a storage 108, a network controller 110, a USB (Universal Serial Bus) controller 112, and a memory card interface 114. , Internal bus controller 118, field network controller 120, counter 126, and RTC (Real Time Clock) 128.
  • the processor 102 corresponds to an arithmetic processing unit that executes control operations and the like, and is composed of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), and the like. Specifically, the processor 102 reads the programs (as an example, the system program 130 and the user program 132) stored in the storage 108, expands them in the main memory 106, and executes the programs to control the control according to the control target. , And various processes as described later are realized.
  • the programs as an example, the system program 130 and the user program 132
  • the main memory 106 is composed of, for example, volatile memory such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory).
  • the storage 108 is composed of, for example, a non-volatile memory such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive).
  • the chipset 104 realizes the processing of the control device 100 as a whole by controlling the processor 102 and each device.
  • the user program 132 created according to the control target such as equipment or machine is stored.
  • the network controller 110 exchanges data with an arbitrary information processing device such as a gateway or a database server via an information network.
  • the USB controller 112 exchanges data with the support device 300 via the USB connection.
  • the memory card interface 114 is configured so that the memory card 116 can be attached and detached, and data can be written to the memory card 116 and various data can be read from the memory card 116.
  • the counter 126 is used as a time reference for managing the execution timing of various programs executed by the control device 100.
  • the counter 126 may be implemented by using a high precision event timer (HPET: High Precision Event Timer) or the like arranged on the system bus that drives the processor 102, or may be an ASIC (Application Specific Integrated Circuit) or the like. It may be mounted using a dedicated circuit such as FPGA (Field-Programmable Gate Array).
  • the RTC128 is a kind of counter having a timekeeping function, and provides the current time to the processor 102 or the like.
  • the internal bus controller 118 electrically connects one or a plurality of functional units 150-1, 150-2, ... (hereinafter, also collectively referred to as "functional unit 150") and the control device 100 via the internal bus 6. Corresponds to the communication interface for connecting to.
  • the internal bus controller 118 functions as a master for performing constant cycle communication via the internal bus 6.
  • the functional unit 150 is a general term for devices that are connected to the control device 100 and exchange various signals with and from the controlled object.
  • the functional unit 150 may include an IO unit, a communication unit, and a controller unit that implements special functions such as PID control and motion control.
  • the IO unit has, for example, a DI (Digital Input) function that receives a digital input signal from a control target, a DO (Digital Output) function that sends a digital output signal to a control target, and an AI that receives an analog input signal from a control target. It has one or more of the (Analog Input) function and the AO (Analog Output) function that sends an analog output signal to the controlled object.
  • the field network controller 120 corresponds to a communication interface for electrically connecting one or a plurality of slaves 200-1, 200-2, ... (Slave 200) and the control device 100 via the network 4.
  • the field network controller 120 is a controller for connecting to a plurality of slaves 200, and functions as a master for performing constant cycle communication via the network 4.
  • FIG. 5 shows a configuration example in which the necessary functions are provided by the processor 102 executing the program, and some or all of these provided functions are provided by a dedicated hardware circuit (for example, ASIC). Alternatively, it may be implemented using an FPGA or the like). Alternatively, the main part of the control device 100 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, the virtualization technology may be used to execute a plurality of OSs (Operating Systems) having different uses in parallel, and to execute necessary applications on each OS.
  • OSs Operating Systems
  • control device 100 a configuration in which functions such as a display device and a support device are integrated in the control device 100 may be adopted.
  • FIG. 6 is a schematic diagram showing a hardware configuration example of the slave 200 constituting the control system according to the present embodiment.
  • the slave 200 includes a field network controller 202, a main controller 210, and a functional circuit 230.
  • the field network controller 202 corresponds to a communication interface for electrically connecting the control device 100 (master) and the slave 200 via the network 4.
  • the field network controller 202 functions as a communication slave for exchanging data under the control of the master.
  • the main controller 210 is a circuit in charge of main control of the slave 200, and includes, for example, a processor 212, a main memory 214, and a non-volatile memory 220.
  • the non-volatile memory 220 stores the firmware 226 executed by the processor 212 and the slave ID 224.
  • the functional circuit 230 provides the unique function of the slave 200.
  • the functional circuit 230 includes an inverter circuit, a control circuit, and the like.
  • the slave 200 is a remote IO device, it includes a communication interface for exchanging data with and from a connected functional unit via an internal bus.
  • FIG. 6 shows the main controller 210 including the processor 212, but all or part of the functions provided by the main controller 210 may be implemented by using a dedicated hardware circuit (for example, ASIC or FPGA). Good.
  • a dedicated hardware circuit for example, ASIC or FPGA. Good.
  • FIG. 7 is a schematic diagram showing a hardware configuration example of the support device 300 constituting the control system according to the present embodiment.
  • the support device 300 is realized by executing a program using hardware (for example, a general-purpose personal computer) that follows a general-purpose architecture.
  • the support device 300 includes a processor 302, a main memory 304, a storage 306, an input unit 308, a display unit 310, an optical drive 312, and a USB controller 316. These components are connected via the processor bus 318.
  • the processor 302 is composed of a CPU, a GPU, or the like, and reads out a program (OS 320 and support program 326 as an example) stored in the storage 306, expands the program into the main memory 304, and executes the program. Realize the processing.
  • a program OS 320 and support program 326 as an example
  • the main memory 304 is composed of, for example, a volatile memory such as DRAM or SRAM.
  • the storage 306 is composed of, for example, a non-volatile memory such as an HDD or an SSD.
  • the support program 326 for providing the functions as the support device 300 is stored. Further, the storage 306 stores the configuration information 134. The acquisition and use of this information will be described later.
  • the input unit 308 is composed of a keyboard, a mouse, etc., and accepts user operations.
  • the display unit 310 includes a display, various indicators, a printer, and the like, and outputs a processing result from the processor 302 and the like.
  • the USB controller 316 controls the exchange of data with the control device 100 and the like via the USB connection.
  • the support device 300 has an optical drive 312, and is stored in a recording medium 314 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) that temporarily stores a computer-readable program.
  • a recording medium 314 for example, an optical recording medium such as a DVD (Digital Versatile Disc)
  • the stored program is read out and installed in the storage 306 or the like.
  • the program executed by the support device 300 may be installed via a computer-readable recording medium 314, or may be installed by downloading from a server device or the like on the network. Further, the function provided by the support device 300 according to the present embodiment may be realized by using a part of the module provided by the OS.
  • FIG. 7 shows a configuration example in which the functions required as the support device 300 are provided by the processor 302 executing the program, and some or all of these provided functions are provided by dedicated hardware. It may be implemented using a circuit (eg, ASIC or FPGA).
  • FIG. 8 is a diagram for explaining the change in the slave ID that occurs in the setup change.
  • the master control device 100 is connected to the manufacturing module 30 (slave 200-1 and 200-2) and the manufacturing module 40 (slave 200-3 and 200) via the junction slave 200J.
  • An example in which -4) is connected is shown.
  • “1” and “2” are set as slave IDs in slaves 200-1 and 200-2, respectively.
  • "3" and "4" are set as slave IDs in the slaves 200-3 and 200-4, respectively.
  • connection configuration shown in FIG. 8 (A) has changed to the connection configuration shown in FIG. 8 (B) due to the setup change.
  • the manufacturing modules 30 (slave 200-1 and 200-2) are connected to a port different from the port initially connected to the junction slave 200J.
  • the configuration is different from the setting configuration in the connection configuration shown in FIG. 8A. That is, the slaves 200-1 and 200-2 in which "1" and "2" are set as the slave IDs are located at positions different from the positions specified in the configuration information 134 of the control device 100 which is the master. You will be connected.
  • slaves 200-1 and 200-2 become "unknown slaves".
  • FIG. 9 is a diagram for explaining the setting of the slave ID using the position address.
  • the master control device 100 is connected to the manufacturing module 30 (slave 200-1 and 200-2) and the manufacturing module 40 (slave 200-3 and 200) via the junction slave 200J.
  • An example in which -4) is connected is shown.
  • connection configuration shown in FIG. 9 (A) has changed to the connection configuration shown in FIG. 9 (B) due to the setup change.
  • the manufacturing modules 30 (slave 200-1 and 200-2) are connected to a port different from the port initially connected to the junction slave 200J.
  • another manufacturing module 50 (slave 200-5 and 200-6) is connected to the port of the junction slave 200J to which the manufacturing module 30 (slave 200-1 and 200-2) is connected.
  • the following instructions are prepared in order to set an arbitrary slave ID for the slave 200 at a specific position address.
  • SlaveIDAddress_set ([Slave position address to be set], [Slave ID to be set])
  • a method is provided in which an arbitrary slave ID can be easily set for an arbitrary slave 200 by using an instruction included in the user program 132. ..
  • ⁇ E. Slave ID setting in user program 132> an instruction for resetting or changing the slave ID (hereinafter, also referred to as a “slave ID setting instruction”) that can be executed by the user program 132 is provided.
  • a slave ID setting instruction an instruction for resetting or changing the slave ID (hereinafter, also referred to as a “slave ID setting instruction”) that can be executed by the user program 132 is provided.
  • a slave ID setting instruction By using such a slave ID setting command, it is not necessary to use the support device 300 or the like when setting the slave ID for each slave 200. Further, since it is executed as a part of the user program 132, for example, the setup change and the slave ID setting can be performed in parallel with the user operating the display device as a trigger.
  • the slave ID of the unknown slave cannot be specified. Therefore, in the slave ID setting command, the unknown slave is set based on the slave that exists in the vicinity of the unknown slave and can acquire the slave ID. Identify. Then, an arbitrary slave ID is set for the specified unknown slave.
  • FIG. 10 is a diagram for explaining an example of a slave ID setting command according to the present embodiment.
  • FIG. 10 shows an example of setting the slave ID for the manufacturing modules 30 (slave 200-1 and 200-2) connected to the port C of the junction slave 200J.
  • the slave ID setting instruction 400 sets the slave IDs for the unknown slaves slaves 200-1 and 200-2 as the junction slave 200J having a valid slave ID, respectively. ..
  • the slave ID setting command 400 (EC_SetSlaveSaveID) is defined in the following format.
  • EC_SetSlaveSlaveID ([reference slave slave ID], [port name], [set slave ID], [number of target slaves])
  • (100, portC, [5, 6], 2) is specified as an argument for the instruction EC_SetSlaveSaveID.
  • the first argument "100" indicates the slave ID of the reference slave, and in the example shown in FIG. 10, the slave ID of the junction slave 200J is stored.
  • the second argument, "portC” specifies the port name of the junction slave 200J to which the slaves 200-1 and 200-2 to which the slave ID is set are connected.
  • the third argument "[5,6]” indicates the value of the slave ID set for the target slaves 200-1 and 200-2.
  • the fourth argument "2" indicates the number of slaves 200-1 and 200-2 to be set.
  • the slave 200 of the plurality of slaves 200 executes the slave ID setting command 400 designated as a reference, so that the other slave 200 is designated.
  • the specified slave ID (identification information) is set for.
  • the process in which any of the slaves 200 can set the slave ID (identification information) as a reference corresponds to the identification information setting function.
  • the slave ID setting instruction 400 may include the designation of the port to which the slave 200 is connected (the argument of the [port name] of the EC_SetSlaveSlaveID).
  • the port instead of specifying the port, any information may be used as long as it can identify the network connected to the reference slave 200.
  • the user when the slave ID is set for any unknown slave, the user is not made aware of the position address of the unknown slave. As a result, the user can easily create the user program 132 when the slave ID must be set due to the setup change or the like.
  • the slave ID setting command 400 can specify a slave ID for each of a plurality of slaves 200 to be set. That is, the control device 100 according to the present embodiment sets the designated slave ID (identification information) for each of the one or more designated slaves 200 by executing the slave ID setting command 400. You can also do it.
  • the slave ID can be set for a plurality of slaves 200 at once, so that the time required for setting the slave ID can be shortened.
  • FIG. 10 shows an example of a slave ID setting command 400 that sets slave IDs for two slaves 200 for convenience of explanation. It is also possible to set slave IDs for more slaves 200.
  • a slave directly connected to the manufacturing modules 30 (slave 200-1 and 200-2), that is, a slave directly connected to the slave 200 to be set is set as a reference slave.
  • a slave directly connected to the manufacturing modules 30 that is, a slave directly connected to the slave 200 to be set is set as a reference slave.
  • the reference slave is preferably located on the master side of the slave 200 to be set.
  • slave ID setting command 400 can be specified in any expression format. For example, it may be specified in a function block format as described later (details will be described later).
  • FIG. 11 is a schematic diagram for explaining the slave ID setting process in the slave 200 constituting the control system according to the present embodiment.
  • the slave 200 stores the slave ID 224 in the non-volatile memory 220. Further, during the operation of the slave 200, the slave ID storage register 216 is prepared on the main memory 214. The slave ID is also written in the slave ID storage register 216.
  • the slave 200 includes a non-volatile memory 220 for holding the slave ID (identification information) and a main memory 214 which is a volatile memory for holding the set slave ID (identification information). have.
  • two types of methods for writing the slave ID to the slave ID storage register 216 are prepared.
  • the first method is a method of rewriting the contents in the non-volatile memory 220 of the slave 200 from the master.
  • the non-volatile memory 220 has an area that can accept access from the outside, and the slave ID 224 is stored in the area.
  • the non-volatile memory 220 may be mounted as an EEPROM.
  • the slave ID is written to the non-volatile memory 220 by the access from the master (sequence SQ1). Since this writing is executed using SII (Slave Information Interface), it is also called "SII writing". That is, in the slave ID setting process, the control device 100 writes the designated slave ID to the non-volatile memory 220 of the designated slave 200 by using SII.
  • the slave ID written in the non-volatile memory 220 is not reflected in the slave ID storage register 216 as it is.
  • the slave ID stored in the non-volatile memory 220 is read out and reflected in the slave ID storage register 216 (sequence SQ2). Therefore, when the slave ID is written to the non-volatile memory 220 of the slave 200 to be set, the slave 200 needs to be restarted.
  • the second method is a method using a slave ID update object 218 (Slave Identification Reload Object).
  • the slave ID update object 218 is an object defined as SDO (Service Data Object) in EtherCAT, and can be processed according to an access from the outside. It is an object instantiated on the main memory 214, and the slave ID stored in the slave ID storage register 216 can be updated according to an external command. Since this writing is executed using the CoE (CANopen over EtherCAT) protocol, it is also called "CoE writing".
  • CoE CANopen over EtherCAT
  • the control device 100 writes the designated slave ID to the main memory 214 (volatile memory) of the designated slave 200 using the CoE protocol.
  • the slave ID update object 218 updates the value of the slave ID stored in the main memory 214.
  • the slave ID update object 218 According to the method using the slave ID update object 218, it is not necessary to temporarily shut off the power of the slave 200 and restart it in order to reflect the slave ID.
  • the slave 200 to be set needs to implement the slave ID update object 218.
  • the slave ID setting command 400 when executed, the slave ID is set by both the first and second methods. That is, in the slave ID setting process, the control device 100 writes the designated slave ID to both the non-volatile memory 220 and the main memory 214 (volatile memory) of the slave 200 to be set. At this time, the control device 100 outputs information indicating whether or not the designated slave 200 needs to be restarted (such as "ShouldReboot 415" shown in FIG. 12 described later) according to the success or failure of writing the designated slave ID. ..
  • first method and the second method may be executed.
  • the second method should be executed and the first method should be executed only if the execution fails (typically if the slave ID update object 218 is not implemented). May be good.
  • the slave ID setting instruction 400 and related instructions according to the present embodiment can be specified in any format, but may be specified in a function block format, for example.
  • FIG. 12 is a diagram for explaining a function block of the slave ID setting instruction 400 that can be used in the user program 132 of the control device 100 according to the present embodiment.
  • the function block of the slave ID setting instruction 400 includes, as inputs, an Execute 401, a PreviousSlaveID402, a PreviousSlavePort403, a NewSlaveIDTable404, a NuOfSlaves405, and a FailleTable406.
  • Boolean variables that are execution conditions are specified in Execute401.
  • a slave ID of a reference slave is specified in the PreviewSlaveID 402.
  • a reference slave port name is specified in the PreviewSlavePort403.
  • One or a plurality of slave IDs to be set are specified in the NewSlaveIDTable 404.
  • the number of slaves to be set is specified in NuMofSlaves405.
  • the table name for storing the slave that failed to be set is specified.
  • the function block of the slave ID setting instruction 400 includes a Done 411, a Busy 412, an Error 413, an Error ID 414, a ShortReboot 415, and a FaillereTable 416 as outputs.
  • a Boolean value indicating whether or not the slave ID setting command 400 has been normally terminated is output.
  • Busy412 a Boolean value indicating whether or not the slave ID setting command 400 is being processed is output.
  • ErrorID 414 an error value when the slave ID setting command 400 terminates abnormally is output.
  • SholdReboot415 a Boolean value indicating whether or not the slave to be set needs to be restarted is output.
  • FailureTable 416 an array in which slaves that have failed to be set is stored is output. As described above, in the slave ID setting instruction 400, the table name to which the error information indicating which slave ID setting has failed is output is specified.
  • PreviousSlaveID402, PreviousSlavePort403, NewSlaveIDTable404, and NuMofSlaves405 are set to any slave as a reference slave and for one or more unknown slaves, as described with reference to FIG. Each corresponds to a parameter for setting the slave ID.
  • the value output as the HoldReboot 415 shown in FIG. 12 determines the slave ID when the slave ID is set for the slave in which the slave ID update object 218 is not implemented, as described with reference to FIG. 11 above. Corresponds to information indicating that a reboot is required.
  • slave ID read setting an instruction for acquiring the slave ID of the unknown slave (hereinafter, also referred to as "slave ID read setting”) is provided instead of setting the slave ID of the unknown slave. May be done.
  • FIG. 13 is a diagram for explaining a function block of the slave ID read instruction 420 that can be used in the user program 132 of the control device 100 according to the present embodiment.
  • the function block of the slave ID read instruction 420 includes, as inputs, an Execute 421, a PreviousSlaveID422, a PreviousSlavePort423, and a NuMofSlaves424.
  • Boolean variables that are execution conditions are specified in Execute421.
  • a slave ID of a reference slave is specified in the PreviewSlaveID422.
  • a reference slave port name is specified in PreviewSlavePort423.
  • NuOfSlaves424 the number of slaves to be read is specified.
  • the function block of the slave ID read instruction 420 includes a Done 431, a Busy 432, an Error 433, an Error ID 434, a GetSlave IDTable 435, and an IsSlave IDTable 436 as outputs.
  • a Boolean value indicating whether or not the slave ID read instruction 420 has been normally terminated is output.
  • a Boolean value indicating whether or not the slave ID read instruction 420 is being processed is output.
  • a Boolean value indicating whether or not the slave ID read instruction 420 has abnormally terminated is output.
  • an error value when the slave ID read command 420 terminates abnormally is output.
  • GetSlaveIDTable435 an array in which the slave ID read from the slave to be read is stored is output.
  • IsSlaveIDTable436 an array in which a Boolean value indicating success or failure of acquisition of the slave ID is stored is output.
  • the slave 200 out of the plurality of slaves 200 executes the slave ID read instruction 420 designated as a reference, so that the other slave 200 is designated.
  • the process in which any of the slaves 200 can read the slave ID (identification information) as a reference corresponds to the identification information reading function.
  • the slave ID setting instruction 400 and the slave ID read instruction 420 as described above may be executed as a part of the user program 132 executed by the control device 100. That is, the user program 132 may include a code that specifies execution of the slave ID setting instruction 400 or the slave ID reading instruction 420.
  • FIG. 14 is a sequence diagram showing a processing procedure when the slave ID setting command 400 according to the present embodiment is executed from the user program 132.
  • the processing procedure shown in FIG. 14 is executed between the user program 132 executed by the processor 102 of the control device 100, the field network controller 120 that provides the function as a master by the control device 100, and the slave 200.
  • the field network controller 120 manages the actual connection state (hereinafter, also referred to as “actual configuration information”) of the instruction interface 122 that receives the command from the user program 132 and the slave 200 connected to the network 4. It has a component 124 and.
  • the slave 200 to be set to which the slave ID is set in the execution of the slave ID setting command 400 is specified at a connected position by referring to the connection states (actual configuration information) of the plurality of slaves 200.
  • the instruction execution instruction includes input information set for the slave ID setting instruction 400 shown in FIG.
  • the instruction interface 122 refers to the actual actual configuration information managed by the actual configuration management component 124, and refers to the slave of the unknown slave to be set based on the slave ID and port name of the specified reference slave. Acquire the ID (sequence SQ104).
  • the instruction interface 122 identifies the slave 200 to be set based on the slave ID acquired in the sequence SQ 104, and then writes the designated slave ID to the non-volatile memory 220 of the specified slave 200 (sequence SQ106). ). Further, the instruction interface 122 acquires the execution result (write result) of writing the slave ID to the non-volatile memory 220 (sequence SQ108), and stores the acquired write result internally (sequence SQ110).
  • the instruction interface 122 identifies the slave 200 to be set based on the slave ID acquired in the sequence SQ104, and then writes the slave ID specified in the slave ID update object 218 of the specified slave 200 (sequence). SQ112). Further, the instruction interface 122 acquires the execution result (write result) of writing the slave ID to the slave ID update object 218 (sequence SQ114), and stores the acquired write result internally (sequence SQ116).
  • the instruction interface 122 returns the instruction execution result to the user program 132 (sequence SQ118).
  • the execution result of the instruction returned to the user program 132 includes a Boolean value (ShouldReboot415) indicating whether or not the slave to be set needs to be restarted. Specifically, regardless of the success or failure of writing to the non-volatile memory 220 (sequence SQ106), if the writing to the slave ID update object 218 is successful, it is not necessary to restart the slave to be set. The value shown is returned. On the other hand, if the writing to the non-volatile memory 220 (sequence SQ106) succeeds but the writing to the slave ID update object 218 (sequence SQ112) fails, it is necessary to restart the slave to be set. The value shown is returned.
  • the control device 100 succeeds in writing the designated slave ID to the non-volatile memory 220 of the designated slave 200, but writes the designated slave ID to the main memory 214 (volatile memory). Outputs that the specified slave needs to be restarted when the writing of the specified slave ID is not successful.
  • the slave ID setting instruction 400 may be terminated abnormally.
  • FIG. 15 is a schematic diagram showing an example of actual configuration information held by the actual configuration management component 124 shown in FIG. As an example, FIG. 15 shows actual configuration information corresponding to the connection configuration shown in FIG.
  • the actual configuration management component 124 includes device information of the junction slave 200J closest to the control device 100 that functions as a master, and slaves 200-1 and 200- connected to each port of the junction slave 200J. Includes 2 device information. This information is managed in a form that reflects the connection relationship.
  • the actual configuration management component 124 can identify the slaves 200-1 and 200-2 connected to the port C of the junction slave 200J by referring to the actual configuration information.
  • FIG. 15 Note that the information embodied in FIG. 15 is for convenience of explanation and may be managed in any form.
  • the slave ID setting instruction 400 and the slave ID read instruction 420 that can be used in the user program 132 of the control device 100 according to the present embodiment sets or reads the slave ID for one or a plurality of slaves.
  • an execution failure abnormal termination
  • FIG. 16 is a schematic diagram showing an example of an abnormal termination result output by the slave ID setting command 400 according to the present embodiment.
  • FIG. 16 shows an example in which slave IDs are set for each of the four slaves 200-1 to 200-4 connected to the junction slave 200J.
  • the FailureTable 416 output from the slave ID setting command 400 includes four Boolean values indicating the success or failure of the setting for each slave 200. For example, if the setting of each slave ID for the four slaves 200-1 to 200-4 is executed without any abnormality, the array [0,0,0,0] is output.
  • the value of the position corresponding to the second slave 200-2 is changed to "1". Is output. That is, the array [0,0,0,0] is output as the FailureTable 416.
  • the control device 100 outputs information for identifying the slave 200 that has failed to set the slave ID in the slave ID setting process. More specifically, in the slave ID setting process, the control device 100 provides error information (FailureTable 416) indicating which of the one or more designated slaves 200 has failed to set the slave ID. Output.
  • the FailureTable 416 output as error information stores an array having members corresponding to one or more specified slaves 200.
  • the slave ID setting instruction 400 executed by the control device 100 outputs the abnormal end result associated with the relative position from the reference slave, so that the position of the slave in which the abnormality has occurred can be easily specified. it can. That is, in order to identify the cause when the setting or reading of the slave ID fails, information indicating the position of the slave 200 in which the setting or reading fails is output.
  • Eror 413 (FIG. 12) indicating whether or not the setting of the slave ID for one or more specified slaves 200 has failed may be further output. For example, when Error 413 has a value indicating that the setting of the slave ID has failed, a process that refers to the FailuleTable 416 may be implemented.
  • an error code indicating the reason why the setting or reading failed may be output.
  • the function block of the slave ID setting instruction 400 can output as an ErrorID 414 (see FIG. 12). That is, the slave ID setting command 400 may further output an Error ID 414 (see FIG. 12) indicating the reason why the slave ID setting for one or more designated slaves 200 has failed.
  • an error code may be output for each slave 200, and when a plurality of error codes occur, the error codes are output in descending order of priority. It may be output.
  • the function block of the slave ID setting command 400 may output information indicating the success or failure of the slave ID setting as Error 413.
  • the success / failure (success / failure) information of the command execution can be acquired, and the error code indicating the reason for failure can be acquired. You can also do it.
  • the position of the failed slave can also be specified. By using this information, when the slave ID setting or reading fails, the target slave and its cause can be easily identified.
  • control device 100 stores the contents of the command (packet) transmitted to the target slave in setting or reading the slave ID, and when any of the processes fails, the storage thereof.
  • the content of the command (packet) issued may be output.
  • control device 100 stores a log related to the slave ID setting or reading process, and when any of the processes fails, outputs the contents of the stored log. You may.
  • FIG. 17 is a diagram for explaining the contents of setup change using the slave ID setting command 400 according to the present embodiment. It is assumed that the connection configuration shown in FIG. 17 (A) is changed to the connection configuration shown in FIG. 17 (B). More specifically, when the four slaves 200-1, 200-2, 200-3, and 200-4 connected to the port X4 of the junction slave 200J are removed and reconnected to the port X5 of the junction slave 200J. Is assumed.
  • FIG. 18 is a diagram showing a main part of the user program 132 corresponding to the setup change shown in FIG. With reference to FIG. 18, the user program 132 includes seven lines of code from line numbers 0 to 6.
  • the instruction EC_ChangeEnableSetting is an instruction for switching between valid and invalid of the slave.
  • the slave enable / disable switching instructions 450, 451 and 452, 453 described in line numbers 0, 1, 2, and 3 are commands for validating the target slave, and are described in line number 6.
  • the slave enable / disable switching instruction 454, 455, 456, 457 is an instruction for invalidating the target slave.
  • the control device 100 invalidates some or all of the slaves included in the definition by the configuration information 134 by executing the instruction to invalidate these target slaves.
  • the command ResetECError is a command for canceling the abnormality of the slave.
  • the slave error release instruction 460 described in line number 5 corresponds to the instruction ResetECError.
  • FIG. 19 is a diagram for explaining a change in the connection state corresponding to the setup change shown in FIG.
  • FIG. 20 is a diagram for explaining changes in the configuration information 134 corresponding to the setup change shown in FIG.
  • the setup change shown in FIG. 17 is performed according to the following steps 1 to 7.
  • it means that it is the value of the slave ID, it is described by adding "#" to the number.
  • (Procedure 1) In the preparatory phase, as shown in FIG. 19A, four slaves 200-1, 200-2, 200-3, and 200-4 are connected to the port X4 of the junction slave 200J. Then, "3", "4", "5", and “6" are set as slave IDs from the support device 300 for the slaves 200-1, 200-2, 200-3, and 200-4.
  • the support device 300 transfers the configuration information 134 shown in FIG. 20A to the control device 100 that functions as a master.
  • slaves # 3 to # 10 are all set to "disabled”.
  • Process 2 At the start of operation, the power of the control device 100, the junction slave 200J, and the slaves 200-1, 200-2, 200-3, 200-4 is turned on.
  • the slave enable / disable switching instruction (not shown in FIG. 18) of the user program 132, slaves # 3 to # 6 of the configuration information 134 are enabled (FIG. 18). 20 (B)).
  • the operation with the connection configuration shown in FIG. 17 (A) is started.
  • the slave ID setting instruction 400 is executed in order to start the operation in the connected state shown in FIG. 19C (fourth line of the user program 132 shown in FIG. 18).
  • the slaves 200-1, 200-2, 200-3, and 200-4 connected to the port X4 are specified with reference to the junction slave 200J, and then the slave ID is set to "7". , "8", "9", "10" are set.
  • the slave error release instruction 460 is executed (the fifth line of the user program 132 shown in FIG. 18). Further, by executing the slave enable / disable switching instruction 454, 455, 456, 457 (lines 6 to 9 of the user program 132 shown in FIG. 18), slaves # 7 to # 10 of the configuration information 134 are valid. It is programmed (see FIG. 20 (C)). As a result, the operation with the connection configuration shown in FIG. 17B is started.
  • the setup change can be realized by using the user program 132.
  • FIG. 21 is a diagram showing an example of a user program 132 for prompting the restart of the slave 200 using the slave ID setting command 400 according to the present embodiment.
  • the value of the HoldReboot 415 from the slave ID setting instruction 400 is output to a variable (boolean value) called “ShouldReboot”.
  • the "ShouldReboot” determines the value of a variable (boolean value) called the variable "RebootRampOn”. That is, when the variable "ShouldReboot” is set to "true", the variable “RebootRampOn” also becomes “true”.
  • each slave 200 since the necessity of restarting each slave 200 can be presented to the operator, it is possible to realize a setup change in consideration of safety. Further, when a plurality of slaves 200 are present, for example, the order of restarting (returning the power) can be presented to the operator.
  • the slave ID setting instruction 400 sets the slave IDs for each of the plurality of slaves 200, and if the execution for any of the slaves 200 fails, the failed slave 200 Outputs information that can identify the position. It is also possible to create a user program 132 for presenting information that can specify such a position to the operator.
  • FIG. 22 is a diagram showing an example of a user program 132 for realizing information presentation when the execution of the slave ID setting instruction 400 according to the present embodiment fails.
  • the user program 132 shown in FIG. 22 is associated with a display device 500, which is a user interface device for operators.
  • the value (array) of the FailureTable 416 from the slave ID setting command 400 is output to an array consisting of four members called "fileAdrs [4]".
  • the slave ID setting instruction 400 is defined to set slave IDs for the four slaves 200, and the value indicating the success or failure of the settings for the four slaves 200 is the variable "failAdrs [". 4] ”is stored.
  • each member can be associated with the display object indicating each slave 200 on the display device 500.
  • the display mode for example, color
  • the display mode for example, color
  • the display device 500 visually presents the position of the slave 200 in which the slave ID setting has failed among one or more specified slaves 200, based on the value (array) stored in the FailleTable 416. As a result, the operator can grasp at a glance which slave the abnormality has occurred.
  • the position of the slave where some abnormality occurred can be specified, and the cause of the abnormality can be easily determined.
  • the present embodiment as described above includes the following technical ideas.
  • the control system (1) A control device (100) that functions as a master, The control device is provided with a plurality of slaves (200) connected to a network. Each of the plurality of slaves has identification information (224). The control device gives the specified identification information to the other designated slaves by executing the first instruction (400) designated as the reference by any one of the plurality of slaves. A control system including identification information setting means (102, 122) to be set.
  • the control device further includes a management means (124) for managing the connection state of the plurality of slaves.
  • Each of the plurality of slaves includes a non-volatile memory (220) for holding the identification information and a volatile memory (214) for holding the set identification information.
  • the control system according to any one of configurations 1 to 4, wherein the identification information setting means writes designated identification information in both the non-volatile memory and the volatile memory of the other slave.
  • the control system according to any one of configurations 1 to 5, wherein the first instruction is executed as a part of a user program (130) executed by the control device.
  • the identification information setting means outputs information (416) for identifying a slave who has failed to set the identification information.
  • the control device reads out the identification information set for the other designated slave by executing the second instruction (420) designated as the reference by any one of the plurality of slaves.
  • the control system according to any one of configurations 1 to 7, further comprising information reading means (102, 122).
  • the control device has configuration information (134) that defines a connection configuration of the plurality of slaves. By executing the third instruction (450,451,452,453,454,455,456,457), the control device invalidates some or all of the slaves included in the definition by the configuration information.
  • the control system according to any one of configurations 1 to 8, further comprising invalidation means (102, 122).
  • a control device (100) that functions as a master.
  • a controller (120) for connecting to a network with a plurality of slaves (200) is provided, and each of the plurality of slaves has identification information (224). Identification information setting that sets the specified identification information for the other designated slaves by executing the first instruction (400) designated as the reference by any of the plurality of slaves.
  • a control device comprising means (102, 122).
  • an arbitrary slave ID (or node address) can be set for any unknown slave by using the slave ID setting instruction executed on the user program. Therefore, even in a situation where different slave IDs must be set for the same slave due to setup changes or the like, the necessary settings can be realized only by the user program without using a support device or the like.
  • the slave ID setting command according to the present embodiment can set an arbitrary slave ID after identifying an arbitrary unknown slave with reference to an arbitrary slave having a valid slave ID.
  • the slave ID setting command according to the present embodiment can collectively set the slave ID for each of a plurality of slaves, the time required for resetting or changing the slave ID can be shortened.
  • the slave ID setting command according to the present embodiment can distinguish between a slave that can immediately reflect the set slave ID and a slave that needs to be restarted to reflect the slave ID. Then, for the slave that needs to be restarted, the information is output from the slave ID setting command. Therefore, it is possible to easily provide operation support to the operator in charge of setup change and the like.
  • the slave ID setting command according to the present embodiment outputs information for identifying the position of the slave that failed to set the slave ID. Therefore, troubleshooting can be facilitated. Further, since the slave ID setting command according to the present embodiment outputs an error code indicating the reason why the slave ID setting has failed, it is possible to facilitate troubleshooting together with the position of the slave whose setting has failed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Small-Scale Networks (AREA)

Abstract

制御システムは、マスタとして機能する制御装置と、制御装置とネットワーク接続された複数のスレーブとを含む。複数のスレーブの各々は識別情報を有している。制御装置は、複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段を含む。

Description

制御システムおよび制御装置
 本発明は、ネットワーク接続されたスレーブを含む制御システムおよびその制御システムに用いられる制御装置に関する。
 FA(ファクトリオートメーション)分野においては、制御装置と、当該制御装置にネットワーク接続された1または複数のスレーブとからなる制御システムが普及している。スレーブとしては、入出力装置やロボット制御や視覚センサといった任意の処理機能を提供する装置などが想定される。通常、制御装置はマスタとして機能する。
 制御装置は、各スレーブとの間でデータを遣り取りするため、各スレーブを特定する必要がある。スレーブを特定するための情報としては、スレーブID(識別情報)、ネットワークID(識別情報)、ネットワークアドレス、ノードアドレスと称される。
 制御対象に応じて、スレーブの数および接続構成は適宜決定され、また、事後的に追加または変更されることもある。このような場合、各スレーブを特定するための情報についても、適宜更新する必要がある。
 例えば、特開2015-176369号公報(特許文献1)は、サポート装置が提供するグループを設定するためのユーザインターフェイス画面において、各デバイスについて、グループ名、デバイス名、ネットワークアドレスおよびノードアドレスを任意に設定できる構成を開示する。
特開2015-176369号公報
 例えば、多品種少量生産の製造ラインでは、段取り替えと呼ばれる装置の組み換えが頻繁に行われることがある。このような段取り替えが発生した場合には、スレーブの識別情報を再設定あるいは変更する必要がある。このような識別情報の再設定あるいは変更を容易に実現するための構成が要望されている。
 本発明のある局面に従う制御システムは、マスタとして機能する制御装置と、制御装置とネットワーク接続された複数のスレーブとを含む。複数のスレーブの各々は識別情報を有している。制御装置は、複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段を含む。
 この局面によれば、段取り替えなどにより制御システムの構成が変更された場合であっても、識別情報の再設定あるいは変更を容易に行うことができる。
 制御装置は、複数のスレーブの接続状態を管理する管理手段をさらに含んでいてもよい。識別情報設定手段により識別情報が設定される他のスレーブは、複数のスレーブの接続状態を参照することで、接続されている位置が特定されてもよい。この構成によれば、実際の接続構成に基づいて、設定対象のスレーブの接続されている位置を決定できる。
 第1の命令は、他のスレーブが接続されるポートの指定を含んでいてもよい。この構成によれば、基準となるスレーブに実際に接続されているポートを指定すればよいので、容易に指定できる。
 第1の命令は、複数の他のスレーブに対してそれぞれ識別情報を指定可能であってもよい。この構成によれば、複数のスレーブに対する識別情報の設定に要する時間を短縮できる。
 複数のスレーブの各々は、識別情報を保持するための不揮発性メモリと、設定されている識別情報を保持する揮発性メモリとを含む。識別情報設定手段は、他のスレーブの不揮発性メモリおよび揮発性メモリの両方に、指定された識別情報を書き込むようにしてもよい。この構成によれば、スレーブが有している不揮発性メモリおよび揮発性メモリの内容を更新できる。
 第1の命令は、制御装置で実行されるユーザプログラムの一部として実行されてもよい。この構成によれば、サポート装置などを用いることなく、スレーブに対して識別情報を設定できる。
 識別情報設定手段は、識別情報の設定に失敗したスレーブを特定する情報を出力するようにしてもよい。この構成によれば、識別情報の設定の失敗に係るトラブルシュートを容易化できる。
 制御装置は、複数のスレーブのうちいずれかのスレーブが基準として指定された第2の命令を実行することで、指定された他のスレーブに設定されている識別情報を読み出す識別情報読出手段をさらに含んでいてもよい。この構成によれば、識別情報が不明な任意のスレーブから識別情報を読み出すことができる。
 制御装置は、複数のスレーブの接続構成を定義する構成情報を有していてもよい。制御装置は、第3の命令を実行することで、構成情報による定義に含まれる一部または全部のスレーブを無効化する無効化手段をさらに含んでいてもよい。この構成によれば、構成情報と実際の接続構成とが一致しない場合であっても、異常などを発生させることなく、処理を継続させることができる。
 本発明の別の局面に従えば、マスタとして機能する制御装置が提供される。制御装置は、複数のスレーブとネットワーク接続するためのコントローラを含む。複数のスレーブの各々は識別情報を有している。制御装置は、複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段を含む。
 本発明によれば、段取り替えなどにより制御システムの構成が変更された場合であっても、識別情報の再設定あるいは変更を容易に行うことができる。
本実施の形態に係る制御システムの全体構成例を示す模式図である。 本実施の形態に係る背景技術を説明するための模式図である。 図2に示される制御装置が保持する構成情報の一例を示す図である。 図2に示される段取り替えに応じた構成情報の変化を説明するための図である。 本実施の形態に係る制御システムを構成する制御装置のハードウェア構成例を示す模式図である。 本実施の形態に係る制御システムを構成するスレーブのハードウェア構成例を示す模式図である。 本実施の形態に係る制御システムを構成するサポート装置のハードウェア構成例を示す模式図である。 段取り替えにおいて生じるスレーブIDの変化を説明するための図である。 ポジションアドレスを用いたスレーブIDの設定を説明するための図である。 本実施の形態に係るスレーブID設定命令の一例を説明するための図である。 本実施の形態に係る制御システムを構成するスレーブにおけるスレーブIDの設定処理を説明するための模式図である。 本実施の形態に係る制御装置のユーザプログラムで利用可能なスレーブID設定命令のファンクションブロックを説明するための図である。 本実施の形態に係る制御装置のユーザプログラムで利用可能なスレーブID読出命令のファンクションブロックを説明するための図である。 本実施の形態に係るスレーブID設定命令がユーザプログラムから実行された場合の処理手順を示すシーケンス図である。 図14に示す実構成管理コンポーネントが保持している実構成情報の一例を示す模式図である。 本実施の形態に係るスレーブID設定命令が出力する異常終了結果の一例を示す模式図である。 本実施の形態に係るスレーブID設定命令を用いた段取り替えの内容を説明するための図である。 図17に示す段取り替えに対応するユーザプログラムの要部を示す図である。 図17に示す段取り替え対応する接続状態の変化を説明するための図である。 図17に示す段取り替え対応する構成情報の変化を説明するための図である。 本実施の形態に従うスレーブID設定命令を用いたスレーブの再起動を促すためのユーザプログラムの一例を示す図である。 本実施の形態に従うスレーブID設定命令の実行が失敗したときの情報提示を実現するためのユーザプログラムの一例を示す図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。
 <A.適用例>
 まず、図1を参照して、本発明が適用される場面の一例について説明する。
 図1は、本実施の形態に係る制御システム1の全体構成例を示す模式図である。図1を参照して、制御システム1は、主たるコンポーネントとして、マスタとして機能する制御装置100と、制御装置100とネットワーク接続された1または複数のスレーブ200-1,200-2,・・・(以下、「スレーブ200」とも総称する。)とを含む。
 制御装置100と1または複数のスレーブ200とを接続するネットワークには、典型的には、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などの産業用ネットワークを採用することが好ましい。以下の説明においては、典型例として、EtherCATを採用した場合について説明するが、他の規格あるいはプロトコルを採用してもよい。
 制御システム1において、スレーブ200の各々は、マスタとして機能する制御装置100から特定可能な識別情報を有している。以下では、このような識別情報として「スレーブID」を用いる(詳細については後述する)場合について説明する。但し、「スレーブID」に限定されることなく、任意の識別情報を用いることができる。
 本実施の形態に従う制御装置は、任意のスレーブ200に設定されているスレーブID(識別情報)を任意に再設定あるいは変更(以下、単に「設定」とも総称する。)できる。このようなスレーブIDの設定を実現するために、制御装置100は、複数のスレーブ200のうちいずれかのスレーブ200を基準として指定し、指定されたスレーブ200に基づいて設定対象のスレーブ200を特定する。そして、制御装置100は、特定されたスレーブ200に対して、指定されたスレーブIDを設定する。このような識別情報設定処理を実装することで、段取り替えなどにより制御システムの構成が変更された場合であっても、識別情報の再設定あるいは変更を容易に行うことができる。
 以下、本明細書において用いられる用語について先に説明する。
 本明細書において、「マスタ」は、注目しているネットワークにおけるデータ伝送を管理する主体または機能を総称する用語である。「マスタ」は、データ伝送を管理する装置(デバイス)自体を含み得る。
 本明細書において、「スレーブ」は、マスタと対になる用語であり、注目しているネットワークにおいて、当該ネットワークのマスタの管理下でデータ伝送を行う主体または機能を総称する用語である。「スレーブ」は、データ伝送を行う装置(デバイス)自体を含み得る。
 本明細書において、「マスタ」および「スレーブ」との用語は、注目しているネットワークにおけるデータ伝送に関する機能差を区別するための用語であり、データ伝送以外の機能や関係性については特に限定されるものではない。
 本明細書において、「構成情報」は、制御装置あるいは別のデバイスが保持する構成などの定義を示す情報を意味する。
 本明細書において、「ポジションアドレス」(Position Address)は、ネットワーク上のトポロジに応じて予め定められた規則に従って決定されるアドレスを意味する。例えば、マスタから近い順に、「0」,「0xffff」,「0xfffe」,・・と割り当てられてもよい。
 本明細書において、「スレーブID」(Slave ID)は、マスタが構成情報と対比することでデバイス間の取り違えを防止するために、各スレーブに対して付与する識別情報を意味する。「スレーブID」は、マスタによって任意に設定され、これによって正しい位置にスレーブが接続されているか否かが判断される。「スレーブID」は、「ノードアドレス」とも称される。「ノードアドレス」は、スレーブに配置されているロータリースイッチなどによって設定されることもあるが、以下では、「スレーブID」はマスタ側から再設定あるいは変更可能であるとしてされるとして説明する。
 本明細書において、「未知スレーブ」は、実際の構成がマスタの構成情報の対応する設定とは一致していないスレーブを意味する。すなわち、「未知スレーブ」は、構成情報によって定義される本来の位置とは異なった位置に配置されているスレーブを意味する。
 <B.背景技術およびニーズ>
 次に、本実施の形態に係る背景技術およびニーズについて概略する。
 例えば、食品、化粧品、医薬品などの製造現場では、多品種少量生産となっていることが多い。生産する製品に応じて、製品の形状、製品に付与するラベルの種類、製品に付与するラベルの位置などが異なるため、製品毎に製造ラインの組み替え(いわゆる、「段取り替え」)が行われることも多い。このような製造現場においては、汎用的な製造モジュールを用意しておき、これらの製造モジュールのレイアウトや位置などを適宜変更することで、段取り替えを実現する。
 図2は、本実施の形態に係る背景技術を説明するための模式図である。図2には、2つの制御装置100-1,100-2がそれぞれ製造ラインを制御する構成例を示す。図2(A)には、コンベア20に製造モジュール30が配置され、コンベア22に製造モジュール40が配置されている例を示す。図2(A)に示す構成例では、制御装置100-1が製造モジュール30を制御し、制御装置100-2が製造モジュール40を制御する。
 一方、図2(B)には、製造モジュール30がコンベア20からコンベア22に移された構成例を示す。図2(B)に示す構成例では、制御装置100-2が製造モジュール30および製造モジュール40を制御する。
 図2に示すような段取り替えが生じる場合には、制御装置100の制御対象および接続されるデバイスは変化し得る。以下、このような段取り替えへの対応について説明する。
 図3は、図2に示される制御装置100が保持する構成情報の一例を示す図である。図4は、図2に示される段取り替えに応じた構成情報の変化を説明するための図である。
 制御装置100-1および100-2の各々は、図3に示すような、複数のスレーブ200の接続構成を定義する構成情報(図5に示す構成情報134に対応)を有している。より具体的には、図3に示す構成情報は、制御装置100にジャンクションスレーブ200Jが接続されており、ジャンクションスレーブ200Jの一つのポートには、製造モジュール30を構成するスレーブが接続されており、別のポートには、製造モジュール40を構成するスレーブが接続されている。
 図4(A)は、図2(A)に示される構成例に対応する制御装置100-1および100-2の設定例を示し、図4(B)は、図2(B)に示される構成例に対応する制御装置100-1および100-2の設定例を示す。
 図4(A)および(B)に示すように、制御装置100-1および100-2の各々においては、実際には存在しない製造モジュールに対応するスレーブの設定が無効化される。より具体的には、図4(A)の場合には、制御装置100-1の製造モジュール40に関する設定が無効化されるとともに、制御装置100-2の製造モジュール30に関する設定が無効化される。また、図4(B)の場合には、制御装置100-1の製造モジュール30および40に関する設定が無効化される。
 このように、制御装置100の構成情報には、接続され得る最大の構成に対応する情報を含めておき、実際に接続される構成に応じて、不要なスレーブについての設定を無効化することで、様々な段取り替えに対応できる。
 本実施の形態に係る制御装置100は、上述したような構成情報の一部または全部の無効化に加えて、スレーブIDの再設定や変更が可能になっている。このようなスレーブIDの再設定や変更を実現することで、段取り替えに対する適応性をより高めることができる。
 <C.ハードウェア構成例>
 本実施の形態に係る制御システムを構成する主たる装置のハードウェア構成例について説明する。
 (c1:制御装置100)
 図5は、本実施の形態に係る制御システムを構成する制御装置100のハードウェア構成例を示す模式図である。図5を参照して、制御装置100は、プロセッサ102と、チップセット104と、メインメモリ106と、ストレージ108と、ネットワークコントローラ110と、USB(Universal Serial Bus)コントローラ112と、メモリカードインターフェイス114と、内部バスコントローラ118と、フィールドネットワークコントローラ120と、カウンタ126と、RTC(Real Time Clock)128とを含む。
 プロセッサ102は、制御演算などを実行する演算処理部に相当し、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)などで構成される。具体的には、プロセッサ102は、ストレージ108に格納されたプログラム(一例として、システムプログラム130およびユーザプログラム132)を読み出して、メインメモリ106に展開して実行することで、制御対象に応じた制御、および、後述するような各種処理を実現する。
 メインメモリ106は、例えば、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性メモリなどで構成される。ストレージ108は、例えば、SSD(Solid State Drive)やHDD(Hard Disk Drive)などの不揮発性メモリなどで構成される。
 チップセット104は、プロセッサ102と各デバイスを制御することで、制御装置100全体としての処理を実現する。
 ストレージ108には、基本的な機能を実現するためのシステムプログラム130に加えて、設備や機械などの制御対象に応じて作成されるユーザプログラム132が格納される。
 ネットワークコントローラ110は、情報系ネットワークを介して、ゲートウェイやデータベースサーバといった任意の情報処理装置との間でデータを遣り取りする。USBコントローラ112は、USB接続を介して、サポート装置300との間でデータを遣り取りする。
 メモリカードインターフェイス114は、メモリカード116を着脱可能に構成されており、メモリカード116に対してデータを書き込み、メモリカード116から各種データを読み出すことが可能になっている。
 カウンタ126は、制御装置100で実行される各種プログラムの実行タイミングを管理するための時刻基準として用いられる。カウンタ126は、プロセッサ102を駆動するシステムバス上に配置された、高精度イベントタイマー(HPET:High Precision Event Timer)などを用いて実装してもよいし、あるいは、ASIC(Application Specific Integrated Circuit)やFPGA(Field-Programmable Gate Array)などの専用回路を用いて実装してもよい。
 RTC128は、計時機能を有する一種のカウンタであり、現在時刻をプロセッサ102などへ提供する。
 内部バスコントローラ118は、内部バス6を介して1または複数の機能ユニット150-1,150-2,・・・(以下、「機能ユニット150」とも総称する。)と制御装置100とを電気的に接続するための通信インターフェイスに相当する。内部バスコントローラ118は、内部バス6を介して定周期通信を行うためのマスタとして機能する。
 機能ユニット150は、制御装置100に接続されて、制御対象との間で各種の信号を遣り取りする装置を総称する。機能ユニット150は、IOユニットと、通信ユニットと、PID制御やモーション制御といった特殊機能を実装したコントローラユニットとを含み得る。IOユニットは、例えば、制御対象からのデジタル入力信号を受取るDI(Digital Input)機能、制御対象に対してデジタル出力信号を送出するDO(Digital Output)機能、制御対象からのアナログ入力信号を受取るAI(Analog Input)機能、制御対象に対してアナログ出力信号を送出するAO(Analog Output)機能のうち1または複数の機能を有している。
 フィールドネットワークコントローラ120は、ネットワーク4を介して1または複数のスレーブ200-1,200-2,・・・(スレーブ200)と制御装置100とを電気的に接続するための通信インターフェイスに相当する。このように、フィールドネットワークコントローラ120は、複数のスレーブ200と接続するためのコントローラであり、ネットワーク4を介して定周期通信を行うためのマスタとして機能する。
 図5には、プロセッサ102がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。あるいは、制御装置100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 また、制御装置100に表示装置やサポート装置などの機能を統合した構成を採用してもよい。
 (c2:スレーブ200)
 図6は、本実施の形態に係る制御システムを構成するスレーブ200のハードウェア構成例を示す模式図である。図6を参照して、スレーブ200は、フィールドネットワークコントローラ202と、メインコントローラ210と、機能回路230とを含む。
 フィールドネットワークコントローラ202は、ネットワーク4を介して制御装置100(マスタ)とスレーブ200とを電気的に接続するための通信インターフェイスに相当する。フィールドネットワークコントローラ202は、マスタの管理下でデータを遣り取りするための通信スレーブとして機能する。
 メインコントローラ210は、スレーブ200の主たる制御を担当する回路であり、例えば、プロセッサ212と、メインメモリ214と、不揮発性メモリ220とを含む。
 不揮発性メモリ220には、プロセッサ212により実行されるファームウェア226と、スレーブID224とが格納されている。
 機能回路230は、スレーブ200の固有機能を提供する。例えば、スレーブ200がモータドライブ装置である場合には、機能回路230は、インバータ回路や制御回路などを含む。また、スレーブ200がリモートIO装置である場合には、接続される機能ユニットとの間で内部バスを介してデータを遣り取りするための通信インターフェイスなどを含む。
 図6には、プロセッサ212を含むメインコントローラ210を示すが、メインコントローラ210が提供する機能の全部または一部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 (c3:サポート装置300)
 図7は、本実施の形態に係る制御システムを構成するサポート装置300のハードウェア構成例を示す模式図である。サポート装置300は、一例として、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコン)を用いてプログラムを実行することで実現される。
 図7を参照して、サポート装置300は、プロセッサ302と、メインメモリ304と、ストレージ306と、入力部308と、表示部310と、光学ドライブ312と、USBコントローラ316とを含む。これらのコンポーネントは、プロセッサバス318を介して接続されている。
 プロセッサ302は、CPUやGPUなどで構成され、ストレージ306に格納されたプログラム(一例として、OS320およびサポートプログラム326)を読み出して、メインメモリ304に展開して実行することで、後述するような各種処理を実現する。
 メインメモリ304は、例えば、DRAMやSRAMなどの揮発性メモリなどで構成される。ストレージ306は、例えば、HDDやSSDなどの不揮発性メモリなどで構成される。
 ストレージ306には、基本的な機能を実現するためのOS320に加えて、サポート装置300としての機能を提供するためのサポートプログラム326が格納される。さらに、ストレージ306には、構成情報134が格納される。これらの情報の取得および利用については、後述する。
 入力部308は、キーボードやマウスなどで構成され、ユーザ操作を受け付ける。表示部310は、ディスプレイ、各種インジケータ、プリンタなどで構成され、プロセッサ302からの処理結果などを出力する。
 USBコントローラ316は、USB接続を介して、制御装置100などとの間のデータの遣り取りを制御する。
 サポート装置300は、光学ドライブ312を有しており、コンピュータ読み出し可能なプログラムを非一過的に格納する記録媒体314(例えば、DVD(Digital Versatile Disc)などの光学記録媒体)から、その中に格納されたプログラムが読み出されてストレージ306などにインストールされる。
 サポート装置300で実行されるプログラムは、コンピュータ読み出し可能な記録媒体314を介してインストールされてもよいが、ネットワーク上のサーバ装置などからダウンロードする形でインストールするようにしてもよい。また、本実施の形態に係るサポート装置300が提供する機能は、OSが提供するモジュールの一部を利用する形で実現される場合もある。
 図7には、プロセッサ302がプログラムを実行することで、サポート装置300として必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 <D.スレーブIDについての課題および解決手段>
 次に、スレーブIDについての課題および解決手段について説明する。
 図8は、段取り替えにおいて生じるスレーブIDの変化を説明するための図である。図8(A)においては、マスタである制御装置100には、ジャンクションスレーブ200Jを介して、製造モジュール30(スレーブ200-1および200-2)、ならびに、製造モジュール40(スレーブ200-3および200-4)が接続されている例を示す。図8(A)に示す接続構成において、スレーブ200-1および200-2には、スレーブIDとして「1」および「2」がそれぞれ設定されている。また、スレーブ200-3および200-4には、スレーブIDとして「3」および「4」がそれぞれ設定されている。
 段取り替えによって、図8(A)に示す接続構成から図8(B)に示す接続構成に変化したとする。このとき、製造モジュール30(スレーブ200-1および200-2)は、ジャンクションスレーブ200Jの当初接続されていたポートとは異なるポートに接続される。制御装置100から見ると、図8(A)に示す接続構成における設定構成とは異なった構成となっている。すなわち、スレーブIDとして「1」および「2」がそれぞれ設定されているスレーブ200-1および200-2は、マスタである制御装置100の構成情報134に規定されている位置とは異なった位置に接続されていることになる。
 その結果、図8(B)に示す接続構成において、スレーブ200-1および200-2は「未知スレーブ」となる。
 このような「未知スレーブ」になったスレーブに対しては、スレーブIDを再設定あるいは変更する必要がある。しかしながら、このようなスレーブIDの再設定あるいは変更には、以下のような課題が想定される。
 (1)ユーザプログラム132からの参照不可
 マスタである制御装置100で実行されるユーザプログラム132においては、構成情報134と実際の構成とが一致しているスレーブ200に設定されているスレーブIDを参照可能になっている。すなわち、ユーザプログラム132は、未知スレーブのスレーブIDを参照および指定できない。その結果、ユーザプログラム132では、対象となる未知スレーブを特定できないので、未知スレーブのスレーブIDを再設定あるいは変更することはできない。
 (2)ポジションアドレスの不便性
 上述したように、ユーザプログラム132においては未知スレーブのスレーブIDを参照および指定できないので、未知スレーブを特定するためには、接続されている位置(すなわち、ポジションアドレス)を用いる必要がある。
 図9は、ポジションアドレスを用いたスレーブIDの設定を説明するための図である。図9(A)においては、マスタである制御装置100には、ジャンクションスレーブ200Jを介して、製造モジュール30(スレーブ200-1および200-2)、ならびに、製造モジュール40(スレーブ200-3および200-4)が接続されている例を示す。
 段取り替えによって、図9(A)に示す接続構成から図9(B)に示す接続構成に変化したとする。このとき、製造モジュール30(スレーブ200-1および200-2)は、ジャンクションスレーブ200Jの当初接続されていたポートとは異なるポートに接続される。さらに、製造モジュール30(スレーブ200-1および200-2)が接続されていたジャンクションスレーブ200Jのポートには、さらに別の製造モジュール50(スレーブ200-5および200-6)が接続される。
 図9に示すように、一例として、特定のポジションアドレスにあるスレーブ200に対して、任意のスレーブIDを設定するために、以下のような命令が用意されている。
  SlaveIDAddress_set([設定対象のスレーブのポジションアドレス],[設定すべきスレーブID])
 このようなスレーブIDを設定する命令を実行する場合には、各スレーブ200の接続位置を把握して、適切なポジションアドレスを指定する必要がある。しかしながら、このようなポジションアドレスを適切に把握するためには十分な知識が必要である。このような知識が不足していると、スレーブ200に対して意図しないスレーブIDを設定してしまう可能性もある。
 上述したような課題に対して、本実施の形態においては、ユーザプログラム132に含まれる命令を用いて、任意のスレーブ200に対して、容易な方法で任意のスレーブIDを設定できる方法を提供する。
 <E.ユーザプログラム132でスレーブIDの設定>
 本実施の形態に係る制御装置100においては、ユーザプログラム132において実行可能な、スレーブIDを再設定あるいは変更するための命令(以下、「スレーブID設定命令」とも称す。)が提供される。このようなスレーブID設定命令を用いることで、各スレーブ200に対してスレーブIDを設定する際に、サポート装置300などを用いる必要はない。さらに、ユーザプログラム132の一部として実行されるので、例えば、ユーザが表示装置を操作することをトリガとして、段取り替えおよびスレーブIDの設定を並行して行うこともできる。
 上述したように、ユーザプログラム132では、未知スレーブのスレーブIDを特定できないので、スレーブID設定命令においては、未知スレーブの近傍に存在し、スレーブIDを取得できているスレーブを基準として、未知スレーブを特定する。そして、その特定した未知スレーブに対して、任意のスレーブIDを設定する。
 図10は、本実施の形態に係るスレーブID設定命令の一例を説明するための図である。図10には、ジャンクションスレーブ200JのportCに接続されている製造モジュール30(スレーブ200-1および200-2)に対してスレーブIDを設定する例を示す。
 図10を参照して、スレーブID設定命令400は、有効なスレーブIDを有しているジャンクションスレーブ200Jとして、未知スレーブであるスレーブ200-1および200-2に対して、スレーブIDをそれぞれ設定する。具体的には、スレーブID設定命令400(EC_SetSlaveSlaveID)は、以下のような形式で規定される。
  EC_SetSlaveSlaveID([基準となるスレーブのスレーブID],[ポート名],[設定されるスレーブID],[対象スレーブ数])
 図10に示す例では、命令EC_SetSlaveSlaveIDに対して、引数として、(100,portC,[5,6],2)が指定されている。第1引数である「100」は、基準となるスレーブのスレーブIDを示すものであり、図10に示す例では、ジャンクションスレーブ200JのスレーブIDが格納される。第2引数である「portC」は、スレーブIDを設定する対象であるスレーブ200-1および200-2が接続されているジャンクションスレーブ200Jのポート名を指定するものである。第3引数である「[5,6]」は、対象のスレーブ200-1および200-2に対して設定するスレーブIDの値を示す。第4引数である「2」は、設定対象のスレーブ200-1および200-2の数を示す。
 このように、本実施の形態に係る制御装置100は、複数のスレーブ200のうちいずれかのスレーブ200が基準として指定されたスレーブID設定命令400を実行することで、指定された他のスレーブ200に対して、指定されたスレーブID(識別情報)を設定する。このようないずれかのスレーブ200が基準としてスレーブID(識別情報)を設定できる処理が識別情報設定機能に相当する。
 スレーブIDの設定対象のスレーブ200を特定するために、スレーブID設定命令400は、当該スレーブ200が接続されるポートの指定(EC_SetSlaveSlaveIDの[ポート名]の引数)を含んでいてもよい。あるいは、ポートの指定に代えて、基準となるスレーブ200に接続されているネットワークを特定できる情報であれば、どのような情報を用いてもよい。
 本実施の形態に係る制御装置100においては、任意の未知スレーブに対してスレーブIDの設定を行う場合に、ユーザに対して、当該未知スレーブのポジションアドレスを意識させることがない。その結果、ユーザは、段取り替え等に伴ってスレーブIDの設定を行わなければならない場合に、ユーザプログラム132を容易に作成できる。
 また、本実施の形態に係る制御装置100において、スレーブID設定命令400は、複数の設定対象のスレーブ200に対してそれぞれスレーブIDを指定可能である。すなわち、本実施の形態に係る制御装置100は、スレーブID設定命令400を実行することで、1つ以上の指定されたスレーブ200に対して、それぞれ指定されたスレーブID(識別情報)を設定することもできる。
 このような構成を採用することで、複数のスレーブ200に対して一括してスレーブIDを設定できるので、スレーブIDの設定に要する時間を短縮できる。
 なお、図10には、説明の便宜上、2つのスレーブ200に対してスレーブIDを設定するスレーブID設定命令400の例を示すが、これに限らず、1つのスレーブ200に対してスレーブIDを設定することもできるし、より多くのスレーブ200に対してスレーブIDを設定することもできる。
 また、図10には、製造モジュール30(スレーブ200-1および200-2)と直接接続される、すなわち設定対象のスレーブ200と直接接続されたスレーブを基準となるスレーブに設定したが、これに限らない。例えば、有効なスレーブIDを有している任意のスレーブを基準として、当該基準とされたスレーブからの経路(パスやホップ数)により任意の未知スレーブを特定して、スレーブIDを設定することもできる。なお、基準となるスレーブは、設定対象のスレーブ200よりマスタ側に位置していることが好ましい。
 さらに、スレーブID設定命令400は、任意の表現形式で規定できる。例えば、後述するようなファンクションブロック形式で規定してもよい(詳細については、後述する)。
 <F.スレーブにおけるスレーブIDの設定処理>
 次に、スレーブ200におけるスレーブIDの設定処理について説明する。
 図11は、本実施の形態に係る制御システムを構成するスレーブ200におけるスレーブIDの設定処理を説明するための模式図である。図11を参照して、スレーブ200は、不揮発性メモリ220にスレーブID224を格納している。また、スレーブ200の動作中においては、メインメモリ214上にスレーブID格納レジスタ216が用意される。スレーブID格納レジスタ216にもスレーブIDが書き込まれている。
 図11に示すように、スレーブ200は、スレーブID(識別情報)を保持するための不揮発性メモリ220と、設定されているスレーブID(識別情報)を保持する揮発性メモリであるメインメモリ214とを有している。
 本実施の形態においては、スレーブID格納レジスタ216へのスレーブIDの書き込み方法として2種類が用意されている。
 第1番目の方法は、マスタからスレーブ200の不揮発性メモリ220内の内容を書き換える方法である。不揮発性メモリ220は、外部からのアクセスを受け入れ可能な領域を有しており、その領域内にスレーブID224が格納されている。なお、不揮発性メモリ220は、EEPROMとして実装されてもよい。マスタからのアクセスによって、不揮発性メモリ220にスレーブIDが書き込まれる(シーケンスSQ1)。この書き込みは、SII(Slave Information Interface)を用いて実行されるので、「SII書き込み」とも称される。すなわち、制御装置100は、スレーブIDの設定処理において、SIIを用いて、指定されたスレーブ200の不揮発性メモリ220に指定されたスレーブIDを書き込む。
 但し、不揮発性メモリ220に書き込まれたスレーブIDは、そのままではスレーブID格納レジスタ216に反映されない。スレーブ200が再起動するときに、不揮発性メモリ220に格納されたスレーブIDが読み出されて、スレーブID格納レジスタ216に反映される(シーケンスSQ2)。そのため、スレーブIDを設定対象のスレーブ200の不揮発性メモリ220に書き込んだ場合には、スレーブ200の再起動が必要となる。
 第2番目の方法は、スレーブID更新オブジェクト218(Slave Identification Reload Object)を用いる方法である。スレーブID更新オブジェクト218は、EtherCATにおいてSDO(Service Data Object)として規定されるオブジェクトであり、外部からのアクセスに応じて処理が可能になっている。メインメモリ214上にインスタンス化されているオブジェクトであり、外部からの指令に従って、スレーブID格納レジスタ216に格納されているスレーブIDを更新できる。この書き込みは、CoE(CANopen over EtherCAT)プロトコルを用いて実行されるので、「CoE書き込み」とも称される。
 すなわち、制御装置100は、スレーブIDの設定処理において、CoEプロトコルを用いて、指定されたスレーブ200のメインメモリ214(揮発性メモリ)に指定されたスレーブIDを書き込む。
 第2番目の方法においては、スレーブID更新オブジェクト218に対して、マスタから設定すべきスレーブIDを書き込むと(シーケンスSQ2)、スレーブID更新オブジェクト218がスレーブID格納レジスタ216に格納されている値を更新する(シーケンスSQ3)。
 このように、スレーブ200のメインメモリ214(揮発性メモリ)へ指定されたスレーブID(識別情報)が書き込まれた場合、書き込み先のスレーブ200にスレーブID更新オブジェクト218が実装されていれば、スレーブID更新オブジェクト218がメインメモリ214に格納されているスレーブIDの値を更新する。
 スレーブID更新オブジェクト218を用いる方法によれば、スレーブIDを反映するために、スレーブ200の電源を一旦遮断して再起動する必要はない。但し、設定対象のスレーブ200がスレーブID更新オブジェクト218を実装している必要がある。逆に言えば、スレーブID更新オブジェクト218を実装していないスレーブ200に対しては、スレーブIDを反映するために、電源遮断および再起動が必要となる。
 後述するように、本実施の形態に係るスレーブID設定命令400が実行されると、第1番目および第2番目の両方の方法でスレーブIDが設定される。すなわち、制御装置100は、スレーブIDの設定処理において、設定対象のスレーブ200の不揮発性メモリ220およびメインメモリ214(揮発性メモリ)の両方に、指定されたスレーブIDを書き込む。このとき、制御装置100は、指定されたスレーブIDの書き込みの成否に応じて、指定されたスレーブ200の再起動の要否を示す情報(後述の図12に示す「ShouldReboot415」など)を出力する。
 但し、第1番目および第2番目のいずれか一方の方法のみを実行するようにしてもよい。あるいは、第2番目の方法を実行し、その実行が失敗した場合(典型的には、スレーブID更新オブジェクト218が実装されていない場合)に限って、第1番目の方法を実行するようにしてもよい。
 <G.命令の記述例>
 本実施の形態に係るスレーブID設定命令400および関連する命令については、任意の形式で規定できるが、例えば、ファンクションブロック形式で規定してもよい。
 図12は、本実施の形態に係る制御装置100のユーザプログラム132で利用可能なスレーブID設定命令400のファンクションブロックを説明するための図である。図12を参照して、スレーブID設定命令400のファンクションブロックは、入力として、Execute401と、PreviousSlaveID402と、PreviousSlavePort403と、NewSlaveIDTable404と、NumOfSlaves405と、FailureTable406とを含む。
 Execute401には、実行条件となるブール変数が指定される。PreviousSlaveID402には、基準となるスレーブのスレーブIDが指定される。PreviousSlavePort403には、基準となるスレーブのポート名が指定される。NewSlaveIDTable404には、設定される1または複数のスレーブIDが指定される。NumOfSlaves405には、設定対象のスレーブの数が指定される。FailureTable406には、設定に失敗したスレーブを格納するテーブル名が指定される。
 また、スレーブID設定命令400のファンクションブロックは、出力として、Done411と、Busy412と、Error413と、ErrorID414と、ShouldReboot415と、FailureTable416とを含む。
 Done411からは、スレーブID設定命令400の正常終了の有無を示すブール値が出力される。Busy412からは、スレーブID設定命令400の処理中の有無を示すブール値が出力される。Error413からは、スレーブID設定命令400の異常終了の有無を示すブール値が出力される。ErrorID414からは、スレーブID設定命令400が異常終了したときのエラー値が出力される。ShouldReboot415からは、設定対象のスレーブの再起動が必要であるか否かを示すブール値が出力される。FailureTable416からは、設定に失敗したスレーブが格納された配列が出力される。このように、スレーブID設定命令400には、いずれのスレーブにおいてスレーブIDの設定が失敗したのかを示すエラー情報を出力する先のテーブル名が指定される。
 図12に示す、PreviousSlaveID402、PreviousSlavePort403、NewSlaveIDTable404、および、NumOfSlaves405は、図10を参照して説明したように、任意のスレーブを基準となるスレーブとして設定した上で、1または複数の未知スレーブに対してそれぞれスレーブIDを設定するためのパラメータに相当する。
 図12に示すFailureTable406および416には、未知スレーブに対するスレーブIDの設定の成否を示す情報が格納される。
 図12に示すShouldReboot415として出力される値は、上述の図11を参照して説明したように、スレーブID更新オブジェクト218が実装されていないスレーブに対してスレーブIDを設定した場合に、当該スレーブを再起動することが必要であることを示す情報に相当する。
 上述の基準となるスレーブを利用した応用例として、未知スレーブのスレーブIDを設定するのではなく、未知スレーブのスレーブIDを取得する命令(以下、「スレーブID読出設令」とも称す。)が提供されてもよい。
 図13は、本実施の形態に係る制御装置100のユーザプログラム132で利用可能なスレーブID読出命令420のファンクションブロックを説明するための図である。図13を参照して、スレーブID読出命令420のファンクションブロックは、入力として、Execute421と、PreviousSlaveID422と、PreviousSlavePort423と、NumOfSlaves424とを含む。
 Execute421には、実行条件となるブール変数が指定される。PreviousSlaveID422には、基準となるスレーブのスレーブIDが指定される。PreviousSlavePort423には、基準となるスレーブのポート名が指定される。NumOfSlaves424には、読出対象のスレーブの数が指定される。
 また、スレーブID読出命令420のファンクションブロックは、出力として、Done431と、Busy432と、Error433と、ErrorID434と、GetSlaveIDTable435と、IsSlaveIDTable436とを含む。
 Done431からは、スレーブID読出命令420の正常終了の有無を示すブール値が出力される。Busy432からは、スレーブID読出命令420の処理中の有無を示すブール値が出力される。Error433からは、スレーブID読出命令420の異常終了の有無を示すブール値が出力される。ErrorID434からは、スレーブID読出命令420が異常終了したときのエラー値が出力される。GetSlaveIDTable435からは、読出対象のスレーブから読み出されたスレーブIDが格納された配列が出力される。IsSlaveIDTable436からは、スレーブIDの取得の成否を示すブール値が格納された配列が出力される。
 このように、本実施の形態に係る制御装置100は、複数のスレーブ200のうちいずれかのスレーブ200が基準として指定されたスレーブID読出命令420を実行することで、指定された他のスレーブ200に設定されているスレーブID(識別情報)を読み出す。このようないずれかのスレーブ200が基準としてスレーブID(識別情報)を読み出すことができる処理が識別情報読出機能に相当する。
 上述したようなスレーブID設定命令400およびスレーブID読出命令420は、制御装置100で実行されるユーザプログラム132の一部として実行されてもよい。すなわち、ユーザプログラム132は、スレーブID設定命令400またはスレーブID読出命令420の実行を指定するコードを含み得る。
 <H.処理手順>
 本実施の形態に係るスレーブID設定命令400がユーザプログラム132から実行された場合の処理手順について説明する。
 図14は、本実施の形態に係るスレーブID設定命令400がユーザプログラム132から実行された場合の処理手順を示すシーケンス図である。図14に示す処理手順は、制御装置100のプロセッサ102が実行するユーザプログラム132と、制御装置100によるマスタとしての機能を提供するフィールドネットワークコントローラ120と、スレーブ200との間で実行される。
 フィールドネットワークコントローラ120は、ユーザプログラム132からの指令を受け付ける命令インターフェイス122と、ネットワーク4に接続されているスレーブ200の実際の接続状態(以下「実構成情報」とも称す。)を管理する実構成管理コンポーネント124とを有している。スレーブID設定命令400の実行においてスレーブIDが設定される設定対象のスレーブ200は、複数のスレーブ200の接続状態(実構成情報)を参照することで、接続されている位置が特定される。
 より具体的には、ユーザプログラム132が順次実行される過程で、スレーブID設定命令400が実行されると(シーケンスSQ100)、フィールドネットワークコントローラ120の命令インターフェイス122に命令実行指示が与えられる(シーケンスSQ102)。命令実行指示は、図12に示すスレーブID設定命令400に対して設定される入力情報を含む。
 命令インターフェイス122は、実構成管理コンポーネント124が管理している実際の実構成情報を参照して、指定された基準となるスレーブのスレーブIDおよびポート名に基づいて、設定対象となる未知スレーブのスレーブIDを取得する(シーケンスSQ104)。
 続いて、命令インターフェイス122は、シーケンスSQ104において取得したスレーブIDに基づいて設定対象のスレーブ200を特定した上で、当該特定したスレーブ200の不揮発性メモリ220に指定されたスレーブIDを書き込む(シーケンスSQ106)。さらに、命令インターフェイス122は、スレーブIDの不揮発性メモリ220への書き込みの実行結果(書込結果)を取得し(シーケンスSQ108)、その取得した書込結果を内部に格納する(シーケンスSQ110)。
 続いて、命令インターフェイス122は、シーケンスSQ104において取得したスレーブIDに基づいて設定対象のスレーブ200を特定した上で、当該特定したスレーブ200のスレーブID更新オブジェクト218に指定されたスレーブIDを書き込む(シーケンスSQ112)。さらに、命令インターフェイス122は、スレーブIDのスレーブID更新オブジェクト218への書き込みの実行結果(書込結果)を取得し(シーケンスSQ114)、その取得した書込結果を内部に格納する(シーケンスSQ116)。
 なお、複数のスレーブ200が設定対象として指定されている場合には、シーケンスSQ104からSQ116の処理は、対象のスレーブ200の数だけ繰り返される。
 最終的に、命令インターフェイス122は、命令の実行結果をユーザプログラム132へ返す(シーケンスSQ118)。
 ユーザプログラム132へ返される命令の実行結果は、設定対象のスレーブの再起動が必要であるか否かを示すブール値(ShouldReboot415)を含む。具体的には、不揮発性メモリ220への書き込み(シーケンスSQ106)の成否によらず、スレーブID更新オブジェクト218への書き込みが成功した場合には、設定対象のスレーブの再起動は不要であることを示す値が返される。一方、不揮発性メモリ220への書き込み(シーケンスSQ106)は成功したものの、スレーブID更新オブジェクト218への書き込み(シーケンスSQ112)が失敗した場合には、設定対象のスレーブの再起動が必要であることを示す値が返される。
 このように、制御装置100は、スレーブIDの設定処理において、指定されたスレーブ200の不揮発性メモリ220への指定されたスレーブIDの書き込みが成功したものの、メインメモリ214(揮発性メモリ)への指定されたスレーブIDの書き込みが成功しなかったときに、指定されたスレーブの再起動が必要であることを出力する。
 なお、不揮発性メモリ220への書き込み(シーケンスSQ106)およびスレーブID更新オブジェクト218への書き込み(シーケンスSQ112)の両方が失敗した場合には、スレーブID設定命令400は異常終了とされてもよい。
 図15は、図14に示す実構成管理コンポーネント124が保持している実構成情報の一例を示す模式図である。図15には、一例として、図10に示す接続構成に対応する実構成情報を示す。
 図15を参照して、実構成管理コンポーネント124は、マスタとして機能する制御装置100に最も近いジャンクションスレーブ200Jのデバイス情報と、ジャンクションスレーブ200Jの各ポートに接続されているスレーブ200-1および200-2のデバイス情報とを含む。これらの情報は、接続関係を反映した形で管理される。
 実構成管理コンポーネント124は、実構成情報を参照することで、ジャンクションスレーブ200JのportCに接続されているスレーブ200-1および200-2を特定できる。
 なお、図15に具現化された情報は説明の便宜上のものであり、どのような形で管理されていてもよい。
 <I.異常発生時の解析支援機能>
 本実施の形態に係る制御装置100のユーザプログラム132で利用可能なスレーブID設定命令400およびスレーブID読出命令420は、1または複数のスレーブに対して、スレーブIDの設定あるいは読み出しを行う。複数のスレーブに対して処理を実行した場合には、いずれかのスレーブで実行失敗(異常終了)が生じると、その異常が発生したスレーブおよびその原因を特定することは容易ではない。そこで、本実施の形態においては、以下のような異常発生時の解析支援機能を提供する。
 図16は、本実施の形態に係るスレーブID設定命令400が出力する異常終了結果の一例を示す模式図である。図16には、一例として、ジャンクションスレーブ200Jに接続される4つのスレーブ200-1~200-4に対してそれぞれスレーブIDを設定する例を示す。
 この場合には、スレーブID設定命令400から出力されるFailureTable416は、各スレーブ200に対する設定の成否を示す4つのブール値を含む。例えば、4つのスレーブ200-1~200-4に対するそれぞれのスレーブIDの設定が異常なく実行されると、配列[0,0,0,0]が出力される。
 これに対して、ジャンクションスレーブ200Jから2番目のスレーブ200-2に対するスレーブIDの設定が失敗した場合には、2番目のスレーブ200-2に対応する位置の値が「1」に変更されたFailureTable416が出力される。すなわち、FailureTable416として、配列[0,0,0,0]が出力される。
 このように、制御装置100は、スレーブIDの設定処理において、スレーブIDの設定に失敗したスレーブ200を特定する情報を出力する。より具体的には、制御装置100は、スレーブIDの設定処理において、1つ以上の指定されたスレーブ200のうち、いずれのスレーブにおいてスレーブIDの設定が失敗したのかを示すエラー情報(FailureTable416)を出力する。エラー情報として出力されるFailureTable416には、1つ以上の指定されたスレーブ200に対応するメンバを有する配列が格納される。
 このように、制御装置100により実行されるスレーブID設定命令400は、基準となるスレーブからの相対位置に対応付けられた異常終了結果を出力するので、異常が発生したスレーブの位置を容易に特定できる。すなわち、スレーブIDの設定あるいは読み出しが失敗した場合の原因を特定するために、設定あるいは読み出しが失敗したスレーブ200の位置を示す情報が出力される。
 また、1つ以上の指定されたスレーブ200に対するスレーブIDの設定が失敗したか否かを示すError413(図12)をさらに出力するようにしてもよい。例えば、Error413がスレーブIDの設定が失敗したことを示す値になっている場合に、FailureTable416を参照するような処理を実装してもよい。
 さらに、設定または読み出しが失敗した理由を示すエラーコードを出力するようにしてもよい。典型的には、スレーブID設定命令400のファンクションブロックが、ErrorID414(図12参照)として出力することができる。すなわち、スレーブID設定命令400は、1つ以上の指定されたスレーブ200に対するスレーブIDの設定が失敗した理由を示すErrorID414(図12参照)をさらに出力するようにしてもよい。なお、複数のスレーブ200を設定対象とした場合には、スレーブ200毎にエラーコードを出力するようにしてもよいし、複数のエラーコードが発生した場合には、優先度の高い順にエラーコードを出力するようにしてもよい。
 なお、スレーブID設定命令400のファンクションブロックは、Error413として、スレーブIDの設定の成否を示す情報を出力してもよい。
 このように、本実施の形態に係るスレーブID設定命令およびスレーブID読出設令によれば、命令実行の成否(成功/失敗)の情報を取得できるとともに、失敗した理由を示すエラーコードを取得することもできる。さらに、本実施の形態に係るスレーブID設定命令およびスレーブID読出設令によれば、失敗したスレーブの位置についても特定ができる。これらの情報を用いることで、スレーブIDの設定あるいは読み出しが失敗した場合に、対象のスレーブおよびその原因などを容易に特定できる。
 さらに、本実施の形態に係る制御装置100は、スレーブIDの設定あるいは読み出しにおいて対象のスレーブに送信された指令(パケット)の内容を格納しておき、いずれかの処理が失敗したときには、その格納された指令(パケット)の内容を出力するようにしてもよい。
 さらに、本実施の形態に係る制御装置100は、スレーブIDの設定あるいは読み出し処理に係るログを蓄積しておき、いずれかの処理が失敗したときには、その格納されたログの内容を出力するようにしてもよい。
 <J.ユーザプログラム例>
 次に、本実施の形態に係るスレーブID設定命令400を用いたいくつかのユーザプログラム例について説明する。
 (j1:段取り替え)
 まず、スレーブID設定命令400を用いた段取り替え用のユーザプログラム132について説明する。
 図17は、本実施の形態に係るスレーブID設定命令400を用いた段取り替えの内容を説明するための図である。図17(A)に示す接続構成から図17(B)に示す接続構成に変更する場合を想定する。より具体的には、ジャンクションスレーブ200JのポートX4に接続されている4つのスレーブ200-1,200-2,200-3,200-4を取り外して、ジャンクションスレーブ200JのポートX5に接続し直す場合を想定する。
 図18は、図17に示す段取り替えに対応するユーザプログラム132の要部を示す図である。図18を参照して、ユーザプログラム132は、行番号0~6までの7行分のコードを含む。
 ユーザプログラム132において、命令EC_ChangeEnableSettingは、スレーブの有効および無効を切り替えるための命令である。行番号0,1,2,3に記述されている、スレーブ有効/無効切替命令450,451,452,453は、対象のスレーブを有効化する命令であり、行番号6に記述されている、スレーブ有効/無効切替命令454,455,456,457は、対象のスレーブを無効化する命令である。制御装置100は、これらの対象のスレーブを無効化する命令を実行することで、構成情報134による定義に含まれる一部または全部のスレーブを無効化する。
 命令ResetECErrorは、スレーブの異常を解除するための命令である。行番号5に記述されている、スレーブ異常解除命令460が命令ResetECErrorに相当する。
 図19は、図17に示す段取り替え対応する接続状態の変化を説明するための図である。図20は、図17に示す段取り替え対応する構成情報134の変化を説明するための図である。
 図17に示す段取り替えは、以下の手順1~7に従って実行される。なお、スレーブIDの値であることを意味する場合には、数字に「#」を付して記載している。
(手順1)
 事前準備の局面において、図19(A)に示されるように、ジャンクションスレーブ200JのポートX4に4つのスレーブ200-1,200-2,200-3,200-4を接続する。そして、サポート装置300からスレーブ200-1,200-2,200-3,200-4に対して、スレーブIDとして「3」,「4」,「5」,「6」を設定する。
 また、サポート装置300から図20(A)に示される構成情報134をマスタとして機能する制御装置100に転送する。このとき、スレーブ#3~#10は、すべて「無効」(Disable)に設定されている。
(手順2)
 運転開始の局面において、制御装置100、ジャンクションスレーブ200J、およびスレーブ200-1,200-2,200-3,200-4の電源が投入される。併せて、ユーザプログラム132のスレーブ有効/無効切替命令(図18には図示されていない)が実行されることで、構成情報134のスレーブ#3~#6が有効化(Enabled)される(図20(B)参照)。これにより、図17(A)に示される接続構成での運転が開始される。
(手順3)
 その後、段取り替えが開始されたとする。まず、スレーブ有効/無効切替命令450,451,452,453(図18参照)が実行されることで、構成情報134のスレーブ#3~#6が無効化(Diabled)される。すなわち、図20(A)に示される状態に戻る。
(手順4)
 続いて、図19(B)に示されるように、スレーブ200-1,200-2,200-3,200-4の電源が遮断された上で、ジャンクションスレーブ200JのポートX4から切り離される。
(手順5)
 続いて、図19(C)に示されるように、ジャンクションスレーブ200JのポートX5に4つのスレーブ200-1,200-2,200-3,200-4を接続する。そして、スレーブ200-1,200-2,200-3,200-4の電源が再投入される。
 このとき、制御装置100が管理する構成情報134の内容と実際の構成とが一致しないので、「ネットワーク構成照合異常(スレーブ不一致)」が発生する。
(手順6)
 図19(C)に示される接続状態で運転を開始するために、スレーブID設定命令400が実行される(図18に示されるユーザプログラム132の4行目)。スレーブID設定命令400においては、ジャンクションスレーブ200Jを基準として、ポートX4に接続されたスレーブ200-1,200-2,200-3,200-4を対象として特定した上で、スレーブIDとして「7」,「8」,「9」,「10」を設定する。
(手順7)
 そして、「ネットワーク構成照合異常(スレーブ不一致)」を解除するために、スレーブ異常解除命令460が実行される(図18に示されるユーザプログラム132の5行目)。さらに、スレーブ有効/無効切替命令454,455,456,457が実行される(図18に示されるユーザプログラム132の6~9行目)ことで、構成情報134のスレーブ#7~#10が有効化(Enabled)される(図20(C)参照)。これにより、図17(B)に示される接続構成での運転が開始される。
 以上のように、本実施の形態に係るスレーブID設定命令400および関連する命令が提供されることで、ユーザプログラム132を用いて段取り替えを実現できる。
 (j2:再起動)
 上述したように、スレーブID更新オブジェクト218が実装されていないスレーブ200に対してスレーブIDを設定した場合には、対象のスレーブ200を再起動(電源遮断および再投入)する必要がある。このようなスレーブ200の再起動をオペレータに促すようにユーザプログラム132を作成することもできる。
 図21は、本実施の形態に従うスレーブID設定命令400を用いたスレーブ200の再起動を促すためのユーザプログラム132の一例を示す図である。図21に示されるユーザプログラム132においては、スレーブID設定命令400からのShouldReboot415の値が「ShouldReboot」という変数(ブール値)に出力されている。「ShouldReboot」は、変数「RebootRampOn」という変数(ブール値)の値を決定する。すなわち、変数「ShouldReboot」が「true」に設定されると、変数「RebootRampOn」も「true」になる。
 変数「RebootRampOn」を設定対象のスレーブ200に設けられたインジケータ250を駆動するための指令として関連付けることで、設定対象のスレーブ200を再起動しなければならない場合に、オペレータにその旨を提示できる。
 このように、各スレーブ200の再起動の要否をオペレータに提示できるので、安全に配慮した段取り替えを実現できる。さらに、複数のスレーブ200が存在する場合には、例えば、再起動(電源の再投入)の順番をオペレータに提示することもできる。
 (j3:異常検知)
 上述したように、本実施の形態に従うスレーブID設定命令400は、複数のスレーブ200に対してそれぞれスレーブIDを設定する場合において、いずれかのスレーブ200に対する実行が失敗すると、その失敗したスレーブ200の位置を特定できる情報を出力する。このような位置を特定できる情報をオペレータに提示するためのユーザプログラム132を作成することもできる。
 図22は、本実施の形態に従うスレーブID設定命令400の実行が失敗したときの情報提示を実現するためのユーザプログラム132の一例を示す図である。図22に示すユーザプログラム132は、オペレータに対するユーザインターフェイス装置である表示装置500と関連付けられる。
 より具体的には、スレーブID設定命令400からのFailureTable416の値(配列)が「failAdrs[4]」という4つのメンバからなる配列に出力されている。図22に示す例では、スレーブID設定命令400は、4つのスレーブ200に対してスレーブIDを設定することが規定されており、この4つのスレーブ200に対する設定の成否を示す値が変数「failAdrs[4]」に格納される。
 各メンバの値「failAdrs(1)」,「failAdrs(2)」,「failAdrs(3)」,「failAdrs(4)」を表示装置500上の各スレーブ200を示す表示オブジェクトに関連付けることができる。表示態様と対応する変数値とを関連付けることで、スレーブIDの設定に失敗したスレーブ200に対応する表示オブジェクトの表示態様(例えば、色など)を他の表示オブジェクトとは異ならせることができる。
 すなわち、表示装置500は、FailureTable416に格納される値(配列)に基づいて、1つ以上の指定されたスレーブ200のうちスレーブIDの設定が失敗したスレーブ200の位置を視覚的に提示する。これにより、オペレータは、いずれのスレーブに異常が発生したのかを一見して把握できる。
 さらに別の情報と関連付けることで、何らかの異常が発生したスレーブの位置を特定するとともに、その異常が発生した原因を容易に決定できる。
 <K.付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
 制御システム(1)であって、
 マスタとして機能する制御装置(100)と、
 前記制御装置とネットワーク接続された複数のスレーブ(200)とを備え、
 前記複数のスレーブの各々は識別情報(224)を有しており、
 前記制御装置は、前記複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令(400)を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段(102,122)を備える、制御システム。
[構成2]
 前記制御装置は、前記複数のスレーブの接続状態を管理する管理手段(124)をさらに備え、
 前記識別情報設定手段により識別情報が設定される他のスレーブは、前記複数のスレーブの接続状態を参照することで、接続されている位置が特定される、構成1に記載の制御システム。
[構成3]
 前記第1の命令は、前記他のスレーブが接続されるポートの指定(423)を含む、構成1または2に記載の制御システム。
[構成4]
 前記第1の命令は、複数の前記他のスレーブに対してそれぞれ識別情報(404)を指定可能である、構成1~3のいずれか1項に記載の制御システム。
[構成5]
 前記複数のスレーブの各々は、識別情報を保持するための不揮発性メモリ(220)と、設定されている識別情報を保持する揮発性メモリ(214)とを備え、
 前記識別情報設定手段は、前記他のスレーブの前記不揮発性メモリおよび前記揮発性メモリの両方に、指定された識別情報を書き込む、構成1~4のいずれか1項に記載の制御システム。
[構成6]
 前記第1の命令は、前記制御装置で実行されるユーザプログラム(130)の一部として実行される、構成1~5のいずれか1項に記載の制御システム。
[構成7]
 前記識別情報設定手段は、識別情報の設定に失敗したスレーブを特定する情報(416)を出力する、構成1~6のいずれか1項に記載の制御システム。
[構成8]
 前記制御装置は、前記複数のスレーブのうちいずれかのスレーブが基準として指定された第2の命令(420)を実行することで、指定された他のスレーブに設定されている識別情報を読み出す識別情報読出手段(102,122)をさらに備える、構成1~7のいずれか1項に記載の制御システム。
[構成9]
 前記制御装置は、前記複数のスレーブの接続構成を定義する構成情報(134)を有しており、
 前記制御装置は、第3の命令(450,451,452,453,454,455,456,457)を実行することで、前記構成情報による定義に含まれる一部または全部のスレーブを無効化する無効化手段(102,122)をさらに備える、構成1~8のいずれか1項に記載の制御システム。
[構成10]
 マスタとして機能する制御装置(100)であって、
 複数のスレーブ(200)とネットワーク接続するためのコントローラ(120)を備え、前記複数のスレーブの各々は識別情報(224)を有しており、
 前記複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令(400)を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段(102,122)を備える、制御装置。
 <L.利点>
 本実施の形態に係る制御システムにおいては、ユーザプログラム上で実行されるスレーブID設定命令を用いて、任意の未知スレーブに対して任意のスレーブID(あるいは、ノードアドレス)を設定できる。そのため、段取り替えなどが発生して、同一のスレーブに対して異なるスレーブIDを設定しなければならないような状況においても、サポート装置などを用いることなく、ユーザプログラムだけで必要な設定を実現できる。
 また、本実施の形態に係るスレーブID設定命令は、有効なスレーブIDを有している任意のスレーブを基準として、任意の未知スレーブを特定した上で、任意のスレーブIDを設定できる。任意のスレーブを基準として任意の未知スレーブを特定する方法を採用したことで、ポジションアドレスなどを意識しなくても、スレーブIDの再設定あるいは変更を容易に実現できる。
 また、本実施の形態に係るスレーブID設定命令は、複数のスレーブに対して、それぞれスレーブIDを一括設定できるので、スレーブIDの再設定あるいは変更に要する時間を短縮できる。
 また、本実施の形態に係るスレーブID設定命令は、設定したスレーブIDを即時に反映可能なスレーブと、スレーブIDの反映に再起動が必要なスレーブとを区別することができる。その上で、再起動が必要なスレーブについては、その情報がスレーブID設定命令から出力される。そのため、段取り替えなどを担当するオペレータに対する操作支援などを容易に行うことができる。
 また、本実施の形態に従うスレーブID設定命令は、スレーブIDの設定に失敗したスレーブの位置を特定するための情報を出力する。そのため、トラブルシュートを容易化できる。さらに、本実施の形態に従うスレーブID設定命令は、スレーブIDの設定が失敗した理由を示すエラーコードを出力するので、設定に失敗したスレーブの位置と併せて、よりトラブルシュートを容易化できる。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 1 制御システム、4 ネットワーク、6 内部バス、20,22 コンベア、30,40,50 製造モジュール、100 制御装置、102,212,302 プロセッサ、104 チップセット、106,214,304 メインメモリ、108,306 ストレージ、110 ネットワークコントローラ、112,316 USBコントローラ、114 メモリカードインターフェイス、116 メモリカード、118 内部バスコントローラ、120,202 フィールドネットワークコントローラ、122 命令インターフェイス、124 実構成管理コンポーネント、126 カウンタ、128 RTC、130 システムプログラム、132 ユーザプログラム、134 構成情報、150 機能ユニット、200 スレーブ、200J ジャンクションスレーブ、210 メインコントローラ、216 格納レジスタ、218 更新オブジェクト、220 不揮発性メモリ、224 スレーブID、226 ファームウェア、230 機能回路、250 インジケータ、300 サポート装置、308 入力部、310 表示部、312 光学ドライブ、314 記録媒体、318 プロセッサバス、320 OS、326 サポートプログラム、400 設定命令、420 読出命令、450,451,452,453,454,455,456,457 スレーブ有効/無効切替命令、460 スレーブ異常解除命令、500 表示装置。

Claims (10)

  1.  制御システムであって、
     マスタとして機能する制御装置と、
     前記制御装置とネットワーク接続された複数のスレーブとを備え、
     前記複数のスレーブの各々は識別情報を有しており、
     前記制御装置は、前記複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段を備える、制御システム。
  2.  前記制御装置は、前記複数のスレーブの接続状態を管理する管理手段をさらに備え、
     前記識別情報設定手段により識別情報が設定される他のスレーブは、前記複数のスレーブの接続状態を参照することで、接続されている位置が特定される、請求項1に記載の制御システム。
  3.  前記第1の命令は、前記他のスレーブが接続されるポートの指定を含む、請求項1または2に記載の制御システム。
  4.  前記第1の命令は、複数の前記他のスレーブに対してそれぞれ識別情報を指定可能である、請求項1~3のいずれか1項に記載の制御システム。
  5.  前記複数のスレーブの各々は、識別情報を保持するための不揮発性メモリと、設定されている識別情報を保持する揮発性メモリとを備え、
     前記識別情報設定手段は、前記他のスレーブの前記不揮発性メモリおよび前記揮発性メモリの両方に、指定された識別情報を書き込む、請求項1~4のいずれか1項に記載の制御システム。
  6.  前記第1の命令は、前記制御装置で実行されるユーザプログラムの一部として実行される、請求項1~5のいずれか1項に記載の制御システム。
  7.  前記識別情報設定手段は、識別情報の設定に失敗したスレーブを特定する情報を出力する、請求項1~6のいずれか1項に記載の制御システム。
  8.  前記制御装置は、前記複数のスレーブのうちいずれかのスレーブが基準として指定された第2の命令を実行することで、指定された他のスレーブに設定されている識別情報を読み出す識別情報読出手段をさらに備える、請求項1~7のいずれか1項に記載の制御システム。
  9.  前記制御装置は、前記複数のスレーブの接続構成を定義する構成情報を有しており、
     前記制御装置は、第3の命令を実行することで、前記構成情報による定義に含まれる一部または全部のスレーブを無効化する無効化手段をさらに備える、請求項1~8のいずれか1項に記載の制御システム。
  10.  マスタとして機能する制御装置であって、
     複数のスレーブとネットワーク接続するためのコントローラを備え、前記複数のスレーブの各々は識別情報を有しており、
     前記複数のスレーブのうちいずれかのスレーブが基準として指定された第1の命令を実行することで、指定された他のスレーブに対して、指定された識別情報を設定する識別情報設定手段を備える、制御装置。
PCT/JP2020/005272 2019-03-14 2020-02-12 制御システムおよび制御装置 WO2020184034A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP20769405.0A EP3940997B1 (en) 2019-03-14 2020-02-12 Control system and control device
US17/434,782 US20220150725A1 (en) 2019-03-14 2020-02-12 Control system and control apparatus
CN202080017588.5A CN113508561B (zh) 2019-03-14 2020-02-12 控制系统以及控制装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019047441A JP7070479B2 (ja) 2019-03-14 2019-03-14 制御システムおよび制御装置
JP2019-047441 2019-03-14

Publications (1)

Publication Number Publication Date
WO2020184034A1 true WO2020184034A1 (ja) 2020-09-17

Family

ID=72426177

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/005272 WO2020184034A1 (ja) 2019-03-14 2020-02-12 制御システムおよび制御装置

Country Status (5)

Country Link
US (1) US20220150725A1 (ja)
EP (1) EP3940997B1 (ja)
JP (1) JP7070479B2 (ja)
CN (1) CN113508561B (ja)
WO (1) WO2020184034A1 (ja)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012124159A1 (ja) * 2011-03-15 2012-09-20 オムロン株式会社 ネットワークシステムにおけるアドレス設定方法
JP2014119912A (ja) * 2012-12-14 2014-06-30 Omron Corp 制御装置および制御プログラム
JP2014119907A (ja) * 2012-12-14 2014-06-30 Omron Corp 通信ユニット、通信システム、制御方法、およびプログラム
JP2014146070A (ja) * 2013-01-25 2014-08-14 Omron Corp 制御装置、制御方法、およびプログラム
JP2015176369A (ja) 2014-03-14 2015-10-05 オムロン株式会社 制御装置
JP2016157414A (ja) * 2015-02-25 2016-09-01 富士ゼロックス株式会社 通信システム及び画像形成装置
JP2018093382A (ja) * 2016-12-05 2018-06-14 オムロン株式会社 通信システム、通信装置および通信プログラム

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050268012A1 (en) * 2004-05-05 2005-12-01 Ralf Schaetzle Method for automatic configuration of a process control system and corresponding process control system
US7346051B2 (en) * 2004-06-25 2008-03-18 Matsushita Electric Industrial Co., Ltd. Slave device, master device and stacked device
JP5229343B2 (ja) * 2011-03-15 2013-07-03 オムロン株式会社 接続異常検出方法、ネットワークシステムおよびマスター装置
CN103460650B (zh) * 2011-03-15 2016-05-25 欧姆龙株式会社 网络系统、主机及网络系统的控制方法
JP5120473B2 (ja) * 2011-03-15 2013-01-16 オムロン株式会社 ネットワークシステムの設計支援装置
DE102011107321A1 (de) * 2011-07-06 2013-01-10 Abb Ag System und Verfahren zur Parametrierung von Feldgeräten eines Automatisierungs- oder Steuerungssystems
CA2844099C (en) * 2011-08-05 2019-09-10 Richard Geraint Element Apparatus and system for controlling window coverings to adjust admitted daylight
JP6167532B2 (ja) * 2013-01-25 2017-07-26 オムロン株式会社 制御装置および制御装置の動作方法
KR101816944B1 (ko) * 2013-10-02 2018-01-09 엘에스산전 주식회사 UART Ring 통신의 ID 자동 설정방법
JP2017163508A (ja) * 2016-03-11 2017-09-14 オムロン株式会社 マスタースレーブ制御システム、マスタースレーブ制御システムの制御方法、情報処理プログラム、および記録媒体
JP2018007122A (ja) * 2016-07-05 2018-01-11 富士通コンポーネント株式会社 無線通信装置及び無線通信システム
DE102017117128A1 (de) * 2017-07-28 2019-01-31 Ebm-Papst Mulfingen Gmbh & Co. Kg Drahtlose Vergabe von Netzwerkadressen

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012124159A1 (ja) * 2011-03-15 2012-09-20 オムロン株式会社 ネットワークシステムにおけるアドレス設定方法
JP2014119912A (ja) * 2012-12-14 2014-06-30 Omron Corp 制御装置および制御プログラム
JP2014119907A (ja) * 2012-12-14 2014-06-30 Omron Corp 通信ユニット、通信システム、制御方法、およびプログラム
JP2014146070A (ja) * 2013-01-25 2014-08-14 Omron Corp 制御装置、制御方法、およびプログラム
JP2015176369A (ja) 2014-03-14 2015-10-05 オムロン株式会社 制御装置
JP2016157414A (ja) * 2015-02-25 2016-09-01 富士ゼロックス株式会社 通信システム及び画像形成装置
JP2018093382A (ja) * 2016-12-05 2018-06-14 オムロン株式会社 通信システム、通信装置および通信プログラム

Also Published As

Publication number Publication date
EP3940997A4 (en) 2022-12-07
CN113508561A (zh) 2021-10-15
US20220150725A1 (en) 2022-05-12
EP3940997A1 (en) 2022-01-19
JP7070479B2 (ja) 2022-05-18
CN113508561B (zh) 2023-08-25
JP2020150451A (ja) 2020-09-17
EP3940997B1 (en) 2024-05-15

Similar Documents

Publication Publication Date Title
US7275236B1 (en) Method for programming a multiple device control system using object sharing
US20150362903A1 (en) Control device and method of operating control device
JP4788912B2 (ja) Plc
US20120089239A1 (en) Intelligent interface for a distributed control system
JP2002268707A (ja) コントローラ及びツール並びにそれらにより構成されるシステム
US10908583B2 (en) Safety control system and safety control unit
JP6299064B2 (ja) 制御装置、制御方法、およびプログラム
WO2020184062A1 (ja) 制御システムおよび制御装置
WO2020184063A1 (ja) 制御システムおよび制御装置
WO2019176335A1 (ja) 制御システム、コントローラ、および制御方法
WO2020184034A1 (ja) 制御システムおよび制御装置
US10715396B2 (en) Support apparatus, non-transitory computer readable recording medium and setting method
US9563181B2 (en) Method for operating an automation system
JP2000315105A (ja) Nc工作機械の管理システムおよび管理プログラム
WO2021038930A1 (ja) サポート装置、サポートプログラムおよび設定方法
JP7322604B2 (ja) プログラム開発装置、プロジェクト作成方法およびプログラム開発装置を実現するためのプログラム
JP6856048B2 (ja) 制御システムおよび制御方法
US20230396500A1 (en) Operating an automation system of a machine or an installation
JP6915583B2 (ja) セーフティ制御システムおよびセーフティ制御システムにおける制御方法
JP2002152235A (ja) 自律分散型制御システムおよび自律分散型制御方法
JP2014127055A (ja) Plcの周辺装置

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2020769405

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2020769405

Country of ref document: EP

Effective date: 20211014